Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

Linear algebra

222 missions · 132 completed

Missions

Open90Completed132All222
🏆Completed
Combinatorics·Captain: mikedeng1

Applied Combinatorics V: Linear Recurrence Equations and the Advancement OperatorTextbook

Motivation

Linear recurrences with constant coefficients are among the first tools of enumerative combinatorics and the analysis of algorithms: the Fibonacci numbers, the number of binary strings avoiding a pattern, the running time of a divide-and-conquer loop and the number of tilings of a strip all satisfy relations of the form c0an+k+c1an+k−1+⋯+ckan=0c_0 a_{n+k} + c_1 a_{n+k-1} + \cdots + c_k a_n = 0c0​an+k​+c1​an+k−1​+⋯+ck​an​=0. Chapter 9 of Keller and Trotter's Applied Combinatorics (appliedcombinatorics.org) treats such relations as linear equations in an operator, the advancement operator, in direct analogy with linear differential equations with constant coefficients. The chapter's Principal Theorem says that the solution set of such an equation is a vector space whose dimension equals the order of the recurrence; everything else in the chapter (general solutions for distinct and repeated roots, and the reduction of nonhomogeneous equations to homogeneous ones) is organised around it.

This mission formalizes that theorem, in the book's model of functions on all of Z\mathbb{Z}Z, together with the numbered lemmas of Section 9.5 on which its outline rests.

Setting

Let VVV be the real vector space of all functions f:Z→Rf : \mathbb{Z} \to \mathbb{R}f:Z→R, with pointwise addition and scalar multiplication. The advancement operator A:V→VA : V \to VA:V→V is

Af(n)=f(n+1)(n∈Z),A f(n) = f(n+1) \qquad (n \in \mathbb{Z}),Af(n)=f(n+1)(n∈Z),

a linear operator with Apf(n)=f(n+p)A^p f(n) = f(n+p)Apf(n)=f(n+p) for p≥0p \ge 0p≥0. For a nonnegative integer kkk and real constants c0,c1,…,ckc_0, c_1, \dots, c_kc0​,c1​,…,ck​, the advancement operator polynomial is

p(A)=c0Ak+c1Ak−1+c2Ak−2+⋯+ck,p(A) = c_0 A^k + c_1 A^{k-1} + c_2 A^{k-2} + \cdots + c_k,p(A)=c0​Ak+c1​Ak−1+c2​Ak−2+⋯+ck​,

so that p(A)f(n)=c0f(n+k)+c1f(n+k−1)+⋯+ckf(n)p(A) f(n) = c_0 f(n+k) + c_1 f(n+k-1) + \cdots + c_k f(n)p(A)f(n)=c0​f(n+k)+c1​f(n+k−1)+⋯+ck​f(n). The solution space of the homogeneous equation p(A)f=0p(A) f = 0p(A)f=0 is

W={f∈V:p(A)f=0},W = \{ f \in V : p(A) f = 0 \},W={f∈V:p(A)f=0},

the kernel of p(A)p(A)p(A), a linear subspace of VVV. In Lean, AAA is AppliedComb.Recurrence.advance : Module.End ℝ (ℤ → ℝ), p(A)p(A)p(A) is opPoly k c for a coefficient vector c : Fin (k + 1) → ℝ with c i multiplying Ak−iA^{k-i}Ak−i, and WWW is solutionSpace k c := LinearMap.ker (opPoly k c). A factor A−rA - rA−r is advance - r • 1.

Formalization targets

Goal: Theorem 9.18 (the Principal Theorem)

For a positive integer kkk and real constants c0,…,ckc_0, \dots, c_kc0​,…,ck​ with c0≠0c_0 \neq 0c0​=0 and ck≠0c_k \neq 0ck​=0,

dim⁡R{f:Z→R  :  (c0Ak+c1Ak−1+⋯+ck)f=0}=k.\dim_{\mathbb{R}} \{ f : \mathbb{Z} \to \mathbb{R} \;:\; (c_0 A^k + c_1 A^{k-1} + \cdots + c_k) f = 0 \} = k.dimR​{f:Z→R:(c0​Ak+c1​Ak−1+⋯+ck​)f=0}=k.

Milestones

  1. Lemma 9.19. If r≠0r \neq 0r=0 and (A−r)f=0(A - r) f = 0(A−r)f=0, then f(n)=f(0) rnf(n) = f(0)\, r^nf(n)=f(0)rn for every n∈Zn \in \mathbb{Z}n∈Z.
  2. Lemma 9.20. If c0,ck≠0c_0, c_k \neq 0c0​,ck​=0, g∈Vg \in Vg∈V is arbitrary and p(A)f0=gp(A) f_0 = gp(A)f0​=g, then every solution of p(A)f=gp(A) f = gp(A)f=g is f=f0+f1f = f_0 + f_1f=f0​+f1​ with f1∈Wf_1 \in Wf1​∈W.
  3. Theorem 9.21. If r1,…,rkr_1, \dots, r_kr1​,…,rk​ are distinct nonzero reals, every solution of (A−r1)(A−r2)⋯(A−rk)f=0(A - r_1)(A - r_2)\cdots(A - r_k) f = 0(A−r1​)(A−r2​)⋯(A−rk​)f=0 has the form
f(n)=c1r1n+c2r2n+⋯+ckrkn(n∈Z).f(n) = c_1 r_1^n + c_2 r_2^n + \cdots + c_k r_k^n \qquad (n \in \mathbb{Z}).f(n)=c1​r1n​+c2​r2n​+⋯+ck​rkn​(n∈Z).
  1. Lemma 9.22. If k≥1k \ge 1k≥1 and r≠0r \neq 0r=0, then (A−r)kf=0(A - r)^k f = 0(A−r)kf=0 holds exactly when
f(n)=c1rn+c2nrn+c3n2rn+⋯+cknk−1rn(n∈Z)f(n) = c_1 r^n + c_2 n r^n + c_3 n^2 r^n + \cdots + c_k n^{k-1} r^n \qquad (n \in \mathbb{Z})f(n)=c1​rn+c2​nrn+c3​n2rn+⋯+ck​nk−1rn(n∈Z)

for some real constants c1,…,ckc_1, \dots, c_kc1​,…,ck​.

Significance

The result itself. Theorem 9.18 is what justifies the standard recipe for solving a recurrence: once kkk linearly independent solutions are found, every solution is a linear combination of them, and kkk initial values pin down a unique solution. Theorems 9.21 and 9.22 name those kkk solutions when the characteristic polynomial splits over R\mathbb{R}R, and Lemma 9.20 reduces nonhomogeneous recurrences, the ones arising from counting problems with a forcing term, to one particular solution plus the homogeneous space.

Formalizing it. The book states Theorem 9.18 without a full proof ("we won't prove the full result") and leaves Lemma 9.22 as an exercise, so a formalization supplies arguments the source omits. Mathlib's LinearRecurrence develops the N\mathbb{N}N-indexed, monic version (LinearRecurrence.solSpace_rank); the bi-infinite, two-sided setting of the book, in which the constant term ckc_kck​ must be nonzero, is not in Mathlib or on the platform as of this mission.

Difficulty

The subspace part of Theorem 9.18 is immediate; the content is the dimension count, in both directions. On Z\mathbb{Z}Z a solution must extend to negative indices as well as positive ones, so an argument that works for sequences indexed by N\mathbb{N}N does not transfer: there the constant term plays no role and the dimension is kkk whatever the constant term, while on Z\mathbb{Z}Z a vanishing ckc_kck​ changes the answer. The outline in the book proceeds through factorisations of p(A)p(A)p(A), which over R\mathbb{R}R need not exist (complex roots), so the goal cannot be obtained by combining Theorems 9.21 and 9.22 alone. Lemma 9.22 requires showing that the functions njrnn^j r^nnjrn solve (A−r)kf=0(A - r)^k f = 0(A−r)kf=0 and that they exhaust its solutions, for nnn ranging over all integers.

Formalization scope

  • Functions are Z→R\mathbb{Z} \to \mathbb{R}Z→R (the real space VVV of Section 9.5, p. 199), not N→R\mathbb{N} \to \mathbb{R}N→R and not Z→C\mathbb{Z} \to \mathbb{C}Z→C. Powers rnr^nrn with nnn negative are integer powers (zpow), always of a nonzero base.
  • Dimension in the goal is Module.rank ℝ (solutionSpace k c) = k, a cardinal equality, so it also asserts finite-dimensionality.
  • The coefficient vector is c : Fin (k + 1) → ℝ; c 0 is the leading coefficient c0c_0c0​ and c (Fin.last k) the constant term ckc_kck​.
  • Theorem 9.21 asserts one inclusion, as on the page ("every solution has the form"); Lemma 9.22 asserts both ("the general solution"), as an iff.
  • Lemma 9.22 carries the hypothesis r≠0r \neq 0r=0, the standing assumption of Section 9.5.2 (p. 200), which the lemma's own sentence does not repeat.
  • No O(·), "≈" or unspecified threshold occurs in these statements, so no explicit constant is instantiated.
  • Ruling out the trivial reading: WWW is defined as the kernel of the operator polynomial p(A)p(A)p(A), never as the span of kkk chosen functions, so the goal is not a statement about the rank of a spanning family.

Needed infrastructure: linear operators on the function space ℤ → ℝ, powers and products in Module.End, Module.rank/Module.finrank, and finite sums; Mathlib's LinearRecurrence may be adapted for the forward half. The definitions advance, opPoly and solutionSpace are reusable for any later mission on recurrences or on generating functions for bi-infinite sequences. Contributions of the milestone lemmas, of a proof of the goal that avoids factorisation over C\mathbb{C}C, and of a complex-valued variant are welcome.

Selected references

  • Mitchel T. Keller and William T. Trotter, Applied Combinatorics, 2017 Edition, Chapter 9 (Recurrence Equations), CC BY-SA 4.0. appliedcombinatorics.org
  • Mathlib, Mathlib/Algebra/LinearRecurrence.lean (ℕ-indexed linear recurrences, LinearRecurrence.solSpace_rank). Mathlib docs
  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics, 2nd ed., Addison-Wesley, 1994, Section 7.3 (solving recurrences). ISBN 978-0-201-55802-9.
6 thms3 active usersReviewed
🏆Completed
Numerical AnalysisProbabilityRandom Matrix Theory·Captain: mikedeng1

Randomized Algorithms for Estimating the Trace of an Implicit Symmetric Positive Semi-Definite Matrix IV: Sample Bound for Hutchinson's Trace EstimatorResearch Paper

Motivation

Many computations need the trace of a matrix AAA that is never formed explicitly and can only be applied to vectors: the trace of a matrix function such as trace(A−1)\mathrm{trace}(A^{-1})trace(A−1) or log⁡det⁡A=trace(log⁡A)\log\det A = \mathrm{trace}(\log A)logdetA=trace(logA) in statistics and lattice QCD, the Frobenius norm ∥B∥F2=trace(BTB)\|B\|_F^2 = \mathrm{trace}(B^TB)∥B∥F2​=trace(BTB) of an operator, or the number of triangles of a graph. The standard tool is Monte-Carlo estimation, introduced by M. F. Hutchinson (Hutchinson 1989): average MMM quadratic forms ziTAziz_i^TAz_iziT​Azi​ over random sign vectors ziz_izi​. Each sample costs one matrix–vector product, uses one random bit per entry, and needs only additions and subtractions.

Before Avron and Toledo (2011), only the variance of such estimators had been analysed. A small variance does not say how many samples guarantee a given relative error with a given probability. Avron and Toledo gave the first bounds of this kind for several estimators. This mission covers the bound for Hutchinson's estimator, their Theorem 7.1.

Setting

A Rademacher random variable takes the values +1+1+1 and −1-1−1, each with probability 1/21/21/2. Let A∈Rn×nA \in \mathbb{R}^{n\times n}A∈Rn×n be symmetric positive semi-definite. Draw M≥1M \ge 1M≥1 independent random vectors z1,…,zM∈Rnz_1, \ldots, z_M \in \mathbb{R}^nz1​,…,zM​∈Rn whose MnMnMn entries are independent Rademacher variables. Hutchinson's trace estimator is

HM=1M∑i=1MziTAzi.H_M = \frac{1}{M}\sum_{i=1}^{M} z_i^TAz_i .HM​=M1​i=1∑M​ziT​Azi​.

A single sample zTAzz^TAzzTAz is an unbiased estimator of trace(A)\mathrm{trace}(A)trace(A) (Lemma 2.1 of the paper, due to Hutchinson). For symmetric AAA its variance is 2(∥A∥F2−∑iAii2)2\bigl(\|A\|_F^2 - \sum_i A_{ii}^2\bigr)2(∥A∥F2​−∑i​Aii2​), twice the squared Frobenius mass of AAA off the diagonal.

Given ϵ>0\epsilon > 0ϵ>0 and δ∈(0,1)\delta \in (0,1)δ∈(0,1), a random estimator TTT is an (ϵ,δ)(\epsilon,\delta)(ϵ,δ)-approximator of trace(A)\mathrm{trace}(A)trace(A) if

Pr⁡(∣T−trace(A)∣≤ϵ trace(A))≥1−δ.\Pr\bigl(|T - \mathrm{trace}(A)| \le \epsilon\,\mathrm{trace}(A)\bigr) \ge 1 - \delta .Pr(∣T−trace(A)∣≤ϵtrace(A))≥1−δ.

The rank rank(A)\mathrm{rank}(A)rank(A) is the number of nonzero eigenvalues λj\lambda_jλj​ of AAA, counted with multiplicity.

Formalization targets

Goal: Theorem 7.1, sample bound for HMH_MHM​

For every symmetric positive semi-definite AAA, every 0<ϵ≤1/20 < \epsilon \le 1/20<ϵ≤1/2 and every 0<δ<10 < \delta < 10<δ<1,

M≥6ϵ−2ln⁡ ⁣(2 rank(A)δ)⟹HM is an (ϵ,δ)-approximator of trace(A).M \ge 6\epsilon^{-2}\ln\!\left(\frac{2\,\mathrm{rank}(A)}{\delta}\right) \quad\Longrightarrow\quad H_M \text{ is an } (\epsilon,\delta)\text{-approximator of } \mathrm{trace}(A).M≥6ϵ−2ln(δ2rank(A)​)⟹HM​ is an (ϵ,δ)-approximator of trace(A).

The bound depends on AAA only through its rank. It does not depend on the dimension nnn, on the condition number, or on how the trace is spread over the diagonal.

Milestones

  1. Lemma 7.2 (Achlioptas 2001, Lemma 5). For a unit vector α∈Rn\alpha \in \mathbb{R}^nα∈Rn and S=1M∑i=1M(αTzi)2S = \frac1M\sum_{i=1}^M(\alpha^Tz_i)^2S=M1​∑i=1M​(αTzi​)2, for every ϵ>0\epsilon > 0ϵ>0,
Pr⁡(∣S−1∣≥ϵ)≤2exp⁡ ⁣(−M2(ϵ22−ϵ33)).\Pr(|S - 1| \ge \epsilon) \le 2\exp\!\left(-\frac{M}{2}\left(\frac{\epsilon^2}{2} - \frac{\epsilon^3}{3}\right)\right).Pr(∣S−1∣≥ϵ)≤2exp(−2M​(2ϵ2​−3ϵ3​)).
  1. Per-direction bound (proof of Theorem 7.1, p. 8:11). Let r≥1r \ge 1r≥1 and 0<ϵ≤1/20 < \epsilon \le 1/20<ϵ≤1/2. If M≥6ϵ−2ln⁡(2r/δ)M \ge 6\epsilon^{-2}\ln(2r/\delta)M≥6ϵ−2ln(2r/δ), then Pr⁡(∣S−1∣≥ϵ)≤δ/r\Pr(|S - 1| \ge \epsilon) \le \delta/rPr(∣S−1∣≥ϵ)≤δ/r.
  2. From directions to the trace (proof of Theorem 7.1, p. 8:11). Write A=UΛUTA = U\Lambda U^TA=UΛUT and yi=UTziy_i = U^Tz_iyi​=UTzi​. If ∣1M∑iyij2−1∣≤ϵ|\frac1M\sum_i y_{ij}^2 - 1| \le \epsilon∣M1​∑i​yij2​−1∣≤ϵ for every jjj with λj≠0\lambda_j \ne 0λj​=0, then ∣HM−trace(A)∣≤ϵ trace(A)|H_M - \mathrm{trace}(A)| \le \epsilon\,\mathrm{trace}(A)∣HM​−trace(A)∣≤ϵtrace(A). This step is deterministic.
  3. Lemma 2.1 (Hutchinson). E(zTAz)=trace(A)\mathrm{E}(z^TAz) = \mathrm{trace}(A)E(zTAz)=trace(A), and for symmetric AAA, Var(zTAz)=2(∥A∥F2−∑iAii2)\mathrm{Var}(z^TAz) = 2(\|A\|_F^2 - \sum_i A_{ii}^2)Var(zTAz)=2(∥A∥F2​−∑i​Aii2​).

Significance

Theorem 7.1 gives a practitioner an explicit number of matrix–vector products after which Hutchinson's method is guaranteed to reach relative accuracy ϵ\epsilonϵ with confidence 1−δ1-\delta1−δ. No bound was available before, although the method had been in wide use for two decades. The bound exceeds the one the same paper proves for Gaussian test vectors (20ϵ−2ln⁡(2/δ)20\epsilon^{-2}\ln(2/\delta)20ϵ−2ln(2/δ)) by a ln⁡(rank(A))\ln(\mathrm{rank}(A))ln(rank(A)) factor. The authors conjecture that this factor is not needed. Later work removed it: Roosta-Khorasani and Ascher (2015) proved a rank-free bound for the Rademacher case, and Cortinovis and Kressner (2022) extended sample bounds to indefinite matrices. Sample bounds of this type underlie variance-reduced estimators such as Hutch++ (Meyer et al. 2021).

The theorem is proved in the literature. To the platform's knowledge it has no machine-checked proof. Formalizing it produces a checked Rademacher concentration inequality for averages of squared linear forms (Achlioptas' lemma, which is also a core lemma of database-friendly Johnson–Lindenstrauss projections), and a checked spectral reduction from a quadratic-form estimator to its eigen-directions. Neither is currently in Mathlib.

Difficulty

The estimator is not an average of independent copies of a bounded variable with a small range: a single sample zTAzz^TAzzTAz can deviate from trace(A)\mathrm{trace}(A)trace(A) by an amount comparable to ∥A∥Fn\|A\|_F\sqrt n∥A∥F​n​. Chebyshev's inequality with the variance of Lemma 2.1 only gives a polynomial dependence on 1/δ1/\delta1/δ. Hoeffding's inequality applied to zTAzz^TAzzTAz directly gives a dependence on nnn and on the size of the entries of AAA. Unlike the Gaussian case, the estimator cannot be written as a weighted sum of independent chi-squared variables, because rotating a Rademacher vector does not give another Rademacher vector. The central difficulty is Lemma 7.2: a tail bound for (αTz)2(\alpha^Tz)^2(αTz)2 that holds uniformly over every unit direction α\alphaα, including directions in which αTz\alpha^TzαTz is far from Gaussian (for α=e1\alpha = e_1α=e1​ it is a constant).

Formalization scope

Matrices are Matrix (Fin n) (Fin n) ℝ, and positive semi-definiteness is Matrix.PosSemidef. The Rademacher law is 12(δ1+δ−1)\tfrac12(\delta_1 + \delta_{-1})21​(δ1​+δ−1​) on ℝ. The sample space is Fin M → Fin n → ℝ with the product of MnMnMn copies of this law (hutchinsonSampleMeasure), so the law of the estimator is constructed, not assumed. HM(ω)=(M:R)−1∑iωi⋅(Aωi)H_M(\omega) = (M:\mathbb{R})^{-1}\sum_i \omega_i\cdot(A\omega_i)HM​(ω)=(M:R)−1∑i​ωi​⋅(Aωi​). Probabilities are Measure.real, and the (ϵ,δ)(\epsilon,\delta)(ϵ,δ)-approximator is Definition 4.1 verbatim. rank(A)\mathrm{rank}(A)rank(A) is Matrix.rank. In Lemma 7.2 the i.i.d. copies QiQ_iQi​ are the functions (α⋅zi)2(\alpha\cdot z_i)^2(α⋅zi​)2 on this product space.

Corrections of printed statements, each recorded in the item's Formalization Note:

  • Theorem 7.1 is printed without a range on ϵ\epsilonϵ. Its proof needs M2(ϵ22−ϵ33)≥Mϵ26\frac{M}{2}(\frac{\epsilon^2}{2} - \frac{\epsilon^3}{3}) \ge \frac{M\epsilon^2}{6}2M​(2ϵ2​−3ϵ3​)≥6Mϵ2​, which holds exactly when ϵ≤1/2\epsilon \le 1/2ϵ≤1/2. Without a range the printed statement is false: take A=1n11TA = \frac1n\mathbf 1\mathbf 1^TA=n1​11T, n=104n = 10^4n=104, ϵ=10\epsilon = 10ϵ=10 and δ=10−4\delta = 10^{-4}δ=10−4. The condition admits M=1M = 1M=1, while Pr⁡(H1>11)≈9⋅10−4>δ\Pr(H_1 > 11) \approx 9\cdot10^{-4} > \deltaPr(H1​>11)≈9⋅10−4>δ. The goal and milestone 2 are therefore stated for 0<ϵ≤1/20 < \epsilon \le 1/20<ϵ≤1/2.
  • Lemma 2.1 is printed for an arbitrary n×nn\times nn×n matrix. The variance formula fails for non-symmetric AAA: for A=(0100)A = \begin{pmatrix}0&1\\0&0\end{pmatrix}A=(00​10​) the variance is 111, not 222. Symmetry is assumed for the variance part only.
  • Proof of Theorem 7.1. The proof writes Λ=UAUT\Lambda = UAU^TΛ=UAUT together with yi=UTziy_i = U^Tz_iyi​=UTzi​. These fit together only for A=UΛUTA = U\Lambda U^TA=UΛUT, which is the convention of milestone 3.

For A=0A = 0A=0 the threshold involves ln⁡0\ln 0ln0. Lean's Real.log 0 = 0 turns the condition into M≥0M \ge 0M≥0, which agrees with the paper's reading ln⁡0=−∞\ln 0 = -\inftyln0=−∞. The conclusion then holds because HM=trace(A)=0H_M = \mathrm{trace}(A) = 0HM​=trace(A)=0, so no extra hypothesis is added. A formalization that took the law of the samples as a hypothesis could make that hypothesis unsatisfiable and the theorem vacuous; the constructed product space rules this out.

A complete development needs:

  • the product Rademacher measure and moment generating functions of Rademacher sums;
  • a Chernoff bound for averages of i.i.d. bounded variables on a product space;
  • the spectral theorem for real symmetric matrices, with rank equal to the number of nonzero eigenvalues;
  • a finite union bound.

The Rademacher concentration results are reusable beyond this mission. Proofs of any milestone are welcome, as are alternative proofs of Lemma 7.2.

Selected references

  • H. Avron and S. Toledo, Randomized algorithms for estimating the trace of an implicit symmetric positive semi-definite matrix, Journal of the ACM 58(2), Article 8, 2011. https://doi.org/10.1145/1944345.1944349
  • M. F. Hutchinson, A stochastic estimator of the trace of the influence matrix for Laplacian smoothing splines, Communications in Statistics – Simulation and Computation 18(3), 1059–1076, 1989. https://doi.org/10.1080/03610918908812806
  • D. Achlioptas, Database-friendly random projections, Proceedings of PODS 2001, 274–281. https://doi.org/10.1145/375551.375608
  • F. Roosta-Khorasani and U. Ascher, Improved bounds on sample size for implicit matrix trace estimators, Foundations of Computational Mathematics 15, 1187–1212, 2015. https://doi.org/10.1007/s10208-014-9220-1
  • A. Cortinovis and D. Kressner, On randomized trace estimates for indefinite matrices with an application to determinants, Foundations of Computational Mathematics 22, 875–903, 2022. https://doi.org/10.1007/s10208-021-09525-9
  • R. A. Meyer, C. Musco, C. Musco and D. P. Woodruff, Hutch++: Optimal stochastic trace estimation, SOSA 2021, 142–155. https://doi.org/10.1137/1.9781611976496.16
7 thms3 active usersReviewed
🏆Completed
Numerical AnalysisProbabilityRandom Matrix Theory·Captain: mikedeng1

Randomized Algorithms for Estimating the Trace of an Implicit Symmetric Positive Semi-Definite Matrix II: Exact Rank of a Projection Matrix from the Gaussian Trace EstimatorResearch Paper

Motivation

Many matrices in scientific computing are available only implicitly: one can multiply a vector by AAA, for instance by solving a linear system or applying a matrix function, but the entries of AAA are never formed. Quantities such as the trace must then be estimated from a small number of matrix–vector products. Randomized trace estimators do exactly this: draw random vectors zzz, compute the quadratic forms zTAzz^TAzzTAz, and average.

Avron and Toledo (J. ACM 58(2), 2011) gave the first sample bounds of the form "MMM samples suffice for relative error ϵ\epsilonϵ with probability 1−δ1-\delta1−δ" for the standard estimators. Among their results is a case in which the estimate is not merely approximate but exact: when AAA is a projection matrix, its trace equals its rank, an integer, and rounding a Gaussian trace estimate recovers that integer with high probability. Computing the rank of a projection arises, for example, when charge densities are computed in electronic structure calculations without diagonalization (Bekas, Kokiopoulou and Saad 2007).

Setting

Let n≥1n \ge 1n≥1 and A∈Rn×nA \in \mathbb{R}^{n\times n}A∈Rn×n. A projection matrix here is an orthogonal projection: AAA is symmetric and A2=AA^2 = AA2=A. Equivalently, AAA is symmetric and every eigenvalue of AAA is 000 or 111; its rank rank(A)\mathrm{rank}(A)rank(A) is the number of eigenvalues equal to 111.

Fix a number of samples M≥1M \ge 1M≥1. Let z1,…,zM∈Rnz_1,\ldots,z_M \in \mathbb{R}^nz1​,…,zM​∈Rn be random vectors whose MnMnMn entries are independent standard normal random variables. The Gaussian trace estimator (Definition 3.1 of the paper) is

GM=1M∑i=1MziTAzi.G_M = \frac{1}{M}\sum_{i=1}^{M} z_i^T A z_i .GM​=M1​i=1∑M​ziT​Azi​.

Its expectation is trace(A)\mathrm{trace}(A)trace(A). For x∈Rx \in \mathbb{R}x∈R, round(x)\mathrm{round}(x)round(x) denotes the nearest integer to xxx. For k≥1k \ge 1k≥1, a random variable XXX has the χ2\chi^2χ2 distribution with kkk degrees of freedom, X∼χ2(k)X \sim \chi^2(k)X∼χ2(k), if it has the law of g12+⋯+gk2g_1^2 + \cdots + g_k^2g12​+⋯+gk2​ for independent standard normal g1,…,gkg_1, \ldots, g_kg1​,…,gk​.

Formalization targets

Goal: Lemma 5.3 (p. 8:9)

For a projection matrix AAA, a failure probability δ>0\delta > 0δ>0, and every integer M≥1M \ge 1M≥1 with M≥24 rank(A)ln⁡(2/δ)M \ge 24\,\mathrm{rank}(A)\ln(2/\delta)M≥24rank(A)ln(2/δ),

Pr⁡(round(GM)≠rank(A))≤δ.\Pr\bigl(\mathrm{round}(G_M) \ne \mathrm{rank}(A)\bigr) \le \delta .Pr(round(GM​)=rank(A))≤δ.

The number of samples depends on the rank and on δ\deltaδ only; there is no accuracy parameter, and none on nnn.

Milestones, in the order the proof uses them

  1. Law of MGMMG_MMGM​. MGM∼χ2(M rank(A))MG_M \sim \chi^2(M\,\mathrm{rank}(A))MGM​∼χ2(Mrank(A)).
  2. χ2\chi^2χ2 tail bound (cited by the paper from Li, Hastie and Church 2007). For X∼χ2(k)X \sim \chi^2(k)X∼χ2(k), k≥1k\ge1k≥1 and 0<ϵ≤120 < \epsilon \le \tfrac120<ϵ≤21​,
Pr⁡(∣X−k∣≥ϵk)≤2exp⁡(−kϵ2/6).\Pr(|X - k| \ge \epsilon k) \le 2\exp(-k\epsilon^2/6).Pr(∣X−k∣≥ϵk)≤2exp(−kϵ2/6).
  1. Tail of GMG_MGM​. For rank(A)≥1\mathrm{rank}(A) \ge 1rank(A)≥1 and 0<ϵ≤120 < \epsilon \le \tfrac120<ϵ≤21​,
Pr⁡(∣GM−rank(A)∣≥rank(A)ϵ)≤2exp⁡(−M rank(A)ϵ2/6).\Pr(|G_M - \mathrm{rank}(A)| \ge \mathrm{rank}(A)\epsilon) \le 2\exp(-M\,\mathrm{rank}(A)\epsilon^2/6).Pr(∣GM​−rank(A)∣≥rank(A)ϵ)≤2exp(−Mrank(A)ϵ2/6).
  1. Eq. (2). If moreover M≥6 rank(A)−1ϵ−2ln⁡(2/δ)M \ge 6\,\mathrm{rank}(A)^{-1}\epsilon^{-2}\ln(2/\delta)M≥6rank(A)−1ϵ−2ln(2/δ), then Pr⁡(∣GM−rank(A)∣≥rank(A)ϵ)≤δ\Pr(|G_M - \mathrm{rank}(A)| \ge \mathrm{rank}(A)\epsilon) \le \deltaPr(∣GM​−rank(A)∣≥rank(A)ϵ)≤δ.
  2. Trace of a projection. trace(A)=rank(A)\mathrm{trace}(A) = \mathrm{rank}(A)trace(A)=rank(A).

Significance

The lemma turns a randomized estimator into an exact algorithm with a controlled failure probability: the rank of an implicitly given projection is obtained from O(rank(A)log⁡(1/δ))O(\mathrm{rank}(A)\log(1/\delta))O(rank(A)log(1/δ)) matrix–vector products, independently of the dimension nnn. It is also an instance where the paper's general relative-error bound for the Gaussian estimator (Theorem 5.2, whose sample count grows like ϵ−2\epsilon^{-2}ϵ−2) is improved by exploiting the spectrum of AAA: an absolute error below 12\tfrac1221​ is a relative error ϵ=1/(2 rank(A))\epsilon = 1/(2\,\mathrm{rank}(A))ϵ=1/(2rank(A)), for which the general bound would require a number of samples quadratic in the rank, whereas Lemma 5.3 needs only a linear number.

The result is proved in the paper. The mission produces a machine-checked version of it, together with two pieces of reusable substrate: the exact χ2\chi^2χ2 law of a Gaussian quadratic form in an orthogonal projection, and a two-sided χ2\chi^2χ2 tail bound with explicit constant 1/61/61/6 on the range 0<ϵ≤1/20<\epsilon\le 1/20<ϵ≤1/2. To the best of available knowledge, none of these statements is formalized in Mathlib; a platform mission on the Johnson–Lindenstrauss lemma states a χ2\chi^2χ2 concentration bound with a different exponent, (ϵ2−ϵ3)/4(\epsilon^2-\epsilon^3)/4(ϵ2−ϵ3)/4, on the open range 0<ϵ<1/20<\epsilon<1/20<ϵ<1/2, which does not cover the value ϵ=1/2\epsilon = 1/2ϵ=1/2 needed here when rank(A)=1\mathrm{rank}(A)=1rank(A)=1.

Difficulty

The deterministic part is short; the probabilistic part is not. The step "y=Uzy = Uzy=Uz has independent standard normal entries because UUU is orthogonal" is the rotation invariance of the standard Gaussian measure on Rn\mathbb{R}^nRn, and it must be combined with the independence of the MMM samples to identify the law of a sum of M rank(A)M\,\mathrm{rank}(A)Mrank(A) squares; this is a statement about product measures and pushforwards, not about moments. The χ2\chi^2χ2 tail bound is quoted by the paper without proof. Its constant 1/61/61/6 is not the constant of the usual textbook χ2\chi^2χ2 estimates, and the bound is false outside a restricted range of ϵ\epsilonϵ (see below), so a generic sub-exponential concentration inequality with unspecified constants does not deliver it. Finally, the rounding step requires matching Mathlib's round with the event ∣GM−rank(A)∣<12|G_M - \mathrm{rank}(A)| < \tfrac12∣GM​−rank(A)∣<21​.

Formalization scope

All declarations live in the namespace TraceEstimation.ProjectionRank. Matrices are Matrix (Fin n) (Fin n) ℝ. The sample space of GMG_MGM​ is Fin M → Fin n → ℝ with the product measure Measure.pi (fun _ => Measure.pi (fun _ => gaussianReal 0 1)), so the law of the estimator is constructed, not assumed. Probabilities are Measure.real of events. "Projection matrix" is A.IsHermitian ∧ A * A = A (orthogonal projection); a non-symmetric idempotent also has eigenvalues 000 and 111, but the paper's proof diagonalizes AAA by a unitary matrix, which requires symmetry. round is Mathlib's round : ℝ → ℤ; the rank is Matrix.rank. The χ2\chi^2χ2 distribution is not defined: its role is played by the pushforward of a product of standard normals under g↦∑lgl2g \mapsto \sum_l g_l^2g↦∑l​gl2​.

Corrections of the printed text, both in the χ2\chi^2χ2 tail bound (milestone 2):

  • The paper prints Pr⁡(∣X−k∣≤ϵk)≤2exp⁡(−kϵ2/6)\Pr(|X - k| \le \epsilon k) \le 2\exp(-k\epsilon^2/6)Pr(∣X−k∣≤ϵk)≤2exp(−kϵ2/6). The inner ≤\le≤ is a misprint for ≥\ge≥; the next display applies the bound with ≥\ge≥.
  • The paper gives no range for ϵ\epsilonϵ. The bound fails for ϵ=1\epsilon = 1ϵ=1 and large kkk, since Pr⁡(X≥2k)\Pr(X \ge 2k)Pr(X≥2k) decays like e−k(1−ln⁡2)/2e^{-k(1-\ln 2)/2}e−k(1−ln2)/2, slower than e−k/6e^{-k/6}e−k/6. The mission states it for 0<ϵ≤1/20<\epsilon\le 1/20<ϵ≤1/2, and milestones 3 and 4 inherit that range; the proof uses only ϵ=1/(2 rank(A))≤1/2\epsilon = 1/(2\,\mathrm{rank}(A)) \le 1/2ϵ=1/(2rank(A))≤1/2.

The goal keeps the paper's hypotheses: δ>0\delta > 0δ>0 with no upper bound, and rank(A)=0\mathrm{rank}(A) = 0rank(A)=0 allowed (both are true cases). A statement about the event ∣GM−rank(A)∣<12|G_M - \mathrm{rank}(A)| < \tfrac12∣GM​−rank(A)∣<21​, or Eq. (2) alone, is not the goal; the goal is about round(GM)\mathrm{round}(G_M)round(GM​). The sample measure is a probability measure, so the bound ≤δ\le \delta≤δ is not vacuous.

Contributions welcome beyond the milestones: rotation invariance of the standard Gaussian vector under orthogonal matrices, the moment generating function of χ2(k)\chi^2(k)χ2(k), and the spectral fact trace(A)=rank(A)\mathrm{trace}(A) = \mathrm{rank}(A)trace(A)=rank(A) for idempotents, each reusable well outside this mission.

Selected references

  • H. Avron and S. Toledo, Randomized algorithms for estimating the trace of an implicit symmetric positive semi-definite matrix, Journal of the ACM 58(2), Article 8, 2011. https://doi.org/10.1145/1944345.1944349
  • P. Li, T. Hastie and K. Church, Nonlinear estimators and tail bounds for dimension reduction in l1l_1l1​ using Cauchy random projections, in Learning Theory (COLT 2007), Lecture Notes in Computer Science 4539, Springer, 514–529, 2007 (the version the paper cites); journal version in Journal of Machine Learning Research 8, 2497–2532, 2007, https://jmlr.org/papers/v8/li07b.html
  • C. Bekas, E. Kokiopoulou and Y. Saad, An estimator for the diagonal of a matrix, Applied Numerical Mathematics 57(11–12), 1214–1229, 2007. https://doi.org/10.1016/j.apnum.2007.01.003
  • M. F. Hutchinson, A stochastic estimator of the trace of the influence matrix for Laplacian smoothing splines, Communications in Statistics – Simulation and Computation 19(2), 433–450, 1990. https://doi.org/10.1080/03610919008812866
7 thms3 active usersReviewed
🏆Completed
Control TheoryDynamical SystemsGraph Theory·Captain: mikedeng1

On Controllability of Delayed Boolean Control Networks: Trajectory Controllability Avoiding Forbidden Trajectories Iff the Reduced Transition-Count Matrix Is IrreducibleResearch Paper

Motivation

Boolean networks model gene regulatory networks by giving each gene an on/off value and updating all values synchronously by logical rules (Kauffman, 1969). Adding external Boolean inputs gives Boolean control networks (BCNs), in which a designer (a drug, an intervention) chooses the inputs over time. The basic control-theoretic question is controllability: can the inputs drive the network from any configuration to any other? Cheng and Qi (Automatica 2009) answered it for BCNs using the semi-tensor product of matrices, which rewrites a BCN as a linear recursion on canonical basis vectors.

Biological regulation is not instantaneous: transcription and translation introduce delays, so the next value of a gene can depend on several past values. Lu, Zhong, Ho, Tang and Cao (SIAM J. Control Optim. 2016) study delayed BCNs, in which the update reads the last μ\muμ states, and give criteria for two kinds of controllability, including the case where some configurations are dangerous and must be avoided (in biology, states corresponding to disease). The mission formalizes their criteria.

Setting

Write D={0,1}\mathcal D=\{0,1\}D={0,1}. A state is x=(x1,…,xn)∈Dnx=(x_1,\dots,x_n)\in\mathcal D^nx=(x1​,…,xn​)∈Dn and an input value is u∈Dmu\in\mathcal D^mu∈Dm. Fix μ≥1\mu\ge1μ≥1. The delayed BCN (2.2) is

xi(t+1)=fi(u(t),x(t−μ+1),…,x(t)),i=1,…,n,x_i(t+1)=f_i\big(u(t),x(t-\mu+1),\dots,x(t)\big),\qquad i=1,\dots,n,xi​(t+1)=fi​(u(t),x(t−μ+1),…,x(t)),i=1,…,n,

with arbitrary Boolean functions fi:Dm+μn→Df_i:\mathcal D^{m+\mu n}\to\mathcal Dfi​:Dm+μn→D, collected into one map FFF with x(t+1)=F(u(t),X(t))x(t+1)=F(u(t),X(t))x(t+1)=F(u(t),X(t)). A trajectory is the window X(t)=(x(t−μ+1),…,x(t))X(t)=(x(t-\mu+1),\dots,x(t))X(t)=(x(t−μ+1),…,x(t)) of the last μ\muμ states; its last entry is the current state. One step maps X(t)X(t)X(t) under the input u(t)u(t)u(t) to X(t+1)=(x(t−μ+2),…,x(t+1))X(t+1)=(x(t-\mu+2),\dots,x(t+1))X(t+1)=(x(t−μ+2),…,x(t+1)). A control sequence of length kkk is U=(u(0),…,u(k−1))U=(u(0),\dots,u(k-1))U=(u(0),…,u(k−1)), with inputs chosen freely; y(i)=X(i)y(i)=X(i)y(i)=X(i) denotes the trajectory after iii steps from an initial trajectory y(0)y(0)y(0).

The transition-count matrix QQQ has rows and columns indexed by trajectories: Qb,aQ_{b,a}Qb,a​ is the number of input values uuu taking trajectory aaa to trajectory bbb in one step. For a set CtC_tCt​ of forbidden trajectories, QCtQ_{C_t}QCt​​ is QQQ with the rows and columns of CtC_tCt​ replaced by zeros, and QCt\mathbb Q_{C_t}QCt​​ is QQQ with those rows and columns deleted.

The notions of controllability are:

  • Trajectory controllable (Definition 3.1): from every initial trajectory, every trajectory XdX_dXd​ equals X(k)X(k)X(k) for some k≥1k\ge1k≥1 and some control sequence.
  • Trajectory controllable under CtC_tCt​ (Definition 3.11): for all trajectories a,b∉Cta,b\notin C_ta,b∈/Ct​ there are k≥0k\ge0k≥0 and a control sequence steering y(0)=ay(0)=ay(0)=a to y(k)=by(k)=by(k)=b with y(i)∉Cty(i)\notin C_ty(i)∈/Ct​ for i=0,…,ki=0,\dots,ki=0,…,k.
  • State controllable (Definition 4.1): from every initial trajectory, every state equals x(k)x(k)x(k) for some k>0k>0k>0 and some control sequence.

A real square matrix AAA of size N≥2N\ge2N≥2 is reducible (Definition 3.7) if a simultaneous permutation of rows and columns brings it to block upper-triangular form (A11A120A22)\begin{pmatrix}A_{11}&A_{12}\\0&A_{22}\end{pmatrix}(A11​0​A12​A22​​) with square diagonal blocks; it is irreducible otherwise, so every 1×11\times11×1 matrix is irreducible.

N1(k;ya,yb,Ct)\mathbb N_1(k;y_a,y_b,C_t)N1​(k;ya​,yb​,Ct​) counts the control sequences of length kkk steering yay_aya​ to yby_byb​ while avoiding CtC_tCt​; N2(k;a,bs)\mathbb N_2(k;a,b_s)N2​(k;a,bs​) counts those steering the initial trajectory aaa to x(k)=bsx(k)=b_sx(k)=bs​; Ξμp\Xi^{p}_\muΞμp​ is the set of trajectories with current state ppp.

Formalization targets

Goal: Theorem 3.12

the delayed BCN is trajectory controllable under Ct  ⟺  QCt is irreducible,\text{the delayed BCN is trajectory controllable under } C_t\iff \mathbb Q_{C_t}\ \text{is irreducible},the delayed BCN is trajectory controllable under Ct​⟺QCt​​ is irreducible,

for every μ≥1\mu\ge1μ≥1, nnn, mmm, every update map and every forbidden set CtC_tCt​. It is the most general criterion of the paper.

Milestones

  • Proposition 3.5: for k>0k>0k>0, N1(k;ya,yb,Ct)=ybT(QCt)kya\mathbb N_1(k;y_a,y_b,C_t)=y_b^{\mathsf T}(Q_{C_t})^ky_aN1​(k;ya​,yb​,Ct​)=ybT​(QCt​​)kya​.
  • Remark 3: N1(k;ya,yb)=ybTQkya\mathbb N_1(k;y_a,y_b)=y_b^{\mathsf T}Q^ky_aN1​(k;ya​,yb​)=ybT​Qkya​.
  • Theorem 3.10: trajectory controllable   ⟺  \iff⟺ QQQ irreducible.
  • Theorem 4.3: N2(k;a,bs)=∑b∈ΞμbsbTQka\mathbb N_2(k;a,b_s)=\sum_{b\in\Xi^{b_s}_\mu}b^{\mathsf T}Q^kaN2​(k;a,bs​)=∑b∈Ξμbs​​​bTQka.
  • Theorem 5.1: the same count while avoiding forbidden states CsC_sCs​, with QQQ zeroed on the trajectories containing a state of CsC_sCs​.
  • Corollary 5.3: trajectory controllability implies state controllability.

A supporting item, Lemma 3.9 (corrected form), relates Definition 3.7 to positivity of entries of powers for nonnegative matrices of size at least 2.

Significance

The criteria replace a question about control sequences of unbounded length by a finite test on one nonnegative integer matrix of size 2μn2^{\mu n}2μn. The counting identities give more than a yes/no answer: they enumerate the control sequences achieving a transfer, which is what a designer choosing among interventions needs, and they handle forbidden states by passing to forbidden trajectories.

The results are proved in the paper; none of them has a machine-checked proof. Formalizing them yields a reusable Lean model of delayed (and, for μ=1\mu=1μ=1, ordinary) Boolean control networks defined directly through their dynamics, together with a checked bridge from dynamic reachability to the combinatorics of nonnegative matrices. A formal version also pins down points the printed text leaves loose: Lemma 3.9 as printed is false (it characterizes primitive, not irreducible, matrices), and the two different matrices QCtQ_{C_t}QCt​​ (zeroed) and QCt\mathbb Q_{C_t}QCt​​ (deleted) must not be confused.

Difficulty

The central step is the passage between three objects: reachability under the dynamics, positivity of entries of powers of QQQ, and the block-triangular definition of irreducibility. The counting identity for powers of QQQ is a statement about sequences of inputs, not about paths in a graph, so the bijection between control sequences and weighted walks has to be established with the avoidance constraint carried at every intermediate time, including the endpoints. The equivalence between Definition 3.7 and strong connectivity is the classical graph-theoretic characterization, but it has edge cases the obvious argument misses: a 1×11\times11×1 zero matrix is irreducible by Definition 3.7 yet has no positive power, which is exactly why Definition 3.11 allows k=0k=0k=0 while Definition 3.1 does not. A proof that routes through "some power of QCt\mathbb Q_{C_t}QCt​​ is entrywise positive", following the printed Lemma 3.9, proves a false intermediate statement.

Formalization scope

Conventions committed to in Lean:

  • A state is Fin n → Bool (true is the paper's 1); a trajectory is Fin μ → State n with index 0 the oldest state and index μ−1\mu-1μ−1 the current state; μ≥1\mu\ge1μ≥1 is a standing assumption (NeZero μ); n,m≥0n,m\ge0n,m≥0 are arbitrary and no assumption is placed on the update functions.
  • Matrices are indexed by trajectories rather than by the paper's index jjj of δ2μnj\delta^j_{2^{\mu n}}δ2μnj​. The paper's Q=L⋉12mQ=L\ltimes\mathbf 1_{2^m}Q=L⋉12m​ is obtained by the simultaneous relabelling of Lemma 2.6, and every statement (entries of powers, sums over sets of trajectories, Definition 3.7) is invariant under it. QCt\mathbb Q_{C_t}QCt​​ is indexed by the subtype of allowed trajectories.
  • Irreducibility is Definition 3.7 applied to the matrix with entries cast to R\mathbb RR; it is not Mathlib's Matrix.IsIrreducible, which differs on 1×11\times11×1 matrices.
  • Pinned readings: Definition 3.1 and Definition 4.1 use k≥1k\ge1k≥1; Definition 3.11 uses k≥0k\ge0k≥0; Proposition 3.5, Theorem 4.3 and Theorem 5.1 are stated for k>0k>0k>0 (Proposition 3.5 is false at k=0k=0k=0 when ya=yb∈Cty_a=y_b\in C_tya​=yb​∈Ct​); Remark 3 holds for all k≥0k\ge0k≥0. "Avoiding CsC_sCs​" in Theorem 5.1 means that no state x(i)x(i)x(i), i=1−μ,…,ki=1-\mu,\dots,ki=1−μ,…,k, lies in CsC_sCs​, which is the theorem's own middle term N1(k;a,b,ΞCs)\mathbb N_1(k;a,b,\Xi^{C_s})N1​(k;a,b,ΞCs​). Ξμp\Xi^p_\muΞμp​ is defined semantically by eq. (4.3), since the printed index range in (4.4) is a misprint. Lemma 3.9 is included in corrected form with N≥2N\ge2N≥2.

Controllability is defined through the dynamics and control sequences, never as positivity of entries of powers of QQQ; a formalization that defines reachability by (Qk)b,a>0(Q^k)_{b,a}>0(Qk)b,a​>0 would reduce Theorems 3.10 and 3.12 to library facts and is ruled out.

Needed infrastructure: the correspondence between control sequences and products of entries of QQQ (the core of Proposition 3.5), and the equivalence of Definition 3.7 with strong connectivity of the support graph for nonnegative matrices (Mathlib's Matrix.IsIrreducible, Matrix.isIrreducible_iff_exists_pow_pos and Matrix.pow_apply_pos_iff_nonempty_path cover much of the second part for sizes at least 2). Both are reusable beyond this mission, for ordinary BCNs, probabilistic BCNs and finite automata. Contributions of either piece, or of the semi-tensor-product bridge identifying QQQ with L⋉12mL\ltimes\mathbf 1_{2^m}L⋉12m​, are welcome.

Selected references

  • J. Lu, J. Zhong, D. W. C. Ho, Y. Tang, J. Cao, On Controllability of Delayed Boolean Control Networks, SIAM J. Control Optim. 54(2):475–494, 2016. https://doi.org/10.1137/140991820
  • D. Cheng, H. Qi, Controllability and observability of Boolean control networks, Automatica 45(7):1659–1667, 2009. https://doi.org/10.1016/j.automatica.2009.03.006
  • S. A. Kauffman, Metabolic stability and epigenesis in randomly constructed genetic nets, J. Theoret. Biol. 22(3):437–467, 1969. https://doi.org/10.1016/0022-5193(69)90015-0
  • A. Berman, R. J. Plemmons, Nonnegative Matrices in the Mathematical Sciences, SIAM Classics in Applied Mathematics 9, 1994. https://doi.org/10.1137/1.9781611971262
9 thms3 active usersReviewed
🏆Completed
CombinatoricsGraph TheoryOperations Research+1·Captain: mikedeng1

Approximating Clique-Width and Branch-Width: Well-Linked Sets Certify Clique-WidthResearch Paper

Motivation

Clique-width is a graph parameter introduced by Courcelle and Olariu (Discrete Appl. Math. 101 (2000)) that measures how far a graph is from being built by a few labelled operations. Every problem expressible in monadic second-order logic with quantification over vertices and vertex sets (MSO1_11​) can be solved in linear time on graphs given together with a decomposition of bounded clique-width (Courcelle, Makowsky and Rotics, Theory Comput. Syst. 33 (2000)). Bounded clique-width is more general than bounded tree-width: complete graphs have unbounded tree-width but clique-width 222.

For fixed kkk there was, before this paper, no polynomial-time algorithm that either decides that a graph has clique-width at least k+1k+1k+1 or outputs a decomposition of clique-width bounded by a function of kkk; the best known algorithm, by Johansson (2001), gave width 2klog⁡n2k\log n2klogn. Oum and Seymour (J. Combin. Theory Ser. B 96 (2006)) closed this gap with approximation 23k+2−12^{3k+2}-123k+2−1, through rank-width and a factor-3 approximation for the branch-width of symmetric submodular functions.

Timeline:

  • 1991: Robertson and Seymour introduce branch-width of graphs and hypergraphs (J. Combin. Theory Ser. B 52).
  • 2000: Courcelle and Olariu define clique-width; Courcelle, Makowsky and Rotics solve MSO1_11​ problems on graphs given with a kkk-expression.
  • 2001: Johansson gives a 2klog⁡n2k\log n2klogn approximation.
  • 2006: Oum and Seymour define rank-width, prove rwd(G)≤cwd(G)≤2rwd(G)+1−1\mathrm{rwd}(G) \le \mathrm{cwd}(G) \le 2^{\mathrm{rwd}(G)+1}-1rwd(G)≤cwd(G)≤2rwd(G)+1−1, and give an O(n9log⁡n)O(n^9 \log n)O(n9logn) algorithm that outputs a (23k+2−1)(2^{3k+2}-1)(23k+2−1)-expression or certifies clique-width above kkk.

Setting

All graphs are finite and simple. For a finite set VVV, a function f:2V→Zf : 2^V \to \mathbb{Z}f:2V→Z is submodular if f(X)+f(Y)≥f(X∩Y)+f(X∪Y)f(X)+f(Y) \ge f(X\cap Y)+f(X\cup Y)f(X)+f(Y)≥f(X∩Y)+f(X∪Y) and symmetric if f(X)=f(V∖X)f(X) = f(V\setminus X)f(X)=f(V∖X).

A branch-decomposition of fff is a pair (T,L)(T, L)(T,L) where TTT is a tree with at least two vertices and all degrees at most 333, and LLL is a bijection from VVV onto the leaves of TTT. Removing an edge eee of TTT splits the leaves in two; the width of eee is fff of the set of elements of VVV on one side. The width of (T,L)(T, L)(T,L) is the largest edge width, and the branch-width bw(f)\mathrm{bw}(f)bw(f) is the least width of a branch-decomposition, with bw(f)=f(∅)\mathrm{bw}(f) = f(\emptyset)bw(f)=f(∅) when ∣V∣≤1|V| \le 1∣V∣≤1.

A set W⊆VW \subseteq VW⊆V is well-linked with respect to fff if for every partition (X,Y)(X, Y)(X,Y) of WWW and every ZZZ with X⊆Z⊆V∖YX \subseteq Z \subseteq V\setminus YX⊆Z⊆V∖Y, f(Z)≥min⁡(∣X∣,∣Y∣)f(Z) \ge \min(|X|, |Y|)f(Z)≥min(∣X∣,∣Y∣).

Let A(G)A(G)A(G) be the adjacency matrix of GGG over GF(2)\mathrm{GF}(2)GF(2). For disjoint X,Y⊆V(G)X, Y \subseteq V(G)X,Y⊆V(G), cutrkG∗(X,Y)\mathrm{cutrk}^*_G(X, Y)cutrkG∗​(X,Y) is the rank of the submatrix of A(G)A(G)A(G) with rows XXX and columns YYY, and the cut-rank function is cutrkG(X)=cutrkG∗(X,V(G)∖X)\mathrm{cutrk}_G(X) = \mathrm{cutrk}^*_G(X, V(G)\setminus X)cutrkG​(X)=cutrkG∗​(X,V(G)∖X). The rank-width rwd(G)\mathrm{rwd}(G)rwd(G) is bw(cutrkG)\mathrm{bw}(\mathrm{cutrk}_G)bw(cutrkG​).

A kkk-expression is a term built from constants ⋅i\cdot_i⋅i​ (a vertex with label i∈{1,…,k}i \in \{1,\dots,k\}i∈{1,…,k}), the operators ηi,j\eta_{i,j}ηi,j​ (i≠ji \ne ji=j; add all edges between labels iii and jjj), ρi→j\rho_{i\to j}ρi→j​ (relabel iii into jjj) and disjoint union ⊕\oplus⊕. Its value is the labelled graph it produces; GGG has clique-width cwd(G)≤k\mathrm{cwd}(G) \le kcwd(G)≤k if some kkk-expression has value isomorphic to GGG.

An interpolation of fff is a function f∗f^*f∗ on disjoint pairs (X,Y)(X, Y)(X,Y) that agrees with fff on (X,V∖X)(X, V\setminus X)(X,V∖X), is monotone, submodular in the sense f∗(A,B)+f∗(C,D)≥f∗(A∩C,B∪D)+f∗(A∪C,B∩D)f^*(A,B)+f^*(C,D) \ge f^*(A\cap C, B\cup D) + f^*(A\cup C, B\cap D)f∗(A,B)+f∗(C,D)≥f∗(A∩C,B∪D)+f∗(A∪C,B∩D), and has f∗(∅,∅)=f(∅)f^*(\emptyset,\emptyset)=f(\emptyset)f∗(∅,∅)=f(∅).

Formalization targets

Goal: Theorem 1.1, certificate form

For a graph GGG with at least one vertex and an integer k≥1k \ge 1k≥1:

∃ W, ∣W∣=3k+1, W well-linked for cutrkG  ⟹  cwd(G)≥k+1,\exists\, W,\ |W| = 3k+1,\ W \text{ well-linked for } \mathrm{cutrk}_G \;\Longrightarrow\; \mathrm{cwd}(G) \ge k+1,∃W, ∣W∣=3k+1, W well-linked for cutrkG​⟹cwd(G)≥k+1, ∄ W, ∣W∣=3k+1, W well-linked for cutrkG  ⟹  cwd(G)≤23k+2−1.\nexists\, W,\ |W| = 3k+1,\ W \text{ well-linked for } \mathrm{cutrk}_G \;\Longrightarrow\; \mathrm{cwd}(G) \le 2^{3k+2}-1.∄W, ∣W∣=3k+1, W well-linked for cutrkG​⟹cwd(G)≤23k+2−1.

The same explicit condition decides which side of the approximation holds; this is what the paper's algorithm certifies.

Milestones

  1. Proposition 4.1: properties of an interpolation, including that X↦f∗(X,B)−f(∅)X \mapsto f^*(X, B) - f(\emptyset)X↦f∗(X,B)−f(∅) is a matroid rank function on V∖BV\setminus BV∖B when f({v})−f(∅)≤1f(\{v\}) - f(\emptyset) \le 1f({v})−f(∅)≤1.
  2. Proposition 4.2: fmin⁡(X,Y)=min⁡X⊆Z⊆V∖Yf(Z)f_{\min}(X,Y) = \min_{X\subseteq Z\subseteq V\setminus Y} f(Z)fmin​(X,Y)=minX⊆Z⊆V∖Y​f(Z) is an interpolation.
  3. Theorem 5.1: a well-linked set of size kkk forces bw(f)≥k/3\mathrm{bw}(f) \ge k/3bw(f)≥k/3 (for k≠1k \ne 1k=1).
  4. Theorem 5.2: no well-linked set of size kkk implies bw(f)≤k\mathrm{bw}(f) \le kbw(f)≤k, when f({v})≤1f(\{v\}) \le 1f({v})≤1.
  5. Proposition 6.1: rk M[X1,Y1]+rk M[X2,Y2]≥rk M[X1∪X2,Y1∩Y2]+rk M[X1∩X2,Y1∪Y2]\mathrm{rk}\,M[X_1,Y_1] + \mathrm{rk}\,M[X_2,Y_2] \ge \mathrm{rk}\,M[X_1\cup X_2, Y_1\cap Y_2] + \mathrm{rk}\,M[X_1\cap X_2, Y_1\cup Y_2]rkM[X1​,Y1​]+rkM[X2​,Y2​]≥rkM[X1​∪X2​,Y1​∩Y2​]+rkM[X1​∩X2​,Y1​∪Y2​].
  6. Corollary 6.2: submodularity of cutrkG∗\mathrm{cutrk}^*_GcutrkG∗​ and cutrkG\mathrm{cutrk}_GcutrkG​.
  7. Section 6 claim: cutrkG\mathrm{cutrk}_GcutrkG​ is symmetric submodular and cutrkG∗\mathrm{cutrk}^*_GcutrkG∗​ interpolates it.
  8. Proposition 6.3: rwd(G)≤cwd(G)≤2rwd(G)+1−1\mathrm{rwd}(G) \le \mathrm{cwd}(G) \le 2^{\mathrm{rwd}(G)+1}-1rwd(G)≤cwd(G)≤2rwd(G)+1−1.

Significance

The dichotomy turns clique-width, for which no exact polynomial algorithm is known even for fixed kkk, into a parameter that can be approximated with an explicit witness in each direction. Downstream, every algorithm for graphs of bounded clique-width that needs a kkk-expression as input becomes applicable to graphs given without one, at the cost of an exponential blow-up of the width.

The result is proved in the literature; this mission formalizes it. To our knowledge none of the objects involved — branch-width of set functions, rank-width, cut-rank, kkk-expressions, clique-width — has been formalized in Mathlib, and the submodularity of submatrix rank (Proposition 6.1) is absent from Mathlib's Matrix.rank API. The formal development would give reusable definitions of branch-decompositions of arbitrary integer set functions, of cut-rank, and of clique-width, and a machine-checked link between the combinatorial and the linear-algebraic width parameters.

Difficulty

The upper bound in Theorem 5.2 is the core. The natural approach, growing a branch-decomposition one leaf split at a time while keeping the width at most kkk, gets stuck at a leaf carrying a set BBB with f(B)=kf(B) = kf(B)=k: a split of BBB into two parts of fff-value below kkk has to be found, and it must be found from the failure of well-linkedness of a set that is not obviously related to BBB. The paper's device is the interpolation f∗f^*f∗, which attaches a matroid to BBB whose base has exactly f(B)f(B)f(B) elements. Formalizing this requires handling partial branch-decompositions, their extensions, and a maximality argument over trees, none of which exists in Mathlib.

Proposition 6.3's upper bound is a second, independent difficulty: a rank-decomposition must be converted into a kkk-expression by an induction over a rooted binary tree, with a relabelling argument bounding the number of labels by the number of distinct nonzero rows of a GF(2)\mathrm{GF}(2)GF(2) matrix of rank kkk. Its lower bound needs the tree structure of a kkk-expression to be read as a branch-decomposition.

Formalization scope

The ground set is a Fintype V with DecidableEq V; subsets are Finset V; set functions are Finset V → ℤ, as in the paper. A branch-decomposition is a tree T : SimpleGraph (Fin n) with n≥2n \ge 2n≥2, all neighbour sets of size at most 333, and an injective map LLL from VVV onto the vertices of degree 111; the side of an edge uwuwuw is found by reachability from uuu after deleting uwuwuw. Branch-width, rank-width and clique-width are never computed as minima: "bw(f)≤k\mathrm{bw}(f) \le kbw(f)≤k" is the predicate "∣V∣≤1|V| \le 1∣V∣≤1 and f(∅)≤kf(\emptyset) \le kf(∅)≤k, or a branch-decomposition of width at most kkk exists", lower bounds say that every branch-decomposition has a wide edge, and "cwd(G)≤k\mathrm{cwd}(G) \le kcwd(G)≤k" is "GGG has a kkk-expression". Labels {1,…,k}\{1,\dots,k\}{1,…,k} are Fin k. The value of a kkk-expression has as vertex type the occurrences of constants (a nested sum type), and ηi,j\eta_{i,j}ηi,j​ requires i≠ji \ne ji=j. Cut-rank uses Matrix.rank over ZMod 2 of submatrices of SimpleGraph.adjMatrix. An interpolation is a function on all pairs of subsets whose axioms are imposed on disjoint pairs only.

Running time is not formalized. The paper's Theorem 1.1 asserts an O(n9log⁡n)O(n^9\log n)O(n9logn) algorithm; there is no cost model on the page, and the goal states the certificate the algorithm returns instead. Without the running time, "cwd(G)≥k+1\mathrm{cwd}(G) \ge k+1cwd(G)≥k+1 or cwd(G)≤23k+2−1\mathrm{cwd}(G) \le 2^{3k+2}-1cwd(G)≤23k+2−1" holds for every graph, so that reading is ruled out as a formalization of the goal; so are well-linkedness with respect to anything other than cutrkG\mathrm{cutrk}_GcutrkG​, widths defined by an unguarded infimum (which is 000 on an empty family), kkk-expressions whose value is not the graph up to isomorphism or whose η\etaη may join equal labels, and Theorem 5.1 stated for k=1k = 1k=1.

Correction of Theorem 5.1. As printed, Theorem 5.1 fails for k=1k = 1k=1: a singleton is always well-linked, but the edgeless graph on two vertices has cut-rank identically 000 and branch-width 0<1/30 < 1/30<1/3. The milestone carries the hypothesis k≠1k \ne 1k=1; the goal uses the theorem only at size 3k+1≥43k+1 \ge 43k+1≥4.

The graph with no vertex is excluded from the goal and from the upper bound of Proposition 6.3, since it has no kkk-expression for any kkk. Contributions welcome: proofs of the milestones, lemmas on branch-decompositions (suppressing degree-2 vertices, extending partial decompositions), and submatrix-rank submodularity, which is reusable beyond this mission.

Selected references

  • S. Oum and P. Seymour, Approximating clique-width and branch-width, J. Combin. Theory Ser. B 96 (2006) 514–528. https://doi.org/10.1016/j.jctb.2005.10.006
  • B. Courcelle and S. Olariu, Upper bounds to the clique width of graphs, Discrete Appl. Math. 101 (2000) 77–114. https://doi.org/10.1016/S0166-218X(99)00184-5
  • B. Courcelle, J. A. Makowsky and U. Rotics, Linear time solvable optimization problems on graphs of bounded clique-width, Theory Comput. Syst. 33 (2000) 125–150. https://doi.org/10.1007/s002249910009
  • N. Robertson and P. D. Seymour, Graph minors. X. Obstructions to tree-decomposition, J. Combin. Theory Ser. B 52 (1991) 153–190. https://doi.org/10.1016/0095-8956(91)90061-N
14 thms3 active usersReviewed
🏆Completed
CombinatoricsTheoretical Computer Science·Captain: mikedeng1

Sparse Approximate Solutions to Linear Systems 2: An Exact Cover by 3-Sets Exists iff Its Incidence System Has a 1/2-Approximate Solution with at Most m/3 NonzerosResearch Paper

Motivation

Many problems in signal processing, statistics and function interpolation ask for a solution of a linear system Ax≈bAx\approx bAx≈b that uses as few columns of AAA as possible: a sparse approximate solution. Natarajan's 1995 paper Sparse Approximate Solutions to Linear Systems (SIAM J. Comput. 24(2):227–234) was motivated by radial basis interpolation, where each column corresponds to a basis function and fewer columns mean a cheaper interpolant. The paper does two things. It proves that finding the sparsest approximate solution is computationally hard (§2, Theorem 1), and it analyses a greedy column-selection algorithm whose number of chosen columns is within a factor, depending on the conditioning of AAA, of the optimum (§3, Theorem 2; a separate mission of this series).

The hardness theorem is the reason the second half of the paper exists: once exact minimization is ruled out, one settles for approximation guarantees. It is cited throughout the compressed-sensing literature as the canonical statement that ℓ0\ell_0ℓ0​-minimization under an ℓ2\ell_2ℓ2​ error constraint is NP-hard, and is the starting point for the later theory of when convex relaxations recover sparse solutions.

The argument follows the classical reduction from Exact Cover by 3-sets (X3C) to minimum-weight solutions of linear systems in Garey and Johnson (1979), pp. 221 and 246, adapted to an approximate right-hand side.

Setting

Sparse approximate solution (SAS). Given a matrix A∈Rm×nA\in\mathbb R^{m\times n}A∈Rm×n, a vector b∈Rmb\in\mathbb R^mb∈Rm and a tolerance ε>0\varepsilon>0ε>0, find a vector x∈Rnx\in\mathbb R^nx∈Rn with ∥Ax−b∥2≤ε\|Ax-b\|_2\le\varepsilon∥Ax−b∥2​≤ε whose number of nonzero entries, written ∥x∥0=∣{j:xj≠0}∣\|x\|_0=|\{j : x_j\neq0\}|∥x∥0​=∣{j:xj​=0}∣, is as small as possible. Here ∥⋅∥2\|\cdot\|_2∥⋅∥2​ is the Euclidean norm.

Exact Cover by 3-sets (X3C). An instance is a ground set S={s1,…,sm}S=\{s_1,\dots,s_m\}S={s1​,…,sm​} and a list C=c1,…,cnC=c_1,\dots,c_nC=c1​,…,cn​ of subsets of SSS, each with exactly three elements. An exact cover is a sub-collection C^={cj:j∈J}\hat C=\{c_j : j\in J\}C^={cj​:j∈J}, J⊆{1,…,n}J\subseteq\{1,\dots,n\}J⊆{1,…,n}, such that every element of SSS occurs in exactly one set of C^\hat CC^.

The transformation. From an X3C instance build the SAS instance with

  • the incidence matrix A∈Rm×nA\in\mathbb R^{m\times n}A∈Rm×n: Aij=1A_{ij}=1Aij​=1 if si∈cjs_i\in c_jsi​∈cj​ and Aij=0A_{ij}=0Aij​=0 otherwise, so column jjj is the characteristic vector of cjc_jcj​;
  • the all-ones vector b=(1,1,…,1)∈Rmb=(1,1,\dots,1)\in\mathbb R^mb=(1,1,…,1)∈Rm;
  • the tolerance ε=12\varepsilon=\tfrac12ε=21​.

In Lean, SSS is Fin m, the collection is C : Fin n → Finset (Fin m) with hC : ∀ j, (C j).card = 3, an exact cover is an index set J with IsExactCover C J, the matrix is incidence C, the vector bbb is onesVec m, AxAxAx is Matrix.toEuclideanLin (incidence C) x, and ∥x∥0\|x\|_0∥x∥0​ is nnz x.

Formalization targets

Goal: correctness of the reduction

For every X3C instance (S,C)(S,C)(S,C) as above,

(∃J, {cj}j∈J is an exact cover of S)  ⟺  (∃x∈Rn, ∥Ax−b∥2≤12 and 3 ∥x∥0≤m).\bigl(\exists J,\ \{c_j\}_{j\in J}\text{ is an exact cover of }S\bigr)\iff\bigl(\exists x\in\mathbb R^n,\ \|Ax-b\|_2\le\tfrac12\ \text{and}\ 3\,\|x\|_0\le m\bigr).(∃J, {cj​}j∈J​ is an exact cover of S)⟺(∃x∈Rn, ∥Ax−b∥2​≤21​ and 3∥x∥0​≤m).

This is the sentence the proof of Theorem 1 (p. 228) establishes: "the constructed instance of SAS has a solution with m/3m/3m/3 or fewer entries if and only if the given instance of X3C has a solution."

Milestones

  1. Forward direction. If {cj}j∈J\{c_j\}_{j\in J}{cj​}j∈J​ is an exact cover, the indicator vector x=1Jx=\mathbf 1_Jx=1J​ satisfies Ax=bAx=bAx=b and 3∥x∥0=m3\|x\|_0=m3∥x∥0​=m.
  2. Entry bounds. For every xxx with ∥Ax−b∥2≤12\|Ax-b\|_2\le\frac12∥Ax−b∥2​≤21​, each entry of AxAxAx lies in [12,32][\frac12,\frac32][21​,23​].
  3. Lower bound on sparsity. For every such xxx, m≤3∥x∥0m\le3\|x\|_0m≤3∥x∥0​.
  4. Exact cover from a sparse solution. If moreover 3∥x∥0≤m3\|x\|_0\le m3∥x∥0​≤m, the sets cjc_jcj​ with xj≠0x_j\neq0xj​=0 form an exact cover.

Significance

The result. The equivalence shows that deciding whether a sparse approximate solution with a prescribed number of nonzeros exists is at least as hard as X3C, which is NP-complete. Consequently no polynomial-time algorithm computes the optimum of SAS unless P = NP, and approximation algorithms such as the greedy method of §3 are the natural object of study. The same instance shows hardness persists for 0/1 matrices, a right-hand side of all ones and a constant tolerance, so the difficulty does not come from ill-conditioned data or from vanishing precision.

Formalizing it. The reduction is proved in the paper; this mission produces a machine-checked proof of its correctness, the combinatorial core of every NP-hardness claim for ℓ0\ell_0ℓ0​-constrained least squares. No prior machine-checked version is known to exist, on the platform or elsewhere. The complexity-theoretic wrapper is out of scope (see below).

Difficulty

The forward direction is a direct computation. The converse contains the only real step, which the paper passes over with "it is clear". From ∥Ax−b∥2≤12\|Ax-b\|_2\le\frac12∥Ax−b∥2​≤21​ one gets only that every entry of AxAxAx is in [12,32][\frac12,\frac32][21​,23​]; the entries of xxx themselves are arbitrary reals, possibly negative or not equal to 111, so xxx need not be an indicator vector and Ax=bAx=bAx=b need not hold. The exact-cover property must therefore be extracted from support sizes alone: every element is covered by some column in the support, the support has at most m/3m/3m/3 columns of three elements each, and a counting argument forces the chosen sets to be pairwise disjoint. Reading off a cover from the values of xxx (for instance, taking the jjj with xj=1x_j=1xj​=1) does not work.

Formalization scope

  • Vectors live in EuclideanSpace ℝ (Fin m) and EuclideanSpace ℝ (Fin n), so ‖·‖ is the paper's ∥⋅∥2\|\cdot\|_2∥⋅∥2​. Using the sup norm of Fin m → ℝ would give a different statement.
  • The tolerance is exactly ε=12\varepsilon=\frac12ε=21​, as printed.
  • The collection is indexed, C : Fin n → Finset (Fin m): repeated sets are allowed and are distinct indices; an exact cover is a set of indices, and on the SAS side one nonzero entry is counted per index, so both sides treat duplicates consistently.
  • "m/3m/3m/3 or fewer" is written 3∥x∥0≤m3\|x\|_0\le m3∥x∥0​≤m, never with natural-number division. With this form the equivalence holds for every mmm (both sides are false when 3∤m3\nmid m3∤m), which absorbs the paper's "without loss of generality mmm is a multiple of 3"; no divisibility hypothesis is assumed. For m=0m=0m=0 both sides are true.
  • The hypothesis that every set has exactly three elements is essential for the converse (with m=9m=9m=9, O={s3,…,s9}O=\{s_3,\dots,s_9\}O={s3​,…,s9​}, c1={s1}∪Oc_1=\{s_1\}\cup Oc1​={s1​}∪O, c2={s2}∪Oc_2=\{s_2\}\cup Oc2​={s2​}∪O, c3=Oc_3=Oc3​=O, the vector x=(1,1,−1)x=(1,1,-1)x=(1,1,−1) solves Ax=bAx=bAx=b with 3∥x∥0=m3\|x\|_0=m3∥x∥0​=m, yet CCC has no exact cover since c1c_1c1​ and c2c_2c2​ must both be chosen) and is kept as hC.
  • Not formalized: the infinite-precision RAM machine model, polynomial-time many-one reductions, polynomial-time computability of the transformation (evident: an m×nm\times nm×n 0/1 matrix), and the NP-completeness of X3C (cited by the paper from Garey–Johnson). The goal is therefore the correctness of the transformation, not a statement titled "SAS is NP-hard". A statement that only records the forward direction, or that fixes xxx to be a 0/1 vector on the SAS side, would trivialize the converse and is not the target.
  • Tools a solver will need are in Mathlib: coordinate bounds for the Euclidean norm (PiLp.norm_apply_le), Finset.card_biUnion_le, and Finset.card_biUnion for disjoint unions. Contributions of a reusable exact-cover API, or of a polynomial-time reduction framework that could later wrap this equivalence into an NP-hardness theorem, are welcome.

Selected references

  • B. K. Natarajan, Sparse Approximate Solutions to Linear Systems, SIAM Journal on Computing 24(2):227–234, 1995. https://doi.org/10.1137/s0097539792240406
  • M. R. Garey and D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W. H. Freeman, 1979 (X3C: problem [SP2], p. 221; minimum weight solution to linear equations: [MP5], p. 246).
  • F. P. Preparata and M. I. Shamos, Computational Geometry: An Introduction, Springer, 1985 (the real RAM model). https://doi.org/10.1007/978-1-4612-1098-6
6 thms3 active usersReviewed
🏆Completed
Control TheoryConvex OptimizationNumerical Analysis+2·Captain: mikedeng1

Robust Solutions to Least-Squares Problems with Uncertain Data IV: A Semidefinite Upper Bound on the Linear-Fractional Worst-Case Residual, Exact for Full PerturbationsResearch Paper

Motivation

Least-squares fitting is a standard tool in estimation, identification and data analysis, and its data AAA, bbb are rarely known exactly. El Ghaoui and Lebret (SIAM J. Matrix Anal. Appl. 18(4), 1997) proposed to choose xxx to minimize the worst-case residual over a set of admissible data perturbations. Earlier missions of this series treat unstructured perturbations of [A b][A\ b][A b] and perturbations affine in a parameter vector. §5 of the paper covers a more general model, taken from robust identification (Doyle et al.): the perturbed data depend on an uncertain matrix Δ\DeltaΔ through a linear-fractional transformation. This form covers rational dependence of the data on uncertain parameters, max-norm bounds on independent parameters, and data matrices with some columns known exactly (pp. 1046–1047).

In this generality, deciding whether the worst-case residual is finite is NP-complete, and computing it is NP-hard even when the dependence is affine (§5.3, Lemma 5.1). Theorem 5.2 gives the tractable replacement: a semidefinite program whose value bounds the worst-case residual from above, and equals it when the perturbation is unstructured. The main tool is a structured form of the S-procedure. Robust control uses the same tool, with the scalings SSS and GGG below, to bound the real structured singular value (Fan, Tits and Doyle, 1991).

Setting

Vectors carry the Euclidean norm ∥v∥\|v\|∥v∥. For a matrix XXX, ∥X∥\|X\|∥X∥ is its largest singular value (operator norm between Euclidean spaces). Let D\mathcal DD be a linear subspace of RN×N\mathbb R^{N\times N}RN×N (the perturbation structure), and fix A∈Rn×mA \in \mathbb R^{n\times m}A∈Rn×m, b∈Rnb \in \mathbb R^nb∈Rn, L∈Rn×NL \in \mathbb R^{n\times N}L∈Rn×N, RA∈RN×mR_A \in \mathbb R^{N\times m}RA​∈RN×m, Rb∈RNR_b \in \mathbb R^NRb​∈RN, D∈RN×ND \in \mathbb R^{N\times N}D∈RN×N. For Δ∈D\Delta \in \mathcal DΔ∈D with det⁡(I−DΔ)≠0\det(I - D\Delta) \ne 0det(I−DΔ)=0 the perturbed data are

A(Δ)=A+LΔ(I−DΔ)−1RA,b(Δ)=b+LΔ(I−DΔ)−1Rb.A(\Delta) = A + L\Delta(I - D\Delta)^{-1}R_A, \qquad b(\Delta) = b + L\Delta(I - D\Delta)^{-1}R_b .A(Δ)=A+LΔ(I−DΔ)−1RA​,b(Δ)=b+LΔ(I−DΔ)−1Rb​.

With the normalization ρ=1\rho = 1ρ=1 (the paper's, with no loss of generality), the worst-case residual of x∈Rmx \in \mathbb R^mx∈Rm is

rD(A,b,x)=max⁡Δ∈D, ∥Δ∥≤1∥A(Δ)x−b(Δ)∥r_{\mathcal D}(A,b,x) = \max_{\Delta \in \mathcal D,\ \|\Delta\| \le 1} \|A(\Delta)x - b(\Delta)\|rD​(A,b,x)=Δ∈D, ∥Δ∥≤1max​∥A(Δ)x−b(Δ)∥

if det⁡(I−DΔ)≠0\det(I - D\Delta) \ne 0det(I−DΔ)=0 for every such Δ\DeltaΔ, and +∞+\infty+∞ otherwise (35). The commutant scalings are S={S=ST:SΔ=ΔS ∀Δ∈D}\mathcal S = \{S = S^T : S\Delta = \Delta S\ \forall \Delta \in \mathcal D\}S={S=ST:SΔ=ΔS ∀Δ∈D} and G={G=−GT:GΔ=ΔG ∀Δ∈D}\mathcal G = \{G = -G^T : G\Delta = \Delta G\ \forall \Delta \in \mathcal D\}G={G=−GT:GΔ=ΔG ∀Δ∈D} (37). The SDP constraint is

F(λ,S,G,x)=[ΘAx−bRAx−Rb(Ax−b)T(RAx−Rb)Tλ]≻0,Θ=[λI−LSLT−LSDT+LG−DSLT+GTLTS+DG−GDT−DSDT].(38),(39)\mathcal F(\lambda,S,G,x) = \begin{bmatrix} \Theta & \begin{matrix} Ax - b \\ R_Ax - R_b\end{matrix} \\ \begin{matrix}(Ax-b)^T & (R_Ax - R_b)^T\end{matrix} & \lambda\end{bmatrix} \succ 0, \quad \Theta = \begin{bmatrix} \lambda I - LSL^T & -LSD^T + LG \\ -DSL^T + G^TL^T & S + DG - GD^T - DSD^T\end{bmatrix}. \qquad (38),(39)F(λ,S,G,x)=​Θ(Ax−b)T​(RA​x−Rb​)T​​Ax−bRA​x−Rb​​λ​​≻0,Θ=[λI−LSLT−DSLT+GTLT​−LSDT+LGS+DG−GDT−DSDT​].(38),(39)

Formalization targets

Goal: Theorem 5.2 (corrected)

For all xxx and λ\lambdaλ:

(a)S∈S, G∈G, S≻0, GΔ skew ∀Δ∈D, F(λ,S,G,x)≻0 ⟹ λ>rD(A,b,x);\text{(a)}\quad S \in \mathcal S,\ G \in \mathcal G,\ S \succ 0,\ G\Delta \text{ skew } \forall \Delta \in \mathcal D,\ \mathcal F(\lambda,S,G,x) \succ 0 \ \Longrightarrow\ \lambda > r_{\mathcal D}(A,b,x);(a)S∈S, G∈G, S≻0, GΔ skew ∀Δ∈D, F(λ,S,G,x)≻0 ⟹ λ>rD​(A,b,x); (b)D=RN×N, λ>rD(A,b,x) ⟹ ∃s>0: F(λ,sI,0,x)≻0.\text{(b)}\quad \mathcal D = \mathbb R^{N\times N},\ \lambda > r_{\mathcal D}(A,b,x) \ \Longrightarrow\ \exists s > 0:\ \mathcal F(\lambda, sI, 0, x) \succ 0 .(b)D=RN×N, λ>rD​(A,b,x) ⟹ ∃s>0: F(λ,sI,0,x)≻0.

Part (a) says the value of the SDP inf⁡{λ:(λ,S,G) feasible}\inf\{\lambda : (\lambda, S, G) \text{ feasible}\}inf{λ:(λ,S,G) feasible} (40) is an upper bound on rDr_{\mathcal D}rD​. Part (b) says this upper bound is exact for full perturbations, including the case rD=∞r_{\mathcal D} = \inftyrD​=∞, where (40) is infeasible.

Milestones

  1. Lemma 2.2, both directions: the full-block S-procedure. det⁡(I−T4Δ)≠0\det(I - T_4\Delta) \ne 0det(I−T4​Δ)=0 and T(Δ)⪰0T(\Delta) \succeq 0T(Δ)⪰0 for all ∥Δ∥≤1\|\Delta\| \le 1∥Δ∥≤1 if and only if ∥T4∥<1\|T_4\| < 1∥T4​∥<1 and a one-scalar LMI (10) holds (the "only if" under T2≠0T_2 \ne 0T2​=0 or T3=0T_3 = 0T3​=0).
  2. Lemma 2.3: sufficiency of the scaled LMI for a structured D\mathcal DD, and its strict necessity for D=RN×N\mathcal D = \mathbb R^{N\times N}D=RN×N.
  3. §5.4, p. 1047: λ>rD(A,b,x)\lambda > r_{\mathcal D}(A,b,x)λ>rD​(A,b,x) if and only if a linear-fractional matrix function of Δ\DeltaΔ is positive definite on the structured unit ball.
  4. §5.4, (38)–(39): the certificate (a) in the paper's own words.

Significance

The worst-case residual under linear-fractional uncertainty cannot be computed efficiently unless P = NP. Theorem 5.2 gives an SDP-computable upper bound with an explicit certificate (S,G)(S, G)(S,G). Since xxx enters (38) linearly, the same constraint can also be optimized over xxx (Theorem 5.3, not part of this mission). For D=RN×N\mathcal D = \mathbb R^{N\times N}D=RN×N the bound is exact, which covers the model [A(Δ) b(Δ)]=[A b]+LΔ[RA Rb][A(\Delta)\ b(\Delta)] = [A\ b] + L\Delta[R_A\ R_b][A(Δ) b(Δ)]=[A b]+LΔ[RA​ Rb​] and, as a special case, the unstructured problem of §3.

The results are proved in the paper (the proof of Theorem 5.2 is only indicated, through Appendix C). No machine-checked version of these statements, of Lemma 2.2 or of the structured S-procedure with commutant scalings is known. The formalization also fixes the statements. As printed, Lemma 2.2's "only if", Lemma 2.3 and the upper bound of Theorem 5.2 are each false in a boundary or structural case (see Formalization scope). The corrected forms stated here are the ones the paper's proofs support.

Difficulty

Part (a) reduces to robust positivity of a linear-fractional matrix function, and the difficulty is the inverse (I−DΔ)−1(I - D\Delta)^{-1}(I−DΔ)−1. The certificate is one LMI in which Δ\DeltaΔ does not appear, while the conclusion is about a rational function of Δ\DeltaΔ over a whole structured ball. The certificate also has to guarantee that I−DΔI - D\DeltaI−DΔ is invertible everywhere on that ball, and not only that the residual is small where it is defined. Evaluating F\mathcal FF at a single point does not show this. Part (b) needs a lossless S-procedure in its strict form. The standard (non-strict) S-lemma gives only ⪰\succeq⪰, and the gap between strict and non-strict inequalities is exactly where the printed statements fail. The degenerate case T2=0T_2 = 0T2​=0 is not covered by the S-lemma's regularity condition and has to be handled separately.

Formalization scope

  • Dimensions are Fin n, Fin m, Fin N; D\mathcal DD is a Submodule ℝ (Matrix (Fin N) (Fin N) ℝ), with D=RN×N\mathcal D = \mathbb R^{N\times N}D=RN×N as ⊤. The Euclidean norm is written out, because ‖·‖ on Fin n → ℝ is the sup norm. ∥Δ∥\|\Delta\|∥Δ∥ is the operator norm of Matrix.toEuclideanLin Δ, the largest singular value.
  • λ>rD(A,b,x)\lambda > r_{\mathcal D}(A,b,x)λ>rD​(A,b,x) is the predicate ResidualBelow: every Δ∈D\Delta \in \mathcal DΔ∈D with ∥Δ∥≤1\|\Delta\| \le 1∥Δ∥≤1 has det⁡(I−DΔ)≠0\det(I - D\Delta) \ne 0det(I−DΔ)=0 and residual <λ< \lambda<λ. It is false for every λ\lambdaλ when rD=∞r_{\mathcal D} = \inftyrD​=∞. No real-valued supremum is used, so the ∞\infty∞ branch of (35) cannot turn into a default 000. Matrix inverses are Mathlib's Matrix.inv, and every use carries the determinant condition.
  • ρ=1\rho = 1ρ=1 throughout, as in the paper; general ρ\rhoρ follows by scaling Δ\DeltaΔ.
  • Corrections of the printed statements. (i) (40) must require S≻0S \succ 0S≻0. Without it, N=n=m=1N = n = m = 1N=n=m=1, D=2D = 2D=2, L=1L = 1L=1, A=b=RA=Rb=0A = b = R_A = R_b = 0A=b=RA​=Rb​=0, x=0x = 0x=0, S=−1S = -1S=−1, G=0G = 0G=0 satisfy (38) for every λ>1/3\lambda > 1/3λ>1/3, while rD=∞r_{\mathcal D} = \inftyrD​=∞. (ii) GGG must make GΔG\DeltaGΔ skew-symmetric for every Δ∈D\Delta \in \mathcal DΔ∈D, which is the identity pTGq=0p^TGq = 0pTGq=0 used in the proof of Lemma 2.3. For D=span⁡{I,J}\mathcal D = \operatorname{span}\{I, J\}D=span{I,J}, J=[01−10]J = \begin{bmatrix}0&1\\-1&0\end{bmatrix}J=[0−1​10​], the printed bound certifies λ=3/2\lambda = 3/2λ=3/2 for an instance with worst-case residual 222. The added condition holds automatically when every element of D\mathcal DD is symmetric (e.g. the diagonal structures (36)) and when G=0G = 0G=0 (e.g. D=RN×N\mathcal D = \mathbb R^{N\times N}D=RN×N). (iii) Lemma 2.2's "only if" is stated under T2≠0T_2 \ne 0T2​=0 or T3=0T_3 = 0T3​=0. (iv) Lemma 2.3's necessity is stated in strict form, and its sufficiency concludes T(Δ)≻0T(\Delta) \succ 0T(Δ)≻0.
  • Not stated: "If Θ>0\Theta > 0Θ>0 at the optimum, the upper bound is also exact". The infimum over the strict LMI (38) is not attained, and the paper does not say which limit is meant. Theorem 5.3, Lemma 2.4 and Lemma 5.1 are also not stated.
  • Trivializing encodings ruled out: the goal is not a statement about the value of an infimum (which a junk value could satisfy), and the added hypotheses are satisfiable (for instance S=sIS = sIS=sI, G=0G = 0G=0 for full D\mathcal DD, which part (b) produces).
  • Infrastructure needed: the Schur complement for block matrices (in Mathlib), a lossless S-lemma for two homogeneous quadratic forms in strict and non-strict form (the platform has ConvexOptimization.s_procedure, in a different sign convention), square roots of positive definite matrices that commute with D\mathcal DD, and compactness of the structured unit ball. The S-procedure lemmas are reusable in robust control and trust-region analysis. Proofs of the milestones in any order are welcome.

Selected references

  • L. El Ghaoui and H. Lebret, Robust solutions to least-squares problems with uncertain data, SIAM J. Matrix Anal. Appl. 18(4):1035–1064, 1997. https://doi.org/10.1137/S0895479896298130
  • S. Boyd, L. El Ghaoui, E. Feron and V. Balakrishnan, Linear Matrix Inequalities in System and Control Theory, SIAM, 1994. https://doi.org/10.1137/1.9781611970777
  • M. K. H. Fan, A. L. Tits and J. C. Doyle, Robustness in the presence of mixed parametric uncertainty and unmodeled dynamics, IEEE Trans. Automat. Control 36(1):25–38, 1991. https://doi.org/10.1109/9.62265
  • I. Pólik and T. Terlaky, A survey of the S-lemma, SIAM Review 49(3):371–418, 2007. https://doi.org/10.1137/S003614450444614X
8 thms3 active usersReviewed
🏆Completed
Convex OptimizationNumerical AnalysisOperations Research+1·Captain: mikedeng1

Robust Solutions to Least-Squares Problems with Uncertain Data III: Structured Robust Least Squares Is Solved Exactly by a Semidefinite ProgramResearch Paper

Motivation

Least squares fits a model Ax≈bAx \approx bAx≈b as if the data (A,b)(A, b)(A,b) were exact. In practice they are measured, rounded or estimated, and the least-squares solution can be very sensitive to such errors. El Ghaoui and Lebret (SIAM J. Matrix Anal. Appl. 18(4), 1997) proposed to treat the errors as deterministic, unknown but bounded, and to choose xxx minimizing the worst-case residual over all admissible data. For unstructured perturbations of [A b][A\ b][A b] bounded in Frobenius norm this leads to a second-order cone program (missions I and II of this series).

In many applications the perturbations have a known structure: a Toeplitz matrix stays Toeplitz, a parameter enters several entries at once, or only some entries are uncertain. An unstructured bound then over-estimates the worst case. The paper's §4 treats perturbations that are affine in a parameter vector δ\deltaδ bounded in Euclidean norm, and shows that the resulting structured robust least-squares (SRLS) problem is still solved exactly, now by a semidefinite program (SDP). This model of uncertainty (an ellipsoid of affinely parametrized data) is the one later adopted as the basic uncertainty set of robust optimization; see Ben-Tal and Nemirovski, Math. Oper. Res. 23(4), 1998.

Setting

Vectors carry the Euclidean norm ∥v∥=vTv\|v\| = \sqrt{v^Tv}∥v∥=vTv​. Given matrices A0,A1,…,Ap∈Rn×mA_0, A_1, \dots, A_p \in \mathbb{R}^{n\times m}A0​,A1​,…,Ap​∈Rn×m and vectors b0,b1,…,bp∈Rnb_0, b_1, \dots, b_p \in \mathbb{R}^nb0​,b1​,…,bp​∈Rn, define for every δ∈Rp\delta \in \mathbb{R}^pδ∈Rp

A(δ)=A0+∑i=1pδiAi,b(δ)=b0+∑i=1pδibi.\mathbf A(\delta) = A_0 + \sum_{i=1}^p \delta_i A_i, \qquad \mathbf b(\delta) = b_0 + \sum_{i=1}^p \delta_i b_i .A(δ)=A0​+i=1∑p​δi​Ai​,b(δ)=b0​+i=1∑p​δi​bi​.

For ρ≥0\rho \ge 0ρ≥0 and x∈Rmx \in \mathbb{R}^mx∈Rm the structured worst-case residual is

rS(A,b,ρ,x)=max⁡∥δ∥≤ρ∥A(δ)x−b(δ)∥,r_S(\mathbf A, \mathbf b, \rho, x) = \max_{\|\delta\| \le \rho} \|\mathbf A(\delta)x - \mathbf b(\delta)\|,rS​(A,b,ρ,x)=∥δ∥≤ρmax​∥A(δ)x−b(δ)∥,

and xxx is an SRLS solution if it minimizes rS(A,b,ρ,⋅)r_S(\mathbf A, \mathbf b, \rho, \cdot)rS​(A,b,ρ,⋅) over Rm\mathbb{R}^mRm. The paper takes ρ=1\rho = 1ρ=1 throughout §4 and writes rS(A,b,x)r_S(\mathbf A, \mathbf b, x)rS​(A,b,x).

For fixed xxx let M(x)=[A1x−b1 ⋯ Apx−bp]∈Rn×pM(x) = [A_1x - b_1\ \cdots\ A_px - b_p] \in \mathbb{R}^{n\times p}M(x)=[A1​x−b1​ ⋯ Ap​x−bp​]∈Rn×p and

F=M(x)TM(x),g=M(x)T(A0x−b0),h=∥A0x−b0∥2.F = M(x)^TM(x), \qquad g = M(x)^T(A_0x - b_0), \qquad h = \|A_0x - b_0\|^2 .F=M(x)TM(x),g=M(x)T(A0​x−b0​),h=∥A0​x−b0​∥2.

Since A(δ)x−b(δ)=(A0x−b0)+M(x)δ\mathbf A(\delta)x - \mathbf b(\delta) = (A_0x - b_0) + M(x)\deltaA(δ)x−b(δ)=(A0​x−b0​)+M(x)δ, the squared residual at δ\deltaδ is the quadratic function h+2gTδ+δTFδh + 2g^T\delta + \delta^TF\deltah+2gTδ+δTFδ. Finally, for scalars λ,τ\lambda, \tauλ,τ,

F(λ,τ)=[λ−τ−h−gT−gτI−F].\mathcal F(\lambda, \tau) = \begin{bmatrix} \lambda - \tau - h & -g^T \\ -g & \tau I - F \end{bmatrix}.F(λ,τ)=[λ−τ−h−g​−gTτI−F​].

Formalization targets

Goal: Theorem 4.2

With p≥1p \ge 1p≥1 and ρ=1\rho = 1ρ=1, consider the SDP in (λ,τ,x)(\lambda, \tau, x)(λ,τ,x)

minimize λsubject to[λ−τ0(A0x−b0)T0τIM(x)TA0x−b0M(x)I]⪰0.(32)\text{minimize } \lambda \quad \text{subject to} \quad \begin{bmatrix} \lambda - \tau & 0 & (A_0x - b_0)^T \\ 0 & \tau I & M(x)^T \\ A_0x - b_0 & M(x) & I \end{bmatrix} \succeq 0. \tag{32}minimize λsubject to​λ−τ0A0​x−b0​​0τIM(x)​(A0​x−b0​)TM(x)TI​​⪰0.(32)

The goal states that (a) for all xxx and λ\lambdaλ, some τ\tauτ makes (λ,τ,x)(\lambda, \tau, x)(λ,τ,x) feasible if and only if rS(A,b,x)2≤λr_S(\mathbf A, \mathbf b, x)^2 \le \lambdarS​(A,b,x)2≤λ; and (b) (λ,τ,x)(\lambda, \tau, x)(λ,τ,x) is optimal for (32) if and only if xxx is an SRLS solution, λ=rS(A,b,x)2\lambda = r_S(\mathbf A, \mathbf b, x)^2λ=rS​(A,b,x)2, and (λ,τ,x)(\lambda, \tau, x)(λ,τ,x) is feasible. This is the precise content of the paper's "the SRLS can be solved by computing an optimal solution of (32)".

Milestones

  1. Lemma 2.1 (S-procedure), in two items: the multiplier condition is sufficient for every ppp; for p=1p = 1p=1 it is also necessary when F1(ζ0)>0F_1(\zeta_0) > 0F1​(ζ0​)>0 for some ζ0\zeta_0ζ0​.
  2. Eq. (28): rS(A,b,x)2=max⁡δTδ≤1[1;δ]T[hgTgF][1;δ]r_S(\mathbf A, \mathbf b, x)^2 = \max_{\delta^T\delta \le 1} [1;\delta]^T \begin{bmatrix} h & g^T \\ g & F\end{bmatrix} [1;\delta]rS​(A,b,x)2=maxδTδ≤1​[1;δ]T[hg​gTF​][1;δ].
  3. Eq. (29): for λ≥0\lambda \ge 0λ≥0, that quadratic form is ≤λ\le \lambda≤λ on the unit ball if and only if F(λ,τ)⪰0\mathcal F(\lambda, \tau) \succeq 0F(λ,τ)⪰0 for some τ\tauτ.
  4. Theorem 4.1, first assertion: rS(A,b,x)2=min⁡{λ:∃τ, F(λ,τ)⪰0}r_S(\mathbf A, \mathbf b, x)^2 = \min\{\lambda : \exists \tau,\ \mathcal F(\lambda, \tau) \succeq 0\}rS​(A,b,x)2=min{λ:∃τ, F(λ,τ)⪰0}, the minimum attained.
  5. §4.2, Schur-complement step: the matrix of (32) is positive semidefinite if and only if F(λ,τ)\mathcal F(\lambda, \tau)F(λ,τ) is.

Significance

The result shows that a min–max problem over a nonconvex worst case (the inner problem maximizes a convex quadratic over a ball) is equivalent to a single convex SDP whose size is linear in nnn, mmm and ppp, and hence solvable in polynomial time by interior-point methods. It covers as special cases the unstructured problem of §3, least squares with uncertainty in selected entries, and Toeplitz or otherwise patterned perturbations. The exactness contrasts with the next section of the paper, where the linear-fractional and ℓ∞\ell_\inftyℓ∞​-bounded versions are in general only bounded from above, or shown NP-hard.

The result is proved in the paper; to the best of current knowledge it has not been formalized. The platform already has the one-constraint S-procedure (ConvexOptimization.s_procedure, proved, in a different sign and block convention); this mission adds the robust least-squares objects, the reduction to the S-procedure, the Schur-complement step, and the optimal-solution correspondence of Theorem 4.2. The worst-case residual and SDP (32) definitions are reusable by later robust-regression missions.

Difficulty

The obvious approach is to compute the inner maximum directly. The function δ↦h+2gTδ+δTFδ\delta \mapsto h + 2g^T\delta + \delta^TF\deltaδ↦h+2gTδ+δTFδ is convex, so its maximum over the unit ball is attained on the boundary, but it is not given by any closed-form expression in general, and maximizing a convex function is not a convex problem. Exactness therefore rests on the lossless S-procedure for one quadratic constraint, a nonconvex duality statement that fails for two or more constraints; the sufficient direction alone only yields an upper bound.

A second point is passing from "for fixed xxx" (Theorem 4.1) to "optimal over xxx" (Theorem 4.2): F(λ,τ)\mathcal F(\lambda, \tau)F(λ,τ) is quadratic in xxx, and only the Schur-complement lift (32) is jointly affine in (λ,τ,x)(\lambda, \tau, x)(λ,τ,x). The correspondence of optimal solutions must then be checked in both directions, including that the optimal λ\lambdaλ is the squared residual and not the residual.

Formalization scope

  • Data are A0 : Matrix (Fin n) (Fin m) ℝ, A : Fin p → Matrix (Fin n) (Fin m) ℝ, b0 : Fin n → ℝ, b : Fin p → Fin n → ℝ; A i is the paper's Ai+1A_{i+1}Ai+1​ (0-based index). Vectors live in Fin k → ℝ with the Euclidean norm written out as ∑ivi2\sqrt{\sum_i v_i^2}∑i​vi2​​, never Mathlib's sup norm.
  • The maximum defining rSr_SrS​ is sSup of the set of attained residuals over the closed ball; for ρ≥0\rho \ge 0ρ≥0 this set is nonempty and bounded, so sSup is the true maximum. The theorems use ρ=1\rho = 1ρ=1, as the paper does; the paper derives general ρ\rhoρ by scaling and that is not stated here.
  • Block matrices are Matrix.fromBlocks in the printed order (scalar block first: Unit ⊕ Fin p; for (32), (Unit ⊕ Fin p) ⊕ Fin n). "⪰0\succeq 0⪰0" is Mathlib's PosSemidef, which includes symmetry; all matrices here are symmetric by construction.
  • p≥1p \ge 1p≥1 is assumed in (29), Theorem 4.1 and Theorem 4.2, although the paper does not state it: for p=0p = 0p=0 the block τI\tau IτI is empty, τ\tauτ is unconstrained, every λ\lambdaλ is feasible and both SDPs lose their meaning. Eq. (28), Lemma 2.1 and the Schur-complement step hold for every ppp and are stated without it.
  • Optimality in (32) is stated as feasibility plus λ≤λ′\lambda \le \lambda'λ≤λ′ for every feasible (λ′,τ′,x′)(\lambda', \tau', x')(λ′,τ′,x′). A formalization that only proves existence of some feasible τ\tauτ, or only an inequality between the optimal values, is weaker than Theorem 4.2 and does not close the goal.
  • Theorem 4.1's second and third assertions (the one-dimensional reformulation (30)–(31) and the worst-case perturbation) are not included: they use the notion "(F,g)(F, g)(F,g)-controllable", which the paper does not define.
  • Useful infrastructure: Mathlib's Schur-complement lemmas (Matrix.PosSemidef.fromBlocks₂₂ and relatives in LinearAlgebra.Matrix.SchurComplement); the platform's ConvexOptimization.s_procedure and ConvexOptimization.single_constraint_quadratic_strong_duality with their definitions ConvexOptimization_quadraticForms, included as reference items. A bridge lemma between the platform's block convention and this mission's is a welcome contribution, as is a general-ρ\rhoρ version.

Selected references

  • L. El Ghaoui and H. Lebret, Robust Solutions to Least-Squares Problems with Uncertain Data, SIAM J. Matrix Anal. Appl. 18(4):1035–1064, 1997. https://doi.org/10.1137/S0895479896298130
  • S. Boyd, L. El Ghaoui, E. Feron and V. Balakrishnan, Linear Matrix Inequalities in System and Control Theory, SIAM, 1994 (the S-procedure, p. 24). https://doi.org/10.1137/1.9781611970777
  • A. Ben-Tal and A. Nemirovski, Robust Convex Optimization, Math. Oper. Res. 23(4):769–805, 1998. https://doi.org/10.1287/moor.23.4.769
  • I. Pólik and T. Terlaky, A Survey of the S-Lemma, SIAM Review 49(3):371–418, 2007. https://doi.org/10.1137/S003614450444614X
11 thms3 active usersReviewed
🏆Completed
Convex OptimizationNumerical AnalysisOperations Research+1·Captain: mikedeng1

Robust Solutions to Least-Squares Problems with Uncertain Data I: The Worst-Case Residual and Its Unique MinimizerResearch Paper

Motivation

The least-squares (LS) problem min⁡x∥Ax−b∥\min_x \|Ax - b\|minx​∥Ax−b∥ assumes that the data A∈Rn×mA \in \mathbb{R}^{n\times m}A∈Rn×m, b∈Rnb \in \mathbb{R}^nb∈Rn are exact. In applications they rarely are: they come from measurements, from linearizations, or from models with neglected dynamics. A classical response is sensitivity analysis or regularization (Tikhonov), where a weight trades the size of the solution against the fit, and the choice of that weight is left to the user. El Ghaoui and Lebret (SIAM J. Matrix Anal. Appl. 18(4), 1997) take a deterministic view instead: the true data lie in a known ball around (A,b)(A, b)(A,b), and the solution should minimize the residual it can be forced to have in the worst case over that ball. The paper shows that this robust least-squares (RLS) problem is solvable exactly, in the unstructured case by a second-order cone program (SOCP). The same worst-case idea, applied to regression, underlies the later equivalence between robustness and regularization (Xu, Caramanis and Mannor, 2009) and is a standard entry point to robust optimization (Ben-Tal, El Ghaoui and Nemirovski, Robust Optimization, 2009).

This mission formalizes the first main result of the paper, Theorem 3.1: the worst-case residual has a closed form, its minimizer is unique, and minimizing it is an SOCP.

Setting

Vectors carry the Euclidean norm ∥v∥=(∑ivi2)1/2\|v\| = (\sum_i v_i^2)^{1/2}∥v∥=(∑i​vi2​)1/2. For a matrix XXX, ∥X∥F=(∑i,jXij2)1/2\|X\|_F = (\sum_{i,j} X_{ij}^2)^{1/2}∥X∥F​=(∑i,j​Xij2​)1/2 is the Frobenius norm and ∥X∥\|X\|∥X∥ the largest singular value, i.e. the smallest c≥0c \ge 0c≥0 with ∥Xv∥≤c∥v∥\|Xv\| \le c\|v\|∥Xv∥≤c∥v∥ for all vvv.

Fix A∈Rn×mA \in \mathbb{R}^{n\times m}A∈Rn×m and b∈Rnb \in \mathbb{R}^nb∈Rn. A perturbation is a pair ΔA∈Rn×m\Delta A \in \mathbb{R}^{n\times m}ΔA∈Rn×m, Δb∈Rn\Delta b \in \mathbb{R}^nΔb∈Rn, collected in the augmented matrix Δ=[ΔA Δb]∈Rn×(m+1)\Delta = [\Delta A\ \Delta b] \in \mathbb{R}^{n\times(m+1)}Δ=[ΔA Δb]∈Rn×(m+1). For a bound ρ≥0\rho \ge 0ρ≥0 and x∈Rmx \in \mathbb{R}^mx∈Rm, the worst-case residual is (paper, eq. (1))

r(A,b,ρ,x)=max⁡∥[ΔA Δb]∥F≤ρ∥(A+ΔA)x−(b+Δb)∥,r(A,b,\rho,x) = \max_{\|[\Delta A\ \Delta b]\|_F \le \rho} \|(A+\Delta A)x - (b+\Delta b)\|,r(A,b,ρ,x)=∥[ΔA Δb]∥F​≤ρmax​∥(A+ΔA)x−(b+Δb)∥,

and xxx is an RLS solution if it minimizes r(A,b,ρ,⋅)r(A,b,\rho,\cdot)r(A,b,ρ,⋅). The bound constrains the augmented matrix jointly, not ΔA\Delta AΔA and Δb\Delta bΔb separately. The paper normalizes ρ=1\rho = 1ρ=1 and writes r(A,b,x)=r(A,b,1,x)r(A,b,x) = r(A,b,1,x)r(A,b,x)=r(A,b,1,x). Finally, [x;1]∈Rm+1[x;1] \in \mathbb{R}^{m+1}[x;1]∈Rm+1 denotes xxx stacked over 111. In the Lean development these are RobustLS.Unstructured.eucNorm, frobNorm, specNorm, augment, stackOne, worstCaseResidual A b ρ x, its largest-singular-value variant worstCaseResidualSpec, and the SOCP constraint predicate SocpFeasible A b x λ τ.

Formalization targets

Goal: Theorem 3.1 (p. 1040)

For n≥1n \ge 1n≥1, every AAA, bbb:

r(A,b,x)=∥Ax−b∥+∥x∥2+1for all x∈Rm,r(A,b,x) = \|Ax-b\| + \sqrt{\|x\|^2+1} \quad \text{for all } x \in \mathbb{R}^m,r(A,b,x)=∥Ax−b∥+∥x∥2+1​for all x∈Rm,

the problem min⁡x∈Rmr(A,b,x)\min_{x \in \mathbb{R}^m} r(A,b,x)minx∈Rm​r(A,b,x) has exactly one solution xRLSx_{\mathrm{RLS}}xRLS​, and it is the SOCP

minimize λsubject to∥Ax−b∥≤λ−τ,∥[x;1]∥≤τ,(15)\text{minimize } \lambda \quad\text{subject to}\quad \|Ax-b\| \le \lambda-\tau,\quad \|[x;1]\| \le \tau, \tag{15}minimize λsubject to∥Ax−b∥≤λ−τ,∥[x;1]∥≤τ,(15)

in the sense that r(A,b,x)r(A,b,x)r(A,b,x) is the least λ\lambdaλ for which some τ\tauτ makes (x,λ,τ)(x,\lambda,\tau)(x,λ,τ) feasible.

Milestones

  1. Eq. (16). Every perturbation with ∥[ΔA Δb]∥F≤1\|[\Delta A\ \Delta b]\|_F \le 1∥[ΔA Δb]∥F​≤1 has residual at most ∥Ax−b∥+∥x∥2+1\|Ax-b\| + \sqrt{\|x\|^2+1}∥Ax−b∥+∥x∥2+1​.
  2. The worst-case perturbation. For a unit vector uuu aligned with Ax−bAx - bAx−b (arbitrary if Ax=bAx = bAx=b), the rank-one matrix Δ=u[xT −1]/∥x∥2+1\Delta = u[x^T\ {-1}]/\sqrt{\|x\|^2+1}Δ=u[xT −1]/∥x∥2+1​ has ∥Δ∥F=∥Δ∥=1\|\Delta\|_F = \|\Delta\| = 1∥Δ∥F​=∥Δ∥=1 and attains the bound.
  3. Spectral norm. The worst case over the larger ball ∥[ΔA Δb]∥≤1\|[\Delta A\ \Delta b]\| \le 1∥[ΔA Δb]∥≤1 is the same value.
  4. Strict convexity. x↦r(A,b,x)x \mapsto r(A,b,x)x↦r(A,b,x) is strictly convex on Rm\mathbb{R}^mRm.
  5. The SOCP (15). For every xxx, r(A,b,x)r(A,b,x)r(A,b,x) is the optimal λ\lambdaλ of (15) with xxx fixed, and xxx is an RLS solution exactly when it is the xxx-part of an optimal solution of (15).

Significance

The closed form replaces a maximization over a matrix ball of dimension n(m+1)n(m+1)n(m+1) by two Euclidean norms. It shows that the RLS objective is the LS residual plus a penalty ∥x∥2+1\sqrt{\|x\|^2+1}∥x∥2+1​ that does not depend on AAA or bbb, which is the starting point for the paper's Theorem 3.2 (the RLS solution is a Tikhonov-regularized LS solution with a data-dependent weight) and its analysis of continuity and conditioning. The SOCP formulation places the problem in the class solved by interior-point methods, at a cost the paper compares with one singular value decomposition of AAA. The spectral-norm statement says the worst case does not depend on which of the two standard matrix norms bounds the perturbation.

The result is proved in the paper; the proof is short. To the best of the planning survey (September 2026), no machine-checked proof exists, and Prove2Me has no statement about worst-case residuals or robust least squares. The mission produces a verified closed form that later missions of this series (Tikhonov form of the solution, structured and linear-fractional perturbations) and any formalization of robust regression can import.

Difficulty

The upper bound alone does not give the theorem: the statement is an equality, and the equality needs an explicit maximizer. The paper's printed maximizer is wrong by a sign: with [xT 1][x^T\ 1][xT 1] in place of [xT −1][x^T\ {-1}][xT −1] the perturbation does not attain the bound (for A=0A = 0A=0, x=0x = 0x=0, b=e1b = e_1b=e1​ it gives residual 000 instead of 222), so a transcription of the printed proof fails. Two further points are silent in the paper. The operator norm of a rank-one matrix has to be computed from the definition of the largest singular value. Uniqueness of the minimizer needs existence first, which follows from growth of rrr at infinity and is not stated. Working with the sSup definition of the worst case requires showing the set of residuals is bounded, which is milestone 1.

Formalization scope

  • Dimensions are Fin n, Fin m; AAA is Matrix (Fin n) (Fin m) ℝ, bbb and xxx are functions Fin n → ℝ, Fin m → ℝ. The augmented matrix [ΔA Δb][\Delta A\ \Delta b][ΔA Δb] is indexed by Fin m ⊕ Unit, and so is [x;1][x;1][x;1].
  • Vector norms are the Euclidean norm written as ∑ivi2\sqrt{\sum_i v_i^2}∑i​vi2​​ (eucNorm), never Mathlib's ‖·‖ on Fin n → ℝ, which is the sup norm. The Frobenius norm and the largest singular value are explicit definitions (frobNorm, specNorm); specNorm is the infimum of admissible operator constants.
  • The maximum in (1) is sSup of the set of attained residuals. For ρ≥0\rho \ge 0ρ≥0 the set is nonempty and bounded, so this is the true maximum; milestones 1 and 2 state the bound and the attaining perturbation directly, so no statement relies on the value of sSup on an unbounded set.
  • The paper's normalization ρ=1\rho = 1ρ=1 is kept; general ρ>0\rho > 0ρ>0 follows from the scaling ϕ(A,b,ρ)=ρ ϕ(A/ρ,b/ρ,1)\phi(A,b,\rho) = \rho\,\phi(A/\rho,b/\rho,1)ϕ(A,b,ρ)=ρϕ(A/ρ,b/ρ,1) the paper records on p. 1039 and is not a target.
  • The goal assumes n≥1n \ge 1n≥1. For n=0n = 0n=0 the only perturbation is the empty matrix, the worst case is 000, and the closed form fails; the paper's setting (Ax≃bAx \simeq bAx≃b with data b∈Rnb \in \mathbb{R}^nb∈Rn) has n≥1n \ge 1n≥1. Milestones 3–5 carry the same hypothesis.
  • Milestone 2 states the corrected perturbation [xT −1][x^T\ {-1}][xT −1]; the printed [xT 1][x^T\ 1][xT 1] is false.
  • A trivializing formalization — an upper bound in place of the equality, a worst case over ΔA\Delta AΔA and Δb\Delta bΔb bounded separately, or uniqueness among critical points only — is ruled out: the goal is the equality for the jointly bounded augmented matrix and ∃! of a global minimizer over all of Rm\mathbb{R}^mRm.

Contributions welcome: lemmas on Frobenius and operator norms of rank-one matrices, the inequality ∥Mz∥≤∥M∥F∥z∥\|Mz\| \le \|M\|_F\|z\|∥Mz∥≤∥M∥F​∥z∥ in this explicit setting, and strict convexity of x↦∥x∥2+1x \mapsto \sqrt{\|x\|^2+1}x↦∥x∥2+1​; these are reusable beyond the mission.

Selected references

  • L. El Ghaoui and H. Lebret, Robust Solutions to Least-Squares Problems with Uncertain Data, SIAM Journal on Matrix Analysis and Applications 18(4):1035–1064, 1997. https://doi.org/10.1137/S0895479896298130
  • A. Ben-Tal, L. El Ghaoui and A. Nemirovski, Robust Optimization, Princeton University Press, 2009. https://doi.org/10.1515/9781400831050
  • H. Xu, C. Caramanis and S. Mannor, Robust Regression and Lasso, Journal of Machine Learning Research 10:1485–1510, 2009 (IEEE Trans. Inf. Theory 56(7), 2010). https://jmlr.org/papers/v10/xu09b.html
  • M. S. Lobo, L. Vandenberghe, S. Boyd and H. Lebret, Applications of Second-Order Cone Programming, Linear Algebra and its Applications 284:193–228, 1998. https://doi.org/10.1016/S0024-3795(98)10032-0
7 thms3 active usersReviewed
🏆Completed
Numerical AnalysisProbabilityRandom Matrix Theory·Captain: mikedeng1

Randomized Algorithms for Estimating the Trace of an Implicit Symmetric Positive Semi-Definite Matrix I: Sample Bound for the Gaussian Trace EstimatorResearch Paper

Motivation

Many computations in scientific computing, statistics and machine learning need the trace of a matrix AAA that is never formed explicitly: AAA may be f(B)f(B)f(B) for a large sparse BBB, an inverse B−1B^{-1}B−1, or a product of operators, and the only access to it is the ability to compute products AzAzAz for chosen vectors zzz. Examples are log-determinant estimation in Gaussian process regression, counting triangles in graphs through trace(B3)\mathrm{trace}(B^3)trace(B3), computing charge densities in electronic structure calculations, and generalized cross-validation in regularized regression. For such matrices the nnn diagonal entries are not available, and computing them one at a time costs nnn matrix–vector products.

Randomized trace estimators replace this by a small number MMM of products: draw random vectors z1,…,zMz_1,\ldots,z_Mz1​,…,zM​ from a fixed distribution with E(ziTAzi)=trace(A)\mathrm{E}(z_i^T A z_i) = \mathrm{trace}(A)E(ziT​Azi​)=trace(A) and average the quadratic forms. Hutchinson (1989) introduced the estimator with Rademacher vectors and computed its variance; Silver and Röder (1997) used Gaussian vectors. Before Avron and Toledo (2011), the analyses of these estimators were variance computations, which do not say how many samples guarantee a given relative accuracy with a given probability. Avron and Toledo gave the first such sample bounds for several estimators, stated in terms of an (ϵ,δ)(\epsilon,\delta)(ϵ,δ) guarantee; this mission formalizes their bound for the Gaussian estimator. Later work (Roosta-Khorasani and Ascher 2015; Cortinovis and Kressner 2022) sharpened these bounds and extended them to indefinite matrices.

Setting

Let A∈Rn×nA \in \mathbb{R}^{n\times n}A∈Rn×n be symmetric positive semi-definite, and write τ=trace(A)\tau = \mathrm{trace}(A)τ=trace(A). Fix a number of samples M≥1M \ge 1M≥1. Let z1,…,zM∈Rnz_1, \ldots, z_M \in \mathbb{R}^nz1​,…,zM​∈Rn be random vectors whose MnMnMn entries are independent standard normal random variables. The Gaussian trace estimator (Definition 3.1) is

GM=1M∑i=1MziTAzi.G_M = \frac{1}{M}\sum_{i=1}^{M} z_i^T A z_i .GM​=M1​i=1∑M​ziT​Azi​.

Each term ziTAziz_i^TAz_iziT​Azi​ has expectation trace(A)\mathrm{trace}(A)trace(A), so GMG_MGM​ is unbiased. A randomized trace estimator TTT is an (ϵ,δ)(\epsilon,\delta)(ϵ,δ)-approximator of trace(A)\mathrm{trace}(A)trace(A) (Definition 4.1) if

Pr⁡(∣T−trace(A)∣≤ϵ trace(A))≥1−δ,\Pr\bigl(|T - \mathrm{trace}(A)| \le \epsilon\,\mathrm{trace}(A)\bigr) \ge 1-\delta ,Pr(∣T−trace(A)∣≤ϵtrace(A))≥1−δ,

that is, if its relative error is at most ϵ\epsilonϵ except on an event of probability at most δ\deltaδ.

The analysis uses the eigenvalues λ1,…,λn≥0\lambda_1,\ldots,\lambda_n \ge 0λ1​,…,λn​≥0 of AAA, listed with multiplicity, and the polynomial h(t)=∑s=2n(−2)sts∑∣S∣=s∏i∈Sλih(t) = \sum_{s=2}^{n}(-2)^s t^s \sum_{|S| = s}\prod_{i\in S}\lambda_ih(t)=∑s=2n​(−2)sts∑∣S∣=s​∏i∈S​λi​, where SSS ranges over subsets of {1,…,n}\{1,\ldots,n\}{1,…,n}; it satisfies ∏i(1−2λit)=1−2τt+h(t)\prod_i(1-2\lambda_i t) = 1 - 2\tau t + h(t)∏i​(1−2λi​t)=1−2τt+h(t).

Formalization targets

Goal: Theorem 5.2 (corrected)

For every symmetric positive semi-definite AAA, every 0<ϵ≤1/100 < \epsilon \le 1/100<ϵ≤1/10, every 0<δ<10<\delta<10<δ<1 and every natural number MMM with

M≥20 ϵ−2ln⁡(2/δ),M \ge 20\,\epsilon^{-2}\ln(2/\delta),M≥20ϵ−2ln(2/δ),

the estimator GMG_MGM​ is an (ϵ,δ)(\epsilon,\delta)(ϵ,δ)-approximator of trace(A)\mathrm{trace}(A)trace(A). The sample count depends on neither nnn nor AAA.

Milestones

  1. Lemma 5.1. For symmetric AAA, E(G1)=trace(A)\mathrm{E}(G_1) = \mathrm{trace}(A)E(G1​)=trace(A) and Var(G1)=2∥A∥F2\mathrm{Var}(G_1) = 2\|A\|_F^2Var(G1​)=2∥A∥F2​.
  2. Eq. (1). For symmetric AAA and every ttt with 2λit<12\lambda_i t < 12λi​t<1 for all iii, the moment generating function of Z=MGMZ = MG_MZ=MGM​ is
mZ(t)=∏i=1n(1−2λit)−M/2=(1−2τt+h(t))−M/2.m_Z(t) = \prod_{i=1}^{n}(1-2\lambda_i t)^{-M/2} = (1 - 2\tau t + h(t))^{-M/2}.mZ​(t)=i=1∏n​(1−2λi​t)−M/2=(1−2τt+h(t))−M/2.
  1. Elementary symmetric sums (p. 8:8). For non-negative x1,…,xnx_1,\ldots,x_nx1​,…,xn​ and 1≤i≤n1\le i\le n1≤i≤n, ∑∣S∣=i∏j∈Sxj≤(∑jxj)i\sum_{|S|=i}\prod_{j\in S}x_j \le (\sum_j x_j)^i∑∣S∣=i​∏j∈S​xj​≤(∑j​xj​)i; hence ∣h(t)∣≤∑j=2n(2τt)j|h(t)| \le \sum_{j=2}^{n}(2\tau t)^j∣h(t)∣≤∑j=2n​(2τt)j for t≥0t\ge0t≥0 when all λi≥0\lambda_i\ge0λi​≥0.
  2. Upper tail (pp. 8:8–8:9). If τ>0\tau > 0τ>0, M≥1M\ge1M≥1 and 0<ϵ≤0.10<\epsilon\le 0.10<ϵ≤0.1, then
Pr⁡(GM≥τ(1+ϵ))≤exp⁡(−Mϵ2/20).\Pr\bigl(G_M \ge \tau(1+\epsilon)\bigr) \le \exp(-M\epsilon^2/20).Pr(GM​≥τ(1+ϵ))≤exp(−Mϵ2/20).
  1. Both tails (p. 8:9). If τ>0\tau>0τ>0, 0<ϵ≤0.10<\epsilon\le0.10<ϵ≤0.1 and M≥20ϵ−2ln⁡(2/δ)M \ge 20\epsilon^{-2}\ln(2/\delta)M≥20ϵ−2ln(2/δ), then Pr⁡(GM≥τ(1+ϵ))≤δ/2\Pr(G_M \ge \tau(1+\epsilon)) \le \delta/2Pr(GM​≥τ(1+ϵ))≤δ/2 and Pr⁡(GM≤τ(1−ϵ))≤δ/2\Pr(G_M \le \tau(1-\epsilon)) \le \delta/2Pr(GM​≤τ(1−ϵ))≤δ/2.

Significance

The theorem gives a number of matrix–vector products, O(ϵ−2ln⁡(1/δ))O(\epsilon^{-2}\ln(1/\delta))O(ϵ−2ln(1/δ)), that suffices for a relative-error guarantee on the trace of any positive semi-definite matrix, independent of its dimension and spectrum. It is the reference row of the paper's Table I, against which the Hutchinson, normalized Rayleigh-quotient and unit-vector estimators are compared, and it is the form in which trace estimation enters the analysis of randomized algorithms for log-determinants, spectral densities and matrix functions.

The result is proved in the paper; to our knowledge it has not been formalized in any proof assistant. The mission produces a machine-checked version with the constant 202020 and the range of ϵ\epsilonϵ made explicit, and with the misprints of the printed argument resolved (see Formalization scope). It also produces reusable pieces: the moment generating function of a Gaussian quadratic form, and the bound on elementary symmetric sums by powers of the power sum. Sharper constants, the removal of the restriction ϵ≤0.1\epsilon\le 0.1ϵ≤0.1, or a direct formalization of the lower tail through a χ2\chi^2χ2 tail bound are welcome as further theorems.

Difficulty

Unbiasedness and the variance formula do not give the result: Chebyshev's inequality with Var(GM)=2∥A∥F2/M≤2τ2/M\mathrm{Var}(G_M) = 2\|A\|_F^2/M \le 2\tau^2/MVar(GM​)=2∥A∥F2​/M≤2τ2/M yields M≥2ϵ−2δ−1M \ge 2\epsilon^{-2}\delta^{-1}M≥2ϵ−2δ−1, with a polynomial rather than logarithmic dependence on 1/δ1/\delta1/δ. A logarithmic bound needs exponential moments of GMG_MGM​, and the exponential moment of zTAzz^TAzzTAz is finite only for ttt below 1/(2λmax⁡)1/(2\lambda_{\max})1/(2λmax​); the argument has to choose ttt inside that range uniformly in the spectrum, using only λmax⁡≤τ\lambda_{\max}\le\tauλmax​≤τ. The second obstacle is distributional: zTAzz^TAzzTAz is not a sum of independent terms in the coordinates of zzz, and reducing it to a weighted sum of independent χ2\chi^2χ2 variables requires the rotation invariance of the standard Gaussian vector. The paper proves only the upper tail with an explicit constant and states that the lower tail follows "using the same technique"; that step has to be supplied.

Formalization scope

Matrices are Matrix (Fin n) (Fin n) ℝ; "symmetric positive semi-definite" is A.PosSemidef, "symmetric" is A.IsHermitian, and eigenvalues are Matrix.IsHermitian.eigenvalues. The sample space is Fin M → Fin n → ℝ with the product measure of MnMnMn copies of gaussianReal 0 1, so the law of the samples is constructed, not assumed; GM(ω)=(M:R)−1∑iωi⋅(Aωi)G_M(\omega) = (M:\mathbb{R})^{-1}\sum_i \omega_i\cdot(A\omega_i)GM​(ω)=(M:R)−1∑i​ωi​⋅(Aωi​). Probabilities are Measure.real; the moment generating function is Mathlib's mgf; the variance is Mathlib's variance, and Lemma 5.1 asserts square integrability so that neither the integral nor the variance takes its default value. The sample count is a natural number M≥1M\ge1M≥1; ϵ\epsilonϵ and δ\deltaδ are real.

Corrections of the printed text, each recorded in the item's Formalization Note:

  • Theorem 5.2 is printed without a range for ϵ\epsilonϵ and is false without one (for rank-one AAA, ϵ=100\epsilon=100ϵ=100, δ=e−400\delta=e^{-400}δ=e−400 the threshold allows M=1M=1M=1, while Pr⁡(χ12>101)≈e−50>δ\Pr(\chi^2_1>101)\approx e^{-50}>\deltaPr(χ12​>101)≈e−50>δ). The proof gives its key bound "for ϵ≤0.1\epsilon\le0.1ϵ≤0.1"; the goal is stated for 0<ϵ≤1/100<\epsilon\le 1/100<ϵ≤1/10.
  • Eq. (1) is printed for ∣λit∣≤12|\lambda_i t|\le\frac12∣λi​t∣≤21​, which admits 1−2λit=01-2\lambda_it = 01−2λi​t=0, where the moment generating function is infinite. It is stated for 2λit<12\lambda_i t<12λi​t<1. The page's sum over subsets of "the set Λ\LambdaΛ of eigenvalues" is taken over index sets, so repeated eigenvalues count with multiplicity.
  • The last paragraph of the proof prints Pr⁡(GM≤τ(1+ϵ))≤δ/2\Pr(G_M\le\tau(1+\epsilon))\le\delta/2Pr(GM​≤τ(1+ϵ))≤δ/2 for the upper tail and Pr⁡(∣GM−τ∣≤τ(1+ϵ))≤δ\Pr(|G_M-\tau|\le\tau(1+\epsilon))\le\deltaPr(∣GM​−τ∣≤τ(1+ϵ))≤δ for the conclusion; the intended statements are Pr⁡(GM≥τ(1+ϵ))≤δ/2\Pr(G_M\ge\tau(1+\epsilon))\le\delta/2Pr(GM​≥τ(1+ϵ))≤δ/2 and Pr⁡(∣GM−τ∣>ϵτ)≤δ\Pr(|G_M-\tau|>\epsilon\tau)\le\deltaPr(∣GM​−τ∣>ϵτ)≤δ. Milestone 5 states the upper and lower tail bounds.
  • Lemma 5.1 is followed by the remark that it "also applies when AAA is non-symmetric"; this is false for the variance and is not formalized. Definition 3.1 says "positive-definite"; the estimator is defined for every matrix and each theorem carries its own hypothesis.
  • The one-sided tail milestones assume trace(A)>0\mathrm{trace}(A)>0trace(A)>0; for A=0A=0A=0 their events are certain, while the goal holds trivially.

A formalization that makes the goal trivial is ruled out: the estimator's law is the explicit product Gaussian measure rather than a hypothesis, MMM ranges over all natural numbers above the threshold, and the approximator predicate is evaluated on the genuine event ∣GM−trace(A)∣≤ϵ trace(A)|G_M - \mathrm{trace}(A)|\le\epsilon\,\mathrm{trace}(A)∣GM​−trace(A)∣≤ϵtrace(A).

A complete development needs rotation invariance of the standard Gaussian on Rn\mathbb{R}^nRn (Mathlib's stdGaussian_map), the moment generating function of a squared standard normal, independence of products of Gaussian vectors, and a Chernoff bound from the moment generating function. The Gaussian quadratic-form results (milestones 1 and 2) are reusable for the other Gaussian estimators of the paper, such as the rank estimator of Lemma 5.3. Proofs of any milestone, alternative proofs of the lower tail, and helper lemmas on χ2\chi^2χ2 moment generating functions are welcome.

Selected references

  • H. Avron and S. Toledo, Randomized algorithms for estimating the trace of an implicit symmetric positive semi-definite matrix, Journal of the ACM 58(2), Article 8, 2011. https://doi.org/10.1145/1944345.1944349
  • M. F. Hutchinson, A stochastic estimator of the trace of the influence matrix for Laplacian smoothing splines, Communications in Statistics – Simulation and Computation 18(3), 1059–1076, 1989. https://doi.org/10.1080/03610918908812806
  • R. N. Silver and H. Röder, Calculation of densities of states and spectral functions by Chebyshev recursion and maximum entropy, Physical Review E 56(4), 4822–4829, 1997. https://doi.org/10.1103/PhysRevE.56.4822
  • F. Roosta-Khorasani and U. Ascher, Improved bounds on sample size for implicit matrix trace estimators, Foundations of Computational Mathematics 15, 1187–1212, 2015. https://doi.org/10.1007/s10208-014-9220-1
  • A. Cortinovis and D. Kressner, On randomized trace estimates for indefinite matrices with an application to determinants, Foundations of Computational Mathematics 22, 875–903, 2022. https://doi.org/10.1007/s10208-021-09525-9
9 thms3 active usersReviewed
🏆Completed
Machine LearningOptimizationStatistics·Captain: mikedeng1

Simultaneous Analysis of Lasso and Dantzig Selector I: Sparse Eigenvalue and Correlation Conditions Imply the Restricted Eigenvalue ConditionResearch Paper

Motivation

In high-dimensional linear regression one observes y=Xβ∗+w∈Rny = X\beta^* + w \in \mathbb R^ny=Xβ∗+w∈Rn with a design matrix X∈Rn×MX\in\mathbb R^{n\times M}X∈Rn×M whose number of columns MMM may far exceed the sample size nnn. The two standard estimators of a sparse β∗\beta^*β∗, the Lasso (Tibshirani, 1996) and the Dantzig selector (Candès and Tao, 2007), both come with error bounds of order slog⁡M/ns\log M/nslogM/n for an sss-sparse β∗\beta^*β∗, but only under a condition on XXX: since XXX has a non-trivial kernel when M>nM>nM>n, some form of restricted invertibility is unavoidable.

Bickel, Ritov and Tsybakov (arXiv:0801.1095, Ann. Statist. 2009) introduced the restricted eigenvalue (RE) condition, which asks for invertibility of XXX only on a cone of approximately sparse vectors. It is weaker than the conditions used before it and has since become the default assumption in the sparse-estimation literature. Section 4 of the paper relates RE to the earlier conditions:

  • 2005–2007: Candès and Tao (arXiv:math/0506081) analyse the Dantzig selector under a uniform uncertainty principle involving restricted eigenvalues and restricted correlations of XXX; the condition ϕmin⁡(2s)>θs,2s\phi_{\min}(2s)>\theta_{s,2s}ϕmin​(2s)>θs,2s​ is Assumption 1 below with c0=1c_0=1c0​=1.
  • 2006–2009: Meinshausen and Yu (arXiv:math/0605584) analyse the Lasso under a lower bound on sparse eigenvalues of order slog⁡ns\log nslogn.
  • 2006: Donoho, Elad and Temlyakov (doi:10.1109/TIT.2005.860430) use mutual coherence for sparse recovery; 2007: Bunea, Tsybakov and Wegkamp (doi:10.1214/07-EJS008) use coherence-type conditions for the Lasso.
  • 2009: Bickel, Ritov and Tsybakov show (Lemma 4.1 and Section 4) that each of these conditions implies RE.

This mission formalizes those implications.

Setting

Fix integers n≥1n\ge1n≥1 and M≥2M\ge2M≥2 and a matrix X∈Rn×MX\in\mathbb R^{n\times M}X∈Rn×M with columns x1,…,xMx_1,\dots,x_Mx1​,…,xM​. The Gram matrix is Ψn=XTX/n\Psi_n = X^TX/nΨn​=XTX/n. For δ∈RM\delta\in\mathbb R^Mδ∈RM and J⊆{1,…,M}J\subseteq\{1,\dots,M\}J⊆{1,…,M}, δJ\delta_JδJ​ is the vector equal to δ\deltaδ on JJJ and 000 off JJJ; ∣⋅∣1|\cdot|_1∣⋅∣1​, ∣⋅∣2|\cdot|_2∣⋅∣2​ are the ℓ1\ell_1ℓ1​ and Euclidean norms; M(δ)\mathcal M(\delta)M(δ) is the number of non-zero coordinates of δ\deltaδ; J0cJ_0^cJ0c​ is the complement of J0J_0J0​.

The cone condition for J0J_0J0​ and c0>0c_0>0c0​>0 is

∣δJ0c∣1≤c0 ∣δJ0∣1.(4.1)|\delta_{J_0^c}|_1\le c_0\,|\delta_{J_0}|_1. \tag{4.1}∣δJ0c​​∣1​≤c0​∣δJ0​​∣1​.(4.1)

Assumption RE(s,c0)(s,c_0)(s,c0​) holds with constant κ>0\kappa>0κ>0 if ∣Xδ∣2≥κn ∣δJ0∣2|X\delta|_2\ge\kappa\sqrt n\,|\delta_{J_0}|_2∣Xδ∣2​≥κn​∣δJ0​​∣2​ for every J0J_0J0​ with ∣J0∣≤s|J_0|\le s∣J0​∣≤s and every δ≠0\delta\ne0δ=0 satisfying (4.1). For m≥sm\ge sm≥s, let J1J_1J1​ be a set of mmm indices outside J0J_0J0​ carrying the mmm largest ∣δj∣|\delta_j|∣δj​∣, and J01=J0∪J1J_{01}=J_0\cup J_1J01​=J0​∪J1​; Assumption RE(s,m,c0)(s,m,c_0)(s,m,c0​) replaces ∣δJ0∣2|\delta_{J_0}|_2∣δJ0​​∣2​ by ∣δJ01∣2|\delta_{J_{01}}|_2∣δJ01​​∣2​.

The restricted eigenvalues are ϕmin⁡(u)\phi_{\min}(u)ϕmin​(u) and ϕmax⁡(u)\phi_{\max}(u)ϕmax​(u), the minimum and maximum of xTΨnx/∣x∣22x^T\Psi_nx/|x|_2^2xTΨn​x/∣x∣22​ over xxx with 1≤M(x)≤u1\le\mathcal M(x)\le u1≤M(x)≤u. The restricted correlations θm1,m2\theta_{m_1,m_2}θm1​,m2​​ are the maximum of c1TXI1TXI2c2/(n∣c1∣2∣c2∣2)c_1^TX_{I_1}^TX_{I_2}c_2/(n|c_1|_2|c_2|_2)c1T​XI1​T​XI2​​c2​/(n∣c1​∣2​∣c2​∣2​) over disjoint index sets I1,I2I_1,I_2I1​,I2​ with ∣Ii∣≤mi|I_i|\le m_i∣Ii​∣≤mi​ and non-zero ci∈RIic_i\in\mathbb R^{I_i}ci​∈RIi​. Two constants are attached to them:

κ1(s,c0)=ϕmin⁡(2s)(1−c0θs,2sϕmin⁡(2s)),κ2(s,m,c0)=ϕmin⁡(s+m)(1−c0s ϕmax⁡(m)m ϕmin⁡(s+m)).\kappa_1(s,c_0)=\sqrt{\phi_{\min}(2s)}\Big(1-\frac{c_0\theta_{s,2s}}{\phi_{\min}(2s)}\Big),\qquad \kappa_2(s,m,c_0)=\sqrt{\phi_{\min}(s+m)}\Big(1-c_0\sqrt{\tfrac{s\,\phi_{\max}(m)}{m\,\phi_{\min}(s+m)}}\Big).κ1​(s,c0​)=ϕmin​(2s)​(1−ϕmin​(2s)c0​θs,2s​​),κ2​(s,m,c0​)=ϕmin​(s+m)​(1−c0​mϕmin​(s+m)sϕmax​(m)​​).

P01P_{01}P01​ is the orthogonal projector in Rn\mathbb R^nRn onto the span of the columns xjx_jxj​, j∈J01j\in J_{01}j∈J01​.

Formalization targets

Goal: Lemma 4.1 (ii)

For integers 1≤s≤M/21\le s\le M/21≤s≤M/2, m≥sm\ge sm≥s, s+m≤Ms+m\le Ms+m≤M and c0>0c_0>0c0​>0, if Assumption 2 m ϕmin⁡(s+m)>c02 s ϕmax⁡(m)m\,\phi_{\min}(s+m)>c_0^2\,s\,\phi_{\max}(m)mϕmin​(s+m)>c02​sϕmax​(m) holds, then κ2(s,m,c0)>0\kappa_2(s,m,c_0)>0κ2​(s,m,c0​)>0, RE(s,c0)(s,c_0)(s,c0​) and RE(s,m,c0)(s,m,c_0)(s,m,c0​) hold with constant κ2(s,m,c0)\kappa_2(s,m,c_0)κ2​(s,m,c0​), and for every J0J_0J0​ with ∣J0∣≤s|J_0|\le s∣J0​∣≤s and every δ\deltaδ satisfying (4.1)

1n∣P01Xδ∣2 ≥ κ2(s,m,c0) ∣δJ01∣2.\frac1{\sqrt n}|P_{01}X\delta|_2\ \ge\ \kappa_2(s,m,c_0)\,|\delta_{J_{01}}|_2 .n​1​∣P01​Xδ∣2​ ≥ κ2​(s,m,c0​)∣δJ01​​∣2​.

Assumption 2 involves no correlations, only extreme eigenvalues of small principal submatrices of Ψn\Psi_nΨn​.

Lemma 4.1 (i)

For 1≤s≤M/21\le s\le M/21≤s≤M/2 and c0>0c_0>0c0​>0, Assumption 1 ϕmin⁡(2s)>c0θs,2s\phi_{\min}(2s)>c_0\theta_{s,2s}ϕmin​(2s)>c0​θs,2s​ implies the same conclusions with m=sm=sm=s and constant κ1(s,c0)\kappa_1(s,c_0)κ1​(s,c0​).

Coherence-type conditions (Section 4)

For 1≤s≤M1\le s\le M1≤s≤M and c0>0c_0>0c0​>0, each of

ϕmin⁡(s)>2c0θs,1s,ϕmin⁡(s)>2c0θ1,1s,diag⁡Ψn=1 and θ1,1<1(1+2c0)s\phi_{\min}(s)>2c_0\theta_{s,1}\sqrt s,\qquad \phi_{\min}(s)>2c_0\theta_{1,1}s,\qquad \operatorname{diag}\Psi_n=1\ \text{and}\ \theta_{1,1}<\frac1{(1+2c_0)s}ϕmin​(s)>2c0​θs,1​s​,ϕmin​(s)>2c0​θ1,1​s,diagΨn​=1 and θ1,1​<(1+2c0​)s1​

(Assumptions 3, 4, 5) implies RE(s,c0)(s,c_0)(s,c0​), with the constants κ2=ϕmin⁡(s)−2c0θs,1s\kappa^2=\phi_{\min}(s)-2c_0\theta_{s,1}\sqrt sκ2=ϕmin​(s)−2c0​θs,1​s​, ϕmin⁡(s)−2c0θ1,1s\phi_{\min}(s)-2c_0\theta_{1,1}sϕmin​(s)−2c0​θ1,1​s and 1−(1+2c0)θ1,1s1-(1+2c_0)\theta_{1,1}s1−(1+2c0​)θ1,1​s respectively.

The milestones are the steps of the proof in Appendix A — the projection inequality (A.1), the block bound (A.2), the shelling bound (A.3), the Candès–Tao correlation bound used for part (i) — followed by part (i) and the three coherence-type implications.

Significance

RE(s,c0)(s,c_0)(s,c0​) with c0=3c_0=3c0​=3 and c0=1c_0=1c0​=1 is the hypothesis of the paper's prediction and ℓ1\ell_1ℓ1​ bounds for the Lasso and the Dantzig selector (Theorems 5.1, 6.1, 7.1, 7.2), and RE(s,m,c0)(s,m,c_0)(s,m,c0​) is the hypothesis of its ℓp\ell_pℓp​ bounds. Assumptions 1–5 are stated through quantities that are standard in compressed sensing and random matrix theory, so known bounds for ϕmin⁡\phi_{\min}ϕmin​, ϕmax⁡\phi_{\max}ϕmax​ and θ\thetaθ of random designs transfer, through this mission's theorems, to every result stated under RE. Lemma 4.1 also shows that RE is weaker than the Candès–Tao condition used for the Dantzig selector.

The results are proved in the paper; parts of Lemma 4.1's proof (the correlation bound for part (i)) are cited from Candès and Tao without proof. None of these results is formalized: the platform has pairwise-incoherence and restricted-nullspace statements from Wainwright's textbook (a different conclusion and normalization) and restricted isometry definitions, but neither restricted eigenvalues ϕmin⁡(u),ϕmax⁡(u)\phi_{\min}(u),\phi_{\max}(u)ϕmin​(u),ϕmax​(u), restricted correlations θm1,m2\theta_{m_1,m_2}θm1​,m2​​, nor the RE condition in this form.

Difficulty

The naive attempt to bound ∣Xδ∣2|X\delta|_2∣Xδ∣2​ from below splits δ=δJ0+δJ0c\delta=\delta_{J_0}+\delta_{J_0^c}δ=δJ0​​+δJ0c​​ and applies an eigenvalue bound to each part. This fails: δJ0c\delta_{J_0^c}δJ0c​​ can have up to M−sM-sM−s non-zero coordinates, and no condition on sss- or 2s2s2s-sparse submatrices controls ∣XδJ0c∣2|X\delta_{J_0^c}|_2∣XδJ0c​​∣2​ directly. The cone condition bounds only the ℓ1\ell_1ℓ1​ norm of δJ0c\delta_{J_0^c}δJ0c​​, while eigenvalue conditions speak about ℓ2\ell_2ℓ2​ norms of sparse vectors; bridging the two with the right constant s/m\sqrt{s/m}s/m​, and keeping track of how the leading block J01J_{01}J01​ interacts with the rest through the projector P01P_{01}P01​, is where the work lies. For part (i), the interaction between disjoint sparse blocks has to be controlled by θs,2s\theta_{s,2s}θs,2s​ rather than by ϕmax⁡\phi_{\max}ϕmax​.

Formalization scope

  • Representation. XXX is Matrix (Fin n) (Fin M) ℝ; vectors are Fin M → ℝ and Fin n → ℝ; ∣Xδ∣2=(∑i(Xδ)i2)1/2|X\delta|_2=(\sum_i (X\delta)_i^2)^{1/2}∣Xδ∣2​=(∑i​(Xδ)i2​)1/2. The projector P01P_{01}P01​ is Mathlib's orthogonal projection on EuclideanSpace ℝ (Fin n) onto the span of the columns indexed by J01J_{01}J01​.
  • RE through a witness. RE X s c0 κ asserts the RE inequality with constant κ\kappaκ for all admissible J0J_0J0​ and δ\deltaδ. The paper's κ(s,c0)\kappa(s,c_0)κ(s,c0​) is the largest such κ\kappaκ (the minimum is attained), so "RE holds with κ(s,c0)≥κ2\kappa(s,c_0)\ge\kappa_2κ(s,c0​)≥κ2​" is exactly "κ2>0\kappa_2>0κ2​>0 is a witness". This avoids a real infimum over an empty set when J0=∅J_0=\emptysetJ0​=∅.
  • Ties. Every admissible choice of J1J_1J1​ (the mmm largest ∣δj∣|\delta_j|∣δj​∣ outside J0J_0J0​) is quantified over.
  • Restricted eigenvalues and correlations are sInf/sSup over nonempty bounded sets (a basis vector for ϕ\phiϕ; two disjoint singletons for θ\thetaθ, since M≥2M\ge2M≥2), so they equal the paper's attained min/max. uuu, sss, mmm are natural numbers; s≤M/2s\le M/2s≤M/2 is written 2s≤M2s\le M2s≤M.
  • Corrections of the printed statement. (1) Lemma 4.1 says the RE assumptions "hold with κ(s,c0)=κ(s,m,c0)=κ2(s,m,c0)\kappa(s,c_0)=\kappa(s,m,c_0)=\kappa_2(s,m,c_0)κ(s,c0​)=κ(s,m,c0​)=κ2​(s,m,c0​)" (and likewise with κ1\kappa_1κ1​); the proof gives only the lower bound, and the lower bound is what is stated. (2) The paper calls P01P_{01}P01​ "the projector in RM\mathbb R^MRM"; it acts on Rn\mathbb R^nRn. (3) The Section 4 claims "Assumption 3/4/5 implies RE(s,c0)(s,c_0)(s,c0​)" are stated with the explicit constant produced by the displayed argument, a labelled strengthening. (4) The Candès–Tao bound is stated with the hypotheses the proof uses: the blocks are disjoint, of sizes at most sss and 2s2s2s, and ϕmin⁡(2s)>0\phi_{\min}(2s)>0ϕmin​(2s)>0.
  • Ruling out trivializations. RE quantifies over all J0J_0J0​ with ∣J0∣≤s|J_0|\le s∣J0​∣≤s and all non-zero δ\deltaδ in the cone, and bounds the full ∣Xδ∣2|X\delta|_2∣Xδ∣2​, not ∣XδJ0∣2|X\delta_{J_0}|_2∣XδJ0​​∣2​; no hypothesis restricts XXX beyond the stated assumptions. The hypotheses are satisfiable: for n=M=4n=M=4n=M=4, X=2IX=2IX=2I (so Ψn=I\Psi_n=IΨn​=I), s=1s=1s=1, m=2m=2m=2, c0=1c_0=1c0​=1, Assumption 2 reads 2>12>12>1.
  • Infrastructure. A sparse-vector library (restriction, support, sorting coordinates into blocks) and facts about orthogonal projections onto column spans are needed; both are reusable for the other missions of this series and for compressed-sensing results. Proofs of any milestone, and alternative arguments, are welcome.

Selected references

  • P. J. Bickel, Y. Ritov, A. B. Tsybakov, Simultaneous analysis of Lasso and Dantzig selector, Ann. Statist. 37(4), 1705–1732, 2009. arXiv:0801.1095v3. https://arxiv.org/abs/0801.1095
  • E. Candès, T. Tao, The Dantzig selector: statistical estimation when p is much larger than n, Ann. Statist. 35(6), 2313–2351, 2007. https://arxiv.org/abs/math/0506081
  • N. Meinshausen, B. Yu, Lasso-type recovery of sparse representations for high-dimensional data, Ann. Statist. 37(1), 246–270, 2009. https://arxiv.org/abs/math/0605584
  • F. Bunea, A. B. Tsybakov, M. H. Wegkamp, Sparsity oracle inequalities for the Lasso, Electron. J. Statist. 1, 169–194, 2007. https://doi.org/10.1214/07-EJS008
  • D. L. Donoho, M. Elad, V. N. Temlyakov, Stable recovery of sparse overcomplete representations in the presence of noise, IEEE Trans. Inform. Theory 52(1), 6–18, 2006. https://doi.org/10.1109/TIT.2005.860430
11 thms3 active usersReviewed
🏆Completed
Numerical AnalysisOperations ResearchOptimization·Captain: mikedeng1

Updating Quasi-Newton Matrices with Limited Storage: The Limited-Storage BFGS Method Reaches the Minimizer of a Strictly Convex Quadratic in at Most n StepsResearch Paper

Motivation

Quasi-Newton methods minimize a smooth function fff on Rn\mathbb{R}^nRn by moving along dk=−Hkgkd_k = -H_k g_kdk​=−Hk​gk​, where gkg_kgk​ is the gradient and HkH_kHk​ is an approximation of the inverse Hessian built from observed gradient differences. The BFGS update is the most widely used way of building HkH_kHk​, but it stores a dense n×nn \times nn×n matrix, which is prohibitive for large nnn.

Nocedal's 1980 paper (Math. Comp. 35, 773–782) proposed keeping only the last mmm correction pairs and rebuilding the matrix from a simple initial matrix H0H_0H0​ at every step. The resulting method, called SQN in the paper, is now known as L-BFGS, and it is the default large-scale unconstrained optimizer in many numerical libraries and in machine learning. The paper's main theoretical claim is that this truncation does not destroy the finite termination of BFGS on quadratics.

Timeline:

  • 1970: Broyden, Fletcher, Goldfarb and Shanno introduce the BFGS update (references [1] and [5] of the paper).
  • 1977: Nazareth relates BFGS to conjugate gradients (Argonne Tech. Memo 282, reference [7]); his form of preconditioned conjugate gradients is the one the paper uses.
  • 1977–1978: Shanno studies the memoryless BFGS update, the case m=1m = 1m=1 (reference [11]; journal version Math. Oper. Res. 3, 1978).
  • 1980: Nocedal defines the special BFGS matrices and the SQN method and states that on quadratics with exact line searches SQN is identical to preconditioned conjugate gradients, hence has quadratic termination.
  • 1989: Liu and Nocedal (Math. Programming 45) study the method, now called L-BFGS, for large-scale problems.
  • 1998: Kolda, O'Leary and Nazareth (SIAM J. Optim. 8) treat limited-memory and update-skipping BFGS variants with exact line searches on quadratics.

Setting

Let AAA be a symmetric positive definite n×nn \times nn×n matrix and b∈Rnb \in \mathbb{R}^nb∈Rn, and let f(x)=12xTAx+bTxf(x) = \tfrac12 x^T A x + b^T xf(x)=21​xTAx+bTx, a strictly convex quadratic with gradient g(x)=Ax+bg(x) = Ax + bg(x)=Ax+b and unique minimizer x∗=−A−1bx^\ast = -A^{-1} bx∗=−A−1b.

Exact line search. Along a direction d≠0d \neq 0d=0 from xxx, the step α=−g(x)Td/dTAd\alpha = -g(x)^T d / d^T A dα=−g(x)Td/dTAd minimizes f(x+αd)f(x + \alpha d)f(x+αd).

BFGS update. For a pair (s,y)(s, y)(s,y) with ρ=1/yTs\rho = 1/y^T sρ=1/yTs and v=I−ρysTv = I - \rho y s^Tv=I−ρysT, the BFGS update of HHH is

Hˉ=vTHv+ρssT.\bar H = v^T H v + \rho s s^T .Hˉ=vTHv+ρssT.

Special BFGS matrices. Fix H0H_0H0​ symmetric positive definite and a number m≥1m \ge 1m≥1 of stored corrections. Given pairs (sj,yj)(s_j, y_j)(sj​,yj​), the special matrix HKH_KHK​ is H0H_0H0​ updated by the pairs j=K−min⁡(K,m),…,K−1j = K - \min(K, m), \dots, K-1j=K−min(K,m),…,K−1, oldest first (the paper's (4)–(5)). Only the mmm most recent pairs enter, and the matrix is rebuilt from H0H_0H0​.

SQN. Starting from x0x_0x0​, with gi=g(xi)g_i = g(x_i)gi​=g(xi​):

di=−Higi,xi+1=xi+αidi,si=xi+1−xi,yi=gi+1−gi,d_i = -H_i g_i, \qquad x_{i+1} = x_i + \alpha_i d_i, \qquad s_i = x_{i+1} - x_i,\quad y_i = g_{i+1} - g_i,di​=−Hi​gi​,xi+1​=xi​+αi​di​,si​=xi+1​−xi​,yi​=gi+1​−gi​,

with αi\alpha_iαi​ the exact step and Hi+1H_{i+1}Hi+1​ the special matrix built from the last min⁡(i+1,m)\min(i+1, m)min(i+1,m) pairs.

PCG with fixed preconditioner H0H_0H0​. d0=−H0g0d_0 = -H_0 g_0d0​=−H0​g0​, xi+1=xi+αidix_{i+1} = x_i + \alpha_i d_ixi+1​=xi​+αi​di​, di+1=−H0gi+1+βi+1did_{i+1} = -H_0 g_{i+1} + \beta_{i+1} d_idi+1​=−H0​gi+1​+βi+1​di​ with βi+1=yiTH0gi+1/yiTdi\beta_{i+1} = y_i^T H_0 g_{i+1} / y_i^T d_iβi+1​=yiT​H0​gi+1​/yiT​di​.

Formalization targets

Goal: quadratic termination of SQN

For every nnn, every symmetric positive definite AAA and H0H_0H0​, every bbb, x0x_0x0​ and every m≥1m \ge 1m≥1,

∃ k≤n:Axk+b=0,\exists\, k \le n : \quad A x_k + b = 0 ,∃k≤n:Axk​+b=0,

where xkx_kxk​ are the SQN iterates. The statement fixes no constant beyond the dimension bound nnn.

Milestones

  1. Property (a): the special matrices are positive definite whenever yiTsi>0y_i^T s_i > 0yiT​si​>0 for all iii.
  2. Eq. (7): along conjugate steps, viyi=0v_i y_i = 0vi​yi​=0 and viyj=yjv_i y_j = y_jvi​yj​=yj​ for i>ji > ji>j.
  3. Eq. (6): along conjugate steps, Hkyj=sjH_k y_j = s_jHk​yj​=sj​ for the mmm most recent jjj (when k>mk > mk>m).
  4. Eq. (10): the special matrix equals mmm sum-form BFGS corrections applied to H0H_0H0​.
  5. Eq. (15): the PCG directions satisfy diTyj=0d_i^T y_j = 0diT​yj​=0 for i≠ji \neq ji=j.
  6. Eq. (16): giTH0gj=0g_i^T H_0 g_j = 0giT​H0​gj​=0 for i≠ji \neq ji=j and giTdj=0g_i^T d_j = 0giT​dj​=0 for j<ij < ij<i.
  7. The PCG with fixed preconditioner H0H_0H0​ reaches the minimizer in at most nnn steps.
  8. SQN and this PCG produce identical iterates and directions at every step.

Significance

The result shows that storing only mmm correction pairs costs nothing on quadratics: for any m≥1m \ge 1m≥1, SQN terminates in at most nnn steps, like full BFGS and conjugate gradients. It explains why L-BFGS with small mmm is competitive, and it is the model case for later analyses of limited-memory methods (their linear convergence on uniformly convex functions, and their relation to Krylov methods). Property (b) is the reason one expects efficiency to grow with mmm: the matrix satisfies the secant equation on the mmm most recent directions.

The claims are classical and generally accepted, but the paper argues them in a few lines ("it is straightforward to show"), deferring the PCG facts (15)–(16) to a reference. No machine-checked proof of the termination of BFGS, L-BFGS or preconditioned conjugate gradients is known to this mission. A formalization would provide a verified model of L-BFGS on quadratics and a reusable development of conjugate-direction methods with a preconditioner.

Difficulty

The obvious route, "SQN is BFGS and BFGS terminates", fails: SQN discards old corrections, so the classical BFGS argument (hereditary secant conditions on all past directions) does not apply once more than mmm steps have been taken. The paper asserts the identity of SQN with preconditioned conjugate gradients in one sentence ("using a similar argument as for the SCG"), and the PCG relations it relies on are quoted from a technical report. The other difficulty is bookkeeping: the window of stored pairs shifts, the matrix is a nested product, and the runs must remain meaningful after the minimizer is reached.

Formalization scope

Vectors are Fin n → ℝ, matrices Matrix (Fin n) (Fin n) ℝ, xTyx^T yxTy is dotProduct, and syTs y^TsyT is Matrix.vecMulVec. Symmetric positive definiteness is Matrix.PosDef. Indices are 0-based, as in the paper. The exact line search is the closed-form step −gTd/dTAd-g^T d / d^T A d−gTd/dTAd. The iterations have no stopping rule: once the gradient vanishes the direction and step are zero and the iterate stays at the minimizer (Lean's 0/0=00/0 = 00/0=0). Past that point the zero pair stored by SQN leaves the BFGS step unchanged. The hypotheses are exactly the paper's: A≻0A \succ 0A≻0, H0≻0H_0 \succ 0H0​≻0, m≥1m \ge 1m≥1 and exact line searches. H0H_0H0​ need not be diagonal.

Two misprints are corrected and flagged in the items: the denominator of β\betaβ in (13) is yi−1Tdi−1y_{i-1}^T d_{i-1}yi−1T​di−1​ (as in (12) and p. 778), and the second relation of (16) is stated for j<ij < ij<i (as used on p. 778), since it fails for i<ji < ji<j.

Ruled out: SQN is defined through its own matrices (4)–(5), rebuilt from H0H_0H0​ and the last mmm pairs. It is not defined through the PCG recurrence, not by one BFGS update of the previous matrix, and not with a stop rule that returns −A−1b-A^{-1}b−A−1b. The standing assumption ykTsk>0y_k^T s_k > 0ykT​sk​>0 is not a hypothesis of any statement about a run (it fails after termination and would make the goal vacuous). With m=0m = 0m=0 SQN is steepest descent and the goal is false, so m≥1m \ge 1m≥1 is required.

Needed infrastructure: algebra of rank-one updates and of Matrix.PosDef under congruence, conjugate-direction lemmas for quadratics, and the fact that n+1n+1n+1 mutually H0H_0H0​-orthogonal vectors in Rn\mathbb{R}^nRn include a zero vector. The PCG results (milestones 5–7) are reusable beyond this mission. Proofs of any milestone, or of the goal directly, are welcome.

Selected references

  • J. Nocedal, Updating Quasi-Newton Matrices with Limited Storage, Mathematics of Computation 35(151), 1980, 773–782. https://doi.org/10.1090/s0025-5718-1980-0572855-7
  • D. F. Shanno, Conjugate gradient methods with inexact searches, Mathematics of Operations Research 3(3), 1978, 244–256. https://doi.org/10.1287/moor.3.3.244
  • L. Nazareth, A Relationship Between the BFGS and Conjugate Gradient Algorithms, ANL-AMD Tech. Memo 282 (rev.), Argonne National Laboratory, 1977 (reference [7] of Nocedal 1980; no online copy located).
  • T. G. Kolda, D. P. O'Leary, L. Nazareth, BFGS with update skipping and varying memory, SIAM Journal on Optimization 8(4), 1998, 1060–1083. https://doi.org/10.1137/S1052623496306450
  • D. C. Liu, J. Nocedal, On the limited memory BFGS method for large scale optimization, Mathematical Programming 45, 1989, 503–528. https://doi.org/10.1007/BF01589116
16 thms3 active usersReviewed
🏆Completed
Numerical AnalysisOperations ResearchOptimization·Captain: mikedeng1

Methods of Conjugate Gradients for Solving Linear Systems II: Each Conjugate Gradient Step Shortens the Error VectorResearch Paper

Motivation

The conjugate gradient method (cg-method) of Hestenes and Stiefel is the standard iterative solver for linear systems Ax=kAx=kAx=k with a symmetric positive definite matrix AAA. It is used for the large sparse systems of finite-element and finite-difference discretizations, as the inner solver of Newton-type and interior-point methods in optimization, and as the prototype of the Krylov subspace methods. Its original 1952 paper (Hestenes and Stiefel, J. Res. NBS 49(6), 1952) already presented it as two things at once: a direct method that reaches the exact solution in at most nnn steps, and a method of successive approximations whose intermediate estimates are useful in their own right.

The second view needs a guarantee that the intermediate estimates actually approach the solution. The method is built to decrease the AAA-weighted error f(x)=(h−x,A(h−x))f(x)=(h-x,A(h-x))f(x)=(h−x,A(h−x)), and the residual ∣k−Axi∣|k-Ax_i|∣k−Axi​∣ need not decrease (Section 18 of the paper, p. 432, notes that it can increase at every step). Theorem 6:3 of the paper supplies the guarantee in the plain Euclidean length: the distance ∣h−xi∣|h-x_i|∣h−xi​∣ from the estimate to the solution decreases strictly at every step, by an exactly computable amount. This mission formalizes that theorem together with the relations from Sections 5 and 6 of the paper on which its proof rests.

Timeline:

  • 1952: Hestenes and Stiefel introduce the method and prove, in one paper, finite termination (Theorems 4:2 and 5:2), the monotone decrease of the error function fff (Theorem 6:1), and the monotone decrease of the Euclidean error (Theorem 6:3). The later literature on cg as an iterative method for large sparse systems takes these properties as its starting point.

Setting

Let AAA be a real n×nn\times nn×n matrix that is symmetric and positive definite, let k∈Rnk\in\mathbb{R}^nk∈Rn, and let hhh be the solution of Ah=kAh=kAh=k. Write (x,y)=x1y1+⋯+xnyn(x,y)=x_1y_1+\cdots+x_ny_n(x,y)=x1​y1​+⋯+xn​yn​ and ∣x∣2=(x,x)|x|^2=(x,x)∣x∣2=(x,x). From an arbitrary starting point x0x_0x0​, the cg-method (5:1) computes estimates xix_ixi​, residuals rir_iri​ and direction vectors pip_ipi​ by

p0=r0=k−Ax0,ai=∣ri∣2(pi,Api),xi+1=xi+aipi,ri+1=ri−aiApi,bi=∣ri+1∣2∣ri∣2,pi+1=ri+1+bipi.p_0=r_0=k-Ax_0,\quad a_i=\frac{|r_i|^2}{(p_i,Ap_i)},\quad x_{i+1}=x_i+a_ip_i,\quad r_{i+1}=r_i-a_iAp_i,\quad b_i=\frac{|r_{i+1}|^2}{|r_i|^2},\quad p_{i+1}=r_{i+1}+b_ip_i .p0​=r0​=k−Ax0​,ai​=(pi​,Api​)∣ri​∣2​,xi+1​=xi​+ai​pi​,ri+1​=ri​−ai​Api​,bi​=∣ri​∣2∣ri+1​∣2​,pi+1​=ri+1​+bi​pi​.

The error vector of xix_ixi​ is yi=h−xiy_i=h-x_iyi​=h−xi​. The error function (4:5) is f(x)=(h−x,A(h−x))f(x)=(h-x,A(h-x))f(x)=(h−x,A(h−x)), which is nonnegative and vanishes only at x=hx=hx=h. The Rayleigh quotient (4:12) of a vector z≠0z\neq 0z=0 is μ(z)=(z,Az)/∣z∣2\mu(z)=(z,Az)/|z|^2μ(z)=(z,Az)/∣z∣2. The Lean development names these cgIter A k x₀ i (with fields .x, .r, .p), cgAlpha for aia_iai​, errorFun A h x and rayleigh A z.

Formalization targets

Goal: Theorem 6:3

For every step that the method performs, that is, every iii with ri≠0r_i\neq 0ri​=0,

∣yi∣2−∣yi+1∣2=f(xi+1)+f(xi)μ(pi)and∣yi+1∣<∣yi∣.|y_i|^2-|y_{i+1}|^2=\frac{f(x_{i+1})+f(x_i)}{\mu(p_i)}\qquad\text{and}\qquad |y_{i+1}|<|y_i| .∣yi​∣2−∣yi+1​∣2=μ(pi​)f(xi+1​)+f(xi​)​and∣yi+1​∣<∣yi​∣.

The paper writes the step from xi−1x_{i-1}xi−1​ to xix_ixi​; the Lean statement shifts the index by one. The goal holds for every dimension nnn, every symmetric positive definite AAA, every kkk and every x0x_0x0​.

Milestones

  1. Theorems 4:2 and 5:2: some m≤nm\le nm≤n has xm=hx_m=hxm​=h.
  2. Theorem 5:3, (5:6a): (pi,pj)=∣rj∣2∣pi∣2/∣ri∣2(p_i,p_j)=|r_j|^2|p_i|^2/|r_i|^2(pi​,pj​)=∣rj​∣2∣pi​∣2/∣ri​∣2 for i≤ji\le ji≤j.
  3. Theorem 6:1, (6:1): f(xi)−f(xi+1)=ai∣ri∣2=μ(pi)∣xi−xi+1∣2f(x_i)-f(x_{i+1})=a_i|r_i|^2=\mu(p_i)|x_i-x_{i+1}|^2f(xi​)−f(xi+1​)=ai​∣ri​∣2=μ(pi​)∣xi​−xi+1​∣2.
  4. Theorem 6:1, (6:2): f(xi)−f(xj)=∑l=ij−1al∣rl∣2f(x_i)-f(x_j)=\sum_{l=i}^{j-1}a_l|r_l|^2f(xi​)−f(xj​)=∑l=ij−1​al​∣rl​∣2 for i<ji<ji<j.
  5. Section 6, (6:6): (yi+1,xi+1−xi)=f(xi+1)/μ(pi)(y_{i+1},x_{i+1}-x_i)=f(x_{i+1})/\mu(p_i)(yi+1​,xi+1​−xi​)=f(xi+1​)/μ(pi​).

Significance

The theorem is what makes an early stop of the cg-method safe in the norm a user usually cares about. Every intermediate estimate is closer to the solution, in Euclidean distance, than the previous one, and the identity (6:5) states by how much. It also separates the cg-method from methods that minimize the residual: the AAA-norm error, the Euclidean error and the residual behave differently, and only the first two are monotone along cg.

The results are proved in the 1952 paper. They have not been formalized: the Prove2Me library has no statement of the conjugate gradient recursion (5:1), and Mathlib has none either. What this mission adds is a machine-checked version of the paper's Section 6 argument for the recursion exactly as printed, including the case analysis at termination that the paper leaves implicit, and a reusable Lean definition of the cg iteration with its basic identities.

Difficulty

The obvious argument does not reach the conclusion. The method decreases f(x)=(y,Ay)f(x)=(y,Ay)f(x)=(y,Ay) at every step, but a decrease in this AAA-weighted norm does not imply a decrease in the Euclidean norm: for a single step along an arbitrary direction, even the best step for fff can lengthen the Euclidean error. So the theorem cannot be proved one step at a time from the local minimization property. It depends on how the current direction relates to all the later directions of the same run, and those relations in turn rest on the mutual orthogonality of the residuals and the conjugacy of the directions, which are established by an induction over the whole run.

A second difficulty is bookkeeping at the end of the run. The recursion divides by ∣ri∣2|r_i|^2∣ri​∣2 and by (pi,Api)(p_i,Ap_i)(pi​,Api​), which vanish after termination. Every milestone has to hold, or be guarded, past that point, and the goal needs the hypothesis ri≠0r_i\neq 0ri​=0 exactly because the strict inequality fails once xi=hx_i=hxi​=h.

Formalization scope

Vectors are Fin n → ℝ, the scalar product is dotProduct (⬝ᵥ), AxAxAx is Matrix.mulVec (*ᵥ), and the standing assumption is A.PosDef, which in Mathlib includes symmetry. The solution hhh is a variable with the hypothesis A *ᵥ h = k. Indices are 0-based. The cg recursion is the definition cgIter, which computes (5:1b)–(5:1f) literally and in order; it has no stopping rule, and Lean's convention t/0=0t/0=0t/0=0 makes it stay at hhh with ri=pi=0r_i=p_i=0ri​=pi​=0 once rm=0r_m=0rm​=0. Lengths appear squared, as (y,y)(y,y)(y,y). The milestones are stated for every index without a termination guard, because both sides of each identity vanish after termination; only the goal carries ri≠0r_i\neq 0ri​=0.

Two formalizations would trivialize the goal and are ruled out. The goal does not assume termination (xm=hx_m=hxm​=h) or any bound on iii: it quantifies over every cg run and every step that takes place. And it is about the Euclidean length ∣h−xi∣|h-x_i|∣h−xi​∣, not the error function fff (that is Theorem 6:1, a different and weaker statement) and not the residual.

A complete development needs Theorem 5:1 (orthogonality of residuals, conjugacy of directions) for the literal recursion, the identities (5:2) and (5:3c), and the positivity of (p,Ap)(p,Ap)(p,Ap) for p≠0p\neq 0p=0. These are reusable for any further work on the cg-method, including the sister mission on finite termination. Proofs of any milestone, and alternative proofs of Theorem 6:3 through the Krylov-subspace characterization, are welcome.

Selected references

  • M. R. Hestenes and E. Stiefel, Methods of Conjugate Gradients for Solving Linear Systems, J. Res. Natl. Bur. Stand. 49(6), 409–436, 1952. https://doi.org/10.6028/jres.049.044 (publisher's scan: https://nvlpubs.nist.gov/nistpubs/jres/049/jresv49n6p409_A1b.pdf)
9 thms3 active usersReviewed
🏆Completed
Numerical AnalysisOperations ResearchOptimization·Captain: mikedeng1

Methods of Conjugate Gradients for Solving Linear Systems I: Finite Termination of the Conjugate Gradient MethodResearch Paper

Motivation

Solving a linear system Ax=kAx = kAx=k with a large symmetric positive definite matrix AAA is a basic task of scientific computing: it arises from discretized elliptic equations, least-squares problems and the Newton steps of optimization methods. In 1952 Magnus Hestenes and Eduard Stiefel published the conjugate gradient method (cg-method) (J. Res. Natl. Bur. Stand. 49 (1952) 409–436). The method uses AAA only through matrix–vector products and stores a few vectors. The paper's abstract states its central property in one sentence: "The solution is given in nnn steps."

The paper obtains this property from a more general scheme, the method of conjugate directions (cd-method), which also contains Gaussian elimination as a special case. Its argument has two parts. Every cd-method with nonzero directions reaches the solution within nnn steps (Theorem 4:2). The cg-method is a cd-method (Theorem 5:2), which follows from the orthogonality and conjugacy relations of Theorem 5:1. This mission formalizes that chain.

Setting

Vectors are real nnn-tuples, with scalar product (x,y)=x1y1+⋯+xnyn(x, y) = x_1y_1 + \cdots + x_ny_n(x,y)=x1​y1​+⋯+xn​yn​ and squared length ∣x∣2=(x,x)|x|^2 = (x, x)∣x∣2=(x,x). The matrix AAA is real, n×nn \times nn×n, symmetric and positive definite, which is the paper's standing assumption (p. 410). The solution hhh satisfies Ah=kAh = kAh=k. The residual of an estimate xxx is r=k−Axr = k - Axr=k−Ax. Two vectors x,yx, yx,y are conjugate when (x,Ay)=0(x, Ay) = 0(x,Ay)=0.

The cg-method (eq. (3:1), p. 411) starts from an arbitrary estimate x0x_0x0​ and sets p0=r0=k−Ax0p_0 = r_0 = k - Ax_0p0​=r0​=k−Ax0​. Given xix_ixi​, rir_iri​, pip_ipi​, it computes

ai=∣ri∣2(pi,Api),xi+1=xi+aipi,ri+1=ri−aiApi,bi=∣ri+1∣2∣ri∣2,pi+1=ri+1+bipi.a_i = \frac{|r_i|^2}{(p_i, Ap_i)},\quad x_{i+1} = x_i + a_i p_i,\quad r_{i+1} = r_i - a_i Ap_i,\quad b_i = \frac{|r_{i+1}|^2}{|r_i|^2},\quad p_{i+1} = r_{i+1} + b_i p_i.ai​=(pi​,Api​)∣ri​∣2​,xi+1​=xi​+ai​pi​,ri+1​=ri​−ai​Api​,bi​=∣ri​∣2∣ri+1​∣2​,pi+1​=ri+1​+bi​pi​.

In Lean the iterates are cgIter A k x₀ i, a structure with fields x, r, p. The step length is cgA.

The cd-method (Section 4, p. 412) chooses an arbitrary first direction p0p_0p0​ and then sets xi+1=xi+aipix_{i+1} = x_i + a_i p_ixi+1​=xi​+ai​pi​ with ai=(pi,ri)/(pi,Api)a_i = (p_i, r_i)/(p_i, Ap_i)ai​=(pi​,ri​)/(pi​,Api​) and ri=k−Axir_i = k - Ax_iri​=k−Axi​. Each new direction pi+1p_{i+1}pi+1​ may be any vector conjugate to p0,…,pip_0, \dots, p_ip0​,…,pi​. Because the directions are free, a cd-run is a property of sequences: IsCDRun A k x r p.

Formalization targets

Goal: finite termination of the cg-method

For every nnn, every symmetric positive definite AAA, every kkk and hhh with Ah=kAh = kAh=k, and every initial estimate x0x_0x0​,

∃ m≤n:xm=h,\exists\, m \le n:\quad x_m = h,∃m≤n:xm​=h,

where xmx_mxm​ is the mmm-th cg iterate. This is the statement of the abstract and of Section 3 (p. 410): "one will reach an estimate xmx_mxm​ (m≤nm \le nm≤n) at which rm=0r_m = 0rm​=0. This estimate is the desired solution hhh."

Milestones

  1. Theorem 4:1 (p. 412). For every cd-run, the directions are mutually conjugate (4:3a). The residual rir_iri​ is orthogonal to p0,…,pi−1p_0, \dots, p_{i-1}p0​,…,pi−1​ (4:3b). The products (pi,rj)(p_i, r_j)(pi​,rj​) are the same for all j≤ij \le ij≤i (4:3c). Hence ai=(pi,r0)/(pi,Api)a_i = (p_i, r_0)/(p_i, Ap_i)ai​=(pi​,r0​)/(pi​,Api​) (4:4).
  2. Theorem 4:2 (p. 412). Every cd-run whose directions p0,…,pn−1p_0, \dots, p_{n-1}p0​,…,pn−1​ are nonzero has xm=hx_m = hxm​=h for some m≤nm \le nm≤n.
  3. Theorem 5:1 (p. 414), in four items. For the cg-method:
    • (5:3a) (ri,rj)=0(r_i, r_j) = 0(ri​,rj​)=0 for i≠ji \ne ji=j;
    • (5:3b) (pi,Apj)=0(p_i, Ap_j) = 0(pi​,Apj​)=0 for i≠ji \ne ji=j;
    • (5:3c) (pi,rj)=0(p_i, r_j) = 0(pi​,rj​)=0 for i<ji < ji<j and (pi,rj)=∣ri∣2(p_i, r_j) = |r_i|^2(pi​,rj​)=∣ri​∣2 for i≥ji \ge ji≥j;
    • (5:3d) (ri,Api)=(pi,Api)(r_i, Ap_i) = (p_i, Ap_i)(ri​,Api​)=(pi​,Api​), and (ri,Apj)=0(r_i, Ap_j) = 0(ri​,Apj​)=0 for i≠j,j+1i \ne j, j + 1i=j,j+1.
  4. Theorem 5:5, eq. (5:10) (p. 416):
ai=∣ri∣2(pi,Api)=(pi,ri)(pi,Api)=(pi,r0)(pi,Api).a_i = \frac{|r_i|^2}{(p_i, Ap_i)} = \frac{(p_i, r_i)}{(p_i, Ap_i)} = \frac{(p_i, r_0)}{(p_i, Ap_i)}.ai​=(pi​,Api​)∣ri​∣2​=(pi​,Api​)(pi​,ri​)​=(pi​,Api​)(pi​,r0​)​.
  1. Theorem 5:2, first sentence (p. 415). The cg-method is a cd-method: its iterates satisfy IsCDRun.

Significance

Finite termination is the property that distinguishes the conjugate gradient method from stationary iterations such as Jacobi or Gauss–Seidel. It explains why the method can be used as a direct solver in exact arithmetic. It is the starting point for the later theory of Krylov subspace methods. The relations of Theorem 5:1 are the checks the paper recommends for monitoring a computation (eq. (3:3)). They are also the input to the paper's further results on the monotone decrease of the error (Section 6) and on the connection with orthogonal polynomials (Sections 14–18).

The result has been proved since 1952 and appears in every numerical linear algebra textbook. As far as a search of the Prove2Me catalog shows (September 2026), it has no machine-checked proof there. The only conjugate gradient material on the platform is a Hilbert-space convergence result for a different recurrence. This mission adds a faithful formal version of the original recursion (3:1) and of the cd-method. It also adds the complete termination argument, organized as in the paper. The definitions and the Theorem 5:1 relations are reusable by any later formalization of Krylov methods, including the second mission of this series on the decrease of the error ∣h−xi∣|h - x_i|∣h−xi​∣.

Difficulty

The obvious argument says that the residuals are mutually orthogonal, so at most nnn of them are nonzero. That argument is only as good as the orthogonality, and Theorem 5:1 must be established by a simultaneous induction over four families of relations. The recursion defines ri+1r_{i+1}ri+1​ by an update, not as k−Axi+1k - Ax_{i+1}k−Axi+1​, so even ri=k−Axir_i = k - Ax_iri​=k−Axi​ needs a proof. Orthogonality of ri+1r_{i+1}ri+1​ to the earlier residuals needs the conjugacy of the earlier directions, and conjugacy of pi+1p_{i+1}pi+1​ needs the orthogonality of the earlier residuals. Neither family can be proved first.

A second obstacle is the passage from orthogonality to termination. A cd-run with a zero direction stalls, so Theorem 4:2 needs the directions p0,…,pn−1p_0, \dots, p_{n-1}p0​,…,pn−1​ to be nonzero. The cg directions become zero exactly when the solution is reached, so applying Theorem 4:2 to cg needs a case split at the first vanishing residual.

Formalization scope

Vectors are Fin n → ℝ, the scalar product is dotProduct (⬝ᵥ), and AxAxAx is Matrix.mulVec (*ᵥ). The hypothesis on AAA is Mathlib's Matrix.PosDef, which includes symmetry. The solution enters only through the hypothesis A *ᵥ h = k. Indices are 0-based, as in the paper.

The cg iteration is total and has no stopping test. Once rm=0r_m = 0rm​=0, Lean's convention x/0=0x/0 = 0x/0=0 gives pm=0p_m = 0pm​=0 and am=0a_m = 0am​=0. From then on the iteration stays at xmx_mxm​, with zero residuals and directions. For this reason the relations of Theorem 5:1 are stated for all indices without guards: after termination they hold trivially.

Two formulations would make the goal trivial, and neither is used. One is a stopping test or step that refers to hhh or to A−1kA^{-1}kA−1k. The other replaces (3:1b), (3:1d) or (3:1e) by the equivalent formulas (3:2a), (3:2b) or ri+1=k−Axi+1r_{i+1} = k - Ax_{i+1}ri+1​=k−Axi+1​, which would move Theorem 5:5 and part of Theorem 5:2 into the definition. The iteration is (3:1) literally.

The cd-method's implicit hypothesis, that the directions p0,…,pn−1p_0, \dots, p_{n-1}p0​,…,pn−1​ are nonzero, is an explicit binder of Theorem 4:2. Without it the statement fails (take p0=0p_0 = 0p0​=0). The hypothesis is satisfiable: the cg run with nonzero residuals is one example.

A complete development needs the standard facts that mutually conjugate nonzero vectors are linearly independent and that nnn independent vectors span Rn\mathbb{R}^nRn. It also needs the induction behind Theorem 5:1. Contributions welcome beyond the milestones include the converse half of Theorem 5:2, the relation (5:2) expressing pkp_kpk​ through r0,…,rkr_0, \dots, r_kr0​,…,rk​, and Theorem 4:5 (the cd-method computes A−1A^{-1}A−1).

Selected references

  • M. R. Hestenes and E. Stiefel, Methods of Conjugate Gradients for Solving Linear Systems, Journal of Research of the National Bureau of Standards 49(6), 409–436, 1952. https://doi.org/10.6028/jres.049.044
  • L. Fox, H. D. Huskey and J. H. Wilkinson, Notes on the solution of algebraic linear simultaneous equations, Quarterly Journal of Mechanics and Applied Mathematics 1(1), 149–173, 1948 (the cd-method from a different point of view; cited in the paper's Section 4 footnote). https://doi.org/10.1093/qjmam/1.1.149
  • G. H. Golub and C. F. Van Loan, Matrix Computations, 4th ed., Johns Hopkins University Press, 2013, §11.3 (textbook account of the method).
11 thms3 active usersReviewed
🏆Completed
EconomicsOperations ResearchOptimization+1·Captain: Shuze Chen

Modeling, Measuring and Managing Risk XI: The Mean-Variance Efficient Portfolio in Closed FormTextbook

Why mean-variance portfolios

An investor who splits a budget across MMM risky assets faces a trade-off between expected return and risk. Markowitz proposed measuring risk by the variance of the portfolio return and selecting, for each required expected return, the portfolio of least variance (Markowitz 1952). Tobin added a risk-free asset (Tobin 1958), and Sharpe, Lintner and Mossin turned the resulting one-fund structure into the capital asset pricing model (CAPM), whose beta equation is still the standard first model of expected returns in finance (Sharpe 1964).

This mission formalizes the closed-form part of that theory as presented in §4.2.3 of Pflug and Römisch, Modeling, Measuring and Managing Risk (World Scientific 2007, doi:10.1142/6478), pp. 189–195: the explicit efficient portfolio without a risk-free asset (Proposition 4.8), the solution with a risk-free asset (Proposition 4.9), and the CAPM equation with its variance bound (Proposition 4.10).

Setting

Let (Ω,F,P)(\Omega,\mathcal F,\mathbb P)(Ω,F,P) be a probability space and ξ=(ξ(1),…,ξ(M))\xi=(\xi^{(1)},\dots,\xi^{(M)})ξ=(ξ(1),…,ξ(M)) a random vector of returns, each coordinate with a finite second moment. Returns are profits: larger is better. The vector of expected returns is r=Eξr=\mathbb E\xir=Eξ and the covariance matrix is the M×MM\times MM×M matrix CCC with Cij=Cov(ξ(i),ξ(j))C_{ij}=\mathbb{C}\mathrm{ov}(\xi^{(i)},\xi^{(j)})Cij​=Cov(ξ(i),ξ(j)); it is symmetric and positive semidefinite. A portfolio is a weight vector x∈RMx\in\mathbb R^Mx∈RM (negative weights, i.e. short positions, are allowed) with return Yx=∑mxmξ(m)Y_x=\sum_m x_m\xi^{(m)}Yx​=∑m​xm​ξ(m), so that E(Yx)=r⊤x\mathbb E(Y_x)=r^\top xE(Yx​)=r⊤x and Var(Yx)=x⊤Cx\mathbb{V}\mathrm{ar}(Y_x)=x^\top CxVar(Yx​)=x⊤Cx. Write 1\mathbb 11 for the all-ones vector.

The CAPM problem without a risk-free asset fixes a required return μ\muμ and asks for

minimize x⊤Cxsubject tor⊤x=μ,  1⊤x=1.(4.20)\text{minimize } x^\top Cx\quad\text{subject to}\quad r^\top x=\mu,\ \ \mathbb 1^\top x=1. \tag{4.20}minimize x⊤Cxsubject tor⊤x=μ,  1⊤x=1.(4.20)

With a risk-free asset of constant return r0r_0r0​, a portfolio is a pair (x0,x~)(x_0,\tilde x)(x0​,x~), where x0x_0x0​ is the holding of the risk-free asset and x~\tilde xx~ the holdings of the risky assets ξ~\tilde\xiξ~​, with mean r~\tilde rr~ and covariance C~\tilde CC~. Its return is Yx=x0r0+x~⊤ξ~Y_x=x_0r_0+\tilde x^\top\tilde\xiYx​=x0​r0​+x~⊤ξ~​, and the problem is

minimize 12x~⊤C~x~subject tor~⊤x~+r0x0=μ,  1M⊤x~+x0=1.(4.23)\text{minimize } \tfrac12\tilde x^\top\tilde C\tilde x\quad\text{subject to}\quad \tilde r^\top\tilde x+r_0x_0=\mu,\ \ \mathbb 1_M^\top\tilde x+x_0=1. \tag{4.23}minimize 21​x~⊤C~x~subject tor~⊤x~+r0​x0​=μ,  1M⊤​x~+x0​=1.(4.23)

A portfolio is efficient if it solves the respective problem for some μ\muμ. The market portfolio x+x_+x+​ holds nothing in the risk-free asset and C~−1(r~−r01)/1⊤C~−1(r~−r01)\tilde C^{-1}(\tilde r-r_0\mathbb 1)/\mathbb 1^\top\tilde C^{-1}(\tilde r-r_0\mathbb 1)C~−1(r~−r0​1)/1⊤C~−1(r~−r0​1) in the risky ones; Y+Y_+Y+​ is its return, μ+=E(Y+)\mu_+=\mathbb E(Y_+)μ+​=E(Y+​) and σ+2=Var(Y+)\sigma_+^2=\mathbb{V}\mathrm{ar}(Y_+)σ+2​=Var(Y+​).

Formalization targets

Goal: Proposition 4.8, the efficient portfolio in closed form

Assume CCC is invertible and rrr is not a multiple of 1\mathbb 11. With

a=r⊤C−1r,b=r⊤C−11,c=1⊤C−11,d=ac−b2,(4.22)a=r^\top C^{-1}r,\quad b=r^\top C^{-1}\mathbb 1,\quad c=\mathbb 1^\top C^{-1}\mathbb 1,\quad d=ac-b^2, \tag{4.22}a=r⊤C−1r,b=r⊤C−11,c=1⊤C−11,d=ac−b2,(4.22)

the unique solution of (4.20) is

x∗(μ)=μ[cdC−1r−bdC−11]+[adC−11−bdC−1r],(4.21)x^*(\mu)=\mu\Big[\frac cd C^{-1}r-\frac bd C^{-1}\mathbb 1\Big]+\Big[\frac ad C^{-1}\mathbb 1-\frac bd C^{-1}r\Big], \tag{4.21}x∗(μ)=μ[dc​C−1r−db​C−11]+[da​C−11−db​C−1r],(4.21)

any two efficient portfolios for different returns span all efficient portfolios by affine combinations (the Two Fund Theorem in this model), and

E(Yμ)=μ,Var(Yμ)=μ2c−2μb+ad.\mathbb E(Y_\mu)=\mu,\qquad \mathbb{V}\mathrm{ar}(Y_\mu)=\frac{\mu^2c-2\mu b+a}{d}.E(Yμ​)=μ,Var(Yμ​)=dμ2c−2μb+a​.

The efficient frontier is therefore a parabola in the (variance, mean) plane.

Milestones and further results

Propositions 4.10 (i) and (ii) are milestones; Proposition 4.9 is a further item of the mission on which they stand.

  1. Proposition 4.9. If C~\tilde CC~ is invertible and r~≠r01\tilde r\ne r_0\mathbb 1r~=r0​1, then with q=(r~−r01)⊤C~−1(r~−r01)q=(\tilde r-r_0\mathbb 1)^\top\tilde C^{-1}(\tilde r-r_0\mathbb 1)q=(r~−r0​1)⊤C~−1(r~−r0​1) the unique solution of (4.23) is
x∗(μ)=1q((r~−μ1)⊤C~−1(r~−r01)(μ−r0)C~−1(r~−r01)),x^*(\mu)=\frac1q\begin{pmatrix}(\tilde r-\mu\mathbb 1)^\top\tilde C^{-1}(\tilde r-r_0\mathbb 1)\\(\mu-r_0)\tilde C^{-1}(\tilde r-r_0\mathbb 1)\end{pmatrix},x∗(μ)=q1​((r~−μ1)⊤C~−1(r~−r0​1)(μ−r0​)C~−1(r~−r0​1)​),

and, when 1⊤C~−1(r~−r01)≠0\mathbb 1^\top\tilde C^{-1}(\tilde r-r_0\mathbb 1)\ne01⊤C~−1(r~−r0​1)=0, every efficient portfolio is an affine combination of (1,0,…,0)(1,0,\dots,0)(1,0,…,0) and x+x_+x+​. 2. Proposition 4.10 (i), the CAPM equation (4.25). For every portfolio with x0+1⊤x~=1x_0+\mathbb 1^\top\tilde x=1x0​+1⊤x~=1,

E(Yx)=r0+β(x)(μ+−r0),β(x)=Cov(Yx,Y+)Var(Y+).\mathbb E(Y_x)=r_0+\beta(x)(\mu_+-r_0),\qquad \beta(x)=\frac{\mathbb{C}\mathrm{ov}(Y_x,Y_+)}{\mathbb{V}\mathrm{ar}(Y_+)}.E(Yx​)=r0​+β(x)(μ+​−r0​),β(x)=Var(Y+​)Cov(Yx​,Y+​)​.
  1. Proposition 4.10 (ii). For every such portfolio
Var(Yx)≥(E(Yx)−r0μ+−r0)2σ+2,\mathbb{V}\mathrm{ar}(Y_x)\ge\Big(\frac{\mathbb E(Y_x)-r_0}{\mu_+-r_0}\Big)^2\sigma_+^2,Var(Yx​)≥(μ+​−r0​E(Yx​)−r0​​)2σ+2​,

with equality if and only if the portfolio is efficient, and, as printed, if and only if Corr(Yx,Y+)=1\mathbb{C}\mathrm{orr}(Y_x,Y_+)=1Corr(Yx​,Y+​)=1.

Significance

Proposition 4.8 is the explicit description of the mean-variance efficient set: the efficient portfolios form a line in weight space, and the minimal variance is a quadratic function of the required return. Proposition 4.9 shows that a risk-free asset turns this line into one through the risk-free portfolio (the one-fund, or separation, property), and Proposition 4.10 derives from it the CAPM relation between a portfolio's expected excess return and its beta, together with the capital-market-line bound. These are the statements on which the later sections of the chapter, and most textbook treatments of portfolio theory, build: risk-return diagrams, the market portfolio, beta as a risk measure.

The results are classical and their proofs are elementary, but they are not in Mathlib, and no Prove2Me item states them; the closest platform item is the multi-period mean-variance mutual fund theorem of Bäuerle and Rieder (MDPFinance.MeanVariance.mutual_fund_theorem), a different, dynamic statement. A formalization makes the hypotheses explicit that the printed proofs leave implicit (invertibility and nondegeneracy conditions, the budget constraint behind "any portfolio") and checks the printed equality conditions, one of which is false as stated.

Difficulty

The Lagrange conditions of the printed proof are necessary conditions only. Turning them into the statement requires showing that the stationary point is the global minimizer and the only one, which uses positive definiteness of CCC; the hypothesis gives only invertibility, and positive definiteness has to come from CCC being a covariance matrix. Dividing by ddd needs d>0d>0d>0, which is not among the hypotheses and must be derived from "rrr is not a multiple of 1\mathbb 11" together with the structure of CCC. The variance identities require computing variances and covariances of linear combinations of square-integrable random variables. In Proposition 4.10 (ii) the equality case is where the printed statement goes wrong: a portfolio short in the market portfolio attains equality with correlation −1-1−1.

Formalization scope

All statements live in the namespace RiskFunctionals.Frontier. Assets are indexed by Fin M; vectors are Fin M → ℝ, matrices Matrix (Fin M) (Fin M) ℝ, and C−1C^{-1}C−1 is Mathlib's matrix inverse. The mean vector and covariance matrix are computed from a random vector with MemLp 2 coordinates on a probability space using Mathlib's covariance and variance, so "CCC invertible" is the printed hypothesis and positive definiteness is a consequence, not an assumption. "The solution" is stated as existence and uniqueness of a global minimizer on the feasible set (IsSolution420, IsSolution423). The divisions by qqq, by 1⊤C~−1(r~−r01)\mathbb 1^\top\tilde C^{-1}(\tilde r-r_0\mathbb 1)1⊤C~−1(r~−r0​1) and by ddd are guarded by the printed or implicit nondegeneracy hypotheses; a statement in which d=0d=0d=0 or q=0q=0q=0 were allowed would make the closed forms the zero vector, so these guards are part of the statement rather than conveniences. The correlation is used only where the portfolio variance is positive, since it is undefined otherwise.

Beyond the paper. One variant item is posed beside the faithful statements: capm_variance_bound_corrected (corrected, finding F4) replaces the equality condition Corr(Yx,Y+)=1\mathbb{C}\mathrm{orr}(Y_x,Y_+)=1Corr(Yx​,Y+​)=1 of Proposition 4.10 (ii) by ∣Corr(Yx,Y+)∣=1|\mathbb{C}\mathrm{orr}(Y_x,Y_+)|=1∣Corr(Yx​,Y+​)∣=1; with one risky asset of mean 2 and variance 1, r0=1r_0=1r0​=1 and x=(2,−1)x=(2,-1)x=(2,−1), equality holds while the correlation is −1-1−1. The faithful Proposition 4.10 (ii) is therefore expected to be disproved.

A complete development needs the variance and covariance of finite linear combinations of L2L^2L2 random variables, positive semidefiniteness of covariance matrices, and the minimization of a positive definite quadratic form under linear equality constraints. These are reusable well beyond this mission; proofs of them as separate lemmas are welcome.

Selected references

  • G. Ch. Pflug and W. Römisch, Modeling, Measuring and Managing Risk, World Scientific, 2007, §4.2.3, pp. 189–195. https://doi.org/10.1142/6478
  • H. Markowitz, Portfolio Selection, Journal of Finance 7(1), 77–91, 1952. https://doi.org/10.2307/2975974
  • J. Tobin, Liquidity Preference as Behavior Towards Risk, Review of Economic Studies 25(2), 65–86, 1958. https://doi.org/10.2307/2296205
  • W. F. Sharpe, Capital Asset Prices: A Theory of Market Equilibrium under Conditions of Risk, Journal of Finance 19(3), 425–442, 1964. https://doi.org/10.1111/j.1540-6261.1964.tb02865.x
  • R. C. Merton, An Analytic Derivation of the Efficient Portfolio Frontier, Journal of Financial and Quantitative Analysis 7(4), 1851–1872, 1972. https://doi.org/10.2307/2329621
4 thms2 active usersReviewed
🏆Completed
Graph TheoryMachine Learning·Captain: mikedeng1

Geometric Deep Learning V: A Degree-r Polynomial Filter Σ αₖΔᵏX of a Graph Laplacian Is Localised in r-Hop NeighbourhoodsTextbook

Motivation

Graph neural networks and geometric learning on meshes rely on operators that combine the features of a node with those of its neighbours. The graph Laplacian is the oldest such operator: it is the discrete analogue of the Laplace–Beltrami operator of a surface, and its eigenvectors play the role of a Fourier basis on a graph. Early spectral graph networks (Bruna et al., 2013) learned filters directly in that eigenbasis. Such filters are expensive, since they need an eigendecomposition, and they do not transfer between graphs. Defferrard, Bresson and Vandergheynst (2016) replaced them with polynomial filters p^(Δ)X=∑k=0rαkΔkX\hat p(\Delta)X=\sum_{k=0}^r\alpha_k\Delta^kXp^​(Δ)X=∑k=0r​αk​ΔkX. These are computed with rrr sparse matrix products, and their output at a node depends only on a bounded neighbourhood of that node.

This mission formalizes Section 4.6 of the book Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges by Bronstein, Bruna, Cohen and Veličković (arXiv:2104.13478v2). The section introduces the weighted Laplacian (24) and the spectral and polynomial filters built on it, and states that a polynomial filter of degree rrr is localised in the rrr-hop neighbourhood. The section closes with the view of meshes as operators QQQ, which leads to remeshing invariance and to the result of Wang et al. (2019a) that remeshing-invariant functions depend only on the spectrum. The book numbers no theorems, lemmas or definitions, so every item of this mission is cited by section, equation number and printed page.

Setting

There are nnn nodes {1,…,n}\{1,\dots,n\}{1,…,n}. A weight matrix W=(wuv)∈Rn×nW=(w_{uv})\in\mathbb R^{n\times n}W=(wuv​)∈Rn×n assigns a weight to each ordered pair of nodes. The neighbourhood of uuu is Nu={v:wuv≠0}\mathcal N_u=\{v: w_{uv}\ne0\}Nu​={v:wuv​=0}. Node features form a matrix X∈Rn×dX\in\mathbb R^{n\times d}X∈Rn×d whose row xux_uxu​ is the ddd-dimensional feature vector of node uuu.

The degree of uuu is du=∑vwuvd_u=\sum_v w_{uv}du​=∑v​wuv​, and the degree matrix is D=diag⁡(d1,…,dn)D=\operatorname{diag}(d_1,\dots,d_n)D=diag(d1​,…,dn​). The Laplacian is

Δ=D−W,(ΔX)u=∑v∈Nuwuv(xu−xv).(24)\Delta=D-W,\qquad (\Delta X)_u=\sum_{v\in\mathcal N_u}w_{uv}(x_u-x_v).\tag{24}Δ=D−W,(ΔX)u​=v∈Nu​∑​wuv​(xu​−xv​).(24)

The graph is undirected when W=W⊤W=W^\topW=W⊤; then Δ\DeltaΔ is symmetric and has an orthonormal eigenbasis Φ=(φ1,…,φn)\Phi=(\varphi_1,\dots,\varphi_n)Φ=(φ1​,…,φn​) with Δ=ΦΛΦ⊤\Delta=\Phi\Lambda\Phi^\topΔ=ΦΛΦ⊤ and Λ=diag⁡(λ1,…,λn)\Lambda=\operatorname{diag}(\lambda_1,\dots,\lambda_n)Λ=diag(λ1​,…,λn​). The Fourier coefficients of XXX are X^=Φ⊤X\hat X=\Phi^\top XX^=Φ⊤X.

Given a degree rrr and real coefficients α0,…,αr\alpha_0,\dots,\alpha_rα0​,…,αr​, the polynomial filter is

p^(Δ)X=∑k=0rαkΔkX,p^(λ)=∑k=0rαkλk.\hat p(\Delta)X=\sum_{k=0}^r\alpha_k\Delta^kX ,\qquad \hat p(\lambda)=\sum_{k=0}^r\alpha_k\lambda^k .p^​(Δ)X=k=0∑r​αk​ΔkX,p^​(λ)=k=0∑r​αk​λk.

Hops are measured in a simple graph GGG on the nodes that carries the weights: wuv≠0w_{uv}\ne0wuv​=0 with u≠vu\ne vu=v implies that uuu and vvv are adjacent. A node vvv is within rrr hops of uuu if some walk in GGG from uuu to vvv has length at most rrr.

A permutation σ\sigmaσ of the nodes acts by its permutation matrix PPP, with (PX)u=xσ−1(u)(PX)_u=x_{\sigma^{-1}(u)}(PX)u​=xσ−1(u)​ and W↦PWP⊤W\mapsto PWP^\topW↦PWP⊤. A function fff of n×nn\times nn×n matrices QQQ is remeshing invariant if f(CQC⊤)=f(Q)f(CQC^\top)=f(Q)f(CQC⊤)=f(Q) for every orthogonal C∈O(n)C\in O(n)C∈O(n). A matrix-valued FFF is remeshing equivariant if CF(Q)=F(CQC⊤)CF(Q)=F(CQC^\top)CF(Q)=F(CQC⊤).

Formalization targets

Goal: locality of polynomial filters (p. 65)

If XXX and X′X'X′ agree at every node within rrr hops of uuu, then

(∑k=0rαkΔkX)u=(∑k=0rαkΔkX′)u\Big(\sum_{k=0}^r\alpha_k\Delta^kX\Big)_u=\Big(\sum_{k=0}^r\alpha_k\Delta^kX'\Big)_u(k=0∑r​αk​ΔkX)u​=(k=0∑r​αk​ΔkX′)u​

for every choice of α0,…,αr\alpha_0,\dots,\alpha_rα0​,…,αr​. This is the book's sentence "since the Laplacian is local, a polynomial filter of degree rrr is localised in rrr-hop neighbourhood". The statement fixes no coefficients and no graph family.

Milestones

  1. (24), p. 62. (ΔX)u=∑v∈Nuwuv(xu−xv)=duxu−∑v∈Nuwuvxv(\Delta X)_u=\sum_{v\in\mathcal N_u}w_{uv}(x_u-x_v)=d_ux_u-\sum_{v\in\mathcal N_u}w_{uv}x_v(ΔX)u​=∑v∈Nu​​wuv​(xu​−xv​)=du​xu​−∑v∈Nu​​wuv​xv​. The matrix D−WD-WD−W is the local difference operator.
  2. p. 62. F(X)=ΔXF(X)=\Delta XF(X)=ΔX is permutation equivariant: Δ(PWP⊤)(PX)=P Δ(W)X\Delta(PWP^\top)(PX)=P\,\Delta(W)XΔ(PWP⊤)(PX)=PΔ(W)X.
  3. Side-note, p. 64. If W=W⊤W=W^\topW=W⊤, then Δ\DeltaΔ is symmetric and Δ=ΦΛΦ⊤\Delta=\Phi\Lambda\Phi^\topΔ=ΦΛΦ⊤ with Φ\PhiΦ orthogonal.
  4. p. 64. If Δ=ΦΛΦ⊤\Delta=\Phi\Lambda\Phi^\topΔ=ΦΛΦ⊤, then ∑kαkΔkX=Φdiag⁡(p^(λ1),…,p^(λn))X^\sum_k\alpha_k\Delta^kX=\Phi\operatorname{diag}(\hat p(\lambda_1),\dots,\hat p(\lambda_n))\hat X∑k​αk​ΔkX=Φdiag(p^​(λ1​),…,p^​(λn​))X^.

Companions (p. 67)

  • The result of Wang et al. (2019a): if Q=VΛV⊤Q=V\Lambda V^\topQ=VΛV⊤ with VVV orthogonal, then f(Q)=f(Λ)f(Q)=f(\Lambda)f(Q)=f(Λ) for a remeshing-invariant fff, and F(Q)=VF(Λ)F(Q)=VF(\Lambda)F(Q)=VF(Λ) for a remeshing-equivariant FFF.
  • A remeshing-invariant fff takes equal values on symmetric matrices with the same characteristic polynomial.
  • Permutation matrices satisfy P⊤P=IP^\top P=IP⊤P=I, so remeshing invariance implies permutation invariance and equivariance.

Significance

The result. Locality is what separates polynomial filters from general spectral filters. A spectral filter Φp^(Λ)Φ⊤\Phi\hat p(\Lambda)\Phi^\topΦp^​(Λ)Φ⊤ with an arbitrary transfer function p^\hat pp^​ is a dense matrix: every output depends on every input. A degree-rrr polynomial filter has support inside the rrr-hop neighbourhood, so it costs rrr sparse matrix products and has a receptive field controlled by rrr. Milestone 4 shows that the same object is also a spectral filter, with transfer function p^\hat pp^​. A polynomial filter is therefore both a spectral filter and a message-passing operation. The book's discussion of rational filters on the same page, which have exponential decay but no local support, uses this contrast. The remeshing companions give the reason spectral constructions are used across different meshes: a remeshing-invariant function of the operator sees only the spectrum.

The formalization. The mathematics is classical, and the mission is about formalizing it. Mathlib has the unweighted combinatorial Laplacian SimpleGraph.lapMatrix and the spectral theorem for Hermitian matrices. The platform has a proved theorem counting walks with powers of an unweighted adjacency matrix. Neither gives the support of powers of a weighted Laplacian, whose nonzero diagonal is not covered by walk counts of a fixed length. None of the statements here is formalized on the platform. The mission produces a reusable support lemma for matrix polynomials of a graph-supported matrix, and a link between spectral and polynomial filters in the matrix language used by graph neural networks.

Difficulty

A first attempt identifies (Δk)uv(\Delta^k)_{uv}(Δk)uv​ with a count of walks of length exactly kkk, as for the adjacency matrix. That identification fails here. Δ\DeltaΔ has the diagonal entries dud_udu​, so (Δk)uv(\Delta^k)_{uv}(Δk)uv​ sums over walks that may pause at a node, and it can be nonzero for vvv at any distance up to kkk. The claim is therefore "within at most kkk hops", and the induction has to track walks of length at most kkk through a matrix with nonzero diagonal. Two encodings make the claim easy and wrong. Mathlib's SimpleGraph.dist is 000 for unreachable pairs, so "dist⁡(u,v)≤r\operatorname{dist}(u,v)\le rdist(u,v)≤r" would place every unreachable node inside the neighbourhood. A filter defined through the eigendecomposition is not visibly local, so the locality statement has to be about ∑kαkΔk\sum_k\alpha_k\Delta^k∑k​αk​Δk itself. For the companions, the difficulty is the spectral theorem and the fact that two symmetric matrices with the same characteristic polynomial are orthogonally similar, which requires matching eigenvalue lists up to a permutation.

Formalization scope

Matrices are Matrix (Fin n) (Fin n) ℝ, and features are Matrix (Fin n) (Fin d) ℝ, with rows as nodes. The Laplacian is the published definition SpectralSparsify.Sampling.lapMat (degree matrix minus weight matrix), referenced rather than redefined and used under the local name lap. It imposes no condition on WWW. A diagonal weight wuuw_{uu}wuu​ cancels in D−WD-WD−W. Symmetry W=W⊤W=W^\topW=W⊤ is assumed only where the book needs it: the side-note on p. 64. The polynomial filter is the explicit sum ∑k=0rαkΔk\sum_{k=0}^r\alpha_k\Delta^k∑k=0r​αk​Δk with coefficients indexed by {0,…,r}\{0,\dots,r\}{0,…,r}. "Within rrr hops" is the existence of a walk of length at most rrr in a simple graph GGG that contains the support of WWW. The goal is stated for every such GGG and for non-symmetric WWW. Both are generalisations of the book's undirected setting, where GGG is the graph of WWW. Permutation matrices act by moving row σ−1(u)\sigma^{-1}(u)σ−1(u) to row uuu. Remeshing invariance quantifies over all of Mathlib's orthogonalGroup. "The same spectrum" is equality of characteristic polynomials of symmetric matrices.

A trivializing formalization is ruled out: the filter is not defined through an eigendecomposition, "localised" is not defined as "is a polynomial in Δ\DeltaΔ", and the hop condition is not stated through the junk-valued SimpleGraph.dist.

A complete development needs the support of products of graph-supported matrices, the spectral theorem in orthogonal form (Mathlib's Matrix.IsHermitian.eigenvectorUnitary), and orthogonal similarity of symmetric matrices with equal characteristic polynomials. The support lemma is reusable for any message-passing operator that is a polynomial in a local matrix. Contributions of these lemmas, and alternative proofs (for example through Polynomial.aeval), are welcome.

Selected references

  • M. M. Bronstein, J. Bruna, T. Cohen, P. Veličković, Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges, arXiv preprint, 2021, §4.6, pp. 62–67. https://arxiv.org/abs/2104.13478
  • M. Defferrard, X. Bresson, P. Vandergheynst, Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering, NeurIPS, 2016. https://arxiv.org/abs/1606.09375
  • J. Bruna, W. Zaremba, A. Szlam, Y. LeCun, Spectral Networks and Locally Connected Networks on Graphs, ICLR, 2014. https://arxiv.org/abs/1312.6203
  • R. Levie, F. Monti, X. Bresson, M. M. Bronstein, CayleyNets: Graph Convolutional Neural Networks with Complex Rational Spectral Filters, IEEE Trans. Signal Processing, 2018. https://arxiv.org/abs/1705.07664
  • Y. Wang, V. Kim, M. Bronstein, J. Solomon, Learning Geometric Operators on Meshes, ICLR Workshops, 2019 (the book's "Wang et al. 2019a"; no arXiv version is listed in the book's bibliography, PDF p. 157 of https://arxiv.org/abs/2104.13478v2).
8 thms2 active usersReviewed
🏆Completed
CombinatoricsMachine Learning·Captain: mikedeng1

Geometric Deep Learning II: Every Linear Permutation-Equivariant Map on ℝⁿ Is a Linear Combination of the Identity and the Averaging Map (1/n)𝟙𝟙ᵀTextbook

Motivation

Many learning problems take an unordered collection as input: the points of a point cloud, the particles of a physical system, the atoms of a molecule, the nodes of a graph. Storing such data in memory fixes an order of the elements, but the order carries no information, and a model whose output changes when the rows of its input are shuffled is answering a different question from the one posed. Bronstein, Bruna, Cohen and Veličković, Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges (arXiv:2104.13478v2, 2021), §4.1, make this the first instance of their blueprint: the domain is a set (or a graph) of nnn nodes, and the symmetry group is the symmetric group Σn\Sigma_nΣn​ of all reorderings.

Two architectures used in practice follow this pattern. Deep Sets (Zaheer et al., NeurIPS 2017) and PointNets (Qi et al., CVPR 2017) process sets; message-passing graph neural networks process graphs. The design question in both cases is which layers respect the symmetry. For linear layers the question has a complete answer, and the answer determines the layer used by Deep Sets. For graphs, Maron, Ben-Hamu, Shamir and Lipman (2018) counted the linear layers acting on adjacency matrices.

Setting

A set of nnn nodes V={1,…,n}\mathcal V=\{1,\dots,n\}V={1,…,n} carries node features xu∈Rd\mathbf x_u\in\mathbb R^dxu​∈Rd, stacked as the rows of a matrix X∈Rn×d\mathbf X\in\mathbb R^{n\times d}X∈Rn×d. A graph adds an adjacency matrix A∈Rn×n\mathbf A\in\mathbb R^{n\times n}A∈Rn×n, eq. (8), whose nonzero entries are the edges.

A permutation σ∈Σn\sigma\in\Sigma_nσ∈Σn​ acts through its permutation matrix P\mathbf PP by reordering rows: row uuu of PX\mathbf P\mathbf XPX is row σ−1(u)\sigma^{-1}(u)σ−1(u) of X\mathbf XX. On adjacency matrices it acts by A↦PAP⊤\mathbf A\mapsto\mathbf P\mathbf A\mathbf P^\topA↦PAP⊤, reordering rows and columns together.

A function fff is permutation invariant if f(PX)=f(X)f(\mathbf P\mathbf X)=f(\mathbf X)f(PX)=f(X) for every permutation matrix P\mathbf PP, and a matrix-valued function F\mathbf FF is permutation equivariant if F(PX)=PF(X)\mathbf F(\mathbf P\mathbf X)=\mathbf P\mathbf F(\mathbf X)F(PX)=PF(X). On graphs the book's definitions (9) and (10) are

f(PX,PAP⊤)=f(X,A)(9),F(PX,PAP⊤)=PF(X,A)(10),f(\mathbf P\mathbf X,\mathbf P\mathbf A\mathbf P^\top)=f(\mathbf X,\mathbf A)\quad(9),\qquad \mathbf F(\mathbf P\mathbf X,\mathbf P\mathbf A\mathbf P^\top)=\mathbf P\mathbf F(\mathbf X,\mathbf A)\quad(10),f(PX,PAP⊤)=f(X,A)(9),F(PX,PAP⊤)=PF(X,A)(10),

for any permutation matrix P\mathbf PP.

The section's constructions are the sum readout f(X)=ϕ(∑u∈Vψ(xu))f(\mathbf X)=\phi\big(\sum_{u\in\mathcal V}\psi(\mathbf x_u)\big)f(X)=ϕ(∑u∈V​ψ(xu​)) (6); the shared node-wise linear map FΘ(X)=XΘ\mathbf F_{\boldsymbol\Theta}(\mathbf X)=\mathbf X\boldsymbol\ThetaFΘ​(X)=XΘ (7); the neighbourhood Nu={v:(u,v)∈E or (v,u)∈E}\mathcal N_u=\{v:(u,v)\in\mathcal E\text{ or }(v,u)\in\mathcal E\}Nu​={v:(u,v)∈E or (v,u)∈E} (11) and the multiset of neighbourhood features XNu={ ⁣{xv:v∈Nu} ⁣}\mathbf X_{\mathcal N_u}=\{\!\{\mathbf x_v:v\in\mathcal N_u\}\!\}XNu​​={{xv​:v∈Nu​}} (12); and the local layer whose uuu-th row is ϕ(xu,XNu)\phi(\mathbf x_u,\mathbf X_{\mathcal N_u})ϕ(xu​,XNu​​) (13). For one feature channel the two linear generators are the identity F1x=x\mathbf F_1x=xF1​x=x and the average F2x=1n11⊤x\mathbf F_2x=\tfrac1n\mathbf 1\mathbf 1^\top xF2​x=n1​11⊤x, every entry of which is the mean 1n∑uxu\tfrac1n\sum_u x_un1​∑u​xu​.

The book numbers no theorems, lemmas or definitions; every item of this mission is cited by section, equation number and printed page.

Formalization targets

Goal: linear equivariant maps on one channel

For n≥1n\ge1n≥1 and a linear map F:Rn→Rn\mathbf F:\mathbb R^n\to\mathbb R^nF:Rn→Rn,

(∀ P, ∀x: FPx=PFx)  ⟺  ∃ α,β∈R  ∀x: Fx=α x+β 1n11⊤x.\big(\forall\,\mathbf P,\ \forall x:\ \mathbf F\mathbf P x=\mathbf P\mathbf F x\big)\iff \exists\,\alpha,\beta\in\mathbb R\ \ \forall x:\ \mathbf F x=\alpha\,x+\beta\,\tfrac1n\mathbf 1\mathbf 1^\top x .(∀P, ∀x: FPx=PFx)⟺∃α,β∈R  ∀x: Fx=αx+βn1​11⊤x.

This is the book's sentence on p. 33: any linear equivariant "can be written as a linear combination of two generators, the identity … and the average". Both directions are stated; the content is the "only if" direction.

Milestones

  1. The sum readout (6) is permutation invariant (p. 32).
  2. The node-wise linear map (7) is permutation equivariant, with rows hu=Θ⊤xu\mathbf h_u=\boldsymbol\Theta^\top\mathbf x_uhu​=Θ⊤xu​ (p. 33).
  3. The local layer (13) satisfies (10) whenever ϕ\phiϕ is invariant to the order of the neighbourhood (p. 34).
  4. Invariant and equivariant functions give identical outputs on isomorphic graphs (p. 35).
  5. On the complete graph A=11⊤\mathbf A=\mathbf 1\mathbf 1^\topA=11⊤, the aggregate ⨁v∈Vψ(xv)\bigoplus_{v\in\mathcal V}\psi(\mathbf x_v)⨁v∈V​ψ(xv​) is the same at every node (§5.4, p. 81).

Stronger statements

  • Several channels (corrected). A linear F:Rn×d→Rn×d′\mathbf F:\mathbb R^{n\times d}\to\mathbb R^{n\times d'}F:Rn×d→Rn×d′ is permutation equivariant iff F(X)=XΘ1+1n11⊤XΘ2\mathbf F(\mathbf X)=\mathbf X\boldsymbol\Theta_1+\tfrac1n\mathbf 1\mathbf 1^\top\mathbf X\boldsymbol\Theta_2F(X)=XΘ1​+n1​11⊤XΘ2​.
  • Adjacency matrices (Maron et al., corrected). For n≥4n\ge4n≥4, the linear maps L:Rn×n→Rn×nL:\mathbb R^{n\times n}\to\mathbb R^{n\times n}L:Rn×n→Rn×n with L(PAP⊤)=PL(A)P⊤L(\mathbf P\mathbf A\mathbf P^\top)=\mathbf P L(\mathbf A)\mathbf P^\topL(PAP⊤)=PL(A)P⊤ form a space of dimension 15=B415=B_415=B4​.

Significance

The result. The goal classifies the linear layers of a set network. Any equivariant linear layer on scalar node features mixes each node's own value with the mean of all values, and nothing else; with several channels the two scalars become two weight matrices, which is exactly the Deep Sets layer. Read the other way, the theorem says that the commutant of the permutation representation of Σn\Sigma_nΣn​ on Rn\mathbb R^nRn is two-dimensional (for n≥2n\ge2n≥2), the algebraic fact behind the decomposition Rn=span(1)⊕1⊥\mathbb R^n=\mathrm{span}(\mathbf 1)\oplus\mathbf 1^\perpRn=span(1)⊕1⊥ into two irreducible pieces. The Maron et al. count does the same for layers acting on adjacency matrices and fixes the size of the parameter space of invariant graph networks. The milestones give the elementary invariance and equivariance facts on which the graph-network chapter rests, including the constant aggregate on a complete graph.

Formalizing it. All results here are classical and proved on paper. None is formalized on Prove2Me, and Mathlib has no statement about the commutant of the permutation representation or about equivariant layers on sets. The mission produces a vocabulary of permutation actions on feature and adjacency matrices, and the invariance and equivariance definitions (9)–(10), that later missions of this series (the WL comparison, the E(3)-equivariant layer) also use. Two of the book's printed claims need correction to be true, and the formal statements record the corrected versions.

Difficulty

The milestones are short reindexing arguments; the work is in choosing encodings that keep them faithful. The goal's "if" direction is a one-line computation. The "only if" direction is where an argument is needed: equivariance under all of Σn\Sigma_nΣn​ must force the matrix of F\mathbf FF to have one value on the diagonal and one value off it. Equivariance under a smaller group does not suffice: commuting with the cyclic shift alone gives all circulant matrices, an nnn-dimensional space, so the argument must use permutations beyond the shifts. The channel version adds a tensor-product layer to the same argument. The Maron et al. count is a dimension statement, so it needs both a spanning family and its independence, and the count is sensitive to nnn: for n<4n<4n<4 the dimension is strictly smaller than 15, so any argument must use n≥4n\ge4n≥4 somewhere.

Formalization scope

Node features are Matrix (Fin n) (Fin d) ℝ (rows are nodes); a single channel is Fin n → ℝ. A permutation is σ : Equiv.Perm (Fin n), acting by X.submatrix σ.symm id (row uuu of PX\mathbf P\mathbf XPX is row σ−1(u)\sigma^{-1}(u)σ−1(u)) and on adjacency matrices by A.submatrix σ.symm σ.symm; this one convention is used in every statement. Adjacency matrices are real; the edge set is the set of nonzero entries, which for the book's 0/1 matrix (8) is its edge set and also admits weighted graphs. The function ϕ\phiϕ of (13) and the aggregator ⨁\bigoplus⨁ of §5.4 take a Multiset, so their invariance to the order of the neighbours holds by construction. The average 1n11⊤\tfrac1n\mathbf 1\mathbf 1^\topn1​11⊤ is written with (n:R)−1(n:\mathbb R)^{-1}(n:R)−1, and the goal and channel version assume 0<n0<n0<n. Equivariance quantifies over every permutation of Σn\Sigma_nΣn​, never a generating subset. The complete-graph item states the identical-aggregate clause of §5.4. The page's later claim of equal expressive power across inputs is false: with n=2n=2n=2, ψ(x)=x\psi(x)=xψ(x)=x, ⨁=∑\bigoplus=\sum⨁=∑, and ϕ(x,s)=s\phi(x,s)=sϕ(x,s)=s, changing x2x_2x2​ changes h1h_1h1​ while x1x_1x1​ stays fixed, which no node-only map can reproduce.

A trivializing formalization is ruled out: "equivariant" is the commutation property itself, never defined as "of the form αI+β1n11⊤\alpha\mathbf I+\beta\tfrac1n\mathbf 1\mathbf 1^\topαI+βn1​11⊤".

Two printed claims are corrected. On p. 33 the two-generator form is stated for matrices X\mathbf XX with ddd channels; it is false for d>1d>1d>1 (the map X↦XΘ\mathbf X\mapsto\mathbf X\boldsymbol\ThetaX↦XΘ of (7) is a counterexample), so the goal is single-channel and the multi-channel statement uses weight matrices. On p. 34 the fifteen generators are said to be independent of nnn; the dimension is 1, 8 and 14 for n=1,2,3n=1,2,3n=1,2,3, so that item assumes n≥4n\ge4n≥4, and it is stated for adjacency-to-adjacency maps as the side-note on p. 33 specifies.

The development needs Mathlib's Equiv.Perm, Matrix.submatrix, Finset sums and reindexing (Equiv.sum_comp), Multiset.map, and Module.finrank. Proofs of the commutant statements, of the multi-channel version and of the dimension count are welcome; the permutation-action and invariance lemmas proved along the way are reusable by any later development on graph networks.

Selected references

  • M. M. Bronstein, J. Bruna, T. Cohen, P. Veličković, Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges, arXiv preprint, 2021. https://arxiv.org/abs/2104.13478v2
  • M. Zaheer, S. Kottur, S. Ravanbakhsh, B. Póczos, R. Salakhutdinov, A. Smola, Deep Sets, NeurIPS, 2017. https://arxiv.org/abs/1703.06114
  • H. Maron, H. Ben-Hamu, N. Shamir, Y. Lipman, Invariant and Equivariant Graph Networks, ICLR, 2019. https://arxiv.org/abs/1812.09902
  • C. R. Qi, H. Su, K. Mo, L. J. Guibas, PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation, CVPR, 2017. https://arxiv.org/abs/1612.00593
7 thms2 active usersReviewed
🏆Completed
Machine LearningOptimizationProbability+1·Captain: Shuze Chen

The Nature of Statistical Learning Theory V: The VC Dimension of Δ-Margin Separating HyperplanesTextbook

Motivation

A separating hyperplane in Rn\mathbb R^nRn is a classifier of VC dimension n+1n + 1n+1, so a bound on its generalization error that goes through the VC dimension degrades with the dimension of the space. Support vector machines construct hyperplanes in feature spaces of enormous dimension and still generalize. Chapter 5 of V. N. Vapnik, The Nature of Statistical Learning Theory (2nd ed., Springer 2000, doi:10.1007/978-1-4757-3264-1) explains this by a different capacity measure. When a hyperplane is required to separate the data with a margin Δ\DeltaΔ, and the data lie in a ball of radius RRR, the VC dimension is bounded by roughly R2/Δ2R^2/\Delta^2R2/Δ2, independently of nnn.

Timeline. The optimal (maximal margin) hyperplane goes back to Vapnik and Chervonenkis (1965, 1974). Its use with kernels, in place of an explicit feature space, is due to Boser, Guyon and Vapnik (COLT 1992), and the soft-margin support vector machine to Cortes and Vapnik (Machine Learning 20 (1995)). The margin bound appears as Theorem 5.1 of the book, which prints no proofs (Preface, p. xi). In Burges's tutorial (Data Min. Knowl. Disc. 2 (1998)) the bound for "gap tolerant classifiers" carries a ceiling, min⁡(⌈D2/M2⌉,d)+1\min(\lceil D^2/M^2\rceil, d) + 1min(⌈D2/M2⌉,d)+1.

Setting

Vectors live in Rn\mathbb R^nRn with the Euclidean inner product (w⋅x)(w \cdot x)(w⋅x). A Δ\DeltaΔ-margin separating hyperplane is a hyperplane (w∗⋅x)−b=0(w^* \cdot x) - b = 0(w∗⋅x)−b=0 with ∣w∗∣=1|w^*| = 1∣w∗∣=1 and b∈Rb \in \mathbb Rb∈R. It classifies xxx as y=1y = 1y=1 if (w∗⋅x)−b≥Δ(w^* \cdot x) - b \ge \Delta(w∗⋅x)−b≥Δ and as y=−1y = -1y=−1 if (w∗⋅x)−b≤−Δ(w^* \cdot x) - b \le -\Delta(w∗⋅x)−b≤−Δ; vectors in the strip ∣(w∗⋅x)−b∣<Δ|(w^* \cdot x) - b| < \Delta∣(w∗⋅x)−b∣<Δ get no label (§5.4.2, p. 132). Vectors x1,…,xhx_1, \dots, x_hx1​,…,xh​ are shattered by these hyperplanes if each of the 2h2^h2h labelings y1,…,yh∈{1,−1}y_1, \dots, y_h \in \{1, -1\}y1​,…,yh​∈{1,−1} is realized by one hyperplane that classifies every xix_ixi​ with label yiy_iyi​. The VC dimension on a set XXX is the largest hhh for which some x1,…,xh∈Xx_1, \dots, x_h \in Xx1​,…,xh​∈X are shattered, or ∞\infty∞. In Lean these are MarginClassifies, MarginShatters and marginVCDim in NatureSLT.Margin.

For training data (x1,y1),…,(xℓ,yℓ)(x_1, y_1), \dots, (x_\ell, y_\ell)(x1​,y1​),…,(xℓ​,yℓ​) with yi∈{+1,−1}y_i \in \{+1, -1\}yi​∈{+1,−1}, a hyperplane (w⋅x)−b=0(w \cdot x) - b = 0(w⋅x)−b=0 is in canonical form if yi[(w⋅xi)−b]≥1y_i[(w \cdot x_i) - b] \ge 1yi​[(w⋅xi​)−b]≥1 for all iii (5.8). The optimal hyperplane (w0,b0)(w_0, b_0)(w0​,b0​) satisfies (5.8) and minimizes Φ(w)=∥w∥2\Phi(w) = \|w\|^2Φ(w)=∥w∥2 over www and bbb (5.9). Its support vectors are the xix_ixi​ with equality in (5.8). The dual functional is W(α)=∑iαi−12∑i,jαiαjyiyj(xi⋅xj)W(\alpha) = \sum_i \alpha_i - \frac12\sum_{i,j}\alpha_i\alpha_j y_i y_j (x_i \cdot x_j)W(α)=∑i​αi​−21​∑i,j​αi​αj​yi​yj​(xi​⋅xj​) (5.17). In Lean: IsCanonicalSeparating, IsOptimalHyperplane, supportVectors and dualW.

Formalization targets

Goal: Theorem 5.1 (pp. 132–133)

If every x∈Xx \in Xx∈X lies in a sphere (closed ball) of radius R>0R > 0R>0 and Δ>0\Delta > 0Δ>0, then

h≤min⁡([R2Δ2],n)+1,h \le \min\left(\left[\frac{R^2}{\Delta^2}\right], n\right) + 1,h≤min([Δ2R2​],n)+1,

with [⋅][\cdot][⋅] the integer part. As printed this is false (see Beyond the paper), and a disproof of the goal is a legitimate outcome of the mission.

Milestones

  1. §5.4.1, (5.8)–(5.9): the canonical hyperplane minimizing ∥w∥2\|w\|^2∥w∥2 separates the data without error with maximal distance from the closest vector. Conversely, a maximal-margin hyperplane, rescaled to canonical form, minimizes ∥w∥2\|w\|^2∥w∥2.
  2. §5.4.2: the optimal hyperplane, normalized to ∣w∗∣=1|w^*| = 1∣w∗∣=1, is a Δ\DeltaΔ-margin separating hyperplane with Δ=1/∣w0∣\Delta = 1/|w_0|Δ=1/∣w0​∣.
  3. (5.13)–(5.16): a hyperplane satisfying (5.11) is optimal if and only if there are αi0≥0\alpha^0_i \ge 0αi0​≥0 with ∑iαi0yi=0\sum_i \alpha^0_i y_i = 0∑i​αi0​yi​=0, w0=∑iyiαi0xiw_0 = \sum_i y_i \alpha^0_i x_iw0​=∑i​yi​αi0​xi​ (a sum over support vectors only), and αi0{[(xi⋅w0)−b0]yi−1}=0\alpha^0_i\{[(x_i \cdot w_0) - b_0]y_i - 1\} = 0αi0​{[(xi​⋅w0​)−b0​]yi​−1}=0.
  4. Display after (5.19): for a solution α0\alpha_0α0​ of the dual problem, ∣w0∣2=2W(α0)=∑support vectorsαi0αj0(xi⋅xj)yiyj|w_0|^2 = 2W(\alpha_0) = \sum_{\text{support vectors}} \alpha^0_i\alpha^0_j (x_i \cdot x_j) y_i y_j∣w0​∣2=2W(α0​)=∑support vectors​αi0​αj0​(xi​⋅xj​)yi​yj​.
  5. Theorem 5.3 (Mercer): a symmetric K∈L2K \in L_2K∈L2​ has an expansion K(u,v)=∑kakψk(u)ψk(v)K(u, v) = \sum_k a_k \psi_k(u)\psi_k(v)K(u,v)=∑k​ak​ψk​(u)ψk​(v) with ak>0a_k > 0ak​>0 if and only if ∬K(u,v)g(u)g(v) du dv>0\iint K(u, v) g(u) g(v)\, du\, dv > 0∬K(u,v)g(u)g(v)dudv>0 for all g≠0g \ne 0g=0 in L2L_2L2​.

Significance

Theorem 5.1 is the reason the book gives for the generalization of the optimal hyperplane in high-dimensional feature spaces (§5.6.1). With the bound (3.24) it drives the Corollary on p. 133 and the choice of Δ\DeltaΔ in structural risk minimization. Milestones 1–4 are the convex-optimization facts on which the construction of the support vector machine rests: margin maximization as a quadratic program, its Kühn–Tucker characterization and the dual problem. Milestone 5 is the condition under which a kernel can replace the feature-space inner product.

On the platform, UnderstandingML.hard_svm_max_margin (the analogue of milestone 1 with the convention +b+b+b) and UnderstandingML.support_vectors (the bias-free Hard-SVM) are proved. UnderstandingML.kernel_iff_posSemidef characterizes kernels by positive semidefinite Gram matrices, and HighDimStat.Rkhs.thm12_20_mercer_v2 (open) is the eigen-expansion of a continuous kernel on a compact space. There is no margin-dependent VC dimension bound; the BartlettNN.Margin.* results bound fat-shattering dimensions of real-valued classes. The mission adds the book's bias-carrying statements, the first formal Δ-margin VC bound, and machine-checked settlements of the misprinted statements.

Difficulty

The dimension part of the bound, h≤n+1h \le n + 1h≤n+1, is the classical VC dimension of affine half-spaces; the content is the radius part. A solver has to control how far apart the two classes of an arbitrary dichotomy of hhh points in a ball can be pushed by a unit-normal hyperplane with a free bias. The bias does not cancel for unbalanced dichotomies, and this is exactly where the printed integer part and the correct bound part ways. The Kühn–Tucker milestone requires optimality conditions for a convex quadratic program with linear inequality constraints. The Mercer milestone requires the spectral theory of Hilbert–Schmidt integral operators on L2L_2L2​ of a set of positive Lebesgue measure. Neither is packaged in Mathlib in this form.

Formalization scope

Vectors are EuclideanSpace ℝ (Fin n); training data are indexed by Fin ℓ; labels are real numbers with yi∈{+1,−1}y_i \in \{+1, -1\}yi​∈{+1,−1} as a hypothesis, and both classes present, the setting of §5.5. In the shattering definition, labels are booleans. "Sphere of radius RRR" is a closed ball about an arbitrary center; R>0R > 0R>0 and Δ>0\Delta > 0Δ>0 are hypotheses. The VC dimension takes values in N∪{∞}\mathbb N \cup \{\infty\}N∪{∞}, so an unbounded family is ∞\infty∞, never a junk value. Shattering requires every point to be classified with its margin: a definition that let points fall into the strip would make the bound trivial, and is ruled out. Optimality is a predicate on a given pair (w0,b0)(w_0, b_0)(w0​,b0​); no item asserts that an optimum exists. The typo "Δ=1/∣w∗∣\Delta = 1/|w^*|Δ=1/∣w∗∣" of §5.4.2 is read as 1/∣w0∣1/|w_0|1/∣w0​∣. The Mercer items take U⊆RdU \subseteq \mathbb R^dU⊆Rd (d≥1d \ge 1d≥1) measurable of positive Lebesgue measure, with ψk\psi_kψk​ orthonormal in L2(U)L_2(U)L2​(U) and the expansion converging in L2(U×U)L_2(U \times U)L2​(U×U).

Not drafted: the Corollary on p. 133 and Theorem 5.2 (p. 139). Both are probabilistic, and their hypotheses (what the VC dimension of a set of partial classifiers means inside (3.24), the training-set size in the leave-one-out argument) are not pinned down on the page.

Beyond the paper. Two [Corrected] variants are posed beside the faithful items. (1) Theorem 5.1 with the ceiling ⌈R2/Δ2⌉\lceil R^2/\Delta^2\rceil⌈R2/Δ2⌉: the vertices of an equilateral triangle inscribed in the unit circle of R2\mathbb R^2R2 are shattered with Δ=3/4\Delta = 3/4Δ=3/4, while min⁡([16/9],2)+1=2\min([16/9], 2) + 1 = 2min([16/9],2)+1=2, a counterexample to the printed bound that has been checked in Lean. (2) Mercer's theorem with ≥0\ge 0≥0 in the condition and the coefficients: a kernel ∑k2−kψk(u)ψk(v)\sum_k 2^{-k}\psi_k(u)\psi_k(v)∑k​2−kψk​(u)ψk​(v) over the incomplete system 2sin⁡(2πku)\sqrt2\sin(2\pi k u)2​sin(2πku) on [0,1][0,1][0,1] has positive coefficients, yet ∬Kgg=0\iint Kgg = 0∬Kgg=0 for g≡1g \equiv 1g≡1.

Contributions welcome: a convex-quadratic-programming KKT library for finitely many linear constraints; integral operators with L2L_2L2​ kernels and their spectral expansion; disproofs of the faithful Theorem 5.1 and Theorem 5.3.

Selected references

  • V. N. Vapnik, The Nature of Statistical Learning Theory, 2nd ed., Springer, 2000. doi:10.1007/978-1-4757-3264-1
  • V. N. Vapnik, Statistical Learning Theory, Wiley, 1998. ISBN 978-0-471-03003-4.
  • B. E. Boser, I. M. Guyon, V. N. Vapnik, A training algorithm for optimal margin classifiers, COLT 1992. doi:10.1145/130385.130401
  • C. Cortes, V. Vapnik, Support-vector networks, Machine Learning 20, 1995. doi:10.1007/BF00994018
  • C. J. C. Burges, A tutorial on support vector machines for pattern recognition, Data Mining and Knowledge Discovery 2, 1998. doi:10.1023/A:1009715923555
  • J. Mercer, Functions of positive and negative type, and their connection with the theory of integral equations, Phil. Trans. R. Soc. A 209, 1909. doi:10.1098/rsta.1909.0016
8 thms2 active usersReviewed
🏆Completed
Markov ChainNumerical AnalysisOperations Research+2·Captain: Shuze Chen

Introduction to Matrix Analytic Methods in Stochastic Modeling XI: First Passage Times by Reduction and BisectionTextbook

Motivation

In a quasi-birth-and-death process (QBD) a queue length or buffer content (the level) moves up or down by at most one per step while an auxiliary Markov environment (the phase) modulates the rates. When buffers are bounded the level lives in {0,1,…,M}\{0,1,\dots,M\}{0,1,…,M}, and a basic performance question is how long it takes, on average, for an initially empty buffer to fill: the expected first passage time from the bottom level to the top level. Overflow and loss analyses of finite-buffer queues in telecommunication and manufacturing models ask exactly this quantity, and higher moments follow from the same linear systems.

Chapter 11 of Latouche and Ramaswami's Introduction to Matrix Analytic Methods in Stochastic Modeling (SIAM 1999) gives two exact algorithms for it: a linear level reduction, adding one level at a time (Gaver, Jacobs and Latouche, Advances in Applied Probability, 1984), and a reduction by bisection that doubles the number of levels at each step (Latouche and Ramaswami, Stochastic Models, 1995), reaching MMM levels in about log⁡2M\log_2 Mlog2​M steps. This mission formalizes the probabilistic identities on which both algorithms rest.

Setting

Fix M≥2M\ge2M≥2 and a finite set of mmm phases. The states are pairs (n,i)(n,i)(n,i) with level 0≤n≤M0\le n\le M0≤n≤M and phase iii; the level ℓ(n)\ell(n)ℓ(n) is {(n,i)}i\{(n,i)\}_i{(n,i)}i​. A finite QBD is the discrete-time Markov chain (Xk)(X_k)(Xk​) with block-tridiagonal transition matrix (10.2): from level nnn it moves up one level with the m×mm\times mm×m probability matrix A0A_0A0​, down one level with A2A_2A2​, and stays in its level with P00P_{00}P00​ at level 000, PMMP_{MM}PMM​ at level MMM and A1A_1A1​ in between. The matrix is stochastic and the chain is irreducible.

Let τ(k)=inf⁡{j>0:Xj∈ℓ(k)}\tau(k)=\inf\{j>0 : X_j\in\ell(k)\}τ(k)=inf{j>0:Xj​∈ℓ(k)}. For levels n≠kn\neq kn=k:

  • tn→kt_{n\to k}tn→k​ is the vector of expected first passage times E[τ(k)∣X0=(n,i)]\mathrm E[\tau(k)\mid X_0=(n,i)]E[τ(k)∣X0​=(n,i)];
  • Γn→k\Gamma_{n\to k}Γn→k​ is the matrix of first passage probabilities P[Xτ(k)=(k,j)∣X0=(n,i)]\mathrm P[X_{\tau(k)}=(k,j)\mid X_0=(n,i)]P[Xτ(k)​=(k,j)∣X0​=(n,i)];

with tn→n=0t_{n\to n}=0tn→n​=0 and Γn→n=I\Gamma_{n\to n}=IΓn→n​=I. For 1≤i≤n≤M−11\le i\le n\le M-11≤i≤n≤M−1 let θ(n)=min⁡(τ(0),τ(n+1))\theta^{(n)}=\min(\tau(0),\tau(n+1))θ(n)=min(τ(0),τ(n+1)) be the first exit time from the block ℓ(1)∪⋯∪ℓ(n)\ell(1)\cup\dots\cup\ell(n)ℓ(1)∪⋯∪ℓ(n), and let

  • si(n)s_i^{(n)}si(n)​ be the vector of expected exit times E[θ(n)∣X0=(i,p)]\mathrm E[\theta^{(n)}\mid X_0=(i,p)]E[θ(n)∣X0​=(i,p)];
  • Gi(n)G_i^{(n)}Gi(n)​ and Γi(n)\Gamma_i^{(n)}Γi(n)​ be the matrices of probabilities, starting from ℓ(i)\ell(i)ℓ(i), that the exit is into ℓ(0)\ell(0)ℓ(0), respectively ℓ(n+1)\ell(n+1)ℓ(n+1), and in a given arrival phase.

All of these are taboo quantities of the chain: probabilities of sets of trajectories and expected values of hitting times.

Formalization targets

Goal: Lemma 11.3.1

For M≥2M\ge2M≥2, the matrix I−Γ0→1G1(M−1)I-\Gamma_{0\to1}G_1^{(M-1)}I−Γ0→1​G1(M−1)​ is nonsingular and

t0→M=(I−Γ0→1G1(M−1))−1{t0→1+Γ0→1s1(M−1)}.t_{0\to M}=(I-\Gamma_{0\to1}G_1^{(M-1)})^{-1}\{t_{0\to1}+\Gamma_{0\to1}s_1^{(M-1)}\}.t0→M​=(I−Γ0→1​G1(M−1)​)−1{t0→1​+Γ0→1​s1(M−1)​}.

Milestones

  1. Lemma 11.2.1. For 0≤n<k≤M0\le n<k\le M0≤n<k≤M: tn→k=tn→n+1+Γn→n+1tn+1→kt_{n\to k}=t_{n\to n+1}+\Gamma_{n\to n+1}t_{n+1\to k}tn→k​=tn→n+1​+Γn→n+1​tn+1→k​ and Γn→k=Γn→n+1Γn+1→k\Gamma_{n\to k}=\Gamma_{n\to n+1}\Gamma_{n+1\to k}Γn→k​=Γn→n+1​Γn+1→k​.
  2. Lemma 11.2.2. With C0=P00C_0=P_{00}C0​=P00​ and Cn=A1+A2Γn−1→nC_n=A_1+A_2\Gamma_{n-1\to n}Cn​=A1​+A2​Γn−1→n​: Γn→n+1=(I−Cn)−1A0\Gamma_{n\to n+1}=(I-C_n)^{-1}A_0Γn→n+1​=(I−Cn​)−1A0​ for 0≤n≤M−10\le n\le M-10≤n≤M−1, t0→1=(I−C0)−11t_{0\to1}=(I-C_0)^{-1}\mathbf 1t0→1​=(I−C0​)−11, and tn→n+1=(I−Cn)−11+(I−Cn)−1A2tn−1→nt_{n\to n+1}=(I-C_n)^{-1}\mathbf 1+(I-C_n)^{-1}A_2t_{n-1\to n}tn→n+1​=(I−Cn​)−11+(I−Cn​)−1A2​tn−1→n​ for 1≤n≤M−11\le n\le M-11≤n≤M−1.
  3. Lemma 11.3.2. For n,ν≥1n,\nu\ge1n,ν≥1 with n+ν≤M−1n+\nu\le M-1n+ν≤M−1, 1≤i≤n1\le i\le n1≤i≤n, 1≤j≤ν1\le j\le\nu1≤j≤ν: Gi(n+ν)=Gi(n)+Γi(n)G1(ν)Gn(n+ν)G_i^{(n+\nu)}=G_i^{(n)}+\Gamma_i^{(n)}G_1^{(\nu)}G_n^{(n+\nu)}Gi(n+ν)​=Gi(n)​+Γi(n)​G1(ν)​Gn(n+ν)​, Gn+j(n+ν)=Gj(ν)Gn(n+ν)G_{n+j}^{(n+\nu)}=G_j^{(\nu)}G_n^{(n+\nu)}Gn+j(n+ν)​=Gj(ν)​Gn(n+ν)​, Γi(n+ν)=Γi(n)Γn+1(n+ν)\Gamma_i^{(n+\nu)}=\Gamma_i^{(n)}\Gamma_{n+1}^{(n+\nu)}Γi(n+ν)​=Γi(n)​Γn+1(n+ν)​, Γn+j(n+ν)=Γj(ν)+Gj(ν)Γn(n)Γn+1(n+ν)\Gamma_{n+j}^{(n+\nu)}=\Gamma_j^{(\nu)}+G_j^{(\nu)}\Gamma_n^{(n)}\Gamma_{n+1}^{(n+\nu)}Γn+j(n+ν)​=Γj(ν)​+Gj(ν)​Γn(n)​Γn+1(n+ν)​, Gn(n+ν)=(I−Γn(n)G1(ν))−1Gn(n)G_n^{(n+\nu)}=(I-\Gamma_n^{(n)}G_1^{(\nu)})^{-1}G_n^{(n)}Gn(n+ν)​=(I−Γn(n)​G1(ν)​)−1Gn(n)​ and Γn+1(n+ν)=(I−G1(ν)Γn(n))−1Γ1(ν)\Gamma_{n+1}^{(n+\nu)}=(I-G_1^{(\nu)}\Gamma_n^{(n)})^{-1}\Gamma_1^{(\nu)}Γn+1(n+ν)​=(I−G1(ν)​Γn(n)​)−1Γ1(ν)​.
  4. Lemma 11.3.3. In the same range: si(n+ν)=si(n)+Γi(n)s1(ν)+Γi(n)G1(ν)sn(n+ν)s_i^{(n+\nu)}=s_i^{(n)}+\Gamma_i^{(n)}s_1^{(\nu)}+\Gamma_i^{(n)}G_1^{(\nu)}s_n^{(n+\nu)}si(n+ν)​=si(n)​+Γi(n)​s1(ν)​+Γi(n)​G1(ν)​sn(n+ν)​, sn(n+ν)=(I−Γn(n)G1(ν))−1{sn(n)+Γn(n)s1(ν)}s_n^{(n+\nu)}=(I-\Gamma_n^{(n)}G_1^{(\nu)})^{-1}\{s_n^{(n)}+\Gamma_n^{(n)}s_1^{(\nu)}\}sn(n+ν)​=(I−Γn(n)​G1(ν)​)−1{sn(n)​+Γn(n)​s1(ν)​} and sn+j(n+ν)=sj(ν)+Gj(ν)sn(n+ν)s_{n+j}^{(n+\nu)}=s_j^{(\nu)}+G_j^{(\nu)}s_n^{(n+\nu)}sn+j(n+ν)​=sj(ν)​+Gj(ν)​sn(n+ν)​.

The goal is the identity the bisection algorithm ends with. Milestones 3 and 4 are its doubling step, and milestones 1 and 2 give the linear algorithm.

Significance

Lemmas 11.2.1–11.2.2 justify the Linear Level Reduction Algorithm (Figure 11.1 of the book), which is block LU factorization of I−TI-TI−T for the transient part TTT of the chain. Lemmas 11.3.1–11.3.3 justify the Reduction by Bisection algorithm (Figure 11.2): it computes t0→Mt_{0\to M}t0→M​ with O(log⁡M)O(\log M)O(logM) products of m×mm\times mm×m matrices instead of O(M)O(M)O(M), using the fact that the levels 1,…,M−11,\dots,M-11,…,M−1 form a homogeneous block. The same decompositions, applied to the matrices GGG and Γ\GammaΓ, underlie the doubling and cyclic-reduction methods for infinite QBDs.

These results are proved in the book, partly in condensed form: Lemma 11.3.3 is left to the reader, and of the six relations of Lemma 11.3.2 only (11.13)–(11.15) and (11.17) are argued explicitly, the others "in a similar manner". No machine-checked version of any of them exists. The Prove2Me platform has finite and countable Markov chains (MarkovMixing) and scalar hitting-time results (MarkovMixing.gamblers_ruin), but no block-structured first passage theory. This mission supplies the strong-Markov decompositions at hitting times of level sets, in matrix form, together with the nonsingularity arguments that make the formulas well defined.

Difficulty

Every identity is a first-passage decomposition: condition on where the chain first enters a level, or first leaves a block of levels. Three points stop the obvious argument from being routine. First, the quantities are infinite sums over trajectories, and splitting a trajectory at a hitting time must be done as an exact bijection of taboo paths, with expected times given as tail sums. Second, the bisection lemmas compare exit probabilities of different blocks of levels. Gj(ν)G_j^{(\nu)}Gj(ν)​ is defined for the levels 1,…,ν1,\dots,\nu1,…,ν, but the relations use it for the shifted levels n+1,…,n+νn+1,\dots,n+\nun+1,…,n+ν. The shift is legitimate only because the transition matrix is homogeneous on the levels 1,…,M−11,\dots,M-11,…,M−1, and the identification has to be proved. Third, each inverse requires a spectral argument: the series ∑ν(Γ0→1G1(M−1))ν\sum_\nu(\Gamma_{0\to1}G_1^{(M-1)})^\nu∑ν​(Γ0→1​G1(M−1)​)ν converges because irreducibility forbids returning to ℓ(0)\ell(0)ℓ(0) forever without visiting ℓ(M)\ell(M)ℓ(M). Turning this into nonsingularity of a real matrix needs a bound on the spectral radius of a substochastic matrix, not a mere appeal to probability. Finiteness of every expectation likewise rests on irreducibility of the finite chain.

Formalization scope

States are pairs in N×ι\mathbb N\times\iotaN×ι with ι\iotaι a finite type. The transition matrix is (10.2) for the levels 0,…,M0,\dots,M0,…,M and 000 elsewhere. The standing assumptions (nonnegative blocks, stochastic rows, M≥1M\ge1M≥1, irreducibility on the levels 0,…,M0,\dots,M0,…,M) form one predicate. Probabilities and expectations are defined as sums over finite taboo trajectories of products of one-step probabilities, valued in [0,∞][0,\infty][0,∞]. Expectations are tail sums ∑t≥0P[τ>t]\sum_{t\ge0}\mathrm P[\tau>t]∑t≥0​P[τ>t]. The quantities Gi(n),Γi(n),si(n)G_i^{(n)},\Gamma_i^{(n)},s_i^{(n)}Gi(n)​,Γi(n)​,si(n)​ are defined, as in the book, for the chain itself, and the theorems use them only in the book's range n+ν≤M−1n+\nu\le M-1n+ν≤M−1. Identities without an inverse are stated in [0,∞][0,\infty][0,∞]. Identities with an inverse are stated between real matrices: each matrix inverted is proved nonsingular, and each expectation that is read as a real number is proved finite, both as part of the conclusion.

None of tn→kt_{n\to k}tn→k​, Γn→k\Gamma_{n\to k}Γn→k​, Gi(n)G_i^{(n)}Gi(n)​, Γi(n)\Gamma_i^{(n)}Γi(n)​, si(n)s_i^{(n)}si(n)​ may be defined as the solution of the chapter's equations. Doing so would make every target true by definition, so they are defined only as hitting quantities of the chain. Lemma 11.2.2 prints Cn=A1+A2(I−Cn−1−1)A0=A1+A2Γn−1→nC_n=A_1+A_2(I-C_{n-1}^{-1})A_0=A_1+A_2\Gamma_{n-1\to n}Cn​=A1​+A2​(I−Cn−1−1​)A0​=A1​+A2​Γn−1→n​, and the two printed expressions differ. The faithful statement uses the second one, A1+A2Γn−1→nA_1+A_2\Gamma_{n-1\to n}A1​+A2​Γn−1→n​.

Beyond the paper. One variant is posed, level_by_level_corrected (kind: corrected). It states Lemma 11.2.2 with Cn=A1+A2(I−Cn−1)−1A0C_n=A_1+A_2(I-C_{n-1})^{-1}A_0Cn​=A1​+A2​(I−Cn−1​)−1A0​, the recursion (10.3) the proof cites. Evidence: with one phase, P00=2/3P_{00}=2/3P00​=2/3 and A0=A1=A2=1/3A_0=A_1=A_2=1/3A0​=A1​=A2​=1/3, the printed first expression gives C1=5/18C_1=5/18C1​=5/18, whereas A1+A2Γ0→1=2/3A_1+A_2\Gamma_{0\to1}=2/3A1​+A2​Γ0→1​=2/3.

A complete development needs the following. Strong-Markov path splitting for path-sum hitting quantities is reusable for any countable chain. So are the convergence of ∑Mν\sum M^\nu∑Mν and the nonsingularity of I−MI-MI−M for substochastic matrices that cannot keep mass forever. Contributions of either as standalone lemmas are welcome.

Selected references

  • G. Latouche and V. Ramaswami, Introduction to Matrix Analytic Methods in Stochastic Modeling, ASA-SIAM Series on Statistics and Applied Probability, SIAM, 1999, Chapters 10–11. https://doi.org/10.1137/1.9780898719734
  • D. P. Gaver, P. A. Jacobs and G. Latouche, Finite birth-and-death models in randomly changing environments, Advances in Applied Probability 16 (1984), 715–731 (reference [26] of the book).
  • G. Latouche and V. Ramaswami, Expected passage times in homogeneous quasi-birth-and-death processes, Communications in Statistics. Stochastic Models 11 (1995), 103–122 (reference [54] of the book).
8 thms2 active usersReviewed
🏆Completed
Markov ChainNumerical AnalysisOperations Research+2·Captain: Shuze Chen

Introduction to Matrix Analytic Methods in Stochastic Modeling X: Linear Level Reduction for Finite QBDsTextbook

Motivation

In a queue with a finite buffer, a multi-server system with a capacity limit, or a communication link with a bounded number of packets in transit, the number of customers is a level that takes only finitely many values, and the rest of the state (service phase, arrival phase, environment) is a phase. The resulting Markov chain is a finite quasi-birth-and-death process (finite QBD): it moves by at most one level per step, and its transition probabilities do not depend on the level except at the two boundaries. Finite QBDs model M/PH/1/K and PH/M/1/K queues, finite-buffer multiplexers and loss systems, and computing their stationary distribution is the routine numerical task behind blocking probabilities and buffer-dimensioning.

Chapter 10 of Latouche and Ramaswami, Introduction to Matrix Analytic Methods in Stochastic Modeling (SIAM 1999), gives the standard exact method, linear level reduction, adapted from Gaver, Jacobs and Latouche (Advances in Applied Probability, 1984): remove the levels one at a time, solve the chain watched on the last remaining level, and rebuild the stationary vector level by level. The chapter shows that every matrix the algorithm computes has a probabilistic meaning, which is what makes the algorithm a probabilistic form of block Gaussian elimination rather than an algebraic trick. This mission is the tenth of a series formalizing the book.

Setting

Fix M≥1M \ge 1M≥1 and a finite nonempty set ι\iotaι of phases. The state space is the set of pairs (n,j)(n, j)(n,j) with level 0≤n≤M0 \le n \le M0≤n≤M and phase j∈ιj \in \iotaj∈ι; the level ℓ(n)\ell(n)ℓ(n) is the set of states with first coordinate nnn, and Si=⋃i≤n≤Mℓ(n)S_i = \bigcup_{i \le n \le M} \ell(n)Si​=⋃i≤n≤M​ℓ(n). Five real ι×ι\iota \times \iotaι×ι matrices P00,A0,A1,A2,PMMP_{00}, A_0, A_1, A_2, P_{MM}P00​,A0​,A1​,A2​,PMM​ define the block tridiagonal transition matrix

P=[P00A0A2A1A0⋱⋱⋱A2A1A0A2PMM],P = \begin{bmatrix} P_{00} & A_0 & & & \\ A_2 & A_1 & A_0 & & \\ & \ddots & \ddots & \ddots & \\ & & A_2 & A_1 & A_0 \\ & & & A_2 & P_{MM}\end{bmatrix},P=​P00​A2​​A0​A1​⋱​A0​⋱A2​​⋱A1​A2​​A0​PMM​​​,

so A0A_0A0​ moves up one level, A2A_2A2​ down one level, and A1A_1A1​ (or P00P_{00}P00​, PMMP_{MM}PMM​ at the boundaries) stays. PPP is assumed stochastic (nonnegative, rows summing to one) and irreducible (every state reaches every state). Its stationary vector π\piπ is the row vector with π≥0\pi \ge 0π≥0, π1=1\pi\mathbf 1 = 1π1=1, πP=π\pi P = \piπP=π, partitioned into blocks π=(π0,…,πM)\pi = (\pi_0, \dots, \pi_M)π=(π0​,…,πM​).

For a set AAA of states, the probability, starting from xxx, that the first visit to AAA after time 000 is a visit to yyy is the sum, over all finite trajectories from xxx to yyy whose intermediate states avoid AAA, of the products of one-step transition probabilities. The process restricted on AAA has these first-return probabilities as its transition matrix.

Two families of matrices are defined by recursion. Upwards:

C0=P00,Ci=A1+A2(I−Ci−1)−1A0 (1≤i≤M−1),CM=PMM+A2(I−CM−1)−1A0.C_0 = P_{00}, \qquad C_i = A_1 + A_2(I - C_{i-1})^{-1}A_0 \ (1 \le i \le M-1), \qquad C_M = P_{MM} + A_2(I - C_{M-1})^{-1}A_0.C0​=P00​,Ci​=A1​+A2​(I−Ci−1​)−1A0​ (1≤i≤M−1),CM​=PMM​+A2​(I−CM−1​)−1A0​.

Downwards:

U(M)=PMM,U(i)=A1+A0(I−U(i+1))−1A2 (1≤i≤M−1),U(0)=P00+A0(I−U(1))−1A2,U^{(M)} = P_{MM}, \qquad U^{(i)} = A_1 + A_0(I - U^{(i+1)})^{-1}A_2 \ (1 \le i \le M-1), \qquad U^{(0)} = P_{00} + A_0(I - U^{(1)})^{-1}A_2,U(M)=PMM​,U(i)=A1​+A0​(I−U(i+1))−1A2​ (1≤i≤M−1),U(0)=P00​+A0​(I−U(1))−1A2​,

and R(i)=A0(I−U(i))−1R^{(i)} = A_0(I - U^{(i)})^{-1}R(i)=A0​(I−U(i))−1 for 1≤i≤M1 \le i \le M1≤i≤M.

Formalization targets

Goal: the matrix-product form (Theorem 10.1.3)

For an irreducible finite QBD, I−U(i)I - U^{(i)}I−U(i) is invertible for 1≤i≤M1 \le i \le M1≤i≤M, and

π0=π0U(0),πi=πi−1R(i)(1≤i≤M);\pi_0 = \pi_0U^{(0)}, \qquad \pi_i = \pi_{i-1}R^{(i)} \quad (1 \le i \le M);π0​=π0​U(0),πi​=πi−1​R(i)(1≤i≤M);

these equations determine π\piπ up to a multiplicative constant. Moreover, for 1≤i≤M1 \le i \le M1≤i≤M, U(i)U^{(i)}U(i) is the matrix of probabilities of returning from ℓ(i)\ell(i)ℓ(i) to ℓ(i)\ell(i)ℓ(i) before a visit to ℓ(i−1)\ell(i-1)ℓ(i−1), and (I−U(i))−1A2(I - U^{(i)})^{-1}A_2(I−U(i))−1A2​ is the matrix of first passage probabilities from ℓ(i)\ell(i)ℓ(i) to ℓ(i−1)\ell(i-1)ℓ(i−1).

Milestones

  1. Lemma 10.1.1. The process restricted on SiS_iSi​ has the transition matrix of the same block form with CiC_iCi​ in the corner; I−CiI - C_iI−Ci​ is invertible for i≤M−1i \le M-1i≤M−1; CiC_iCi​ is the matrix of returns from ℓ(i)\ell(i)ℓ(i) to ℓ(i)\ell(i)ℓ(i) before reaching ℓ(i+1)\ell(i+1)ℓ(i+1); (I−Ci)−1A0(I - C_i)^{-1}A_0(I−Ci​)−1A0​ is the first passage matrix from ℓ(i)\ell(i)ℓ(i) to ℓ(i+1)\ell(i+1)ℓ(i+1).
  2. Theorem 10.1.2. π\piπ is the unique real solution of πM=πMCM\pi_M = \pi_MC_MπM​=πM​CM​, πi=πi+1A2(I−Ci)−1\pi_i = \pi_{i+1}A_2(I - C_i)^{-1}πi​=πi+1​A2​(I−Ci​)−1 (0≤i≤M−10 \le i \le M-10≤i≤M−1), ∑iπi1=1\sum_i \pi_i\mathbf 1 = 1∑i​πi​1=1.
  3. Theorem 10.4.1. If A2=c⋅rA_2 = \boldsymbol c\cdot\boldsymbol rA2​=c⋅r has rank one with r1=1\boldsymbol r\mathbf 1 = 1r1=1, then πi=π0Ri\pi_i = \pi_0R^iπi​=π0​Ri (1≤i≤M−11 \le i \le M-11≤i≤M−1), πM=π0RM−1RM\pi_M = \pi_0R^{M-1}R_MπM​=π0​RM−1RM​, π0(I−P00−A01⋅r)=0\pi_0(I - P_{00} - A_0\mathbf 1\cdot\boldsymbol r) = \mathbf 0π0​(I−P00​−A0​1⋅r)=0, with R=A0(I−A1−A01⋅r)−1R = A_0(I - A_1 - A_0\mathbf 1\cdot\boldsymbol r)^{-1}R=A0​(I−A1​−A0​1⋅r)−1, RM=A0(I−PMM)−1R_M = A_0(I - P_{MM})^{-1}RM​=A0​(I−PMM​)−1; and symmetrically when A0A_0A0​ has rank one.

Significance

The goal is the finite counterpart of the matrix-geometric property πn=πn−1R\pi_n = \pi_{n-1}Rπn​=πn−1​R, R=A0(I−U)−1R = A_0(I - U)^{-1}R=A0​(I−U)−1 of the infinite QBD (Theorem 6.2.1 of the book): with a finite upper boundary the matrices U(i)U^{(i)}U(i) depend on the level, and the stationary vector is a product of level-dependent factors. Together with Lemma 10.1.1 and Theorem 10.1.2 it justifies the two block-elimination algorithms of the chapter (bottom-up and top-down), whose cost is linear in the number of levels, and Theorem 10.4.1 reduces the whole computation to one m×mm \times mm×m system for the M/PH/1/K and PH/M/1/K queues.

The results are classical and proved in the book, except that Theorem 10.1.3's proof is omitted as "a repetition of the argument" for Theorem 10.1.2. None of them is formalized. The mission produces a formal account of finite block tridiagonal chains, taboo first-entrance probabilities as trajectory sums, and the link between restricted (censored) chains and block Gaussian elimination, all reusable by the later chapters on first passage times and level-dependent QBDs.

Difficulty

The algebra of block elimination is routine once the inverses exist; the content is that they exist and that the recursively defined matrices are the probabilities claimed. The obvious approach, verifying πP=π\pi P = \piπP=π by substituting the recursions, proves neither: it presupposes invertibility of I−CiI - C_iI−Ci​ and I−U(i)I - U^{(i)}I−U(i), which holds only because the corresponding taboo matrices are strictly substochastic in an irreducible chain, and it says nothing about first passage probabilities. Identifying the recursion with the probabilities requires decomposing trajectories at their visits to a level, inductively in the number of removed levels, and passing to the limit in infinite sums of trajectory weights. Uniqueness of the solution, and the rank-one reduction of Theorem 10.4.1, then rest on the first passage matrices being stochastic.

Formalization scope

The state space is Fin (M + 1) × ι with ι a nonempty Fintype, levels counted from 000; the transition matrix is the explicit block tridiagonal qbdMatrix, and every theorem assumes M≥1M \ge 1M≥1, stochasticity and irreducibility. Row vectors act on the left (vecMul). The first-visit probabilities are sums over ttt of firstEntryStep, a finite sum of products of one-step probabilities over trajectories with ttt intermediate states avoiding the taboo set, and every statement asserts the convergence of that series (HasSum) to the stated matrix entry. CiC_iCi​, U(i)U^{(i)}U(i) and R(i)R^{(i)}R(i) are defined by the book's recursions with Mathlib's matrix inverse, which is 000 on a singular matrix; every theorem therefore concludes the invertibility of each matrix it inverts, and none assumes it. Defining CiC_iCi​ or U(i)U^{(i)}U(i) as the first-passage probabilities and the theorem as their recursion, or assuming the inverses exist, would trivialize the mission; both are excluded by this design. The probabilistic meanings in Lemma 10.1.1 and Theorem 10.1.3 are part of the conclusions. "Determined by" and "given by" are formalized as uniqueness of the solution (up to a constant for Theorem 10.1.3, which states no normalization).

The basic Markov chain notions restate the public platform definition mm_countable. Results stated in the chapter but not included: Lemma 10.3.1 and Theorem 10.3.2 (they need the rate matrices RRR, R^\hat RR^ of the infinite QBD and its level reversal) and the folding method of §10.2 (unnumbered). Contributions of general lemmas on censored finite chains and on substochastic taboo matrices are welcome.

Selected references

  • G. Latouche and V. Ramaswami, Introduction to Matrix Analytic Methods in Stochastic Modeling, ASA-SIAM Series on Statistics and Applied Probability, SIAM, 1999. https://doi.org/10.1137/1.9780898719734
  • D. P. Gaver, P. A. Jacobs and G. Latouche, Finite birth-and-death models in randomly changing environments, Advances in Applied Probability 16 (1984), 715–731.
  • M. F. Neuts, Matrix-Geometric Solutions in Stochastic Models: An Algorithmic Approach, Johns Hopkins University Press, 1981.
  • W. J. Stewart, Introduction to the Numerical Solution of Markov Chains, Princeton University Press, 1994.
6 thms2 active usersReviewed
🏆Completed
Markov ChainOperations ResearchProbability+1·Captain: Shuze Chen

Introduction to Matrix Analytic Methods in Stochastic Modeling II: The Renewal Function of a PH Renewal ProcessTextbook

Motivation

Renewal processes model ordered sequences of events on [0,∞)[0,\infty)[0,∞): arrivals to a queue, service completions, equipment failures. Their defining feature is that successive intervals between events are independent and identically distributed. Two quantities answer most practical questions about such a process: the renewal function R(x)R(x)R(x), the expected number of renewals in [0,x][0,x][0,x], and the renewal density r(x)=R′(x)r(x)=R'(x)r(x)=R′(x). For a general interval distribution neither has a closed form; RRR solves a renewal integral equation.

When the intervals have a phase-type (PH) distribution, the time to absorption of a finite Markov process, both quantities become explicit matrix expressions. This is the starting point of Chapter 3 of Latouche and Ramaswami's Introduction to Matrix Analytic Methods in Stochastic Modeling (SIAM 1999). PH renewal processes are the arrival streams of most matrix-analytic queueing models, and the closed form of R(x)R(x)R(x) is the template for the corresponding formula for Markovian arrival processes (Section 3.6 of the book; Neuts 1979, Lucantoni 1991).

Setting

A PH representation (τ,T)(\boldsymbol\tau,T)(τ,T) on nnn phases consists of a nonnegative row vector τ\boldsymbol\tauτ and an n×nn\times nn×n matrix TTT with Tii<0T_{ii}<0Tii​<0, Tij≥0T_{ij}\ge0Tij​≥0 for i≠ji\ne ji=j, and nonnegative exit vector t=−T1\boldsymbol t=-T\mathbf 1t=−T1, where 1\mathbf 11 is the all-ones column vector. It describes a Markov process on {0,1,…,n}\{0,1,\dots,n\}{0,1,…,n} that starts in phase iii with probability τi\tau_iτi​, moves among the phases 1,…,n1,\dots,n1,…,n at the rates TijT_{ij}Tij​, and is absorbed into state 000 at rate tit_iti​. Throughout, TTT is nonsingular and there is no atom at 000: τ1=1\boldsymbol\tau\mathbf 1=1τ1=1.

The PH renewal process restarts the Markov process instantaneously after each absorption, in a phase drawn from τ\boldsymbol\tauτ; the absorption epochs are the renewals. Ignoring the instantaneous visits to 000, the phase J(x)J(x)J(x) at time xxx is a Markov process with generator

D=T+t⋅τ,D=T+\boldsymbol t\cdot\boldsymbol\tau,D=T+t⋅τ,

where t⋅τ\boldsymbol t\cdot\boldsymbol\taut⋅τ is the outer product. The representation is irreducible if every phase has a path of positive rates to the absorbing state and can be reached from a phase iii with τi>0\tau_i>0τi​>0.

Let N(x)N(x)N(x) be the number of renewals in (0,x](0,x](0,x]. The pair (N(x),J(x))(N(x),J(x))(N(x),J(x)) is a Markov process whose generator has TTT in its diagonal blocks and t⋅τ\boldsymbol t\cdot\boldsymbol\taut⋅τ just above them. Write

Pij(k,x)=P[N(x)=k, J(x)=j∣N(0)=0, J(0)=i].P_{ij}(k,x)=\mathrm P[N(x)=k,\ J(x)=j\mid N(0)=0,\ J(0)=i].Pij​(k,x)=P[N(x)=k, J(x)=j∣N(0)=0, J(0)=i].

The renewal function of the process started with a renewal at time 000 is R(x)=1+∑k≥0k τP(k,x)1R(x)=1+\sum_{k\ge0}k\,\boldsymbol\tau P(k,x)\mathbf 1R(x)=1+∑k≥0​kτP(k,x)1. The remaining objects are the stationary vector π=(τT−11)−1τT−1\boldsymbol\pi=(\boldsymbol\tau T^{-1}\mathbf 1)^{-1}\boldsymbol\tau T^{-1}π=(τT−11)−1τT−1 of the phase process, the matrix Π=1⋅π\Pi=\mathbf 1\cdot\boldsymbol\piΠ=1⋅π, and the mean interrenewal time M=τ(−T)−11M=\boldsymbol\tau(-T)^{-1}\mathbf 1M=τ(−T)−11.

Formalization targets

Goal: the renewal function (Theorem 3.1.4)

For an irreducible representation and every x≥0x\ge0x≥0, the matrix D−ΠD-\PiD−Π is nonsingular, the series defining R(x)R(x)R(x) converges, and

R(x)=1+xM−1+τ(exp⁡(Dx)−I)(D−Π)−1t.R(x)=1+xM^{-1}+\boldsymbol\tau\bigl(\exp(Dx)-I\bigr)(D-\Pi)^{-1}\boldsymbol t.R(x)=1+xM−1+τ(exp(Dx)−I)(D−Π)−1t.

Milestones

  1. Lemma 3.1.1. DDD is irreducible whenever (τ,T)(\boldsymbol\tau,T)(τ,T) is.
  2. Lemma 3.1.3. D−ΠD-\PiD−Π is nonsingular; π\boldsymbol\piπ is the unique probability solution of πD=0\boldsymbol\pi D=\mathbf 0πD=0, π1=1\boldsymbol\pi\mathbf 1=1π1=1; and π(D−Π)−1=−π\boldsymbol\pi(D-\Pi)^{-1}=-\boldsymbol\piπ(D−Π)−1=−π.
  3. Theorem 3.2.1. P′(0,x)=TP(0,x)P'(0,x)=TP(0,x)P′(0,x)=TP(0,x), P′(k,x)=TP(k,x)+t⋅τP(k−1,x)P'(k,x)=TP(k,x)+\boldsymbol t\cdot\boldsymbol\tau P(k-1,x)P′(k,x)=TP(k,x)+t⋅τP(k−1,x) for k≥1k\ge1k≥1, with P(0,0)=IP(0,0)=IP(0,0)=I and P(k,0)=0P(k,0)=0P(k,0)=0 for k≥1k\ge1k≥1, and ∑k≥0zkP(k,x)=exp⁡{(T+z t⋅τ)x}\sum_{k\ge0}z^kP(k,x)=\exp\{(T+z\,\boldsymbol t\cdot\boldsymbol\tau)x\}∑k≥0​zkP(k,x)=exp{(T+zt⋅τ)x}.
  4. Lemma 3.2.3. With c=max⁡i∣Tii∣c=\max_i|T_{ii}|c=maxi​∣Tii​∣, P=c−1T+IP=c^{-1}T+IP=c−1T+I and p=c−1t\boldsymbol p=c^{-1}\boldsymbol tp=c−1t, P(ν,x)=∑m≥νe−cx(cx)mm!KmνP(\nu,x)=\sum_{m\ge\nu}e^{-cx}\frac{(cx)^m}{m!}K_{m\nu}P(ν,x)=∑m≥ν​e−cxm!(cx)m​Kmν​ for matrices Km,νK_{m,\nu}Km,ν​ given by an explicit recursion.
  5. Theorem 3.1.2. For an initial phase distribution β\boldsymbol\betaβ, the expected number of renewals in (0,x](0,x](0,x] is differentiable at every x>0x>0x>0, with derivative βexp⁡(Dx)t\boldsymbol\beta\exp(Dx)\boldsymbol tβexp(Dx)t.

Significance

The result itself. Theorem 3.1.4 gives the renewal function of a PH renewal process in closed form from the representation alone. It separates the linear term x/Mx/Mx/M, the content of the elementary renewal theorem, from a correction τ(exp⁡(Dx)−I)(D−Π)−1t\boldsymbol\tau(\exp(Dx)-I)(D-\Pi)^{-1}\boldsymbol tτ(exp(Dx)−I)(D−Π)−1t that converges as x→∞x\to\inftyx→∞ to −τ(D−Π)−1t-\boldsymbol\tau(D-\Pi)^{-1}\boldsymbol t−τ(D−Π)−1t. The matrix (D−Π)−1(D-\Pi)^{-1}(D−Π)−1 is the deviation matrix of the phase process, and the same argument, with t\boldsymbol tt replaced by the vector of batch rates, gives the expected count of a Markovian arrival process (Theorem 3.6.1). Theorem 3.2.1 and Lemma 3.2.3 are the two standard ways to compute the distribution of the number of renewals: by solving a linear system of differential equations, and by uniformization.

Formalizing it. These results are proved in the book, and in the earlier literature it cites, by hand. The platform has no continuous-time Markov chain layer and no phase-type objects. The mission builds the PH renewal process from a generator and the matrix exponential, and states the counting probabilities as transition probabilities of the process (N(x),J(x))(N(x),J(x))(N(x),J(x)). The definitions are reusable by every later mission on PH-driven queues.

Difficulty

The obvious route to the goal is to integrate the renewal density: R(x)=1+∫0xτexp⁡(Du)t duR(x)=1+\int_0^x\boldsymbol\tau\exp(Du)\boldsymbol t\,duR(x)=1+∫0x​τexp(Du)tdu. That route is unavailable here for two reasons. First, the density is itself a theorem (Theorem 3.1.2): it must be derived from the counting probabilities P(k,x)P(k,x)P(k,x), which requires exchanging a derivative with an infinite sum over kkk and controlling the tail of the number of renewals. Second, DDD is singular (D1=0D\mathbf 1=\mathbf 0D1=0), so ∫0xexp⁡(Du) du\int_0^x\exp(Du)\,du∫0x​exp(Du)du cannot be written as D−1(exp⁡(Dx)−I)D^{-1}(\exp(Dx)-I)D−1(exp(Dx)−I). The book's argument replaces D−1D^{-1}D−1 by (D−Π)−1(D-\Pi)^{-1}(D−Π)−1, which needs both the nonsingularity of D−ΠD-\PiD−Π (Lemma 3.1.3, which rests on the irreducibility of DDD, Lemma 3.1.1) and the identity π(D−Π)−1=−π\boldsymbol\pi(D-\Pi)^{-1}=-\boldsymbol\piπ(D−Π)−1=−π. A formal proof also has to relate the countable-state process (N(x),J(x))(N(x),J(x))(N(x),J(x)) to finite matrix exponentials, which the next section fixes by construction.

Formalization scope

Phases form an arbitrary finite type; row vectors act on the left, column vectors on the right; all quantities are real. The matrix exponential is Mathlib's NormedSpace.exp. The standing assumptions of the chapter (Tii<0T_{ii}<0Tii​<0, Tij≥0T_{ij}\ge0Tij​≥0, t≥0\boldsymbol t\ge\mathbf 0t≥0, τ≥0\boldsymbol\tau\ge\mathbf 0τ≥0, τ1=1\boldsymbol\tau\mathbf 1=1τ1=1, TTT nonsingular, irreducibility) are hypotheses of every theorem. The counting probabilities are encoded through the generator of (N(x),J(x))(N(x),J(x))(N(x),J(x)) restricted to the levels 0,…,k0,\dots,k0,…,k. Since the number of renewals never decreases, the restriction is the generator of the process killed on leaving level kkk, and P(k,x)P(k,x)P(k,x) is an entry block of its matrix exponential. Where the book inverts a matrix it proves nonsingular, nonsingularity is part of the conclusion. The renewal function is a series, and its convergence is asserted rather than assumed.

The renewal function is defined as an expected number of renewals, not as 1+∫0xτexp⁡(Du)t du1+\int_0^x\boldsymbol\tau\exp(Du)\boldsymbol t\,du1+∫0x​τexp(Du)tdu. That definition would make the renewal density true by construction and reduce the goal to matrix calculus.

Infrastructure that a complete development needs, and that is reusable: the matrix exponential of block upper-triangular matrices, termwise differentiation of matrix power series, uniformization of a finite generator, and the deviation matrix of an irreducible finite generator. Contributions of any of these as separate lemmas are welcome.

Selected references

  • G. Latouche and V. Ramaswami, Introduction to Matrix Analytic Methods in Stochastic Modeling, ASA-SIAM Series on Statistics and Applied Probability, SIAM, 1999, Chapter 3. https://doi.org/10.1137/1.9780898719734
  • M. F. Neuts, A versatile Markovian point process, Journal of Applied Probability 16(4), 764–779, 1979. https://doi.org/10.2307/3213143
  • D. M. Lucantoni, New results on the single server queue with a batch Markovian arrival process, Stochastic Models 7(1), 1–46, 1991. https://doi.org/10.1080/15326349108807174
9 thms2 active usersReviewed
🏆Completed
Markov ChainOperations ResearchProbability+1·Captain: Shuze Chen

Introduction to Matrix Analytic Methods in Stochastic Modeling I: PH Distributions and the Absorption CriterionTextbook

Motivation

Phase-type (PH) distributions are the distributions of absorption times of finite Markov chains. Introduced by Neuts in the 1970s (the book follows his framework, Latouche–Ramaswami, §2.3), they are the standard way to put non-exponential service times, interarrival times and lifetimes into a model while keeping it Markovian: a PH random variable is a walk through finitely many exponential (or geometric) "phases", so a queue or reliability model with PH ingredients is again a Markov chain, now on a state space of levels times phases. Every quasi-birth-and-death process in the matrix analytic literature has PH or Markovian-arrival inputs, and the matrices TTT, −T−1-T^{-1}−T−1 and exp⁡(Tx)\exp(Tx)exp(Tx) studied here reappear in every later chapter of Latouche and Ramaswami's book (SIAM 1999).

This mission formalizes Chapter 2 of that book: the definition of continuous and discrete PH distributions, the formulas for their distribution functions, the criterion for absorption in finite time, and the closure of the discrete family under sums, mixtures and minima.

Setting

Fix a finite set of phases and adjoin an absorbing state 000. A PH representation is a pair (τ,T)(\boldsymbol\tau, T)(τ,T) of a row vector τ\boldsymbol\tauτ and a square matrix TTT indexed by the phases, with

Tii<0,Tij≥0 (i≠j),t:=−T1≥0,τ≥0,τ0:=1−τ1≥0,T_{ii} < 0,\qquad T_{ij} \ge 0 \ (i \ne j),\qquad \boldsymbol t := -T\mathbf 1 \ge 0,\qquad \boldsymbol\tau \ge 0,\qquad \tau_0 := 1 - \boldsymbol\tau\mathbf 1 \ge 0,Tii​<0,Tij​≥0 (i=j),t:=−T1≥0,τ≥0,τ0​:=1−τ1≥0,

where 1\mathbf 11 is the all-ones column vector. The Markov process JJJ on {0}∪{phases}\{0\} \cup \{\text{phases}\}{0}∪{phases} with initial distribution (τ0,τ)(\tau_0, \boldsymbol\tau)(τ0​,τ) and generator

Q=[00tT]Q = \begin{bmatrix} 0 & \mathbf 0 \\ \boldsymbol t & T \end{bmatrix}Q=[0t​0T​]

has transition function P(x)=exp⁡(Qx)P(x) = \exp(Qx)P(x)=exp(Qx), Pab(x)=P[J(x)=b∣J(0)=a]P_{ab}(x) = \mathrm P[J(x) = b \mid J(0) = a]Pab​(x)=P[J(x)=b∣J(0)=a]. The time XXX until absorption into 000 has the PH distribution PH(τ,T)\mathrm{PH}(\boldsymbol\tau, T)PH(τ,T), with distribution function F(x)=P[J(x)=0]=∑a(τ0,τ)aPa0(x)F(x) = \mathrm P[J(x) = 0] = \sum_a (\tau_0, \boldsymbol\tau)_a P_{a0}(x)F(x)=P[J(x)=0]=∑a​(τ0​,τ)a​Pa0​(x). Absorption with probability 1 from phase iii means Pi0(x)→1P_{i0}(x) \to 1Pi0​(x)→1 as x→∞x \to \inftyx→∞; the distribution is nondefective if F(x)→1F(x) \to 1F(x)→1. The expected total time in phase jjj starting from phase iii is Eij=∫0∞Pij(x) dx∈[0,∞]E_{ij} = \int_0^\infty P_{ij}(x)\,dx \in [0, \infty]Eij​=∫0∞​Pij​(x)dx∈[0,∞].

The discrete analogue PHd(τ,T)\mathrm{PH}_d(\boldsymbol\tau, T)PHd​(τ,T) uses a substochastic T≥0T \ge 0T≥0 with t:=1−T1≥0\boldsymbol t := \mathbf 1 - T\mathbf 1 \ge 0t:=1−T1≥0, the transition matrix P=[10tT]P = \begin{bmatrix} 1 & \mathbf 0 \\ \boldsymbol t & T \end{bmatrix}P=[1t​0T​], and the absorption time XXX with P[X≤k]=∑a(τ0,τ)a(Pk)a0\mathrm P[X \le k] = \sum_a (\tau_0, \boldsymbol\tau)_a (P^k)_{a0}P[X≤k]=∑a​(τ0​,τ)a​(Pk)a0​.

Formalization targets

Goal: the absorption criterion (Theorem 2.4.3)

For every PH representation (τ,T)(\boldsymbol\tau, T)(τ,T),

(∀i: lim⁡x→∞Pi0(x)=1)  ⟺  T is nonsingular,\Big(\forall i:\ \lim_{x \to \infty} P_{i0}(x) = 1\Big) \iff T \text{ is nonsingular},(∀i: x→∞lim​Pi0​(x)=1)⟺T is nonsingular,

and if TTT is nonsingular then every expected sojourn time is finite and

Eij=(−T−1)ijfor all phases i,j.E_{ij} = (-T^{-1})_{ij} \qquad \text{for all phases } i, j.Eij​=(−T−1)ij​for all phases i,j.

Milestones

  1. Theorem 2.4.1. F(x)=1−τexp⁡(Tx)1F(x) = 1 - \boldsymbol\tau\exp(Tx)\mathbf 1F(x)=1−τexp(Tx)1 for x≥0x \ge 0x≥0, and F′(x)=τexp⁡(Tx)tF'(x) = \boldsymbol\tau\exp(Tx)\boldsymbol tF′(x)=τexp(Tx)t for x>0x > 0x>0.
  2. Theorem 2.4.2. Every nondefective PH distribution has a representation from every phase of which absorption occurs with probability 1.
  3. Eq. (2.11). For a nonsingular PH rate matrix TTT, ∫0∞exp⁡(Tx) dx=−T−1\int_0^\infty \exp(Tx)\,dx = -T^{-1}∫0∞​exp(Tx)dx=−T−1.
  4. Theorem 2.5.3. For PHd(τ,T)\mathrm{PH}_d(\boldsymbol\tau, T)PHd​(τ,T): P[X=0]=τ0\mathrm P[X = 0] = \tau_0P[X=0]=τ0​, P[X=k]=τTk−1t\mathrm P[X = k] = \boldsymbol\tau T^{k-1}\boldsymbol tP[X=k]=τTk−1t for k≥1k \ge 1k≥1, P[X≤k]=1−τTk1\mathrm P[X \le k] = 1 - \boldsymbol\tau T^k\mathbf 1P[X≤k]=1−τTk1.
  5. Theorem 2.6.1. The sum of independent PHd(τ,T)\mathrm{PH}_d(\boldsymbol\tau, T)PHd​(τ,T) and PHd(β,S)\mathrm{PH}_d(\boldsymbol\beta, S)PHd​(β,S) variables is PHd([τ,τ0β],[Tt⋅β0S])\mathrm{PH}_d\big([\boldsymbol\tau, \tau_0\boldsymbol\beta], \big[\begin{smallmatrix} T & \boldsymbol t\cdot\boldsymbol\beta \\ 0 & S \end{smallmatrix}\big]\big)PHd​([τ,τ0​β],[T0​t⋅βS​]).
  6. Theorem 2.6.2. The mixture θF+(1−θ)G\theta F + (1 - \theta)GθF+(1−θ)G of two discrete PH distribution functions is PHd([θτ,(1−θ)β],diag(T,S))\mathrm{PH}_d\big([\theta\boldsymbol\tau, (1-\theta)\boldsymbol\beta], \mathrm{diag}(T, S)\big)PHd​([θτ,(1−θ)β],diag(T,S)).
  7. Theorem 2.6.4. The minimum of independent PHd(τ,T)\mathrm{PH}_d(\boldsymbol\tau, T)PHd​(τ,T) and PHd(β,S)\mathrm{PH}_d(\boldsymbol\beta, S)PHd​(β,S) variables is PHd(τ⊗β,T⊗S)\mathrm{PH}_d(\boldsymbol\tau \otimes \boldsymbol\beta, T \otimes S)PHd​(τ⊗β,T⊗S).
  8. Theorem 2.6.5. Every probability distribution on N\mathbb NN with finite support is discrete PH.

Significance

The result itself. Theorem 2.4.3 converts a probabilistic property of the absorbing process (absorption in finite time from every phase) into an algebraic one (nonsingularity of TTT), and gives the matrix −T−1-T^{-1}−T−1 its meaning as the matrix of expected sojourn times. Every formula after it in the book assumes it: the Laplace–Stieltjes transform τ0+τ(sI−T)−1t\tau_0 + \boldsymbol\tau(sI - T)^{-1}\boldsymbol tτ0​+τ(sI−T)−1t, the moments k! τ(−T−1)k1k!\,\boldsymbol\tau(-T^{-1})^k\mathbf 1k!τ(−T−1)k1, the mean drift of PH renewal processes in Chapter 3, and the rate and first-passage matrices of the QBD chapters, which are built from PH-structured blocks. The closure theorems are the reason PH distributions are a modelling class at all: sums, mixtures and minima of PH variables stay inside the class, and finitely supported distributions are in it, so it is dense in the distributions on N\mathbb NN.

Formalizing it. All results are classical and proved in the book; none is formalized. Mathlib has the matrix exponential, Kronecker and block matrices, but no phase-type distributions, no generator-to-transition-function interface for absorbing chains, and no expected sojourn times. This mission builds that layer and states the chapter's results on it. It is the substrate for the remaining fourteen missions of the series.

Difficulty

The equivalence in Theorem 2.4.3 connects an asymptotic property of exp⁡(Qx)\exp(Qx)exp(Qx) with the determinant of its transient block. Neither direction is a finite computation: the forward direction must extract finiteness of all sojourn times from the hypothesis that absorption happens almost surely and then identify the sojourn-time matrix as an inverse of TTT; the reverse direction must show that a nonsingular TTT with the sign pattern (2.4) forces exp⁡(Tx)→0\exp(Tx) \to 0exp(Tx)→0 and the integrability of exp⁡(Tx)\exp(Tx)exp(Tx) on (0,∞)(0, \infty)(0,∞), a statement about all xxx that no finite expansion of the exponential series settles. A purely algebraic shortcut through eigenvalues ("TTT is stable") needs the spectral facts about semistable matrices that the book only sketches in Remark 2.4.5. Theorem 2.4.1 already requires the block form of exp⁡(Qx)\exp(Qx)exp(Qx) for the lower block-triangular QQQ, and the closure theorems require tracking powers of block and Kronecker-structured transition matrices.

Formalization scope

Phases form an arbitrary finite type ι; the absorbing state is none in Option ι. Vectors are functions ι → ℝ, row vectors act on the left. On a finite state space the law of the continuous-time process is its transition function, defined as Mathlib's NormedSpace.exp (x • Q); the discrete chain's kkk-step probabilities are the matrix power PkP^kPk. The distribution functions FFF and P[X≤k]\mathrm P[X \le k]P[X≤k] are defined from these transition probabilities, not by the closed formulas of Theorems 2.4.1 and 2.5.3, so those theorems carry content. Absorption with probability 1 is the limit Pi0(x)→1P_{i0}(x) \to 1Pi0​(x)→1; the expected sojourn time is a lower Lebesgue integral in [0,∞][0, \infty][0,∞], so an infinite expected time is never replaced by a junk real 000, and the goal asserts finiteness explicitly. Nonsingularity is IsUnit T.det; it is a hypothesis only where the book assumes it (the "moreover" part of Theorem 2.4.3 and Eq. (2.11)) and a conclusion in the equivalence. The closure theorems are stated through the laws: a convolution of probability mass functions for independent sums, a product of survival functions for independent minima, a convex combination of distribution functions for mixtures; each also asserts that the constructed pair is a valid discrete PH representation. The trivializing formalization, defining FFF by 1−τexp⁡(Tx)11 - \boldsymbol\tau\exp(Tx)\mathbf 11−τexp(Tx)1 or defining absorption by nonsingularity of TTT, is ruled out by these definitions.

Beyond the paper. No variant items are posed. Theorem 2.6.3 (the PH representation of ∑kpkF∗k\sum_k p_k F^{*k}∑k​pk​F∗k) is not in this mission; a planning finding records that its printed representation fails when FFF has an atom at 000.

Needed infrastructure: the block structure of exp⁡(Qx)\exp(Qx)exp(Qx) and of PkP^kPk; nonnegativity and row sums of exp⁡(Qx)\exp(Qx)exp(Qx) for a generator; limits and integrals of matrix exponentials; block-matrix and Kronecker power identities. Most of it is reusable for the PH renewal processes and QBDs of the later missions. Contributions of general lemmas about matrix exponentials of Metzler matrices are welcome.

Selected references

  • G. Latouche and V. Ramaswami, Introduction to Matrix Analytic Methods in Stochastic Modeling, ASA-SIAM Series on Statistics and Applied Probability, SIAM, 1999. https://doi.org/10.1137/1.9780898719734
11 thms2 active usersReviewed
🏆Completed
Operations ResearchOptimizationStatistics·Captain: mikedeng1

A Theory of Statistical Inference for Ensuring the Robustness of Scientific Results: Closed-Form Tethered Hacking Interval for the Least Squares Average Treatment EffectResearch Paper

Why this question arises

Scientific conclusions based on a fitted model can move when an analyst changes the model while keeping its fit to the observed data nearly as good. Coker, Rudin, and King call the resulting range of conclusions a tethered hacking interval. The range measures the sensitivity of a reported statistic to the choice among models under a fixed loss tolerance. Their 2021 paper develops this idea for several inference tasks, including treatment effects in least-squares regression. In that setting, a reader can ask how far the estimated treatment coefficient could move among all models whose residual sum of squares stays below a chosen threshold.

The motivation is concrete: two analysts can use the same observations and the same linear model class, yet choose different coefficient vectors that fit acceptably. A single least-squares coefficient reports the best-fitting vector, but it does not show the range admitted by a specified relaxation of the fit criterion. The interval makes that range explicit. Its endpoints depend on the data and the tolerance rather than on a distributional approximation for an estimator.

Data and model

There are nnn observations and ppp confounder covariates. The confounder design X∈Rn×pX\in\mathbb R^{n\times p}X∈Rn×p has row xiTx_i^\mathsf TxiT​, the outcome vector is Y=(yi)i=1nY=(y_i)_{i=1}^nY=(yi​)i=1n​, and wi∈{0,1}w_i\in\{0,1\}wi​∈{0,1} indicates whether observation iii received treatment. The full design is X~=[X,w]\tilde X=[X,w]X~=[X,w]. A coefficient pair (β,β0)∈Rp×R(\beta,\beta_0)\in\mathbb R^p\times\mathbb R(β,β0​)∈Rp×R predicts xiTβ+β0wix_i^\mathsf T\beta+\beta_0w_ixiT​β+β0​wi​. Its quadratic loss is

L(β,β0)=∑i=1n(yi−xiTβ−β0wi)2.L(\beta,\beta_0)=\sum_{i=1}^{n}(y_i-x_i^\mathsf T\beta-\beta_0w_i)^2.L(β,β0​)=i=1∑n​(yi​−xiT​β−β0​wi​)2.

For a fixed tolerance θ\thetaθ, problems (14) and (15) maximize and minimize β0\beta_0β0​ over all coefficient pairs with L(β,β0)≤θL(\beta,\beta_0)\le\thetaL(β,β0​)≤θ. The two extrema are the endpoints of the tethered hacking interval for the treatment coefficient. The paper gives β0\beta_0β0​ an average causal treatment-effect interpretation under overlap, SUTVA, and conditional ignorability. Those assumptions concern the interpretation of the coefficient; the algebraic optimization result itself uses only the finite data and the quadratic loss.

Several least-squares quantities describe the endpoints. Write βLS∗=(XTX)−1XTY\beta^*_{\mathrm{LS}}=(X^\mathsf TX)^{-1}X^\mathsf TYβLS∗​=(XTX)−1XTY for regression on confounders alone, γLS∗=(XTX)−1XTw\gamma^*_{\mathrm{LS}}=(X^\mathsf TX)^{-1}X^\mathsf TwγLS∗​=(XTX)−1XTw for regression of the treatment indicator on confounders, and β~LS∗=(X~TX~)−1X~TY\tilde\beta^*_{\mathrm{LS}}=(\tilde X^\mathsf T\tilde X)^{-1}\tilde X^\mathsf TYβ~​LS∗​=(X~TX~)−1X~TY for regression on the full design. Let β~0,LS∗\tilde\beta^*_{0,\mathrm{LS}}β~​0,LS∗​ be its treatment coordinate and VttV_{tt}Vtt​ the corresponding diagonal entry of (X~TX~)−1(\tilde X^\mathsf T\tilde X)^{-1}(X~TX~)−1. In this mission, SSE=∥Y−X~β~LS∗∥2\mathrm{SSE}=\|Y-\tilde X\tilde\beta^*_{\mathrm{LS}}\|^2SSE=∥Y−X~β~​LS∗​∥2, the minimum loss for the constrained problems.

Formalization targets

The goal is the complete solution-set statement of Theorem 1, p. 11. When the full design has linearly independent columns and θ≥SSE\theta\ge\mathrm{SSE}θ≥SSE, the unique maximizer and minimizer are, respectively,

β0,max⁡∗=β~0,LS∗+Vttθ−SSE,βmax⁡∗=βLS∗−β0,max⁡∗γLS∗,β0,min⁡∗=β~0,LS∗−Vttθ−SSE,βmin⁡∗=βLS∗−β0,min⁡∗γLS∗.\begin{aligned} \beta^*_{0,\max}&=\tilde\beta^*_{0,\mathrm{LS}}+\sqrt{V_{tt}}\sqrt{\theta-\mathrm{SSE}}, &\beta^*_{\max}&=\beta^*_{\mathrm{LS}}-\beta^*_{0,\max}\gamma^*_{\mathrm{LS}},\\ \beta^*_{0,\min}&=\tilde\beta^*_{0,\mathrm{LS}}-\sqrt{V_{tt}}\sqrt{\theta-\mathrm{SSE}}, &\beta^*_{\min}&=\beta^*_{\mathrm{LS}}-\beta^*_{0,\min}\gamma^*_{\mathrm{LS}}. \end{aligned}β0,max∗​β0,min∗​​=β~​0,LS∗​+Vtt​​θ−SSE​,=β~​0,LS∗​−Vtt​​θ−SSE​,​βmax∗​βmin∗​​=βLS∗​−β0,max∗​γLS∗​,=βLS∗​−β0,min∗​γLS∗​.​

The intermediate targets are both halves of Theorem 4, pp. 13–14, which gives the maximizer and minimizer of any nonzero linear prediction x(new)Tβx^{(\mathrm{new})\mathsf T}\betax(new)Tβ on a least-squares loss sublevel set, followed by the separate maximization and minimization formulas (16) and (17) of Theorem 1. Theorem 4 uses Υ=(XTX)−1x(new)\Upsilon=(X^\mathsf TX)^{-1}x^{(\mathrm{new})}Υ=(XTX)−1x(new) and μ~=θ−SSE/∥XΥ∥\tilde\mu=\sqrt{\theta-\mathrm{SSE}}/\|X\Upsilon\|μ~​=θ−SSE​/∥XΥ∥; the two solutions are βLS∗±μ~Υ\beta^*_{\mathrm{LS}}\pm\tilde\mu\UpsilonβLS∗​±μ~​Υ. Here XXX denotes the entire design of the general regression, so its SSE is the residual loss of that design.

What the result supplies

The theorem gives both endpoint values and the full coefficient vectors that attain them. It shows how the tolerance θ\thetaθ controls the distance of an endpoint from the full least-squares estimate: the half-width is Vttθ−SSE\sqrt{V_{tt}}\sqrt{\theta-\mathrm{SSE}}Vtt​​θ−SSE​. That quantity allows the interval to be compared with a conventional confidence interval after a choice of θ\thetaθ, as the paper does in Theorem 2. The closed form also avoids treating the two constrained optimization problems as unrelated numerical searches.

The paper proves the result in its online appendix, which is absent from the PDF held for this mission. The Lean statements here are draft targets with sorry; no machine-checked proof of them is claimed. A complete formalization would add a reusable finite least-squares design, an exact characterization of linear objectives on its quadratic sublevel sets, and the treatment-column specialization. Theorem 2's calibration, Theorem 3's distributional analysis, and the support-vector-machine result are outside this mission's target.

Where the proof is difficult

The optimizer must be shown to exist, to be the stated vector, and to be the only solution, including when θ=SSE\theta=\mathrm{SSE}θ=SSE and the feasible set contracts to one point. A bound on the optimal objective value alone does not identify the remaining coefficients. Specializing the general regression formula to the treatment column also requires the coefficient block of the full least-squares solution to agree with the confounder-only expressions in (16) and (17). Keeping track of that block and the treatment coordinate is the main algebraic complication. The paper's printed definition of SSE in Theorem 1 uses the regression on XXX alone; that value cannot measure the slack in the full-design constraint and gives incorrect endpoints.

Formalization scope

Vectors are finite functions into R\mathbb RR, designs are Mathlib matrices, and the norm in Theorem 4 is the square root of a finite sum of squares. The treatment indicator is Boolean and is converted to 000 or 111; no intercept is inserted unless it is a column of XXX. The treatment coordinate is the distinguished last column of X~\tilde XX~. The goal describes each entire set of feasible maximizers or minimizers as a singleton, including its confounder coefficients.

The statements explicitly require invertibility of the relevant Gram matrix and θ≥SSE\theta\ge\mathrm{SSE}θ≥SSE. Theorem 4 also requires a nonzero prediction vector. These conditions make the inverse, square root, and quotient formulas meaningful and keep the characterization nonvacuous. The corrected full-design SSE in Theorem 1 is a deliberate change to the printed formula: with X=(1,1)TX=(1,1)^\mathsf TX=(1,1)T, treatment indicator (1,0)T(1,0)^\mathsf T(1,0)T, Y=(1,0)TY=(1,0)^\mathsf TY=(1,0)T and θ=1\theta=1θ=1, the true maximum of β0\beta_0β0​ in (14) is 1+21+\sqrt21+2​, which the full-design SSE (000) reproduces, while the printed regression-on-XXX SSE (1/21/21/2) gives 222. The regression on X~\tilde XX~ is an instance of the same generic least-squares design used for Theorem 4, so β~LS∗\tilde\beta^*_{\mathrm{LS}}β~​LS∗​ and SSE are that design's least-squares coefficients and residual sum of squares. Theorem 4 prints both signs without saying which solves which problem; the formalization assigns β+∗\beta^*_+β+∗​ to the maximization, which is the correct pairing since x(new)TΥ>0x^{(\mathrm{new})\mathsf T}\Upsilon>0x(new)TΥ>0.

A statement asserting only that β0,max⁡∗\beta^*_{0,\max}β0,max∗​ is the optimal value of (14), for instance as the greatest element of the set of feasible treatment coefficients, would not be this mission's goal: the goal states that the solution set of each problem is exactly the given coefficient pair, so it carries the confounder vectors βmax⁡∗,βmin⁡∗\beta^*_{\max},\beta^*_{\min}βmax∗​,βmin∗​, existence and uniqueness. Contributions to the finite least-squares infrastructure and to either optimizer characterization support the mission.

Selected references

  • B. Coker, C. Rudin, and G. King, A Theory of Statistical Inference for Ensuring the Robustness of Scientific Results, Management Science, Articles in Advance, 2021. DOI: 10.1287/mnsc.2020.3818.
7 thms2 active usersReviewed
🏆Completed
Operations Research·Captain: mikedeng1

Controlling Epidemic Spread: Reducing Economic Losses with Targeted Closures: The Effective Reproduction Rate Is Below One if and only if a Linear Matrix Inequality in the Activity Levels HoldsResearch Paper

Why targeted closures matter

A city can reduce contacts by limiting activity in selected neighborhoods. Such a policy affects more than the residents of the closed neighborhood: people travel across neighborhood boundaries, meet there, and carry infection back to their home neighborhoods. A citywide closure ignores these differences in movement and economic cost. Birge, Candogan, and Feng model these links and ask how to curb infection while preserving activity where it is most valuable. Their 2020 working paper gives separate optimization formulations for a large infection regime and a small infection regime; this mission concerns the latter. The paper later uses movement and economic data for New York City, while the theorem here is independent of those data. Birge, Candogan, and Feng, BFI Working Paper 2020-57.

The spatial epidemic model

There are nnn neighborhoods. Neighborhood iii has population Ni>0N_i>0Ni​>0, and its residents spend a fraction τij≥0\tau_{ij}\geq0τij​≥0 of their time in neighborhood jjj. The row sum ∑jτij\sum_j\tau_{ij}∑j​τij​ is at most one; remaining time is spent in isolation. An activity level xj∈[0,1]x_j\in[0,1]xj​∈[0,1] controls contact at destination jjj. This makes the number of infectious contacts depend on where residents of every neighborhood meet, not only where they live.

Each neighborhood has susceptible, exposed, clinically infected, subclinically infected, and recovered populations. The effective contact rate is β\betaβ, the progression rate from exposed to infected is κ\kappaκ, the clinical fraction is ρ\rhoρ, the relative infectiousness of subclinical cases is α\alphaα, the removal rate is γ\gammaγ, and the natural birth and death rate is μ\muμ. The model uses β,κ,γ,μ>0\beta,\kappa,\gamma,\mu>0β,κ,γ,μ>0 and 0≤ρ,α≤10\leq\rho,\alpha\leq10≤ρ,α≤1. At the disease-free equilibrium, the exposed and infected populations vanish and the susceptible population in neighborhood iii equals NiN_iNi​.

The paper separates the infected-coordinate dynamics into a vector F\mathcal FF of new infections and a vector V\mathcal VV of other transfers. In the coordinate order exposed, clinical, subclinical, their Jacobians at the disease-free equilibrium are F(x)F(x)F(x) and VVV, each a 3n×3n3n\times3n3n×3n real matrix. Define λ1(A)\lambda_1(A)λ1​(A) as the greatest modulus of a complex eigenvalue of AAA. The effective reproduction rate in condition (6) is Re=λ1(F(x)V−1)\mathcal R_e=\lambda_1(F(x)V^{-1})Re​=λ1​(F(x)V−1). This is a property of the full infected-coordinate system. Model and condition (6), pp. 7–13.

Formalization targets

The intermediate targets identify the displayed inverse of VVV, the smaller matrix sharing the nonzero eigenvalues of F(x)V−1F(x)V^{-1}F(x)V−1, and its diagonal similarity to a symmetric matrix. They connect condition (6) with a bound on the spectral radius of the reduced matrix. Each target is taken from the proof of Lemma 2.1 in the working paper.

The goal is the paper's Lemma 2.1. Let T=(τij)T=(\tau_{ij})T=(τij​), X=diag⁡(xi)X=\operatorname{diag}(x_i)X=diag(xi​), N^=diag⁡(Ni)\widehat N=\operatorname{diag}(N_i)N=diag(Ni​), and Λ=diag⁡((∑lNlτlk)−1)\Lambda=\operatorname{diag}((\sum_l N_l\tau_{lk})^{-1})Λ=diag((∑l​Nl​τlk​)−1). With A≺BA\prec BA≺B meaning that B−AB-AB−A is positive definite, the target is

Re<1⟺TXΛTT≺N^−1(μ+κ)(μ+γ)(ρ+α(1−ρ))βκ.\mathcal R_e<1\quad\Longleftrightarrow\quad TX\Lambda T^{\mathsf T}\prec \widehat N^{-1}\frac{(\mu+\kappa)(\mu+\gamma)}{(\rho+\alpha(1-\rho))\beta\kappa}.Re​<1⟺TXΛTT≺N−1(ρ+α(1−ρ))βκ(μ+κ)(μ+γ)​.

The strict inequality is the stability condition stated in the paper. The semidefinite program labelled (P2) uses a non-strict inequality to close its feasible region; that optimization problem is outside this mission. Lemma 2.1 and (P2), pp. 13–14.

What the result provides

The left side of Lemma 2.1 is a spectral test on a 3n×3n3n\times3n3n×3n next generation matrix. The right side is a linear matrix inequality in the activity variables because XXX is diagonal and depends linearly on xxx. It therefore supplies the mathematical constraint used by the paper's small infection optimization problem. The theorem states equivalence for the paper's spatial epidemic model; it does not assert that the optimization problem has a solution or that a chosen activity vector minimizes economic loss. Birge, Candogan, and Feng, pp. 13–14.

The working paper proves the lemma in ordinary mathematics. The formalization task is to give its matrices and hypotheses precise Lean definitions, then prove the spectral and positive definiteness statements. The definition of the reproduction rate and the intermediate matrix identities can also support later formal statements about related compartmental models. No machine-checked proof of these draft items is claimed here.

Where the difficulty lies

The matrix F(x)V−1F(x)V^{-1}F(x)V−1 is generally nonsymmetric and has three blocks of infected coordinates. A direct comparison between its entries and a symmetric positive definite matrix does not express the theorem. The paper first relates its nonzero eigenvalues to those of an n×nn\times nn×n matrix, then uses a diagonal similarity to obtain a symmetric matrix. The final equivalence relies on the activity and mobility bounds that make this symmetric matrix positive semidefinite. A matrix statement that starts directly from the reduced symmetric form would omit the spectral reduction at the heart of the lemma.

Formalization scope

Lean uses Fin n for neighborhoods and Fin 3 × Fin n for infected coordinates, in exposed, clinical, subclinical order. All model matrices are real; λ1\lambda_1λ1​ takes the spectral radius after mapping a matrix to complex entries, so complex eigenvalues are included. The inverse in Re\mathcal R_eRe​ is Mathlib's matrix inverse, and A≺BA\prec BA≺B is represented by positive definiteness of B−AB-AB−A. The only numerical instance in the sanity file has one neighborhood, but the theorem quantifies over arbitrary finite nnn.

The standing assumptions include positive populations and rates, nonnegative travel fractions with row sums at most one, clinical and subclinical fractions in [0,1][0,1][0,1], and activity levels in [0,1][0,1][0,1]. The formalization also requires ρ+α(1−ρ)>0\rho+\alpha(1-\rho)>0ρ+α(1−ρ)>0: the paper divides by this quantity without stating the exclusion of ρ=α=0\rho=\alpha=0ρ=α=0. If no one visits destination kkk, its mixing denominator is zero. Under the standing assumptions that entire column of TTT vanishes, so Lean's value 1/0=01/0=01/0=0 has no effect on the theorem. These conventions are part of the model, not optional proof shortcuts.

The proposal includes the full F(x)F(x)F(x) and VVV, their displayed inverse, the paper's reduced matrix, the diagonal similarity, and the Loewner form. Contributions may develop spectral identities for block matrices, diagonal similarity, and positive definite matrix bounds. The large infection linear program, the stability theorem cited from earlier epidemic literature, and the New York City numerical application are beyond this target.

Selected references

  • John R. Birge, Ozan Candogan, and Yiding Feng, Controlling Epidemic Spread: Reducing Economic Losses with Targeted Closures, Becker Friedman Institute Working Paper No. 2020-57, May 18, 2020 (preliminary), especially §2.1, §2.3, and Lemma 2.1. Working paper PDF.
  • John R. Birge, Ozan Candogan, and Yiding Feng, Controlling Epidemic Spread: Reducing Economic Losses with Targeted Closures, Management Science 68(5), 2022, pp. 3175–3195. DOI. This mission's statements and page numbers follow the 2020 working paper.
7 thms2 active usersReviewed
🏆Completed
Operations ResearchOptimization·Captain: mikedeng1

Market Efficient Portfolios in a Systemic Economy: f-Efficient Bank Holdings Exist, Attain Mean Squared Deviation (bᵀv)²/(1ᵀG⁻¹1), and Are Unique if and only if There Are Exactly Two BanksResearch Paper

Motivation

When banks are hit by losses they sell assets to restore their leverage targets, and these fire sales depress prices for every other holder of the same assets. The resulting deviation of market capitalization from its fundamental value is a systemic externality: it depends not on any single bank's portfolio but on how the stock of each asset is distributed across banks. Awiszus, Capponi and Weber (arXiv:2003.10121, Operations Research 2022) ask which distribution of a fixed stock of assets among banks with fixed budgets minimizes this externality, as measured by the expected squared deviation of market capitalization from fundamentals. The question matters to macroprudential regulators, who can influence portfolio overlap among banks, and it connects to the literature on overlapping portfolios and price-mediated contagion (Greenwood, Landier and Thesmar, 2015; Capponi and Larsson, 2015).

The paper's answer is explicit: the optimal mean squared deviation has a closed form, the optimum is computed by a two-step "aggregate first, then allocate" procedure, and the optimal allocation is unique exactly when there are two banks.

Setting

There are KKK assets and NNN banks. A holding matrix Q∈RK×NQ\in\mathbb R^{K\times N}Q∈RK×N records in entry QkiQ_{ki}Qki​ the holding of asset kkk by bank iii, so column iii is bank iii's portfolio. Initial prices are normalized to 111.

  • The vector q∈RKq\in\mathbb R^Kq∈RK gives the total initial holdings of each asset in the banking sector, and b∈RNb\in\mathbb R^Nb∈RN gives the banks' budgets. The feasible holding matrices are
D(q,b)={Q∈RK×N∣Q1N=q, 1K⊤Q=b⊤}.\mathscr D(q,b) = \{Q\in\mathbb R^{K\times N} \mid Q\mathbf 1_N = q,\ \mathbf 1_K^\top Q = b^\top\}.D(q,b)={Q∈RK×N∣Q1N​=q, 1K⊤​Q=b⊤}.
  • Price shocks Z1,…,ZKZ_1,\dots,Z_KZ1​,…,ZK​ have means μ∈RK\mu\in\mathbb R^Kμ∈RK and are uncorrelated with variances σk2\sigma_k^2σk2​, σk>0\sigma_k>0σk​>0 (Assumption 2). Their second-moment matrix is
G=μμ⊤+Diag(σ2).G = \mu\mu^\top + \mathrm{Diag}(\sigma^2).G=μμ⊤+Diag(σ2).
  • The systemic significance vector v∈RNv\in\mathbb R^Nv∈RN (the paper's (3.1)) summarizes each bank's leverage targeting, liquidation strategy and the assets' illiquidity. To first order, the deviation of market capitalization from fundamentals is (Qv)⊤Z(Qv)^\top Z(Qv)⊤Z, and its second moment is the mean squared deviation
MSD(Q)=(Qv)⊤G (Qv).\mathrm{MSD}(Q) = (Qv)^\top G\,(Qv).MSD(Q)=(Qv)⊤G(Qv).
  • A holding matrix Q∗∈D(q,b)Q^*\in\mathscr D(q,b)Q∗∈D(q,b) is f-efficient (Definition 1) if it minimizes MSD\mathrm{MSD}MSD over D(q,b)\mathscr D(q,b)D(q,b).
  • Assumption 3: vi≠vjv_i\neq v_jvi​=vj​ for some i,ji,ji,j, and b⊤v≠0b^\top v\neq 0b⊤v=0.
  • The aggregate problem (4.3) minimizes y⊤Gyy^\top G yy⊤Gy over Dy={y∈RK∣1K⊤y=b⊤v}\mathscr D_y = \{y\in\mathbb R^K \mid \mathbf 1_K^\top y = b^\top v\}Dy​={y∈RK∣1K⊤​y=b⊤v}. With z=G−11Kz = G^{-1}\mathbf 1_Kz=G−11K​, put y∗=b⊤v1K⊤z zy^* = \frac{b^\top v}{\mathbf 1_K^\top z}\,zy∗=1K⊤​zb⊤v​z.

Formalization targets

Goal: Theorem 4.1

Let N,K≥2N,K\ge 2N,K≥2. Then

∃ Q∗ f-efficient withMSD(Q∗)=(b⊤v)21K⊤G−11K,\exists\,Q^*\ \text{f-efficient with}\quad \mathrm{MSD}(Q^*) = \frac{(b^\top v)^2}{\mathbf 1_K^\top G^{-1}\mathbf 1_K},∃Q∗ f-efficient withMSD(Q∗)=1K⊤​G−11K​(b⊤v)2​,

the f-efficient holding matrix is unique if and only if N=2N=2N=2, and in that case it equals

QN=2=1v2−v1( v2q−y∗      y∗−v1q )∈RK×2.Q^{N=2} = \frac{1}{v_2-v_1}\big(\,v_2 q - y^*\;\;\; y^* - v_1 q\,\big)\in\mathbb R^{K\times 2}.QN=2=v2​−v1​1​(v2​q−y∗y∗−v1​q)∈RK×2.

Milestones

  1. GGG is positive definite, G−1G^{-1}G−1 has the Sherman–Morrison form, and 1K⊤G−11K≠0\mathbf 1_K^\top G^{-1}\mathbf 1_K\neq 01K⊤​G−11K​=0 (proof of Lemma 4.1).
  2. Lemma 4.1: y∗y^*y∗ is the unique solution of the aggregate problem (4.3).
  3. Proposition 4.2: for N≥2N\ge2N≥2, K≥1K\ge1K≥1 there is Q∗∈D(q,b)Q^*\in\mathscr D(q,b)Q∗∈D(q,b) with Q∗v=y∗Q^*v=y^*Q∗v=y∗.
  4. Proposition 4.1: Q∗∈D(q,b)Q^*\in\mathscr D(q,b)Q∗∈D(q,b) is f-efficient if and only if Q∗vQ^*vQ∗v solves (4.3).
  5. Remark EC.1.1: Q∗Q^*Q∗ is f-efficient if and only if F vec(Q∗)=(b,q,y∗)F\,\mathrm{vec}(Q^*) = (b,q,y^*)Fvec(Q∗)=(b,q,y∗) for the (2K+N)×KN(2K+N)\times KN(2K+N)×KN matrix FFF of (EC.1.12).
  6. The value computation MSD(Q∗)=(y∗)⊤Gy∗=(b⊤v)2/1K⊤G−11K\mathrm{MSD}(Q^*) = (y^*)^\top G y^* = (b^\top v)^2/\mathbf 1_K^\top G^{-1}\mathbf 1_KMSD(Q∗)=(y∗)⊤Gy∗=(b⊤v)2/1K⊤​G−11K​ (proof of Theorem 4.1 a).
  7. rank(F)=2K+N−2\mathrm{rank}(F) = 2K+N-2rank(F)=2K+N−2 and null(F)=(N−2)(K−1)\mathrm{null}(F) = (N-2)(K-1)null(F)=(N−2)(K−1) (proof of Theorem 4.1 b).

Significance

The result itself. Theorem 4.1 gives the smallest achievable mean squared deviation of market capitalization from fundamentals for a given asset supply, budget profile and systemic significance profile, as an explicit function of the shock moments. It is the benchmark against which the paper measures the inefficiency of observed and diversified holdings (Section 4.2 shows that full diversification is f-efficient only in a degenerate case) and drives the comparative statics of Section 5. Part b) says that with three or more banks efficiency leaves an affine family of optimal allocations of dimension (N−2)(K−1)(N-2)(K-1)(N−2)(K−1), so a regulator has residual freedom to pursue other objectives at no cost in market efficiency.

Formalizing it. The result is proved in the paper; no machine-checked version is known. The formal development delivers the theorem together with a reusable treatment of minimizing a positive definite quadratic form over a hyperplane, the existence part of the transportation-type linear system Q1N=qQ\mathbf 1_N=qQ1N​=q, 1K⊤Q=b⊤\mathbf 1_K^\top Q=b^\top1K⊤​Q=b⊤, Qv=yQv=yQv=y, and an exact rank computation for the structured matrix FFF. The uniqueness characterization in part b) depends on that rank computation, which the paper carries out by Gaussian elimination on block matrices.

Difficulty

The minimization over D(q,b)\mathscr D(q,b)D(q,b) is a KNKNKN-dimensional quadratic program whose objective is degenerate: it depends on QQQ only through the KKK-vector QvQvQv. Strict convexity therefore cannot give uniqueness, since the objective is constant along every direction in which QvQvQv and the constraints do not change, and the obvious argument for part b) fails. Existence is not automatic either: D(q,b)\mathscr D(q,b)D(q,b) is unbounded, and one must show that every point of the hyperplane Dy\mathscr D_yDy​ is attained as QvQvQv by a feasible QQQ, which fails when vvv is constant. The uniqueness statement is a dimension count: it needs the exact rank of the (2K+N)×KN(2K+N)\times KN(2K+N)×KN constraint matrix FFF, whose rows carry exactly two linear dependencies under Assumption 3, so that the solution set has dimension (N−2)(K−1)(N-2)(K-1)(N−2)(K−1), which is positive as soon as N≥3N\ge3N≥3 and K≥2K\ge2K≥2.

Formalization scope

  • Assets are Fin K, banks are Fin N, all quantities are real; holding matrices are Matrix (Fin K) (Fin N) ℝ. The paper's banks 1 and 2 are the indices 0 and 1.
  • G−1G^{-1}G−1 is Mathlib's Matrix.inv, which returns 000 on singular matrices. Every statement that mentions G−1G^{-1}G−1, zzz or y∗y^*y∗ assumes σk>0\sigma_k>0σk​>0 for all kkk (Assumption 2), and every statement that divides by 1K⊤z\mathbf 1_K^\top z1K⊤​z assumes K≥1K\ge1K≥1.
  • The systemic significance vvv is a free parameter in RN\mathbb R^NRN subject to Assumption 3, not derived from the primitives by (3.1). Every result of Section 4 holds for each such vvv, and vvv does not depend on QQQ.
  • Added hypothesis: ∑kqk=∑ibi\sum_k q_k=\sum_i b_i∑k​qk​=∑i​bi​ appears on the statements that need D(q,b)≠∅\mathscr D(q,b)\neq\emptysetD(q,b)=∅ (Proposition 4.2 and Theorem 4.1). The paper derives it from feasibility on p. 11; without it part a) is false.
  • Statements that use only the first half of Assumption 3 (vvv not constant) assume only that half. The goal carries Assumption 3 in full.
  • f-efficiency is an argmin. It is the minimization over D(q,b)\mathscr D(q,b)D(q,b) of Definition 1, and MSD\mathrm{MSD}MSD is the quadratic form (Qv)⊤G(Qv)(Qv)^\top G(Qv)(Qv)⊤G(Qv). Defining f-efficiency as Qv=y∗Qv=y^*Qv=y∗, or defining MSD\mathrm{MSD}MSD through y∗y^*y∗, would remove the optimization from the goal and is ruled out.
  • vec(Q)\mathrm{vec}(Q)vec(Q) is indexed by pairs (asset, bank) instead of stacked columns, and null(F)\mathrm{null}(F)null(F) is the Module.finrank of the kernel of x↦Fxx\mapsto Fxx↦Fx.
  • QN=2Q^{N=2}QN=2 is defined for v∈R2v\in\mathbb R^2v∈R2; the goal transports it along N=2N=2N=2 with Fin.cast.

The development needs the Sherman–Morrison identity for a diagonal-plus-rank-one matrix, the minimizer of a positive definite quadratic form under one linear constraint, explicit constructions in D(q,b)\mathscr D(q,b)D(q,b), and a rank computation. Contributions of reusable lemmas for these, and of proofs of the milestones in any order, are welcome.

Selected references

  • K. Awiszus, A. Capponi, S. Weber, Market Efficient Portfolios in a Systemic Economy, Operations Research 70(2), 2022. Preprint arXiv:2003.10121v3. https://arxiv.org/abs/2003.10121
  • R. Greenwood, A. Landier, D. Thesmar, Vulnerable Banks, Journal of Financial Economics 115(3), 2015. https://doi.org/10.1016/j.jfineco.2014.11.006
  • A. Capponi, M. Larsson, Price Contagion through Balance Sheet Linkages, Review of Asset Pricing Studies 5(2), 2015. https://doi.org/10.1093/rapstu/rav006
  • D. S. Bernstein, Matrix Mathematics, Princeton University Press, 2005.
9 thms2 active usersReviewed
PreviousPage 3 of 6Next

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me