Chain and Causal Attention for Efficient Entity Tracking

Erwan Fagnou, Paul Caillon, Blaise Delattre, Alexandre Allauzen
10/7/2024
cs.LGcs.CL

No official code found. Best implementation: ErwanFagnou/ChaCAL (1 star, last commit 2025-11-06).

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 $\log_2 (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.

View on arXivView PDF

Code Implementations(1)

ErwanFagnou/ChaCALCommunity65%

Official implementation of ChaCAL: Chain and Causal Attention for Efficient Entity Tracking, published at EMNLP 2024.

10PythonNov 6, 202511 months ago

Similar Papers

Cite this paper

@article{fagnou2024chain,
  title  = {Chain and Causal Attention for Efficient Entity Tracking},
  author = {Erwan Fagnou and Paul Caillon and Blaise Delattre and Alexandre Allauzen},
  year   = {2024},
  eprint = {2410.05565},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.05565v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.05565.svg)](https://codeofpaper.com/paper/2410.05565)

Discussion