Differential Fine-Tuning Large Language Models Towards Better Diverse Reasoning Abilities

Xiaosong Yuan, Chen Shen, Shaotian Yan, kaiyuan liu, Xiaofeng Zhang, Sinan Fan, Liang Xie, Wenxiao Wang, Renchu Guan, Ying Wang, Jieping Ye

TL;DR

Teaching a Large Language Model (LLM) multiple reasoning skills—like math, coding, and logic—often leads to "task interference," where learning one skill degrades another. This paper introduces Differential Fine-Tuning (DiFT), a method that identifies task-specific "hotspots" in a model's parameters and selectively updates them, allowing models to master diverse reasoning tasks simultaneously without the usual performance trade-offs.

What Problem Does This Paper Address?

Supervised Fine-Tuning (SFT) is the standard way to specialize LLMs. However, when we try to teach a model multiple reasoning abilities at once (Mix-up SFT) or one after another (Continual SFT), we hit a wall. Reasoning tasks require complex, multi-step derivations that often conflict at the hardware level of the model's weights.

Performance drop in Continual SFT showing task interference.

In "Vanilla" SFT, every parameter is eligible for an update. This often leads to destructive interference: the weight changes needed to solve a calculus problem might overwrite the patterns the model needs to write Python code. Previous attempts to fix this, like randomly freezing half the model or using task vectors, often fail to capture the nuanced relationships—some tasks are synergistic (like math and code), while others are fundamentally contradictory (like strict logic and heuristic-based commonsense).

Methods

The authors propose a two-step framework:

  1. Delta-Scale Row (DSR) Analysis: This is a diagnostic tool used to find the "intrinsic weights" of a task. By comparing a base model to a version fine-tuned on a single task (e.g., math), the researchers measure the sensitivity of each row in the weight matrices. They discovered that specific reasoning tasks rely on "exclusive" rows that don't change much for other tasks.
  2. Differential SFT (DiFT): Once the critical rows for each task are identified, the training becomes "surgical":
  3. In Mix-up SFT: The model only updates the union of the critical parameters for all involved tasks, freezing the rest to prevent general performance decay.
  4. In Continual SFT: When moving from Task A to Task B, the model freezes the parameters essential to Task A. It only learns Task B using the remaining "available" parameters or those specific to the new task.

This approach is architecture-agnostic and works by identifying "implicit experts" already residing within the dense layers of the LLM.

Datasets

The researchers used a variety of high-quality reasoning datasets for training and evaluation:

  • Training: MathInstruct, Code Bagel Hermes, LogiCoT (Logic Chain-of-Thought), and CommonsenseQA. They sampled 20,000 items per task.
  • Evaluation Benchmarks:
    • GSM8k (Grade school math)
    • xGLUE (Coding/Programming)
    • LogiQA2 (Logical reasoning)
    • CSQA (Commonsense reasoning)
    • MMLU (General multi-task knowledge)

Key Insights and Ideas

  • The "Expert" Row Discovery: LLMs aren't just a homogenous "soup" of weights. Reasoning capabilities are surprisingly localized. For example, the authors found that math and logic tasks often rely on the same rows, while coding tasks activate entirely different parts of the MLP (Multi-Layer Perceptron) layers.
Task-specific parameter activation rows for math, code, and logic tasks.
  • Synergy vs. Conflict: Math and Code are "synergistic"—training on both together often yields better results than training on either alone. Conversely, Logic and Commonsense are "conflicting," likely because logic requires strict adherence to rules while commonsense relies on fuzzy heuristics.
  • Format vs. Ability: In continual learning, the authors noted that "catastrophic forgetting" is sometimes a format issue. The model might still know how to solve the math problem but forgets it's supposed to provide a step-by-step "Chain-of-Thought" response because the subsequent logic training used a different output style.

Key Results

DiFT consistently outperformed vanilla SFT and established baselines (like HFT and LoTA) across Llama3-8B, Mistral-7B, and Qwen2.5 models.

  • Performance Boost: In Mix-up experiments on Llama3-8B, DiFT achieved an Average Target Accuracy (ATA) of 60.35, surpassing the vanilla mix-up score of 59.80.
  • Mitigating Forgetting: In Continual SFT (Math $\rightarrow$ Code), DiFT maintained a GSM8k score of 46.32, whereas vanilla SFT saw it drop to 44.35.
  • Efficiency: Remarkably, DiFT achieves these gains by tuning only about 3.7% of the model's total parameters.
  • Scaling Law: The benefits of DiFT became even more pronounced as the model size increased from 3B to 14B parameters, suggesting the method is highly scalable.

Limitations and Future Work

  • Theoretical Proof: While empirically successful, there is currently no formal mathematical proof explaining why reasoning tasks localize to specific rows.
  • Model Scale: The study focused on models up to 14B parameters. The authors note that testing on "frontier" models (30B+) is necessary to confirm the findings hold at the highest scales.
  • Mixture-of-Experts (MoE): Applying DiFT to MoE models (like DeepSeek or Mixtral) is challenging because their "routing" mechanism is inherently unstable during training, making it hard to pin down which parameters are truly "critical" for a task. The authors suggest this as a primary direction for future research.

Summary updated

BibTeX
@inproceedings{yuan2026differential,
  author = {Xiaosong Yuan and Chen Shen and Shaotian Yan and kaiyuan liu and Xiaofeng Zhang and Sinan Fan and Liang Xie and Wenxiao Wang and Renchu Guan and Ying Wang and Jieping Ye},
  title = {{Differential Fine-Tuning Large Language Models Towards Better Diverse Reasoning Abilities}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=aIhn4GhTBW},
}
Figure