TL;DR
This paper introduces a modification to transformer models, specifically their attention mechanism, to better mimic human language processing. By biasing attention towards more recent words, their "locally-biased transformer" achieves surprisal estimates that align more closely with human reading times, suggesting that human language comprehension is inherently constrained by local context.
What Problem Does This Paper Address?
Modern transformer models, while powerful for language tasks, process text in a way that's fundamentally different from humans. They can attend to the entire input sequence simultaneously, a capability that far exceeds human working memory limitations. Human language comprehension is incremental and resource-constrained, meaning we process words sequentially and can't hold an unbounded amount of past information in mind. This discrepancy raises questions about the cognitive plausibility of these models as representations of human language processing. Specifically, the authors aim to bridge this gap by incorporating a "lossy context representation" into transformers, making them more sensitive to local linguistic information, similar to how human readers are.
Methods
The core innovation lies in modifying the self-attention mechanism of a pre-trained GPT-2 model. Instead of standard dot-product attention, they introduce an "exponential decay bias" matrix. This bias is calculated based on the absolute distance between tokens in a sequence, with closer tokens receiving exponentially higher weights. This bias is then blended with the original attention weights using a weighted sum, controlled by two hyperparameters: α (the blending factor) and λ (the decay rate). This effectively simulates a memory where recent linguistic elements are more strongly weighted, mimicking human cognitive constraints. The optimal values for α and λ were determined through hyperparameter tuning on the Provo corpus.
Datasets
The study utilized three eye-tracking datasets and three self-paced reading datasets:
- Eye-tracking:
- Provo corpus
- MECO corpus (English portion)
- UCLET corpus
- Self-paced reading:
- UCLSPR dataset
- Brown corpus
- Natural Stories reading times corpus (NatStor)
These datasets were used to evaluate how well the surprisal estimates from their model predicted human reading times.
Key Insights and Ideas
- Human language processing is "lossy": The paper strongly suggests that human language comprehension isn't about perfect recall of all past information, but rather a constrained, local focus.
- Local context is king (for humans): The findings highlight that human readers are more sensitive to recent words in a sentence than current transformer models typically are, even if those models are otherwise very accurate at predicting the next word.
- Worse NLP model can be a better cognitive model: Counterintuitively, the locally-biased transformer, which performs less well on next-word prediction (a standard NLP metric), shows a better fit to human psychometric data. This challenges the "quality-power hypothesis" which assumes better language models will always better fit human data.
- Memory constraints matter for longer sentences: The improvement of the locally-biased model was more pronounced in datasets with longer average sentence lengths, suggesting that memory limitations become more critical as text sequences grow.
Key Results
The locally-biased transformer model showed a substantial increase in predictive performance for human reading times in three out of six datasets:
- Eye-tracking: MECO (∆AIC = -21.55) and Provo (∆AIC = -13.72).
- Self-paced reading: Brown (∆AIC = -12.55).
The model performed on par with the original GPT-2 on the UCLET and UCLSPR corpora, and worse on the NatStor dataset (∆AIC = 4.31). The surprisal estimates from the biased model also correlated more strongly with log frequency and behavioral responses.
Limitations and Future Work
The authors acknowledge several limitations:
- Fixed decay rate: The assumption of a fixed attention decay rate (
λ) might not fully capture the dynamic nature of human memory. Future work could explore dynamically adjusting this parameter based on factors like sentence length. - Limited number of corpora: While five corpora were used, the authors suggest that more datasets would be beneficial to draw stronger conclusions about the impact of sentence length.
- Inaccessibility assumption: While inspired by Lossy-Context Surprisal Theory (LCST), their implementation doesn't strictly adhere to LCST's assumption of context inaccessibility. The context is always available, just with weighted attention.
Future directions include dynamically adapting the decay parameter based on sentence length and exploring how memory constraints influence language processing across different languages and populations.
Summary updated