Lune

ICML2026Top-tier venue

Imitation Learning for Multi-turn LM Agents via On-policy Expert Corrections

Niklas Lauffer, Xiang Deng, Srivatsa Kundurthy, Brad Kenstler, Jeff Da

Abstract

A popular paradigm for training LM agents relies on imitation learning, finetuning 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. 1

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • OpenHands: An Open Platform for AI Software Developers as Generalist Agents cites SWE-bench: Can Language Models Resolve Real-world Github Issues?
  • OpenHands: An Open Platform for AI Software Developers as Generalist Agents cites SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
  • SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering cites SWE-bench: Can Language Models Resolve Real-world Github Issues?
  • Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. LLM4Cov: Execution-Aware Agentic Learning for High-coverage Testbench GenerationHejia Zhang, Zhongming Yu, Chia-Tung Ho, Mark Ren et al.ICML 2026 · 4 citations

Builds on8

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  3. SWE-bench: Can Language Models Resolve Real-world Github Issues?Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao et al.ICLR 2024 · 2,082 citations
  4. SWE-agent: Agent-Computer Interfaces Enable Automated Software EngineeringJohn Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret et al.NeurIPS 2024 · 2,059 citations
  5. OpenHands: An Open Platform for AI Software Developers as Generalist AgentsXingyao Wang, Boxuan Li, Yufan Song, Frank F. Xu et al.ICLR 2025 · 7 citations

Related papers

  1. daVinci-Dev: Agent-native Mid-training for Software EngineeringJi Zeng, Dayuan Fu, Tiantian Mi, Zhuang Yumin et al.ICML 2026 · 13 citations
  2. Training Language Models to Self-Correct via Reinforcement LearningAviral Kumar, Vincent Zhuang, Rishabh Agarwal, Yi Su et al.ICLR 2025
  3. Offline Imitation Learning with Model-based Reverse AugmentationJie-Jing Shao, Hao-Sen Shi, Lan-Zhe Guo, Yu-Feng LiKDD 2024 · 5 citations
  4. ToolACE-MT: Non-Autoregressive Generation for Agentic Multi-Turn InteractionXingshan Zeng, Weiwen Liu, Lingzhi Wang, Liangyou Li et al.ICLR 2026 · 15 citations
  5. Unlocking Implicit Experience: Synthesizing Tool-Use Trajectories from TextZhihao Xu, Rumei Li, Jiahuan Li, Rongxiang Weng et al.ACL 2026 · 14 citations
Dusk over the sea between two cliffs drawn in fine vertical lines