arXiv(opens in a new tab)cs.LGOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.21336

Ranking and Partitioning of Attention Heads for Sparse and Continual Reinforcement Learning Fine-tuning

Ruizhe Shi, Zaiwen Yang, Qiubo Wang, Banghua Zhu, Maryam Fazel

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

ABSTRACT

We study sparse and continual reinforcement learning fine-tuning of language models through attention-head ranking and partitioning. For sparse learning, we rank attention heads by gradient norm to identify a small subset of heads that can be trained effectively. For continual learning, we partition heads across tasks to reduce cross-task interference and preserve previously learned capabilities. Theoretically, we relate gradient norm to training effectiveness, and further characterize why sparse, separated head updates can remain stable. Empirically, across math, instruction-following, and coding tasks, tuning higher-ranked heads consistently outperforms tuning lower-ranked ones while often matching denser baselines, and head partitioning improves retention while preserving adaptation to new tasks.

1 INTRODUCTION

Reinforcement-learning (RL) fine-tuning has become an important approach for improving the capabilities of language models (LMs). However, RL fine-tuning is expensive, especially when a large fraction of model parameters is updated, which increases gradient memory and synchronization costs in distributed training (Miahi & Belilovsky, 2026; Fireworks.ai, 2026). Recent works suggest that effective adaptation can often be achieved by updating only restricted parts of the LM, such as attention modules or individual transformer layers (Jin et al., 2025; Zhang et al., 2026). This motivates sparse RL fine-tuning under a limited trainable-parameter budget.

In this work, we focus on attention heads as the basic units for sparse RL fine-tuning. Classical pruning studies show that many attention heads can be removed with little performance degradation, while a smaller subset plays more important roles (Michel et al., 2019; Voita et al., 2019). More recent studies further suggest that attention heads can specialize toward different latent signals during training (Sagitova et al., 2026), and that high-level LM capabilities can be localized to sparse, task-specific subsets of heads (Bair et al., 2026). This motivates us to design a criterion to identify those heads that are most effective to update during training.

Sparse RL fine-tuning is also appealing for continual learning, where sequential updates can interfere with previously learned capabilities and lead to catastrophic forgetting. A common approach is to constrain different tasks to parameter or gradient subspaces (Chaudhry et al., 2020; Doan et al., 2020; Wang et al., 2023; Liang & Li, 2024; Qiu et al., 2026). Sparse updates can therefore serve to separate task-specific adaptations. Such parameter isolation avoids direct overwriting, yet indirect functional interference may remain (Lanzillotta et al., 2023), requiring careful selection of the trainable parameters such as Iurada et al. (2025); Lin et al. (2025; 2026).

Contributions. We study attention-head ranking and partitioning for sparse and continual RL fine-tuning. Our main contributions are summarized as follows:

• We propose gradient norm as a simple criterion for ranking attention heads. Across several tasks, tuning higher-ranked heads consistently outperforms tuning lower-ranked heads, while often matching or exceeding denser baselines.

• We propose partitioning attention heads across sequential tasks and study several head-allocation strategies. Our experiments show that head partitioning with these strategies effectively prevents forgetting while preserving adaptation to new tasks.

• We provide a theoretical analysis to guide both designs. We characterize the role of gradient norm in the optimization dynamics of sparse and continual learning, and further analyze the second-order structure of multi-head self-attention, revealing favorable properties of attention-head blocks for parameter and functional isolation.

References (40)

  • Compressed sensing for capability localization in large language models
  • Continual learning in low-rank orthogonal subspaces
  • Retaining by doing: The role of on-policy data in mitigating forgetting
  • Optimal analysis of subset-selection based l_p low rank approximation
  • A theoretical analysis of catastrophic forgetting through the ntk overlap matrix
  • Adaptive subgradient methods for online learning and stochastic optimization
  • Orthogonal gradient descent for continual learning
  • Parameter-efficient transfer learning with diff pruning (opens the publisher in a new tab)
  • Efficient model editing with task-localized sparse fine-tuning
  • Fine-tuning attention modules only: Enhancing weight disentanglement in task arithmetic
  • Towards guarantees for parameter isolation in continual learning
  • Inflora: Interference-free low-rank adaptation for continual learning
  • Continual learning via sparse memory finetuning
  • Parameter importance is not static: Evolving parameter isolation for supervised fine-tuning (opens the publisher in a new tab)
  • SPHERE: Mitigating the loss of spectral plasticity in mixture-of-experts for deep reinforcement learning
  • A kernel-based view of language model fine-tuning
  • Understanding and exploiting weight update sparsity for communication-efficient distributed rl
  • Are sixteen heads really better than one? In NeurIPS, pp. 14014–14024, 2019
  • Sculpting subspaces: Constrained full fine-tuning in LLMs for continual learning
  • In-context learning and induction heads
  • What does it mean to be a transformer? insights from a theoretical hessian analysis
  • Merge before forget: A single IoRA continual learning via continual merging
  • SplitloRA: Balancing stability and plasticity in continual learning through gradient space splitting
  • Qwen3 Technical Report
  • Specialization of softmax attention heads: insights from the high-dimensional single-location model, 2026 (opens arXiv in a new tab)
  • Gradient projection memory for continual learning
  • RL's razor: Why online reinforcement learning forgets less
  • Understanding the performance gap in preference learning: A dichotomy of RLHF and DPO. In Forty-third International Conference on Machine Learning, 2026
  • Merging on the fly without retraining: A sequential approach to scalable continual model merging
  • Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned (opens the publisher in a new tab)
  • Orthogonal subspace learning for language model continual learning (opens the publisher in a new tab)
  • Continual model merging without data: Dual projections for balancing stability and plasticity
  • Leveraging sparsity for sample-efficient preference learning: A theoretical perspective
  • Which attention heads matter for in-context learning? In Forty-second International Conference on Machine Learning, 2025
  • LoRI: Reducing cross-task interference in multi-task low-rank adaptation
  • Is one layer enough? training a single transformer layer can match full-parameter rl training
  • Understanding the dynamics of forgetting and generalization in continual learning via the neural tangent kernel
  • Averaging over $s \in [0, t]$ yields
  • The second-derivative formulas of Ormaniec et al. (2025) express every nonzero block of the corresponding functional Hessian through the second and third centered attention moments
  • Under bounded input and weight norms, this implies