5.2.7 · D5Deep & Advanced RL

Question bank — Actor-critic methods

1,917 words9 min readBack to topic

Before you start, a one-line refresher on every symbol used below, so nothing is unearned:

The figure below traces the loop: the actor sends an action, the environment returns and , and the critic forms one that then flows up to the actor (as an advantage) and down into itself (as an error to reduce). Several answers below (WQ1, EC1, SE5) refer back to specific arrows in it.

Figure — Actor-critic methods

True or false — justify

TF1. In REINFORCE, the return is a biased estimate of the policy gradient.
False. (the actual trajectory return defined above) is unbiased — correct on average; its problem is high variance, because it depends on an entire random trajectory — see REINFORCE.
TF2. Subtracting a baseline that depends only on the state changes the expected gradient.
False. Its expected contribution is exactly zero because , so the gradient stays unbiased while variance can drop.
TF3. A baseline that depends on the action, , is still safe to subtract.
False. Only state-only baselines cancel cleanly; an action-dependent term does not integrate to zero and would bias the gradient (unless carefully corrected, as in some control-variate schemes).
TF4. The true advantage can be negative even when the immediate reward is positive.
True. compares the action's full value against the state average ; if the action leads to poor futures, and despite . (In practice we estimate this via the one-step , which can likewise be negative when is low.)
TF5. Actor-critic must wait until the episode ends to update, like Monte-Carlo REINFORCE.
False. It is online/incremental: the bootstrapped needs only , so it updates every step — that's the whole point of using Temporal Difference Learning.
TF6. In the update we should also differentiate the target .
False. The target is treated as fixed (stop-gradient) — this is semi-gradient TD; differentiating the target invites instability.
TF7. A2C and A3C use fundamentally different mathematics from vanilla actor-critic.
False. Same advantage math; A2C batches synchronous advantages, A3C runs asynchronous parallel workers — different plumbing, identical objective (see A3C and A2C).
TF8. The variance-minimizing state-only baseline is exactly .
True (to the standard approximation used in derivations). For the pure policy-gradient objective the optimal constant-per-state baseline is — subtracting it centers the return's mean to zero in each state, which is why is the canonical baseline, not just a convenient one.
TF9. If the critic is perfect, the actor's gradient becomes zero.
False. A perfect critic gives accurate advantages, not zero ones — the gradient vanishes only when the policy is optimal so that for all improvements.

Spot the error

SE1. "I'll set to keep things simple."
The critic should usually learn faster () so the advantage the actor trusts is reasonably accurate — a lagging critic feeds the actor garbage. This is the two-timescale requirement.
SE2. "Advantage and reward are basically the same, so I'll just multiply the log-prob by ."
Raw reward has no baseline, so it carries the high-variance "how good is this state at all" term. Subtracting cancels that, cutting variance while staying unbiased.
SE3. "I updated the actor with so bad actions still get pushed strongly."
The sign of carries the direction; using would push worse-than-expected actions up, breaking the credit signal entirely.
SE4. "The critic outputs , so I don't need — I'll use directly as the actor's weight."
Then you lose the baseline and its variance reduction. You want the advantage , not ; using alone reintroduces the state-value nuisance term.
SE5. "My TD error is ."
The subtracted term must be (the state you left), not — the figure's "fit V" arrow reads , the start state. As written collapses to and destroys the bootstrap.
SE6. "I use in a never-ending (continuing) task."
With and no episode end, the bootstrapped value can diverge (infinite undiscounted sum). Continuing tasks need or an average-reward formulation.
SE7. "The actor's softmax gradient just raises the chosen action's logit ."
It also lowers every other logit in proportion to its probability: . It's a competition, not a solo raise ( = the raw pre-softmax score of action ).

Why questions

WQ1. Why does the same appear in both the actor and critic updates?
It is one quantity with two readings: to the critic it's "you mispredicted by " (error to reduce), and to the actor it's "this action beat expectation by " (advantage estimate). In the figure this is the single box whose two arrows split up to the actor and down to the critic — see Advantage function.
WQ2. Why does actor-critic have lower variance than REINFORCE but potentially some bias?
Bootstrapping replaces the noisy full return with , slashing variance; but because is only an estimate, the signal is no longer perfectly unbiased — a bias/variance trade dial explored by Generalized Advantage Estimation (GAE).
WQ3. Why is a state-only baseline "free" (no bias) yet still useful?
Its expected pull on the gradient is exactly zero (TF2), so on average it changes nothing — but it re-centers the noisy per-sample signal around zero, shrinking its spread.
WQ4. Why can't pure value methods (Q-learning) easily handle continuous action spaces, motivating the actor?
They need , an intractable search over a continuum; the actor sidesteps this by directly parameterizing a policy you can sample from.
WQ5. Why does the advantage's sign matter more than its magnitude for direction?
Positive action was better than the state's average raise its probability; negative worse lower it. Magnitude only scales the step size, direction is set by sign.
WQ6. Why does PPO still keep a critic despite clipping the policy update?
It needs advantage estimates to weight the (clipped) policy-gradient; the critic supplies for computing those advantages — see Proximal Policy Optimization (PPO).
WQ7. Why does the Policy Gradient Theorem permit any baseline inside the credit signal ?
Because the theorem's expectation factorizes so that any state-only additive term multiplied by averages to zero — so replacing with (or ) leaves the gradient unbiased. That identity licenses the whole baseline trick.

Edge cases

EC1. Terminal state : what happens to the bootstrap term ?
It is set to zero (there is no future beyond terminal), so — in the figure, the "r, s'" arrow returns a terminal whose value contributes nothing. Forgetting this leaks phantom future value into the last step.
EC2. Reward is identically zero on a transition but has high value — is zero?
Not necessarily. ; if the transition is still "surprisingly good" and .
EC3. The critic is randomly initialized at the start of training — is early actor learning meaningful?
Mostly noise at first, since advantages are near-random; this is why the critic is given a faster learning rate to become useful before the actor commits hard.
EC4. Deterministic actor (zero policy entropy): what breaks?
Exploration collapses — pushes probability toward one action, so no alternatives are sampled and the advantage signal can't discover better actions. Entropy regularization counters this.
EC5. (myopic agent): what does the advantage reduce to?
; the critic learns immediate expected reward and the actor is trained purely on "did this beat my expected immediate reward" — no lookahead at all.
EC6. Advantages all equal (constant across actions in a state): does the actor move?
The softmax gradient's competition term subtracts the mean, so a constant advantage produces exactly zero net update in that state — only differences between actions drive change.
EC7. Critic overfits and predicts far too high everywhere: effect on actor?
Advantages become systematically negative, so nearly every action gets pushed down — the policy can collapse or stall until the critic's bias corrects.

Connections