{"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/self-supervised-policy-adaptation-during","title":"Self-Supervised Policy Adaptation during Deployment","arxiv_id":"2007.04309","date":"2020-07-08","proceeding":"ICLR 2021 1","authors":["Nicklas Hansen","Rishabh Jangir","Yu Sun","Guillem Alenyà","Pieter Abbeel","Alexei A. Efros","Lerrel Pinto","Xiaolong Wang"],"abstract":"In most real world scenarios, a policy trained by reinforcement learning in one environment needs to be deployed in another, potentially quite different environment. However, generalization across different environments is known to be hard. A natural solution would be to keep training after deployment in the new environment, but this cannot be done if the new environment offers no reward signal. Our work explores the use of self-supervision to allow the policy to continue training after deployment without using any rewards. While previous methods explicitly anticipate changes in the new environment, we assume no prior knowledge of those changes yet still obtain significant improvements. Empirical evaluations are performed on diverse simulation environments from DeepMind Control suite and ViZDoom, as well as real robotic manipulation tasks in continuously changing environments, taking observations from an uncalibrated camera. Our method improves generalization in 31 out of 36 environments across various tasks and outperforms domain randomization on a majority of environments.","url_abs":"https://arxiv.org/abs/2007.04309v3","url_pdf":"https://arxiv.org/pdf/2007.04309v3.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":"self-supervised-policy-adaptation-during","repo_url":"https://github.com/joshnroy/contrastive-pad","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"self-supervised-policy-adaptation-during","repo_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"experience-replay","method_name":"Experience Replay"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"soft-actor-critic-autotuned-temperature","method_name":"Soft Actor-Critic (Autotuned Temperature)"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2007.04309","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2007.04309"}},"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/nicklashansen/policy-adaptation-during-deployment","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/joshnroy/contrastive-pad","reach":null}],"summary":{"ran":10,"ran_fixture":2,"ran_draft_wrong":4,"unverified":5},"by_repo_kind":{"listed":{"samples":19,"ran":14,"repositories":2}},"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":21,"samples":[{"code_sha256_prefix":"d526a377580646ff","entry":"Actor","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d526a377580646ff"}},{"code_sha256_prefix":"554f154e05c8c199","entry":"BarlowFunction","repo":"joshnroy/contrastive-pad","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/joshnroy/contrastive-pad/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"554f154e05c8c199"}},{"code_sha256_prefix":"75b91cb1cba4f86b","entry":"CURL","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"75b91cb1cba4f86b"}},{"code_sha256_prefix":"16eb246116ba494b","entry":"CenterCrop","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"16eb246116ba494b"}},{"code_sha256_prefix":"e70accfa4161d131","entry":"Critic","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e70accfa4161d131"}},{"code_sha256_prefix":"fb1526043e3ddf0f","entry":"InvFunction","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fb1526043e3ddf0f"}},{"code_sha256_prefix":"21c9f18b03dc202c","entry":"NormalizeImg","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"21c9f18b03dc202c"}},{"code_sha256_prefix":"77cffce9f453998c","entry":"PixelEncoder","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"77cffce9f453998c"}},{"code_sha256_prefix":"5447123791608219","entry":"QFunction","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5447123791608219"}},{"code_sha256_prefix":"1e6ff078220508ca","entry":"RotFunction","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1e6ff078220508ca"}},{"code_sha256_prefix":"1a680b614b0ffdb5","entry":"_rotate_single_with_label","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1a680b614b0ffdb5"}},{"code_sha256_prefix":"e432c8c8eddcb3b7","entry":"aug","repo":"joshnroy/contrastive-pad","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/joshnroy/contrastive-pad/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e432c8c8eddcb3b7"}},{"code_sha256_prefix":"daa7b3a0355eb7c3","entry":"gaussian_logprob","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"daa7b3a0355eb7c3"}},{"code_sha256_prefix":"6dcb9b4b8ec4aabd","entry":"make_encoder","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6dcb9b4b8ec4aabd"}},{"code_sha256_prefix":"638f9c8f01f54ad1","entry":"rotate","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"638f9c8f01f54ad1"}},{"code_sha256_prefix":"e4f442d1770eacd1","entry":"squash","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"e4f442d1770eacd1"}},{"code_sha256_prefix":"6563fe457e0a49ef","entry":"SacSSAgent","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","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":"6563fe457e0a49ef"}},{"code_sha256_prefix":"b79c90b2fd9d2a85","entry":"SacSSAgent","repo":"joshnroy/contrastive-pad","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/joshnroy/contrastive-pad/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","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":"b79c90b2fd9d2a85"}},{"code_sha256_prefix":"bc0768cc0f4f49c7","entry":"soft_update_params","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","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":"bc0768cc0f4f49c7"}},{"code_sha256_prefix":"fc88ef6a629962e5","entry":"tie_weights","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","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":"fc88ef6a629962e5"}},{"code_sha256_prefix":"48b3228cfe8d98ae","entry":"weight_init","repo":"nicklashansen/policy-adaptation-during-deployment","repo_kind":"listed","path":"src/agent/agent.py","file_url":"https://github.com/nicklashansen/policy-adaptation-during-deployment/blob/HEAD/src/agent/agent.py","link_basis":"first_harvest_node","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":"48b3228cfe8d98ae"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}