Rust in Everything
← Papers

What Makes Good Data for Training Coding Agents? A Systematic Study on SWE-Gym

Yikai Zhang, Mai Xu, Yunbei Zhang, Qirui Jin, Kenan Li, Yuwen Jia et al.

2026-11-24▲ 17arXiv 2611.30207v1Hugging FaceCode

AI-generated from the full paper (deepseek-flash). It may contain mistakes; check the original.

TL;DR

An execution-backed audit of SWE-Gym finds many hidden tests mislabel correct and incorrect patches, and audited tasks train better policies than original or pass-rate-filtered tasks.

Problem

Task collections for RL coding agents admit tasks after checking only that the reference fix passes hidden tests and the original code fails them. This shows the reward is attainable, not that every correct fix receives it or that only correct fixes do. Training data receives coarser checks, such as dropping never-solved tasks or groups without reward variance, without inspecting the tests. The paper asks what makes a task good training data, focusing on the correctness of its reward labels.

Method

The authors audit SWE-Gym tasks one fail-to-pass assertion at a time using Claude Opus 5.5 and GPT-6.1 Sol families. Both families rate each assertion against the issue without seeing pass rate or difficulty, and each flagged assertion is tested by having an agent write and execute a witness patch that follows the statement but differs from the gold fix. A task gets a false-negative verdict only when a flagged assertion rejects a witness the authoring family considers reasonable; disputed cases go to cross-family review. Tasks with false negatives are repaired by adding the missing requirement to the issue, or removed. False positives are identified among distinct passing base-model patches by counterexample, and Clean+FP hardens tests with those counterexamples. They train a 9B model with GRPO on four 512-task sets at matched difficulty and evaluate on held-out SWE-bench Verified and SWE-bench Pro tasks.

Results

  • Tasks never solved by a 9B base model are far more likely to have a test that rejects correct fixes than sometimes-solved tasks. §1
  • Of 374 tasks sent to cross-family review, debate cleared 171; the audit produced 1,091 false-negative verdicts, 963 confirmed by both families and 128 contested. §4.1
  • SWE-Gym-Verified contains 1,087 tasks, 184 with a repaired statement; 138 are never solved, 570 sometimes solved, and 379 always solved. §4.3
  • At equal size and matched difficulty, Clean scores 2.4 points above Orig on SWE-bench Verified and 2.7 on SWE-bench Pro, while Orig+Filter shows no such gain on average. §1
  • Hardening covers 143 of 512 tasks, catches 25% of false positives, lowers training reward on hardened tasks by 13 points, and does not detectably change held-out pass@1. §5.5
  • Of the tasks judged, 55% have a test that rejects correct fixes. §7

Limitations

  • Humans checked only a sample of the verdicts, not every task as in SWE-bench Verified.
  • The audit relies on LLM judges whose biases the authors cannot fully characterize.
  • It remains open whether the findings hold at larger scale and for other models, whether repair outperforms removal, and how to remove false positives.
  • The study only examines the correctness of reward labels, controlling for size and difficulty.

Key points

  • The audit principle is that no error verdict rests on judgment alone: every suspected error must be reproduced by execution. §4
  • Both families rate every F2P assertion without seeing a task’s pass rate or difficulty, and flagged assertions are cleared or reproduced with executed witness patches. §4.1
  • False positives are confirmed by counterexample, and hardening keeps tests that pass with the gold patch and with every patch not labelled a false positive, leaving 493 tests on 143 tasks. §4.2
  • False positives make up about a quarter of all passing patches and are common at every difficulty level. §1
  • Pass-rate filters keep the label errors that train the policy: sometimes-solved flawed tasks contribute a fifth of the gradient-carrying groups, with or without the filter. §1
  • Orig’s three GRPO runs contain 3,840 groups of eight samples, 2,365 of which carry gradient. §5.3
  • Without execution, Claude’s rating alone matches the final verdict on 91% of tasks and GPT’s on 95%, but whether one such pass suffices for RL is untested. §6
  • The release flags 53 tasks whose issue contains the full solution or whose F2P tests appear unrelated; a strict subset without them has 1,034 tasks, including 495 of Clean’s 512. §A

Mind map

SWE-Gym reward-label audit
Problem
Hidden tests are reward labels
Checks only reference fix
False negatives and false positives
Audit
Two LLM families
Rate every F2P assertion
Execute witness patches
Counterexample FP confirmation
Repair or remove FN tasks
Findings
74% of never-solved FN-flawed
20% of sometimes-solved FN-flawed
False positives about a quarter
Pass-rate filters miss gradient errors
55% of judged tasks FN-flawed
Experiments
Clean vs Orig
+2.4 Verified and +2.7 Pro
Orig+Filter no average gain
Clean+FP catches 25% of FPs
No detectable held-out change
Release
1,087 verified tasks
184 repaired statements
Per-task evidence
1,034 strict subset
Limitations
Sampled human check
LLM judge bias
Scale and model scope open
FP removal open

Related papers

💬 Related discussions

Loading...