Command Palette
Search for a command to run...
SEED: SELBSTENTWICKELNDE ON-POLICY-DESTILLATION FÜR AGENTISCHES REINFORCEMENT LEARNING
SEED: SELBSTENTWICKELNDE ON-POLICY-DESTILLATION FÜR AGENTISCHES REINFORCEMENT LEARNING
Zusammenfassung
Große Sprachmodelle werden zunehmend als interaktive Agenten für langfristige Aufgaben trainiert, die mehrstufige Interaktion, Werkzeugnutzung und Umgebungsfeedback umfassen. Ergebnisbasiertes Reinforcement Learning (RL) bietet ein praktisches Optimierungsparadigma, aber seine spärlichen Belohnungen auf Trajektorienebene liefern nur begrenzte Anleitung für Zwischenentscheidungen und hinterlassen eine Überwachungslücke zwischen episodenbezogenen Ergebnissen und tokenbasiertem Richtlinienlernen. Wir schlagen SEED (SElf-Evolving On-Policy Distillation) vor, ein selbstentwickelndes Framework, das abgeschlossene On-Policy-Trajektorien in rückblickende Fertigkeiten zur Trainingszeit umwandelt und deren Verhaltenseffekt zurück in das Richtlinienmodell destilliert. SEED verfeinert zunächst die Richtlinie, um abgeschlossene Trajektorien zu analysieren und natürlichsprachliche Fertigkeiten zu generieren, die wiederverwendbare Arbeitsabläufe, entscheidende Beobachtungen oder Regeln zur Fehlervermeidung erfassen. Während des RL sammelt die aktuelle Richtlinie sowohl Trajektorien als auch dient sie als Analysator, der daraus rückblickende Fertigkeiten extrahiert. Richtlinienaktualisierungen verbessern daher die nachfolgende Entscheidungsfindung und die Fertigkeitsanalyse gemeinsam, sodass sich die rückblickende Überwachung mit der Richtlinie weiterentwickelt. SEED bewertet dann die gesampelten Aktionen unter gewöhnlichen und fertigkeitserweiterten Kontexten neu und wandelt die fertigkeitsinduzierte Wahrscheinlichkeitsverschiebung in ein dichtes, tokenbasiertes On-Policy-Destillationssignal um. Dieses Signal wird gemeinsam mit dem ergebnisbasierten RL optimiert, wodurch die Hilfsüberwachung mit der aktuellen Trajektorienverteilung abgestimmt bleibt. Umfangreiche Experimente zu textbasierten und bildbasierten agentischen Aufgaben zeigen, dass SEED die Leistung und Stichprobeneffizienz konsistent verbessert und eine robuste Generalisierung auf unbekannte Szenarien aufweist.
One-sentence Summary
Tsinghua University, Zhejiang University, et al. propose SEED (SElf-Evolving On-Policy Distillation), a self-evolving framework that converts completed on-policy trajectories into natural-language hindsight skills and distills their behavioral effect into a dense token-level supervision signal jointly optimized with outcome-based reinforcement learning, thereby bridging the supervision gap and significantly improving performance and sample efficiency in agentic tasks.
Key Contributions
- SEED is a self-evolving on-policy distillation framework that transforms completed on-policy trajectories into hindsight skills and distills their behavioral guidance back into the policy, allowing decision-making and skill analysis to co-evolve during agentic reinforcement learning.
- A policy-synchronized hindsight on-policy distillation mechanism converts skill-induced log-probability shifts on sampled actions into dense token-level supervision and jointly optimizes this signal with outcome-based RL.
- Experiments on embodied interaction, web navigation, search-based QA, and visual reasoning and planning benchmarks show consistent improvements in task performance, sample efficiency, and robustness over representative baselines.
Introduction
Large language model agents increasingly operate in multi-turn settings where they must reason, act, use tools, and incorporate environmental feedback over long horizons. Reinforcement learning has become a key post-training paradigm for these agents because it directly optimizes policies against task-level outcomes. However, outcome-based RL provides only sparse, trajectory-level rewards: it signals whether an episode succeeded but cannot identify which intermediate decisions, tool calls, or observations were effective. This leaves a supervision gap between coarse episode outcomes and fine-grained token-level policy learning. Prior hindsight learning methods attempt to exploit completed trajectories for richer feedback, but they typically treat hindsight as static experience, external memory, or fixed inference-time prompts, which cannot adapt as the policy improves and encounters new states and failure modes.
The authors introduce SEED (SElf-Evolving On-Policy Distillation), a framework that converts completed on-policy trajectories into natural-language hindsight skills and distills their behavioral guidance back into the policy through a self-evolving training loop. During RL, the same model collects trajectories and analyzes them to extract reusable workflows, decisive observations, and failure-avoidance rules. Because the policy and the analyzer share the same checkpoint, both decision-making and hindsight supervision co-evolve. SEED then uses the extracted skills to rescore sampled actions under ordinary and skill-augmented contexts, producing a dense token-level on-policy distillation signal that is jointly optimized with the outcome-based RL objective. This allows the policy to internalize reusable guidance without external memory or extra inference-time prompts. Evaluations across embodied interaction, web navigation, search-based QA, and visual reasoning show consistent improvements in task performance, sample efficiency, and robustness.
Method
The authors present SEED, a self-evolving on-policy distillation (OPD) framework designed for agentic reinforcement learning. SEED is motivated by the observation that completed agent trajectories contain rich hindsight information. Even when rewards are sparse, a full trajectory often reveals useful behavioral patterns, failure causes, and reusable strategies that are not directly available at intermediate decision steps. SEED converts such hindsight information into hindsight skills and distills their behavioral effect back into the ordinary policy.
As shown in the figure below, SEED consists of two main training stages. First, hindsight-skill supervised fine-tuning (SFT) equips a single policy model to analyze completed trajectories. Second, the current policy snapshot both collects on-policy trajectories and analyzes them into hindsight skills. The same sampled actions are then re-scored under ordinary and skill-augmented contexts to construct a token-level OPD signal, which is optimized jointly with RL.
Problem Formulation The authors formulate long-horizon agentic tasks as partially observable Markov decision processes (S,A,O,T,Ω,R,γ). At timestep t, the agent receives an observation ot∈O and maintains an interaction history ht=(o0,a0,o1,a1,…,ot). The policy generates the next action according to at∼πθ(⋅∣ht). A completed trajectory is denoted by τ={(ot,at,rt)}t=0T−1, with an episode-level outcome R(τ)∈R. In many agentic environments, R(τ) is sparse and becomes available only after task completion. The standard reinforcement learning objective is J(θ)=Eτ∼πθ[R(τ)]. SEED bridges the granularity gap between trajectory-level feedback and token-level decisions by deriving an auxiliary training-time token-level signal from hindsight skills extracted after trajectory completion.
Hindsight Skill Supervised Fine-Tuning The first stage initializes the policy with the ability to analyze full interaction histories and express reusable behavioral guidance as natural-language hindsight skills. The authors first collect an offline pool of trajectories using a base policy without skill augmentation. For a set of training tasks Qsft={qj}j=1M, they run K0 rollouts with the base policy πθbase to form the offline trajectory pool B. Each trajectory contains the task description, observations, actions, rewards, and final outcome, collected without any hindsight skill in the decision context.
Given a completed trajectory τ, an external analyzer Aext produces a hindsight-skill annotation sτ=Aext(τ). For a successful trajectory, sτ captures reusable strategies or workflows, while for a failed trajectory, it encodes corrective or avoidance guidance. The annotation is retained only if it is correctly formatted, forming the accepted SFT set Dsft. The policy model is then fine-tuned to predict the hindsight skill from the completed trajectory using the standard negative log-likelihood objective: Lsft(θ)=−E(xτ,sτ)∼Dsft[∑ℓ=1∣sτ∣logπθ(sτ,ℓ∣xτ,sτ,<ℓ)] The resulting checkpoint θsft initializes the later RL policy. During RL, the trajectory analyzer is instantiated directly from the current policy checkpoint, allowing the same model to act in the environment and generate hindsight skills without a separately trained analyzer.
Self-Evolving On-Policy Distillation The second stage performs agentic RL with an additional token-level OPD signal. At the start of each update, SEED freezes the current policy as πθold. This snapshot collects trajectories and parameterizes the analyzer that extracts their hindsight skills. A trainable policy πθ, initialized from πθold, is then optimized with both the environment-driven RL and OPD objectives.
For each task prompt q, SEED samples a group of N trajectories using the frozen policy: Gq={τq(1),τq(2),…,τq(N)}. The analyzer agent, instantiated from the same policy snapshot πθold, analyzes each completed trajectory and generates a hindsight skill sq(n)=Aθold(xτq(n)). This shared parameterization creates the self-evolving loop, where refreshing θold changes both the trajectories encountered by the actor and the model capability used for skill analysis.
To construct the distillation objective, SEED keeps the original on-policy actions fixed and re-scores them under a skill-augmented context. Let H be a deterministic context augmentation function. At timestep t in trajectory τq(n), the skill-augmented history is h~q,n,t=H(hq,n,t,sq(n)). The same policy computes two token-level log-probabilities on the same sampled action tokens. The skill-conditioned teacher branch log-probability is obtained by re-scoring the sampled action under the skill-augmented history: ℓq,n,t,ℓskill=logπθ(aq,n,t,ℓ∣h~q,n,t,aq,n,t,<ℓ) The ordinary student branch log-probability under the original interaction history is: ℓq,n,t,ℓθ=logπθ(aq,n,t,ℓ∣hq,n,t,aq,n,t,<ℓ) The authors define the detached skill-induced log-probability shift Δq,n,t,ℓ=sg[ℓq,n,t,ℓskill−ℓq,n,t,ℓθ], where sg[⋅] denotes stop-gradient. This shift is mapped to a confidence gate gq,n,t,ℓ=σ(βopdΔq,n,t,ℓ). The OPD loss is defined as a confidence-gated sampled-token distillation objective: Lopd(θ)=Eq,n,t,ℓ[mq,n,t,ℓ⋅gq,n,t,ℓ⋅(sg[ℓq,n,t,ℓskill]−ℓq,n,t,ℓθ)] Because both the gate and the teacher log-probability are detached, minimizing this objective increases the ordinary policy's likelihood of teacher-endorsed on-policy tokens, internalizing the skill's behavioral effect.
In addition to OPD, SEED optimizes the policy with a group-relative RL objective. For each group Gq, the trajectory-level group-relative advantage is computed as Aq,nrl=(R(τq(n))−μq)/(σq+ϵ). The final training objective combines environment-driven agentic RL with hindsight-skill OPD: LSEED(θ)=Lrl(θ)+λopdLopd(θ) The updated policy then becomes πθold for the next iteration, closing the self-evolving loop. At inference time, the deployed agent acts only from the ordinary interaction history at∼πθ(⋅∣ht). All hindsight skills are used only as training-time guidance, meaning deployment requires no analyzer, no skill bank, no retrieval module, and no augmented decision prompt.
Experiment
SEED is evaluated on three long-horizon agentic benchmarks—ALFWorld, WebShop, and Search-based QA—covering embodied control, web navigation, and tool-augmented question answering. Compared to outcome-only RL and static distillation baselines, SEED's dense token-level hindsight supervision from a self-evolving trajectory analyzer yields consistent improvements across all domains. Experiments show that internalizing skills through distillation is more effective than providing them as prompts, that the method accelerates convergence and reduces unproductive exploration, and that it achieves superior sample efficiency and generalization to unseen environments. Ablations confirm that each component—hindsight-skill SFT, self-evolving on-policy distillation, and on-policy skill extraction—is critical, with on-policy skills being the most important.
SEED substantially improves over outcome-only reinforcement learning by providing dense token-level hindsight supervision, with consistent gains across ALFWorld, Search-based QA, and WebShop. Internalizing skills into the policy yields better performance than supplying them as prompts during evaluation, and self-evolving distillation from the policy's own trajectories outperforms static distillation approaches. SEED outperforms GRPO and Skill-GRPO on all three long-horizon benchmarks, with especially large margins on ALFWorld and WebShop. Self-evolving hindsight distillation, which adapts to the policy's changing behavior, proves more effective than using a fixed skill library.
Ablation experiments on ALFWorld show that all three core components of SEED are essential for its strong average performance. The largest degradation comes from replacing on-policy skill distillation with a static offline library, which lowers the average by over 7 points. Removing hindsight-skill SFT or self-evolving OPD also causes substantial drops of around 5–6 points, confirming that initial trajectory analysis and continuous distillation from the evolving policy are both critical. Replacing on-policy skills with a static offline library causes the largest performance drop, reducing the average from 91.8 to 84.4. Removing hindsight-skill SFT decreases the average by 5.8 points, showing that initial trajectory-analysis capability provides an important foundation for self-evolution.
The evaluation uses three long-horizon benchmarks—ALFWorld, Search-based QA, and WebShop—to validate SEED’s dense token-level hindsight supervision and self-evolving skill distillation. Internalizing skills into the policy outperforms using them as prompts, and self-evolving distillation from the policy’s own trajectories surpasses static approaches. Ablation studies confirm that all three core components (on-policy skill distillation, hindsight-skill SFT, and self-evolving OPD) are essential, with the largest drop from replacing on-policy skills with a static library.