Starting from , prove that rewards received before time can be dropped from the factor multiplying . What does this give you, and what is a subtle mistake with the discount factor?
Reinforcement learning, Policy gradients
Level L4 Advanced. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can prove the causality argument (an action cannot affect earlier rewards) using the zero-mean property of the score function.
Key idea
For , the reward is already fixed by the history before is chosen, and . So for , and only the reward-to-go remains.
Steps
- Expand the sum. . We show that the terms with are zero.
- Fix . Let be the history up to the state at time . The reward is a function of , because it was received at or before time .
- Condition on (law of total expectation): .
- The inner expectation is . So the whole term is .
- Therefore with . The estimator is still unbiased.
- The benefit is lower variance. We removed the terms with zero mean but non-zero variance, and the returns before only added noise.
- Subtle point on discounting. The exact gradient of has the factor in front of the score at time . Most implementations drop this factor. The result is then not the true gradient of the discounted objective, because it gives later states more weight than they should have.
Common mistakes
- Saying future rewards can also be dropped. They cannot, because does influence them.
- Using "the action is independent of the past rewards" as the reason. The real reason is that the score's expectation given the history is zero.
- Forgetting that the proof needs to be drawn from , so it fails for off-policy data without importance weights.
How long your answer should be
A page; 6–8 minutes.
Last checked on 4 December 2026.
Read this
Previous in Reinforcement learning: What is the "deadly triad" in reinforcement learning? How do you show with a two-state example, with and , a single weight , and reward everywhere, that off-policy semi-gradient TD(0) can diverge when only the transition is updated?
Next in Reinforcement learning: TRPO maximises a surrogate improvement subject to a KL bound. Linearise the objective as and the constraint as , where is the policy gradient and is the Fisher information matrix. Derive the step . For , and , what is , and how does its improvement compare with a plain gradient step that uses the same KL?