Attend First, Consolidate Later: On the Importance of Attention in Different LLM Layers
Amit Ben-Artzy, Roy Schwartz

TL;DR
This paper investigates the role of attention in different layers of decoder-based large language models, revealing that upper layers are less critical for attention-based information and that models process input in two stages.
Contribution
The study demonstrates that manipulating representations in upper layers minimally impacts performance, suggesting a two-stage processing model in LLMs that separates input gathering and internal processing.
Findings
Manipulating top-layer representations often causes negligible performance drop.
Early-layer manipulations can lead to chance-level performance.
Models ignore token switches in top layers but conform to them in earlier layers.
Abstract
In decoder-based LLMs, the representation of a given layer serves two purposes: as input to the next layer during the computation of the current token; and as input to the attention mechanism of future tokens. In this work, we show that the importance of the latter role might be overestimated. To show that, we start by manipulating the representations of previous tokens; e.g. by replacing the hidden states at some layer k with random vectors. Our experimenting with four LLMs and four tasks show that this operation often leads to small to negligible drop in performance. Importantly, this happens if the manipulation occurs in the top part of the model-k is in the final 30-50% of the layers. In contrast, doing the same manipulation in earlier layers might lead to chance level performance. We continue by switching the hidden state of certain tokens with hidden states of other tokens from…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLaw, Economics, and Judicial Systems
MethodsSoftmax · Attention Is All You Need · Hierarchical Information Threading
