Attend First, Consolidate Later: On the Importance of Attention in Different LLM Layers
Not on the map. Why?
Abstract (arXiv)
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 another prompt; e.g., replacing the word "Italy" with "France" in "What is the capital of Italy?". We find that when applying this switch in the top 1/3 of the model, the model ignores it (answering "Rome"). However if we apply it before, the model conforms to the switch ("Paris"). Our results hint at a two stage process in transformer-based LLMs: the first part gathers input from previous tokens, while the second mainly processes that information internally.
Key facts. Cited by 25 papers in the map (data through 7 Oct 2026). Builds on 17 of its 22 references that are in the map. First posted on arXiv 5 Sep 2024.
Builds on
17 of 22 references.
References · 17
- 2017Attention Is All You Needcited by 59,932
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2022Locating and Editing Factual Associations in GPTcited by 2,609
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
- 2015Teaching Machines to Read and Comprehendcited by 1,039
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
- 2023Llemma: An Open Language Model For Mathematicscited by 385
- 2020DeeBERT: Dynamic Early Exiting for Accelerating BERT Inferencecited by 322
- 2023In-Context Learning Creates Task Vectorscited by 302
- 2024LayerSkip: Enabling Early Exit Inference and Self-Speculative Decodingcited by 302
- 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Modelscited by 225
5 more
- 2024The Remarkable Robustness of LLMs: Stages of Inference?cited by 138
- 2020The Right Tool for the Job: Matching Model and Instance Complexitiescited by 125
- 2019How Does BERT Answer Questions? A Layer-Wise Analysis of Transformer Representationscited by 63
- 2019Improving Transformer Models by Reordering their Sublayerscited by 52
- 2020Pay Attention when Requiredcited by 8
Built on by
Citing papers per year: 2024: 4; 2025: 16; 2026: 5.
25 papers.
Sort:
By area:
- 2024From Tokens to Words: On the Inner Lexicon of LLMscited by 46
- 2024Looking Beyond Text: Reducing Language bias in Large Vision-Language Models via Multimodal Dual-Attention and Soft-Image Guidancecited by 32
- 2025AttentionRAG: Attention-Guided Context Pruning in Retrieval-Augmented Generationcited by 19
- 2025Spotlight Your Instructions: Instruction-following with Dynamic Attention Steeringcited by 18
- 2025Empowering GraphRAG with Knowledge Filtering and Integrationcited by 15
- 2025Understanding Language Prior of LVLMs by Contrasting Chain-of-Embeddingcited by 13
- 2024Looking Beyond The Top-1: Transformers Determine Top Tokens In Ordercited by 12
- 2025When Semantics Mislead Vision: Mitigating Large Multimodal Models Hallucinations in Scene Text Spotting and Understandingcited by 12
- 2024Persistent Topological Features in Large Language Modelscited by 11
- 2025MindGuard: Intrinsic Decision Inspection for Securing LLM Agents Against Metadata Poisoningcited by 10
- 2025Multimodal LLMs as Customized Reward Models for Text-to-Image Generationcited by 9
- 2025From ASR to ASP: Evaluating Prompt Attack Vulnerabilities Against Open-Source LLMscited by 6
13 more
- 2026AttenMIA: LLM Membership Inference Attack through Attention Signalscited by 4
- 2025Attention Basin: Why Contextual Position Matters in Large Language Modelscited by 2
- 2025Plug-in and Fine-tuning: Bridging the Gap between Small Language Models and Large Language Modelscited by 1
- 2025Entropy Meets Importance: A Unified Head Importance-Entropy Score for Stable and Efficient Transformer Pruningcited by 1
- 2025PAS : Prelim Attention Score for Detecting Object Hallucinations in Large Vision--Language Modelscited by 1
- 2025Speech Recognition Model Improves Text-to-Speech Synthesis using Fine-Grained Rewardcited by 1
- 2026Shallow Prefill, Deep Decoding: Efficient Long-Context Inference via Layer-Asymmetric KV Visibilitycited by 1
- 2025Hopscotch: Discovering and Skipping Redundancies in Language Modelscited by 0
- 2025SVAgent: AI Agent for Hardware Security Verification Assertioncited by 0
- 2025ShishuLM : Achieving Optimal and Efficient Parameterization with Low Attention Transformer Modelscited by 0
- 2026Entropy and Attention Dynamics in Small Language Models: A Trace-Level Structural Analysis on the TruthfulQA Benchmarkcited by 0
- 2026Deep Pre-Alignment for VLMscited by 0
- 2026EASE-TTT: Evidence-Aligned Selective Test-Time Training for Long-Context Question Answeringcited by 0
- 2026EASE-TTT: Evidence-Aligned Selective Test-Time Training for Long-Context Question Answering5 Jun 2026
- 2026Deep Pre-Alignment for VLMs14 May 2026
- 2026Shallow Prefill, Deep Decoding: Efficient Long-Context Inference via Layer-Asymmetric KV Visibility7 May 2026
- 2026Entropy and Attention Dynamics in Small Language Models: A Trace-Level Structural Analysis on the TruthfulQA Benchmark4 Apr 2026
- 2026AttenMIA: LLM Membership Inference Attack through Attention Signals26 Jan 2026
- 2025PAS : Prelim Attention Score for Detecting Object Hallucinations in Large Vision--Language Models14 Nov 2025
- 2025Speech Recognition Model Improves Text-to-Speech Synthesis using Fine-Grained Reward12 Nov 2025
- 2025ShishuLM : Achieving Optimal and Efficient Parameterization with Low Attention Transformer Models13 Oct 2025
- 2025Entropy Meets Importance: A Unified Head Importance-Entropy Score for Stable and Efficient Transformer Pruning10 Oct 2025
- 2025Understanding Language Prior of LVLMs by Contrasting Chain-of-Embedding27 Sep 2025
- 2025MindGuard: Intrinsic Decision Inspection for Securing LLM Agents Against Metadata Poisoning28 Aug 2025
- 2025Attention Basin: Why Contextual Position Matters in Large Language Models7 Aug 2025
13 more
- 2025Multimodal LLMs as Customized Reward Models for Text-to-Image Generation28 Jul 2025
- 2025SVAgent: AI Agent for Hardware Security Verification Assertion22 Jul 2025
- 2025Plug-in and Fine-tuning: Bridging the Gap between Small Language Models and Large Language Models9 Jun 2025
- 2025When Semantics Mislead Vision: Mitigating Large Multimodal Models Hallucinations in Scene Text Spotting and Understanding5 Jun 2025
- 2025Hopscotch: Discovering and Skipping Redundancies in Language Models3 Jun 2025
- 2025From ASR to ASP: Evaluating Prompt Attack Vulnerabilities Against Open-Source LLMs20 May 2025
- 2025Spotlight Your Instructions: Instruction-following with Dynamic Attention Steering17 May 2025
- 2025Empowering GraphRAG with Knowledge Filtering and Integration18 Mar 2025
- 2025AttentionRAG: Attention-Guided Context Pruning in Retrieval-Augmented Generation13 Mar 2025
- 2024Looking Beyond Text: Reducing Language bias in Large Vision-Language Models via Multimodal Dual-Attention and Soft-Image Guidance21 Nov 2024
- 2024Looking Beyond The Top-1: Transformers Determine Top Tokens In Order26 Oct 2024
- 2024Persistent Topological Features in Large Language Models14 Oct 2024
- 2024From Tokens to Words: On the Inner Lexicon of LLMs8 Oct 2024
- 2024Looking Beyond Text: Reducing Language bias in Large Vision-Language Models via Multimodal Dual-Attention and Soft-Image Guidancecited by 32
- 2025Understanding Language Prior of LVLMs by Contrasting Chain-of-Embeddingcited by 13
- 2025When Semantics Mislead Vision: Mitigating Large Multimodal Models Hallucinations in Scene Text Spotting and Understandingcited by 12
- 2025Multimodal LLMs as Customized Reward Models for Text-to-Image Generationcited by 9
- 2025PAS : Prelim Attention Score for Detecting Object Hallucinations in Large Vision--Language Modelscited by 1
- 2026Deep Pre-Alignment for VLMscited by 0
- 2026Deep Pre-Alignment for VLMs14 May 2026
- 2025PAS : Prelim Attention Score for Detecting Object Hallucinations in Large Vision--Language Models14 Nov 2025
- 2025Understanding Language Prior of LVLMs by Contrasting Chain-of-Embedding27 Sep 2025
- 2025Multimodal LLMs as Customized Reward Models for Text-to-Image Generation28 Jul 2025
- 2025When Semantics Mislead Vision: Mitigating Large Multimodal Models Hallucinations in Scene Text Spotting and Understanding5 Jun 2025
- 2024Looking Beyond Text: Reducing Language bias in Large Vision-Language Models via Multimodal Dual-Attention and Soft-Image Guidance21 Nov 2024
- 2024From Tokens to Words: On the Inner Lexicon of LLMscited by 46
- 2025Spotlight Your Instructions: Instruction-following with Dynamic Attention Steeringcited by 18
- 2025Empowering GraphRAG with Knowledge Filtering and Integrationcited by 15
- 2024Looking Beyond The Top-1: Transformers Determine Top Tokens In Ordercited by 12
- 2024Persistent Topological Features in Large Language Modelscited by 11
- 2025Attention Basin: Why Contextual Position Matters in Large Language Modelscited by 2
- 2025Plug-in and Fine-tuning: Bridging the Gap between Small Language Models and Large Language Modelscited by 1
- 2025Entropy Meets Importance: A Unified Head Importance-Entropy Score for Stable and Efficient Transformer Pruningcited by 1
- 2025Speech Recognition Model Improves Text-to-Speech Synthesis using Fine-Grained Rewardcited by 1
- 2026Shallow Prefill, Deep Decoding: Efficient Long-Context Inference via Layer-Asymmetric KV Visibilitycited by 1
- 2025Hopscotch: Discovering and Skipping Redundancies in Language Modelscited by 0
- 2025SVAgent: AI Agent for Hardware Security Verification Assertioncited by 0
12 most cited of 15 All 15 (JSON)
- 2026EASE-TTT: Evidence-Aligned Selective Test-Time Training for Long-Context Question Answering5 Jun 2026
- 2026Shallow Prefill, Deep Decoding: Efficient Long-Context Inference via Layer-Asymmetric KV Visibility7 May 2026
- 2026Entropy and Attention Dynamics in Small Language Models: A Trace-Level Structural Analysis on the TruthfulQA Benchmark4 Apr 2026
- 2025Speech Recognition Model Improves Text-to-Speech Synthesis using Fine-Grained Reward12 Nov 2025
- 2025ShishuLM : Achieving Optimal and Efficient Parameterization with Low Attention Transformer Models13 Oct 2025
- 2025Entropy Meets Importance: A Unified Head Importance-Entropy Score for Stable and Efficient Transformer Pruning10 Oct 2025
- 2025Attention Basin: Why Contextual Position Matters in Large Language Models7 Aug 2025
- 2025SVAgent: AI Agent for Hardware Security Verification Assertion22 Jul 2025
- 2025Plug-in and Fine-tuning: Bridging the Gap between Small Language Models and Large Language Models9 Jun 2025
- 2025Hopscotch: Discovering and Skipping Redundancies in Language Models3 Jun 2025
- 2025Spotlight Your Instructions: Instruction-following with Dynamic Attention Steering17 May 2025
- 2025Empowering GraphRAG with Knowledge Filtering and Integration18 Mar 2025
12 newest of 15 All 15 (JSON)