Why Pure Reinforcement Learning Post-Training Can Multiply Coding Performance
This article explains why pure reinforcement learning (RL) post-training can dramatically improve a model's coding and agentic capabilities, and why benchmark scores often overstate the real gains. It breaks down how RL reshapes an existing model's output distribution through verifiable rewards, the engineering infrastructure required, and the capability trade-offs that can degrade writing and tool use. It also details three amplification effects behind inflated scores—shared benchmark and training ownership, harness differences, and narrow versus broad optimization targets—and offers practical guidance for building a trustworthy evaluation system with fixed harnesses, private regression sets, layered metrics, and capability gates.
1. The Phenomenon: A “Doubling” Score Jump and the Real Question Behind It
A noteworthy class of results has recently emerged in the field: a team took a general-purpose large model as its base and applied pure reinforcement learning (RL) post-training only, pushing coding task performance well beyond the base model—on some public leaderboards, to more than twice the base level. Such results are easily read as an “algorithmic breakthrough.” But once you lay out the training pipeline, the evaluation environment, and the leaderboard design together, it becomes clear that capability improvement and score jumps are two different things: the former is a reshaping of the model’s behavior distribution, while the latter depends heavily on whether the evaluation conditions are friendly to the training objective.
This article does not focus on any specific product. Instead, it abstracts the phenomenon into a general technical question: how to significantly improve a model’s coding and agentic capabilities through post-training, and how to build an evaluation system that is not misled by “lottery-style” benchmark scores.
2. Mechanism Breakdown: What Pure RL Post-Training Actually Changes
The core of pure RL post-training is not injecting new knowledge into the model, but reordering preferences on top of existing capabilities. Base models usually already possess code comprehension, syntax generation, and basic reasoning abilities, but their output distribution is mixed with a large number of candidates that “look right but don’t actually run.” RL works by using verifiable rewards (for example, whether unit tests pass, whether static checks report errors, whether a patch reproducibly fixes the target defect) to concentrate probability mass onto the few solutions that are genuinely executable.
The idea can be understood with a minimal reward pseudocode:
def reward(sample, repo_snapshot):patch = extract_patch(sample)if not applies_cleanly(patch, repo_snapshot):return -1.0 # Patch does not apply; strong negative rewardif fails_smoke_test(patch):return 0.0 # Basic validation failedif not passes_target_tests(patch):return 0.2 # Only fixed the surface issueif regresses_other_tests(patch):return -0.5 # Introduced a regression; penaltyreturn 1.0 # Target fixed with no regression
Three points are key to this design. First, the reward must be automatically判定—that is, automatically determinable—otherwise RL degrades into fitting a reward model. Second, “introducing regressions” must be explicitly penalized, otherwise the model learns shortcuts like “delete tests, alter assertions.” Third, sampling difficulty must be tiered; repository-level tasks have extremely low success rates, and using only ultra-hard samples makes the gradient signal so sparse that it cannot converge.
Engineering typically requires three types of infrastructure: a reproducible sandbox execution environment (containerized isolation, pre-installed dependencies, restricted network), a large pool of verifiable tasks (automatically constructed from historical commits and defect-fix records), and an efficient sampling and filtering pipeline (rejection sampling + difficulty tiering + deduplication). These three determine the “effective throughput” of RL, not merely the scale of compute.
3. The Capability Seesaw: Why Writing and Tool Use Drop When Coding Gets Stronger
When post-training changes the output distribution, it is zero-sum-ish: probability mass is pushed toward code-solving paths, so general expression, long-form writing, multi-turn office tasks, and some tool-calling strategies get squeezed out. It is commonly observed in the industry that after specialized coding post-training, a model’s relative decline on general writing, open-ended Q&A, and some agentic tasks is not rare at 20% to 50%; meanwhile, a version that strengthens tool-calling may see coding performance fall back.
For maintainers of open-source base models, the goal is to deliver a “well-rounded, balanced” model, so they will not put the entire post-training budget on a single dimension; a specialized model serves only one objective and can naturally go more extreme on that dimension. This explains why “a specialized model leading a general model by a large margin on a single leaderboard” is the norm rather than an anomaly.
Mitigation approaches include: mixed task ratios (code, math, writing, and tool-calling sampled by weight), parameter isolation (loading multiple sets of adapters by scenario), and staged training (first balanced alignment, then light specialized reinforcement, while keeping a general-capability regression gate).
4. Why Scores Are “Inflated”: Three Amplification Effects
First: the leaderboard and the training share the same origin. When the evaluation leaderboard and the trained model come from the same team, the standard-setters naturally know the scoring rules best. New leaderboards often deliberately leave prompts open-ended, no longer fixing requirements in place, but instead adding many “single-veto” items by the strict standard of open-source maintainers reviewing merge requests: if only a defect on one path is required to be fixed but a similar path is left unhandled, or existing input types in the repository are not supported, the score is judged zero directly even if all standard unit tests are green. Without targeted adaptation, any model will lose points on such leaderboards.
Second: harness differences. The same base model can differ by several percentage points across different agentic frameworks. The reason is that prompt templates, context organization, tool sets, and retry strategies all change actual behavior. A comparable magnitude: the same model scores about 19.9% on one execution framework, about 22.0% when switched to a self-built command-line toolset, and about 25.5% when switched to the evaluator’s general framework—the model didn’t change, the environment did.
Third: the width of the objective function differs. A specialized model only needs to “write code well,” while a general model must also cover multimodality, long text, office work, and research; its capacity and training budget are spread thin, so it naturally loses out on a single leaderboard.
5. Practical Advice for Developers: Make Evaluation a “Trusted Asset”
- Fix the harness before comparing models. All candidate models use the same prompts, the same tool set, and the same timeout and retry strategy; record the framework version and prohibit mid-way changes.
- Build a private regression set. Construct tasks from your own repository’s commit history, covering three hard constraints: “multiple paths for the same defect,” “compatibility with existing input types,” and “no regressions allowed,” to avoid being led astray by public leaderboards.
- Layered metrics rather than a single score. At minimum, distinguish: applicability rate, target test pass rate, regression introduction rate, average lines changed, and time spent. A single accuracy figure is easily polluted by “delete-the-tests” shortcuts.
- Capability matrix gate. Before release, run regressions on general writing, long-form summarization, tool-calling, and multi-turn dialogue, and set a maximum allowed decline relative to the base to prevent the seesaw from getting out of control.
- Align cost and stability. Use container platforms for environment isolation, object storage to save task snapshots, and logging services with monitoring and alerting to track sampling success rates and failure clusters, turning “score lotteries” into reproducible engineering metrics.
6. Conclusion
A several-fold improvement in coding ability is fully explainable technically: verifiable-reward-driven post-training compresses existing capabilities onto high-success-rate paths; while the doubling on leaderboards is often amplified by shared-origin scoring, harness differences, and specialized objectives. For engineering teams, what is truly worth investing in is not chasing public leaderboards, but building an evaluation and training loop that is environment-controllable, layered in metrics, and gated by capabilities—this determines whether model capabilities can be reliably translated into business value.
