ZICQ
中 Log in / Sign up
Newsroom Agentic #SWE-Gym #Coding Agents #Reinforcement Learning #Reward Label Auditing #SWE-bench

SWE-Gym Audit Exposes Reward Mislabeling in Coding-Agent RL and Releases 1,087 Verified Tasks

Avatar of Mr.Xu

By Mr.Xu Compiled & Reviewed by Editorial

Published:

中文阅读 (Chinese) English Version
Co-reading Select any sentence in the article to highlight, annotate, or copy a quote card. Join discussion ↓

Summary:A systematic audit of SWE-Gym shows that hidden-test pass rate is not a valid proxy for reward correctness in coding-agent RL. Among tasks never solved by a 9B base model, 74% contained false-negative tests that rejected valid fixes, compared with 20% among tasks the model sometimes solved. After faulty tasks were repaired or removed using executable evidence, equal-size, difficulty-matched training yielded policies that scored 2.4 and 2.7 points higher on held-out SWE-bench Verified and SWE-ben


Core finding

The central claim of the SWE-Gym study is not merely that a coding model solves fewer tasks. It is that hidden tests in RL training environments may label correct solutions as failures. Execution-based coding-agent RL commonly approximates the reward as r = 1[hidden_tests_pass]: passing the test suite earns one point, while every other outcome earns zero. This design treats the tests as a trustworthy oracle. If the oracle is wrong, however, the optimization target itself is corrupted.

The authors audited SWE-Gym and required every suspected labeling error to be reproduced through execution rather than judged from model text alone. Among tasks never solved by a 9B base model, 74% contained false-negative tests that rejected valid fixes; among tasks the model sometimes solved, the rate was only 20%. These are conditional statistics, not a claim that 74% of the entire dataset is mislabeled. They do show that low pass rate conflates genuine solver weakness with incorrect test labels.

How incorrect rewards distort policy learning

False negatives and false positives damage policy optimization in different ways:

  • A false negative assigns zero reward to a valid patch. When frequent, this teaches the policy that correct repair behavior is undesirable and injects gradients that point away from useful solutions.
  • A false positive assigns one reward to an incorrect patch. It directly rewards superficial fixes, test-specific behavior, and other forms of reward hacking.
  • Difficulty-selection bias appears when every never-solved task is treated as intrinsically hard and deleted. That can remove tasks whose tests were merely too strict while leaving reward defects in the retained set.

Pass rate therefore reveals whether a task yields reward, not whether that reward is correct. Solve failure and test validity must be measured separately.

What the audit actually does

The pipeline follows a reproducible sequence:

  1. Apply reference and candidate patches in an isolated execution environment and reproduce the test verdicts.
  2. Re-execute suspected errors, separating false negatives that reject correct fixes from false positives that admit incorrect ones.
  3. Repair defective tests or remove tasks that cannot be repaired reliably, retaining execution evidence for each verdict.
  4. Retrain policies with equal dataset size and matched difficulty to isolate reward quality from simple curriculum filtering.
  5. Evaluate the resulting policies on held-out tasks from SWE-bench Verified and SWE-bench Pro.

The SWE-Gym-Verified release contains 1,087 audited tasks, execution evidence for every verdict, training splits, and the full audit pipeline. That is more useful than a list of cleaned task IDs because each retained, repaired, or removed label can be traced to an executed result.

Measured results and engineering trade-offs

| Observation | Reported result | Engineering implication | |---|---:|---| | False negatives among tasks never solved by the 9B model | 74% | Unsolved does not automatically mean hard | | False negatives among tasks sometimes solved | 20% | Test strictness varies with observed solver ability | | Held-out gain from audited training versus original training | +2.4 and +2.7 points | Reward cleaning can add value beyond task count | | Simply dropping never-solved tasks | No corresponding gain | Difficulty filtering is not a substitute for label auditing | | Incorrect patches among all passing patches | About one quarter | Test coverage has a substantial gap | | New tests catching about one quarter of those false positives | No detectable held-out change | False positives may not be the immediate bottleneck, or the test may lack statistical power |

The 2.4- and 2.7-point gains under equal-size, difficulty-matched conditions are the most useful practical evidence: they support reward auditing as a more effective intervention than simply deleting difficult examples. The experiment, however, combines test repair and task removal, so the summary alone cannot attribute the entire gain to repair or generalize it to larger models and different RL algorithms.

The lack of a detectable gain after adding tests that catch some false positives does not make test augmentation worthless. Possible explanations include a small affected fraction of the training set, policies that do not yet exploit the uncovered loopholes, insufficient evaluation power, or a bottleneck unrelated to false positives in the tested regime.

Auditing also has a real cost. Every candidate patch may require a full test replay in a realistic dependency environment. Network access, random seeds, clocks, dependency drift, and test ordering can make verdicts irreproducible. A reference patch is only one valid solution: overly strict tests may reject behaviorally equivalent but structurally different fixes, so checking only whether the reference passes is insufficient.

Deployment guidance

  1. Prefer executable evidence over unsupported labels. Use SWE-Gym-Verified as a starting point for RL or supervised training, but preserve verdict logs, patches, and test output so the audit chain remains reconstructable.
  2. Run label audits in data CI. Periodically test proprietary tasks for false negatives and false positives. A suspected verdict must be reproduced before labels are changed; model self-reports are not enough.
  3. Use hermetic test environments. Pin dependencies, seeds, timezone, and clock behavior, disable unnecessary network access, and standardize patch application and test selection.
  4. Test both rejection and acceptance errors. Combine repaired strict tests with mutation testing, boundary assertions, and counterexample patches to find incorrect implementations that incorrectly pass.
  5. Run matched comparisons. Keep model family, rollout budget, optimization steps, dataset size, and difficulty strata fixed across conditions. Use multiple seeds and report absolute scores with confidence intervals.
  6. Control benchmark contamination. Held-out sets must not influence task repair, hyperparameter selection, or test generation; otherwise SWE-bench gains may reflect leakage rather than cleaner rewards.

What remains unproven

The supplied material does not identify the two LLM families in full, nor does it disclose the RL algorithm, hyperparameters, compute budget, absolute scores, variance, statistical significance, or licensing for the data and pipeline. The 74% and 20% figures depend on whether a particular 9B model ever solved a task and cannot be interpreted as universal dataset error rates. Likewise, the absence of a measurable effect from added false-positive tests is difficult to interpret without information about test power.

SWE-Gym-Verified is therefore best treated as a reproducible data-quality research artifact, not a universal recipe guaranteeing better coding models. Its durable contribution is the shift from measuring solve rate to auditing reward correctness, backed by executable artifacts that let other teams reproduce and extend the analysis.


Source: Hugging Face Daily Papers (2026-11-23)

— END —

Tags: #SWE-Gym #Coding Agents #Reinforcement Learning #Reward Label Auditing #SWE-bench

Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.

What's your take on this story?
🚀 Explore & Submit Works

Community Comments

Loading live comments and annotations…