A neural network model of free recall learns multiple memory strategies

Moufan Li, Kristopher T. Jensen, Qiong Zhang, Qihong Lu, Marcelo G. Mattar

TL;DR

By training recurrent neural networks with episodic memory modules to solve free recall via reinforcement learning, the authors show that networks can discover multiple distinct retrieval strategies. The highest-performing and most noise-robust strategy is an item-independent "memory palace" scaffold that indexes list positions, which naturally emerges when models are encouraged to recall entire lists and prevented from relying on short-term recency.

What Problem Does This Paper Address?

In free recall experiments, people study a list of items and recall them in any order. Humans consistently exhibit two phenomena:

  1. Serial position effects: Better memory for the first (primacy) and last (recency) items.
  2. Temporal contiguity effect: Recalling an item tends to cue recall of neighboring items from the list, typically in forward order.

Classic cognitive models, most notably the Temporal Context Model (TCM), explain this through a smoothly drifting internal context vector that becomes associated with item identities. However, human memory experts famously bypass this drifting context by using the "memory palace" (method of loci)—mentally placing items along a fixed, ordered spatial scaffold.

This raises key questions: Can a single model architecture account for both drifting-context and scaffold-based memory strategies? Under what computational constraints does an index-based memory palace emerge as optimal over classic TCM-like mechanisms?

Methods

The authors simulated free recall using an artificial agent optimized with reinforcement learning (Advantage Actor-Critic, A2C):

  • Architecture: A 128-unit Gated Recurrent Unit (GRU) context module coupled to an external episodic memory module (slots storing past GRU states). At recall, the current hidden state serves as a retrieval cue, performing a cosine-similarity read over stored slots.
  • Key Innovation vs. Hand-Crafted Models: Rather than hard-coding drifting temporal context equations (as in TCM), the network learned its internal context representations and retrieval dynamics end-to-end to maximize correct item recalls (+1 reward) while penalizing intrusions/repeats (-0.75).
  • Working Memory Manipulation: To mimic distraction in human tasks, the GRU hidden state was flushed (replaced with controlled noise) between the study and response phases.
  • Analytical Framework: The authors assessed emergent strategies using $k$-means clustering across behavioral metrics (temporal factor, forward asymmetry) and representational metrics (linear regression for variance explained by index vs. item identity, and cross-condition generalization decoding via SVMs).

Datasets

  • Free Recall Task (Simulated): On each trial, 8 items were sampled randomly without replacement from an orthogonal dictionary of 64 one-hot encoded items.
  • Conditional Free Recall Task: A variant where each of the 64 items was defined by a combination of 6 binary features. During recall, the network was cued with a specific feature condition (e.g., "feature 1 = value 2") and rewarded only for retrieving matching items from the studied list.

Key Insights and Ideas

  • TCM Dynamics Are a Recurrent Default, Not the Only Optimum: A "reservoir" GRU with frozen recurrent weights naturally produced TCM-like temporal contiguity and identity-dominated states. Thus, drifting context is an inherent baseline property of recurrent dynamics.
  • The "Memory Palace" Scaffold as an Emergent Optimum: Fully trained networks often discovered an entirely different solution: an item-invariant index code. In these networks, internal states traced a rigid, stereotypic trajectory during both encoding and retrieval, encoding when an item appeared (serial position) independently of what it was.
  • Drivers of the Memory Palace:
  • Long-term reward horizon ($\gamma \to 1.0$): Valuing total list completion over immediate greedy retrieval drove models toward systematic forward-order recall.
  • Suppressing recency (100% working memory flush): When working memory was intact, models lazily relied on backward recency-driven recall. Flushing the state forced the network to reset and initiate recall from the beginning.
  • Task Demands Dictate Optimality: When tested on conditional recall requiring feature-based retrieval, the memory palace was discarded in favor of TCM-like, identity-rich representations. The memory palace is an optimal solution for exhaustive sequential enumeration, not flexible content querying.

Key Results

  • Three Emergent Strategy Clusters: $k$-means identified (1) Memory palace (sharp forward-order recall, high index variance), (2) TCM-like forward (smooth contiguity, forward bias, high identity variance), and (3) TCM-like backward (reverse-order recall).
  • Performance Dominance: The memory palace strategy significantly outperformed both TCM-like forward and backward strategies (achieving $>90\%$ recall accuracy vs. $\sim 65\text{--}75\%$).
  • Noise Robustness: When Gaussian noise was injected into hidden states at test time (up to 0.4 noise level), the memory palace strategy retained significantly higher task accuracy than TCM-like models and analytical TCM baselines. Training under noisy conditions directly increased the proportion of networks adopting the memory palace strategy (from $\sim 20\%$ up to $\sim 40\%$).

Limitations and Future Work

  • Simplified Environments: The task utilized short lists (8 items) drawn from small, artificial dictionaries of 64 discrete one-hot vectors, lacking the semantic hierarchies of natural human vocabulary.
  • Single-Step Cues: The model retrieves one episodic slot per step; future work should explore continuous-time recall dynamics and competitive retrieval dynamics.
  • Broader Cognitive Tasks: The authors suggest extending this framework beyond list recall to goal-directed planning, multi-step inference, and narrative understanding where episodic memories must be retrieved to simulate future outcomes.

Summary updated

BibTeX
@misc{li2025neural,
  author = {Moufan Li and Kristopher T. Jensen and Qiong Zhang and Qihong Lu and Marcelo G. Mattar},
  title = {{A neural network model of free recall learns multiple memory strategies}},
  year = {2025},
  url = {https://openreview.net/forum?id=vJ2Liwy0n7},
}
Figure