How Pure Reinforcement Learning Doubled a Coding Model's Benchmark Score
This article examines how a coding model doubled its score on algorithm benchmarks through pure reinforcement learning on an existing base model, while frontend metrics such as UI and style replication regressed. It breaks down the general pipeline behind the gain—base model selection, verifiable rewards, sampling and filtering, and multi-agent cost layering—and presents a controlled experiment design for isolating post-training effects. It also explains why frontend capabilities regressed and how to address it, then closes with practical recommendations on evaluation, scheduling, reward engineering, regression monitoring, and platform support.
1. The Signal: Capability Gains Are Not Uniform Progress
A recent model iteration is worth attention: a new version of a coding tool kept the same underlying base model and relied entirely on continued reinforcement learning (RL) on top of that strong base. The result was a score on algorithm coding benchmarks more than double that of the previous generation. At the same time, an easily overlooked detail emerged: frontend-facing metrics such as UI replication and style replication regressed.
This shows two things. First, the post-training stage—especially RL—can significantly reshape a model’s capability distribution on verifiable tasks without rebuilding the base. Second, the capability structure is reshaped by the optimization objective: directions covered by reward signals are amplified, while uncovered directions are relatively squeezed out.
It is worth stressing that cross-version, cross-configuration benchmark comparisons are only a trend reference. Sampling temperature, context length, tool permissions, and sub-agent scheduling policies all affect results, so absolute numbers detached from the evaluation setup are not comparable.
2. Method Breakdown: A General Path to Better Coding via Pure RL
2.1 Base Model Selection: Treat Existing Capability as a Stock to Mine
Pure RL assumes the base model already has enough code knowledge and reasoning potential. RL does not inject new knowledge; it raises the sampling probability of existing knowledge along correct paths. So the stronger the base, the more obvious the gains. When the base is insufficient, RL easily degenerates into overfitting the reward model.
2.2 Verifiable Rewards: A Natural Fit for Coding
Coding is one of the few domains where answers can be judged by a machine, which makes it an ideal RL scenario. Common practices include:
- Unit test pass rate as the main reward;
- Compilation and static checks as process rewards;
- Complexity, runtime, and memory usage as efficiency constraints;
- Patch size and change scope as a “minimal change” preference term.
An illustrative way to organize the reward (pseudocode):
def reward(patch, tests):if not build_ok(patch):return -1.0passed = run_tests(patch, tests)base = passed / total(tests)penalty = 0.05 * changed_lines(patch) # discourage meaningless changesbonus = 0.1 if within_time_limit(patch) else 0.0return base - penalty + bonus
2.3 Sampling and Filtering: Let Correct Trajectories Reinforce Themselves
The mainstream approach is a closed loop of “sample—verify—filter—update”: sample multiple solution trajectories for the same task, filter them with test results, and let only the passing ones participate in the policy update. Context length (e.g., the 256k level) and multi-turn tool-calling ability determine whether the model can complete long-chain tasks such as “read the repo—locate—modify—self-test.”
2.4 Multi-Agent Systems and Cost Layering
In engineering practice, a layered setup of “main model + secondary model + sub-agents” is common: the main model handles planning and key decisions, while the secondary model takes on high-frequency, low-difficulty work such as retrieval and batch edits to control cost. This combination directly affects team competition results and explains why “switching partners” causes large swings.
3. Controlled Experiment Design: From “Who Is Stronger” to “Why Stronger”
The most valuable part of the original discussion is a well-designed set of controlled experiments. Abstracted, it yields the following paradigm:
| Group | Configuration | Purpose |
|---|---|---|
| Baseline | Strong model + general partner | Establish a reference |
| Partner swap | Strong model + lightweight same-family model | Test the “partner drags it down” hypothesis |
| Top-tier swap | Strong model + top general model | Observe the ceiling lift |
| Same-source control | Base + post-trained version of the base | Isolate the post-training gain |
| Experimental | Base + pure RL version | Quantify the target gain |
From the trend data, the same-source control (38.9% before post-training vs. 58.2% after) clearly quantifies the net gain from RL. Meanwhile, the “strong model + top general model” combination reached a score as high as 84.5%, showing that system capability depends heavily on the collaboration structure rather than the absolute level of a single model. The difference in rankings between individual and team competitions supports this too: the same model ranked 6th in the individual competition but fluctuated up and down in the team competition depending on the combination structure.
4. Why Frontend Capability Regressed and How to Fix It
The regression is not accidental but an inevitable result of the optimization distribution:
- Missing reward: Pixel-level replication and cross-browser compatibility are hard to judge automatically, so there is no stable reward.
- Sampling squeeze-out: Long-chain algorithm tasks take up training compute, diluting style-related trajectories.
- Preference shift: The model favors “testable correctness” over “visual replication.”
Feasible fixes include: introducing a structured similarity score based on rendered screenshots, using the structural-tree alignment between the design mockup and the implementation as a proxy metric, keeping a certain proportion of frontend tasks in the mixed training mix, and setting explicit constraints for “minimal necessary changes” to avoid over-refactoring style code.
5. Practical Recommendations
- Evaluation first: Fix temperature, context, tool permissions, and sub-agent policy before comparing versions.
- Layered scheduling: Route models by task difficulty to balance quality and cost.
- Reward engineering: Make the main reward verifiable, auxiliary rewards proxy-based, and negative constraints risk-controlling.
- Regression protection: Build a separate dashboard for frontend and documentation tasks to prevent single-metric optimization.
- Platform support: Use a container platform for isolated execution, object storage to save artifacts, and logging and monitoring/alerting services to track the full training and evaluation pipeline.
6. Conclusion
The essence of “doubling the benchmark score” is efficiently unlocking the latent capability of a strong base through verifiable rewards, not the model becoming more “knowledgeable.” Understanding this is the key to setting the right expectations: algorithm capability gains are reproducible and measurable, while capabilities not covered by rewards need to be actively filled in through evaluation and training mix.
