OPSRD: On-Policy Self-Role Distillation

Weijie Ren, Yanwen Zhang, Hao Li, Zhuolin Qi, Hengyi Zhang +1 more
9/30/2026
cs.CLcs.AIcs.LG
distillation

Official code: zhansan114514/OPSRD (3 stars, Python, last commit 2026-09-30).

Abstract

Role prompting elicits specialized behavior from large language models through an expert identity, offering a lightweight way to guide reasoning on demanding tasks. However, evaluating or distilling complete role-prompted answers can miss useful next-token preferences when the sampled solution remains incorrect.

Show full abstract

Transferring these preferences also requires an objective that reaches alternatives the student rarely predicts. We introduce OPSRD, which uses a fixed expert role as privileged teaching context for on-policy self-distillation without reference solutions. A role-free student generates a trajectory, and a frozen instance of the same base model supplies role-conditioned distributions on its exact prefixes, exposing alternatives beyond the sampled continuation. Teacher-weighted forward KL targets alternatives the student underestimates, with clipping to limit individual vocabulary contributions. Supervision is restricted to the highest-entropy half of student positions, concentrating learning where predictions are uncertain. Experiments on three competition-math benchmarks with Qwen3-1.7B, 4B, and 8B show improvements over the base models without role prompts at inference. Forward KL achieves the highest macro-averaged accuracy among the three evaluated divergences at every scale. Code is available at https://github.com/zhansan114514/OPSRD.

View on arXivView PDF

Code Implementations(1)

Official research code for OPSRD: On-Policy Self-Role Distillation, an improvement to OPSD.

30Python, ShellSep 30, 20262 months ago

Similar Papers

Cite this paper

@article{ren2026opsrd,
  title  = {OPSRD: On-Policy Self-Role Distillation},
  author = {Weijie Ren and Yanwen Zhang and Hao Li and Zhuolin Qi and Hengyi Zhang and Naibo Wang},
  year   = {2026},
  eprint = {2609.39884},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.39884v1}
}

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/2609.39884.svg)](https://codeofpaper.com/paper/2609.39884)

Discussion