{"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-modern-self-referential-weight-matrix-that","title":"A Modern Self-Referential Weight Matrix That Learns to Modify Itself","arxiv_id":"2202.05780","date":"2022-02-11","proceeding":null,"authors":["Kazuki Irie","Imanol Schlag","Róbert Csordás","Jürgen Schmidhuber"],"abstract":"The weight matrix (WM) of a neural network (NN) is its program. The programs of many traditional NNs are learned through gradient descent in some error function, then remain fixed. The WM of a self-referential NN, however, can keep rapidly modifying all of itself during runtime. In principle, such NNs can meta-learn to learn, and meta-meta-learn to meta-learn to learn, and so on, in the sense of recursive self-improvement. While NN architectures potentially capable of implementing such behaviour have been proposed since the '90s, there have been few if any practical studies. Here we revisit such NNs, building upon recent successes of fast weight programmers and closely related linear Transformers. We propose a scalable self-referential WM (SRWM) that learns to use outer products and the delta update rule to modify itself. We evaluate our SRWM in supervised few-shot learning and in multi-task reinforcement learning with procedurally generated game environments. Our experiments demonstrate both practical applicability and competitive performance of the proposed SRWM. Our code is public.","url_abs":"https://arxiv.org/abs/2202.05780v2","url_pdf":"https://arxiv.org/pdf/2202.05780v2.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-modern-self-referential-weight-matrix-that","repo_url":"https://github.com/idsia/modern-srwm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"a-modern-self-referential-weight-matrix-that","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":"few-shot-learning","task_name":"Few-Shot Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2202.05780","atlas_url":"https://app.syntology.ai/?focus=2202.05780","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2202.05780"}},"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":"deterministic:regex_extraction","url":"https://github.com/IDSIA/modern-srwm","reach":{"status":"ok"}},{"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"}}],"summary":{"ran":7,"ran_fixture":1,"unverified":1},"by_repo_kind":{"listed":{"samples":9,"ran":8,"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":9,"samples":[{"code_sha256_prefix":"65bb08cf8c7b831e","entry":"BaseModel","repo":"idsia/neuraldiffeq-fwp","repo_kind":"listed","path":"eigenworms/ncdes/fwp_model.py","file_url":"https://github.com/idsia/neuraldiffeq-fwp/blob/HEAD/eigenworms/ncdes/fwp_model.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":"65bb08cf8c7b831e"}},{"code_sha256_prefix":"8f2d7b1d87b121a1","entry":"DeltaUpdateVectorField","repo":"idsia/neuraldiffeq-fwp","repo_kind":"listed","path":"eigenworms/ncdes/fwp_model.py","file_url":"https://github.com/idsia/neuraldiffeq-fwp/blob/HEAD/eigenworms/ncdes/fwp_model.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":"8f2d7b1d87b121a1"}},{"code_sha256_prefix":"d3f8881b5b22e3d0","entry":"HebbUpdateVectorField","repo":"idsia/neuraldiffeq-fwp","repo_kind":"listed","path":"eigenworms/ncdes/fwp_model.py","file_url":"https://github.com/idsia/neuraldiffeq-fwp/blob/HEAD/eigenworms/ncdes/fwp_model.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":"d3f8881b5b22e3d0"}},{"code_sha256_prefix":"528e71377495e07c","entry":"LearningRuleVectorFieldWrapper","repo":"idsia/neuraldiffeq-fwp","repo_kind":"listed","path":"eigenworms/ncdes/fwp_model.py","file_url":"https://github.com/idsia/neuraldiffeq-fwp/blob/HEAD/eigenworms/ncdes/fwp_model.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":"528e71377495e07c"}},{"code_sha256_prefix":"1e0adcce08165818","entry":"OjaUpdateVectorField","repo":"idsia/neuraldiffeq-fwp","repo_kind":"listed","path":"eigenworms/ncdes/fwp_model.py","file_url":"https://github.com/idsia/neuraldiffeq-fwp/blob/HEAD/eigenworms/ncdes/fwp_model.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":"1e0adcce08165818"}},{"code_sha256_prefix":"3d717f9ce7b7507b","entry":"TransformerFFlayers","repo":"idsia/neuraldiffeq-fwp","repo_kind":"listed","path":"eigenworms/ncdes/fwp_model.py","file_url":"https://github.com/idsia/neuraldiffeq-fwp/blob/HEAD/eigenworms/ncdes/fwp_model.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":"3d717f9ce7b7507b"}},{"code_sha256_prefix":"b7c7275a0e4d29c0","entry":"_GetLogsignature","repo":"idsia/neuraldiffeq-fwp","repo_kind":"listed","path":"eigenworms/ncdes/fwp_model.py","file_url":"https://github.com/idsia/neuraldiffeq-fwp/blob/HEAD/eigenworms/ncdes/fwp_model.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":"b7c7275a0e4d29c0"}},{"code_sha256_prefix":"90d03864fdcc9122","entry":"set_options","repo":"idsia/neuraldiffeq-fwp","repo_kind":"listed","path":"eigenworms/ncdes/fwp_model.py","file_url":"https://github.com/idsia/neuraldiffeq-fwp/blob/HEAD/eigenworms/ncdes/fwp_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"90d03864fdcc9122"}},{"code_sha256_prefix":"1de17fcceba51f08","entry":"FastWeightODE","repo":"idsia/neuraldiffeq-fwp","repo_kind":"listed","path":"eigenworms/ncdes/fwp_model.py","file_url":"https://github.com/idsia/neuraldiffeq-fwp/blob/HEAD/eigenworms/ncdes/fwp_model.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":"1de17fcceba51f08"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}