NeurIPS 2026QuestionsPapersAreasAboutMarkdown

From Patches to Trajectories: Privileged Process Supervision for Software-Engineering Agents

Murong Ma, Tianyu Chen, Yun Lin, Shuai Lu, Qinglin Zhu, Yeyun Gong, Zhiyong Huang, Peng CHENG, Yan Lu, Jin Song Dong

NeurIPS page · OpenReview · Open on the map

Category: LLM Agents, Evals & Benchmarks › Tool-Augmented Agents · Type: new method · Keywords: software engineering agents, trajectory curation, privileged supervision, reference patches, SWE benchmarks

Areas: LLM Reasoning › Agentic Reasoning › LLM Agents; Code & Coding Agents › Code Verification › Software engineering agents; AI Agents › Agentic Decision Making › Agent Architectures

Summary

P2T (Patches-to-Trajectories) is a privileged process supervision method that curates high-quality SWE agent trajectories using reference patches to improve per-step effectiveness and efficiency, boosting performance on SWE benchmarks.

Explained to a 5-year-old

People teach computer programs to fix software bugs by showing them step-by-step examples. Sometimes those examples have wrong jumps or repeat the same steps, which makes learning slow. The new idea uses special notes (reference patches) that come with the bugs to guide the learning. It builds a map of important facts and picks only the useful steps, making the learning faster and more accurate. This helps the programs fix bugs better while using less computer time.

Explained to a 5-year-old, longer

When we want a computer to help fix problems in software, we show it lots of examples of how a person solved them. Each example is a list of steps the computer should follow, like a recipe. Sometimes those steps have mistakes, like jumping to the wrong place or doing the same thing over and over. These mistakes make the computer learn slower and can cause it to make errors later. The researchers noticed that real bug fixes come with a special note called a reference patch. This patch tells the computer important details about the files and how the fix should work. They used these patches to create a new way of making the learning examples. First, they turned the patches into a map that shows all the important facts and milestones. Then they looked at the usual examples and checked each step against this map. Only the steps that make sense and move forward are kept, and the rest are dropped. This makes the learning examples shorter, clearer, and more useful. As a result, the computer can fix bugs more accurately while using less time and computer power.

For a technical reader

The paper identifies that fine-tuning agents on long teacher trajectories inherits both correct outcomes and intermediate errors, leading to inefficient and unreliable behavior. Existing filtering relies only on a terminal verifier, ignoring the quality of each step and discarding useful reference patches that accompany real issues. The proposed approach leverages these reference patches as privileged supervision: it builds a latent process graph of contextual facts and solution milestones, then scores teacher continuations against this graph to select the shortest grounded segments. Experiments on SWE-Gym, SWE-bench Verified and SWE-bench Lite show up to a 10.8-point gain in Pass@1 while cutting per-instance inference cost by 15%, confirming the benefit of higher-quality trajectories. The work demonstrates that curating trajectories for effectiveness and efficiency can improve agent performance without simply scaling up the amount of data.

Problem

Supervised fine-tuning of software-engineering agents on long teacher trajectories often includes flawed intermediate steps, leading to ungrounded leaps and redundant loops, and existing filtering methods only use terminal verification, lacking supervision on flawed steps.

Method

The approach uses reference patches as privileged information to build a latent process graph of contextual facts and solution milestones, then scores teacher continuations against this graph to select grounded, information-bearing trajectory segments while minimizing length.

Results

The approach achieves up to +10.8 Pass@1 improvement on SWE-bench Verified while reducing per-instance inference cost by 15%, and shows consistent gains on SWE-bench Lite across two teachers.

Contributions

It introduces privileged process supervision that leverages reference patches to curate high-quality trajectories, jointly optimizing per-step effectiveness and length, and demonstrates that trajectory quality can be improved without scaling data.

Practical relevance

This method enables more reliable and efficient software-engineering agents, reducing inference cost and improving fix accuracy for developers.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction