Imitation Learning for Multi-turn LM Agents via On-policy Expert Corrections
On the map: LLM agents and tool use → Reinforcement learning for LLM agents
Abstract (arXiv)
A popular paradigm for training LM agents relies on imitation learning, fine-tuning on expert trajectories. However, we show that the off-policy nature of imitation learning for multi-turn LM agents suffers from the fundamental limitation known as covariate shift: as the student policy's behavior diverges from the expert's, it encounters states not present in the training data, reducing the effectiveness of fine-tuning. Taking inspiration from the classic DAgger algorithm, we propose a novel data generation methodology for addressing covariate shift for multi-turn LLM training. We introduce on-policy expert corrections (OECs), partially on-policy data generated by starting rollouts with a student model and then switching to an expert model part way through the trajectory. We explore the effectiveness of our data generation technique in the domain of software engineering (SWE) tasks, a multi-turn setting where LLM agents must interact with a development environment to fix software bugs. Our experiments compare OEC data against various other on-policy and imitation learning approaches on SWE agent problems and train models using a common rejection sampling (i.e., using environment reward) combined with supervised fine-tuning technique. Experiments find that OEC trajectories show a relative 14% and 13% improvement over traditional imitation learning in the 7b and 32b setting, respectively, on SWE-bench verified. Our results demonstrate the need for combining expert demonstrations with on-policy data for effective multi-turn LM agent training.
Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Placed in Reinforcement learning for LLM agents, one of 16 directions in LLM agents and tool use. Builds on 26 of its 35 references that are in the map. First posted on arXiv 16 Dec 2025.
Builds on
26 of 35 references.
Closest ancestors · 1
Same direction, newest first
Other references · 25
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2015Distilling the Knowledge in a Neural Networkcited by 10,076
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
- 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,175
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2016End to End Learning for Self-Driving Carscited by 1,000
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 956
- 2024GSM-Symbolic: Understanding the Limitations of Mathematical Reasoning in Large Language Modelscited by 533
13 more
- 2017End-to-end Driving via Conditional Imitation Learningcited by 479
- 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2024Training Software Engineering Agents and Verifiers with SWE-Gymcited by 300
- 2025SWE-smith: Scaling Data for Software Engineering Agentscited by 255
- 2024SWE-bench Multimodal: Do AI Systems Generalize to Visual Software Domains?cited by 196
- 2025Measuring AI Ability to Complete Long Software Taskscited by 142
- 2023Cumulative Reasoning with Large Language Modelscited by 94
- 2024On Designing Effective RL Reward at Training Time for LLM Reasoningcited by 87
- 2023Improving Code Generation by Training with Natural Language Feedbackcited by 75
- 2024Facilitating Multi-turn Function Calling for LLMs via Compositional Instruction Tuningcited by 40
- 2025Skywork-SWE: Unveiling Data Scaling Laws for Software Engineering in LLMscited by 24
- 2025Adaptive Guidance Accelerates Reinforcement Learning of Reasoning Modelscited by 16
Built on by
Citing papers per year: 2026: 14.
14 papers.
Sort:
By area:
- 2026TCOD: Exploring Temporal Curriculum in On-Policy Distillation for Multi-turn Autonomous Agentscited by 38
- 2026LLM4Cov: Execution-Aware Agentic Learning for High-coverage Testbench Generationcited by 4
- 2026Hindsight Hint Distillation: Scaffolded Reasoning for SWE Agents from CoT-free Answerscited by 4
- 2026Revisiting DAgger in the Era of LLM-Agentscited by 4
- 2026Co-Evolving Harnesses and Models: On-Policy Correction Helps Weaker Models Catch Up Where Imitation Failscited by 3
- 2026Speculative Rollback Correction for Quality-Diverse Web Agent Imitationcited by 2
- 2026Skill-Guided Continuation Distillation for GUI Agentscited by 2
- 2026A Few Teacher Steps Go a Long Way: Cost-Efficient On-Policy Data Augmentation for Agent Post-Trainingcited by 2
- 2026Step-Level On-Policy Distillation: Interpolating Between On-Policy Distillation and Supervised Fine-Tuningcited by 2
- 2026Learn from Weaknesses: Automated Domain Specialization for Small Computer-Use Agentscited by 1
- 2026Learning When to Stop: Selective Imitation Learning Under Arbitrary Dynamics Shiftcited by 0
- 2026From Scoring to Acting: Outcome-Verified Comparative Self-Distillation for LLM Agentscited by 0
2 more
- 2026Distilling Agentic Systems: A Roadmap across Models, Artifacts, and Harnesses29 Sep 2026
- 2026Learning from Teacher Continuations at Student States28 Sep 2026
- 2026Co-Evolving Harnesses and Models: On-Policy Correction Helps Weaker Models Catch Up Where Imitation Fails8 Sep 2026
- 2026Step-Level On-Policy Distillation: Interpolating Between On-Policy Distillation and Supervised Fine-Tuning17 Aug 2026
- 2026From Scoring to Acting: Outcome-Verified Comparative Self-Distillation for LLM Agents30 Jul 2026
- 2026A Few Teacher Steps Go a Long Way: Cost-Efficient On-Policy Data Augmentation for Agent Post-Training6 Jul 2026
- 2026Skill-Guided Continuation Distillation for GUI Agents17 Jun 2026
- 2026Speculative Rollback Correction for Quality-Diverse Web Agent Imitation10 Jun 2026
- 2026Learn from Weaknesses: Automated Domain Specialization for Small Computer-Use Agents27 May 2026
- 2026Revisiting DAgger in the Era of LLM-Agents13 May 2026
- 2026Hindsight Hint Distillation: Scaffolded Reasoning for SWE Agents from CoT-free Answers12 May 2026
- 2026Learning When to Stop: Selective Imitation Learning Under Arbitrary Dynamics Shift9 May 2026
- 2026LLM4Cov: Execution-Aware Agentic Learning for High-coverage Testbench Generationcited by 4
- 2026Revisiting DAgger in the Era of LLM-Agentscited by 4
- 2026Co-Evolving Harnesses and Models: On-Policy Correction Helps Weaker Models Catch Up Where Imitation Failscited by 3
- 2026Speculative Rollback Correction for Quality-Diverse Web Agent Imitationcited by 2
- 2026Skill-Guided Continuation Distillation for GUI Agentscited by 2
- 2026A Few Teacher Steps Go a Long Way: Cost-Efficient On-Policy Data Augmentation for Agent Post-Trainingcited by 2
- 2026Learn from Weaknesses: Automated Domain Specialization for Small Computer-Use Agentscited by 1
- 2026From Scoring to Acting: Outcome-Verified Comparative Self-Distillation for LLM Agentscited by 0
- 2026Distilling Agentic Systems: A Roadmap across Models, Artifacts, and Harnessescited by 0
- 2026Distilling Agentic Systems: A Roadmap across Models, Artifacts, and Harnesses29 Sep 2026
- 2026Co-Evolving Harnesses and Models: On-Policy Correction Helps Weaker Models Catch Up Where Imitation Fails8 Sep 2026
- 2026From Scoring to Acting: Outcome-Verified Comparative Self-Distillation for LLM Agents30 Jul 2026
- 2026A Few Teacher Steps Go a Long Way: Cost-Efficient On-Policy Data Augmentation for Agent Post-Training6 Jul 2026
- 2026Skill-Guided Continuation Distillation for GUI Agents17 Jun 2026
- 2026Speculative Rollback Correction for Quality-Diverse Web Agent Imitation10 Jun 2026
- 2026Learn from Weaknesses: Automated Domain Specialization for Small Computer-Use Agents27 May 2026
- 2026Revisiting DAgger in the Era of LLM-Agents13 May 2026
- 2026LLM4Cov: Execution-Aware Agentic Learning for High-coverage Testbench Generation18 Feb 2026
Similar, not cited
Close in wording, no citation either way
- 2021Mitigating Covariate Shift in Imitation Learning via Offline Data Without Great Coverage
- 2026When Does On-Policy Interaction Help? Representational Tradeoffs in Value-Based Imitation Learning
- 2024Stable-BC: Controlling Covariate Shift with Stable Behavior Cloning
- 2026Iterative Policy Refinement through Semantic Rollout Analysis
- 2026AgentBrew: Offline Tool-Use Agent Learning from Raw Real-World Trajectories
- 2026Multi-Turn On-Policy Distillation with Prefix Replay
- 2026When Does Online Imitation Learning Help in LLM Post-Training? The Role of (Non-)Realizability Beyond Horizon
- 2024Learning on One Mode: Addressing Multi-modality in Offline Reinforcement Learning