TL;DR
Providing LLM agents with high-quality natural language skills doesn't guarantee they will use them effectively, especially when trained with sparse task-level rewards. This paper introduces Bidirectional Context Self-Distillation (BCSD), a framework that leverages two complementary context views—one augmented with meta-skills and one pruned of redundancies—to provide fine-grained, token-level guidance during reinforcement learning. BCSD significantly improves external skill utilization across multiple LLM scales on long-horizon agent benchmarks without locking skills into model parameters.
What Problem Does This Paper Address?
LLM agents often rely on external natural-language skills (procedural knowledge) to tackle complex, long-horizon tasks. However, having access to a skill repository doesn't mean the agent knows how or when to apply them. Standard reinforcement learning (RL) approaches rely on coarse, sparse outcome rewards (e.g., success/failure at the end of a long task), which fail to provide token-level feedback on whether a specific decision was genuinely informed by the provided skills.
While some methods try to "internalize" skills directly into model parameters via distillation, this destroys the main benefits of external skills: their explicitness, editability, and transferability. On-policy self-distillation (OPSD) has emerged to provide token-level supervision by comparing a student model to a "privileged" teacher model with extra context. However, relying on a single privileged context often introduces stylistic biases or shortcut tokens rather than true task-relevant guidance.
Methods
The authors propose BCSD (Bidirectional Context Self-Distillation) to enhance skill utilization while keeping skills explicit and editable. Instead of a single privileged teacher context, BCSD evaluates each trajectory from two opposite, complementary directions relative to the base context ($C_0 = \text{Query}, \text{General Skill}, \text{Task-Specific Skill}$):
- Augmented View ($C_1$): Adds a policy-dependent Meta-Skill. Meta-skills are high-level textual insights extracted by an external LLM that contrast successful and failed trajectories from the agent's own recent history, summarizing how to use the skills better.
- Pruned View ($C_2$): Removes redundant or distracting general guidance from the context while preserving the core task-specific skill, providing a highly focused reference.
BCSD recalculates the token log-probabilities under these three contexts ($C_0, C_1, C_2$). The log-probability gaps represent how much the extra guidance or the removal of clutter helps the model support each token. These gaps are combined via a weighted average to dynamically rescale the advantage in Group Relative Policy Optimization (GRPO). Crucially, this rescales the magnitude of the token updates based on skill relevance without changing the optimization direction set by the environment reward. The rescaling strength ($\lambda_n$) is linearly decayed over training to let the environment reward dominate later stages.
Datasets
The framework was evaluated on two popular long-horizon interactive LLM agent benchmarks:
- ALFWorld: A text-based environment requiring agents to complete multi-step household tasks (e.g., clean, heat, cool, or pick objects) through textual interactions.
- WebShop: A simulated e-commerce website where agents must search, filter, and purchase products matching complex user-specified constraints.
Key Insights and Ideas
- Utilization over Internalization: Instead of baking skills into the weights (which makes them hard to modify), agents can be trained to become better readers and executors of external instructions.
- Two Teachers are Better Than One: The token-level sign agreement between the augmented and pruned views hovers around 50% throughout training. This proves they provide non-redundant, complementary signals. Where they agree, the signal is stable; where they disagree, they moderate each other, preventing the agent from over-fitting to context-induced stylistic shifts.
- Meta-Skills Must Evolve: A static meta-skill based on early-stage failures becomes stale. Regularly refreshing the meta-skill based on recent validation windows ensures the guidance targets the policy's current weaknesses.
- Scaffolding via Decay: Using self-distillation as an early-stage training scaffold (by decaying the rescaling coefficient $\lambda_n$) helps the agent overcome the cold-start problem of sparse rewards without making it permanently dependent on privileged context.
Key Results
BCSD achieved top-tier performance across multiple model backbones (Qwen2.5-7B-Instruct, Qwen2.5-3B-Instruct, and Qwen3-1.7B):
- On ALFWorld, BCSD achieved an overall success rate of 83.6% with Qwen2.5-7B, outperforming the best baseline by 3.1 percentage points. With the smaller Qwen2.5-3B, it boosted performance by 5.4 points over the strongest baseline, hitting 82.0%.
- On WebShop, BCSD achieved the highest success rate of 78.1% (Qwen2.5-7B) and 66.4% (Qwen2.5-3B).
- Sensitivity Analysis: To prove the agent actually learned to use the skills rather than just memorizing the answers, the authors ran an evaluation where the task-specific skill was removed at inference time. BCSD's performance dropped significantly more than the baselines (a 7.8 point drop on WebShop vs 6.2 for Skill_GRPO*), demonstrating a genuine, functional dependence on the external context.
Limitations and Future Work
- Dependence on an External Extractor: The initialization and periodic refresh of Meta-Skills rely on a frozen external LLM to analyze successful and failed trajectories, adding computational overhead during training.
- Hyperparameter Sensitivity: The performance depends heavily on the initial rescaling coefficient ($\lambda_0$) and the blending weight ($\alpha$) between the augmented and pruned views. Finding the optimal balance requires careful tuning.
- Future Directions: The authors suggest exploring more automated or end-to-end methods for meta-skill generation, and extending the bidirectional context distillation paradigm to other complex agent modalities like vision-language tasks.
Summary updated