Manuscript Offprint

arXiv:2610.35716

Audit Where Hacks Pay: Budgeted Strong-Verifier Audits Against Reward Hacking in GRPO

Shurun Li, Michael Hua Wang, Haibo Zeng, Long Wang

Abstract

Reinforcement learning with verifiable rewards trains on cheap checks, such as unit tests, that a policy can learn to game, while a stronger check is too expensive to run on every rollout. We study how to spend a limited strong-verifier budget in GRPO, separating which weakly passing rollouts to audit from what reward a caught hack receives. At a fixed policy state with centered advantages, the expected update depends on a design only through each rollout's marginal audit probability and correction; reflecting a caught hack's reward about the failure reward negates the advantages of an all-hack group; and auditing whole groups with the fewest weak passes first (low-pass budgeted audits, LB) minimizes the advantage mass left on hacks among pass-count designs with a fixed correction when a label's value falls with the pass count. We tested this analysis in actual LLM training: from each run's starting state, the sign of this mass on a frozen panel predicted whether hacking would be suppressed in 33 of 39 runs, including 13 of 16 preregistered ones. In LeetCode (Wong et al., 2026) and Countdown-Code (Khalifa et al., 2026), LB drives hacking to near zero, while random audits with the same penalty and budget do not and use more labels. We also find that the randomness of the update affects training: in Countdown-Code, two unbiased corrections, per-item reward-level IPW and a group-level advantage correction, bring hacking down too but end 6.1–11.8 and 8.0–11.5 points lower in held-out accuracy than LB at the same budget. A full audit, which the group-level correction reproduces in expectation, stays within about two points of LB in three seeds, while LB uses 28% of its labels, and allocating the same correction by pass count recovers most of the loss (one seed). Training outcomes thus depend not only on the expected update but also on the randomness of its estimate.

1 Introduction

Reinforcement learning with verifiable rewards (RLVR) trains language models on automatic checks such as unit tests, and a policy can learn to pass a weak check without solving the task. In Countdown-Code it rewrites the target value in its own solution file so that the provided test passes (Khalifa et al., 2026); in the LeetCode environment of Wong et al. (2026) it defines its own run_tests function, which the grader then executes. A stronger check, such as the full test suite or a semantic check of the answer, is usually available, but it costs too much to run on every rollout (Wang et al., 2025; Sakib et al., 2026).

This paper asks how to spend a fixed strong-verifier budget during group-relative policy optimization (GRPO; Shao et al., 2024). An audit design makes two choices: which weakly passing rollouts to send to the strong verifier (selection) and what reward a caught hack receives (correction). Two defaults are natural: random audits with an inverse-propensity correction, which reproduce the full-audit reward in expectation.

Auditing low-pass groups first suppresses hacking with half the labels (LeetCode, 3 seeds)

(a) LB: fewest weak passes first

weak passes W = 25, budget pW = 8.3 labels (p = 1/3)

Figure

(b) Hack rate (%)

Figure

(c) Strong labels used

LB (low-pass first) random groups random items no audit

Figure 1: Low-pass budgeted audits (LB). (a) Groups of a batch sorted by their number of weak passes kk: LB audits whole groups, fewest weak passes first, until a fraction pp of the weak passes has been checked in expectation (the boundary group is audited with the remaining probability), and a caught hack receives the reflected penalty 2b−a2b - a. (b) LeetCode hack rate with the same penalty and budget rule: LB, auditing whole groups in random order (RB), auditing single weak passes at random, and no audit; mean over three seeds with their range shaded, smoothed with a Gaussian kernel of one step. (c) Strong labels used: because the budget is a fraction of the weak passes, LB’s spending falls as hacking is suppressed.

(Horvitz and Thompson, 1952; Moya et al., 2026; Sakib et al., 2026), and giving a caught hack the reward its strong verdict implies. Neither accounts for how GRPO turns rewards into updates. A rollout’s advantage depends on its siblings, so the same caught hack can push the policy strongly, weakly, or not at all.

We make three observations. First, without group standard-deviation normalization, the expected raw policy gradient depends on an audit design only through each rollout's marginal audit probability and correction value (Lemma 1): coupling audits within groups changes the noise of an update, while selection and correction change its direction. Second, giving a caught hack the reward 2b−a2b - a, the pass reward a reflected about the failure reward b, exactly negates the advantages of a group whose weak passes are all hacks, whereas the strong-verdict reward b only zeroes them (Proposition 1, Figure 2b). Third, an uncaught hack's advantage is largest when few siblings pass, so a label spent on a low-pass group buys the most correction (Figure 2a). Low-pass budgeted audits (LB) therefore audit whole groups in increasing order of weak passes until a fixed fraction p of the batch's weak passes has been checked in expectation (Figure 1a). Among whole-group designs that select by pass count and give caught hacks a fixed correction, LB minimizes a frozen-state objective, the advantage mass left on hacks, whenever the value of a label does not increase with the pass count (Theorem 1).

We test these designs in two reward-hacking environments from prior work, LeetCode (Wong et al., 2026) with LoRA training of Qwen3-4B and Countdown-Code (Khalifa et al., 2026) with full fine-tuning of Qwen2.5-3B, starting from checkpoints where about a quarter of the training rollouts are hacks. Every comparison was preregistered. Our contributions follow three steps:

• When the push on hacks is optimal (Section 3). The three observations above characterize how an audit design changes the expected update at a frozen policy state, and LB minimizes the advantage mass left on hacks among whole-group pass-count designs with a fixed correction whenever a label's value does not increase with the pass count (Theorem 1).

• Predicting training from the frozen push (Section 5). With the same penalty and budget rule, LB drives LeetCode hacking to near zero within about ten steps in all three seeds, while auditing groups in random order leaves late hacking at 36.33–51.68% and auditing single weak passes at random at 45.62–55.78%, with LB using about half their labels; random group order also fails in Countdown-Code (one seed; Section 5.1). The correction value matters as much: the strong-verdict reward c = b only removes the push on a caught all-hack group, and with it auditing the lowest-pass groups is no better than auditing random groups, whereas with 2b - a the same groups remove hacking with half the labels (Section 5.2). From each run's starting state, the sign of the frozen hack mass J predicted whether hacking would be suppressed in 33 of 39 runs, including 13 of 16 preregistered ones. The push stops predicting in two places: an online rule that improved J on frozen panels trained worse than LB, so the magnitude of J does not rank designs, and with c = b hacking spread beyond the low-pass groups (Section 5.4).

• Beyond the expected update, randomness affects training (Section 6). In Countdown-Code, per-item reward-level inverse-propensity weighting (IPW) and a group-level advantage correction (Sakib et al., 2026) also suppress hacking, but in all three seeds end lower than LB in training correctness (by 4.53–11.13 and 3.48–9.92 pp) and in held-out accuracy (by 6.1–11.8 and 8.0–11.5 pp); in LeetCode the group-level correction was close to LB. A full audit, which every unbiased group-level design matches in expectation on a frozen batch, stayed within about two points of LB on held-out problems in all three seeds while LB used 28% of its labels, and allocating the group-level correction by pass count closed most of the gap (one seed). Its loss therefore comes from the randomness of the estimate and the allocation of audits, not from the full-audit update it targets.

Relation to budgeted audit estimation. Sakib et al. (2026) study unbiased estimation of full-suite training signals on fixed software-engineering trajectories, including a direct correction of normalized group advantages, and target groups with more passes to reduce estimator variance. We study how selection and correction affect on-policy learning, and target groups with fewer passes first, where an uncaught hack is reinforced the most. Our comparisons cover two unbiased corrections at matched budgets: per-item reward-level IPW and the group-level advantage correction.

References (53)