{"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/a-mixture-of-surprises-for-unsupervised","title":"A Mixture of Surprises for Unsupervised Reinforcement Learning","arxiv_id":"2210.06702","date":"2022-10-13","proceeding":null,"authors":["Andrew Zhao","Matthieu Gaetan Lin","Yangguang Li","Yong-Jin Liu","Gao Huang"],"abstract":"Unsupervised reinforcement learning aims at learning a generalist policy in a reward-free manner for fast adaptation to downstream tasks. Most of the existing methods propose to provide an intrinsic reward based on surprise. Maximizing or minimizing surprise drives the agent to either explore or gain control over its environment. However, both strategies rely on a strong assumption: the entropy of the environment's dynamics is either high or low. This assumption may not always hold in real-world scenarios, where the entropy of the environment's dynamics may be unknown. Hence, choosing between the two objectives is a dilemma. We propose a novel yet simple mixture of policies to address this concern, allowing us to optimize an objective that simultaneously maximizes and minimizes the surprise. Concretely, we train one mixture component whose objective is to maximize the surprise and another whose objective is to minimize the surprise. Hence, our method does not make assumptions about the entropy of the environment's dynamics. We call our method a $\\textbf{M}\\text{ixture }\\textbf{O}\\text{f }\\textbf{S}\\text{urprise}\\textbf{S}$ (MOSS) for unsupervised reinforcement learning. Experimental results show that our simple method achieves state-of-the-art performance on the URLB benchmark, outperforming previous pure surprise maximization-based objectives. Our code is available at: https://github.com/LeapLabTHU/MOSS.","url_abs":"https://arxiv.org/abs/2210.06702v1","url_pdf":"https://arxiv.org/pdf/2210.06702v1.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":"a-mixture-of-surprises-for-unsupervised","repo_url":"https://github.com/leaplabthu/moss","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"unsupervised-reinforcement-learning","task_name":"Unsupervised Reinforcement Learning"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2210.06702","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.06702"}},"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":"deterministic:regex_extraction","url":"https://github.com/LeapLabTHU/MOSS","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/rll-research/url_","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/rll-research/cic","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/leaplabthu/moss","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_honours":1,"unverified":11},"by_repo_kind":{"official":{"samples":12,"ran":1,"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":0,"samples":[{"code_sha256_prefix":"ae234269debed3f4","entry":"schedule","repo":"LeapLabTHU/MOSS","repo_kind":"official","path":"core/calculations/misc.py","file_url":"https://github.com/LeapLabTHU/MOSS/blob/HEAD/core/calculations/misc.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ae234269debed3f4"}},{"code_sha256_prefix":"6923cb7ec7ed3f3d","entry":"increment_episode","repo":"LeapLabTHU/MOSS","repo_kind":"official","path":"helpers.py","file_url":"https://github.com/LeapLabTHU/MOSS/blob/HEAD/helpers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6923cb7ec7ed3f3d"}},{"code_sha256_prefix":"35febe40098b0a79","entry":"increment_step","repo":"LeapLabTHU/MOSS","repo_kind":"official","path":"helpers.py","file_url":"https://github.com/LeapLabTHU/MOSS/blob/HEAD/helpers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"35febe40098b0a79"}},{"code_sha256_prefix":"5435e0ae11d6a827","entry":"l2_loss","repo":"LeapLabTHU/MOSS","repo_kind":"official","path":"core/calculations/losses.py","file_url":"https://github.com/LeapLabTHU/MOSS/blob/HEAD/core/calculations/losses.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5435e0ae11d6a827"}},{"code_sha256_prefix":"f9b1c01addee13ef","entry":"l2_loss_without_bias","repo":"LeapLabTHU/MOSS","repo_kind":"official","path":"core/calculations/losses.py","file_url":"https://github.com/LeapLabTHU/MOSS/blob/HEAD/core/calculations/losses.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f9b1c01addee13ef"}},{"code_sha256_prefix":"55a01c5ebe41e60c","entry":"linear_relu","repo":"LeapLabTHU/MOSS","repo_kind":"official","path":"core/calculations/layers.py","file_url":"https://github.com/LeapLabTHU/MOSS/blob/HEAD/core/calculations/layers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"55a01c5ebe41e60c"}},{"code_sha256_prefix":"8f66a508eba0c6bc","entry":"mlp","repo":"LeapLabTHU/MOSS","repo_kind":"official","path":"core/calculations/layers.py","file_url":"https://github.com/LeapLabTHU/MOSS/blob/HEAD/core/calculations/layers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8f66a508eba0c6bc"}},{"code_sha256_prefix":"694ec6f6ee783784","entry":"random_flip","repo":"LeapLabTHU/MOSS","repo_kind":"official","path":"core/calculations/augmentations.py","file_url":"https://github.com/LeapLabTHU/MOSS/blob/HEAD/core/calculations/augmentations.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"694ec6f6ee783784"}},{"code_sha256_prefix":"9953da0307ba0153","entry":"random_shift_aug","repo":"LeapLabTHU/MOSS","repo_kind":"official","path":"core/calculations/augmentations.py","file_url":"https://github.com/LeapLabTHU/MOSS/blob/HEAD/core/calculations/augmentations.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9953da0307ba0153"}},{"code_sha256_prefix":"1484fd6608b194fc","entry":"reset_episode","repo":"LeapLabTHU/MOSS","repo_kind":"official","path":"helpers.py","file_url":"https://github.com/LeapLabTHU/MOSS/blob/HEAD/helpers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1484fd6608b194fc"}},{"code_sha256_prefix":"c68193d3061f96e9","entry":"running_stats","repo":"LeapLabTHU/MOSS","repo_kind":"official","path":"core/calculations/losses.py","file_url":"https://github.com/LeapLabTHU/MOSS/blob/HEAD/core/calculations/losses.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c68193d3061f96e9"}},{"code_sha256_prefix":"69f4a94c5240be35","entry":"trunk","repo":"LeapLabTHU/MOSS","repo_kind":"official","path":"core/calculations/layers.py","file_url":"https://github.com/LeapLabTHU/MOSS/blob/HEAD/core/calculations/layers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"69f4a94c5240be35"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}