Transformers need glasses! Information over-squashing in language tasks

Federico Barbero, Andrea Banino, Steven Kapturowski, Dharshan Kumaran, João G. M. Araújo +3 more
6/6/2024
cs.CLcs.LG

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

We study how information propagates in decoder-only Transformers, which are the architectural backbone of most existing frontier large language models (LLMs). We rely on a theoretical signal propagation analysis -- specifically, we analyse the representations of the last token in the final layer of the Transformer, as this is the representation used for next-token prediction. Our analysis reveals a representational collapse phenomenon: we prove that certain distinct sequences of inputs to the Transformer can yield arbitrarily close representations in the final token. This effect is exacerbated by the low-precision floating-point formats frequently used in modern LLMs. As a result, the model is provably unable to respond to these sequences in different ways -- leading to errors in, e.g., tasks involving counting or copying. Further, we show that decoder-only Transformer language models can lose sensitivity to specific tokens in the input, which relates to the well-known phenomenon of over-squashing in graph neural networks. We provide empirical evidence supporting our claims on contemporary LLMs. Our theory also points to simple solutions towards ameliorating these issues.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{barbero2024transformers,
  title  = {Transformers need glasses! Information over-squashing in language tasks},
  author = {Federico Barbero and Andrea Banino and Steven Kapturowski and Dharshan Kumaran and João G. M. Araújo and Alex Vitvitskyi and Razvan Pascanu and Petar Veličković},
  year   = {2024},
  eprint = {2406.04267},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2406.04267},
  url    = {http://arxiv.org/abs/2406.04267v2},
  journal = {NEURIPS 2024 2024}
}

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/2406.04267.svg)](https://codeofpaper.com/paper/2406.04267)

Discussion