{"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/learning-associative-inference-using-fast-1","title":"Learning Associative Inference Using Fast Weight Memory","arxiv_id":"2011.07831","date":"2020-11-16","proceeding":"ICLR 2021 1","authors":["Imanol Schlag","Tsendsuren Munkhdalai","Jürgen Schmidhuber"],"abstract":"Humans can quickly associate stimuli to solve problems in novel contexts. Our novel neural network model learns state representations of facts that can be composed to perform such associative inference. To this end, we augment the LSTM model with an associative memory, dubbed Fast Weight Memory (FWM). Through differentiable operations at every step of a given input sequence, the LSTM updates and maintains compositional associations stored in the rapidly changing FWM weights. Our model is trained end-to-end by gradient descent and yields excellent performance on compositional language reasoning problems, meta-reinforcement-learning for POMDPs, and small-scale word-level language modelling.","url_abs":"https://arxiv.org/abs/2011.07831v2","url_pdf":"https://arxiv.org/pdf/2011.07831v2.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":"learning-associative-inference-using-fast-1","repo_url":"https://github.com/ischlag/Fast-Weight-Memory-public","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"meta-reinforcement-learning","task_name":"Meta Reinforcement Learning"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"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":[{"slug":"catbabi-lm-mode","name":"catbAbI LM-mode","full_name":"concatenated-bAbI"},{"slug":"catbabi","name":"catbAbI QA-mode","full_name":"concatenated-bAbI"}],"methods_introduced":[],"results":[{"leaderboard":"/sota/language-modelling-on-penn-treebank-word","task":"Language Modelling","dataset":"Penn Treebank (Word Level)","model":"AWD-FWM Schlag et al. (2020)","rank_in_archive_order":21,"of":43,"metrics":{"Params":"24M","Test perplexity":"54.48","Validation perplexity":"56.76"},"uses_additional_data":false},{"leaderboard":"/sota/language-modelling-on-wikitext-2","task":"Language Modelling","dataset":"WikiText-2","model":"AWD-FWM Schlag et al. (2020)","rank_in_archive_order":27,"of":38,"metrics":{"Number of params":"37M","Test perplexity":"61.65","Validation perplexity":"54.48"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-catbabi-lm-mode","task":"Question Answering","dataset":"catbAbI LM-mode","model":"Fast Weight Memory","rank_in_archive_order":1,"of":4,"metrics":{"Accuracy (mean)":"93.04%"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-catbabi-lm-mode","task":"Question Answering","dataset":"catbAbI LM-mode","model":"AWD-Transformer XL","rank_in_archive_order":2,"of":4,"metrics":{"Accuracy (mean)":"90.23%"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-catbabi-lm-mode","task":"Question Answering","dataset":"catbAbI LM-mode","model":"AWD-LSTM","rank_in_archive_order":3,"of":4,"metrics":{"Accuracy (mean)":"80.15%"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-catbabi-lm-mode","task":"Question Answering","dataset":"catbAbI LM-mode","model":"Metalearned Neural Memory (plastic)","rank_in_archive_order":4,"of":4,"metrics":{"Accuracy (mean)":"69.3%"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-catbabi-qa-mode","task":"Question Answering","dataset":"catbAbI QA-mode","model":"Fast Weight Memory","rank_in_archive_order":1,"of":4,"metrics":{"1:1 Accuracy":"96.75%"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-catbabi-qa-mode","task":"Question Answering","dataset":"catbAbI QA-mode","model":"Metalearned Neural Memory (plastic)","rank_in_archive_order":2,"of":4,"metrics":{"1:1 Accuracy":"88.97%"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-catbabi-qa-mode","task":"Question Answering","dataset":"catbAbI QA-mode","model":"AWD-Transformer XL","rank_in_archive_order":3,"of":4,"metrics":{"1:1 Accuracy":"87.66%"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-catbabi-qa-mode","task":"Question Answering","dataset":"catbAbI QA-mode","model":"AWD-LSTM","rank_in_archive_order":4,"of":4,"metrics":{"1:1 Accuracy":"80.88%"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2011.07831","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2011.07831"}},"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/ischlag/Fast-Weight-Memory-public","reach":null}],"summary":{"ran_honours":2,"unverified":1},"by_repo_kind":{"official":{"samples":3,"ran":2,"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":"924d55faa0c5cfd4","entry":"generate_graphs","repo":"ischlag/Fast-Weight-Memory-public","repo_kind":"official","path":"metaRL/train_agent.py","file_url":"https://github.com/ischlag/Fast-Weight-Memory-public/blob/HEAD/metaRL/train_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"924d55faa0c5cfd4"}},{"code_sha256_prefix":"05cbde8c37b9643f","entry":"sample_adjacency_matrix","repo":"ischlag/Fast-Weight-Memory-public","repo_kind":"official","path":"metaRL/train_agent.py","file_url":"https://github.com/ischlag/Fast-Weight-Memory-public/blob/HEAD/metaRL/train_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"05cbde8c37b9643f"}},{"code_sha256_prefix":"83dc00c2fe9d0ac2","entry":"run_episode","repo":"ischlag/Fast-Weight-Memory-public","repo_kind":"official","path":"metaRL/train_agent.py","file_url":"https://github.com/ischlag/Fast-Weight-Memory-public/blob/HEAD/metaRL/train_agent.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"83dc00c2fe9d0ac2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}