Generalized Advantage Estimation (GAE)

Definition

Generalized Advantage Estimation (Schulman et al., 2015; arXiv:1506.02438) estimates the advantage as an exponentially-weighted average of -step advantage estimators, giving a single knob that continuously trades bias against variance. It is the advantage estimator inside PPO and RLHF-PPO, converting a sparse terminal reward into per-token advantages via a one-pass backward recursion over critic-based TD errors.

Key math

The TD error is the 1-step advantage estimate (the atom of GAE):

The -step estimator telescopes into discounted TD errors, . Averaging over all with weights collapses to:

is the bias–variance knob (distinct from , which sets objective far-sightedness):

  • : — pure 1-step TD. Low variance, high bias (trusts ).
  • : — pure Monte Carlo advantage. High variance, low bias.

The paired value target is (detached). Typical: , .

Why it matters

GAE is what lets a sequence-level reward propagate credit back to individual tokens in RLHF-PPO: the terminal reward-model score plus a dense per-token KL penalty become a token-level reward stream, which the -discounted backward pass turns into token-level advantages. Setting too high (near 1) on long sparse-reward generations reintroduces Monte Carlo variance; lowering it leans on the critic’s bootstrap to shorten the effective horizon. Critic-free methods (GRPO) drop GAE entirely in favor of a group baseline.

Taught in

  • 03-actor-critic-and-gae — full derivation from the TD error, the -average collapse, and worked backward-recursion examples.
  • 04-ppo — GAE as the advantage estimator feeding the clipped surrogate.

See also