CLAINCSep 16, 2024

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

arXiv:2409.10715v22 citationsh-index: 2
Originality Incremental advance
AI Analysis

This work addresses a mechanistic gap in understanding cognitive limitations in AI models, which could inform the design of more capable architectures.

The study investigated why Transformer-based large language models show limited working memory capacity, similar to humans, by analyzing self-attention mechanisms in N-back tasks, finding that increased entropy in attention scores correlates with performance drops as N increases.

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.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes