Introduction
Recent studies in cognitive psychology have begun using standard human assessments to evaluate the reasoning and memory capabilities of Large Language Models (LLMs). A classic example is the $n$-back task, where a subject observes a sequence of stimuli and must determine if the current item matches the one that appeared exactly $n$ steps ago. While humans typically reach a working memory capacity limit (WMCL) at approximately $n=3$, initial research suggested that LLMs like GPT-3.5 exhibit a similar bottleneck.
This paper challenges the notion of an inherent memory limit in LLMs. The authors investigate whether poor performance on these tasks stems from a genuine cognitive bottleneck or a failure in task comprehension and task set maintenance—the ability to understand and adhere to complex rules over time.
Methods
The researchers evaluated a diverse set of models, including GPT-3.5 Turbo, Qwen (1.5 and 2), Llama 3.1, and Gemma 2. They utilized an open-source $n$-back dataset featuring 50 trials per task, each consisting of a 24-letter sequence with 8 match positions. To isolate comprehension from memory capacity, the study employed several novel analytical techniques:
- Counterfactual Log-Probability Analysis: Assessing whether a model's internal probability distribution favors the correct $n$-back answer or defaults to a simpler (e.g., 1-back) pattern.
- Task Set Maintenance Tracking: Measuring accuracy degradation over a sequence to identify "task drift."
- In-Context Curriculum Learning: Prepending demonstrations of increasing difficulty (from 1-back up to $n$-back) to prime the model for complex tasks.
- Attention Analysis: Calculating Mean Retrieval Attention (MRAT) to see if attention heads physically "look" at the token $n$ steps back during generation.
Key Results and Insights
The evaluation revealed that model performance naturally falls into three tiers based on their ability to handle 2-back and 3-back tasks.
- Tier 3 (Low Performance): Models like Qwen 1.5 14B and Llama 3.1 8B often failed to comprehend the task entirely, acting as if they were performing a 1-back task even when instructed otherwise.
- Tier 2 (Moderate Performance): GPT-3.5 Turbo and Gemma 2 27B initially understood the task but suffered from "error accumulation." As mistakes filled their context window, they lost the task set and drifted into easier patterns.
- Tier 1 (High Performance): Large-scale models like Qwen 2 72B and Llama 3.1 70B demonstrated robust performance.
When using curriculum learning, the most capable models shattered human limits. Llama 3.1 70B achieved over 84% accuracy on a 10-back task, proving that the "human-like limit" is a result of prompting and comprehension issues rather than memory capacity. Furthermore, attention analysis showed that high-performing models like Qwen 2 72B use a direct retrieval strategy, with specific attention heads acting as pointers to the target token $n$ steps back.
Conclusion
This research demonstrates that LLM failures on cognitive tasks are frequently symptoms of instruction misunderstanding rather than inherent capacity limits. By improving task comprehension through better prompting and curriculum learning, top-tier models can far exceed human working memory performance. Future work will focus on the mechanistic interpretability of how these models maintain task rules and the architectural differences that lead to varying attention strategies.
Summary updated