Why Coding Benchmark Scores Can Double After Reinforcement Learning: Scoring Rubrics, Harnesses, and Training Objectives
This article breaks down why the same coding model can produce very different benchmark scores. It examines three key variables: how strict-review benchmarks score patches, how the execution harness shapes model behavior, and how repository-level reinforcement learning with verifiable rewards can improve pass rates. It also outlines a practical checklist for distinguishing real capability gains from benchmark-specific overfitting, including private holdouts, time-split tasks, multi-metric evaluation, ablation studies, human review sampling, and reproducible evaluation pipelines.
1. The Phenomenon: Why the Same Model Can Score Twice as High
In code LLM engineering, a recurring phenomenon is that a base model may score modestly on a strict-review-style coding benchmark, while after one round of repository-level reinforcement learning, a later version in the same model family can raise the pass rate to more than twice that of the base model. At the same time, running the same model in a different execution environment—commonly called a scaffold or harness—can shift the score by several percentage points.
Taken together, these two observations show that a benchmark score is never a single-variable function of model capability. It is determined by at least three variables: the scoring rubric (how the benchmark judges answers), the execution harness (the tools and workflow in which the model operates), and the training objective (what the model has been optimized to do). The sections below break these down one by one.
2. Scoring Rubric: From Fully Specified Requirements to Open-Ended Prompts and Veto Items
Early code benchmark prompts often specified requirements very rigidly: which file and function to fix, what the expected output was, and which test cases to run. Such tasks could be scored as long as the model located the right place and made the right change.
A new generation of strict-review benchmarks changes this logic:
- Open-ended requirements. The prompt describes only the symptom and the reproduction path, without naming files or functions. The model must perform repository search, call-chain localization, and impact analysis on its own.
- Scoring by the standards an open-source maintainer would use to review a PR. Beyond functional correctness, the benchmark adds a set of veto items: whether the model also fixes the same issue in sibling code paths, whether it remains compatible with other input types already present in the repository, whether it introduces regressions, and whether it breaks existing abstractions or style conventions.
- Hidden tests. Publicly visible tests are only the tip of the iceberg. What really determines the score is the set of undisclosed boundary and regression tests.
This produces a typical scenario: the prompt asks only to fix a defect in path A, but path B has the same kind of issue; or the change covers only the main flow but does not remain compatible with a second input type already supported by the repository. Unit tests may all be green, yet the patch still receives 0 under the strict-review rubric.
An illustrative scoring logic can be written as:
def score(patch, repo, task):# Veto items: any failure returns zero immediatelyif not applies_cleanly(patch, repo):return 0.0if breaks_existing_tests(patch, repo):return 0.0if not covers_sibling_paths(patch, task):return 0.0if not backward_compatible(patch, task.known_input_types):return 0.0# Only after passing veto items is the score based on hidden-case pass ratereturn hidden_case_pass_rate(patch, task)
The key implication is that such benchmarks inherently penalize “general capability” and reward alignment with the scoring function. Whoever best understands the scoring standard can most easily gain points through targeted training. Models that have not been aligned to that standard generally lose points when the benchmark generation changes. This is a normal result of a rubric change, not necessarily a capability regression.
3. Harness: A Severely Underestimated Variable
The harness is the engineering layer wrapped around the model: the system prompt and tool descriptions, the available toolset (reading files, search, running commands, applying patches), context management and history trimming strategy, failure retry and self-check workflows, patch application and rollback mechanisms, and the termination conditions for multi-turn loops.
It is normal for the same model to shift by several percentage points when the harness changes, for straightforward reasons:
- Different tool descriptions and parameter conventions lead to different rates of valid call formats from the model.
- Different context-trimming strategies lead to different abilities to “remember key constraints” in long repository tasks.
- Whether there is a closed loop of “run tests—read errors—revise” directly determines the success rate of multi-turn repair.
- Whether patch application is tolerant (allowing fuzzy matching and auto-formatting) determines the loss from cases where the fix is correct but the patch is not applied.
Therefore, comparing scores across environments must be treated as an invalid comparison. The proper practice is to fix the model, fix the tasks, and change only one variable, while explicitly declaring the harness version and configuration in the report.
4. Training Side: How Verifiable Rewards Raise Scores
The biggest advantage of repository-level code tasks is that rewards are verifiable: whether tests pass and whether reviewer veto items are triggered can both be judged automatically, without human preference labels. This makes them an ideal setting for reinforcement learning. A typical pipeline is:
- Cold start: use a small number of high-quality trajectories for supervised fine-tuning so that the model first learns the tool-call format and basic workflow;
- Sampling: sample multiple rollouts in parallel on the same task to form positive and negative samples;
- Scoring: use a scorer isomorphic to the evaluation setup to assign rewards. Make “partial completion” a dense signal to avoid all-zero sparse rewards;
- Optimization: update with policy-gradient methods, together with a KL constraint to prevent capability collapse;
- Curriculum and denoising: bucket tasks by difficulty and filter out samples misjudged by the scorer.
The reward function needs explicit anti-cheating measures:
def reward(traj, task):r = 0.0r += 0.2 * format_and_tool_valid(traj) # process validityr += 0.3 * visible_tests_pass(traj) # dense intermediate signalr += 0.5 * reviewer_score(traj, task) # hidden cases + veto itemsif modifies_test_files(traj) or disables_checks(traj):r = -1.0 # tampering with tests / disabling checks is penalized directlyreturn r
In engineering practice, reward hacking must also be controlled: a model may learn to write branches that “look compatible” or to modify tests and configurations to fool the scorer. These paths must be blocked on the scorer side, and human spot checks should be retained.
5. How to Tell Real Improvement from Benchmark Gaming
A checklist for teams:
- Private holdout: reserve a set of repository tasks that never enter training or tuning, and look only at the curve on this set;
- Time split: construct tasks from issues/PRs that appeared after the training cutoff date, which is naturally contamination-resistant;
- Multiple metrics rather than a single metric: look at pass@1, review pass rate, regression introduction rate, average changed lines, per-task latency, and token cost together;
- Ablation experiments: change only one variable (scoring rubric / harness / training epochs) to confirm the source of the gain;
- Human review sampling: manually review samples with score gains to confirm that they are not merely format-level passes.
The evaluation itself should be built as a reproducible pipeline: version tasks and images, fix dependencies, isolate the execution environment with a container platform, store artifacts and logs in object storage, and send metrics and latency to a logging service and monitoring/alerting. This ensures that every benchmark run is traceable and comparable.
6. Conclusion
“Benchmark scores double after reinforcement learning” is usually not a single cause but the stacking of three things: the scoring rubric moving from lenient to strict review, training and evaluation using isomorphic verifiable rewards, and the execution harness remaining consistent with the training environment. For users, the truly valuable conclusion is not a particular score, but building an evaluation system that is controllable, reproducible, and contamination-resistant—only improvements observed on such a system are improvements that can transfer to production.
