TL;DR
Post-training large language models (LLMs) usually requires choosing between efficient but rigid Supervised Fine-Tuning (SFT) and flexible but expensive Reinforcement Learning (RL). This paper introduces Anchored Supervised Fine-Tuning (ASFT), a method that mathematically bridges this gap by combining probability-based sample reweighting with lightweight KL regularization. ASFT prevents the distributional drift that plagues similar hybrid methods, delivering RL-like generalization performance at SFT-level computational efficiency.
What Problem Does This Paper Address?
Fine-tuning LLMs after their initial pre-training typically follows two paradigms: Supervised Fine-Tuning (SFT) or Reinforcement Learning (RL). SFT is computationally cheap and stable but prone to memorizing surface patterns rather than learning generalized strategies. RL generalizes much better by exploring and optimizing outcome-based rewards, but it is notoriously unstable, complex, and expensive to train.
Recently, Dynamic Fine-Tuning (DFT) attempted to find a middle ground by reweighting SFT objectives based on token probabilities, showing great success in math tasks. However, DFT is highly unstable in knowledge-intensive domains. The authors of this paper set out to understand why DFT works where it does, why it fails elsewhere, and how to fix its instability without losing its performance benefits.
Methods
The authors analyze DFT through the formal lens of the Reward-Weighted Regression (RWR) framework. They prove that DFT implicitly optimizes a strictly tighter lower bound on the RL objective than standard SFT. However, they uncover a critical flaw: DFT lacks "distributional anchoring." As training progresses, the model focuses on an increasingly narrow subset of high-probability trajectories, creating a feedback loop that leads to massive distributional drift and training instability.
To fix this, they propose Anchored Supervised Fine-Tuning (ASFT). ASFT adds a lightweight forward KL-divergence regularization term to the DFT objective:
$$\mathcal{L}_{ASFT}(\theta) = \mathcal{L}_{DFT}(\theta) + \lambda \mathbb{E}_s [D_{KL}(\pi_{base}(\cdot|s) \parallel \pi_\theta(\cdot|s))]$$
This anchors the model to a reference policy (typically the pretrained base model), creating a trust region that stabilizes training while preserving the tighter mathematical bound.
To address the memory overhead of keeping a reference model in GPU memory, they also introduce ASFT-LoRA. This variant uses low-rank adaptation parameter decomposition ($\Delta W = BA$) to compute the KL divergence using a single model instance, drastically reducing the hardware footprint.
Datasets
The authors validated ASFT across three distinct domains using established benchmarks:
- Mathematical Reasoning: Trained on 10k/30k/100k samples from NuminaMath CoT. Evaluated on Math500, Minerva Math, OlympiadBench, AIME 2024, and AMC 2023.
- Medical Knowledge: Trained on 10k/30k/100k samples from MedMCQA. Evaluated on MMLU-medical, MedQA, and the MedMCQA test set.
- Code Generation: Trained on 10k samples from Magicoder-Evol-Instruct-110K. Evaluated using the evalplus framework on HumanEval, HumanEval+, MBPP, and MBPP+.
Key Insights and Ideas
- SFT is secretly RL (but loose): The RWR framework proves that standard SFT implicitly maximizes a lower bound on the RL objective, but this bound loosens significantly as the model diverges from the reference data.
- The Tighter Bound Paradox: DFT achieves a strictly tighter lower bound than SFT, but because it lacks a mechanism to keep the model close to a reference distribution, it suffers from uncontrolled variance growth. This explains why DFT fails catastrophically on knowledge-intensive tasks (like medical QA) where substantial distribution shifts are required.
- Forward KL is Mode-Covering: The choice of forward KL divergence ($D_{KL}(P \parallel Q)$) rather than reverse KL is crucial. Forward KL forces the model to maintain the broad distribution of the base model (mode-covering), preventing it from collapsing onto a few high-probability sequences (mode-seeking).
- ASFT as a Supercharged RL Initializer: Beyond standalone performance, initializing an RL algorithm (like DAPO) with an ASFT-trained model yields significantly better final performance than initializing with standard SFT, showing that ASFT builds a fundamentally more stable policy foundation.
Key Results
- Stability Restored: As shown in Figure 1, DFT exhibits severe distributional drift (exploding KL divergence) and tanking accuracy on medical tasks, whereas ASFT maintains a stable KL value and superior accuracy.
- Medical Benchmarks: On 10k medical samples using LLaMA-2-7B, ASFT achieved an average score of 42.03%, outperforming standard SFT (33.44%) and completely reversing DFT's failure (25.97%). This performance is nearly on par with full RL methods like DAPO (42.25%) but at a fraction of the cost.
- Math Benchmarks: On 100k math samples using Qwen2.5-7B, ASFT scored an average of 30.50%, beating DFT (26.04%) and standard SFT (19.15%).
- Efficiency Gains: Full-parameter ASFT increases training time by ~23.7% over SFT due to the dual-model KL computation. However, ASFT-LoRA eliminates this overhead, reducing memory consumption from 88.02GB back down to 40.70GB (comparable to SFT) and cutting training time down to just 0.594 hours on a single NVIDIA A100 GPU, while retaining ~94% of full ASFT's performance gains.
Limitations and Future Work
- Domain Scope: While tested on math, medicine, and coding, a broader evaluation across more diverse tasks is needed to fully prove generalizability.
- Reliance on Priors: ASFT's success is still fundamentally tied to the prior knowledge embedded within the base model. If the base model lacks the underlying knowledge, anchoring to it provides less benefit.
- Capability Trade-offs: The paper lacks a systematic analysis of what specific capabilities or behaviors SFT might retain that ASFT loses during the reweighting process.
- Future Directions: The authors suggest extending ASFT to continual learning settings, where the anchoring mechanism could naturally prevent catastrophic forgetting when adapting models to sequential tasks.
Summary updated