Don't Take Things Out of Context: Attention Intervention for Enhancing Chain-of-Thought Reasoning in Large Language Models
On the map: LLM reasoning → Prompting and chain-of-thought reasoning
Abstract (arXiv)
Few-shot Chain-of-Thought (CoT) significantly enhances the reasoning capabilities of large language models (LLMs), functioning as a whole to guide these models in generating reasoning steps toward final answers. However, we observe that isolated segments, words, or tokens within CoT demonstrations can unexpectedly disrupt the generation process of LLMs. The model may overly concentrate on certain local information present in the demonstration, introducing irrelevant noise into the reasoning process and potentially leading to incorrect answers. In this paper, we investigate the underlying mechanism of CoT through dynamically tracing and manipulating the inner workings of LLMs at each output step, which demonstrates that tokens exhibiting specific attention characteristics are more likely to induce the model to take things out of context; these tokens directly attend to the hidden states tied with prediction, without substantial integration of non-local information. Building upon these insights, we propose a Few-shot Attention Intervention method (FAI) that dynamically analyzes the attention patterns of demonstrations to accurately identify these tokens and subsequently make targeted adjustments to the attention weights to effectively suppress their distracting effect on LLMs. Comprehensive experiments across multiple benchmarks demonstrate consistent improvements over baseline methods, with a remarkable 5.91% improvement on the AQuA dataset, further highlighting the effectiveness of FAI.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Placed in Prompting and chain-of-thought reasoning, one of 17 directions in LLM reasoning. Builds on 28 of its 43 references that are in the map. First posted on arXiv 14 Mar 2025.
Builds on
28 of 43 references.
Closest ancestors · 8
Same direction, newest first
- 2024Instance-adaptive Zero-shot Chain-of-Thought Prompting30 Sep
- 2024Let's Think Dot by Dot: Hidden Computation in Transformer Language Models24 Apr
- 2024Focus on Your Question! Interpreting and Mitigating Toxic CoT Problems in Commonsense Reasoning28 Feb
- 2024The Impact of Reasoning Step Length on Large Language Models10 Jan
- 2023Fewer is More: Boosting LLM Reasoning with Reinforced Context Pruning14 Dec
- 2023Graph of Thoughts: Solving Elaborate Problems with Large Language Models18 Aug
- 2023Dissecting Chain-of-Thought: Compositionality through In-Context Filtering and Learning30 May
- 2022Text and Patterns: For Effective Chain of Thought, It Takes Two to Tango16 Sep
Other references · 20
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,211
- 2023Mistral 7Bcited by 3,164
- 2013Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Mapscited by 2,371
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,998
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,822
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,165
- 2022In-context Learning and Induction Headscited by 964
- 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 878
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 648
8 more
- 2023Function Vectors in Large Language Modelscited by 308
- 2022Selective Annotation Makes Language Models Better Few-Shot Learnerscited by 243
- 2023MathPrompter: Mathematical Reasoning using Large Language Modelscited by 236
- 2022Why Can GPT Learn In-Context? Language Models Implicitly Perform Gradient Descent as Meta-Optimizerscited by 204
- 2023How well do Large Language Models perform in Arithmetic tasks?cited by 130
- 2023Teaching Arithmetic to Small Transformerscited by 123
- 2023Dr.ICL: Demonstration-Retrieved In-context Learningcited by 72
- 2023Large Language Models are In-Context Semantic Reasoners rather than Symbolic Reasonerscited by 63
Built on by
Citing papers per year: 2025: 3; 2026: 4.
7 papers.
- 2025Feature Extraction and Steering for Enhanced Chain-of-Thought Reasoning in Language Modelscited by 13
- 2025VisCRA: A Visual Chain Reasoning Attack for Jailbreaking Multimodal Large Language Modelscited by 13
- 2025A Theory of Inference Compute Scaling: Reasoning through Directed Stochastic Skill Searchcited by 5
- 2026Reasoning Fails Where Step Flow Breakscited by 2
- 2026Scaling Reasoning Hop Exposes Weaknesses: Demystifying and Improving Hop Generalization in Large Language Modelscited by 1
- 2026CoT is Not the Chain of Truth: An Empirical Internal Analysis of Reasoning LLMs for Fake News Generationcited by 0
- 2026BaRe-Mem: Bayesian Reliability Memory for Robust and Adaptive Agent Consultationcited by 0
- 2026BaRe-Mem: Bayesian Reliability Memory for Robust and Adaptive Agent Consultation28 Sep 2026
- 2026Reasoning Fails Where Step Flow Breaks8 Apr 2026
- 2026CoT is Not the Chain of Truth: An Empirical Internal Analysis of Reasoning LLMs for Fake News Generation4 Feb 2026
- 2026Scaling Reasoning Hop Exposes Weaknesses: Demystifying and Improving Hop Generalization in Large Language Models29 Jan 2026
- 2025A Theory of Inference Compute Scaling: Reasoning through Directed Stochastic Skill Search10 Jun 2025
- 2025VisCRA: A Visual Chain Reasoning Attack for Jailbreaking Multimodal Large Language Models26 May 2025
- 2025Feature Extraction and Steering for Enhanced Chain-of-Thought Reasoning in Language Models21 May 2025
Similar, not cited
Close in wording, no citation either way
- 2025Attention Reveals More Than Tokens: Training-Free Long-Context Reasoning with Attention-guided Retrieval
- 2026Mechanistic Interpretability of Chain-of-Thought Reasoning via Sequential Activation Patching
- 2024Extending Token Computation for LLM Reasoning
- 2026Triggering Chain-of-Thought via Latent Feature Interventions in Large Language Models
- 2025Attention Illuminates LLM Reasoning: The Preplan-and-Anchor Rhythm Enables Fine-Grained Policy Optimization
- 2025Revisiting Chain-of-Thought Prompting: Zero-shot Can Be Stronger than Few-shot
- 2024A Theoretical Understanding of Chain-of-Thought: Coherent Reasoning and Error-Aware Demonstration
- 2024Constrained Reasoning Chains for Enhancing Theory-of-Mind in Large Language Models