Part II / Reinforcement Learning
Value and advantage
Reward looks backward at what just happened. Value looks forward. Advantage asks the question policy improvement needs: was this action better than the alternatives we normally take here?
Expected return from a state under a policy.
Expected return after taking an action, then following the policy.
How much better that action is than the policy baseline.
The forecast and the surprise
A weather forecast says tomorrow will be 20 degrees. If the observed temperature is 21, the surprise is small; if it is 35, the surprise is large. Value is the policy's forecast of future return. Advantage measures how an action's expected outcome compares with that forecast.
Value is a baseline, not a moral judgment. A negative return can have positive advantage if every usual option in that situation is worse.
The state-value function V^pi(s) is expected return when the agent starts in state s and follows policy pi. The action-value function Q^pi(s,a) is expected return after choosing action a first and following the policy afterward. Advantage is their difference.
A query can be good in a bad incident
Suppose incidents with conflicting gateway evidence usually yield an expected return of 0.40 under the current policy. When the engine compares both paths before answering, the expected return is 0.75. That action's advantage is 0.75 - 0.40 = +0.35.
Now suppose the incident is irrecoverably ambiguous and every available action produces negative return. Immediate escalation has Q=-0.2, while guessing has Q=-0.8. If the policy baseline is V=-0.6, escalation has advantage +0.4. RL should increase its probability even though the absolute outcome remains negative.
This relative view reduces variance in policy gradients. If every trajectory on a difficult prompt gets low reward, we do not want to decrease every sampled action equally. We want to distinguish attempts that did better or worse than expected for that prompt and policy.
Bellman turns a future into one step
The Bellman relationship says value can be decomposed into immediate reward plus discounted value of the next state. It is a consistency equation, not one particular training algorithm.
Dynamic programming uses a known transition model to apply Bellman backups. Temporal-difference methods use sampled transitions. Q-learning learns an action-value function toward a target containing the best estimated next action; it is off-policy because the target policy can differ from the behavior that produced the sample. SARSA uses the action selected by the current behavior and is on-policy. Deep Q-Networks approximate Q with a neural network and train from replay data.[source] The expanded DQN system also stabilizes its targets with a periodically updated target network.[source]
These ideas matter even if an LLM pipeline never trains Q-learning. Bellman thinking teaches you to separate immediate metrics from future consequences, and critic networks in actor-critic methods are value estimators. PPO implementations commonly train a value head alongside the policy. GRPO's appeal is partly that it can avoid a separately learned critic by using a group-relative baseline.
Estimating advantage is a bias-variance choice
The Monte Carlo estimate G_t - V(s_t) uses the observed full return. It does not bootstrap from a later value estimate, so it avoids bootstrap bias, but the sampled return can be noisy. A one-step TD estimate r_t + gamma V(s_(t+1)) - V(s_t) depends heavily on the critic but has lower variance. Generalized advantage estimation combines several step lengths with a parameter commonly called lambda.[source]
A poor critic can mislead the policy. If value estimates depend on leaked answers or fail on new task distributions, advantage estimates become distorted. Critic quality deserves its own diagnostics: explained variance, calibration across task difficulty, error by trajectory length, and behavior after environment changes. A single training loss hides where the baseline fails.
A critic costs memory, compute, checkpoints, and distributed communication. In large-model RLHF, removing it can materially simplify infrastructure, which helps explain interest in group-relative methods. That simplification does not make reward or policy optimization trivial.
Only when the return is defined that way. Value predicts expected discounted return under a particular policy and reward. Change the policy, reward scale, horizon, or state representation and the value function changes.
Value belongs to a policy
Write the superscript pi mentally even when authors omit it. The value of "query Gateway A" depends on what the policy will do after the result. A careful policy may interpret the evidence and test an alternative. A weak policy may ignore it. Identical first actions can therefore have different Q-values under different continuation behavior.
Stale rollout data describes continuation behavior from an older policy. When a rapidly changing policy trains on trajectories from much older versions, their returns carry that mismatch. Off-policy algorithms explicitly correct or tolerate it; on-policy methods assume data near the current policy. Distributed agent RL turns this mathematical distinction into a weight-versioning and scheduling problem.
References
- Sutton and Barto, chapters 3-7, grounds value functions, Bellman equations, TD, SARSA, and Q-learning.
- Spinning Up provides a concise practitioner treatment of value, Q, advantage, and policy optimization.
- The original DQN preprint introduces the Atari deep Q-learning system; the expanded Nature paper documents the target-network system cited here.
- Schulman et al. is the primary source for generalized advantage estimation.