Policy Gradients and Actor-Critic Methods

Policy-gradient methods optimize the policy directly. Instead of learning only which action has the highest value, they adjust the parameters of so actions that led to high return become more likely.

Policy Gradient

The objective is expected return:

Here parameterizes the policy, is a sampled trajectory generated by that policy, and is the discounted return from the start of the trajectory. Maximizing means changing the policy so future sampled trajectories have higher return on average.

A common gradient estimator is

where is the advantage. Positive advantage means the action was better than the baseline state value, so the update increases its probability. Negative advantage lowers it.

Actor-Critic Mechanism

Actor-critic methods split the work:

PartLearnsRole
Actorchooses actions
Critic or estimates future return and advantage

The critic reduces variance because the actor no longer treats every sampled return as equally informative. The actor still learns from sampled experience, but the critic supplies a shaped learning signal.

flowchart TD
  State[State] --> Actor[Actor: policy network]
  State --> Critic[Critic: value network]
  Actor --> Action[Action]
  Action --> Environment[Environment]
  Environment --> Feedback[Reward and next state]
  Feedback --> Critic
  Critic --> Advantage[Advantage estimate]
  Advantage --> Actor

PPO

Proximal Policy Optimization (PPO) limits how far the new policy moves from the old policy during one update. In LLM training, a “PPO loop” usually means repeatedly sampling model responses, scoring them with a reward model, applying a KL penalty against a reference policy, and updating the policy with PPO. With probability ratio

The ratio compares the new policy’s probability for the sampled action with the old policy’s probability. Values above 1 mean the update is making that action more likely; values below 1 mean it is becoming less likely.

PPO uses a clipped surrogate objective:

The clipping term discourages a large policy update from making a once-good action suddenly much more likely. That makes PPO practical for many deep RL and RLHF systems. See Proximal Policy Optimization for generalized advantage estimation, the full training loop, and why PPO dominates RLHF.

Soft Actor-Critic

Soft Actor-Critic adds entropy to the objective:

The entropy term rewards stochasticity. This helps exploration and often improves robustness in continuous-control tasks because the policy is not pushed too early into a brittle deterministic action.

Caveats

Policy-gradient methods can be sample-inefficient because they learn from trajectories generated by the current or recent policy. Advantage normalization, trust-region or clipping constraints, entropy bonuses, and careful evaluation are not minor details; they often determine whether training works.

Connections

References