Chain and Causal Attention for Efficient Entity Tracking

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Fagnou, Erwan, Caillon, Paul, Delattre, Blaise, Allauzen, Alexandre
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909424207003648
author Fagnou, Erwan
Caillon, Paul
Delattre, Blaise
Allauzen, Alexandre
author_facet Fagnou, Erwan
Caillon, Paul
Delattre, Blaise
Allauzen, Alexandre
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_05565
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Chain and Causal Attention for Efficient Entity Tracking
Fagnou, Erwan
Caillon, Paul
Delattre, Blaise
Allauzen, Alexandre
Machine Learning
Computation and Language
I.2.7
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.
title Chain and Causal Attention for Efficient Entity Tracking
topic Machine Learning
Computation and Language
I.2.7
url https://arxiv.org/abs/2410.05565