GRPO without the maths: how an RL trainer nudges the weights

· Source: Alex Strick van Linschoten · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Robotics & Autonomous Systems · Depth: Novice, long

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

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

Topics

Code references

Best for: AI Engineer, Machine Learning Engineer, AI Student

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Alex Strick van Linschoten.