Papers
What Makes Good Data for Training Coding Agents? A Systematic Study on SWE-Gym
Auditing hidden-test labels—not just task difficulty—raises coding-agent transfer scores, and the released verified SWE-Gym data gives RL teams a concrete training-set upgrade.

- arXiv
- 2611.30207 · Preprint · not peer-reviewed
- Published
- 2026-11-23
- Authors
- Yikai Zhang, Mai Xu, Yunbei Zhang, Qirui Jin, Kenan Li, Yuwen Jia, Jinwei Yao, Xiangyu Zhang, Jielun Tan, Jin Pan, Zijian Jin, Xiao Sun
In plain words
Coding agents trained with reinforcement learning receive rewards based on whether their code passes hidden tests. But those tests can be wrong: they may reject a valid fix or accept a faulty one.
Key results
- Unsolved tasks are often mislabelled. In the original training set, 74% of never-solved tasks had tests that rejected correct fixes, compared with 20% of sometimes-solved tasks.
- Audited data improved held-out performance. Across three seeds, Clean outperformed Orig by 2.4 percentage points on SWE-bench Verified and 2.7 points on SWE-bench Pro.
AI summary
Overview
Research area: Reinforcement learning for coding agents and the quality of software-task training data.
Technical level: Beginner-Friendly.
Scope: The paper studies whether the hidden tests in SWE-Gym reward correct code fixes reliably, and whether auditing those tests improves coding-agent training.
What This Paper Is About
Coding agents trained with reinforcement learning receive rewards based on whether their code passes hidden tests. But those tests can be wrong: they may reject a valid fix or accept a faulty one. The researchers audit SWE-Gym’s tests and compare training on audited tasks with training on original tasks and tasks selected using a pass-rate filter.
Key Contributions
- An execution-backed audit of SWE-Gym: The researchers use Claude Opus 5.5 and GPT-6.1 Sol to identify suspected test errors, then require executable evidence before confirming them.
- A released audited dataset: They create SWE-Gym-Verified, containing 1,087 tasks, including 184 with repaired task statements, and release task-level verdicts and supporting evidence.
- A controlled comparison of training data: They train Qwen3.5-9B on equal-sized, difficulty-matched sets to compare original tasks, audited tasks, audited tasks with additional tests, and tasks filtered by pass rate.
- An analysis of how test errors affect learning: They trace which errors produce training signals under GRPO, showing why a pass-rate filter can miss errors that influence the policy.
Main Findings
- Unsolved tasks are often mislabelled: In the original training set, 74% of never-solved tasks had tests that rejected correct fixes, compared with 20% of sometimes-solved tasks.
- False positives are also common: Of the distinct patches that passed on audited tasks, 26.1% were confirmed as incorrect by the paper’s conservative, execution-based procedure. False positives appeared across difficulty levels.
- Pass-rate filtering misses errors that affect learning: Never-solved flawed tasks seldom contributed to training gradients. But sometimes-solved flawed tasks contributed 19.5% of the original set’s gradient-carrying groups, and dropping never-solved tasks did not remove them.
- Audited data improved held-out performance: Across three seeds, Clean outperformed Orig by 2.4 percentage points on SWE-bench Verified and 2.7 points on SWE-bench Pro. Filtering the original set by pass rate did not produce a comparable gain.
- Adding tests against false positives did not produce a detectable held-out improvement: The added tests caught about a quarter of false positives in the measured sample and reduced training reward on hardened tasks, but held-out pass@1 did not change detectably.
Methodology in Plain English
The researchers began with 2,265 usable, de-duplicated SWE-Gym tasks. For each fail-to-pass test assertion, two LLM families judged whether it required something the task statement did not specify. When an assertion was flagged, coding agents wrote an alternative fix that followed the task statement, and the researchers ran the tests to see whether they rejected it. A task counted as having a false negative only when this execution confirmed the problem.
To look for false positives, the researchers examined patches that passed the tests. They counted a patch as a confirmed false positive only when both LLM families judged it incorrect and an executed counterexample demonstrated a regression. Some tasks with false negatives were repaired by adding missing requirements to their statements; others were removed.
The researchers then trained Qwen3.5-9B with GRPO on sets of 512 tasks. The sets were designed to make comparisons fair by matching their size and difficulty, and the training runs used three seeds. They evaluated the resulting agents on held-out tasks from SWE-bench Verified and SWE-bench Pro. They also compared the audited data with a version of the original data that dropped never-solved tasks.
Why This Matters
A coding task’s tests are not just a way to check performance: during reinforcement learning, they define which patches the agent is rewarded for producing. If those rewards are wrong, the agent may learn to imitate accidental test expectations rather than solve the stated problem.
Real-world applications:
- Building coding-agent training sets: Audit tests before using repository tasks for reinforcement learning.
- Improving software-task benchmarks: Find tests that reject valid fixes or accept faulty patches.
- Designing data filters: Avoid treating every never-solved task as simply difficult; some may have unattainable or misleading rewards.
- Developing stronger verification tools: Use executed alternative fixes and counterexamples to test whether a reward signal reflects correctness.
Industry relevance: Organizations training coding agents on real repositories can use this work’s approach to make training rewards more trustworthy. The paper also releases task-level evidence and an audit pipeline, making it possible to inspect or challenge individual audit decisions rather than relying only on aggregate scores.
Future Directions
- Test whether the findings hold with other base models, training setups, task sources, and larger-scale experiments.
- Determine whether repairing flawed tasks is better than removing them, and identify how to make audits less costly.
- Develop methods to detect and remove false positives more effectively; the added tests in this study caught only about a quarter of them in the measured sample.
- Study whether stronger tests improve the actual correctness of generated patches, including on held-out tasks whose original tests may themselves be imperfect.
Target Audience
This paper is most useful for researchers and practitioners who build coding agents, train them with reinforcement learning, curate software-task datasets, or evaluate repository-level code generation. It may also interest people developing automated software testing and verification methods, especially those concerned with whether tests measure the behavior a task actually asks for.
Authors’ abstract
Reinforcement learning (RL) trains coding agents on software tasks whose hidden tests decide the reward, yet task collections check these tests only against the reference fix. We ask what makes a task good training data, focusing on the correctness of its reward labels. We audit SWE-Gym with two LLM families, and a suspected error counts only if execution reproduces it. We find that unsolved often means mislabelled: 74% of the tasks that a 9B base model never solves have a…
The full abstract on arXivRelated papers
- Switch-SWE: Do Coding Agents Hold Focus When Switching Between Unfinished Tasks? 2026-11-01 · cs.CL · Key terms of the title in common
- SWE-Duel: Towards a Self-Scaling Arena for Coding Agents 2026-10-08 · cs.CL · Key terms of the title in common
- onPanda: Efficient Annotation of On-Policy Alignment Data for LLMs and Agents via Token-Level Correction 2026-09-21 · cs.CL · Also by Xiangyu Zhang
- NeoHorse-1: Towards Recursive Self-Improvement via Agentic Post-Training with Routing Harness 2026-09-08 · cs.CL · Also by Xiangyu Zhang
- SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoring 2026-08-10 · cs.CL · Key terms of the title in common