{"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/going-beyond-linear-transformers-with","title":"Going Beyond Linear Transformers with Recurrent Fast Weight Programmers","arxiv_id":"2106.06295","date":"2021-06-11","proceeding":"NeurIPS 2021 12","authors":["Kazuki Irie","Imanol Schlag","Róbert Csordás","Jürgen Schmidhuber"],"abstract":"Transformers with linearised attention (''linear Transformers'') have demonstrated the practical scalability and effectiveness of outer product-based Fast Weight Programmers (FWPs) from the '90s. However, the original FWP formulation is more general than the one of linear Transformers: a slow neural network (NN) continually reprograms the weights of a fast NN with arbitrary architecture. In existing linear Transformers, both NNs are feedforward and consist of a single layer. Here we explore new variations by adding recurrence to the slow and fast nets. We evaluate our novel recurrent FWPs (RFWPs) on two synthetic algorithmic tasks (code execution and sequential ListOps), Wikitext-103 language models, and on the Atari 2600 2D game environment. Our models exhibit properties of Transformers and RNNs. In the reinforcement learning setting, we report large improvements over LSTM in several Atari games. Our code is public.","url_abs":"https://arxiv.org/abs/2106.06295v2","url_pdf":"https://arxiv.org/pdf/2106.06295v2.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":"going-beyond-linear-transformers-with","repo_url":"https://github.com/IDSIA/recurrent-fwp","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"going-beyond-linear-transformers-with","repo_url":"https://github.com/IDSIA/lmtool-fwms","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"going-beyond-linear-transformers-with","repo_url":"https://github.com/IDSIA/lmtool-fwp","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"going-beyond-linear-transformers-with","repo_url":"https://github.com/idsia/modern-srwm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"going-beyond-linear-transformers-with","repo_url":"https://github.com/idsia/neuraldiffeq-fwp","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"atari-games","task_name":"Atari Games"},{"task_slug":"listops","task_name":"ListOps"}],"methods":[{"method_slug":"lstm","method_name":"LSTM"},{"method_slug":"sigmoid-activation","method_name":"Sigmoid Activation"},{"method_slug":"tanh-activation","method_name":"Tanh Activation"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2106.06295","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.06295"}},"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/IDSIA/lmtool-fwms","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/IDSIA/lmtool-fwp","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/idsia/neuraldiffeq-fwp","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/idsia/modern-srwm","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/IDSIA/recurrent-fwp","reach":{"status":"ok"}}],"summary":{"ran_fixture":3,"ran":1,"ran_draft_wrong":1,"unverified":7},"by_repo_kind":{"listed":{"samples":12,"ran":5,"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":"fa08c36ab5558b55","entry":"elu_p1","repo":"IDSIA/lmtool-fwms","repo_kind":"listed","path":"src/utils/cuda_fast_weight_layer.py","file_url":"https://github.com/IDSIA/lmtool-fwms/blob/HEAD/src/utils/cuda_fast_weight_layer.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fa08c36ab5558b55"}},{"code_sha256_prefix":"d142e8a68b535885","entry":"get_logger","repo":"IDSIA/lmtool-fwms","repo_kind":"listed","path":"src/utils/exp_utils.py","file_url":"https://github.com/IDSIA/lmtool-fwms/blob/HEAD/src/utils/exp_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d142e8a68b535885"}},{"code_sha256_prefix":"93228a3eb5c4d179","entry":"sample_logits","repo":"IDSIA/lmtool-fwms","repo_kind":"listed","path":"src/utils/log_uniform_sampler.py","file_url":"https://github.com/IDSIA/lmtool-fwms/blob/HEAD/src/utils/log_uniform_sampler.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"93228a3eb5c4d179"}},{"code_sha256_prefix":"379d7685e2a746e5","entry":"sum_norm","repo":"IDSIA/lmtool-fwms","repo_kind":"listed","path":"src/utils/cuda_fast_weight_layer.py","file_url":"https://github.com/IDSIA/lmtool-fwms/blob/HEAD/src/utils/cuda_fast_weight_layer.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"379d7685e2a746e5"}},{"code_sha256_prefix":"90f48cc1487150b9","entry":"sum_norm_eps","repo":"IDSIA/lmtool-fwms","repo_kind":"listed","path":"src/utils/cuda_fast_weight_layer.py","file_url":"https://github.com/IDSIA/lmtool-fwms/blob/HEAD/src/utils/cuda_fast_weight_layer.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"90f48cc1487150b9"}},{"code_sha256_prefix":"37f99ec30f5d5bfd","entry":"create_exp_dir","repo":"IDSIA/lmtool-fwms","repo_kind":"listed","path":"src/utils/exp_utils.py","file_url":"https://github.com/IDSIA/lmtool-fwms/blob/HEAD/src/utils/exp_utils.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":"37f99ec30f5d5bfd"}},{"code_sha256_prefix":"6cb3694398e5d411","entry":"draw_orthogonal_random_matrix","repo":"IDSIA/lmtool-fwms","repo_kind":"listed","path":"src/utils/performer_helper.py","file_url":"https://github.com/IDSIA/lmtool-fwms/blob/HEAD/src/utils/performer_helper.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":"6cb3694398e5d411"}},{"code_sha256_prefix":"b0a73836f5b2859d","entry":"format_log","repo":"IDSIA/lmtool-fwms","repo_kind":"listed","path":"src/eval_sliding_window.py","file_url":"https://github.com/IDSIA/lmtool-fwms/blob/HEAD/src/eval_sliding_window.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":"b0a73836f5b2859d"}},{"code_sha256_prefix":"aa14b5ef69b1c4ef","entry":"orthogonal_matrix_chunk","repo":"IDSIA/lmtool-fwms","repo_kind":"listed","path":"src/utils/performer_helper.py","file_url":"https://github.com/IDSIA/lmtool-fwms/blob/HEAD/src/utils/performer_helper.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":"aa14b5ef69b1c4ef"}},{"code_sha256_prefix":"8bbdda53b57249e6","entry":"prime","repo":"IDSIA/lmtool-fwms","repo_kind":"listed","path":"src/utils/performer_helper.py","file_url":"https://github.com/IDSIA/lmtool-fwms/blob/HEAD/src/utils/performer_helper.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":"8bbdda53b57249e6"}},{"code_sha256_prefix":"69598ced7806d8c3","entry":"scatter","repo":"IDSIA/lmtool-fwms","repo_kind":"listed","path":"src/utils/data_parallel.py","file_url":"https://github.com/IDSIA/lmtool-fwms/blob/HEAD/src/utils/data_parallel.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":"69598ced7806d8c3"}},{"code_sha256_prefix":"aa1de448b0528802","entry":"scatter_kwargs","repo":"IDSIA/lmtool-fwms","repo_kind":"listed","path":"src/utils/data_parallel.py","file_url":"https://github.com/IDSIA/lmtool-fwms/blob/HEAD/src/utils/data_parallel.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":"aa1de448b0528802"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}