Lune

ICML2025Top-tier venue

Heads up! Large Language Models Can Perform Tasks Without Your Instruction via Selective Attention Head Masking

Senyu Han, Hongchuan Zeng, Kai Yu, Lu Chen

Abstract

Large language models (LLMs) consist of numerous Transformer modules, and while the models can perform various functions, it remains an open question of how these modules are combined to elicit distinct inherent functionalities. In this paper, we investigate the modules inside LLMs and demonstrate that, by simply masking or retaining specific attention heads during inference, LLMs can exhibit specific task functionalities without requiring explicit instructions or modifications to the model parameters. Experiments across various models and tasks reveal that LLMs inherently encode "functional pathways", the structured groups of interdependent attention heads that are crucial for executing specific tasks. These pathways not only govern the model's functional behaviors but also enhance parameter efficiency, as suppressing attention heads outside the pathway can improve task performance.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Function Vectors in Large Language Models cites Task-Specific Skill Localization in Fine-tuned Language Models
  • LoFiT: Localized Fine-tuning on LLM Representations cites Function Vectors in Large Language Models
  • LoFiT: Localized Fine-tuning on LLM Representations cites Task-Specific Skill Localization in Fine-tuned Language Models
  • AHAMask: Reliable Task Specification for Large Audio Language Models Without Instructions cites Function Vectors in Large Language Models
  • Knowledge Circuits in Pretrained Transformers cites Function Vectors in Large Language Models
  • Revealing Long-context Potential of Attention Heads via Frequency Kernels cites Function Vectors in Large Language Models
  • Revealing Long-context Potential of Attention Heads via Frequency Kernels cites Knowledge Circuits in Pretrained Transformers
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. AHAMask: Reliable Task Specification for Large Audio Language Models Without InstructionsYiwei Guo, Bohan Li, Hankun Wang, Zhihan Li et al.AAAI 2026 · 1 citation
  2. Revealing Long-context Potential of Attention Heads via Frequency KernelsSenyu Han, Yilu Cao, Kai Yu, Lu ChenICML 2026

Builds on19

  1. Function Vectors in Large Language ModelsEric Todd, Millicent L. Li, Arnab Sen Sharma, Aaron Mueller et al.ICLR 2024 · 229 citations
  2. Task-Specific Skill Localization in Fine-tuned Language ModelsAbhishek Panigrahi, Nikunj Saunshi, Haoyu Zhao, Sanjeev AroraICML 2023 · 100 citations
  3. LoFiT: Localized Fine-tuning on LLM RepresentationsFangcong Yin, Xi Ye, Greg DurrettNeurIPS 2024 · 74 citations
  4. MaskLLM: Learnable Semi-Structured Sparsity for Large Language ModelsGongfan Fang, Hongxu Yin, Saurav Muralidharan, Greg Heinrich et al.NeurIPS 2024 · 72 citations
  5. Knowledge Circuits in Pretrained TransformersYunzhi Yao, Ningyu Zhang, Zekun Xi, Mengru Wang et al.NeurIPS 2024 · 71 citations

Related papers

  1. Compressed Sensing for Capability Localization in Large Language ModelsAnna Bair, Yixuan Xu, Mingjie Sun, Zico KolterICML 2026 · 1 citation
  2. Inferring Functionality of Attention Heads from their ParametersAmit Elhelo, Mor GevaACL 2025
  3. Cognitive Mirrors: Exploring the Diverse Functional Roles of Attention Heads in LLM ReasoningXueqi Ma, Jun Wang, Yanbei Jiang, Sarah M. Erfani et al.NeurIPS 2025 · 5 citations
  4. Token Alignment Heads: Unveiling Attention's Role in LLM Multilingual TranslationBinbin Liu, Wenhan Han, Feng Chen, Yifan Zhang et al.ICLR 2026
  5. HeadMap: Locating and Enhancing Knowledge Circuits in LLMsXuehao Wang, Liyuan Wang, Binghuai Lin, Yu ZhangICLR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines