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 . * Work completed during Qingru Zhang's internship at Microsoft Research. 1 We use prompts to refer to all LLM text inputs, including user instructions, and the other background information (which we refer to as context).
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 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
- Selective Prompt Anchoring for Code GenerationYuan Tian, Tianyi ZhangICML 2025
- LLaMA-Excitor: General Instruction Tuning via Indirect Feature InteractionBo Zou, Chao Yang, Yu Qiao, Chengbin Quan 等CVPR 2024 · 被引用 5 次
- Parrot: Enhancing Multi-Turn Instruction Following for Large Language ModelsYuchong Sun, Che Liu, Kun Zhou, Jinwen Huang 等ACL 2024
