GRPO without the maths: how an RL trainer nudges the weights
Summary
Group Relative Policy Optimisation (GRPO) is an algorithm commonly used by the trainer component to nudge the model (policy) in the right direction during reinforcement learning. It operates by attempting a problem multiple times, calculating a "baseline" (average score of all attempts), and then determining an "advantage" for each attempt (distance from the baseline). Policy weights are updated based on positive advantage, as shown in a simplified pseudocode example. While GRPO grades the whole attempt, making it less suitable for long-running tasks with complex credit assignment, Proximal Policy Optimization (PPO) uses a critic model for fine-grained, token-level advantage estimation. This PPO approach, highlighted by z.ai's GLM-5.2 model released yesterday, is better suited for long-horizon agentic tasks, as GRPO can hit performance ceilings on such problems.
Key takeaway
For AI Engineers developing agentic systems, if your tasks involve long execution traces or require fine-grained credit assignment, you should prioritize Proximal Policy Optimization (PPO) over Group Relative Policy Optimisation (GRPO). While GRPO offers a simpler, group-based update mechanism, it may hit performance ceilings on complex, multi-step problems. Evaluate your task horizon carefully; PPO's critic-based, token-level advantage estimation is crucial for scaling to intricate agent behaviors.
Key insights
GRPO updates agent weights by comparing individual attempt scores to a group baseline, rewarding positive "advantage."
Principles
- GRPO evaluates whole attempts, not specific steps.
- Task difficulty impacts learning signal in RL.
- Critic models are necessary for long-horizon RL tasks.
Method
GRPO samples a group of attempts, scores them, calculates a baseline (group average), then nudges policy weights based on each attempt's "advantage" (score minus baseline).
In practice
- Use GRPO for short, well-defined agentic tasks.
- Consider PPO for long-horizon tasks requiring fine-grained credit assignment.
- Monitor task difficulty to ensure sufficient learning signal.
Topics
- Group Relative Policy Optimisation
- Proximal Policy Optimization
- Reinforcement Learning
- Agentic AI
- Policy Optimization
- Credit Assignment
Code references
Best for: AI Engineer, Machine Learning Engineer, AI Student
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by Alex Strick van Linschoten.