How two gradients cover every budget

One training step can raise pass@1 and lower pass@32, and two stored gradients are enough to certify a direction that raises both.

Anonymous authors, under double-blind review

Scroll to begin

1Budgets

Success within k attempts

One attempt solves a prompt with probability p. Each ribbon of the sheet is one budget, from 1 attempt at the front to 32 at the back.

\mathrm{pass@}k\,(p)=1-(1-p)^k

1Budgets

What each attempt is worth

Differentiate and divide by k. Every vertex moves to the weight a prompt's reward gradient gets. A large budget stops listening to prompts it already solves.

D_k=\mathbb E_x\bigl[(1-p)^{k-1}\,\nabla p\bigr]

1Budgets

Two prompts that disagree

An easy and a hard prompt have equal mass. A step along d raises the easy logit at rate 1 and lowers the hard one at rate 3.

1Budgets

The sign flips at budget 5

The easy prompt's weight dies with k. The hard prompt's barely moves, and from budget 5 on it sets the sign. One step raises pass@1 and lowers pass@32.

\langle d,D_k\rangle=\mathbb E_x\bigl[(1-p)^{k-1}\,\langle d,\nabla p\rangle\bigr]

2What GRPO keeps

Two signed totals survive

GRPO standardizes rewards inside each group of G responses. A success total a and a failure total b remain. Both weight a prompt by w(p), the new sheet.

a=\mathbb E[(1-p)\,w(p)\,BS],\quad b=\mathbb E[p\,w(p)\,BS]

2What GRPO keeps

The weight is not flat

w is a Bernstein polynomial of degree G-2, and the dots are its coefficients. They are largest at the two ends, so the hardest and easiest prompts count most.

t_i=\frac{G-1}{\sqrt{(i+1)(G-1-i)}}

2What GRPO keeps

No rescaling fits both ends

The weight runs from h_G at the ends to \ell_G at one half. The best multiple of a+b misses the pass@1 gradient by \rho_G, which is 0.478 at G=32.

\rho_G=\frac{h_G-\ell_G}{h_G+\ell_G}

Theorem, sharp unrestricted ambiguity for standardization. The planes meet only at G=2 and 3.

3Same summaries

Two policies on three prompts

Three prompts of equal mass succeed with probability p, 1-p and \tfrac12. Each policy has its own logit slope at every prompt, and the two slope triples differ.

Group size G

3Same summaries

Everything stored is identical

Both policies give the same signed totals a and b and the same Fisher information F. At G=8 and p=0.1 the paper prints -0.054215, 0.057514 and 0.187991.

Group size G

3Same summaries

The pass@1 derivative flips

At the default setting the two derivatives are -0.013677 and +0.016848. Any step chosen from what was stored has the wrong first-order sign for one of the two policies.

Appendix, the group-size boundary. Each group of bars has its own scale.

Group size G

4Two anchors

Change the variable

Store D_1 and one more gradient D_s, with a ceiling h on p. Slide every vertex to z=(1-p)^{s-1}. Heights stay, and each ribbon becomes a power of z.

(1-p)^{k-1}=z^{a_k},\qquad a_k=\frac{k-1}{s-1}
Ceiling h

4Two anchors

A line for every budget

In z the ribbon of D_1 is flat and the ribbon of D_s is straight, so any mix of the two is a line. The teal sheet holds the best line for each budget.

H_k=u_kD_1+v_kD_s\quad\leftrightarrow\quad u_k+v_kz
Ceiling h

4Two anchors

The error is sharp

Subtract the lines. What is left touches \pm E at three points with alternating signs, so no other line does better. The planes mark the worst budget.

E_{k,s}(h)=\max_z\,\bigl|z^{a_k}-u_k-v_kz\bigr|

Proposition, storage for a menu of budgets. The best second budget is 25 at ceiling 0.05, 12 at 0.5 and 7 with none.

Ceiling h

4Two anchors

When the ceiling moves

Pull the sheet past the ceiling it was fitted for and the old lines fail. Refitting on the same two vectors needs no GPU work.

Table refit. For s=25 stored at 0.05, a ceiling of 0.5 gives 0.6871 frozen and 0.2688 refitted. Recomputed here for the settings below.

Stored for h

5Certified steering

One gradient per budget

Eight synthetic prompts below the ceiling give each budget a gradient D_k. An arrow's height is its derivative along one direction d.

Population

5Certified steering

Decode them from the pair

The trainer holds only D_1 and D_s. Each teal arrow is a decoded H_k. The black arrows are the gradients it never computed.

H_k=u_kD_1+v_kD_s
Population

5Certified steering

One direction for every budget

MGDA takes the point z of the decoded hull closest to the origin and steers along d=z/\lVert z\rVert. Every decoded arrow then rises at least to the dashed plane.

\min_{k\le32}\,\langle d,H_k\rangle=\lVert z\rVert
Population

5Certified steering

A certificate per budget

Each true derivative lies within E_{k,s}(h)\,C_d of its decoded one. If every bar stays above the floor, a small step along d raises all 32 budgets.

\bigl|\langle d,D_k\rangle-\langle d,H_k\rangle\bigr|\le E_{k,s}(h)\,C_d

Corollary, certified multi-budget steering. Widen the ceiling and the bars cross the floor.

Ceiling h
Population

6Measured

Collection is 9.03x to 12.27x faster

The pair D_1,D_{25} collects in 54.57 s against 492.54 s, and in 110.06 s against 1,350.69 s under L2O/EI. With shared generation the speedups are 1.36x and 1.98x.

Table lora-steering. 128 mid-difficulty GSM8K prompts, LoRA on Qwen2.5-Math-1.5B-Instruct, one H100, one frozen checkpoint, 1,152.6 s of generation.

6Measured

Nearly the same direction

The pair's direction has cosine 0.9562 and 0.9589 with direct MGDA. Without decoding it gives 0.9593 and 0.9585, so decoding picks no better direction here.

Table lora-steering, s=25. The pair needs 281 backward calls against 2,672, and 572 against 6,913.

6Measured

Sampled anchors need a second batch

On a second batch the split certificate certifies all 32 budgets at 256 and 1,024 groups. The plug-in test over-claims in 74%, 83% and 67% of replicates.

Section on steering margins, paragraph on sampled anchors. SmolLM2-135M.

6Measured

The second gradient pays past a batch size

At budget 32 the second gradient moves relative bias from -20.73\% to +0.67\% and adds variance. The pair first wins at 119 prompts, and at 216 on the test panel.

Paragraph on bias and variance at budget 32, and Table single-step.

6Measured

What this does not show

No downstream reward gain is claimed. The 200-batch runs had no inversion to repair. On Knights and Knaves the full-range pair certified zero of 200 checkpoints.

Introduction, limitations, and the paragraph on recorded reasoning responses. Pass@1 and pass@32 both rose in those runs.