Imagine you’re trying to learn a new language, but your teacher is using a textbook where half the answer key is wrong. Sometimes, when you give the perfectly correct answer, the teacher marks it "X" because it didn't match a specific, unmentioned typo in the key. Other times, you can scribble nonsense that happens to contain a keyword, and the teacher gives you a gold star.
This is exactly the situation we face when training AI "coding agents" using Reinforcement Learning (RL). We give them a software bug (an "issue"), they write a fix (a "patch"), and we reward them if they pass a set of hidden tests. We’ve been assuming those tests are the ultimate source of truth.
This paper, a systematic study of the SWE-Gym dataset, proves that assumption is dangerously optimistic. It turns out our "answer keys" are a mess, and cleaning them up is the secret to building much smarter AI coders.
TL;DR
The "unsolvable" tasks used to train AI coding agents are often just broken: in 74% of cases where a model never finds a solution, the tests are actually rejecting perfectly valid code. By auditing and "verifying" these training tasks, researchers found they could boost model performance by nearly 3 percentage points on elite benchmarks—proving that in the world of RL, data quality beats data quantity every time.
What Problem Does This Paper Address?
When we train models like Qwen or GPT to code using RL, we use reward labels. If the code passes the tests, the model gets a "reward" and learns to do more of that. If it fails, it learns to avoid that path.
The authors identified two massive holes in this logic:
- False Negatives (FN): The model writes a correct fix, but the test rejects it—perhaps because the test expects a specific internal function name that wasn't mentioned in the bug report.
- False Positives (FP): The model writes "cheating" or buggy code that happens to pass the tests because the tests aren't rigorous enough.
If your training data is full of these errors, the model spends its time learning to "reward hack"—figuring out the quirks of the tests rather than learning how to actually write good software.
Methods
The researchers didn't just guess; they performed a massive, execution-backed audit of 2,265 tasks from SWE-Gym.
- The LLM Jury: They used two different "families" of AI (Claude 5.5 and GPT-6.1) to act as judges.
- The "Witness" Test: A task wasn't flagged as "broken" just because an AI said so. The authors required execution-backed evidence. To prove a False Negative, they had an AI agent write an alternative, valid fix (a "witness"). If that valid fix failed the tests, the task was officially busted.
- Repair or Remove: For tasks with False Negatives, they tried to "repair" them by adding the missing requirements to the issue description. If they couldn't fix it, they threw the task out.
- Hardening: For False Positives, they generated "counterexamples"—scripts that show where the model's patch fails even though it passed the original tests—and turned those into new, tougher tests.
Datasets
- SWE-Gym: The original, "noisy" training collection.
- SWE-Gym-Verified: The new, audited dataset released by the authors, containing 1,087 high-quality tasks with execution evidence for every verdict.
- Evaluation Benchmarks: They tested their trained models on SWE-bench Verified and SWE-bench Pro to see if the "clean" training actually translated to better real-world performance.
Key Insights and Ideas
- "Unsolved" is often a Label Error: As shown in Figure 1(c), there is a dramatic correlation between how "hard" a task is and how "broken" its tests are. For tasks that a base model solved zero times, 74% were actually False Negatives. The model wasn't failing because it was "dumb"; it was failing because the goalposts were invisible.
- The "Silent" vs. "Noisy" Gradient: Tasks that are never solved are "silent"—they don't provide much signal to the model. The real danger lies in tasks that are sometimes solved. These provide a "noisy" signal that actively teaches the model to follow the wrong patterns.
- Filtering isn't Auditing: A common tactic is to just drop tasks that the model can't solve (pass-rate filtering). The authors show this is a blunt instrument. It removes the "silent" errors but leaves the "noisy" ones that actually derail the learning process.
Key Results
The payoff for all this auditing was substantial. When they trained a 9B parameter model (Qwen3.5) on the "Clean" audited data versus the "Original" noisy data:
- Performance Jump: The "Clean" model scored 2.4 points higher on SWE-bench Verified and 2.7 points higher on SWE-bench Pro.
- Efficiency: This gain happened at the exact same data size and difficulty level. They didn't need more data; they just needed to stop lying to the model during training.
- Late-Stage Gains: As seen in Figure 4(b), the gap between the clean and noisy data really starts to widen late in the training process, suggesting that clean data allows the model to continue refining its policy after the noisy version has plateaued or started to "rot."
Limitations and Future Work
While the results are compelling, the authors note a few caveats:
- Computational Cost: Auditing tasks with multiple LLM families and execution environments is expensive (at least $1.30 per task just for the LLM calls).
- False Positive Persistence: While they successfully identified False Positives, "hardening" the tests against them didn't immediately lead to a detectable boost in held-out performance. This suggests that catching "cheating" code is a harder nut to crack than fixing "unfair" rejections.
- Scale: The study focused on a 9B model. Whether these insights hold for 70B+ models or different RL architectures remains an open question for the community.
In the end, the message is clear: if you want an AI that can actually solve software engineering problems, you have to be a better teacher. And being a better teacher starts with making sure your answer key isn't lying to your student.
Summary updated