A neural network that maintains and retrieves memories based on context
Hayoung Song, JeongJun Park, Qihong Lu, Giacomo Vedovati, Monica D. Rosenberg, Zachariah M. Reagh, ShiNung Ching
Key points
From the paper's conclusion- Training a recurrent neural network (RNN) 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 in a low-rank manner, the model's activity patterns best match neural responses in human participants who watched the same movies during fMRI.
- The model retrieves memories based on not only content similarity but also context similarity, learning to retrieve memories like humans much faster than a model without context modulation.
Abstract
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.
Read the paper
Discussion · 1
Science Skim's AI key points, plus readers' public thoughts
- Training a recurrent neural network (RNN) 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 in a low-rank manner, the model's activity patterns best match neural responses in human participants who watched the same movies during fMRI.
- The model retrieves memories based on not only content similarity but also context similarity, learning to retrieve memories like humans much faster than a model without context modulation.
Readers' thoughts
No reader thoughts yet.
Related papers
- Temporal Context Reinstatement Drives Episodic-Like Order Memory in Long-Context Language Models.Proceedings of machine learning research · 2026
- Reading specific memories from human neurons before and after sleepbioRxiv · 2026
- Learning distributed representations with complementary components - A generative approximation framework for episodic memory encodingbioRxiv · 2026
- Valence-Based Memory Prioritization in Neural NetworksbioRxiv · 2026
- Linguistic contextualization in the human hippocampus.Nature human behaviour · 2026
- A complementary learning system for continual episodic memory in large language modelsbioRxiv · 2026