Tell Your Model Where to Attend: Post-hoc Attention Steering for LLMs
Qingru Zhang, Chandan Singh, Liyuan Liu, Xiaodong Liu, Bin Yu, Jianfeng Gao, Tuo Zhao
摘要
In human-written articles, we often leverage the subtleties of text style, such as bold and italics, to guide the attention of readers. These textual emphases are vital for the readers to grasp the conveyed information. When interacting with large language models (LLMs), we have a similar need -steering the model to pay closer attention to user-specified information, e.g., an instruction. Existing methods, however, are constrained to process plain text and do not support such a mechanism. This motivates us to introduce PASTA -Post-hoc Attention STeering Approach, a method that allows LLMs to read text with user-specified emphasis marks. To this end, PASTA identifies a small subset of attention heads and applies precise attention reweighting on them, directing the model attention to user-specified parts. Like prompting, PASTA is applied at inference time and does not require changing any model parameters. Experiments demonstrate that PASTA can substantially enhance an LLM's ability to follow user instructions or integrate new knowledge from user inputs, leading to a significant performance improvement on a variety of tasks, e.g., an average accuracy improvement of 22% for LLAMA-7B. Our code is publicly available at https://github.com/QingruZhang/PASTA .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 41 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- LoRA: Low-Rank Adaptation of Large Language Models 引用了 Language Models are Few-Shot Learners
- LoFiT: Localized Fine-tuning on LLM Representations 引用了 LoRA: Low-Rank Adaptation of Large Language Models
- LoFiT: Localized Fine-tuning on LLM Representations 引用了 Language Models are Few-Shot Learners
- QLoRA: Efficient Finetuning of Quantized LLMs 引用了 LoRA: Low-Rank Adaptation of Large Language Models
- QLoRA: Efficient Finetuning of Quantized LLMs 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- QLoRA: Efficient Finetuning of Quantized LLMs 引用了 Training language models to follow instructions with human feedback
- Unveiling and Harnessing Hidden Attention Sinks: Enhancing Large Language Models without Training through Attention Calibration 引用了 Language Models are Few-Shot Learners
- Unveiling and Harnessing Hidden Attention Sinks: Enhancing Large Language Models without Training through Attention Calibration 引用了 Training language models to follow instructions with human feedback
- Data Formulator 2: Iterative Creation of Data Visualizations, with AI Transforming Data Along the Way 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- ZeroTuning: Unlocking the Initial Token's Power to Enhance Large Language Models Without Training 引用了 LoRA: Low-Rank Adaptation of Large Language Models
- ZeroTuning: Unlocking the Initial Token's Power to Enhance Large Language Models Without Training 引用了 QLoRA: Efficient Finetuning of Quantized LLMs
- ZeroTuning: Unlocking the Initial Token's Power to Enhance Large Language Models Without Training 引用了 Unveiling and Harnessing Hidden Attention Sinks: Enhancing Large Language Models without Training through Attention Calibration
- ZeroTuning: Unlocking the Initial Token's Power to Enhance Large Language Models Without Training 引用了 Language Models are Few-Shot Learners
- ZeroTuning: Unlocking the Initial Token's Power to Enhance Large Language Models Without Training 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models 引用了 Training language models to follow instructions with human feedback
- Training language models to follow instructions with human feedback 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper41
- LoFiT: Localized Fine-tuning on LLM RepresentationsFangcong Yin, Xi Ye, Greg DurrettNeurIPS 2024 · 74 次引用
- Unveiling and Harnessing Hidden Attention Sinks: Enhancing Large Language Models without Training through Attention CalibrationZhongzhi Yu, Zheng Wang, Yonggan Fu, Huihong Shi 等ICML 2024 · 63 次引用
- Mixture of In-Context Experts Enhance LLMs' Long Context AwarenessHongzhan Lin, Ang Lv, Yuhan Chen, Chen Zhu 等NeurIPS 2024 · 25 次引用
- Data Formulator 2: Iterative Creation of Data Visualizations, with AI Transforming Data Along the WayChenglong Wang, Bongshin Lee, Steven Mark Drucker, Dan Marshall 等CHI 2025 · 17 次引用
- ZeroTuning: Unlocking the Initial Token's Power to Enhance Large Language Models Without TrainingFeijiang Han, Xiaodong Yu, Jianheng Tang, Delip Rao 等ICLR 2026 · 17 次引用
它引用的 Paper18
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu 等ICLR 2022 · 18,833 次引用
- QLoRA: Efficient Finetuning of Quantized LLMsTim Dettmers, Artidoro Pagnoni, Ari Holtzman, Luke ZettlemoyerNeurIPS 2023 · 5,863 次引用
相关 Paper
- Learning to Keep a Promise: Scaling Language Model Decoding Parallelism with Learned Asynchronous DecodingTian Jin, Ellie Y. Cheng, Zachary Ankner, Nikunj Saunshi 等ICML 2025
- Answer is All You Need: Instruction-following Text Embedding via Answering the QuestionLetian Peng, Yuwei Zhang, Zilong Wang, Jayanth Srinivasa 等ACL 2024
- Instruction Position Matters in Sequence Generation with Large Language ModelsYijin Liu, Xianfeng Zeng, Chenze Shao, Fandong Meng 等ACL Findings 2024 · 6 次引用
- MAPO: Boosting Large Language Model Performance with Model-Adaptive Prompt OptimizationYuyan Chen, Zhihao Wen, Ge Fan, Zhengyu Chen 等EMNLP Findings 2023 · 18 次引用
- Selective Prompt Anchoring for Code GenerationYuan Tian, Tianyi ZhangICML 2025
