Surging Scores in RL-Trained Coding Models: True Breakthrough or Evaluation Bias?

    Recently, claims that reinforcement learning (RL)-trained coding models have doubled their benchmark scores have sparked intense debate in the developer community. This article dissects the technical realities behind such surging scores, examining both the RL training methodologies—such as cost-penalized rewards and rollout length stabilization—and the evaluation biases that might inflate these numbers. It provides developers with a rational framework to assess model capabilities and adopt effective RL techniques for their own coding agents.

    Recently, a controversial phenomenon has emerged in the field of coding agents: a team claimed that their new generation coding model, trained via Reinforcement Learning (RL) based on an open-source foundation model, achieved more than twice the score of an upgraded foundation model in code benchmarks. This result has triggered intense discussions in the developer community—some consider it a substantial breakthrough in training methodology, while others question the credibility of the benchmark itself. This article will technically deconstruct the real reasons behind such “surging scores” to help readers establish a rational framework for evaluating model assessment results.

    I. What Does RL Training Actually Do?

    Based on public technical discussions, the training improvements of such models primarily focus on three directions, rather than disruptive architectural innovations.

    1. Improvements in Training Data and Stability

    When applying RL to coding tasks, the core challenges lie in the sparsity and noise of environment feedback. Teams typically optimize the following aspects:

    • Data Quality: Filtering out tasks with incomplete test cases or multiple reasonable solutions, retaining samples with clear evaluation criteria.
    • Training Stability: Employing gradient clipping, KL constraints, and sampling temperature scheduling to prevent policy collapse during long training processes.
    • Long-Horizon Task Support: Enabling the model to complete bug fixes in real repository scenarios involving multi-file and multi-turn edits, rather than just single-function completions.

    2. Refined Reward Function Design

    Two key technical points mentioned in the discussions are worth analyzing in depth:

    Cost-Penalized Reward Function. In agent tasks, if the reward is solely based on “whether tests pass,” the model tends to perform a large number of exploratory actions (repeatedly reading files, running commands), leading to out-of-control inference costs. By introducing a cost penalty, the reward can be expressed as:

    1. reward = pass_bonus - λ · step_cost - μ · token_cost

    This guides the model to learn a balance between “ensuring correctness” and “controlling overhead,” producing more efficient action trajectories.

    Length-Weighted Reward Baseline. In policy gradient methods (such as GRPO/PPO algorithms), a baseline value must be subtracted from each sample to reduce variance. If the rollout lengths vary dramatically (ranging from a few hundred tokens to tens of thousands), a uniform baseline will introduce systematic bias. Calculating the baseline with length weighting allows long and short trajectories to be evaluated for advantage on comparable scales, mitigating degradation phenomena like “the model becoming increasingly verbose” or “premature truncation.”

    3. Rollout Length Oscillation Problem

    A widely recognized pain point in long-horizon code task training is that rollout lengths oscillate violently during training—some checkpoints produce extremely long trajectories, while others suddenly shorten them, leading to unstable policy update directions. Solving this issue often requires combining length-normalized advantage estimation, curriculum-based task scheduling, and reward shaping. This is one of the few genuine highlights in such work.

    II. Why is the Score Gap So Large? Three Possible Reasons

    Even if the training methods are effective, a “twofold” gap remains anomalous. Based on community analysis, factors at the evaluation level likely contribute a significant proportion of this gap.

    Reason 1: Same-Origin Benchmarks and “Hidden Test Criteria”

    The most controversial point is that the code benchmark where the score gap is most obvious happens to share the same origin as the model in question. The new version of the benchmark underwent massive changes compared to the old one, causing scores across almost all models to plummet. The core changes include:

    • Intentional Prompt Blanks: Instead of rigidly specifying requirements, it simulates the standards of open-source maintainers reviewing PRs, incorporating many “veto” criteria.
    • Implicit Requirements: For example, if a problem only requires fixing a defect in Path A, but a similar issue exists in Path B and is not incidentally fixed, or if existing input types in the repository are not accommodated, the model will be scored zero even if standard unit tests pass.

    In such “non-public syllabus” evaluations, the team most familiar with the scoring criteria has a natural advantage. Models without targeted training will inevitably suffer on this leaderboard regardless of their actual coding capabilities—a risk known in the industry as “leaderboard overfitting.”

    Reason 2: Coupling of Evaluation Harness and Training Environment

    The official scores were generated on the team’s proprietary command-line agent framework (Harness), and the model itself was trained via RL within this exact same Harness. The model is intimately familiar with the tool-calling protocols, context organization methods, and error feedback format distributions. Transferring it to other harnesses will naturally degrade performance; conversely, external models entering this environment are fighting an “away game.”

    Reason 3: The Truth Revealed by Third-Party Evaluations

    Cross-harness comparison data is highly illustrative: the same external model achieved a pass rate of about 19.9% on the team’s harness, increased to 22.0% when using their official accompanying tools, and reached 25.5% when placed on a general agent framework from a neutral evaluation institution. A single model exhibiting over a 5-percentage-point fluctuation solely due to different running environments indicates that a substantial portion of the so-called “twofold gap” stems from environment adaptation rather than inherent model capability.

    III. Takeaways for Developers

    1. Check Evaluation Conditions First: Whether the benchmark shares the same origin as the model, whether the harness is coupled, and whether targeted training was conducted—these three factors determine the reference value of the score.
    2. Cross-Verify with Neutral Third-Party Evaluations: Average performance across multiple environments and frameworks reflects true capability better than peak scores on a single leaderboard.
    3. Focus on Training Methods, Not Marketing Numbers: Techniques like cost-penalized rewards, length-weighted baselines, and rollout stability control are transferable and reusable skills. Regardless of benchmark controversies, these methods themselves offer valuable insights for teams training coding agents.
    4. Prioritize Business Needs for Implementation: Conducting small-scale tests on your own repositories and toolchains is always more reliable than leaderboard numbers.

    In conclusion, such “surging scores” are likely the result of a combination of “genuine methodological improvements” and “favorable evaluation conditions.” The methodological progress is worth learning, but maintaining a degree of skepticism regarding the numbers never hurts. For teams looking to build similar capabilities, they can leverage general computing power and model training services provided by platforms like Baidu AI Cloud to validate the actual benefits of these RL techniques on their own business data.