arXiv:2610.21294cs.LGOct 2026

Manuscript Offprint

arXiv:2610.21294

Can Capability Enhancement be Localized?

Anh Tuan Nguyen, Anna Bair, Zico Kolter

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Transformer-based language models have shown strong capabilities across many tasks and domains. However, prior work shows that, for a given task, not all attention heads matter equally. Specifically, they suggest that many redundant heads can be safely removed with little-to-no effect, while a small set of important heads, when ablated, severely damages the model's performance on the given task. In this work, we investigate a complementary aspect, called Capability Enhancement Localization (CEL): given a model and a task, does there exist a small set of heads whose removal improves the task performance? We first investigate this question empirically across models from different families. Using a simple two-stage routine that screens candidate heads and evaluates their joint ablations, we identify sparse head combinations whose removal improves task-specific performance without further fine-tuning. Motivated by these observations, we ask theoretically whether such a phenomenon can naturally arise from training dynamics, and under what conditions. To this end, we construct a simplified multi-head softmax attention model and two tasks with conflicting features, and show that gradient descent from small random initialization provably concentrates the conflicting features into particular heads. We further show that ablating such heads improves performance on one task while harming the other, even though training converges to a global optimum of the joint objective. This establishes a possible training-induced theoretical explanation for CEL.

1 INTRODUCTION

Large language models (LLMs) (Vaswani et al., 2017; Hoffmann et al., 2022) have demonstrated strong capabilities across diverse tasks, including language understanding, text generation, question answering, code generation, and mathematical reasoning (Brown et al., 2020; Raffel et al., 2020; Rae et al., 2021), among others. A notable feature of LLMs is that a single set of parameters supports many different tasks, which can often be specified through natural-language instructions or a few demonstrations without task-specific parameter updates (Brown et al., 2020; Wei et al., 2021). This breadth of functionality motivates a line of work studying how a shared network supports diverse capabilities and how its internal components (e.g., attention heads/layers) contribute to LLM performance on individual tasks.

Early works on LLM pruning demonstrated that the attention heads exhibit substantial redundancy and contribute unequally across different tasks. For example, Clark et al. (2019b) observed that attention heads within the same BERT layers (Devlin et al., 2019) often exhibit similar attention patterns, leading to overlapping behavior. Moreover, Michel et al. (2019) and Voita et al. (2019) showed that many attention heads can be pruned after training without substantially affecting the overall LLM performance. Together, those findings emphasize that the full complement of attention heads is generally not required at inference time for preserving task capabilities, motivating a closer look at which heads are dispensable and which are critical for particular tasks.

Besides the evidence of redundancy, recent works have identified attention heads with specialized roles. Examples include induction mechanism corresponding to in-context learning (Olsson et al., 2022), information retrieval from long contexts (Wu et al., 2025), and processing operands and operators for arithmetic tasks (Zhang et al., 2024), to name a few. Other work identified distinct heads that favor internal knowledge encoded in the model's weights or external context when these information sources conflict (Jin et al., 2024). These analyses revealed how specific heads support or route computations under various scenarios. More recently, broader capability-localization studies complement these findings. In particular, Huang et al. (2025) identified a small group of neurons associated with shared capabilities, while Bair et al. (2026) leveraged a cheap compressed sensing method (i.e., LASSO (Tibshirani, 1996)) to identify task-critical attention heads corresponding to separate capabilities. Ablating just a few of these task-critical heads can dramatically degrade the LLM performance on the corresponding task.

The above findings provided evidence of redundant and task-critical attention heads. In this work, we complement these findings by asking the following counter-intuitive question: given an arbitrary task and an LLM, is there a sparse set of attention heads such that ablating them improves the performance of that LLM on that task, without any further fine-tuning? For convenience, we term this question Capability Enhancement Localization (CEL).

We note that beneficial head removal has already been observed in some specific scenarios. Held & Yang (2023) identify heads that interfere with performance in multilingual models and show that pruning them can improve performance for a target language. Jin et al. (2024) prune heads involved in conflicts between a model's internal knowledge and external context. More recently, Nguyen et al. (2025) observe that pruning certain heads can improve mathematical reasoning and use different pruned configurations to generate diverse answers for best-of-N selection. In this work, we ask whether sparse beneficial head ablations can be found across a broader range of tasks and models, without presupposing a particular source of interference. More importantly, we ask how successful training can produce a head whose removal improves a task. We answer this theoretical question in a simplified attention model, where task conflict and learned feature allocation give rise to beneficial head ablation.

Contribution. In this work, we study the Capability Enhancement Localization (CEL) question, which asks whether there exists a sparse set of attention heads whose ablation improves task performance without further fine-tuning, given a task. Our contributions are:

  1. In Section 3, we consider multiple model families and task configurations. Using a simple two-stage approach, we found evidence of the CEL phenomenon: given a task, ablating a sparse set of heads can significantly improve models' task-specific performance.

  2. Motivated by empirical evidence of CEL, we seek a potential theoretical explanation for whether and how this phenomenon naturally arises in LLM training. To this end, in Section 4, we construct a simplified softmax attention model, trained on two tasks with a feature conflict. We then show in Theorem 4.2 that, under standard GD training, such conflicting features can be encoded into a specific attention head, leading to the localization phenomenon.

  3. We then further show in Theorem 4.3 that ablating such a head can improve the model's performance on a single task while harming the other, even though training converges to an optimum of the joint objective. Together with the localization phenomenon, this theoretically establishes one possible mechanism for CEL.