Documentation

CslibFrontier.Probability.MarkovChain.PathCoupling

Path coupling #

Path coupling ([LP17], Section 14.2, after Bubley and Dyer) bounds mixing by coupling only neighboring states. Suppose ρ behaves like the path metric of a neighbor relation N with edge lengths at least one ([LP17], (14.5)): it is at least one off the diagonal and every pair has a geodesic step to a neighbor (Cslib.Probability.MarkovChain.IsPathMetric; symmetry and the triangle inequality are not needed). Suppose also that every neighboring pair x, y admits a coupling of P x and P y under which ρ contracts in expectation by a factor κ ((14.8) with κ = e^{-α}). Then t steps contract ρ by κ ^ t in statistical distance: ‖Pᵗ(x, ·) - Pᵗ(y, ·)‖_TV ≤ κ ^ t ρ(x, y) (Cslib.Probability.MarkovChain.dist_pow_le_of_pathCoupling). Hence d(t) ≤ κ ^ t diam and t_mix(ε) ≤ ⌈(log diam - log ε) / α⌉ ([LP17], Corollary 14.8).

The source proves Theorem 14.6 through the transportation metric ρ_K and an optimal transport plan. This module uses the dual statement instead: one coupled step multiplies the ρ-Lipschitz constant of any function by κ (Cslib.Probability.MarkovChain.lipschitz_sum_pow), and statistical distance is the largest gap in expectation of a {0, 1}-valued function, which is 1-Lipschitz because ρ ≥ 1 off the diagonal. A Lipschitz bound along neighbors extends to all pairs along a geodesic (Cslib.Probability.MarkovChain.IsPathMetric.lipschitz), which plays the role of the triangle inequality for ρ_K. No optimal transport plan or gluing of couplings is needed.

Every result also has a form relative to a set C of states that is closed under P (suffix _on, with Cslib.Probability.MarkovChain.IsPathMetricOn): the hypotheses are needed only for states in C, and the conclusion holds for chains started in C. This is the form for a chain that does not mix on all of S, such as Glauber dynamics with a frozen boundary ([LP17], Section 14.4.2), and the global results are its case C = univ.

Hamming distance is the path metric of the relation "at Hamming distance one" (Cslib.Probability.MarkovChain.isPathMetric_hammingDist), and also relative to any set closed under copying one coordinate (Cslib.Probability.MarkovChain.isPathMetricOn_hammingDist). This is the setting of the coloring application in CslibFrontier.Probability.MarkovChain.Coloring.

Expectations are written as finite sums ∑ a, (μ a).toReal * f a.

Main definitions #

Main results #

References #

Path metrics #

structure Cslib.Probability.MarkovChain.IsPathMetric {S : Type u_1} (N : S → S → Prop) (ρ : S → S → ℝ) :

The conditions on ρ and the neighbor relation N that path coupling uses: ρ vanishes on the diagonal, is at least one off it, and every x ≠ y has a neighbor z ≠ x of x with ρ x z + ρ z y ≤ ρ x y (a geodesic step). The path metric of N with edge lengths at least one ([LP17], (14.5)) satisfies them, taking for z the second vertex of a shortest path, but they do not require ρ to be symmetric or to satisfy the triangle inequality.

  • self (x : S) : ρ x x = 0
  • one_le (x y : S) : x ≠ y → 1 ≤ ρ x y
  • exists_step (x y : S) : x ≠ y → ∃ (z : S), N x z ∧ x ≠ z ∧ ρ x z + ρ z y ≤ ρ x y
structure Cslib.Probability.MarkovChain.IsPathMetricOn {S : Type u_1} (C : Set S) (N : S → S → Prop) (ρ : S → S → ℝ) :

IsPathMetric relative to a set C of states: the conditions are required only for states in C, and the geodesic steps stay in C. This is the form needed for a chain that is confined to a closed set C.

  • self (x : S) : x ∈ C → ρ x x = 0
  • one_le (x : S) : x ∈ C → ∀ y ∈ C, x ≠ y → 1 ≤ ρ x y
  • exists_step (x : S) : x ∈ C → ∀ y ∈ C, x ≠ y → ∃ z ∈ C, N x z ∧ x ≠ z ∧ ρ x z + ρ z y ≤ ρ x y
theorem Cslib.Probability.MarkovChain.isPathMetricOn_univ {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} :
theorem Cslib.Probability.MarkovChain.IsPathMetricOn.nonneg {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} {C : Set S} (h : IsPathMetricOn C N ρ) {x y : S} (hx : x ∈ C) (hy : y ∈ C) :
0 ≤ ρ x y
theorem Cslib.Probability.MarkovChain.IsPathMetricOn.lipschitz {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} {C : Set S} (h : IsPathMetricOn C N ρ) {f : S → ℝ} {L : ℝ} (hL : 0 ≤ L) (hN : ∀ x ∈ C, ∀ z ∈ C, N x z → |f x - f z| ≤ L * ρ x z) {x y : S} (hx : x ∈ C) (hy : y ∈ C) :
|f x - f y| ≤ L * ρ x y

A Lipschitz bound along neighbors in C extends to all pairs in C.

theorem Cslib.Probability.MarkovChain.IsPathMetric.isPathMetricOn {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} (h : IsPathMetric N ρ) :
theorem Cslib.Probability.MarkovChain.IsPathMetric.nonneg {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} (h : IsPathMetric N ρ) (x y : S) :
0 ≤ ρ x y
theorem Cslib.Probability.MarkovChain.IsPathMetric.lipschitz {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} (h : IsPathMetric N ρ) {f : S → ℝ} {L : ℝ} (hL : 0 ≤ L) (hN : ∀ (x z : S), N x z → |f x - f z| ≤ L * ρ x z) (x y : S) :
|f x - f y| ≤ L * ρ x y

A Lipschitz bound along neighbors extends to all pairs.

theorem Cslib.Probability.MarkovChain.isPathMetricOn_hammingDist {ι : Type u_2} [Fintype ι] {β : ι → Type u_3} [(i : ι) → DecidableEq (β i)] [DecidableEq ι] {C : Set ((i : ι) → β i)} (hC : ∀ x ∈ C, ∀ y ∈ C, ∀ (i : ι), Function.update x i (y i) ∈ C) :
IsPathMetricOn C (fun (x y : (i : ι) → β i) => hammingDist x y = 1) fun (x y : (i : ι) → β i) => ↑(hammingDist x y)

Hamming distance is a path metric, relative to any set C closed under copying one coordinate between two of its members: to move from x toward y ≠ x, change one coordinate where they differ to its value in y.

theorem Cslib.Probability.MarkovChain.isPathMetric_hammingDist {ι : Type u_2} [Fintype ι] {β : ι → Type u_3} [(i : ι) → DecidableEq (β i)] :
IsPathMetric (fun (x y : (i : ι) → β i) => hammingDist x y = 1) fun (x y : (i : ι) → β i) => ↑(hammingDist x y)

Hamming distance is the path metric of the relation "at Hamming distance one".

Path coupling #

theorem Cslib.Probability.MarkovChain.lipschitz_sum_of_coupling_on {S : Type u_1} {ρ : S → S → ℝ} [Fintype S] {P : MarkovChain S} {C : Set S} {f : S → ℝ} {L κ : ℝ} (hL : 0 ≤ L) (hf : ∀ a ∈ C, ∀ b ∈ C, |f a - f b| ≤ L * ρ a b) {x y : S} (hxC : (P.step x).support ⊆ C) (hyC : (P.step y).support ⊆ C) (ω : PMF (S × S)) (h1 : PMF.map Prod.fst ω = P.step x) (h2 : PMF.map Prod.snd ω = P.step y) (hω : ∑ p : S × S, (ω p).toReal * ρ p.1 p.2 ≤ κ * ρ x y) :
|∑ a : S, ((P.step x) a).toReal * f a - ∑ a : S, ((P.step y) a).toReal * f a| ≤ L * κ * ρ x y

One coupled step contracts a function that is Lipschitz on a set C containing the supports of P x and P y: if ω couples P x with P y and E_ω ρ ≤ κ ρ(x, y), then the expectations of f differ by at most L κ ρ(x, y).

theorem Cslib.Probability.MarkovChain.lipschitz_sum_of_coupling {S : Type u_1} {ρ : S → S → ℝ} [Fintype S] {P : MarkovChain S} {f : S → ℝ} {L κ : ℝ} (hL : 0 ≤ L) (hf : ∀ (a b : S), |f a - f b| ≤ L * ρ a b) {x y : S} (ω : PMF (S × S)) (h1 : PMF.map Prod.fst ω = P.step x) (h2 : PMF.map Prod.snd ω = P.step y) (hω : ∑ p : S × S, (ω p).toReal * ρ p.1 p.2 ≤ κ * ρ x y) :
|∑ a : S, ((P.step x) a).toReal * f a - ∑ a : S, ((P.step y) a).toReal * f a| ≤ L * κ * ρ x y

One coupled step contracts a Lipschitz function: if ω couples P x with P y and E_ω ρ ≤ κ ρ(x, y), then the expectations of an L-Lipschitz f differ by at most L κ ρ(x, y).

theorem Cslib.Probability.MarkovChain.lipschitz_sum_pow_on {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} [Fintype S] {P : MarkovChain S} {C : Set S} (hρ : IsPathMetricOn C N ρ) (hP : ∀ x ∈ C, (P.step x).support ⊆ C) {κ : ℝ} (hκ : 0 ≤ κ) (hc : ∀ x ∈ C, ∀ y ∈ C, N x y → ∃ (ω : PMF (S × S)), PMF.map Prod.fst ω = P.step x ∧ PMF.map Prod.snd ω = P.step y ∧ ∑ p : S × S, (ω p).toReal * ρ p.1 p.2 ≤ κ * ρ x y) {f : S → ℝ} {L : ℝ} (hL : 0 ≤ L) (hf : ∀ a ∈ C, ∀ b ∈ C, |f a - f b| ≤ L * ρ a b) (t : ℕ) {x y : S} (hx : x ∈ C) (hy : y ∈ C) :
|∑ a : S, (((P ^ t).step x) a).toReal * f a - ∑ a : S, (((P ^ t).step y) a).toReal * f a| ≤ L * κ ^ t * ρ x y

Path coupling on a closed set, Lipschitz form. Let C be closed under P. If every neighboring pair in C admits a one-step coupling that contracts ρ in expectation by κ, then t steps multiply Lipschitz constants on C by κ ^ t.

theorem Cslib.Probability.MarkovChain.lipschitz_sum_pow {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} [Fintype S] {P : MarkovChain S} (hρ : IsPathMetric N ρ) {κ : ℝ} (hκ : 0 ≤ κ) (hc : ∀ (x y : S), N x y → ∃ (ω : PMF (S × S)), PMF.map Prod.fst ω = P.step x ∧ PMF.map Prod.snd ω = P.step y ∧ ∑ p : S × S, (ω p).toReal * ρ p.1 p.2 ≤ κ * ρ x y) {f : S → ℝ} {L : ℝ} (hL : 0 ≤ L) (hf : ∀ (a b : S), |f a - f b| ≤ L * ρ a b) (t : ℕ) (x y : S) :
|∑ a : S, (((P ^ t).step x) a).toReal * f a - ∑ a : S, (((P ^ t).step y) a).toReal * f a| ≤ L * κ ^ t * ρ x y

Path coupling, Lipschitz form. If every neighboring pair admits a one-step coupling that contracts ρ in expectation by κ, then t steps multiply ρ-Lipschitz constants by κ ^ t. This is the dual form of [LP17], Theorem 14.6.

theorem Cslib.Probability.MarkovChain.dist_pow_le_of_pathCoupling_on {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} [Fintype S] {P : MarkovChain S} {C : Set S} (hρ : IsPathMetricOn C N ρ) (hP : ∀ x ∈ C, (P.step x).support ⊆ C) {κ : ℝ} (hκ : 0 ≤ κ) (hc : ∀ x ∈ C, ∀ y ∈ C, N x y → ∃ (ω : PMF (S × S)), PMF.map Prod.fst ω = P.step x ∧ PMF.map Prod.snd ω = P.step y ∧ ∑ p : S × S, (ω p).toReal * ρ p.1 p.2 ≤ κ * ρ x y) (t : ℕ) {x y : S} (hx : x ∈ C) (hy : y ∈ C) :
dist ((P ^ t).step x) ((P ^ t).step y) ≤ κ ^ t * ρ x y

Path coupling on a closed set ([LP17], Theorem 14.6 with (14.7), for a chain confined to a closed set C): if every neighboring pair in C admits a one-step coupling that contracts ρ in expectation by κ, then after t steps the chains started at any x, y ∈ C are within statistical distance κ ^ t ρ(x, y).

theorem Cslib.Probability.MarkovChain.dist_pow_le_of_pathCoupling {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} [Fintype S] {P : MarkovChain S} (hρ : IsPathMetric N ρ) {κ : ℝ} (hκ : 0 ≤ κ) (hc : ∀ (x y : S), N x y → ∃ (ω : PMF (S × S)), PMF.map Prod.fst ω = P.step x ∧ PMF.map Prod.snd ω = P.step y ∧ ∑ p : S × S, (ω p).toReal * ρ p.1 p.2 ≤ κ * ρ x y) (t : ℕ) (x y : S) :
dist ((P ^ t).step x) ((P ^ t).step y) ≤ κ ^ t * ρ x y

Path coupling ([LP17], Theorem 14.6 with (14.7), after Bubley and Dyer): if every neighboring pair admits a one-step coupling that contracts ρ in expectation by κ, then after t steps the chains started at any x and y are within statistical distance κ ^ t ρ(x, y).

theorem Cslib.Probability.MarkovChain.distPair_le_of_pathCoupling {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} [Fintype S] {P : MarkovChain S} [Nonempty S] (hρ : IsPathMetric N ρ) {κ : ℝ} (hκ : 0 ≤ κ) (hc : ∀ (x y : S), N x y → ∃ (ω : PMF (S × S)), PMF.map Prod.fst ω = P.step x ∧ PMF.map Prod.snd ω = P.step y ∧ ∑ p : S × S, (ω p).toReal * ρ p.1 p.2 ≤ κ * ρ x y) {D : ℝ} (hD : ∀ (x y : S), ρ x y ≤ D) (t : ℕ) :
P.distPair t ≤ κ ^ t * D

Path coupling bounds d̄(t) ≤ κ ^ t diam.

theorem Cslib.Probability.MarkovChain.IsStationary.dist_le_of_pathCoupling_on {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) {C : Set S} (hπC : π.support ⊆ C) (hρ : IsPathMetricOn C N ρ) (hP : ∀ x ∈ C, (P.step x).support ⊆ C) {κ : ℝ} (hκ : 0 ≤ κ) (hc : ∀ x ∈ C, ∀ y ∈ C, N x y → ∃ (ω : PMF (S × S)), PMF.map Prod.fst ω = P.step x ∧ PMF.map Prod.snd ω = P.step y ∧ ∑ p : S × S, (ω p).toReal * ρ p.1 p.2 ≤ κ * ρ x y) {D : ℝ} (hD : ∀ x ∈ C, ∀ y ∈ C, ρ x y ≤ D) (t : ℕ) {x : S} (hx : x ∈ C) :
dist ((P ^ t).step x) π ≤ κ ^ t * D

Path coupling bound on mixing from a closed set ([LP17], Corollary 14.8, for a chain confined to a closed set C that contains the support of the stationary π): from any x ∈ C, ‖Pᵗ(x, ·) - π‖_TV ≤ κ ^ t diam(C).

theorem Cslib.Probability.MarkovChain.IsStationary.distToStationary_le_of_pathCoupling {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) (hρ : IsPathMetric N ρ) {κ : ℝ} (hκ : 0 ≤ κ) (hc : ∀ (x y : S), N x y → ∃ (ω : PMF (S × S)), PMF.map Prod.fst ω = P.step x ∧ PMF.map Prod.snd ω = P.step y ∧ ∑ p : S × S, (ω p).toReal * ρ p.1 p.2 ≤ κ * ρ x y) {D : ℝ} (hD : ∀ (x y : S), ρ x y ≤ D) (t : ℕ) :
P.distToStationary π t ≤ κ ^ t * D

Path coupling bound on mixing ([LP17], Corollary 14.8): d(t) ≤ κ ^ t diam.

theorem Cslib.Probability.MarkovChain.IsStationary.mixingTime_le_of_pathCoupling {S : Type u_1} {N : S → S → Prop} {ρ : S → S → ℝ} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) (hρ : IsPathMetric N ρ) {κ α : ℝ} (hκ : 0 ≤ κ) (hα : 0 < α) (hκα : κ ≤ Real.exp (-α)) (hc : ∀ (x y : S), N x y → ∃ (ω : PMF (S × S)), PMF.map Prod.fst ω = P.step x ∧ PMF.map Prod.snd ω = P.step y ∧ ∑ p : S × S, (ω p).toReal * ρ p.1 p.2 ≤ κ * ρ x y) {D : ℝ} (hD0 : 0 < D) (hD : ∀ (x y : S), ρ x y ≤ D) {ε : ℝ} (hε : 0 < ε) :

Path coupling bound on the mixing time ([LP17], Corollary 14.8): if the contraction factor is at most e^{-α} with α > 0 and ρ ≤ D, then t_mix(ε) ≤ ⌈(log D - log ε) / α⌉.