mlsanityData to 14 Oct 2026

Self-Attention Limits Working Memory Capacity of Transformer-Based Models

arXiv 2409.10715 ↗First posted 16 Sep 2024cs.CL cs.AI q-bio.NCcited by 5

Not on the map. Why?

Abstract (arXiv)

Recent work on Transformer-based large language models (LLMs) has revealed striking limits in their working memory capacity, similar to what has been found in human behavioral studies. Specifically, these models' performance drops significantly on N-back tasks as N increases. However, there is still a lack of mechanistic interpretability as to why this phenomenon would arise. Inspired by the executive attention theory from behavioral sciences, we hypothesize that the self-attention mechanism within Transformer-based models might be responsible for their working memory capacity limits. To test this hypothesis, we train vanilla decoder-only transformers to perform N-back tasks and find that attention scores gradually aggregate to the N-back positions over training, suggesting that the model masters the task by learning a strategy to pay attention to the relationship between the current position and the N-back position. Critically, we find that the total entropy of the attention score matrix increases as N increases, suggesting that the dispersion of attention scores might be the cause of the capacity limit observed in N-back tasks. Our findings thus offer insights into the shared role of attention in both human and artificial intelligence. Moreover, the limitations of the self-attention mechanism revealed in the current study could inform future efforts to design more powerful model architectures with enhanced working memory capacity and cognitive capabilities.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 3 of its 18 references that are in the map. First posted on arXiv 16 Sep 2024.

Builds on

3 of 18 references.

References · 3

  1. 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 230
  2. 2024The What, Why, and How of Context Length Extension Techniques in Large Language Models -- A Detailed Surveycited by 33
  3. 2023Working Memory Capacity of ChatGPT: An Empirical Studycited by 23

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 4.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025The underlying structures of self-attention: symmetry, directionality, and emergent dynamics in Transformer training
  2. 2026Memory Retrieval in Transformers: Insights from The Encoding Specificity Principle
  3. 2025Disentangling Recall and Reasoning in Transformer Models through Layer-wise Attention and Activation Analysis
  4. 2026Neural Activation Patterns Across Language Model Architectures: A Comprehensive Analysis of Cognitive Task Performance
  5. 2026In-context superposition: human-like working memory interference in large language models
  6. 2025Too Big to Think: Capacity, Memorization, and Generalization in Pre-Trained Transformers
  7. 2026Positional versus Symbolic Attention Heads: Learning Dynamics, RoPE Geometry, and Length Generalization
  8. 2026It's Not RoPE that Creates Sinks: The Role of Self-Concentration and Value-Non-Mixing in Attention