Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Transformers need glasses! Information over-squashing in language tasks

About

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.

Federico Barbero, Andrea Banino, Steven Kapturowski, Dharshan Kumaran, Jo\~ao G.M. Ara\'ujo, Alex Vitvitskyi, Razvan Pascanu, Petar Veli\v{c}kovi\'c• 2024

Related benchmarks

TaskDatasetResultRank
CountingCounting
Accuracy42.7
7
Indexingindexing
Answer Rate100
4
max-floatmax-float
Answer Rate100
4
max-intmax-int
Answer Rate100
4
min-floatmin-float
Answer Rate100
4
min-intmin-int
Answer Rate100
4
number-listnumber-list
Answer Rate78.2
4
number-stringnumber-string
Answer Rate96.6
4
stockStock
Answer Rate64.1
4
weatherWeather
Answer Rate66
4
Showing 10 of 10 rows

Other info

Follow for update