Imagine an agent learning to press one of two buttons. The blue button gives it a treat every time; the red button gives it nothing. The agent does not know this yet. It has to try buttons and gradually adjust its chances of pressing each one.
A policy-gradient learner updates itself using the reward from the button it pressed, compared with a reference point called a baseline. The signal is simply reward minus baseline. Baselines are usually introduced as a way to make these updates less noisy. That story is true, but it misses what happens along one particular learning journey.
Two reference points, two reactions
Blue pays 1; red pays 0. After a red press, a low baseline gives red a positive signal (0 − (−0.4) = +0.4). A higher baseline gives red a negative one (0 − 0.4 = −0.4). What does that mean over a whole learning run, when each next press comes from the policy the agent has learned so far?
Starts with 50% blue · policy gradient + Adam step size 0.04 · β₁ = 0.9 · β₂ = 0.999 · ε = 10⁻⁸
Low baseline −0.4
Expected reward = chance of blue
Mean reward 0.50 · 0/1,000 runs below 0.1
Higher baseline +0.4
Expected reward = chance of blue
Mean reward 0.50 · 0/1,000 runs below 0.1
With the low baseline, even a disappointing red press gets reinforced. If the agent happens to press red a few times early on, red becomes more likely each time. Blue becomes rarer, so the agent gets fewer chances to discover that blue was better all along. Its own decisions determine what evidence it will see next.
With the higher baseline, a red press moves the agent away from red. It leaves the door open for more blue presses. The difference is less about one update than about the feedback loop: try a button, change the policy, then collect the next experience using that changed policy.
But isn't the average update the same?
Yes. At a fixed policy, subtracting either baseline leaves the expected policy gradient unchanged. Averaged over possible button presses, both point toward blue. But a learner lives through one sequence of presses, not the average of every possible sequence. An unlucky early streak can make the better button so unlikely that the corrective evidence almost never arrives.
In our ICML 2021 paper, we call quick reinforcement of the sampled action committal behaviour. A less committal update keeps alternatives in play for longer. That is why the baseline is tied to exploration and exploitation: it affects how quickly the learner acts as though its early experience has settled the question.
Why variance alone does not settle it
The two-button story is only the beginning. Give the agent three choices: blue pays 1, orange pays 0.7, and gray pays 0. The baseline that minimizes a natural-gradient update's variance can still let the agent settle on orange. The value baseline—the current policy's expected reward—adapts as the policy changes and helps it keep exploring.
Watch one learning run
Each point is a policy: the closer it is to a corner, the more often it chooses that arm. The triangle shows one selected random seed, with one trajectory per baseline. Choose whether learning begins uniformly or already favors orange; each learner samples its next action from its own current probabilities.
Starts uniformly (33% per arm) · policy gradient + Adam step size 0.04 · β₁ = 0.9 · β₂ = 0.999 · ε = 10⁻⁸
Variance of the sampled gradient
Exact one-step variance of the raw policy gradient fed into Adam, before its moment updates; log scale.
Each curve is measured at that learner's own current policy. “Minimum variance” only promises the smallest variance among baselines at the same policy, so its curve can sit above the value-baseline curve later.
Changing the optimizer changes the story. Adam does not show the same orange outcome from a uniform start in this short simulation. Starting already close to orange makes it a harder test: with the settings above, the minimum-variance baseline can keep Adam near the second-best arm much longer than the value baseline. That is an observed delay in these runs, not a theorem about Adam's eventual destination.
How do we derive the minimum-variance baseline?
For arm i, write its reward as ri, its current probability as πi, and its gradient direction as xi. The sampled gradient is Gi(b) = (ri − b) xi.
The expected sampled gradient does not depend on b, because Σi πixi = 0. So minimizing its variance means minimizing the part that does depend on the baseline:
Differentiate with respect to b and set the result to zero:
Natural policy gradient
For the three-arm softmax policy, the minimum-norm natural-gradient direction has ‖xi‖2 = 2 / (3πi2). The common factors cancel:
The value baseline is simply V(π) = πblue + 0.7πorange. At the uniform start, both baselines equal about 0.57, so both initially reinforce orange after choosing it. As learning unfolds, the minimum-variance baseline can fall while the value baseline rises with the policy's expected reward. This changes how strongly the learner commits to orange.
Policy gradient with Adam
In the Adam view, the sampled raw policy gradient uses xi = ei − π rather than the natural-gradient direction. The same differentiation gives a different minimum-variance baseline:
Adam then averages and rescales these gradients using its past first and second moments. The chart reports variance of the raw gradient before Adam; this formula does not claim to minimize variance of Adam's history-dependent parameter step.
What does the variance chart measure?
We calculate this exactly from all three possible arms at each displayed policy. The log scale keeps both small and large values visible.
This is not a rule to always choose a larger baseline. A learner that never commits has its own problems, and the precise results depend on the algorithm and setting. The useful shift in perspective is to ask what a baseline makes the agent do after each experience, and how that changes the experiences available later.
Our NeurIPS 2022 follow-up develops the story further, including why the value function is a particularly useful reference point under its assumptions. The broad lesson remains simple: in learning from your own actions, a baseline can change more than the noise. It can change when you decide you have seen enough.