Entropy-Regularized Rank-Masked Policy Optimization for Test-Time Reinforcement Learning in Code Generation
Abstract
Existing methods for test-time reinforcement learning (TTRL) derive rewards from answer-level self-voting on unlabeled test-time tasks with canonical answers, but this breaks down for code generation because programs cannot be compared by surface form and therefore do not directly provide a usable training signal. To make TTRL applicable to code generation, we propose probe-driven TTRL, which constructs output-free probe inputs from the problem statement, executes candidate programs on these probes, and defines a Probe Consensus Reward (PCR) from the resulting behavioral agreement. PCR provides a behavioral training signal for open-vocabulary programs, but it is not a fully reliable verifier and remains susceptible to reward hacking through spurious consensus. We therefore introduce Entropy-Regularized Rank-Masked Policy Optimization (ERPO), which converts low PCR into conservative negative updates through rank masking and controls policy drift with an entropy ceiling. On coding benchmarks, ERPO substantially improves pass@1 and pass@k in both in-domain adaptation and zero-shot transfer.
Create a lesson
Metadata
- Categories
- cs.LG, cs.CL
- Comments
- Accepted to EMNLP 2026 Main Conference. 15 pages, 4 figures, 11 tables
Related papers
PolicyPolish: LLM-Guided Weight Editing of Reinforcement Learning Policies for Dynamic RMSA in Elastic Optical Networks
Shared title terminologycs.LGMasayuki Shimoda
Predicting End-to-End Fine-Tuning Time for Generative Language Models
Shared title terminologycs.LGBreno Beleza, Felipe Lima, Isis Carvalho et al.
CHORD: Rollout-Free Off-Policy Replay of the Denoising Chain for Sample-Efficient Diffusion-Policy Reinforcement Learning
Shared title terminologycs.LGKuanyen Liu, Ren-jyun Huang, Chong-Yan Chen et al.
Sequence-Level Score Centering Stabilizes Off-Policy LLM Reinforcement Learning
Shared title terminologycs.LGRuixiang Zhang
δ-APO: Domain Adaptive Policy Optimization for Large Multimodal Learning
Shared title terminologycs.LGThanh-Dat Truong, Huu-Thien Tran, Vinh-Tiep Nguyen et al.
Model-Aware Schedules Improve Generation via Fiberwise Optimal Transport
Shared title terminologycs.LGLuyi Jia, Boyan Zhang, Yilun Liu et al.