arXiv:2610.21176cs.LGOct 2026

Manuscript Offprint

arXiv:2610.21176

Language Models Share a Readout Bottleneck in Working Memory

Dongyu Gong

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large language models (LLMs) reproduce a human working-memory signature on the N-back task: performance declines as memory load N increases, and errors concentrate on lures, items that repeat the current stimulus at a neighboring but incorrect serial position. We ask whether this shared behavioral signature reflects a shared mechanism. The literature offers two candidate accounts. On a precision account, softmax attention cannot concentrate its weight on the item N positions back, so adjacent items are retrieved instead. On an interference account, attention selects the correct item, but the content of competing items corrupts the decision. We dissociate these accounts in 15 pretrained LLMs from three families (70 million to 14 billion parameters) and in minimal transformers trained from scratch. In all three families, the attention heads that carry the task attend to the target on most missed matches. Linear probes decode near-perfectly whether a matching letter occurred at the target or at a lure position, even on trials where the model false-alarms to the lure, although its own decisions barely distinguish the two. Sharpening attention yields negligible gains, whereas suppressing the letter identity of non-target items improves sensitivity ( d′d') in nearly all model-by-load conditions. In larger models the task is spread over more heads, and removing interference helps more. In minimal transformers, precision limits a single attention layer, but a second layer removes this constraint. The working-memory limit of LLMs therefore lies in reading items out under interference rather than in locating them, consistent with interference accounts of human working memory.

1 Introduction

Working memory, the ability to hold a few pieces of information in mind and use them, is famously limited in humans [Cowan, 2001, Ma et al., 2014]. A standard probe is the N-back task [Kirchner, 1958]: people see a stream of letters and, for each one, report whether it matches the letter N positions earlier. Performance falls steeply as N grows, and false alarms occur most often on lures, letters that repeat the current one at a nearby but wrong distance, such as N−1 or N+1 back [Kane et al., 2007]. A lure error shows that the letter was remembered but its position was confused, and such errors are usually explained as a failure to select the target against competing items [Engle, 2002, Oberauer et al., 2012, Szmalec et al., 2011].

Large language models (LLMs) show the same signature [Gong et al., 2024, Hu and Lewis, 2025, Xiong et al., 2026]. This is surprising, because an LLM does not need to hold earlier items in a limited store: the whole sequence stays in its input, and at every step it can look back at any earlier item through attention [Vaswani et al., 2017]. Roughly, the current position gives every earlier position a score, the scores are turned into weights that sum to one, and the model takes the weighted average of what the earlier positions contain. Because nothing is forgotten, the limit must arise when the model retrieves an earlier item and uses it to decide.

Preprint.

The shared signature raises a question that is central to comparing neural systems, namely whether networks that behave alike also compute alike. Similar errors can arise from different mechanisms, and representations that look alike to a decoder need not play the same role in behavior. N-back is a useful test case, because two accounts that predict the same lure errors make opposite predictions about the computation inside the model, and these predictions can be checked across model families and sizes.

Two accounts of where this process fails have been proposed (Fig. 1b). On the first, the precision account, the model fails to locate the target. Attention weights are computed by a softmax, a form of divisive normalization [Carandini and Heeger, 2012]: each position's weight is its own (exponentiated) score divided by the sum over all positions, so positions compete for weight. The target's immediate neighbors lie only one position away from it (N±1 back), so if the model cannot tell adjacent positions apart sharply, they receive scores almost as high as the target's, and part of the weight spills onto them. A lure error then occurs because attention lands partly on the lure and the model reads its letter. This account was proposed for small transformers trained on N-back [Gong and Zhang, 2024] and is supported by analyses of softmax [Veličković et al., 2025]. On the second, the interference account, the model locates the target but fails to read it out correctly. Attention lands on the target, but inside the model the target's content is mixed with the content of other recent items, and the mixture corrupts the decision. Xiong et al. [2026] found evidence for this account: the models' errors are biased toward recent items, item representations overlap inside the models, and suppressing letter-identity directions can improve performance. But the precision account also predicts errors biased toward neighbors. Attention averaged over trials does peak at the target, but it also places some weight on the neighbors, and an average cannot show where attention goes on the trials where the model errs. The two accounts have not been tested against each other.

The two accounts make different predictions. If the precision account is right, attention should be off target when the model errs, and sharpening attention should help. If the interference account is right, attention should be on target even on errors, the information needed for the correct answer should be present in the model, and removing the competing content should help more than sharpening attention.

We test these predictions in 15 pretrained LLMs and in small transformers trained from scratch, where the precision account can be analyzed exactly. In every model we tested, the results favor the interference account. The attention heads that carry the task attend to the target on most errors, and a simple classifier reads from the model's own activations whether a repeated letter sat at the target or at a lure position, even on the trials where the model falls for the lure (Section 4). Causally, erasing the content of competing items improves performance far more than sharpening attention does (Section 5; Fig. 1c). The same dissociation holds in every family and across a 200-fold range of size; with scale the task is spread over more heads, but the bottleneck stays the same. The precision account does apply to a transformer with a single attention layer, but a second layer removes this limit (Section 6).

References (46)