# CodeScaler: Scaling Code LLM Training and Test-Time Inference via Reward Models

*Xiao Zhu, Xinyu Zhou, Boyu Zhu, Hanxu Hu, Mingzhe Du, Haotian Zhang, Huiming Wang, Zhijiang Guo*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/149471) · [OpenReview](https://openreview.net/forum?id=prz41cA9Og) · [alphaXiv](https://www.alphaxiv.org/abs/2602.17684) · [Open on the map](../papers.html#p149471)

Category: [LLM Agents, Evals & Benchmarks](../pcat/17.md) › [Tool-Augmented Agent Systems](../pgroup/256.md) · Type: new method · Keywords: reward model, code generation, reinforcement learning, test-time scaling, synthetic data

Areas: [Code & Coding Agents](../areas/codegen.md) › Code Generation and Optimization › Code Generation; [Evaluation & Benchmarks](../areas/evaluation.md) › Language Model and Agent Benchmarks › Code Generation Benchmarks; [RL for LLMs & Agents](../areas/llm-rl.md) › LLM Reasoning Reinforcement Learning › Reinforcement Learning for Reasoning

## Summary
CodeScaler is a reward model that scales reinforcement learning training and test-time inference for code generation, achieving significant performance gains on coding benchmarks and reducing inference latency.

## Explained to a 5-year-old
People want computers to write code that works. They give computers points for good code, usually by running tests. But getting good tests for every kind of code is hard and sometimes the tests are not reliable. The researchers found a new way to give points that works even when there are no tests. This new system also checks that the code follows the right syntax, so it doesn’t make mistakes. As a result, computers can write better code faster and with less waiting time.

## Explained to a 5-year-old, longer
Computers can be taught to write code by giving them points for good answers. Usually the points come from running the code and checking if it works with tests. But getting good tests for every kind of code is hard and sometimes the tests are not reliable. The researchers noticed this problem and wanted to find a better way to give points. They looked at many examples of correct code and decided which ones were better. Then they built a system that can give points to code even when there are no tests. This system also checks that the code follows the right syntax, so it doesn't make mistakes. By using this new reward system, computers can learn to write code more stably. It also works when you want to use the computer to think about a problem at test time. The new method can be used while training the computer, making it learn faster. It also speeds up the process when you just want the computer to answer a question quickly. As a result, the computer writes better code and does it with less waiting time.

## For a technical reader
The paper presents a reward model trained on preference data from verified code problems, using syntax-aware extraction and reward shaping to stabilize optimization. This model can be applied both during RL training and as a test-time scaling technique, delivering performance comparable to unit-test methods while cutting inference latency by tenfold. Evaluations show consistent gains across multiple coding benchmarks and the RM-Bench suite, including improvements without any test cases. The approach reduces reliance on scarce test suites and enables faster, more practical deployment of code-generation models.

## Problem
Scaling reinforcement learning from verifiable rewards for code generation is limited by the availability and reliability of high-quality test cases, making it difficult to train and evaluate code models at scale.

## Method
The approach trains a reward model on curated preference data from verified code problems, uses syntax-aware code extraction, and applies validity-preserving reward shaping to enable stable optimization. It can be applied both during reinforcement learning training and as a test-time scaling method for inference.

## Results
The approach improves performance by +1.55 points on Qwen3-8B-Base and +4.23 points on Qwen3-14B-Base across four coding benchmarks, achieves a +14.64 point gain on 44K synthetic problems without test cases, and reduces inference latency tenfold while matching unit-test performance. It also outperforms existing reward models on RM-Bench by +3.3 points in code and +2.7 points overall.

## Contributions
The paper introduces a reward model trained on curated preference data that enables stable scaling of RL training and test-time inference for code generation, and demonstrates its effectiveness across multiple benchmarks and domains. It also shows that the approach can replace unit tests with synthetic data, achieving comparable performance with much lower latency.

## Practical relevance
The approach makes large-scale code generation more practical by reducing reliance on scarce test cases and enabling faster inference, allowing teams to deploy code models on modest hardware.

## Research questions this paper is counted under

- [How can reinforcement learning be scaled efficiently for training reasoning models with long horizons and variable computational demands?](../q/286.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/149471)
