Bellman Operators & Contraction
Fixed points, Banach’s theorem, and why repeated backups converge.
Every planning and learning algorithm in this course applies a Bellman operator over and over, exactly or from samples. This lesson proves why that converges and what the limit guarantees, prices an imperfect value function in lost return, and then goes where the classical proof stops: norms in which the operators do or do not contract, why greedy policies settle long before values do, and what the iterates look like in the geometry of value space.
What you’ll learn
- Prove that and are monotone and shift constants by , and derive their -contraction from these two properties.
- State and prove Banach's fixed point theorem with its a priori and a posteriori error bounds, and apply it to policy evaluation and value iteration.
- Prove that a policy greedy with respect to , with , loses at most , and construct an MDP where the loss reaches the bound.
- Analyze contraction in the span seminorm and in weighted norms, and show where the optimality operator fails to contract.
- Locate value-iteration and policy-iteration iterates in the value polytope.
Two operators, two properties
Monotonicity. has nonnegative entries, so implies . Each bracket inside the maximum of is monotone in , and a maximum of monotone functions is monotone:
Constant shift. Every row sums to 1, so a constant added in every state comes back multiplied by , in both operators:
Contraction. Let , so that . Apply monotonicity, then the shift:
Exchanging and gives the reverse inequality, and together they bound every coordinate: a contraction of modulus in the max norm.
This argument, known as Blackwell's sufficient conditions for a contraction (Blackwell, 1965), never looks inside the maximum. Any operator that is monotone and satisfies for is a -contraction in the max norm: compositions and mixtures of Bellman operators, the max-min backups of two-player zero-sum stochastic games, and the log-sum-exp backups of entropy-regularized RL all qualify. The modulus cannot be improved in general: with one state and one action that loops back to it, shrinks every distance by exactly .
An optimistic planner adds a fixed bonus to the rewards: . Is a -contraction in the max norm?
- No: the bonus inflates the values, so the iterates can grow without bound
- Only if every bonus is smaller than
- Only in a weighted norm
- Yes: it is monotone and shifts constants by , so Blackwell's conditions hold; the bonus only moves the fixed point
Show the answer
D. Yes: it is monotone and shifts constants by , so Blackwell's conditions hold; the bonus only moves the fixed point
The bonus is a constant inside the bracket, so it affects neither monotonicity nor the shift property. contracts with modulus , and its unique fixed point is the optimal value of the MDP with rewards , at most above . Optimistic exploration algorithms plan with exactly such operators (Optimism in MDPs: UCRL2 & UCBVI).
Banach’s fixed point theorem
Successive steps shrink geometrically, so by the triangle inequality and the geometric series, iterates far apart in time are close:
So is a Cauchy sequence, and completeness gives a limit . A contraction is continuous, so letting in gives . Letting in the last display gives the second bound.
Uniqueness and rate. If also , then , which forces . The first bound follows by induction from .
A posteriori bound. By the triangle inequality, . Rearranging gives a bound that can be computed during the run, so it doubles as a stopping rule.
For a finite MDP, with is complete, and for infinite state spaces with bounded rewards the bounded functions with the sup norm are too. So the Bellman expectation equation has exactly one bounded solution, ; the optimality equation has exactly one, ; and iterative policy evaluation and value iteration converge from any start, with . Since , reaching accuracy takes at most iterations, rounded up: the effective horizon times a logarithm.
Value iteration on the two-state MDP of the value-space widget () starts at , where . By the bound , after how many backups is the error guaranteed to be at most 0.01?
Show the answer
73
We need , so : 73 backups. On this MDP the bound is exact: from the error shrinks by exactly 0.9 per backup, and the widget reports 73 as the first backup within 0.01.
What an imperfect value function costs
Use both fixed-point equations and insert :
Both operators are -contractions, and :
For action values, greediness gives, for every action , . So each step of gives up at most against , and adds these losses up over the horizon.
Two consequences follow.
- A stopping rule. If , the greedy policy of is -optimal (Puterman, 1994, Thm 6.3.1). Plugging the a posteriori bound into the theorem above gives only ; the sharper proof applies the a posteriori argument twice, to and to , each below . Error Bounds & Stopping Rules works through it.
- The policy converges in finitely many steps. A finite MDP has finitely many deterministic policies, so every suboptimal one falls short by at least some gap in some state. Once , every greedy policy is optimal, although the values converge only in the limit. On the two-state MDP , and the bound promises an optimal greedy policy from backup 37. In fact it is optimal from backup 2. The next step explains the gap.
Why greedy policies settle early: the span
Let , let be greedy for and greedy for in state . Using the other function's greedy action as a suboptimal choice bounds the difference from both sides:
So the difference between the values at two states and is at most for two rows and . Write with entrywise: both parts are nonnegative with the same total mass , so the first contributes at most and the second at least :
Maximize over the two states. For the same steps run with the rows of .
The two MDPs of the value-space widget show what this buys. In slippery, every row is or , so , and at the span of value iteration's error must shrink by a factor of at least per backup. From it is 2, 1, 0.46, 0.17, 0.011 and then exactly 0, while the max-norm error shrinks by a factor of 0.88 to 0.90 per backup. In default the moves are deterministic, , and the theorem promises nothing beyond ; yet the span of the error is 2, 1, 0.1 and then 0 from backup 3. The reason is the optimal policy: once the greedy policy is (go, stay), both states move to , has two equal rows, , and the remaining error is the constant vector . The values still have far to go, but no greedy choice can see the difference.
That last observation belongs to the geometry of value space. Dadashi, Taïga, Le Roux, Schuurmans and Bellemare (2019) showed that the set of values of all stationary policies is a polytope, in general not convex, whose vertices are values of deterministic policies, and that policies agreeing in all states but one have values on a single line segment (their line theorem). On the default MDP at the value polytope is a bowtie: two triangles touching at . The operators move through this picture in different ways. Each is an affine map pulling the whole plane toward one corner. Policy iteration jumps from corner to corner, at most times and in practice very few. Value iteration travels through the plane, often outside the polytope, and its greedy policy changes only when the point crosses a stripe boundary.
Weighted norms, and where the optimality operator fails
The max norm is not the only one that matters.
- Weighted max norms. Without discounting the max-norm argument fails, but in a stochastic shortest-path problem in which every stationary policy reaches the terminal state with probability 1, and every are contractions in a weighted max norm , with weights built from expected times to termination (Bertsekas & Tsitsiklis, 1996). States far from the end are allowed larger errors.
- Weighted norms. With function approximation, values are projected onto a space of features in a weighted norm . A projection is a non-expansion in its own norm but not in the max norm, so the stability of approximate methods turns on contraction in norms like .
Let be the normalized discounted state distribution of (Occupancy Measures & the Dual View). Its flow constraints, , give an entrywise inequality:
Apply Jensen's inequality inside each row of , then that inequality:
So . The bound is tight: for (go, stay) started in , , and the difference is stretched by exactly . With a stationary distribution of in place of , the same steps give modulus (Tsitsiklis & Van Roy, 1997), the fact behind the convergence of on-policy linear TD (The Projected Bellman Equation & LSTD).
No such norm need exist for . Take the default MDP with and any weights . Where (go, stay) is greedy for both points, in the stripe , the optimality operator acts as and maps a difference to , stretching its weighted norm by . Where (stay, go) is greedy, it maps to , a stretch of . One of is at most ½, so one stretch is at least at . Concretely, and are 8 apart in the unweighted Euclidean norm, while and are apart. Each contracts in a norm tuned to , but the maximum inside switches between policies that need incompatible weights: one root of the instability of approximate value iteration and Q-learning with function approximation (The Deadly Triad).
On-policy linear TD converges; Q-learning with linear features can diverge. Which operator fact lies behind the difference?
- is not a contraction in the max norm
- Linear features cannot represent
- Each contracts in an norm weighted by its own state distribution, but acts like a different in each region of value space, and no single weighting need work for all of them
- is linear and is not, and nonlinear maps never contract
Show the answer
C. Each contracts in an norm weighted by its own state distribution, but acts like a different in each region of value space, and no single weighting need work for all of them
Projection onto features is a non-expansion only in a weighted norm. contracts in the norm weighted by its own stationary or discounted distribution, so projected policy evaluation is stable on-policy. is piecewise equal to different , and on the two-state MDP no weighting makes all of them non-expansive once .
Key takeaways
- Monotonicity and the constant shift make every Bellman-type operator a -contraction in the max norm (Blackwell's conditions).
- Banach's theorem gives unique fixed points and , convergence from any start at rate , and the computable bound on the remaining error.
- A greedy policy built from an -accurate loses at most (at most from an -accurate ), and some MDPs attain this.
- Greedy policies see values only up to an additive constant. The span of the error contracts with modulus , where measures how little transition rows overlap, and it can vanish long before the max-norm error does.
- contracts in norms weighted by its own state distribution ( for the discounted occupancy, for the stationary one), while can fail to be a non-expansion in every weighted norm: one root of instability under function approximation.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Value iteration with reports . What does Banach's a posteriori bound guarantee about ?
- At most 0.09
- At most 0.1
- At most 0.9
- At most 1.0
Show the answer
C. At most 0.9
. A small last step does not mean a small error: the remaining steps can each be up to times the previous one, and they add up to times the last.
An agent's value estimates satisfy , with . In the worst case, how much can its greedy policy lose in some state?
- 0.5
- 1
- 9
- 99
Show the answer
D. 99
, and the example of the looping agent shows that such losses are attainable: a misjudgment of size about per step, paid over an effective horizon of 100 steps.
Which two properties of suffice to prove that it is a -contraction in the max norm?
- Monotonicity, and for constants
- Linearity and boundedness
- Continuity and convexity
- Uniqueness of the fixed point and existence of a greedy policy
Show the answer
A. Monotonicity, and for constants
Blackwell's conditions: from , monotonicity and the shift give , and symmetrically. Nothing about the maximum itself is used.
From some backup on, value iteration's error is a constant vector: with . What can you conclude?
- Nothing until falls below , as the greedy-loss bound requires
- The greedy policy of is optimal, although may still be large
- The greedy policy is optimal only once
- The iteration has stalled and must be restarted
Show the answer
B. The greedy policy of is optimal, although may still be large
Greedy choices are invariant to adding a constant to : every action's lookahead shifts by the same . So and have the same greedy policies, which are optimal. The span of the error is 0 while its max norm is : the situation of the default two-state MDP from backup 3.
Further reading
- D. Blackwell, "Discounted dynamic programming," Annals of Mathematical Statistics 36(1), 226–235 (1965).
- S. P. Singh & R. C. Yee, "An upper bound on the loss from approximate optimal-value functions," Machine Learning 16(3), 227–233 (1994).
- R. Dadashi, A. A. Taïga, N. Le Roux, D. Schuurmans & M. G. Bellemare, "The value function polytope in reinforcement learning," ICML, PMLR 97, 1486–1495 (2019).
- M. L. Puterman, Markov Decision Processes: Discrete Stochastic Dynamic Programming, ch. 6 (Wiley, 1994).
- D. P. Bertsekas & J. N. Tsitsiklis, Neuro-Dynamic Programming, ch. 2 (Athena Scientific, 1996).