Summary (Overview)

  • Key contribution: The paper identifies that inference-time accuracy (instruction-following performance) is a poor predictor of how much a language model improves after self-distillation of an experience, and proposes gradient alignment as a more reliable distillability criterion.
  • Core finding: Across 33 candidate experiences, inference-time accuracy shows essentially no correlation with post-distillation accuracy (ρ = −0.059, p = 0.746), whereas gradient alignment on model errors correlates significantly (ρ = 0.484, p = 0.006).
  • Proposed framework: E2L (Evolve-to-Learn) combines Pareto-based exploration with gradient-alignment-based candidate admission and selection, enabling agents to autonomously generate experiences suitable for self-improvement via on-policy self-distillation.
  • Empirical results: E2L-Alignment achieves the best results on all four benchmarks (AIME25, AIME26, HotPotQA, JailbreakBench), improving Qwen3-8B from 0.1972 → 0.2203 on AIME25 and from 0.6236 → 0.7205 on JailbreakBench.
  • Generality: E2L-selected experiences outperform baseline-selected prompts across three different distillation objectives (JSD, position-weighted OPSD, and rule-reward OPD), demonstrating robustness across training paradigms.

Introduction and Theoretical Foundation

Background and Motivation

Large language model (LLM) agents can acquire task-specific experience through test-time interaction, reflection, and prompt optimization. However, such experience typically remains confined to external context, forcing the model to repeatedly retrieve the same experience and making behavior vulnerable to retrieval failures while increasing inference cost. Context distillation methods (e.g., OPSD) address this by transferring textual experience into model parameters, enabling a loop for continual self-improvement.

The Central Problem

Not every experience is worth internalizing. The paper demonstrates a striking example (Fig. 1a): two experiences generated by GLM-5.2 achieve identical context-conditioned accuracy on AIME25 (20.83%), yet after 20 steps of on-policy self-distillation, the resulting models achieve 21.11% and 18.06% accuracy respectively—a gap of 3.06 percentage points.

Theoretical Insight

The authors argue that inference-time accuracy cannot separate what the experience supplies from what the model has actually acquired—a model reading an answer looks the same as a model that has learned to derive it. Since the experience does not survive distillation (only the parameter update it induced survives), the value of an experience must be assessed through the parameter updates it induces.


Methodology

1. On-Policy Self-Distillation (OPSD)

Given input xx and experience cc, the student πθ\pi_{\theta} generates responses without observing cc, while a conditioned teacher provides token-level supervision:

pθ,t=πθ(⋅∣x,y<t),qθˉ,tc=πθˉ(⋅∣x,c,y<t).(1)p_{\theta,t} = \pi_{\theta}(\cdot | x, y_{<t}), \quad q_{\bar{\theta},t}^{c} = \pi_{\bar{\theta}}(\cdot | x, c, y_{<t}).\tag{1}

The student is trained by minimizing reverse KL divergence:

LOPSD(θ;c)=Ex∼Dy∼πθ(⋅∣x)[1∣y∣∑t=1∣y∣DKL(pθ,t∥sg⁡[qθˉ,tc])],(2)\mathcal{L}_{\mathrm{OPSD}}(\theta ;c) = \mathbb{E}_{\substack{x\sim \mathcal{D}\\ y\sim \pi_{\theta}(\cdot |x)}}\left[\frac{1}{|y|}\sum_{t=1}^{|y|}D_{\mathrm{KL}}\left(p_{\theta,t}\parallel \operatorname{sg}[q_{\bar{\theta},t}^{c}]\right)\right],\tag{2}

where sg⁡\operatorname{sg} stops gradients through the teacher distribution.

2. Gradient Alignment as a Distillability Criterion

Reference gradient: Using a fixed subset Derr\mathcal{D}_{\mathrm{err}} of labeled reference questions answered incorrectly by the initial student:

Lref(θ)=−1∣Derr∣∑(x,y⋆)∈Derrlog⁡πθ(y⋆∣x).(5)\mathcal{L}_{\mathrm{ref}}(\theta) = -\frac{1}{|\mathcal{D}_{\mathrm{err}}|} \sum_{(x, y^{\star}) \in \mathcal{D}_{\mathrm{err}}} \log \pi_{\theta}(y^{\star} \mid x).\tag{5}

Alignment computation (using parameters of the last four Transformer layers ϕ\phi):

gref=∇ϕLref(θ),gc=∇ϕLOPSD(θ;c),g_{\mathrm{ref}} = \nabla_{\phi} \mathcal{L}_{\mathrm{ref}}(\theta), \quad g_{c} = \nabla_{\phi} \mathcal{L}_{\mathrm{OPSD}}(\theta ; c), A(c)=cos⁡(gref,gc)=gref⊤gc∥gref∥2∥gc∥2.(6)A(c) = \cos(g_{\mathrm{ref}}, g_{c}) = \frac{g_{\mathrm{ref}}^{\top} g_{c}}{\|g_{\mathrm{ref}}\|_2 \|g_{c}\|_2}.\tag{6}

Local interpretation: For one SGD step ϕ′=ϕ−ηgc\phi' = \phi - \eta g_c:

Lref(ϕ′,ψ)≈Lref(ϕ,ψ)−η∥gref∥2∥gc∥2A(c).(7)\mathcal{L}_{\mathrm{ref}}(\phi', \psi) \approx \mathcal{L}_{\mathrm{ref}}(\phi, \psi) - \eta \|g_{\mathrm{ref}}\|_2 \|g_{c}\|_2 A(c).\tag{7}

Higher alignment predicts a larger local decrease in the reference loss.

3. E2L Framework (Algorithm 1)

  • Candidate generation: Mutate parent experiences using execution traces and feedback: c′=Mutate(cp,τp,fp)c' = \mathrm{Mutate}(c_p, \tau_p, f_p)
  • Dual admission criteria: Candidates enter the pool if they satisfy ParetoAccept (non-dominated on validation instances) OR rank among the alignment Top-N:
∣{c∈Pvalid:A(c)≥A(c′)}∣<N.(9)\left|\left\{c \in \mathcal{P}_{\mathrm{valid}}: A(c) \geq A(c')\right\}\right| < N.\tag{9}
  • Final selection: Choose the experience with highest valid alignment: c^{\star} = \arg\max_{c \in \mathcal{P}_{\mathrm{valid}}} A(c).\tag{10}
  • Internalization: Distill c⋆c^{\star} using Equation 2.

Empirical Validation / Results

Main Results (RQ1)

Table 1: Main results for Qwen3-8B, averaged across three random seeds

MethodAIME25AIME26HotPotQAJailbreakBench
Base0.19720.15560.52080.6236
OPCD0.20460.16390.52110.6358
OPSD0.18150.15650.49140.4629
OEL0.20650.16850.53670.5623
E2L-Alignment (Ours)0.22030.18240.56140.7205

E2L achieves the best results on all four benchmarks, while baselines show mixed or even negative results (e.g., OPSD degrades performance on all tasks).

Metric Correlation Analysis (RQ2)

Figure 3: Among 13 evaluated metric families (entropy, KL gap, reward, accuracy, etc.), gradient alignment is the only metric showing statistically significant positive correlation with post-distillation performance across teachers (ρ = 0.484, p = 0.006 for AIME25).

Fixed-Pool Selection (Table 2)

Selection MethodAIME25AIME26LiveBench MathHotPotQA
Random0.20720.15550.47360.5133
Iteration count0.20990.15850.47300.5250
Accuracy-Top30.22590.15740.47420.5228
Alignment-Top30.21940.16670.48020.5381

Alignment-Top3 is most consistent across datasets; Accuracy-Top3 wins only on AIME25.

Tree Construction Ablation (Table 3)

StrategyNo. experiencesTree depthMax accuracyMax alignmentGate acceptanceAIME25 after distillation
Pareto-only2350.22220.855720%0.2194
Alignment-only620.20550.74624%0.1944
E2L2760.22220.880931%0.2305

E2L's combined strategy produces the deepest tree, highest acceptance rate, and best post-distillation accuracy.

Robustness Across Distillation Objectives (Table 5)

E2L-selected experiences achieve the best results in 8 of 9 objective–benchmark settings across JSD, position-weighted OPSD, and rule-reward OPD variants.

Direct Answer Supervision Comparison (Table 4)

MethodAIME25AIME26LiveBench Math
Base0.20550.15270.4762
Gt-OPSD0.16380.13880.4642
SFT0.20550.15550.4702
E2L-Alignment (Ours)0.23050.17770.5000

Direct answer supervision (Gt-OPSD) actually degrades performance below base, while E2L improves it—demonstrating the value of evolved experiences beyond directly using reference answers.


Theoretical and Practical Implications

Theoretical Implications

  1. Distillability ≠ Inference Performance: The paper challenges the prevailing assumption that experiences improving test-time performance are necessarily worth internalizing. The two objectives (inference accuracy vs. learning utility) are shown to be essentially uncorrelated.

  2. Gradient Geometry as a Selection Signal: The alignment between experience-induced gradients and reference gradients provides a theoretically grounded criterion (via first-order expansion in Eq. 7) for predicting distillation gains before actually distilling.

  3. Search-Select Trade-off: The finding that alignment-only search fails (6 experiences, 4% acceptance) while Pareto-only search underperforms demonstrates that exploration (Pareto diversity) and exploitation (alignment quality) must be balanced during experience evolution.

Practical Implications

  1. Autonomous Self-Improvement: E2L enables agents to generate, evaluate, and internalize their own experiences without human annotation, closing the loop between experience generation and parameter learning.

  2. Inference Efficiency: Gains from E2L are retained without requiring the selected experience at inference time, eliminating retrieval costs and vulnerabilities.

  3. Task Generality: The method works across mathematical reasoning, multi-hop QA, and safety alignment, suggesting broad applicability.

  4. Objective-Agnostic: E2L-selected experiences transfer across different distillation objectives (JSD, PW-OPSD, rule-reward), indicating the selection signal captures intrinsic experience quality.


Conclusion

Main Takeaways

  • Gradient alignment is a reliable, statistically significant predictor of self-distillation gains, while inference-time accuracy is not (ρ = −0.059 vs. ρ = 0.484).
  • E2L combines Pareto-based exploration with alignment-based admission and selection, achieving the best results on all four benchmarks and outperforming three self-distillation baselines.
  • The framework enables fully autonomous self-improvement: the agent generates, evaluates, and internalizes its own experiences, with gains persisting without the experience at inference time.

Future Directions

  1. Scaling: Extending E2L to other model scales and repeated self-evolution cycles.
  2. Efficiency: Reducing the computational cost of computing reference gradients during experience search.
  3. Alternative reference signals: Exploring reference signals beyond labeled diagnostic examples.
  4. Stability: Improving the stability of the underlying self-distillation process to reduce training variability.

Reproducibility

Code and configuration files are available at https://anonymous.4open.science/r/Evolve2Learn-123456, with detailed dataset splits, prompts, and training configurations in the appendix.

Related papers