5.2.11 · D5Deep & Advanced RL
Question bank — Soft Actor-Critic (SAC)
Before we start, one vocabulary reminder so every line below reads cleanly:
True or false — justify
TRUE/FALSE: SAC's optimal policy is always stochastic.
False. As the Boltzmann policy collapses onto the single highest- action — it becomes deterministic, i.e. plain reward-only RL like DDPG.
TRUE/FALSE: A higher entropy bonus always improves the final task reward.
False. Entropy is a means, not the goal. Too-large makes the policy near-uniform and it never commits to the good actions, so task reward drops. The bonus helps exploration, not the score itself.
TRUE/FALSE: The soft value can exceed the largest achievable .
True. , and the entropy term is positive (since ), so can sit above the best Q by up to the entropy bonus.
TRUE/FALSE: SAC needs two Q-networks because one network is not expressive enough.
False. Expressiveness is irrelevant; the twin is about bias. A single Q self-selects noisy over-estimates through the target's max-like step, so we take to stay pessimistic — the same fix as TD3.
TRUE/FALSE: Being off-policy is what lets SAC reuse old replay data and beat PPO on sample efficiency.
True. Off-policy learning updates the current policy from data generated by earlier policies, so nothing is thrown away; on-policy PPO must discard data after each update.
TRUE/FALSE: The entropy term appears in both the critic target and the actor loss.
True. In the target it becomes the bonus (); in the actor loss the term is what rewards the policy for staying random. Same idea, two places.
TRUE/FALSE: With automatic temperature tuning, is trained toward a target reward.
False. It is tuned toward a target entropy (often ). If current entropy is below target, grows to encourage more exploration; if above, it shrinks.
TRUE/FALSE: SAC's actor loss is a policy gradient computed with the log-derivative (REINFORCE) trick.
False. SAC uses the Reparameterization Trick: makes the action a differentiable function of , so gradients flow straight through the sample — much lower variance than the score-function estimator.
Spot the error
WRONG: "Since we sample from a Gaussian, ."
We squash with , and a change of variables changes the density. The correct log-prob subtracts the Jacobian term: .
WRONG: "The soft Q target should use to be optimistic."
The opposite — SAC uses . Optimism amplifies overestimation bias; the pessimistic minimum cancels it, which is the whole point of clipped double-Q.
WRONG: "The entropy bonus in the target is ."
The sign is negative: . Because , the minus makes the term positive, correctly adding value for a more random next-state policy.
WRONG: "We can drop the tanh correction; it only shifts entropy by a constant, so -tuning is unaffected."
The correction depends on , not a constant. Omitting it biases the entropy estimate action-by-action, corrupting both the actor gradient and the auto- update.
WRONG: "The actor should maximize to keep entropy high."
The actor minimizes . Minimizing means making it more negative, i.e. higher entropy. Maximizing would make the policy spiky — the reverse of what we want.
WRONG: "SAC folds entropy into reward, so it is just standard RL on a shaped reward and needs no new Bellman equations."
Partly right in spirit, but the augmented ("soft") reward re-derives soft Bellman equations where carries the entropy of all future steps — see Bellman Equation and Maximum Entropy RL.
WRONG: "Boltzmann policy ."
It is , i.e. divide by . This matters: small sharpens the exponent (greedy), large flattens it (uniform) — the opposite of what would give.
Why questions
WHY does a reward-only optimal policy end up deterministic and fragile?
Maximizing pure reward puts all probability on the single best action, so one bad Q estimate reroutes the policy forever — no hedge, no exploration. Entropy keeps near-equal actions alive as a cushion.
WHY is the entropy bonus "self-annealing" as training progresses?
With auto-, once the policy has learned confident good actions its entropy naturally drops toward the target and shrinks, so exploration fades exactly when it is no longer needed — no manual schedule.
WHY does SAC put the entropy term at every timestep rather than once at the end?
Because exploration must be encouraged throughout the trajectory. The soft recursion accumulates the entropy bonus of all future steps, so acting randomly-but-usefully now is valued the whole way down.
WHY use squashing instead of just clipping the Gaussian sample to ?
Clipping is non-differentiable and piles probability mass on the boundaries, breaking the log-prob. is smooth and invertible, so the reparameterization gradient and the change-of-variables density both stay well-defined.
WHY is SAC often more stable than DDPG despite both being off-policy actor-critics?
DDPG's deterministic actor overfits sharp Q peaks and chases exploitable errors; SAC's entropy term smooths the target landscape and its twin critics curb overestimation, damping the feedback loops that make DDPG diverge.
WHY does the Soft Q-Learning view help understand SAC's optimal policy?
Soft Q-Learning shows the entropy-regularized greedy policy is the Boltzmann distribution ; SAC's actor is simply a tractable neural approximation that minimizes KL to that same target.
Edge cases
EDGE: What is the policy in the limit ?
The exponent for every action, so uniformly — the policy becomes uniform random, pure exploration with no reward preference.
EDGE: What is the entropy of a perfectly deterministic policy, and can SAC ever reach it?
(no uncertainty). SAC can only approach it as ; with and a Gaussian actor the entropy stays strictly positive, so it never fully commits.
EDGE: If both Q-networks report the same value, does the do anything?
No — , so the clip is inactive. The twin only helps when the networks disagree, which is exactly when one is likely an over-optimistic outlier.
EDGE: What happens near an action boundary under tanh squashing?
There , so — the density blows up and log-probs become numerically unstable. Implementations add a small inside the log to stay finite.
EDGE: If the replay buffer holds data from a very old policy, is SAC's target still valid?
Yes — the soft Bellman target only needs the transition plus a fresh action at . Being off-policy, it does not care which policy generated the stored .
EDGE: In a discrete-action setting, does the reparameterization trick still apply?
No — you cannot reparameterize a categorical sample through . Discrete SAC instead sums the actor/entropy terms over all actions analytically, sidestepping the sampling gradient entirely.
Recall One-line summary of the traps
Signs (minus on ), which extremum ( Q, minimize ), the not scaling, the tanh Jacobian, and the limits — those five are where nearly every SAC mistake hides.