ScaleBox: Enabling High-Fidelity and Scalable Code Verification for Large Language Models

Jiasheng Zheng, Xin Zheng, Boxi Cao, Pengbo Wang, Zhengzhao Ma, Qiming Zhu, Jiazhen Jiang, Yaojie Lu, Hongyu Lin, Xianpei Han, Le Sun

TL;DR

ScaleBox is an open-source, high-concurrency code sandbox system designed to fix the accuracy and scaling bottlenecks in training Large Language Models (LLMs) with reinforcement learning. By automatically generating "Special Judges" for complex coding tasks and implementing fine-grained hybrid parallelism, it eliminates false negatives in code evaluation and boosts execution throughput by up to 2.6x over existing baselines.

What Problem Does This Paper Address?

Reinforcement Learning from Verifiable Rewards (RLVR) has become a dominant paradigm for boosting the reasoning and coding capabilities of LLMs. However, RLVR is only as good as its reward signal, which relies heavily on code sandboxes to execute and verify code correctness. Current sandbox infrastructures suffer from two massive flaws:

  1. The Exact Match (EM) Trap: Most systems simply check if a model's string output exactly matches a single canonical answer. This fails miserably for tasks with multiple valid solutions (e.g., "return any valid path in a graph") or floating-point math requiring precision tolerances. The authors found that EM falsely rejects a staggering 59.01% of correct ground-truth solutions for these types of problems, injecting severe noise into RL training.
  2. Efficiency Bottlenecks: Existing sandboxes use coarse-grained task scheduling and static deployments. This creates a computational asymmetry where GPUs are heavily utilized for model generation, but host CPUs sit underutilized instead of parallelizing code execution, choking throughput during large-scale training.

Methods

ScaleBox addresses these limitations through a three-pronged architectural approach:

  • Automated Special-Judge Synthesis: ScaleBox uses an LLM pipeline to automatically classify whether a problem requires specialized verification (e.g., due to non-determinism or floating-point tolerances). It then synthesizes a Python-based judge program (validate_solution) and runs it through a sandbox-based validation loop (testing for both true positives and true negatives) to filter out malformed judges.
  • Short-Circuit Verification: To maintain high efficiency, ScaleBox uses a two-stage approach. It first runs a cheap exact-match heuristic; the computationally expensive special judge is only invoked if the initial exact match fails.
  • Hybrid Parallelism & Distributed Architecture: Unlike systems that only parallelize at the instance level, ScaleBox parallelizes execution at both the instance and individual unit-test levels. Managed by an NGINX load balancer, it supports multi-node deployment, hot updates, and real-time resource monitoring via a web-based dashboard to fully exploit idle CPU resources.
[Incoming Task] ➔ [NGINX Load Balancer] ➔ [Code Extraction] ➔ [Parallel Unit-Test Execution]
                                                                        │
                                      ┌─────────────────────────────────┴──────────────────┐
                                      ▼                                                    ▼
                             [Exact Match Passes?] ───Yes───► [Pass]              [Exact Match Fails]
                                      │                                                    │
                                      No                                                   ▼
                                      └──────────────────────────────────────────► [Run Special Judge]
                                                                                           │
                                                                                  ┌────────┴────────┐
                                                                                  ▼                 ▼
                                                                               [Pass]            [Fail]

Datasets

The paper utilizes several datasets for analysis, training, and evaluation:

  • PrimeIntellect: A dataset of 34,757 Python problems used for the preliminary study on EM fragility. Subsets of this data were used for efficiency benchmarking (8,192 problems) and RL training (26K problems).
  • AetherCode: 27 highly complex competitive programming problems used to evaluate the fidelity and robustness of the synthesized special judges against human-authored gold standards.
  • Standard Benchmarks: HumanEval, MBPP, HumanEval+, MBPP+, and LiveCodeBench (v5 and v6 subsets) were used to evaluate the final performance of the trained models.

Key Insights and Ideas

  • The scale of the verification gap is massive: 14.57% of the 34,757 problems analyzed inherently require specialized verification. Relying on naive string matching means rejecting a massive portion of valid code, which severely biases gradients during RL training.
  • Cleaner rewards drive better generalization: Eliminating false negatives doesn't just help models solve non-deterministic problems; it stabilizes the entire training trajectory. Cleaner credit assignment allows the model to converge more efficiently on robust coding patterns across the board.
  • Unit-test level parallelism is a game-changer: Moving away from coarse-grained scheduling to executing individual unit tests in parallel unlocks significant throughput, resolving the host-accelerator imbalance that plagues multi-node RL clusters.

Key Results

  • High Judge Fidelity: The automated synthesis pipeline consistently generated highly accurate verifiers. Using Claude-3.7-Sonnet, the synthesized judges achieved a 96.3% True Positive Rate (TPR) and an 88.5% True Negative Rate (TNR) on complex AetherCode tasks.
  • Substantial Speedups: ScaleBox achieved a single-node throughput of 39.31 tasks/s, representing a 1.59x speedup over the verl framework and a 2.63x speedup over SandboxFusion. It scaled efficiently to 62.10 tasks/s across 3 nodes.
  • Improved RL Performance: Training a Qwen3-8B model using ScaleBox's high-fidelity rewards yielded a +5.91% Pass@1 improvement on LiveCodeBench (v5) for the special-judge subset, and a +1.91% boost on the full 26K dataset for LiveCodeBench (v6), outperforming standard exact-match baselines.

Limitations and Future Work

While ScaleBox demonstrates high scalability, the authors note that their current evaluation is primarily focused on specific model scales and benchmarks.

For future work, they plan to conduct larger-scale, multilingual RL experiments to fully verify the system's robustness across diverse languages. Additionally, they intend to expand ScaleBox's application beyond RLVR training into broader agentic workflows, such as multi-turn autonomous problem-solving and automated software engineering.

Summary updated

BibTeX
@inproceedings{zheng2026scalebox,
  author = {Jiasheng Zheng and Xin Zheng and Boxi Cao and Pengbo Wang and Zhengzhao Ma and Qiming Zhu and Jiazhen Jiang and Yaojie Lu and Hongyu Lin and Xianpei Han and Le Sun},
  title = {{ScaleBox: Enabling High-Fidelity and Scalable Code Verification for Large Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.acl-demo.30},
}

Loading related content...

Figure