AHEAD

Adaptive Hindsight with Environment-Augmented Distillation for Agentic RL

Not every step deserves the same feedback. AHEAD gives multi-turn agents step-aware supervision: grounded environment feedback everywhere, and an LLM corrective hint exactly where the agent went wrong.

Xiaolong Jin1,2,†·Dingmin Wang1·Vijay Lingam1·Varun Kumar1

1AWS AI Labs·2Purdue University

† Work done during an internship at Amazon.

Uniform PI versus AHEAD step-aware PI across a trajectory: existing methods apply the same signal at every step, while AHEAD adds environment feedback everywhere and LLM corrective hints on error steps.
The core idea. Uniform PI (top) vs AHEAD's step-aware PI (bottom): environment feedback on all steps, plus a corrective hint on error steps.
Highlights

Step-aware credit assignment, minimal changes to GRPO

Across ALFWorld, WebShop, and Search-based QA, and three model scales (Qwen2.5-3B/7B, Qwen3-1.7B).

+13.3
points on ALFWorld success at 7B over GRPO (+12.5 at 3B, +21.1 at 1.7B).
Main results
94.5%
ALFWorld success at 7B, ahead of SDAR (85.9), Skill-SD (85.1), RLSD (82.0).
Main results
+11.0
points on WebShop success at 7B over GRPO (+10.1 at 3B, +26.5 at 1.7B).
Main results
15 / 54
steps for AHEAD to match GRPO's full 54-step-budget success on the unseen split.
Step efficiency
0
extra inference cost: hints, the analyzer, and PI are used only during training.
Train-only
The key idea

Routine steps need confirmation. Error steps need direction.

Trajectory-level RL broadcasts one advantage to every token, and prior self-distillation injects the same privileged information (PI) at every step. Both ignore a basic asymmetry between step types.

Existing: uniform PI

Task-level PI (retrieved skills, reference answers) applied identically at every step. On an error step, environment feedback like "Nothing happens" only signals failure, with no direction on what to do instead.

AHEAD: step-aware PI

Environment feedback on all steps; on error steps an LLM corrective hint ("go to diningtable 1 first") adds the missing direction, a stronger signal exactly where it matters, with no explicit gating.

Abstract

What AHEAD does

Training multi-turn LLM agents with reinforcement learning typically relies on trajectory-level rewards, which assign a uniform advantage to every step and cannot identify which decisions led to success or failure. Self-distillation methods can provide finer-grained supervision by augmenting RL with privileged information. However, existing approaches usually apply the same type of privileged information to every step in an indistinguishable manner, ignoring a key asymmetry: routine steps need little additional guidance, while critical error steps require corrective direction that environment feedback alone cannot provide.

We propose AHEAD, a step-aware framework that matches different supervision sources to different step types. The teacher receives environment feedback on all steps as a grounded dense signal, and additionally receives LLM-generated corrective hints on error steps to supply the direction that environment feedback lacks. The method introduces minimal changes to the standard GRPO algorithm. Across ALFWorld, WebShop, and Search-based QA, and across three model scales, AHEAD raises task success (+13.3 on ALFWorld and +11.0 on WebShop at 7B over GRPO), reaches a given success rate in fewer training steps, and solves tasks within tighter interaction budgets than outcome-only RL and prior self-distillation baselines.

Method

How AHEAD works

See the main figure below for the full pipeline.

Overview of the AHEAD pipeline: on-policy rollouts split into successful trajectories that keep the vanilla GRPO advantage and failed trajectories that pass through LLM error analysis, step-aware PI construction, and self-distillation reweighting.
Figure 2. Overview of AHEAD. Stage 1 identifies error steps via an LLM analyzer. Stage 2 constructs step-aware PI: environment feedback for routine steps, feedback plus an LLM corrective hint for error steps. Stage 3 computes a token-level self-distillation signal $\delta_{t,\ell}$ and converts it into a bounded reweight of the GRPO advantage. Successful trajectories retain the vanilla GRPO advantage.
Stage 1

Find the error steps

An LLM analyzer reads each failed trajectory and marks the steps whose actions were critical errors: a wrong object, an invalid action, an unproductive query.

Stage 2

Build step-aware PI

Environment feedback is the base PI on every step. Error steps additionally get an LLM corrective hint, so they carry a naturally stronger signal, with no per-step coefficient or gate.

Stage 3

Distill & reweight

A token-level log-prob gap between the original and PI-augmented contexts becomes a bounded multiplicative reweight of the GRPO advantage that preserves the reward's sign.

The teacher–student log-probability gap measures how the PI revises each token:

$$\delta_{t,\ell} = \log \pi_{\theta_{\text{old}}}(y_{t,\ell}\mid \tilde{h}_t, y_{t,<\ell}) - \log \pi_{\theta_{\text{old}}}(y_{t,\ell}\mid h_t, y_{t,<\ell})$$

It becomes a sign-preserving reweight of the episode advantage, with a mixing weight $\lambda_k$ that decays $0.5 \to 0$ over training:

$$w_{t,\ell} = \text{clip}\!\big(\exp(\text{sgn}(A^{\text{ep}})\,\text{sg}(\delta_{t,\ell})),\; 1-\varepsilon,\; 1+\varepsilon\big), \qquad \tilde{A}_{t,\ell} = A^{\text{ep}}\cdot\big[(1-\lambda_k) + \lambda_k\, w_{t,\ell}\big]$$

Because the reweight is positive, $\text{sign}(\tilde{A}) = \text{sign}(A^{\text{ep}})$, so the environment reward always controls the update direction.

Results

Consistent gains over RL and self-distillation baselines

Headline metrics per scale; the full 18-column breakdown is in the paper. All baseline numbers follow a common backbone, environment wrapper, and rollout budget.

Table 1: Main results across benchmarks and scales

ALFWorld success (%, Val-128) · Search-QA macro-average accuracy (%) · WebShop success (%). AHEAD rows are shaded; the best value per column-block is highlighted.

MethodALFWorldSearch-QAWebShop Succ.
Qwen2.5-3B-Instruct
GRPO75.036.463.3
RLSD79.743.866.4
Skill-SD73.444.164.0
SDAR84.443.468.0
AHEAD87.544.373.4
Qwen2.5-7B-Instruct
GRPO81.242.072.6
RLSD82.049.077.3
Skill-SD85.147.876.5
SDAR85.949.082.8
AHEAD94.548.583.6
Qwen3-1.7B-Instruct
GRPO46.140.838.3
RLSD42.240.650.8
Skill-SD52.340.853.9
SDAR53.941.958.6
AHEAD67.241.964.8
Sample-efficiency curves on ALFWorld during training for Qwen3-1.7B and Qwen2.5-7B; AHEAD rises faster and higher than GRPO.
Figure 3. Sample efficiency on ALFWorld (seen split, during training). AHEAD converges faster and reaches a higher final success rate than GRPO: 94.5 vs 81.2 at 7B, 67.2 vs 46.1 at 1.7B.
Cumulative fraction of ALFWorld tasks solved within a step budget for Qwen3-1.7B and Qwen2.5-7B; AHEAD lies above GRPO on seen and unseen splits.
Figure 4. Tasks solved within a step budget $N$. Beyond $N\!\ge\!5$, AHEAD (red) lies above GRPO (blue) on both splits: on the unseen split it solves 74.6% within 20 steps vs GRPO's 53.0%, and matches GRPO's full-budget rate in just 15 steps.

Table 2: Component ablation (ALFWorld success, %)

Removing any single component hurts; no variant matches the full method. Dropping the hints costs 7.0–14.1 points and dropping environment feedback costs 4.7–7.8, so both PI sources contribute while the corrective direction is the larger effect. "Env. feedback only" drops both the hints and the failure-only filter.

Configuration1.7B3B7B
AHEAD (full)67.287.594.5
− decay60.271.185.2
− failure-only48.482.093.0
− multi-step61.781.286.7
− hints53.173.487.5
− env. feedback59.481.289.8
Env. feedback only56.272.788.3

Swapping the LLM analyzer (Opus 4.7, Sonnet 5, Kimi, GLM-5) leaves every variant well above GRPO; at 1.7B the four fall within 0.8 points of each other, so a cheaper analyzer suffices for smaller backbones.

Citation

BibTeX

@inproceedings{jin2026ahead,
  title     = {AHEAD: Adaptive Hindsight with Environment-Augmented
               Distillation for Agentic RL},
  author    = {Jin, Xiaolong and Wang, Dingmin and Lingam, Vijay and Kumar, Varun},
  year      = {2026},
  note      = {Under review}
}