Policy gradient
A family of reinforcement learning algorithms that directly optimize a model's output probabilities to maximize cumulative numerical reward signals.
Listen to this definition
Uses a voice available on your device
Audio options
On this page 5 sections
Related concepts 5 concepts
What it is
Instead of predicting the next token or classifying an image directly, the model generates a sequence of actions, receives a scalar score representing quality at the end, and calculates gradients to make successful paths more likely. Because generation paths are long and stochastic, gradients have high variance, meaning millions of rollout steps are typically required to achieve stable convergence. Training often runs across hundreds of GPUs in parallel clusters, taking days or weeks to shift the underlying behavior of large models.
Why it matters
You care about policy gradients because this is the primary mechanism used to align base LLMs into helpful assistants through reinforcement learning from human feedback. If you are fine-tuning proprietary models or building custom behavior loops, ignoring this concept means you will misunderstand how safety guardrails, tone adjustments, and refusal behaviors are actually injected into the weights. Misconfiguring these training runs often leads to degraded reasoning capabilities or complete collapse of output quality.
In practice
You will rarely implement these gradient updates from scratch unless you work on infrastructure infrastructure for model training. Instead, you interact with this concept when setting hyperparameters like clip ranges and learning rates in libraries like TRL or DeepSpeed, or when monitoring training loss curves for sudden spikes in KL divergence.
The tradeoff
The main tradeoff is that these methods are notoriously unstable and sensitive to hyperparameters, often causing the model to learn shortcuts that maximize reward without actually solving the task.
Where it appears
Research summaries that use Policy gradient, each linked to its source paper.
-
Improving Multi-Turn AI Agent Credit Assignment
IAPO: Influence-Aware Policy Optimization for Credit Assignment in Multi-Turn Service Agents
The paper introduces IAPO, a method that improves agent training by redistributing reward credit based on how agent actions influence one another within multi-turn service workflows.
-
Improving Reinforcement Learning for Coding Agents
LEGO-RL: Harness-Native Reinforcement Learning for Coding Agents
Lego-RL is a framework that aligns native coding execution harnesses with policy-gradient training to improve agent performance and stability.