Advantage Function

1 min read

The advantage function measures how much better an action is compared to the average action in that state:

Aπ(s,a)=Qπ(s,a)Vπ(s)A^\pi(s,a) = Q^\pi(s,a) - V^\pi(s)
  • A>0A > 0: action aa is better than average under π\pi
  • A<0A < 0: action aa is worse than average
  • Eaπ[Aπ(s,a)]=0\mathbb{E}_{a \sim \pi}[A^\pi(s,a)] = 0 by definition

Why use advantage instead of Q:

  • Policy gradients with QQ or return GG have high variance
  • V(s)V(s) acts as a baseline → using A=QVA = Q - V centers the signal, reducing variance without adding bias
  • The policy should only increase probability of actions that are better than average, not just positive-return

Generalized Advantage Estimation (GAE):

A^tGAE(γ,λ)=k=0(γλ)kδt+k\hat{A}_t^{\text{GAE}(\gamma,\lambda)} = \sum_{k=0}^{\infty}(\gamma\lambda)^k\delta_{t+k}

where δt=Rt+1+γV(St+1)V(St)\delta_t = R_{t+1} + \gamma V(S_{t+1}) - V(S_t) is the Miscoral Difference Learning .

  • λ=0\lambda = 0: pure TD advantage (low variance, some bias)
  • λ=1\lambda = 1: Monte Carlo advantage (no bias, high variance)
  • Typical λ=0.95\lambda = 0.95 — good bias-variance tradeoff
  • GAE is the default advantage estimator in Proximal Policy Optimization (PPO)

See also: Value Functions , Policy Gradient Theorem , Actor-Critic Methods

Linked from