{"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/mopo-model-based-offline-policy-optimization","title":"MOPO: Model-based Offline Policy Optimization","arxiv_id":"2005.13239","date":"2020-05-27","proceeding":"NeurIPS 2020 12","authors":["Tianhe Yu","Garrett Thomas","Lantao Yu","Stefano Ermon","James Zou","Sergey Levine","Chelsea Finn","Tengyu Ma"],"abstract":"Offline reinforcement learning (RL) refers to the problem of learning policies entirely from a large batch of previously collected data. This problem setting offers the promise of utilizing such datasets to acquire policies without any costly or dangerous active exploration. However, it is also challenging, due to the distributional shift between the offline training data and those states visited by the learned policy. Despite significant recent progress, the most successful prior methods are model-free and constrain the policy to the support of data, precluding generalization to unseen states. In this paper, we first observe that an existing model-based RL algorithm already produces significant gains in the offline setting compared to model-free approaches. However, standard model-based RL methods, designed for the online setting, do not provide an explicit mechanism to avoid the offline setting's distributional shift issue. Instead, we propose to modify the existing model-based RL methods by applying them with rewards artificially penalized by the uncertainty of the dynamics. We theoretically show that the algorithm maximizes a lower bound of the policy's return under the true MDP. We also characterize the trade-off between the gain and risk of leaving the support of the batch data. Our algorithm, Model-based Offline Policy Optimization (MOPO), outperforms standard model-based RL algorithms and prior state-of-the-art model-free offline RL algorithms on existing offline RL benchmarks and two challenging continuous control tasks that require generalizing from data collected for a different task. The code is available at https://github.com/tianheyu927/mopo.","url_abs":"https://arxiv.org/abs/2005.13239v6","url_pdf":"https://arxiv.org/pdf/2005.13239v6.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":"mopo-model-based-offline-policy-optimization","repo_url":"https://github.com/tianheyu927/mopo","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"mopo-model-based-offline-policy-optimization","repo_url":"https://github.com/Yihao-Sun/pytorch-mopo","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mopo-model-based-offline-policy-optimization","repo_url":"https://github.com/junming-yang/mopo","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mopo-model-based-offline-policy-optimization","repo_url":"https://github.com/runamu/compositional-conservatism","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mopo-model-based-offline-policy-optimization","repo_url":"https://github.com/yihaosun1124/OfflineRL-Kit","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mopo-model-based-offline-policy-optimization","repo_url":"https://github.com/polixir/OfflineRL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"unanswered"}}],"tasks":[{"task_slug":"continuous-control","task_name":"Continuous Control"},{"task_slug":"offline-rl","task_name":"Offline RL"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"continuous-control","task_name":"continuous-control"},{"task_slug":"model","task_name":"model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2005.13239","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2005.13239"}},"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/tianheyu927/mopo","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yihaosun1124/OfflineRL-Kit","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/polixir/OfflineRL","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/runamu/compositional-conservatism","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Yihao-Sun/pytorch-mopo","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/junming-yang/mopo","reach":null}],"summary":{"ran":2,"ran_draft_wrong":1,"unverified":5},"by_repo_kind":{"listed":{"samples":8,"ran":3,"repositories":4}},"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":0,"samples":[{"code_sha256_prefix":"0367ac63f92bed11","entry":"BaseDynamics","repo":"yihaosun1124/OfflineRL-Kit","repo_kind":"listed","path":"offlinerlkit/policy/model_based/mopo.py","file_url":"https://github.com/yihaosun1124/OfflineRL-Kit/blob/HEAD/offlinerlkit/policy/model_based/mopo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0367ac63f92bed11"}},{"code_sha256_prefix":"b3d37324c880e711","entry":"SACPolicy","repo":"yihaosun1124/OfflineRL-Kit","repo_kind":"listed","path":"offlinerlkit/policy/model_based/mopo.py","file_url":"https://github.com/yihaosun1124/OfflineRL-Kit/blob/HEAD/offlinerlkit/policy/model_based/mopo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b3d37324c880e711"}},{"code_sha256_prefix":"9bfce911836d13d9","entry":"dict_batch_generator","repo":"junming-yang/mopo","repo_kind":"listed","path":"algo/mopo.py","file_url":"https://github.com/junming-yang/mopo/blob/HEAD/algo/mopo.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9bfce911836d13d9"}},{"code_sha256_prefix":"905ff707fa717537","entry":"FakeEnv","repo":"Yihao-Sun/pytorch-mopo","repo_kind":"listed","path":"mopo.py","file_url":"https://github.com/Yihao-Sun/pytorch-mopo/blob/HEAD/mopo.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"905ff707fa717537"}},{"code_sha256_prefix":"4915612bb67c4977","entry":"MOPO","repo":"junming-yang/mopo","repo_kind":"listed","path":"algo/mopo.py","file_url":"https://github.com/junming-yang/mopo/blob/HEAD/algo/mopo.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4915612bb67c4977"}},{"code_sha256_prefix":"29dd6b4e1d20ae33","entry":"MOPO","repo":"Yihao-Sun/pytorch-mopo","repo_kind":"listed","path":"mopo.py","file_url":"https://github.com/Yihao-Sun/pytorch-mopo/blob/HEAD/mopo.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"29dd6b4e1d20ae33"}},{"code_sha256_prefix":"cee64d8d029d6485","entry":"MOPOPolicy","repo":"yihaosun1124/OfflineRL-Kit","repo_kind":"listed","path":"offlinerlkit/policy/model_based/mopo.py","file_url":"https://github.com/yihaosun1124/OfflineRL-Kit/blob/HEAD/offlinerlkit/policy/model_based/mopo.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cee64d8d029d6485"}},{"code_sha256_prefix":"2c8a2717c213a768","entry":"train","repo":"runamu/compositional-conservatism","repo_kind":"listed","path":"run_example/run_mopo.py","file_url":"https://github.com/runamu/compositional-conservatism/blob/HEAD/run_example/run_mopo.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2c8a2717c213a768"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}