{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/modem-accelerating-visual-model-based","title":"MoDem: Accelerating Visual Model-Based Reinforcement Learning with Demonstrations","arxiv_id":"2212.05698","date":"2022-12-12","proceeding":null,"authors":["Nicklas Hansen","Yixin Lin","Hao Su","Xiaolong Wang","Vikash Kumar","Aravind Rajeswaran"],"abstract":"Poor sample efficiency continues to be the primary challenge for deployment of deep Reinforcement Learning (RL) algorithms for real-world applications, and in particular for visuo-motor control. Model-based RL has the potential to be highly sample efficient by concurrently learning a world model and using synthetic rollouts for planning and policy improvement. However, in practice, sample-efficient learning with model-based RL is bottlenecked by the exploration challenge. In this work, we find that leveraging just a handful of demonstrations can dramatically improve the sample-efficiency of model-based RL. Simply appending demonstrations to the interaction dataset, however, does not suffice. We identify key ingredients for leveraging demonstrations in model learning -- policy pretraining, targeted exploration, and oversampling of demonstration data -- which forms the three phases of our model-based RL framework. We empirically study three complex visuo-motor control domains and find that our method is 150%-250% more successful in completing sparse reward tasks compared to prior approaches in the low data regime (100K interaction steps, 5 demonstrations). Code and videos are available at: https://nicklashansen.github.io/modemrl","url_abs":"https://arxiv.org/abs/2212.05698v1","url_pdf":"https://arxiv.org/pdf/2212.05698v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"modem-accelerating-visual-model-based","repo_url":"https://github.com/facebookresearch/modem","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"deep-reinforcement-learning","task_name":"Deep Reinforcement Learning"},{"task_slug":"model-based-reinforcement-learning","task_name":"Model-based Reinforcement Learning"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2212.05698","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2212.05698"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/modem","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":2,"ran":1,"unverified":8},"by_repo_kind":{"official":{"samples":11,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":11,"samples":[{"code_sha256_prefix":"9925b7e4eb50dcae","entry":"l1","repo":"facebookresearch/modem","repo_kind":"official","path":"algorithm/helper.py","file_url":"https://github.com/facebookresearch/modem/blob/HEAD/algorithm/helper.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"9925b7e4eb50dcae"}},{"code_sha256_prefix":"436a7981ede1cf9d","entry":"make_dir","repo":"facebookresearch/modem","repo_kind":"official","path":"logger.py","file_url":"https://github.com/facebookresearch/modem/blob/HEAD/logger.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"436a7981ede1cf9d"}},{"code_sha256_prefix":"8d8f088c9186b5d4","entry":"mse","repo":"facebookresearch/modem","repo_kind":"official","path":"algorithm/helper.py","file_url":"https://github.com/facebookresearch/modem/blob/HEAD/algorithm/helper.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"8d8f088c9186b5d4"}},{"code_sha256_prefix":"d2c1837dcce6a2f6","entry":"cfg_to_group","repo":"facebookresearch/modem","repo_kind":"official","path":"logger.py","file_url":"https://github.com/facebookresearch/modem/blob/HEAD/logger.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"d2c1837dcce6a2f6"}},{"code_sha256_prefix":"688316a579d8c8d1","entry":"enc","repo":"facebookresearch/modem","repo_kind":"official","path":"algorithm/helper.py","file_url":"https://github.com/facebookresearch/modem/blob/HEAD/algorithm/helper.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"688316a579d8c8d1"}},{"code_sha256_prefix":"e285ec81dccf7cb8","entry":"get_sim","repo":"facebookresearch/modem","repo_kind":"official","path":"tasks/mj_envs/mj_envs/envs/env_base.py","file_url":"https://github.com/facebookresearch/modem/blob/HEAD/tasks/mj_envs/mj_envs/envs/env_base.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"e285ec81dccf7cb8"}},{"code_sha256_prefix":"029123dcb1fd1fa5","entry":"get_state_dim","repo":"facebookresearch/modem","repo_kind":"official","path":"tasks/dmcontrol.py","file_url":"https://github.com/facebookresearch/modem/blob/HEAD/tasks/dmcontrol.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"029123dcb1fd1fa5"}},{"code_sha256_prefix":"a9663bfb523e687a","entry":"make_adroit_env","repo":"facebookresearch/modem","repo_kind":"official","path":"tasks/adroit.py","file_url":"https://github.com/facebookresearch/modem/blob/HEAD/tasks/adroit.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"a9663bfb523e687a"}},{"code_sha256_prefix":"88d563b866d0550c","entry":"make_env","repo":"facebookresearch/modem","repo_kind":"official","path":"env.py","file_url":"https://github.com/facebookresearch/modem/blob/HEAD/env.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"88d563b866d0550c"}},{"code_sha256_prefix":"a28e11143461d211","entry":"parse_cfg","repo":"facebookresearch/modem","repo_kind":"official","path":"cfg_parse.py","file_url":"https://github.com/facebookresearch/modem/blob/HEAD/cfg_parse.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"a28e11143461d211"}},{"code_sha256_prefix":"b308a8f7c164f9e5","entry":"print_run","repo":"facebookresearch/modem","repo_kind":"official","path":"logger.py","file_url":"https://github.com/facebookresearch/modem/blob/HEAD/logger.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"b308a8f7c164f9e5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}