TL;DR
Policy gradient methods teach a control policy by trying actions and nudging the policy toward the ones that paid off. They are simple and work with neural networks, but they need very many trials, and their learning is often unstable. Schulman and colleagues attacked both problems. They reduce the noise in the learning signal with a new estimator, the generalized advantage estimator, which has one knob that trades bias against variance. They also limit how far the policy and the value function may change in one update. With these two changes, neural network controllers learned to run and balance on simulated 3D bipedal and quadrupedal robots, and to get up from lying on their backs, using only the joint positions and velocities as input. The bipedal runs needed roughly 1 to 2 weeks of simulated experience.
Builds on: Policy Gradient, Generalized Advantage Estimation (GAE), Trust Region Policy Optimization (TRPO) · Leads to: Proximal Policy Optimization (PPO), Learning quadrupedal locomotion over challenging terrain
Why it mattered
The paper is one of the standard references for training continuous-control policies with on-policy reinforcement learning. The estimator it introduces, GAE, became the default advantage estimator in many later policy gradient systems, and the paper's experiments on MuJoCo locomotion tasks set a common benchmark. The paper has about 5,400 citations on Semantic Scholar. The direct successor, proximal policy optimization, replaces the trust-region step with a simpler clipped objective but keeps the same advantage estimate, so anyone who trains a robot or a language model with PPO-style updates is using the ideas introduced here.
The problem
Suppose a simulated robot receives a reward for moving forward and a penalty for wasting energy. Each episode yields one number, the total reward, but thousands of joint torques contributed to it. The learner has to decide which torques deserved credit. This is the credit assignment problem, and it has two consequences.
- Variance. If the learning signal for each action is the full return from that moment on, it depends on many random later events. The gradient estimate is then very noisy, and it needs many episodes to average out the noise.
- Stability. Estimators with less noise often lean on a learned value function. If that function is wrong, the estimate is biased, and a biased step can make the policy worse. Large policy steps make it worse faster.
The paper asks for an estimator of the advantage, that is, how much better an action was than the policy's usual behaviour, which is accurate enough to be useful and smooth enough to learn from, plus an update rule that does not jump too far in one step.
How it works
The method runs in batches. Here is one iteration, in the order the pipeline runs.
- Collect. Run the current policy in the simulator until a fixed number of timesteps is reached. The paper uses 50,000 timesteps per batch for bipedal walking and 200,000 for the quadruped and for standing up.
- Score each step with the value function. For every timestep , compute the temporal-difference residual , using the current value network . This residual is a one-step guess of how much better the action was than expected.
- Blend the residuals. Combine the residuals of the following steps with weights that shrink geometrically. This gives the advantage estimate . Here controls how far ahead the estimator looks.
- Update the policy. Form the policy gradient from the values, then take a trust-region step, which changes the policy only as much as a fixed budget of divergence allows.
- Update the value function. Fit to the observed discounted returns, again with a trust-region step, so the next batch gets better residuals.
- Repeat. Discard the batch and collect a new one with the updated policy.
Tiny trace. Take three timesteps with rewards , , , value estimates , , , and at the end. Use and for simplicity. Step 2 gives , , . Step 3 gives . The first action looked better than the value function expected, and the estimate says so. Check: the same numbers with would give , which is the total reward minus the baseline .
The diagram shows where each piece sits.
flowchart LR A["Batch of rollouts"] --> B["TD residuals delta_t using V"] B --> C["GAE advantages A_t with lambda"] C --> D["Policy gradient, trust-region step on theta"] C --> E["Value fit, trust-region step on phi"] D --> F["New policy"] E --> G["New value function"] F --> A G --> A
The math
A policy gradient estimator has the form
where indexes trajectories in the batch, holds the policy parameters, and is the score that says how to make the sampled action more likely. The paper's question is which to use.
Step 1 in symbols: the residual
Here is the reward, is a discount between 0 and 1, and is the value estimate. If were exact, the expected residual would equal the advantage. Otherwise it is biased but has low variance.
Step 2 in symbols: the -step estimators
Summing residuals telescopes into a -step return minus a baseline:
Large means less bias from and more variance from the rewards. Small means the reverse.
Step 3 in symbols: the exponential blend
Weight the -step estimators by and sum. The sum collapses to
Two special cases bracket the family. At you get the one-step residual , which has the least variance and the most bias. At you get the discounted return minus . It does not depend on 's errors, so it has no bias from , but it is noisy. (With it still carries the bias that the discount introduces, as discussed below.) Values in between trade one for the other. The paper's analysis says also introduces bias regardless of how good is, while introduces bias only through errors in . That is why the best found was usually much lower than the best .
Step 4 in symbols: the trust-region policy step
The policy update solves
with . The constraint limits the average KL divergence between the old and new policies. The paper solves it approximately with conjugate gradient, which needs only products of the Fisher matrix (a matrix that measures how sensitive the policy's output is to small parameter changes) with vectors.
Step 5 in symbols: the value target
The value network is fitted to the discounted return , under a similar trust region that keeps the new value function within a fixed average distance of the old one.
Results
The paper reports learning curves, not a single headline score, and the parameter sweeps are the main evidence.
- Cart-pole, 21 seeds. Batches of 20 trajectories, each up to 1,000 steps. The best performance came at intermediate values, with between 0.96 and 0.99 and between 0.92 and 0.99. Setting was clearly worse.
- 3D bipedal locomotion, 9 seeds. The humanoid model has 33 state dimensions and 10 actuators. The best settings were between 0.99 and 0.995 and between 0.96 and 0.99. After 1,000 iterations the paper describes a fast, smooth and stable gait.
- Quadruped locomotion and standing up, 5 seeds each. The quadruped model has 29 state dimensions and 8 actuators. The best quadruped results used a value function with . For standing up, the value function always helped, and and gave about the same result.
What these numbers mean. The same network size and the same method worked across three different robots, which is evidence that the estimator is not tuned to one body. Choosing an intermediate between about 0.9 and 0.99 was the most reliable rule the paper found.
The limits. All experiments are in simulation, and the bipedal runs used about 1 to 2 weeks of simulated time. The parameters and were tuned by sweeping, not learned. The authors note that the link between value error and policy-gradient error is still open, so there is no formula that tells you the best in advance.
Reading guide
Read the paper in this order, with the lesson it depends on.
- Abstract and Section 1. Credit assignment and the variance-bias tension. Needs Policy Gradient and Advantage Function.
- Section 2, Preliminaries. The undiscounted problem and the advantage definitions. Needs Markov Decision Process and Value Function.
- Section 3, Advantage function estimation. The core of the paper, with the -step and GAE formulas. Needs Temporal-Difference Learning and Generalized Advantage Estimation (GAE).
- Section 4, Reward shaping. The reinterpretation of as an extra discount. Needs Reward Shaping and Discount Rate.
- Section 5, Value function estimation. The trust-region fit for the value network. Needs Function Approximation and Conjugate Gradient.
- Section 6, Experiments. TRPO setup and the robot tasks. Needs Trust Region Policy Optimization (TRPO), Kullback–Leibler Divergence and Feedforward Neural Network.
- Appendix A. Compatible features and why the paper uses a state value rather than a Q function. Needs Actor-Critic Methods.
Check yourself
QuestionRecall: what is the name of the knob that trades bias for variance in the generalized advantage estimator, and what does a value of 0 give?Show answer
The knob is . At the estimator is the one-step residual . It has low variance and the most bias when is inaccurate.
QuestionCompute: with , , and residuals , , , what is ?Show answer
.
QuestionWhy: why is the one-step residual biased when the value function is wrong, while the raw discounted return is not?Show answer
The residual uses at two states, so any error in passes straight into the estimate. The raw return uses only sampled rewards, so it does not depend on at all, but its variance is larger because it sums many random rewards.
QuestionA researcher picks and for a new robot with a poor value function. What should they expect, and what does the paper suggest?Show answer
With the estimator is the discounted return minus the baseline. It does not depend on the value function's quality, though still adds some bias, and its variance is high, so learning may be slow and noisy. The paper's sweeps suggest an intermediate around 0.9 to 0.99 usually works best, because it reduces variance while keeping bias from an inaccurate value function small.
Sources
- Schulman, Moritz, Levine, Jordan, Abbeel (2015), High-Dimensional Continuous Control Using Generalized Advantage Estimation: https://arxiv.org/abs/1506.02438
- Schulman et al. (2015), Trust Region Policy Optimization: https://arxiv.org/abs/1502.05477
- Sutton and Barto, Reinforcement Learning: An Introduction, 2nd edition: http://incompleteideas.net/book/the-book-2nd.html