Pushing the Error Frontier: Recursive Self-Improvement of Long-Horizon Agents via Frontier-Aligned Self-Distillation

Yuyang Hu, Yashu Liu, Tong Zhao, Xuanyu Zhou, Hongjin Qian, Jiajie Jin, Ling Huang, Zhicheng DouarXiv 2026

TL;DR

LLM agents tackling multi-step tasks tend to cruise through early steps like a seasoned pro before derailing at a specific bottleneck later on. Instead of coaching the agent everywhere or just grading its final outcome, FrontierSD pinpoints the exact step where reliability breaks down—the "error frontier"—and lets the agent write and distill its own hindsight rule right at that spot. As the agent masters one bottleneck, the frontier naturally shifts forward in a recursive self-improvement loop, yielding major gains without needing any external hints at test time.

What Problem Does This Paper Address?

Imagine playing a multi-level video game: you breeze through Stage 1, get tripped up at the Stage 2 boss, and never even see Stage 3. LLM agents handling long-horizon tasks (like web shopping or household navigation) behave much the same way. They reliably search and open product pages, then suddenly go off the rails when checking color attributes.

Figure 2: ALFWorld diagnostics with base Qwen3-1.7B (15 tasks). (a) Each curve is one failed trajectory; success is the fraction of 16 continuations that finish from a replayed prefix within a 50-action total budget. (b) Normalized action-token Jensen–Shannon divergence under a successful-trajectory ref- erence, aligned to the largest success-drop interval. Shading: interquartile range. Protocol: Appendix B.2.

How we currently train these agents leaves an awkward gap:

  • Outcome-based RL (like Group Relative Policy Optimization, or GRPO) only hands out a pass/fail grade at the end of an episode. It tells the agent that it failed, not where or how to fix it.
  • On-Policy Distillation (OPD) provides dense, step-by-step feedback from a teacher with privileged context. However, coaching the agent across the entire rollout wastes effort on early steps it has already mastered and risks confusing later steps where a specific piece of advice is no longer relevant.
Comparison of outcome-only GRPO, trajectory-wide OP(S)D, and localized FrontierSD.

The authors define the error frontier: the moving boundary separating a mastered prefix (steps executed reliably) from an unmastered suffix (where progress breaks down). The goal is to focus supervision right at this boundary and advance it as the agent improves.

Methods

FrontierSD combines standard full-trajectory GRPO with localized self-distillation using a single model. After a brief supervised fine-tuning (SFT) warm-up using GLM-5.3 labels to teach the format of rule extraction, the same agent acts, diagnoses, teaches, and learns across three stages:

  • WHERE (Locate): Sampling alternative actions at every step is too expensive. FrontierSD uses a cheap recall-and-rerank trick: it first grabs the 5 decisions with the highest action-token entropy, then draws 8 alternative responses at each candidate state without stepping the environment. If an alternative action gets more votes than the action actually taken (and at least 3 votes), that spot becomes the estimated error frontier $\widehat{F}$.
  • WHAT (Guide): Looking at the prefix, the next few steps around $\widehat{F}$, and the final outcome, the agent writes a short, reusable hindsight rule $z$ (e.g., "If selecting options, check the requested color first").
  • HOW (Internalize): Using the exact same parameters $\theta$, the model scores its original response tokens twice: once unguided (student $p$) and once conditioned on rule $z$ with stopped gradients (teacher $q^z$), minimizing forward KL divergence between them. Crucially, the rule's actual influence—measured via Jensen–Shannon divergence between $q^z$ and $p$—controls both the distillation weight and when teaching stops (closing the window after two consecutive low-influence steps).

In the next round, the updated policy rolls out fresh trajectories, relocalizes its new bottlenecks, and writes new rules—forming a recursive self-improvement loop. At test time, all guidance is removed.

Datasets

No new benchmarks are introduced. The authors train and evaluate Qwen3-1.7B and Qwen3-4B across four existing interactive environments:

  • WebShop: Online product search, attribute checking, and purchasing.
  • ALFWorld: Text-based household instruction following, evaluated on both seen (140 tasks) and unseen (134 tasks) splits across six categories.
  • MiniHack: Grid-based navigation and object interaction.
  • ScienceWorld: Interactive scientific reasoning and experimentation.

Key Insights and Ideas

  • Entropy alone isn't enough to find mistakes: High token entropy might just mean the agent is choosing between two equally valid paths. Checking sampled action support distinguishes genuine errors (where the policy itself prefers a different command upon reflection) from benign uncertainty.
  • Rules have an expiration date: A hindsight rule crafted to fix step 4 can become noisy distraction by step 12. Dynamically gating and stopping distillation via Jensen–Shannon divergence ensures supervision lasts only while the rule actually changes the model's mind.
  • You can watch the mastered prefix grow: Across training rounds, selected teaching positions shift deeper into trajectories in 7 out of 8 settings, while the rate at which guidance is triggered drops (e.g., falling from ~75% to 34% on WebShop 4B). The agent literally pushes its own error frontier forward.

Key Results

Evaluated completely without guidance at test time, FrontierSD consistently outperforms prompting, outcome-only GRPO, and trajectory-wide self-distillation baselines (like OCSD and SDAR):

  • ALFWorld: Qwen3-4B achieves 93.6% success on seen tasks (+10.8 percentage points over the strongest baseline, OCSD, with 100% on Pick and Heat) and transfers cleanly to unseen tasks at 91.8% (+15.7 points over GRPO). Qwen3-1.7B jumps to 72.1% seen (+16.6 points over OCSD).
  • WebShop & MiniHack: For 4B, WebShop success reaches 78.0% (+4.3 points over OCSD) and MiniHack hits 88.0% (+7.0 points).
  • ScienceWorld: 4B achieves the highest overall score (33.4 vs. SDAR's 23.0), while 1.7B ties OCSD for top success rate (29.4%).
  • Ablations (1.7B):Replacing frontier localization with random or first-step placement drops WebShop success by 13.6 and 12.0 points, respectively, proving that where you teach matters just as much as how.

Limitations and Future Work

The authors do not include a dedicated limitations or future work section in the main text, though a few practical constraints are explicitly noted in their analysis:

  • Extra training-time compute: Compared to standard GRPO, FrontierSD requires up to 40 short model generations per trajectory for localization, plus rule generation and paired student-teacher forward passes (though it avoids expensive environment branching).
  • External initialization: While the RL loop is self-improving, rule extraction still relies on an initial SFT warm-up using external frontier-model labels (GLM-5.3) and permitted training signals (such as ALFWorld PDDL success conditions).
  • Scale-dependent bottlenecks: On demanding scientific reasoning tasks like ScienceWorld, guidance trigger rates actually rise during training even as frontiers move later, suggesting smaller backbones continuously uncover tough new bottlenecks as they advance.

Summary updated

BibTeX
@misc{hu2026pushing,
  author = {Yuyang Hu and Yashu Liu and Tong Zhao and Xuanyu Zhou and Hongjin Qian and Jiajie Jin and Ling Huang and Zhicheng Dou},
  title = {{Pushing the Error Frontier: Recursive Self-Improvement of Long-Horizon Agents via Frontier-Aligned Self-Distillation}},
  year = {2026},
  eprint = {2611.40408},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.40408},
}
Figure