Don't Take Things Out of Context: Attention Intervention for Enhancing Chain-of-Thought Reasoning in Large Language Models
Shaotian Yan, Chen Shen, Wenxiao Wang, Liang Xie, Junjie Liu, Jieping Ye
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Efficient Streaming Language Models with Attention Sinks 引用了 Language Models are Few-Shot Learners
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models 引用了 Language Models are Few-Shot Learners
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Scaling Reasoning Hop Exposes Weaknesses: Demystifying and Improving Hop Generalization in Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- VisCRA: A Visual Chain Reasoning Attack for Jailbreaking Multimodal Large Language Models 引用了 Tree of Thoughts: Deliberate Problem Solving with Large Language Models
- Graph of Thoughts: Solving Elaborate Problems with Large Language Models 引用了 Tree of Thoughts: Deliberate Problem Solving with Large Language Models
- Graph of Thoughts: Solving Elaborate Problems with Large Language Models 引用了 Language Models are Few-Shot Learners
- Graph of Thoughts: Solving Elaborate Problems with Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- CoT is Not the Chain of Truth: An Empirical Internal Analysis of Reasoning LLMs for Fake News Generation 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
引用它的顶会 Paper4
- VisCRA: A Visual Chain Reasoning Attack for Jailbreaking Multimodal Large Language ModelsBingrui Sima, Linhua Cong, Wenxuan Wang, Kun HeEMNLP 2025 · 11 次引用
- Reasoning Fails Where Step Flow BreaksXiaoyu Xu, Yulan Pan, Xiaosong Yuan, Zhihong Shen 等ACL 2026 · 1 次引用
- Scaling Reasoning Hop Exposes Weaknesses: Demystifying and Improving Hop Generalization in Large Language ModelsZhaoyi Li, Jiatong Li, Gangwei Jiang, Linqi Song 等ICLR 2026 · 1 次引用
- CoT is Not the Chain of Truth: An Empirical Internal Analysis of Reasoning LLMs for Fake News GenerationZhao Tong, Chunlin Gong, Yiping Zhang, Haichao Shi 等ICML 2026
它引用的 Paper21
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran 等NeurIPS 2023 · 5,068 次引用
- Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
- Graph of Thoughts: Solving Elaborate Problems with Large Language ModelsMaciej Besta, Nils Blach, Ales Kubicek, Robert Gerstenberger 等AAAI 2024 · 1,292 次引用
相关 Paper
- Enhancing Chain of Thought Prompting in Large Language Models via Reasoning PatternsYufeng Zhang, Xuepeng Wang, Lingxiang Wu, Jinqiao WangAAAI 2025 · 27 次引用
- "Well, Keep Thinking": Enhancing LLM Reasoning with Adaptive Injection DecodingHyunbin Jin, Je Won Yeom, Seunghyun Bae, Taesup KimACL Findings 2025 · 1 次引用
- Stepwise Perplexity-Guided Refinement for Efficient Chain-of-Thought Reasoning in Large Language ModelsYingqian Cui, Pengfei He, Jingying Zeng, Hui Liu 等ACL Findings 2025 · 4 次引用
- Towards Understanding Chain-of-Thought Prompting: An Empirical Study of What MattersBoshi Wang, Sewon Min, Xiang Deng, Jiaming Shen 等ACL 2023 · 100 次引用
- How Many Demonstrations Do You Need for In-context Learning?Jiuhai Chen, Lichang Chen, Chen Zhu, Tianyi ZhouEMNLP Findings 2023 · 12 次引用
