potentialpaper

Reinforcement Learning for Code Optimization

Pierre Chambon, Kunhao Zheng, Juliette Decugis, Benoît Sagot, Gabriel Synnaeve

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

TL;DR. Correctness RL works for code; runtime rewards are harder. We make execution time usable for RL and improve generated code optimization without losing correctness.

Abstract. RL for code correctness is now established: have the model generate a program, run it against hidden test cases, and reward solutions that pass. Extending this to code optimization seems straightforward: just add execution time to the reward. But in practice, once timing drives the reward, small problems in measurement noise, reward sparsity, or Group Relative Policy Optimization (GRPO) instability overwhelm the signal and make RL fail: generated solutions are barely faster, and more of them can fail. We make execution time learnable through three stages: (1) how code is tested, by building DMC-Optim with large optimization tests and a calibrated sandbox; (2) how speed is turned into reward, by composing correctness and speed in the RL environment and using an offline simulator to predict the most promising configurations; and (3) how the model learns from that reward, by adapting GRPO and evaluation to the sparser, noisier timed-execution setting. On DMC-Optim, the strongest optimization-aware configurations improve pass@1 under a top-50% speed threshold from 18.0% to 31.3% on Qwen 2.5 7B and from 30.7% to 50.4% on CWM 32B. Under a top-30% threshold, these gains further increase, with CWM 32B showing 125% relative improvement, while pure-correctness scores remain stable. When the timing sandbox is degraded, robust optimization RL reaches roughly 100%–200% improvement over standard RL with verifiable rewards (RLVR), depending on the evaluation criterion. On LiveCodeBench (LCB), CWM 32B wins up to 83% of median-sample speed comparisons against standard RLVR. Relative to the fastest correct human submissions per problem, it reaches about half the human rate of complexity-class improvements (13% vs. 22%).

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
4 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]PDF[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:48 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

(a) Scientific claims and findings

This paper develops an RL pipeline for generating code that is both correct and efficient. Its contribution is an integrated recipe: calibrated execution, correctness-gated timing rewards, offline reward screening, and adaptations of GRPO, with evidence on code-optimization benchmarks and LiveCodeBench transfer. The response clarifies the joint correctness-efficiency interpretation, statistical reporting, and limits of the claimed online-RL advantage.

(b) Main strengths

The paper tackles a genuinely difficult reward-design problem and does so carefully. Reviewers yAc4 and F6zD recognized the value of calibrated timing, negative controls, and safeguards against rewarding broken code; Reviewer acUQ valued the end-to-end execution pipeline and transfer evidence. The integrated empirical contribution is meaningful even though no single component is a new RL algorithm.

(c) Main weaknesses

The work is limited to a specialized Python setting and requires nontrivial execution infrastructure. Conditional speed-win metrics and single-checkpoint comparisons can overstate practical advantage if correctness, draws, or run variation are not reported jointly. The need for online live-timing RL rather than a matched offline alternative is also not fully established. These limitations restrict the scope of the result.

(d) Assessment of the author response

The response addresses the core interpretive issues by providing clearer joint accounting, uncertainty and sample information, and a more precise claim about what online interaction contributes. It also clarifies the closest comparisons and reproducibility boundaries. While the system remains specialized, the response resolves the central concern that improvements might be merely artifacts of conditional efficiency reporting.

(e) Reviewer discussion and response

Reviewer F6zD remained strongly positive, and the discussion appropriately distinguishes the value of the integrated use-inspired contribution from algorithmic novelty. Reviewers yAc4 and acUQ raised valid limitations about statistical support, comparators, and scope; these have been sufficiently addressed or appropriately qualified for the present contribution.

Final justification

I recommend acceptance as a poster. The paper provides a careful and useful end-to-end approach to RL-based code optimization and meaningful evidence for its intended setting. The camera-ready should retain clear joint correctness-efficiency reporting and explicit scope/reproducibility limitations.

Area Chair x2b5 · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

(a) Scientific claims and findings

This paper develops an RL pipeline for generating code that is both correct and efficient. Its contribution is an integrated recipe: calibrated execution, correctness-gated timing rewards, offline reward screening, and adaptations of GRPO, with evidence on code-optimization benchmarks and LiveCodeBench transfer. The response clarifies the joint correctness-efficiency interpretation, statistical reporting, and limits of the claimed online-RL advantage.

(b) Main strengths

The paper tackles a genuinely difficult reward-design problem and does so carefully. Reviewers yAc4 and F6zD recognized the value of calibrated timing, negative controls, and safeguards against rewarding broken code; Reviewer acUQ valued the end-to-end execution pipeline and transfer evidence. The integrated empirical contribution is meaningful even though no single component is a new RL algorithm.

(c) Main weaknesses

The work is limited to a specialized Python setting and requires nontrivial execution infrastructure. Conditional speed-win metrics and single-checkpoint comparisons can overstate practical advantage if correctness, draws, or run variation are not reported jointly. The need for online live-timing RL rather than a matched offline alternative is also not fully established. These limitations restrict the scope of the result.

(d) Assessment of the author response

The response addresses the core interpretive issues by providing clearer joint accounting, uncertainty and sample information, and a more precise claim about what online interaction contributes. It also clarifies the closest comparisons and reproducibility boundaries. While the system remains specialized, the response resolves the central concern that improvements might be merely artifacts of conditional efficiency reporting.

(e) Reviewer discussion and response

Reviewer F6zD remained strongly positive, and the discussion appropriately distinguishes the value of the integrated use-inspired contribution from algorithmic novelty. Reviewers yAc4 and acUQ raised valid limitations about statistical support, comparators, and scope; these have been sufficiently addressed or appropriately qualified for the present contribution.

Final justification

I recommend acceptance as a poster. The paper provides a careful and useful end-to-end approach to RL-based code optimization and meaningful evidence for its intended setting. The camera-ready should retain clear joint correctness-efficiency reporting and explicit scope/reproducibility limitations.

Reviewer acUQOpenReview ↗
Rating
5/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
4/4
Originality
4/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper studies reinforcement learning for generating code that is not only correct but also fast. The main contribution is that how authors convert execution time into reliable RL signal. In this case, authors conduct:

  1. they separate correctness tests from larger optimization tests and uses calibrated remote execution.
  2. they decompose efficiency into three phases to compute reward faithfully: pre/during/post-execution, with correctness enforced as a prerequisite for efficiency.
  3. Finally, GRPO is modified to handle sparse rewards.

Experiment shows that strongest configurations improve strict top-decile efficiency pass@1 from 18.1% to 27.7% for Qwen 2.5 7B, from 22.4% to 35.6% for Qwen 2.5 32B, and from 28.7% to 42.4% for CWM 32B. The paper also reports OOD speed improvements on LiveCodeBench, although some configurations trade.

Strengths and weaknesses

Strength:

  1. The paper clearly identifies efficient code generation as a distinct and practically important objective. Rather than naively adding runtime to a correctness reward, it treats timing as an end-to-end signal pipeline encompassing test construction, runtime measurement and calibration, reward design, and RL optimization. This framing is technically thoughtful and highly relevant to practical code-generation settings, where functional correctness alone is insufficient.
  2. The empirical results are promising, including OOD evaluation on the public LiveCodeBench benchmark. These findings suggest that the proposed method does not merely overfit to the targeted DMC-Optim setting, but can also elicit transferable efficiency improvements in generated code. I particularly appreciate the conclusion that the observed gains primarily arise from improved I/O handling and constant-factor optimizations.

Weakness:

  1. The reported speed win rates are conditioned on passing samples and exclude draws. Some optimization-trained models simultaneously reduce pass@1. Consequently, a high conditional win rate does not necessarily imply a higher probability of producing a solution that is both correct and faster.
  2. The paper demonstrates that timing-aware RL outperforms correctness-only RLVR, but it does not establish that online RL and live timing are preferable to simpler offline training using the same information. A single matched 7B comparison would help answer whether the complexity of the proposed online pipeline is necessary.
Questions
  1. How does the method compare with a simple offline efficiency-training baseline?
Limitations

yes

Final justification

I support this paper to be accepted. During rebuttal authors solved my concerns of weakness #1 and #2 by experiments and explanation with math. Overall, I think this is a solid work.

Formatting concerns

no

5 comments
Authors · RebuttalOpenReview ↗
Rebuttal

The rebuttal should be uploaded by the end of day (July 28th) AoE time. Thanks again for all the comments you shared.

Authors · CommentOpenReview ↗

We would like to thank the reviewer for the detailed summary of our contributions, and for underlining the significance and originality of the work. We split this rebuttal into two comments of up to 5k characters each (to account for the 10k character limit of the rebuttal).

Speed win rates

We agree that the paper did not define these win rates clearly enough, which limits the interpretation of the results.

Concerning the existing win-rate metrics reported in the paper, we apologize that their definition was unclear. They are not directly conditioned on passing samples, but the aggregation (best or median) favors correct samples. These metrics are more comparable to pass@20 than to pass@1, but they do suffer if the model outputs incorrect samples.

More specifically, for each problem/task, we generate 20 samples from each model and proceed as follows:

  1. Best sample win rate: select the fastest correct sample from each model, among the correct samples (if available)
  2. Median sample win rate: order each model's correct samples by execution time and select the median one (if available)
  3. If only one model has a correct sample, that model wins. If both have a correct sample, the model whose selected sample is more than 1% faster wins. If neither model succeeds, or if their execution times differ by at most 1%, the task is a draw.

The originally reported best and median win rates remove draws. And they fix the sampling budget, whatever the success rate of the model is. Therefore, if a model outputs many fast programs that are rarely correct, it can lose against a model that consistently outputs correct code, even if it is less likely to be well-optimized. Nevertheless, the aggregation includes a form of correctness oracle, so we should indicate in the paper that this metric corresponds to the following use case: "with an equal sampling budget, we want to know which model may work best when combined with inference-time search methods or execution feedback". Let NAN_A and NBN_B be the numbers of tasks won by A and B. The win rate of A is:

wA=NANA+NB.w_A=\frac{N_A}{N_A+N_B}.

As suggested by the reviewer, we therefore introduce a new metric that covers a different use case: what happens when one generation is selected randomly from each model, without any additional search or feedback? Which model is most likely to generate a correct and fast sample in one shot? For that, we now introduce the random-sample win rate, which compares every sample from model A with every sample from model B on each task. With 20 samples per model, this gives 20×20=40020\times20=400 comparisons. Every comparison uses the same rule: a correct sample beats an incorrect one; when both are correct, the sample that is more than 1% faster wins (we ablate this threshold later); otherwise the comparison is a draw.

For task tt, let Wt,i,jAW^A_{t,i,j}, Wt,i,jBW^B_{t,i,j}, and Dt,i,jD_{t,i,j} respectively denote the binary indicators of an A win, a B win, and a draw when comparing samples ii and jj. The per-task estimator of the random-sample win rate of model A is

p^A,t=120×20∑i=120∑j=120Wt,i,jA.\widehat p_{A,t} =\frac{1}{20\times20} \sum_{i=1}^{20}\sum_{j=1}^{20}W^A_{t,i,j}.

With TT evaluation tasks, we macro-average across tasks. The global probability of an A win is

p^A=1T∑t=1Tp^A,t.\widehat p_A =\frac{1}{T}\sum_{t=1}^{T}\widehat p_{A,t}.

We obtain p^B\widehat p_B in the same way. And finally, we explicitly compute the draw probability, as draws are no longer discarded for this metric:

p^draw=120×20×T∑t=1T∑i=120∑j=120Dt,i,j.\widehat p_{\mathrm{draw}} =\frac{1}{20\times20\times T} \sum_{t=1}^{T}\sum_{i=1}^{20}\sum_{j=1}^{20} D_{t,i,j}.

This way, every sample pair contributes exactly one outcome: A wins, B wins, or the pair is a draw (and the three probabilities therefore cover the full outcome space, i.e., p^A+p^B+p^draw=1\widehat p_A+\widehat p_B+\widehat p_{\mathrm{draw}}=1). We now compute the newly introduced win rates, and include the table below in the appendix (with more configurations for other model sizes). We share in this rebuttal only some of the best configs on CWM 32B (and as underlined by reviewer 1, we clarify the configuration names):

config A win = corr + speed B win = corr + speed draw = both fail + speed tie
two-gate continuous percentile ranking (qar) 30.7 [27.6, 33.9] 4.1 + 26.6 23.3 [21.1, 25.7] 6.0 + 17.3 46.0 [41.3, 50.3] 39.4 + 6.6
abs. 2s filtering 30.9 [27.8, 34.0] 3.8 + 27.0 22.9 [20.6, 25.4] 7.0 + 15.9 46.3 [41.6, 50.7] 39.7 + 6.6
top-30% percentile ranking (p30) 29.7 [26.4, 33.1] 3.0 + 26.7 23.7 [21.3, 26.4] 9.0 + 14.8 46.6 [42.0, 51.1] 40.5 + 6.1
top-50% percentile ranking (p50) 30.3 [27.1, 33.7] 3.5 + 26.8 23.5 [21.1, 26.0] 7.9 + 15.6 46.2 [41.6, 50.6] 40.0 + 6.2
Authors · CommentOpenReview ↗

Speed win rates (continued)

In particular, we now use bootstrapping to obtain confidence intervals, which we report in Table 2 for both the newly added random-sample win rate and the other win rates. And we use paired bootstrapping on the differences to verify that the gains are meaningful for our best optimization-RL runs compared to standard RLVR. With the new random-sample metric, because speed gains are limited on easy problems and many draws are due to both samples failing (around 40% of the pairs), the win rates are more compressed. We provide the following details as well (further expanded in the appendix of the paper) for the differences in win rates by problem difficulty:

config all (global) easy medium hard
qar +7.4 [+4.5, +10.4] ✱ +1.3 [−2.9, +5.8] +19.2 [+12.8, +26.7] ✱ +3.9 [+0.3, +7.9] ✱
filter_abs2s +8.0 [+4.6, +11.2] ✱ +4.1 [+0.1, +8.2] ✱ +21.4 [+13.9, +29.2] ✱ +2.6 [−1.7, +7.4]

This refines our discussion and conclusions: we keep the discussion on the original win rates, with the specification that they encompass the use case of relying on execution feedback at inference. On top of that, the random-sample win rate shows that overall, the optimization-RL models still outperform standard RLVR on out-of-domain data, even if some of the speed gains also come with a slight diminution of pure correctness (for instance, -3% for QAR LCB pass@1 compared to RLVR). On easy problems, the gains are not necessarily significant (using two-sided tests for conservativeness), and wins mostly come from speed differences. On medium problems, our RL runs significantly outperform standard RLVR, with similar numbers of correctness-based wins and 2.5 times as many wins due to speed. On hard problems, standard RLVR has more correctness wins than OptimRL has, but the latter still achieves significantly more speed wins, which outweigh the diminution in correctness. We provide further ablations, showing, for instance, that at a 5% tie threshold, the number of draws increases, but the relative win rate of OptimRL over standard RLVR also increases and is even more significant.

Offline RL

Thank you for underlining this limitation. We are narrowing down the claim made by the paper to clarify that our work is a comparative study in the online RL setting exclusively. This choice was made as online RL is an important part of frontier LLM releases, and we are presenting a way to include the optimization objective in this online RL loop. To the best of our knowledge, online and offline RL are not necessarily mutually exclusive, and iterative training can include an online training phase, then rejection-sampling SFT, and then further online RL, for instance. Nevertheless, we believe that a direct head-to-head comparison of online and offline RL may be outside the scope of the current paper: offline RL would imply a large number of choices, each requiring its own experiments and ablations, such as the algorithm, the method used to generate the offline data corpus, the construction of each preference pair ... We believe this also falls into the dedicated thread of research on online versus offline RL, which includes a variety of works [1, 2] arguing that online data is strictly superior, though recent work [3] reconciles some of the inherent off-policiness due to policy lag in distributed post-training. Finally, we conclude in the limitations of our paper that our results show we can make the optimization signal survive the noisier online RL loop; therefore, we believe that the same measurement and reward pipeline can be used to label offline data, which could be interesting as a replacement, or certainly as an addition to the current online training, to further boost performance.

References

[1] Lanchantin et al. “Bridging Offline and Online Reinforcement Learning for LLMs.” 2025. arXiv:2506.21495.

[2] Xu et al. “Is DPO Superior to PPO for LLM Alignment? A Comprehensive Study.” 2024. arXiv:2404.10719.

[3] Ritter et al. “LLMs Can Learn to Reason Via Off-Policy RL.” 2026. arXiv:2602.19362.

Changes made to the paper

  1. Reported our new metric scores, random-sample win-rate, in Table 2 and added CIs for all scores
  2. Improved analysis in Section 5 based on new win rates
  3. Included a new appendix with exact mathematical definitions of win rates and additional breakdown tables
  4. Narrowed down claims in the introduction and conclusion regarding our online RL setting, and discussed offline RL in the limitations and future work sections
Reviewer F6zDOpenReview ↗
Rating
3/6
Confidence
3/5
Quality
3/4
Clarity
2/4
Significance
3/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper addresses the challenging problem of applying Reinforcement Learning (RL) to code optimization—specifically, generating code that is not just correct, but execution-efficient. While RL with verifiable rewards (RLVR) has found massive success in improving code correctness, extending it to efficiency usually falls apart due to wall-clock timing noise, sparse rewards, and the tendency of optimization objectives to reward fast-but-incorrect code.

To overcome this, the authors introduce a three-part framework consisting of DMC-Optim, a Calibrated Remote Sandbox (CES), and a Robust Optimization RL training pipeline. DMC-Optim is a highly filtered and augmented dataset derived from DeepMind Code Contests, specifically curated to contain problems with meaningful execution-time variance. The CES functions as an execution environment designed to isolate wall-clock measurements from network or inference noise, paired with an offline simulator to screen potential reward setups. Finally, the Robust Optimization RL framework builds on Group Relative Policy Optimization (GRPO) and is specifically tuned to handle noisier, sparser timing signals.

The approach demonstrates substantial improvements in strict efficiency metrics across Qwen 2.5 and CWM model families, with successful zero-shot transfer to LiveCodeBench (LCB).

Strengths and weaknesses

Strengths

  • The paper rightly identifies a major pitfall in optimization RL: models exploiting continuous execution rewards by outputting lightning-fast, broken code. Enforcing correctness as an absolute prerequisite to efficiency credit avoids this behavioral collapse.
  • The authors build an offline simulator using sampled human solutions to isolate stable and discriminative reward functions.

Weaknesses

  • As mentioned in the limitations section, there is a limited scope with the big title “reinforcement learning for code optimization”. Software optimization in production typically spans massive repositories, compiler flags, multi-language bindings, and memory layouts. The generalizability of these exact execution-time dynamics to broader, real-world software engineering workflows remains unproven because the benchmark is entirely constrained to Python competitive programming.
  • The reliance on a highly specialized, isolated, and continuously calibrated remote code execution service (CES) presents a massive bottleneck for community reproduction. Replicating the exact environment dynamics to achieve stable online GRPO training will be deeply difficult for researchers without massive infrastructure backing.
  • The underlying RL algorithm (GRPO) is mostly modified via hyperparameter shifts (larger prompt batches, dropping zero-advantage contexts, omitting standard-deviation normalization). The algorithmic novelty on the machine learning side is relatively thin; the true innovation is located in the data engineering and environment modeling layers.
Questions

See weaknesses.

Limitations

yes

Final justification

The rebuttal clarifies the intended scope, reproducibility considerations, and the role of the GRPO component. However, the limited evidence for real-world software engineering transfer, heavy infrastructure requirements, and modest algorithmic novelty remain, so I maintain my score of 3.

Formatting concerns

N/A

2 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We are grateful to reviewer F6zD for the time taken to review our paper, and in particular for underlining the role played by the offline simulator in isolating promising optimization-RL environments, which indeed played a big role in identifying successful training setups.

Real-world software engineering transfer

We agree with reviewer F6zD that it would be great to see how the methods developed in the paper can transfer to broader software engineering settings. We already stated it in the limitations of the paper, but to make it clearer we reworked the conclusion of our paper to further discuss the transfer of the methods we developed on competitive programming to real-world repositories, which we believe remains out of scope of our paper:

""" The same correctness-efficiency gap we originally measured on competitive programming, where standard RLVR drops from 43.0% p100 pass@1 to 18.1% at p10 on Qwen 2.5 7B, and from 69.5% to 28.7% on CWM 32B, also appears on real-world software-engineering tasks, where it is, if anything, even more significant. On SWE-fficiency, at the time it was released, Claude 4.5 Sonnet produced correct patches 81% of the time but captured only 4.1% of expert speedup [1]. The gap between writing correct code and writing efficient code is therefore a problem that translates from competitive programming to SWE tasks as well.

RL methods to improve code generation correctness have already transferred from “playground” settings to real-world software engineering. The methods that enabled SWE-RL [2] to apply RL to real-world software engineering were developed first in less compute-intensive settings: GRPO was introduced on math problems through DeepSeekMath [3], and rule-based verifiable rewards and the <think> reasoning template were validated on math and competitive coding through DeepSeek-R1 [4]. SWE-RL adapted the reward and scaffolding for the real-world software-engineering domain, swapping execution-based rewards for text similarity because running code in real repositories was too expensive.

Efficiency has not yet been mastered on software-engineering tasks. Not only are software-engineering tasks harder and far more expensive to execute, slowing down RL iterations, but the challenges that make competitive-programming efficiency hard, that is to say measurement reliability, reward noise, and training instability, are all exacerbated on real-world software-engineering tasks. We see this work as a step toward a similar transfer for efficiency: it develops some methods in the competitive-programming “playground”, where the feedback loop is more easily handled, and may provide a basis for later adaptation to real-world software optimization. """

We also now further underline in the data section that we retain Python solutions only, and the reasons why. C++ is the dominant language in competitive programming, but it is also the most controlled setting for low-level speed: compiler optimizations, memory layout, and hand-tuned implementation details can dominate the methodology. Python is noisier and more overhead-heavy, which makes it the more demanding setting for a timing methodology that must operate inside an RL loop. If optimization RL can learn useful algorithmic changes in this noisier setting, we expect the same ideas to transfer to lower-overhead languages such as C++, although language-specific calibration would still be needed.

CES setup and reproducibility

We agree that running online optimization RL at scale requires significant execution infrastructure. Referring to the above point of discussion, this is in fact one of the reasons why we started with the competitive programming setup, instead of diving directly into real-world software engineering tasks, which are even more demanding in terms of execution resources.

To help with reproduction, we extended Appendix C in depth to document the measurement sandbox setup, and underline that an exact reproduction of our sandbox code is not necessarily needed, because what matters most is:

  1. isolating code timing from training worker contention, using a dedicated CPU pool
  2. controlling the resource envelope assigned to the sandbox, and keeping it fixed
  3. exposing failures and their categories explicitly
  4. controlling retries and concurrency
  5. and most importantly supporting calibration when the service state changes

Here is how our reframed Appendix C starts, explaining what our execution backend is:

""" A training or evaluation worker sends candidate code and tests to the execution service; this service schedules the code executions on managed virtual machine capacity, runs them in remote sandboxes, and returns execution statuses and durations. We mainly rely on isolation of each individual execution: each test (out of ~150 I/O tests per problem on average) runs under a 1 GB memory limit and a 10 s hard limit, and the execution capacity is provisioned so CPU cores are isolated and assigned to different sandboxed jobs rather than shared with RL rollout processes. Subsecond reward thresholds are applied after CES returns durations rather than by changing the service limit (this allows us to control the noise we allow). CES places execution behind a separately provisioned queue where concurrency can be controlled, retries are visible, and one submitted program is less likely to spill over into another through shared CPU or memory pressure. Compared to local execution, one isolated snippet of code on a fixed I/O test has substantially more overhead than if it were to be executed on the same worker CPUs, but the isolation this provides is way more beneficial in terms of stability of measurements under re-runs. We agree that building such a service at scale is an infrastructure problem in its own right.

Our backend is not assumed to be noiseless: it has service overhead, infrastructure failures, and timing drift. Its role is to put timing under one monitored remote backend whose failures can be retried and whose stored durations can be calibrated against fresh executions. Calibration is not performed continuously at each training step: the correction can be reestimated when the service environment changes, and our sensitivity experiments test whether different plausible training and evaluation calibrations change the conclusions. """

Then, our improved appendix C further details the more traditional local sandbox and why it fails for timing measurements, including strong re-run variance, online-RL CPU contention, and the collapse of our test scores in otherwise identical RL training runs using the local sandbox. We further describe the remote execution service, what fallbacks we implement when the infra is failing, and the variations we observe due to timing noise across training re-runs. Finally, we study timing measurement drifts, calibration, evaluation time sensitivity, and joint training-evaluation sensitivity. We also provide some ideas we had to further improve the stability of the sandbox in the future.

We agree that the RL-runs are expensive to run, and need good infrastructure backing, not only for the CPU pool for executions but also for the entire multi-node async-RL pipeline in the first place. It is not the easiest setting for researchers to get onboarded. We tried to provide a setting that balances cost of the experiments (doing code competitions instead of SWE, on 1k training samples instead of several tens of thousands, which does limit CPU resources needed for the executions, among other things) but we tried to still explore large models up to 32B parameters, in an online-RL execution-based training fashion, to confirm our methods are interesting at scale and for downstream production applications as well.

GRPO tweaks

We agree and do not claim a new RL algorithm. Therefore, we revised the paper to make sure there is no such ambiguity. The main contributions of the paper reside in generating new tests separating solutions by their efficiency along with a calibrated isolated measurement setup; exploring the space of RL environment formulations, how previous work fits in this space along with new formulations, and the rewards to be defined on top of them; using an offline simulator to explore this large space of potential configurations, most of which are degenerate, and testing only the most promising candidates with online RL. Concerning the GRPO recipe, we explain and provide ablations for the different choices we made, related to our specific timing-based training: among them, (1) why more same-prompt rollouts are needed; (2) why trainer batch size has to be increased; (3) why the standard-deviation normalization, as in Dr. GRPO, is especially harmful for our noisy setting; (4) why the token-weighted advantage with fixed horizon helps with our sparse rewards; and (5) how we tweak the async worker/trainer ratios, control the staleness of worker batches and dismiss any potential replay buffer to keep comparable within-batch timing-based rewards (and correct Monte Carlo baseline estimates).

References

[1] Ma et al. “SWE-fficiency: Can Language Models Optimize Real-World Repositories on Real Workloads?” 2025.

[2] Wei et al. “SWE-RL: Advancing LLM Reasoning via Reinforcement Learning on Open Software Evolution.” 2025.

[3] Shao et al. “DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models.” 2024.

[4] Guo et al. “DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning.” 2025.

Changes made to the paper

  1. Extended the conclusion to include a discussion about potential transfer to broader software engineering tasks.
  2. In section 3 on the data, explained the choice of Python.
  3. Shared further details in Appendix C, and documented in depth the measurement sandbox setup and all the RL experiments we did around it.
  4. At the beginning of section 5, further detailed our ablation results around our GRPO recipe.
Authors · CommentOpenReview ↗

Dear reviewer F6zD, just a gentle nudge to check whether the responses we provided solve your concerns, or whether you would like to further discuss them. Thanks again for your time :)

Reviewer yAc4OpenReview ↗
Rating
4/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

Extending RL to code optimization can become prone to inaccurate execution-time reward measurement noise, reward sparsity, and GRPO instability. This paper addresses this issue in three stages: building DMC-Optim (derived from the DeepMind Code Contests corpus) with large optimization tests that expose runtime spread, composing speed with correctness in a correctness-gated reward environment, and adopting GRPO for the sparser and noisier timed-execution setting. The measurement stage is the most convincing part. A calibrated remote execution service raises the stored-vs-fresh ranking correlation from 0.54 to 0.96, and the best configurations lift strict top-decile pass@1 from 18.1 to 27.7% (Qwen 7B) and 28.7 to 42.4% (CWM 32B) while mostly preserving correctness.

Strengths and weaknesses

My main concern is that the results are not grounded and no CI is given. The headline numbers in Tables 1 and 2 are single representative checkpoints with no error bars or significance tests, while the run-to-run spread reported later (Table 21) reaches up to about 2.7 pp on p10. That is comparable to the gaps separating several of the best optimization families from each other. So the gap to standard RLVR is believable, but the ranking among the strongest configurations may well sit within noise and is never tested statistically.

The novelty is around integration, not any individual tweak in training or algorithm. GRPO is from Shao et al. (2024), DMC-Optim is built on the DeepMind Code Contests corpus, and the individual GRPO tweaks (asymmetric clipping, dropping std-normalization, zero-advantage filtering, token-horizon normalization) echo prior DAPO-style work the paper itself cites. What is actually new is the combination: measure-before-reward, the correctness-gated reward taxonomy, and the offline simulator that screens configurations before expensive online runs. This is a fair contribution, but the closest prior systems (Afterburner, MaxCode) are only differentiated verbally and never run as baselines.

Some abbreviations or SOTA namings are not spelled out in the entire paper, like GRPO, which appears from the abstract onward but is never expanded to "Group Relative Policy Optimization" anywhere. Clarity suffers further because the 9-page body is not self-contained. The core reward equations, the environment operators (Table 7), and the GRPO objective that constitute the central contribution live only in the appendix, and the run-label abbreviations used throughout the body and Table 1 ("QP", "QAR", "MC+MO") are expanded only in Table 16 (Appendix F.2) and Appendix D.2, so a reader of the body alone cannot reconstruct what they compute. Figure 1 itself is overloaded, packing the dataset pipeline, the three intervention points, the gates c/g/q, the offline simulator, and the GRPO loop into one diagram.

Overall, this is a careful and unusually honest empirical paper on an important and under-served problem, with strong negative controls and a useful artifact and recipe. But it is held back by the missing error bars, the lack of any head-to-head against the closest prior work, an unreleased benchmark built from a self-selected, roughly 10% slice of DMC, a strongest model (CWM 32B) the authors did not decontaminate, and a central qualitative claim (the model learns I/O and constants, not algorithms) that rests on a single LLM judge with only 59% human agreement. As is, the reasons to reject slightly outweigh the reasons to accept.

Questions
  1. Using the run-to-run spread you already report in Table 21, which of the headline gaps in Tables 1 and 2 exceed that spread, and how many samples per task underlie the pass@1 numbers at temperature 1.0?
  2. How does your correctness-gated, reference-normalized reward differ technically from Afterburner's and MaxCode's formulations, and why was no direct comparison included?
  3. Why is your reproduced Dr. Kernel so much stronger than the published number, which baseline is the "up to 46%" computed against, and how much should the reader trust the "I/O and constants, not algorithms" conclusion given the judge agrees with humans only 59% of the time?
Limitations
  • Every headline number is a single checkpoint with no error bars or seeds, so several inter-family gaps may sit within run-to-run noise.
  • The scope is narrow (single-file Python competitive programming) on a self-selected, roughly 10% duration-filterable slice of DMC, and the benchmark is not released.
  • The strongest model (CWM 32B) is not decontaminated, and the central qualitative claim rests on a single LLM judge with only 59% human agreement.
Final justification

I have corrected the contribution type from Use-inspired to the authors' designated General and re-derived my assessment under General criteria: the application-need allowance is withdrawn, and the weight shifts to methodological generality and statistical reliability — the recipe (duration-separating tests, calibrated measurement, offline reward screening, GRPO adaptations for noisy sparse rewards) is a fair general empirical contribution, and its statistical layer, which was my main objection, is now addressed by the rebuttal's reruns, pooled-variance CIs, and the narrowed no-ordering-inside-the-top-group claim. Combined with the judge-validation clarification (95% human-checked labels; the 59% was a screening-filter pass rate) and the clean-decontamination scoping via the Qwen family, my recalibrated rating rises from 3 to 4 (borderline accept) with Clarity 2→3, contingent on the promised revisions; the unreleased benchmark and the argued-but-not-run Afterburner/MaxCode comparison are why it is not higher. For completeness: I also correct an error in my own Question 3, whose first clause was carried over from another review and did not apply to this submission; the authors identified it correctly.

Formatting concerns

No major formatting or anonymity violations.

2 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank reviewer yAc4 for the detailed review, and for stressing the real world applicability of the work. We detail below the enhancements made to address the points raised.

1. Confidence intervals and variability

We agree with the importance of measuring variability, especially for our new RL environments. Since the original NeurIPS deadline, we reran the RL trainings and obtained CIs.

First, at training time, we reran entire RL training runs (~3 to 5 runs per configuration, but for the baselines and most promising configurations we did up to 8 reruns), and used them to now display averaged scores in the main result tables. The baselines and successful optimization RL runs have similar variance. Therefore, we pooled the within recipe deviations of repeated launches and built a more robust shared variance estimate, as we have too few reruns to build per configuration training confidence intervals. Second, to get a sense of the amount of noise at test time, we had used the unbiased pass@k estimator with 20 generations and temperature 1. We now also bootstrap the test set problems to compute 1,000 bootstrap reruns for each table score. Third, taking into account variability from both training and evaluation, we conservatively added the two train and test variances to obtain a global confidence interval for each score.

Under these measurements of noise, the main optimization RL gains remain well above standard RLVR. At p10 on DMC Optim test (where an LLM solution passes if it is correct and ranks within the top 10% of human solutions), CWM 32B with top 30% post ranking RL improves by 13 pass@1 points over standard RLVR. Taking training variability alone, a difference above 2.1 points is statistically significant at 95%; using the bootstrap of test problems, a difference above 6 points is significant at 95% at evaluation time. The difference also remains significant when adding the two variances. We also stress that this is a conservative approach to measuring significance of the difference: it does not use paired bootstrap confidence intervals nor one sided tests, which would make the difference even more significant; we just add individual run's variances.

Under these measures of variability, we also adapted our comments on the differences between families of optim-RL runs. We detect that a vast majority of RL configurations are degenerate and lead to collapse, or at best unsatisfying scores. A group of top RL configurations (absolute pre execution filtering at 2s, ranked worst intra execution time limits using percentile 80%, and post execution ranking, either with a top 30% binary reward or a two gate reward) are the most promising and remain within the observed variance of one another. At larger scale with Qwen 32B and CWM 32B, we observe that the same families that performed poorly on Qwen 7B remain bad (and statistically significantly so), while the same set of top configurations remains strongest, including when changing to the out of domain LCB test set (extra RL runs on other configurations not in the original draft confirmed that). Finally, we adapted the discussion section to be clear that, taking noise and variability into account, the paper identifies a set of top configurations that perform best and significantly better than other configurations and baselines across different models and test sets, without claiming a reliable ordering inside this top group.

2. Comparisons with prior systems

We clarify the contributions in the introduction of our paper to state this more clearly: our contribution is a recipe and its empirical validation for online RL training of one shot code generators that achieve significant gains in the wall clock efficiency of generated code, while preserving correctness capabilities (or limiting the decrease to 4% on out of domain LCB). We construct duration separating optimization tests and a calibrated measurement setup; formulate various optimization constraints and how to implement them in RL environments, along with several reward possibilities; screen the space of environment/reward configurations with an offline simulator validated against online runs; and demonstrate consistent gains that transfer to larger model sizes and OOD.

In particular, although DMC Optim uses problems that are part of DMC (which we do for reproducibility and to build upon standard data used in the field), the optimization tests we create, the duration based filtering, and the execution calibration are all newly constructed.

We agree that the related work and the comparison with the closest settings were too limited. We extended this section to cover Afterburner and MaxCode, along with the differences and gains of our setting, in more depth. We believe a direct numerical comparison is not necessarily appropriate: Afterburner repeatedly edits an existing program relying on execution feedback, whereas MaxCode performs execution guided search with a frozen proposal policy. Our paper explores how to get the best performance when given a problem statement and generating an optimized solution in one shot, without execution feedback at inference. That means Afterburner would be using an inference time oracle in a head to head comparison with our model. Following the reviewer’s remark, it could be very interesting to combine methods and see how our trained policy could be used with inference search methods, so we included this in our discussion of limitations and future work.

We believe our submission does not reproduce, and did not aim to reproduce, Dr. Kernel [3]. Dr. Kernel consists of multi turn Triton kernel rewriting from a provided reference implementation using execution feedback after each turn, whereas our setup trains a policy for one shot generation without external feedback. Our CWM 32B results improve by 47.7% relative to the same model trained on the same problems with standard RLVR.

3. Clarity and abbreviations

We agree that the main paper was lacking details and was a bit obscure due to abbreviations not being properly introduced. We changed them all, including in the table rows. For instance, QP now reads “leaderboard-percentile post-execution ranking.” We also created an appendix that lists each row of Table 1, the mathematical definition of the environment, and a practical bullet list of what the environment does and how it evaluates a code snippet. We also improved Figure 1 clarity.

4. LLM as a judge validation

We agree that the 59% number was unclear and made the setup sound worse than it is. We apologize and believe this paragraph was shortened too much, so we lengthened that part. We use the LLM as a judge to classify types of program improvements. To filter out problems where the judge may not be accurate, we use a preliminary task asking the judge “which solution is the fastest,” knowing the answer from our execution stack. We use 10 LLM as a judge reruns, and if too many disagree with the expected ground truth, we treat the pair as “not classifiable”: GPT OSS classifies 68% of such pairs, and drops to 59% on the subset where the recorded duration differences are tighter, which is expected as the code implementations are probably closer.

We discard pairs deemed unclassifiable. On the 68% of classifiable pairs, we use majority voting over the GPT OSS reruns. With that, we obtain the category of code improvement and whether there is a complexity improvement. We perform a human review of these labels on the approximately 180 pairs for optimization RL versus human, and find them accurate in 95% of cases (the 14% rate of complexity improvement oscillates in the worst case between 9% and 19%). We use the exact same pipeline to compare the types of improvements of humans versus standard RLVR, for instance, and hope the comparative analysis can still provide insights as to the amount of progress a better RL trained model could achieve.

5. Scope and benchmark release

We train on a smaller dataset, mainly to improve iteration time and limit compute cost, but it is enough to display strong gains in a robust evaluation setup. We believe these gains would scale further if the dataset was larger. Especially as baseline RLVR even showed a decrease in performance under stricter optimization constraints as RL training progressed.

Python is discussed in the last paragraph of first answer section to reviewer F6zD.

Unfortunately, we are not able to release the underlying data, and we improved the appendix compared with the original submission to provide more details to reproduce the work. The core of our work remains the methods used to produce these results and their empirical validation.

6. Decontamination

CWM 32B is decontaminated against LCB. For DMC, during SFT (which we did not conduct ourselves), the model saw problem statements, including those in the test set, as well as sample OpenCodeReasoning trajectories, but not the reference human solutions used to frame the p90/…/p10 metrics. We believe it is interesting to see that the model with standard RLVR does not solve the task, while the model with optimization RL obtains significant gains over it.

On the contrary, Qwen 7B/32B are decontaminated against DMC Optim and LCB, as we conducted the SFT ourselves. They also show significant gains. We believe everything combined provides good insight into whether our methods work.

Changes made to the paper

  1. Averaged metrics across reruns in main tables and added CIs.
  2. Improved the related work section and comparison with the closest works.
  3. Improved evaluation calibration (Figure 4 already explores variations of test-time calibration), making evaluation stricter and further underlining gains over standard RLVR (we updated the scores accordingly in the paper).
  4. Improved the LLM as a judge discussion and validation.
  5. Changed obscure abbreviations and improved Figure 1 clarity.
  6. Improved environment definitions in appendix D
Authors · CommentOpenReview ↗

Dear reviewer yAc4, just a gentle nudge to check whether the responses we provided solve your concerns, or whether you would like to further discuss them. Many thanks for your time :)

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…