Beyond Imitation: Reflective On-Policy Self-Distillation for LLM Reasoning

Ziqi Zhao, Xinyu Ma, Liu Yang, Yujie Feng, Daiting Shi +4 more
5/27/2026
16 citations
cs.CLcs.LG
distillation

Official code: ZiqiZhao1/ROSD (44 stars, Python, Apache-2.0, last commit 2026-05-28).

Abstract

On-policy self-distillation (OPSD) improves the reasoning capabilities of large language models (LLMs) by providing dense token-level supervision for on-policy rollouts. However, existing OPSD methods often yield limited gains on complex reasoning tasks and suffer from severe training instability.

Show full abstract

We identify two key causes: conditioning the self-teacher on a complete verified solution encourages imitation of complete reference trajectories rather than extraction of transferable reasoning insights, while indiscriminate full-response distillation imposes superfluous supervision on already-valid reasoning prefixes. Together, these issues suppress reasoning diversity and contribute to late-stage mode collapse. We propose Reflective On-policy Self-Distillation (ROSD), which distills transferable reasoning insights rather than complete reference trajectories. For each erroneous rollout, a self-reflector contrasts it with a correct rollout from the same group to derive a corrective idea and identify the sentence containing the first reasoning error. The corrective idea provides the self-teacher with targeted guidance, while the diagnosed error boundary allows ROSD to mask out the distillation loss over the valid prefix and apply token-level distillation only from the first erroneous sentence onward. Experiments across multiple reasoning benchmarks and model backbones show that ROSD consistently outperforms standard OPSD and reinforcement learning baselines, better preserves reasoning diversity, stabilizes training, and mitigates late-stage mode collapse. Code is available at https://github.com/ZiqiZhao1/ROSD.

View on arXivView PDF

Code Implementations(1)

ZiqiZhao1/ROSDOfficial100%
Apache-2.0
440Python, ShellMay 27, 20266 months agoApache-2.0

Similar Papers

Cite this paper

@article{zhao2026beyond,
  title  = {Beyond Imitation: Reflective On-Policy Self-Distillation for LLM Reasoning},
  author = {Ziqi Zhao and Xinyu Ma and Liu Yang and Yujie Feng and Daiting Shi and Jingzhou He and Xin Xin and Zhaochun Ren and Xiao-Ming Wu},
  year   = {2026},
  eprint = {2605.28014},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.28014v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.28014.svg)](https://codeofpaper.com/paper/2605.28014)

Discussion