A neural network that maintains and retrieves memories based on context
Not on the map. Why?
Abstract (arXiv)
Every day, people continuously infer situational context and adjust the way they understand and remember the world. Context, signaled by the prefrontal cortex, is known to modulate working memory and episodic memory, but the algorithmic understanding of this modulation remains limited. Here, we train a recurrent neural network (RNN), augmented with an episodic memory buffer, to infer context using Bayesian inference as it continuously makes predictions of upcoming scenes while watching naturalistic movies. When the inferred context modulates the RNN's recurrent connectivity (the basis of working memory) in a low-rank manner, the model's activity patterns best match neural responses in human participants who watched the same movies during fMRI. Context also modulates episodic memory retrieval, such that the model retrieves memories based on not only content similarity but also context similarity. This is implemented as a key-value system with self-attention, designed to additionally encode context and retrieve context-congruent memories. The resulting model not only better resembles human brain representations but also learns to retrieve memories like humans much faster than a model without context modulation. Together, our findings suggest a computational mechanism by which context modulates information maintenance and long-term memory retrieval in naturalistic environments.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 13 of its 63 references that are in the map. First posted on arXiv 29 Sep 2026.
Builds on
13 of 63 references.
References · 13
- 2017Attention Is All You Needcited by 60,361
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022In-context Learning and Induction Headscited by 964
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
- 2022Large-scale Contrastive Language-Audio Pretraining with Feature Fusion and Keyword-to-Caption Augmentationcited by 719
- 2017Neural Episodic Controlcited by 151
- 2020Large Associative Memory Problem in Neurobiology and Machine Learningcited by 112
- 2017Linking connectivity, dynamics and computations in low-rank recurrent neural networkscited by 51
- 2018Been There, Done That: Meta-Learning with Episodic Recallcited by 26
- 2025Key-value memory in the braincited by 24
- 2025Flexible Prefrontal Control over Hippocampal Episodic Memory for Goal-Directed Generalizationcited by 4
Built on by
Not cited yet.