← Haoran Xu

Is On-Policy Self-Distillation Done Right?

Haoran Xu, Huidi Ma, Harsh Goel, Amy Zhang

The University of Texas at Austin/preprint

TILDA distills a mixture of the reference policy and its self-teacher. We find that, even with an ideal teacher (a model with strong in-context learning), on-policy self-distillation maximizes the log of the policy's success probability, which equals the solution of behavior-regularized reward maximization with regularization strength \(\beta\to0\). TILDA instead distills the solution with anchoring: every token keeps part of its probability under the reference policy, so the student keeps the reasoning and coverage that self-distillation collapses.

Does self-distillation make RLVR better?

Reinforcement learning with verifiable rewards (RLVR) has become the standard recipe for post-training reasoning models, but its learning signal is sparse. A response of 10k tokens receives the same one bit information from the verifier, and a group whose rollouts are all wrong gives no gradient at all.

On-policy self-distillation densifies this signal without an external teacher. In RLVR, given a successful rollout \(y^\star\) from the same group, the model re-prompted with \(y^\star\) as a correct solution becomes a self-teacher (SDPO), and every token of the student's own rollout is distilled toward it:

$$q_{y^\star}(a\mid s_t) = \mu\big(a \mid x\oplus y^\star,\ y_{<t}\big),\qquad \mathcal L_{\mathrm{distill}} = \mathbb E_{y\sim\pi}\Big[\textstyle\sum_t \mathrm{KL}\big(\pi(\cdot\mid s_t)\,\big\|\,\mathrm{sg}\,q_{y^\star}(\cdot\mid s_t)\big)\Big],$$

where \(s_t=(x,y_{<t})\) is the prefix and \(\mu\) is the reference policy, i.e., the copy of the model that the teacher is built from. It is an exponential moving average of the student with rate \(\eta\), which equals the base model at \(\eta=0\). In other words, every token receives its own target distribution, and neither a reward model nor an external teacher is needed.

The dense signal helps on many tasks: on SciKnowEval, for example, SDPO lifts Qwen3-4B from 17% to 60%. However, the gains are fragile on thinking models, whose reasoning traces are long.

Qwen3-8B-Thinking on math with a teacher that moves with the student, over 400 training steps. Left: SDPO's AIME 2024 accuracy falls from about 0.5 to almost zero, while GRPO stays above 0.6. Right: SDPO's responses shrink from about 10k to a few hundred tokens, while GRPO's stay above 6k.

The figure shows SDPO on Qwen3-8B-Thinking math with a teacher that moves with the student (\(\eta=0.05\)). Within 400 updates, its accuracy on AIME 2024 falls from 0.5 to almost zero and its responses shrink from 10k to a few hundred tokens, while GRPO stays above 0.6. Even with a frozen teacher, SDPO cuts the responses from 9k to 1k tokens within ten updates. Prior work reports the same symptoms: shorter reasoning (Kim et al., Peng et al.), less diversity (Nicolicioiu et al.), and degradation at long rollout budgets (Kaur et al.). Existing remedies patch the loss around the teacher or route part of the update back to the reward, which leaves a more basic question open.

Which objective does on-policy self-distillation optimize, and is it the right one?

What does SDPO actually optimize?

Let's first consider an "ideal" teacher: conditioning the reference policy on eventual success, which is the success posterior \(q_+\), i.e., how \(\mu\) would continue if we only kept the continuations that end up correct. With \(Q^\mu(s,a)\) the probability that \(\mu\) finishes successfully after token \(a\), and \(V^\mu(s)\) the same probability before \(a\) is chosen, Bayes' rule gives:

$$q_+(a\mid s) \;=\; \mu(a\mid s)\,\frac{Q^\mu(s,a)}{V^\mu(s)},$$

i.e., the reference policy reweighted by its own value.

How close is the prompted teacher to this ideal? At the level of the final answer, it is very close: 99.8% of its answers are correct, against 78% for the reference policy. Its answer distribution also almost matches exact samples of \(q_+\).1 We therefore assume a binary verifier and the ideal teacher \(q_{y^\star}=q_+\) from here on. The reverse KL to the teacher splits into a KL to \(\mu\) and a value term, so distilling the teacher solves:

$$\max_\pi\ \ \mathbb E_{a\sim\pi(\cdot|s)}\Big[\underbrace{\color{#5B2C8A}\log Q^\mu(s,a)}_{\text{reward}}\Big] \;-\; \mathrm{KL}\big(\pi(\cdot|s)\,\|\,\mu(\cdot|s)\big),$$

where \(V^\mu\) drops out because it does not depend on \(\pi\). In other words, self-distillation takes a KL-regularized RL step whose reward is the log of \(\mu\)'s own success probability, with a KL weight of 1.

The usual explanation of SDPO's failures points at the teacher, which has already seen a solution and therefore hesitates and reasons less. This is part of the story, but it does not explain why the student copies the bias in full, or why tuning the weight of the KL penalty barely helps. Here we claim that the reward explains both, since it is unbounded below:

The reward needs a floor anchor

A simple fix is to put a floor anchor under \(Q^\mu\) inside the log, while keeping everything else, including the KL weight of 1:

$$\max_\pi\ \ \mathbb E_{a\sim\pi(\cdot|s)}\Big[\log\big(\underbrace{\color{#5B2C8A}\varepsilon}_{\text{floor}} + (1-\varepsilon)\,Q^\mu(s,a)\big)\Big] \;-\; \mathrm{KL}\big(\pi(\cdot|s)\,\|\,\mu(\cdot|s)\big),$$

where \(\varepsilon\in[0,1)\) is the floor and SDPO is \(\varepsilon=0\). We consider floors of the form \(\varepsilon=e^{-1/\beta}\) with \(\beta>0\), and the next section shows that this form is not arbitrary. With any \(\varepsilon>0\), no token scores below \(\log\varepsilon=-1/\beta\), and the optimum reweights the reference policy by \(\varepsilon+(1-\varepsilon)\,Q^\mu\) instead of \(Q^\mu\).

Left: the score of a token against Q^mu on a log axis, with the KL weight fixed to 1. With a floor of e to the minus 1, minus 2 or minus 4, the score flattens at log epsilon; SDPO's log Q^mu falls without bound. Right: the fraction of mu's probability each token keeps at a prefix where mu succeeds 20% of the time. A token mu cannot finish keeps 74%, 44% or 9% with the three floors, and 0% under SDPO.

On the left, the score flattens at \(\log\varepsilon\) instead of falling to \(-\infty\). On the right, a token from which \(\mu\) cannot finish keeps part of its probability under every floor, and less of it as the floor gets lower, while SDPO removes it. In other words, the floor anchor down-weights such a token instead of removing it, which remains the coverage of the policy during training.

The floor \(e^{-1/\beta}\) recovers behavior-regularized RL

With \(\varepsilon=e^{-1/\beta}\), the floored objective has exactly the solution of behavior-regularized reward maximization, where the temperature \(\beta\) controls how far the new policy moves from \(\mu\):

$$\max_\pi\ \ \mathbb E_{y\sim\pi(\cdot|x)}\big[R(x,y)\big] \;-\; \beta\,\mathrm{KL}\big(\pi(\cdot|x)\,\|\,\mu(\cdot|x)\big).$$

The derivation takes four steps:

  1. The optimum is the exponential tilt \(\pi^\star(y|x)\propto\mu(y|x)\,e^{R(x,y)/\beta}\).
  2. Its next-token distribution is \(\pi^\star(a|s)\propto\mu(a|s)\,\mathbb E_\mu[e^{R/\beta}\mid s,a]\), i.e., choose \(a\), let \(\mu\) write the rest, and average \(e^{R/\beta}\).
  3. With a binary reward, this expectation is \((1-Q^\mu)+Q^\mu e^{1/\beta}\).
  4. Dividing by \(e^{1/\beta}\), which is the same for every token, gives \(\pi^\star(a|s)\propto\mu(a|s)\big(e^{-1/\beta}+(1-e^{-1/\beta})\,Q^\mu(s,a)\big)\), the optimum of the floored objective.

In other words, the floor anchor is the temperature, and the three curves in the figure above are \(\beta=1\), 0.5, and 0.25. A lower temperature lowers the floor, and SDPO, which has no floor, is the limit \(\beta\to0\). This is the picture at the top of this page. At \(\beta=\infty\), the target is the current model, and a finite \(\beta\) tilts it toward correct responses. As \(\beta\to0\), only the correct responses remain, which is the target that SDPO distills.

Note that SDPO's KL weight of 1 does not mean \(\beta=1\). Multiplying SDPO's objective by any \(\beta>0\) leaves its optimum unchanged, so the weight carries no temperature at all, and the temperature is set by the scale of the score instead. Behavior-regularized RL scores a token by its soft value \(\beta\log\big(1+(e^{1/\beta}-1)\,Q^\mu\big)\), which lies in \([0,1]\) like the reward itself, whereas SDPO's \(\log Q^\mu\) has no lower bound.

Self-distillation is doing reward maximization without behavior-regularization as the anchor.

Note also that the right target is built from the same \(Q^\mu\), so the problem with SDPO is not which policy evaluates the tokens, but the missing floor anchor.

Why GRPO can drop the anchor, but self-distillation cannot

Common sense says that \(\beta\to0\) should be harmless, since it is standard practice in RLVR: many GRPO recipes set the KL coefficient to zero, and DAPO removes the KL term entirely, without harm. The difference lies in what \(\mu\) is. In GRPO, \(\mu\) is the reference policy, i.e., the base model, which never changes, so the KL only pulls the policy back toward the base. The size of each update is controlled elsewhere, by the learning rate and by clipping the probability ratio to the previous policy, which keeps every step inside a trust region around the current policy. Dropping the KL removes the pull toward the base, but not the control on the step.

In self-distillation, \(\mu\) is the teacher's own policy, an exponential moving average that follows the student, and the ideal update distills the student toward the optimum of a problem anchored at \(\mu\):

$$\pi_{k+1} \;=\; \arg\max_\pi\ \mathbb E_{\pi}\big[R\big]\;-\;{\color{#5B2C8A}\beta}\,\mathrm{KL}\big(\pi\,\|\,\mu_k\big),\qquad \mu_k=\pi_{\bar\theta_k},\ \ \bar\theta_k=\text{EMA of }\theta_0,\dots,\theta_k,$$

which is mirror descent policy optimization with the anchor at a moving average of past iterates. Here the KL is not a regularizer next to the reward: \(1/\beta\) is the step size. Since the distillation loss pulls the student all the way to the target, there is no clipped ratio to fall back on, and \(\beta\to0\) is an infinite step at every update. The student jumps to the success-conditioned policy of the current teacher, the next teacher is built from that jump, and every error of the prompted teacher compounds.2

GRPO can drop its KL because clipping still bounds the step. In self-distillation, the KL to \(\mu\) is the step size.

TILDA: TILted self-Distillation with Anchoring

With the floor \(e^{-1/\beta}\), normalizing the optimum gives an arithmetic mixture at every prefix, \((1-\lambda_\beta(s))\,\mu+\lambda_\beta(s)\,q_+\), with weight \(\lambda_\beta(s)=cV^\mu(s)/(1+cV^\mu(s))\) and \(c=e^{1/\beta}-1\), which reaches SDPO's value of 1 only as \(\beta\to0\). However, neither \(q_+\) nor \(V^\mu(s)\) is available during training, so TILDA uses SDPO's prompted teacher in place of \(q_+\) and one constant \(\lambda\) in place of \(\lambda_\beta(s)\). TILDA then distills:

$$\hat\pi_\lambda(a\mid s_t) \;=\; (1-\lambda)\,\mu(a\mid s_t) \;+\; {\color{#5B2C8A}\lambda}\,q_{y^\star}(a\mid s_t),$$

where \(\mu\) is evaluated on the plain prompt and \(q_{y^\star}\) on the prompt with the solution, both without gradients. The loss is that of SDPO with this mixture as the target:

$$\mathcal L_{\mathrm{TILDA}}(\theta) \;=\; \mathbb E_{x,\;y\sim\pi_\theta(\cdot|x),\;y^\star}\Big[\textstyle\sum_t \mathrm{KL}\big(\pi_\theta(\cdot\mid s_t)\,\big\|\,\mathrm{sg}\,{\color{#5B2C8A}\hat\pi_\lambda}(\cdot\mid s_t)\big)\Big],$$

where \(y^\star\) is a successful response from the same group as \(y\), and prompts with no success contribute no loss. In the experiments, the KL is the same Jensen-Shannon divergence that SDPO uses, so TILDA and SDPO differ only in the target. Note that \(\lambda=1\) recovers SDPO exactly, and the only extra cost of TILDA is one forward pass for \(\mu\).

TILDA update
  1. For each prompt, sample a group of responses from \(\pi_\theta\) and score them with the verifier.
  2. Take a successful response \(y^\star\) from the group; prompts with no success contribute no loss.
  3. With the EMA parameters \(\bar\theta\) and no gradient, compute the teacher \(q_{y^\star}\) on \(x\oplus y^\star\) and the reference policy \(\mu\) on \(x\) at every token.
  4. Mix them in probability space with weight \(\lambda\), minimize the token-level divergence to the mixture, and move \(\bar\theta\) toward \(\theta\) at rate \(\eta\).

Does TILDA help thinking models?

Math avg@12 against optimizer updates for three models. TILDA ends at 77.8, 75.7 and 75.7 and lies above SDPO and GRPO from update 20 on. On Qwen3-8B-Thinking, SDPO starts near 35 and ends below the base model.

TILDA outperforms SDPO and GRPO on all 12 model and benchmark pairs, especially on math, where it improves SDPO by about 8 points on Qwen3-4B-Thinking and 5 points on Qwen3-8B-Thinking over three seeds. On science, where the answers are short, the gains are smaller, which suggests that the floor matters most when there is more reasoning to lose. The gain also does not depend on per-cell tuning: with one teacher rate per domain and \(\lambda\) selected on a held-out validation split, TILDA still outperforms SDPO in all six settings.

Math response length during training for three thinking models. SDPO collapses within the first updates; TILDA drops less, recovers, and stays above SDPO on every model. GRPO stays longest.

Since both methods use the same teacher, the gain comes from what the floor keeps. TILDA keeps longer responses than SDPO on all three models, nearly twice as long on Qwen3-8B-Thinking math at the end of training. It also matches or exceeds every baseline in pass@12 on all six math cells, so its higher accuracy does not come from a narrower policy.

How about simply adding a KL penalty?

The most natural way to stay closer to \(\mu\) is to add \(\mathrm{KL}(\pi_\theta\|\mu)\) to SDPO's loss. With the ideal teacher, however, this only raises the KL weight on the same log:

$$\min_\pi\ (1-\lambda)\,\mathrm{KL}(\pi\|\mu)+\lambda\,\mathrm{KL}(\pi\|q_+) \quad\Longleftrightarrow\quad \max_\pi\ \mathbb E_\pi\big[\log Q^\mu\big]-{\color{#5B2C8A}\tfrac{1}{\lambda}}\,\mathrm{KL}(\pi\|\mu),$$

whose optimum is \(\pi\propto\mu\,(Q^\mu)^{\lambda}\), the normalized geometric mixture that β-OPSD distills by mixing logits. A larger weight bends the curve, but the curve still starts at zero.

Left: the probability each token keeps relative to the current model, against its success chance. SDPO and SDPO with a KL penalty both go to zero for a token with success chance zero; TILDA keeps half of it. Right: math accuracy on Qwen3-4B-Thinking and Qwen3-8B-Thinking: 65 and 67 for SDPO, 70 and 70 with the best KL penalty, 78 and 76 for TILDA.

On the right, a penalty does help SDPO, but much less than the floor: with the best penalty weight, TILDA is still about 8 points higher on Qwen3-4B-Thinking and more than 5 points higher on Qwen3-8B-Thinking. In other words, staying closer to \(\mu\) is not enough: the score needs a floor anchor.

Summary

In this paper, we show that, even with an ideal teacher, on-policy self-distillation maximizes the log of the reference policy's success probability with a KL weight of 1, which is behavior-regularized RL at \(\beta\to0\). Since the reference policy moves with the student, this temperature is the step size of a mirror-descent update, so self-distillation cannot drop it as GRPO drops its KL. A floor of \(e^{-1/\beta}\) under the log recovers the exact optimum, an arithmetic mixture of the reference policy and the success posterior, and TILDA distills this mixture with one weight \(\lambda\).

We believe that TILDA represents a concrete step toward deriving self-distillation targets from the reward rather than from the teacher. One limitation is that our analysis treats the prompted teacher \(q_{y^\star}\) as the success posterior \(q_+\). The two agree on the final answer, but not necessarily on the reasoning that leads to it. One direction for future work is to close this gap, e.g., by conditioning the teacher on several successful rollouts instead of one.

  1. We check this on Qwen3-4B-Thinking-2507 with a frozen teacher, so the reference policy is the base model. For each of 256 DAPO training prompts, we sample 16 responses from the reference policy and keep the correct ones, which are exact samples of \(q_+\). On the 192 prompts with at least one success, we build the prompted teacher from the first success and sample 8 responses from it. Its answers are correct 99.8% of the time, against 78.0% for the reference policy, and the total variation between its answer distribution and that of \(q_+\) is 0.002, against 0.220 for the reference policy. Treating in-context conditioning on a success as conditioning on success is also the Bayesian view of in-context learning (Xie et al., 2022). ↩
  2. Another way to see the difference: a policy-gradient method such as GRPO only gives each update a direction, and a small step along it changes the policy only a little. Self-distillation instead gives each update a target distribution, which may be far from the current policy, and distillation moves the student all the way to it, so the target itself needs an anchor. This distributional view of on-policy distillation follows nrehiew's post on SFT, RL, and on-policy distillation. ↩

BibTeX

@article{xu2026tilda,
  title   = {Is On-Policy Self-Distillation Done Right?},
  author  = {Xu, Haoran and Ma, Huidi and Goel, Harsh and Zhang, Amy},
  journal = {arXiv preprint arXiv:XXXX.XXXXX},
  year    = {2026}
}

SDPO: Hübotter et al., arXiv 2026 · GRPO: Shao et al., arXiv 2024 · DAPO: Yu et al., arXiv 2025 · OPSD: Zhao et al., arXiv 2026 · On-policy distillation view: nrehiew, 2026 · MDPO: Tomar et al., ICLR 2022 · \(\beta\)-OPSD: Xu et al., arXiv 2026 · SciKnowEval: Feng et al., arXiv 2024 · Qwen3: Yang et al., arXiv 2025 · Olmo 3: Ai2, 2025