TL;DR
Post-training large language models (LLMs) with reinforcement learning typically relies on sparse, binary rewards (like pass/fail), creating a severe credit-assignment bottleneck. This paper introduces Self-Distillation Policy Optimization (SDPO), a novel method that leverages rich textual feedback (e.g., compiler errors) by using the model itself as an in-context "self-teacher" to provide dense, token-level guidance. SDPO significantly improves sample efficiency and final accuracy across coding and reasoning tasks while producing substantially more concise reasoning paths.
What Problem Does This Paper Address?
Post-training LLMs for complex tasks like math and coding often relies on Reinforcement Learning with Verifiable Rewards (RLVR), using algorithms like Group Relative Policy Optimization (GRPO). However, these methods suffer from an information bottleneck: they typically learn from a single scalar outcome per attempt (e.g., a 1 if code passes all unit tests, 0 if it fails).
This sparse reward makes credit assignment incredibly difficult. If a 1,000-token code block fails due to a single syntax error, a scalar reward cannot tell the model where it went wrong. While environments often provide rich textual feedback—such as runtime errors, compiler logs, or test summaries—standard RL algorithms discard this data. The authors formalize a new paradigm called Reinforcement Learning with Rich Feedback (RLRF) to break this bottleneck without needing expensive external teacher models.
Methods
The authors introduce Self-Distillation Policy Optimization (SDPO), an on-policy algorithm that converts tokenized environment feedback into dense learning signals via the following loop:
- Rollout: The current student policy generates an initial attempt.
- Feedback: The environment evaluates the attempt and returns rich tokenized feedback (e.g., a LeetCode error message).
- Self-Teaching: The same model is prompted with the question and the feedback to act as a self-teacher. Instead of sampling a brand-new response, the self-teacher re-evaluates the log-probabilities of the student's original attempt in hindsight. Because it has access to the feedback in-context, its next-token distribution shifts to reflect where the student made mistakes.
- Distillation: The model minimizes a logit-level distillation loss (using KL or Jensen-Shannon divergence) to match the student's next-token distribution to the self-teacher's feedback-informed distribution.
To ensure stability and efficiency, SDPO incorporates:
- Teacher Regularization: Employs an Exponential Moving Average (EMA) of the student's parameters or a trust-region constraint to prevent the self-teacher from shifting too rapidly and causing training divergence.
- Top-K Distillation: To avoid massive GPU memory overhead from storing full vocabulary logits, the distillation loss is approximated using only the top-K most likely tokens.
Datasets
The authors evaluate SDPO across three distinct online RL settings using the following benchmarks:
- LiveCodeBench v6 (LCBv6): 131 contest-style competitive programming problems released between February and May 2025, utilizing LeetCode-style execution feedback.
- SciKnowEval (L3 reasoning subsets): Undergraduate-level scientific reasoning tasks covering Chemistry, Physics, Biology, and Materials Science.
- ToolAlpaca: A tool-use dataset mapping API specifications and user requests to correct tool calls.
Key Insights and Ideas
- Self-Correction is an Emergent Property of Scale: SDPO relies entirely on the model's in-context learning (ICL) capability to act as its own teacher. The authors found that SDPO significantly outperforms baselines on larger models (like Qwen3-8B) but can underperform on very small models (like Qwen2.5-1.5B) that lack strong ICL capabilities.
- Effective Reasoning Need Not Be Verbose: While recent RL trends scale up performance by encouraging massive, verbose "thinking traces," SDPO actually shortens generations. Because it provides dense, token-level credit assignment, it penalizes filler words ("Hmm", "Wait") and circular logic loops.
- Rich Feedback Can Be Simulated: Even in standard environments that only provide scalar rewards, SDPO can still be applied. In these cases, successful rollouts from other attempts within the same batch are treated as "implicit feedback" for the failed attempts.
Key Results
- LiveCodeBench Performance: On LCBv6 with Qwen3-8B, SDPO achieved a final validation accuracy of 48.8%, substantially outperforming GRPO (41.2%) and even beating top frontier instruct models like Claude 3.5 Sonnet (40.5%) on this subset. Notably, it reached GRPO's final accuracy 4× faster in terms of generations.
- Conciseness and Speedup: On the SciKnowEval Chemistry task using Olmo3-7B-Instruct, SDPO delivered a 6× wall-clock training speedup and an 11× reduction in response length compared to GRPO, proving that dense credit assignment yields highly efficient reasoning paths.
- Test-Time Acceleration: When applied to individual difficult questions at test time (Test-Time Self-Distillation), SDPO accelerated the discovery of solutions by 3× compared to best-of-k sampling or multi-turn conversations.
Limitations and Future Work
- Base Model Dependency: SDPO is bottlenecked by the base model's initial capability ceiling. If a model cannot understand or act on feedback in-context, self-distillation fails.
- Feedback Quality: The method assumes the environment provides accurate, informative feedback. Misleading or uninformative feedback will degrade learning.
- Computational Overhead: Computing the log-probabilities for the retrospective self-teacher adds a small computational cost per step (around 5% to 17% depending on the environment setup), though this is heavily offset by the massive gains in sample efficiency.
- Future Directions: The authors suggest extending RLRF to long-horizon agentic environments, exploring training dynamics on frontier models at scale, and applying the framework to open-ended text generation tasks that lack ground-truth verifiers.
Summary updated