kefirski.me
EMNLPPaper 05202610 min read

F-GRPO: Don't Let Your Policy Learn the Obvious and Forget the Rare

Group-relative RL sharpens a model onto the solutions it happens to sample. A one-line focal reweighting keeps rare correct trajectories alive, lifting pass@256 across GRPO, DAPO, and CISPO.

RLVR mostly sharpens what the base model already knew

Reinforcement learning with verifiable rewards is now the default way to post-train reasoning models: sample a group of NN rollouts per prompt, check each one, and push probability toward the correct ones. A growing body of evidence says this process rarely adds new solutions; it concentrates the distribution on solutions the base model could already reach. The symptom is a model whose pass@1 rises while its pass@256 falls below the base model's.

Group-relative methods make the sampling structure explicit. GRPO scores each rollout against its own group, A^i=(RiRˉ)/(σR+ϵ)\widehat{A}_i=(R_i-\bar{R})/(\sigma_R+\epsilon), so when every rollout in the group is right or every one is wrong, the advantage is zero and nothing updates. The group size NN therefore controls which prompts speak on each step, and the field offers conflicting advice about it: two rollouts suffice in one analysis, while another argues for scaling rollouts broadly. We wanted to know what finite NN actually does to rare correct behavior.

The tail-miss event: active updates that never see the rare answer

Fix one prompt and call a subset of its correct rollouts rare when its probability τ\tau is a small slice of the total success probability μpos\mu_{\mathrm{pos}}. The dangerous event is not sampling failure in general. It is the conjunction: the group contains both successes and failures, so the update fires, and yet no sample lands in the rare region, so the update can only reinforce the common solutions.

An active update that misses the tail

One prompt, N = 8
Mixed rewards make the group active, but every correct sample came from the common region. The gradient then concentrates probability on what was sampled; the rare correct mode was never in the room.

This event has a closed form. We show its probability is exactly (1τ)N(μposτ)N(1μpos)N(1-\tau)^N-(\mu_{\mathrm{pos}}-\tau)^N-(1-\mu_{\mathrm{pos}})^N, and the shape of that expression is the story: small groups are usually inactive, huge groups eventually cover the tail, and intermediate groups combine frequent activity with poor coverage. The curve peaks exactly where practical compute budgets live.

Tail-miss probability against group size

P(active update misses E)
rare set holds 5% of correct mass10% of correct mass20% of correct mass
Tail-miss probability against group size Our closed-form tail-miss probability evaluated at success probability 0.5, for rare sets holding 5, 10, and 20 percent of the correct mass. Every curve peaks at intermediate group sizes, and rarer sets push the peak higher and to the right, straight into the N = 4 to 16 range most training runs use. rare set holds 5% of correct mass: undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined 10% of correct mass: undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined 20% of correct mass: undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined; undefined, undefined 00.250.50.751 1248163264 rare set holds 5% of correct mass10% of correct mass20% of correct mass group size N (log scale) P(active update misses E)
Our closed-form tail-miss probability evaluated at success probability 0.5, for rare sets holding 5, 10, and 20 percent of the correct mass. Every curve peaks at intermediate group sizes, and rarer sets push the peak higher and to the right, straight into the N = 4 to 16 range most training runs use.

Total correct mass can grow while unsampled correct mass shrinks

Missing the tail once would be harmless if the update left unsampled solutions alone. It does not. In the categorical abstraction, where a softmax policy over a finite action set makes every quantity observable, we derive the one-step change of the unsampled-correct mass Qu,posQ_{\mathrm{u,pos}} and show it can be negative even while the total correct mass QposQ_{\mathrm{pos}} increases: a direct drift term pushes unsampled logits down whenever the batch is reward-positive, and softmax normalization drains further mass toward the sampled winners.

We simulated this with 128,000 actions of which 10,000 are correct. Total correct mass rises for every group size, which looks like healthy training. The fraction of initially correct actions that keep their probability tells another story: it collapses at intermediate NN, stays high for tiny NN because updates rarely fire, and stays high for enormous NN because the tail gets sampled; at N=131,072N=131{,}072 retention holds near one throughout. Sharpening is not a mystery of deep networks. It falls out of finite sampling plus softmax bookkeeping.

Price the update by how much the group already succeeds

The rare set is invisible during training, but a good proxy for its danger is visible in every group: the empirical success rate μ^pos=X/N\widehat{\mu}_{\mathrm{pos}}=X/N, where XX counts correct rollouts. High success means the sampled correct set is broad and the reward-positive drift on everything unsampled is strong. So we borrow the shape of Focal loss from object detection and scale each group's advantage by g(x)=(1μ^pos)γg(x)=(1-\widehat{\mu}_{\mathrm{pos}})^{\gamma}, giving A^iF-GRPO=g(x)A^iGRPO\widehat{A}_i^{\mathrm{F\text{-}GRPO}}=g(x)\,\widehat{A}_i^{\mathrm{GRPO}}.

One scalar per group

Focal exponent 0.5
A mostly-solved prompt gets its update halved; a prompt whose success is still rare keeps almost all of it. Setting the exponent to zero recovers plain GRPO, and the same scalar drops into DAPO and CISPO unchanged.

The design is deliberately minimal. The weight multiplies the group-relative advantage without touching rewards, clipping bounds, or importance ratios, so it composes with any group-relative objective; γ\gamma is the only new hyperparameter and there are no extra rollouts, networks, or reference models. We select γ\gamma per setup from a small sweep, and the winner is always 0.5 or 1.0.

The sweep that shows the dip, and the fix at fixed cost

GRPO across group sizes versus F-GRPO at N = 8

average math score
pass@1pass@256
GRPO across group sizes versus F-GRPO at N = 8 Qwen2.5-7B on in-domain math. Plain GRPO shows the predicted shape: pass@1 climbs with group size while pass@256 dips hardest at N = 8 and only recovers by N = 32. F-GRPO at N = 8 reaches that recovered pass@256 with four times fewer rollouts. N=2: pass@1 36.2; pass@256 75.0 N=4: pass@1 36.4; pass@256 71.1 N=8: pass@1 37.3; pass@256 64.1 N=16: pass@1 38.4; pass@256 67.5 N=32: pass@1 39.2; pass@256 70.1 F-GRPO N=8: pass@1 38.6; pass@256 70.3 020406080 36.2pass@1: N=2, 36.275.0pass@256: N=2, 75.0N=236.4pass@1: N=4, 36.471.1pass@256: N=4, 71.1N=437.3pass@1: N=8, 37.364.1pass@256: N=8, 64.1N=838.4pass@1: N=16, 38.467.5pass@256: N=16, 67.5N=1639.2pass@1: N=32, 39.270.1pass@256: N=32, 70.1N=3238.6pass@1: F-GRPO N=8, 38.670.3pass@256: F-GRPO N=8, 70.3F-GRPO N=8 average math score
Qwen2.5-7B on in-domain math. Plain GRPO shows the predicted shape: pass@1 climbs with group size while pass@256 dips hardest at N = 8 and only recovers by N = 32. F-GRPO at N = 8 reaches that recovered pass@256 with four times fewer rollouts.

The sweep matches the theory qualitatively: N=2N=2 keeps pass@256 high mostly by rarely updating, intermediate sizes trade the tail for pass@1, and N=32N=32 buys the tail back with compute. Our diagnostic agrees. On correct trajectories that were rare under the base model, the negative log-likelihood increase is 0.19 at N=2N=2, 0.68 at N=8N=8, and 0.52 at N=32N=32; F-GRPO at N=8N=8 sits at 0.46, deviating less from the base distribution exactly where deviation hurts.

One reweighting, three optimizers, three models

Because the weight only rescales the group advantage, it drops into DAPO and CISPO unchanged. Across nine method-model combinations, Qwen2.5-7B, Qwen3-4B-Base, and Llama-3.2-3B-Instruct at N=8N=8, focal weighting improves both math and out-of-domain pass@256 in nine of nine cases, by 3.9 and 4.1 points on average, while math pass@1 is preserved or improved in all nine, by up to 2.8 points on Qwen3-4B-Base.

Adding the focal weight at N = 8, Qwen2.5-7B

pass@256
baseline+ focal weight
64.1 70.3
GRPO math
69.3 72.5
DAPO math
73.2 76.8
CISPO math
55.9 63.3
GRPO OOD
58.4 63.6
DAPO OOD
59.0 65.9
CISPO OOD
Every optimizer gains at large sampling budgets, in-domain and out. The out-of-domain gains are the most consistent effect we measured: preserved diversity seems to travel across distributions better than sharpened precision does.

A single-solution Maze setting from concurrent work sharpens the interpretation: with exactly one correct sequence per prompt, F-GRPO at γ=0.5\gamma=0.5 still improves pass@1 to between 74.4 and 93.6 against 65.6 to 75.8 for GRPO across group sizes, so the effect is not only about preserving alternative solutions within a prompt. It also protects coverage across prompts.

Against regularization and update-scale controls

MethodMath pass@1 / pass@256OOD pass@1 / pass@256
GRPO, lower learning rate37.8 / 69.216.4 / 57.9
GRPO + entropy bonus37.8 / 69.518.7 / 59.9
GRPO + KL penalty37.2 / 72.019.4 / 60.0
DS-GRPO37.7 / 73.817.9 / 68.3
F-GRPO, ours38.6 / 70.319.2 / 63.3
Qwen2.5-7B at N = 8. Matching the average update scale with a lower learning rate does not reproduce the gain, so the effect is not generic damping. DS-GRPO buys more pass@256 at a pass@1 cost; F-GRPO keeps the best pass@1 while the KL control needs a reference model we avoid.

Where the analysis stops

The theory is prompt-local and one-step: the tail-miss probability and the mass-redistribution result describe regimes, not quantitative predictions for full LLM training, and the concentration-zone boundaries in our simulation depend on the initial distribution. We probed group sizes 2 through 32, not an exhaustive map, and γ\gamma still has to be chosen; our runs use one value rather than a schedule.

The claim we stand behind is the mechanism. Finite groups make active-but-blind updates common at exactly the group sizes people can afford, and a success-conditioned weight is a near-free way to keep those updates from erasing what they never sampled. Anything that estimates the unseen correct mass better than X/NX/N does should improve on us.

Sharpening is a sampling artifact you can price into the update rule: damp what the group already gets right, and the rare trajectories survive.