Reinforcement Learning via Self-Distillation
Jonas Hübotter, Frederike Lübeck, Lejs Behric, Anton Baumann, Marco Bagatella, Daniel Marta, Ido Hakimi, Idan Shenfeld, Thomas Kleine Buening, Carlos Guestrin, Andreas Krause
TL;DR
This work formalizes reinforcement learning with rich feedback (RLRF) and introduces Self-Distillation Policy Optimization (SDPO), where the current policy acts as a self-teacher conditioned on tokenized feedback to provide dense, per-token credit signals without external supervision. SDPO preserves on-policy exploration while distilling retrospective guidance, enabling faster learning and more concise reasoning across reasoning, tool use, and competitive-programming tasks, with gains growing as model strength increases. Beyond standard RLVR improvements, SDPO also boosts test-time discovery on hard binary-reward problems by compressing experience into model weights, achieving substantial speedups. The approach is scalable, largely drop-in for existing RLVR pipelines, and highlights a principled way to leverage in-context retrospection as a form of self-supervision for credit assignment in LLMs.
Abstract
Large language models are increasingly post-trained with reinforcement learning in verifiable domains such as code and math. Yet, current methods for reinforcement learning with verifiable rewards (RLVR) learn only from a scalar outcome reward per attempt, creating a severe credit-assignment bottleneck. Many verifiable environments actually provide rich textual feedback, such as runtime errors or judge evaluations, that explain why an attempt failed. We formalize this setting as reinforcement learning with rich feedback and introduce Self-Distillation Policy Optimization (SDPO), which converts tokenized feedback into a dense learning signal without any external teacher or explicit reward model. SDPO treats the current model conditioned on feedback as a self-teacher and distills its feedback-informed next-token predictions back into the policy. In this way, SDPO leverages the model's ability to retrospectively identify its own mistakes in-context. Across scientific reasoning, tool use, and competitive programming on LiveCodeBench v6, SDPO improves sample efficiency and final accuracy over strong RLVR baselines. Notably, SDPO also outperforms baselines in standard RLVR environments that only return scalar feedback by using successful rollouts as implicit feedback for failed attempts. Finally, applying SDPO to individual questions at test time accelerates discovery on difficult binary-reward tasks, achieving the same discovery probability as best-of-k sampling or multi-turn conversations with 3x fewer attempts.
