{"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/recurrent-independent-mechanisms","title":"Recurrent Independent Mechanisms","arxiv_id":"1909.10893","date":"2019-09-24","proceeding":"ICLR 2021 1","authors":["Anirudh Goyal","Alex Lamb","Jordan Hoffmann","Shagun Sodhani","Sergey Levine","Yoshua Bengio","Bernhard Schölkopf"],"abstract":"Learning modular structures which reflect the dynamics of the environment can lead to better generalization and robustness to changes which only affect a few of the underlying causes. We propose Recurrent Independent Mechanisms (RIMs), a new recurrent architecture in which multiple groups of recurrent cells operate with nearly independent transition dynamics, communicate only sparingly through the bottleneck of attention, and are only updated at time steps where they are most relevant. We show that this leads to specialization amongst the RIMs, which in turn allows for dramatically improved generalization on tasks where some factors of variation differ systematically between training and evaluation.","url_abs":"https://arxiv.org/abs/1909.10893v6","url_pdf":"https://arxiv.org/pdf/1909.10893v6.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":"recurrent-independent-mechanisms","repo_url":"https://github.com/anirudh9119/RIMs","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"recurrent-independent-mechanisms","repo_url":"https://github.com/dido1998/Recurrent-Independent-Mechanisms","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"recurrent-independent-mechanisms","repo_url":"https://github.com/fuyuan-li/tensorflow-RIMs","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null}],"tasks":[{"task_slug":"atari-games","task_name":"Atari Games"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/atari-games-on-atari-2600-beam-rider","task":"Atari Games","dataset":"Atari 2600 Beam Rider","model":"RIMs-PPO","rank_in_archive_order":39,"of":49,"metrics":{"Score":"5320"},"uses_additional_data":false},{"leaderboard":"/sota/atari-games-on-atari-2600-up-and-down","task":"Atari Games","dataset":"Atari 2600 Up and Down","model":"RIMs-PPO","rank_in_archive_order":10,"of":44,"metrics":{"Score":"390000"},"uses_additional_data":false},{"leaderboard":"/sota/atari-games-on-atari-2600-zaxxon","task":"Atari Games","dataset":"Atari 2600 Zaxxon","model":"RIMs-PPO","rank_in_archive_order":16,"of":41,"metrics":{"Score":"15000"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1909.10893","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1909.10893"}},"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/fuyuan-li/tensorflow-RIMs","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dido1998/Recurrent-Independent-Mechanisms","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/anirudh9119/RIMs","reach":null}],"summary":{"ran":13,"ran_honours":1,"unverified":6},"by_repo_kind":{"listed":{"samples":19,"ran":14,"repositories":3}},"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":20,"samples":[{"code_sha256_prefix":"779d2155a1554713","entry":"BlockGRU","repo":"anirudh9119/RIMs","repo_kind":"listed","path":"blocks_atari/a2c_ppo_acktr/blocks_core.py","file_url":"https://github.com/anirudh9119/RIMs/blob/HEAD/blocks_atari/a2c_ppo_acktr/blocks_core.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":"779d2155a1554713"}},{"code_sha256_prefix":"c4c16932e4104a16","entry":"BlockLSTM","repo":"anirudh9119/RIMs","repo_kind":"listed","path":"blocks_atari/a2c_ppo_acktr/blocks_core.py","file_url":"https://github.com/anirudh9119/RIMs/blob/HEAD/blocks_atari/a2c_ppo_acktr/blocks_core.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":"c4c16932e4104a16"}},{"code_sha256_prefix":"530004f559bbe61b","entry":"GroupGRUCell","repo":"dido1998/Recurrent-Independent-Mechanisms","repo_kind":"listed","path":"RIM.py","file_url":"https://github.com/dido1998/Recurrent-Independent-Mechanisms/blob/HEAD/RIM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"530004f559bbe61b"}},{"code_sha256_prefix":"03ed40c46c6366e9","entry":"GroupLSTMCell","repo":"fuyuan-li/tensorflow-RIMs","repo_kind":"listed","path":"tfRIM.py","file_url":"https://github.com/fuyuan-li/tensorflow-RIMs/blob/HEAD/tfRIM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"03ed40c46c6366e9"}},{"code_sha256_prefix":"70827a6ca3aea643","entry":"GroupLSTMCell","repo":"dido1998/Recurrent-Independent-Mechanisms","repo_kind":"listed","path":"RIM.py","file_url":"https://github.com/dido1998/Recurrent-Independent-Mechanisms/blob/HEAD/RIM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"70827a6ca3aea643"}},{"code_sha256_prefix":"80e31c08f502d673","entry":"GroupLinearLayer","repo":"anirudh9119/RIMs","repo_kind":"listed","path":"blocks_atari/a2c_ppo_acktr/blocks_core.py","file_url":"https://github.com/anirudh9119/RIMs/blob/HEAD/blocks_atari/a2c_ppo_acktr/blocks_core.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":"80e31c08f502d673"}},{"code_sha256_prefix":"b1f19581fe3bab53","entry":"GroupLinearLayer","repo":"fuyuan-li/tensorflow-RIMs","repo_kind":"listed","path":"tfRIM.py","file_url":"https://github.com/fuyuan-li/tensorflow-RIMs/blob/HEAD/tfRIM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"b1f19581fe3bab53"}},{"code_sha256_prefix":"3dbce3a83b09b310","entry":"GroupLinearLayer","repo":"dido1998/Recurrent-Independent-Mechanisms","repo_kind":"listed","path":"RIM.py","file_url":"https://github.com/dido1998/Recurrent-Independent-Mechanisms/blob/HEAD/RIM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"3dbce3a83b09b310"}},{"code_sha256_prefix":"b440016392f1a553","entry":"RIMCell","repo":"fuyuan-li/tensorflow-RIMs","repo_kind":"listed","path":"tfRIM.py","file_url":"https://github.com/fuyuan-li/tensorflow-RIMs/blob/HEAD/tfRIM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"b440016392f1a553"}},{"code_sha256_prefix":"cacc4a65e64179c2","entry":"ScaledDotProductAttention","repo":"anirudh9119/RIMs","repo_kind":"listed","path":"blocks_atari/a2c_ppo_acktr/blocks_core.py","file_url":"https://github.com/anirudh9119/RIMs/blob/HEAD/blocks_atari/a2c_ppo_acktr/blocks_core.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":"cacc4a65e64179c2"}},{"code_sha256_prefix":"cc1a9597719c4ced","entry":"Sparse_attention","repo":"anirudh9119/RIMs","repo_kind":"listed","path":"blocks_atari/a2c_ppo_acktr/blocks_core.py","file_url":"https://github.com/anirudh9119/RIMs/blob/HEAD/blocks_atari/a2c_ppo_acktr/blocks_core.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cc1a9597719c4ced"}},{"code_sha256_prefix":"af4c47bd3c2432c3","entry":"Sparse_grad_attention","repo":"anirudh9119/RIMs","repo_kind":"listed","path":"blocks_atari/a2c_ppo_acktr/blocks_core.py","file_url":"https://github.com/anirudh9119/RIMs/blob/HEAD/blocks_atari/a2c_ppo_acktr/blocks_core.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":"af4c47bd3c2432c3"}},{"code_sha256_prefix":"534a1d4c71e7cd54","entry":"blocked_grad","repo":"anirudh9119/RIMs","repo_kind":"listed","path":"blocks_atari/a2c_ppo_acktr/blocks_core.py","file_url":"https://github.com/anirudh9119/RIMs/blob/HEAD/blocks_atari/a2c_ppo_acktr/blocks_core.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":"534a1d4c71e7cd54"}},{"code_sha256_prefix":"a81c5fb0b9535995","entry":"repackage_hidden","repo":"anirudh9119/RIMs","repo_kind":"listed","path":"event_based/train_copying.py","file_url":"https://github.com/anirudh9119/RIMs/blob/HEAD/event_based/train_copying.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a81c5fb0b9535995"}},{"code_sha256_prefix":"74ea1996d4a9ce45","entry":"BlocksCore","repo":"anirudh9119/RIMs","repo_kind":"listed","path":"blocks_atari/a2c_ppo_acktr/blocks_core.py","file_url":"https://github.com/anirudh9119/RIMs/blob/HEAD/blocks_atari/a2c_ppo_acktr/blocks_core.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":"74ea1996d4a9ce45"}},{"code_sha256_prefix":"2aaad11d08c7dcef","entry":"MultiHeadAttention","repo":"anirudh9119/RIMs","repo_kind":"listed","path":"blocks_atari/a2c_ppo_acktr/blocks_core.py","file_url":"https://github.com/anirudh9119/RIMs/blob/HEAD/blocks_atari/a2c_ppo_acktr/blocks_core.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":"2aaad11d08c7dcef"}},{"code_sha256_prefix":"406669b7f6420d33","entry":"RIMCell","repo":"dido1998/Recurrent-Independent-Mechanisms","repo_kind":"listed","path":"RIM.py","file_url":"https://github.com/dido1998/Recurrent-Independent-Mechanisms/blob/HEAD/RIM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"406669b7f6420d33"}},{"code_sha256_prefix":"2fc6fdb85f13dc41","entry":"none_or_str","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"2fc6fdb85f13dc41"}},{"code_sha256_prefix":"70d200be038af543","entry":"repackage_hidden","repo":"anirudh9119/RIMs","repo_kind":"listed","path":"event_based/train_adding.py","file_url":"https://github.com/anirudh9119/RIMs/blob/HEAD/event_based/train_adding.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":"70d200be038af543"}},{"code_sha256_prefix":"5b4032d119530f92","entry":"zero_matrix_elements","repo":"anirudh9119/RIMs","repo_kind":"listed","path":"blocks_atari/a2c_ppo_acktr/blocks_core.py","file_url":"https://github.com/anirudh9119/RIMs/blob/HEAD/blocks_atari/a2c_ppo_acktr/blocks_core.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":"5b4032d119530f92"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}