Table of Contents
Fetching ...

Towards On-Policy SFT: Distribution Discriminant Theory and its Applications in LLM Training

Miaosen Zhang, Yishan Liu, Shuxia Lin, Xu Yang, Qi Dai, Chong Luo, Weihao Jiang, Peng Hou, Anxiang Zeng, Xin Geng, Baining Guo

TL;DR

The paper introduces Distribution Discriminant Theory (DDT) to quantify when data align with a language model’s own distribution and uses this to bridge supervised fine-tuning (SFT) and reinforcement-learning-based generalization. It proposes two practical methods: In-Distribution Finetuning (IDFT), which reweights the SFT loss using a center-log-likelihood criterion, and Hinted Decoding, which realigns training data to the model’s distribution through entropy-aware decoding with two interacting streams. The key contributions are the theoretical development of the SNR-optimized Centered Log-Likelihood (CLL) criterion, the adaptive loss formulation L_IDFT with dynamic gradient scaling, and the data-level Hinted Decoding approach that preserves model distribution while improving correctness and style. Empirically, IDFT and Hinted Decoding deliver generalization performance on par with prominent offline RL methods (e.g., DPO, SimPO) on math and reasoning benchmarks while maintaining SFT efficiency and data efficiency, making them practical for domains where RL is infeasible. The work offers a principled, distribution-centric alternative to RL-based fine-tuning and establishes a foundation for integrating on-policy methods with scalable SFT pipelines.

Abstract

Supervised fine-tuning (SFT) is computationally efficient but often yields inferior generalization compared to reinforcement learning (RL). This gap is primarily driven by RL's use of on-policy data. We propose a framework to bridge this chasm by enabling On-Policy SFT. We first present \textbf{\textit{Distribution Discriminant Theory (DDT)}}, which explains and quantifies the alignment between data and the model-induced distribution. Leveraging DDT, we introduce two complementary techniques: (i) \textbf{\textit{In-Distribution Finetuning (IDFT)}}, a loss-level method to enhance generalization ability of SFT, and (ii) \textbf{\textit{Hinted Decoding}}, a data-level technique that can re-align the training corpus to the model's distribution. Extensive experiments demonstrate that our framework achieves generalization performance on par with prominent offline RL algorithms, including DPO and SimPO, while maintaining the efficiency of an SFT pipeline. The proposed framework thus offers a practical alternative in domains where RL is infeasible. We open-source the code here: https://github.com/zhangmiaosen2000/Towards-On-Policy-SFT

Towards On-Policy SFT: Distribution Discriminant Theory and its Applications in LLM Training

TL;DR

The paper introduces Distribution Discriminant Theory (DDT) to quantify when data align with a language model’s own distribution and uses this to bridge supervised fine-tuning (SFT) and reinforcement-learning-based generalization. It proposes two practical methods: In-Distribution Finetuning (IDFT), which reweights the SFT loss using a center-log-likelihood criterion, and Hinted Decoding, which realigns training data to the model’s distribution through entropy-aware decoding with two interacting streams. The key contributions are the theoretical development of the SNR-optimized Centered Log-Likelihood (CLL) criterion, the adaptive loss formulation L_IDFT with dynamic gradient scaling, and the data-level Hinted Decoding approach that preserves model distribution while improving correctness and style. Empirically, IDFT and Hinted Decoding deliver generalization performance on par with prominent offline RL methods (e.g., DPO, SimPO) on math and reasoning benchmarks while maintaining SFT efficiency and data efficiency, making them practical for domains where RL is infeasible. The work offers a principled, distribution-centric alternative to RL-based fine-tuning and establishes a foundation for integrating on-policy methods with scalable SFT pipelines.

Abstract

Supervised fine-tuning (SFT) is computationally efficient but often yields inferior generalization compared to reinforcement learning (RL). This gap is primarily driven by RL's use of on-policy data. We propose a framework to bridge this chasm by enabling On-Policy SFT. We first present \textbf{\textit{Distribution Discriminant Theory (DDT)}}, which explains and quantifies the alignment between data and the model-induced distribution. Leveraging DDT, we introduce two complementary techniques: (i) \textbf{\textit{In-Distribution Finetuning (IDFT)}}, a loss-level method to enhance generalization ability of SFT, and (ii) \textbf{\textit{Hinted Decoding}}, a data-level technique that can re-align the training corpus to the model's distribution. Extensive experiments demonstrate that our framework achieves generalization performance on par with prominent offline RL algorithms, including DPO and SimPO, while maintaining the efficiency of an SFT pipeline. The proposed framework thus offers a practical alternative in domains where RL is infeasible. We open-source the code here: https://github.com/zhangmiaosen2000/Towards-On-Policy-SFT
Paper Structure (66 sections, 8 theorems, 168 equations, 12 figures, 8 tables)

This paper contains 66 sections, 8 theorems, 168 equations, 12 figures, 8 tables.

Key Result

Theorem 2.3

Given the context of using a statistic $S$ to distinguish $\mathcal{H}_0$ from $\mathcal{H}_1$, Consider the operator family $\mathcal{J} = \left\{\log p(x) + \mathcal{C}[p] | p\in\Omega, \mathcal{C}: \Omega \mapsto R\right\}$, where $p$ is a probability density and $\mathcal{C}$ is a real-valued fu

Figures (12)

  • Figure 1: Intuitive understanding of SNR.
  • Figure 2: Empirical validation of the theory with multiple advanced LLMs and data types. More results in Appendix \ref{['sec:ddt-very']}.
  • Figure 3: A simple illustration of why the criterion keeps stably high when data is sampled with model's distribution. The yellow star represents the temperature sampled token.
  • Figure 4: Visualization of the statistic of tokens of dataset and model's rollouts (a & b), inspired by diao2026entropy. The illustration of the core effects of IDFT (c).
  • Figure 5: Comparison of different data. Question picked from Numina-Math. Hinted decoded response keeps the model's styling (e.g., markdown style) while remaining the correct answer. More case study can be found in Appendix \ref{['sec:case-study']}.
  • ...and 7 more figures

Theorems & Definitions (10)

  • Remark 2.2
  • Theorem 2.3
  • Corollary 2.4
  • Definition 2.5: SNR-Optimal Distribution Criterion
  • Proposition 2.6: Martingale Property under $\mathcal{H}_0$
  • Proposition 2.7: Negative Drift under $\mathcal{H}_1$
  • Proposition 2.8: Error Bound of $S_n$
  • Proposition 1.1
  • Proposition 1.2
  • Theorem 1.3: Tail Bound for IDFT