Foundations of Machine Learning XIV: Finite Markov Decision Processes and Bellman's EquationsTextbook
Motivation
Reinforcement learning formalizes a scenario supervised learning cannot: an agent that actively interacts with an environment, choosing actions that change both the state it observes next and the reward it receives, rather than passively receiving an i.i.d. labeled sample. Every practical treatment of this scenario — from classical dynamic programming to modern deep reinforcement learning — is built on the Markov decision process (MDP), a model in which the effect of an action depends only on the current state, not on the full history that led to it. Two questions define the theory this mission covers: given a fixed way of acting (a policy), what value does it obtain, and how is that value actually computed rather than merely characterized as the solution of a fixed-point equation? Mohri, Rostamizadeh and Talwalkar's chapter 17 answers both for the stationary, infinite-horizon discounted case, and this mission targets its two central results: that a fixed policy's value is not just characterized but uniquely determined by a linear system with an explicit closed-form solution (Theorem 17.10), and that the optimal value function — obtained instead by choosing the best action at every state — can be computed by an iterative algorithm guaranteed to converge regardless of where it starts (Theorem 17.11).
Setting
A (finite) Markov decision process consists of a finite set of states , a finite set of actions , a transition kernel giving the distribution over the next state after taking action at state , and an expected reward for that transition. A (stationary) policy assigns each state a distribution over actions — possibly, but not necessarily, a point mass on a single action. Fixing turns the MDP into an ordinary Markov chain on : at each step the agent is at some state , draws , receives (expected) reward , and moves to a state drawn from . For a discount factor , the value of at is the expected discounted sum of future rewards starting from ,
and the state-action value function is the analogous quantity for taking at and then following . Marginalizing the raw kernel and reward over the mixed action gives the induced transition matrix and induced reward vector — the objects that turn 's value into a genuinely linear-algebraic quantity. A policy is optimal if for every policy and every state ; write for its value function.
Formalization targets
Theorem 17.10 (goal). For a finite MDP and a fixed policy , the matrix (with the policy-induced transition matrix) is invertible, and 's value function is the unique solution of the Bellman equations, given in closed form by
Proposition 17.9 (milestone). The value function itself satisfies the linear system that Theorem 17.10 solves:
Theorem 17.7 (milestone). A policy is optimal if and only if it places probability only on -maximizing actions: for every with , .
Theorem 17.11 (milestone). The Bellman optimality operator , , is a -contraction for ; consequently, for any starting vector , the value-iteration sequence converges to a fixed point of .
Significance
Theorem 17.10 is what makes policy evaluation on a finite MDP an exact, finite computation rather than an infinite limit: instead of summing an infinite discounted series or solving an implicit fixed-point equation numerically, a single matrix inversion gives the policy's value at every state simultaneously. It is also the base case every planning algorithm in the chapter builds on: policy iteration alternates optimizing a policy with exactly this evaluation step. Theorem 17.11 gives the complementary guarantee for the harder problem of finding the optimal value function directly, without fixing a policy first: value iteration converges from any starting point, with a convergence rate ( iterations for -accuracy) that follows from the same contraction argument. Together, the two results are the mathematical content behind why dynamic-programming planning for finite MDPs is tractable at all — the discount factor , not any structural assumption on rewards or transitions, is what buys both the uniqueness in Theorem 17.10 and the convergence in Theorem 17.11. Formalizing them requires reproducing this linear-algebraic and metric content precisely, not just asserting the conclusions: an invertibility claim asserted without the operator-norm argument, or a convergence claim without the contraction property, would state something true by fiat rather than the book's actual result. No faithful prior art exists on the platform for this exact model (see Formalization scope).
Difficulty
The obvious shortcut for Theorem 17.10 is to assert is invertible without proof — true, but not what the book does, and not informative about why it holds. The genuine content is that , being row-stochastic (every row of sums to exactly , since and are both proper distributions), has operator norm exactly, so strictly; this rules out as an eigenvalue of , which is exactly what invertibility of requires. The same fact, applied differently, drives Theorem 17.11: showing is -Lipschitz requires bounding by comparing the maximizing action for against the same action's value under (not 's own maximizer), since the two suprema need not be attained at the same action — a step easy to state incorrectly as a direct comparison of two maxima. Both theorems fail if is allowed: the discounted setting's central asset, a strict contraction, disappears exactly at that boundary.
Formalization scope
States and actions are modeled as finite types (Fintype S, Fintype A); the raw kernel and
reward P : S → A → S → ℝ, Er : S → A → ℝ are unconstrained functions, with IsTransitionKernel
asserting the required distribution property explicitly rather than assuming it silently. A
policy is π : S → A → ℝ with IsPolicy π asserting π s is a distribution over A for every
s — deliberately not π : S → A or a PMF-valued function, since Theorem 17.7's own
quantifier ("for any pair (s,a) with π(s)(a) > 0") requires treating π(s) as a genuine
mixture. PolicyValue is defined as the actual infinite discounted expectation (via an explicit
state-occupation-distribution recursion), not as the Bellman fixed point — so that Proposition
17.9 (the value function satisfies the linear system) and Theorem 17.10 (that system has a
unique, invertible-matrix solution) are both non-vacuous claims about the same object, rather
than one being definitionally true of the other. The trivializing formalization this rules out
is asserting IsUnit (1 - γ • P) as a bare hypothesis, or defining V_π as (1-γP)⁻¹R and
calling the resulting identity a theorem; both would erase the mission's actual content.
Two platform modules model related MDPs (BertsekasSSPModel, a stochastic-shortest-path model
with a termination-probability deficit rather than exact row-stochasticity, and
FoundationsRL.RLBasics, a finite-horizon episodic model indexed by layer) — neither
specializes exactly to this chapter's stationary, always-continuing, infinite-horizon discounted
convention, so every definition here is drafted fresh rather than imported. This chunk covers
§17.2–17.4.2 (the MDP model, policy value, Bellman's equations, value and policy iteration);
§17.4.3 (the linear-programming formulation) and §17.5 (stochastic-approximation learning
algorithms — TD(0), Q-learning, SARSA) are out of scope, since they require a
stochastic-approximation convergence substrate this mission does not build.
Selected references
- Mohri, M., Rostamizadeh, A., and Talwalkar, A. Foundations of Machine Learning, 2nd ed., chapter 17. MIT Press, 2018.
- Bellman, R. Dynamic Programming. Princeton University Press, 1957.
- Puterman, M. L. Markov Decision Processes: Discrete Stochastic Dynamic Programming. Wiley, 1994.