Chain and Causal Attention for Efficient Entity Tracking

Erwan Fagnou, Paul Caillon, Blaise Delattre, Alexandre Allauzen


Abstract
This paper investigates the limitations of transformers for entity-tracking tasks in large language models. We identify a theoretical constraint, showing that transformers require at least log2 (n+1) layers to handle entity tracking with n state changes. To address this issue, we propose an efficient and frugal enhancement to the standard attention mechanism, enabling it to manage long-term dependencies more efficiently. By considering attention as an adjacency matrix, our model can track entity states with a single layer.Empirical results demonstrate significant improvements in entity tracking datasets while keeping competitive performance on standard natural language modeling. Our modified attention allows us to achieve the same performance with drastically fewer layers. Additionally, our enhanced mechanism reveals structured internal representations of attention. Extensive experiments on both toy and complex datasets validate our approach. Our contributions include theoretical insights, an improved attention mechanism, and empirical validation.
Anthology ID:
2024.emnlp-main.731
Volume:
Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing
Month:
November
Year:
2024
Address:
Miami, Florida, USA
Editors:
Yaser Al-Onaizan, Mohit Bansal, Yun-Nung Chen
Venue:
EMNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
13174–13188
Language:
URL:
https://aclanthology.org/2024.emnlp-main.731
DOI:
Bibkey:
Cite (ACL):
Erwan Fagnou, Paul Caillon, Blaise Delattre, and Alexandre Allauzen. 2024. Chain and Causal Attention for Efficient Entity Tracking. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 13174–13188, Miami, Florida, USA. Association for Computational Linguistics.
Cite (Informal):
Chain and Causal Attention for Efficient Entity Tracking (Fagnou et al., EMNLP 2024)
Copy Citation:
PDF:
https://aclanthology.org/2024.emnlp-main.731.pdf
Software:
 2024.emnlp-main.731.software.zip