# Transformers need glasses! Information over-squashing in language tasks

**Authors:** Federico Barbero, Andrea Banino, Steven Kapturowski, Dharshan Kumaran, João G. M. Araújo, Alex Vitvitskyi, Razvan Pascanu, Petar Veličković  
**arXiv:** [2406.04267](https://arxiv.org/abs/2406.04267)  
**Date:** 2024-06-06  
**Summary page:** https://www.summarizepaper.com/en/arxiv-id/2406.04267v2/

## Key points

- Study presented at NeurIPS 2024 delves into information propagation in decoder-only Transformers
- Uncovering representational collapse and over-squashing phenomena in decoder-only Transformers
- Certain input sequences lead to similar representations hindering model differentiation
- Decoder-only Transformers may lose sensitivity to specific tokens within input sequences
- Emphasizes enhancing base model's capabilities for complex reasoning tasks
- Focus on understanding practical implications of the last token's representation
- Unidirectional causal mask in decoder-only Transformers contributes to representational collapse
- Parallels drawn with vanishing gradients in graph neural networks
- Significant contributions made by shedding light on these phenomena through theoretical analysis and empirical validation

## Summary

In this study presented at the 38th Conference on Neural Information Processing Systems (NeurIPS 2024), the researchers delve into the intricacies of information propagation in decoder-only Transformers, which serve as the foundational architecture for many cutting-edge large language models (LLMs). Through a rigorous theoretical analysis focused on signal propagation, specifically examining the representations of the final token in the last layer of the Transformer, crucial for next-token prediction, a phenomenon known as representational collapse is uncovered. The study highlights <kw>representational collapse and over-squashing phenomena</kw> in <kw>decoder-only Transformers</kw>, offering practical solutions derived from their theoretical findings. The researchers demonstrate that certain sequences of inputs can result in remarkably similar representations in the final token, ultimately hindering the model's ability to differentiate between these sequences and leading to errors in tasks such as counting or copying. Moreover, it is revealed that decoder-only Transformer language models may lose sensitivity to specific tokens within input sequences, reminiscent of over-squashing observed in graph neural networks. By providing empirical evidence from contemporary LLMs, <kw>this study underscores practical implications and proposes straightforward solutions for future advancements.</kw>

The research team emphasizes that while tools can aid LLMs in tackling tasks like counting and copying, enhancing the base model's inherent capabilities is crucial due to complex reasoning operations often required even before utilizing such tools. By elucidating why decoder-only Transformers struggle with these fundamental tasks, not only is intellectual curiosity satisfied but also practical guidance for further advancements is offered. Unlike previous works making assumptions incongruent with real-world constraints, this study focuses on understanding <kw>the information encoded in the last token's representation at a practical level.</kw>

Furthermore, it is highlighted that the unidirectional causal mask employed by decoder-only Transformers contributes to representational collapse by funneling information towards a single point—the final token—potentially resulting in information loss through over-squashing. Drawing parallels with vanishing gradients observed in graph neural networks, <kw>this finding may be of interest to GNN researchers seeking practical applications at scale.</kw> 

In conclusion, this paper makes significant contributions by shedding light on representational collapse and over-squashing phenomena in decoder-only Transformers through a blend of theoretical analysis and empirical validation.
