Understanding Machine Learning XVIII: Dimensionality ReductionTextbook
Motivation
Dimensionality reduction maps data in to , , by a linear map , for computational reasons, for generalization (Chapter 19's curse of dimensionality) and for interpretability. Chapter 23 of Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms (doi:10.1017/CBO9781107298019), studies three ways to choose . Principal Component Analysis chooses the pair of compression and recovery matrices that minimizes the total squared reconstruction error, and the answer is the eigenvectors of for the largest eigenvalues (Theorem 23.2). Random projections choose with independent Gaussian entries, and the Johnson–Lindenstrauss lemma says that the norms of any finite set of vectors are then preserved up to with (Lemma 23.4). Compressed sensing exploits sparsity: a matrix with the restricted isometry property compresses every -sparse vector losslessly (Theorem 23.6), the reconstruction can be done by minimization, a linear program, with an error bound that degrades gracefully for approximately sparse inputs (Theorem 23.8, due to Candès), and Gaussian random matrices with rows are RIP with high probability (Theorem 23.9).
Setting
Vectors are functions with , and . The PCA problem (23.1) is , and . A random matrix has independent entries, in Lemma 23.3 and afterwards. is -RIP if for every with (Definition 23.5); is restricted to an index set .
Formalization targets
Goal: Theorem 23.2
Let , , and let be eigenvectors of for its largest eigenvalues, formalized as the first columns of a spectral decomposition with and nonincreasing. Then with minimizes (23.1): for every ,
Milestones
Lemma 23.1 (the reduction of (23.1) to orthonormal and ); Lemma 23.4 (Johnson–Lindenstrauss); Theorem 23.6 (exact recovery under RIP); Theorem 23.8 (Candès' recovery bound); Theorem 23.9 (Gaussian matrices are RIP). Further items: Equation (23.3), Exercise 2, Remark 23.1 (the optimal value ), the eigenvector transfer of §23.1.1, Lemma 23.3, Theorem 23.7, Lemma 23.10, Lemma 23.11 and Lemma 23.12.
Significance
Theorem 23.2 is the Eckart–Young–Mirsky theorem in the form the book states it: PCA is the optimal linear compression-and-recovery scheme in the least-squares sense, and its solution is spectral. The Johnson–Lindenstrauss lemma is the basic tool of randomized dimensionality reduction, with a bound independent of , and the book's variant with explicit constants is what later chapters and the compressed-sensing proofs use. Theorems 23.6–23.9 together are the three "surprising results" of compressed sensing: information-theoretic recoverability from RIP, efficient recovery by convex relaxation, and the existence of RIP matrices by randomness; their proofs, Candès' cone argument and Baraniuk–Davenport–DeVore–Wakin's net-plus-union-bound, are among the cleanest in applied mathematics and are natural formalization targets. On the platform, the mission introduces Gaussian random matrices as product measures and the RIP predicate, usable by later work on sparse recovery.
Difficulty
Lemma 23.1 requires building an orthonormal basis of the range of , padded to vectors when the range has smaller dimension, and the identity ; Equation (23.3) is a trace computation. Theorem 23.2 combines (23.3), the change of basis with , the bound from extending to an orthogonal matrix, and Exercise 2, a rearrangement inequality; Remark 23.1 adds . Lemma 23.3 is the concentration of a variable (Lemma B.12), which must itself be established from the Gaussian moment generating function; the Johnson–Lindenstrauss lemma is then a union bound. Theorem 23.6 is a two-line contradiction with RIP applied to . Theorem 23.8 is the substantial one: the partition of into blocks of largest remaining entries, the bound , the -minimality inequality (23.8), Lemma 23.10, and the two claims combined through (23.5); a formal proof must handle the last, possibly shorter block, which the book's "assume is an integer" sidesteps. Lemma 23.11 is a volumetric net bound; Lemma 23.12 applies the Johnson–Lindenstrauss lemma to the image of an -net of the unit sphere of and closes the gap by the "smallest " argument, and Theorem 23.9 is a union bound over index sets.
Formalization scope
Vectors are plain functions Fin d → ℝ with explicit norms, and matrices are Mathlib matrices, so the objectives are finite sums with no coercions between normed spaces. Random matrices are functions Fin n → Fin d → ℝ with the product of Gaussian laws gaussianReal 0 v, applied through Matrix.of; probability statements bound the outer measure of the failure event, and the failure events of Lemmas 23.4 and 23.12 are written with so that the book's strict conclusions follow. "Eigenvectors corresponding to the largest eigenvalues" is formalized as the first columns of a spectral decomposition with nonincreasing diagonal, which is exactly the set of such systems and avoids Mathlib's eigenvalue ordering conventions. Minimizers (, , ) are arbitrary elements of the argmin.
Five statements are given as their proofs support them, and the item texts say so. Lemma 23.3 and the Johnson–Lindenstrauss lemma are stated for : the printed range (and ) is false, since the upper tail decays like , slower than for (at it fails for ); the audit found this. Lemma 23.1 as printed, "every solution has orthonormal columns and ", is false, since has the same objective as ; the item states what the proof shows, that every is dominated by some with , which is all that (23.2) needs. Theorem 23.9 is stated with : Lemma 23.12 with (so that lies within ) and , followed by a union bound over the at most index sets, gives these constants, and the printed and are not reached by the argument. Theorem 23.8's proof assumes is an integer for simplicity; the statement is given without that assumption, since only the last block of the partition can be short and the block inequality still holds. Lemma 23.3 has , and the Johnson–Lindenstrauss lemma , since for its is and the conclusion fails.
Not stated: §23.1.2 (implementation), Remarks 23.2–23.3, §23.4 (the comparison of PCA and compressed sensing), Exercises 1 and 3–6.
Selected references
- S. Shalev-Shwartz, S. Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press, 2014, Chapter 23. doi:10.1017/CBO9781107298019
- W. B. Johnson, J. Lindenstrauss, Extensions of Lipschitz mappings into a Hilbert space, Contemporary Mathematics 26, 1984. doi:10.1090/conm/026/737400
- E. J. Candès, The restricted isometry property and its implications for compressed sensing, Comptes Rendus Mathématique 346(9–10), 2008. doi:10.1016/j.crma.2008.03.014
- R. Baraniuk, M. Davenport, R. DeVore, M. Wakin, A simple proof of the restricted isometry property for random matrices, Constructive Approximation 28, 2008. doi:10.1007/s00365-007-9003-x
- D. L. Donoho, Compressed sensing, IEEE Transactions on Information Theory 52(4), 2006. doi:10.1109/TIT.2006.871582
- E. J. Candès, T. Tao, Decoding by linear programming, IEEE Transactions on Information Theory 51(12), 2005. doi:10.1109/TIT.2005.858979