Sources

542 sources

Source

Xiong et al. (2026)

In-context superposition: human-like working memory interference in large language models

arXiv

Find It

DOI

Abstract

Intelligent systems must maintain and manipulate task-relevant information online to adapt to dynamic environments. This capacity, known as working memory, is fundamental to human reasoning. Yet, human working memory is strikingly limited, maintaining only three to four items in a brain with billions of neurons. Surprisingly, large language models (LLMs), despite different substrates and direct access to prior context through attention, exhibit similar working memory limitations. Why should such different systems face analogous constraints? We propose that working memory limitations reflect a general trade-off of shared representations: representational compression and reuse support efficient learning and generalization, but also cause simultaneously active representations to interfere. We show a two-layer transformer trained on a working memory task can solve it perfectly, but diverse trained LLMs exhibit human-like limitations: performance declines with memory load, while retrieval is biased by recency and stimulus statistics. Mirroring humans, working memory performance in LLMs is also associated with broader model capability. Mechanistically, we show that LLMs encode multiple memories in entangled representations --- a condition we call \emph{in-context superposition} --- and progressively suppress competing content while aligning the target with the readout. Moreover, a causal intervention that suppresses interfering information improves performance. Together, these findings suggest that working memory capacity reflects the ability to select task-relevant information under interference, a computational challenge shared by biological and artificial systems.

Reference

Xiong, H. D., Ji-An, L., Huang, J., Wilson, R. C., Lee, K., & Wei, X. X. (2026). In-context superposition: human-like working memory interference in large language models. arXiv preprint arXiv:2604.09670. https://doi.org/10.48550/arxiv.2604.09670

What Rests on This

1 mechanism cites this source. Each finding below is quoted as it appears on that mechanism's own page.

Working Memory Memory Systems

  • Measured in AI

    Ten open-weight models (1–27 billion parameters) given a multi-turn n-back, with all earlier letters visible, mostly approached chance by 3- or 4-back and often fell below a human reference pooled from five studies, while the largest (Qwen 3.5 27B) exceeded humans; that above-human result is not counted, because the model could see the material people had to remember