A parameter step can change the policy by very different amounts
At one state with two actions, let \(\pi_\theta(\mathrm{east}\mid s)=\sigma(k\theta)\), where \(k\) sets the sensitivity. Both panels use \(k=10\) and the same axis scales.
TRPO gives the policy a budget for changing its action distribution
Each point gives two probabilities. The third is \(1-p_1-p_2\).
Green policies satisfy the KL budget \(\delta=0.08\). The boundary has KL exactly \(\delta\).
If action 1 has the highest advantage and the others tie, move right as far as the budget permits.
PPO stops rewarding an excessive change in the favored direction
PPO uses a simpler heuristic for cautious updates. Ordinary gradient ascent optimizes a clipped surrogate in place of the KL-constrained solve. For each sample, maximize the smaller of two contributions: \[\min\!\left(\rho_t\hat A_t,\;
\operatorname{clip}(\rho_t,1-\epsilon,1+\epsilon)\hat A_t\right).\]
Positive advantage: extra credit stops above \(1+\epsilon\).
Negative advantage: extra credit stops below \(1-\epsilon\).
Average these contributions over the sampled batch.
Clipping the objective does not clamp the policy probabilities
The optimizer changes shared parameters, so other samples can still move this action’s probability.
Clipping supplies neither a hard ratio bound nor guaranteed improvement in true return.
Check the size of policy changes and evaluate fresh trajectories.
A cautious update cannot repair a reward that measures the wrong goal.
GRPO uses group-relative feedback instead of a learned critic
Group Relative Policy Optimization (GRPO) · DeepSeekMath, outcome supervision.
For one prompt, sample responses with the rollout policy. Score each completed response and compare it with its group: \[\hat A_i=\frac{r_i-\bar r}{\sigma_r},\qquad \sigma_r>0.\]
All correct or all wrong: every score ties. The rewards give no direction for improvement.
How often do we get a mix?
For \(n\) independent answers, each correct with probability \(p\), \[P(\text{mixed group})=1-(1-p)^n-p^n.\]
At 10% accuracy on this question:
10 answers: expect 1 correct; 65% chance of a mix.
20 answers: expect 2 correct; 88% chance of a mix.
Larger groups help only if the starting policy can already produce a correct answer.
GRPO puts group-relative feedback into a clipped policy objective
For response \(i\), state\(s_{i,t}\) is the prompt and prefix; action\(a_{i,t}\) is the next token. Its \(T_i\) tokens share the response’s score \(\hat A_i\).
Maximize, for a sampled group of \(G\) responses: \[\widehat J_{\rm GRPO}(\theta)=\frac1G\sum_{i=1}^{G}\frac1{T_i}\sum_{t=1}^{T_i}
\left[\min\!\left(\rho_{i,t}\hat A_i,\;\operatorname{clip}(\rho_{i,t},1-\epsilon,1+\epsilon)\hat A_i\right)-\beta d_{i,t}\right].\]
Clipped term: favor tokens in relatively better responses, using the PPO rule.
\(d_{i,t}\): sampled KL penalty against a reference policy; \(\beta\) sets its strength.
The rollout policy and reference policy serve different purposes
Policy
Question it answers
Trainable \(\pi_\theta\)
What will we sample after this update?
Rollout \(\pi_{\mathrm{old}}\)
How likely was this token when we collected it?
Reference \(\pi_{\mathrm{ref}}\)
Which behavior anchors the regularization?
The original GRPO objective adds a penalty for divergence from the reference policy. That is separate from clipping ratios against the rollout policy.
The three methods make different choices about feedback and update size
Method
Feedback for a sampled action
What governs the update?
TRPO
Estimated advantage, often from a critic
Optimize a surrogate within an average KL budget
PPO-Clip
Estimated advantage, often from a critic
Clip favorable changes to the sampled surrogate
GRPO
Score relative to other responses to this prompt
Clip token ratios and penalize divergence from a reference
Practical tradeoff. GRPO avoids fitting a separate critic and needs several scored responses per prompt. Tied scores carry no within-group preference.
Better reward is evidence to test against the real task
Use fresh trajectories to test whether the update improves expected return. In Gridworld:
Compare discounted returns from the same starting squares.
Check whether gains persist on rarely visited squares.
Count environment interactions used to learn each policy.
The same question applies to a language model. Does a higher training reward translate into better answers on fresh questions?
RL can improve a language model after pretraining
Post-training adapts a pretrained model to tasks such as answering math questions.
Sample several answers to a training question and score them.
Update the model to favor better answers. DeepSeekMath used GRPO for this step.
Evaluate on held-out questions to see whether the answers improve.
What if answering a question requires opening a file or running a calculation? Now the model must choose an action and use what comes back.