← Back to feed
2026-09-08agentsrlhf

Entropy-Regularized Rank-Masked Policy Optimization for Test-Time Reinforcement Learning in Code Generation

Jiacheng Xu, Feng Chen, Xiuneng Xu, Bo An

PDF preview for Entropy-Regularized Rank-Masked Policy Optimization for Test-Time Reinforcement Learning in Code Generation
Read on arXiv →

Key claim

ERPO improves code generation through better reward signals.

In plain English

Imagine you're developing an AI that can write code based on user prompts. The challenge is that traditional methods for evaluating code, like self-voting on answers, don't work well because code can look different yet still be functionally similar. This is particularly problematic in code generation, where surface-level comparisons fail to provide meaningful feedback, leading to what's called reward hacking — where the system finds loopholes in the evaluation process instead of genuinely improving its outputs. To address this, the authors propose a method called probe-driven test-time reinforcement learning (TTRL). The idea is to create 'probe inputs' from the problem statement, which are then used to execute candidate programs. By measuring how well these programs agree on the outputs, they define a new reward signal called Probe Consensus Reward (PCR). However, PCR isn't foolproof and can still be manipulated, so they introduce a technique called Entropy-Regularized Rank-Masked Policy Optimization (ERPO) to manage this risk. ERPO helps ensure that when the PCR is low, the system makes conservative updates to its learning policy, preventing it from drifting too far off course. Compared to previous methods, this approach significantly boosts performance on coding benchmarks, improving the success rates for both in-domain and zero-shot tasks. For anyone building AI systems that generate code, this means a more reliable way to train models that can adapt and improve over time, even in the face of complex evaluation challenges.

Novelty
8.0/10

The approach introduces a new method for reward generation in code generation tasks.

Reliability
7.5/10

The evaluation on coding benchmarks shows solid improvements, though potential reward hacking is noted.

Deep reliability assessment

The methodology supports improving test-time reinforcement learning for code generation by using probe-driven inputs and PCR, but it may overclaim reliability due to susceptibility to reward hacking and spurious consensus.

Reproducibility

No open source code or dataset is mentioned in the paper.

Key figure

Figure 1 provides a performance overview of Qwen3-8B and Qwen3-4B models, showing improvements in pass@1 and pass@k metrics.

Benchmark results

LiveCodeBenchpass@1: 33.75vs Base+7.5%SOTA
LiveCodeBenchpass@16: 45.14vs Base+9.14%SOTA