{"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/context-shift-reduction-for-offline-meta-1","title":"Context Shift Reduction for Offline Meta-Reinforcement Learning","arxiv_id":"2311.03695","date":"2023-11-07","proceeding":"NeurIPS 2023 11","authors":["Yunkai Gao","Rui Zhang","Jiaming Guo","Fan Wu","Qi Yi","Shaohui Peng","Siming Lan","Ruizhi Chen","Zidong Du","Xing Hu","Qi Guo","Ling Li","Yunji Chen"],"abstract":"Offline meta-reinforcement learning (OMRL) utilizes pre-collected offline datasets to enhance the agent's generalization ability on unseen tasks. However, the context shift problem arises due to the distribution discrepancy between the contexts used for training (from the behavior policy) and testing (from the exploration policy). The context shift problem leads to incorrect task inference and further deteriorates the generalization ability of the meta-policy. Existing OMRL methods either overlook this problem or attempt to mitigate it with additional information. In this paper, we propose a novel approach called Context Shift Reduction for OMRL (CSRO) to address the context shift problem with only offline datasets. The key insight of CSRO is to minimize the influence of policy in context during both the meta-training and meta-test phases. During meta-training, we design a max-min mutual information representation learning mechanism to diminish the impact of the behavior policy on task representation. In the meta-test phase, we introduce the non-prior context collection strategy to reduce the effect of the exploration policy. Experimental results demonstrate that CSRO significantly reduces the context shift and improves the generalization ability, surpassing previous methods across various challenging domains.","url_abs":"https://arxiv.org/abs/2311.03695v1","url_pdf":"https://arxiv.org/pdf/2311.03695v1.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":"context-shift-reduction-for-offline-meta-1","repo_url":"https://github.com/moreanp/csro","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"meta-reinforcement-learning","task_name":"Meta Reinforcement Learning"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2311.03695","atlas_url":"https://app.syntology.ai/?focus=2311.03695","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.03695"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/moreanp/csro","reach":{"status":"ok"}}],"summary":{"ran":3,"ran_draft_wrong":1,"unverified":1},"by_repo_kind":{"official":{"samples":5,"ran":4,"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":5,"samples":[{"code_sha256_prefix":"f395bfda2e4813d7","entry":"create_stats_ordered_dict","repo":"moreanp/csro","repo_kind":"official","path":"rlkit/core/eval_util.py","file_url":"https://github.com/moreanp/csro/blob/HEAD/rlkit/core/eval_util.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f395bfda2e4813d7"}},{"code_sha256_prefix":"e937b70b07bfc9d1","entry":"deep_update_dict","repo":"moreanp/csro","repo_kind":"official","path":"launch_experiment.py","file_url":"https://github.com/moreanp/csro/blob/HEAD/launch_experiment.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e937b70b07bfc9d1"}},{"code_sha256_prefix":"a5d10a0b704c8db7","entry":"get_average_returns","repo":"moreanp/csro","repo_kind":"official","path":"rlkit/core/eval_util.py","file_url":"https://github.com/moreanp/csro/blob/HEAD/rlkit/core/eval_util.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a5d10a0b704c8db7"}},{"code_sha256_prefix":"c809703793017cd2","entry":"get_generic_path_information","repo":"moreanp/csro","repo_kind":"official","path":"rlkit/core/eval_util.py","file_url":"https://github.com/moreanp/csro/blob/HEAD/rlkit/core/eval_util.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c809703793017cd2"}},{"code_sha256_prefix":"5480531658d82335","entry":"register_license","repo":"moreanp/csro","repo_kind":"official","path":"rand_param_envs/mujoco_py/mjcore.py","file_url":"https://github.com/moreanp/csro/blob/HEAD/rand_param_envs/mujoco_py/mjcore.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5480531658d82335"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}