If you see this, something is wrong
First published on Tuesday, Jul 21, 2026 and last modified on Wednesday, Jul 22, 2026 by François Chaplais.
ETH Zürich Email
Princeton University Email
UC Davis Email
This is a preprint of a book in preparation by the authors.
We anticipate the focus and content of this manuscript not to change except for the correction of typos and other errors and other minor changes such as including additional homework problems. It can already by used as textbook for a graduate course in Mathematics of Data Science; it has been used as such by the authors at their home institutions.
We welcome suggestions and comments, and would like to learn about any possible errors and typos.
Please contact the authors using the email links above. In fact, this version was improved using many suggestions sent from, and typos found by, many students and readers. Thank you!
Thank you,
Afonso, Thomas, and Amit.
The idea of this book emerged from the classes on “mathematics of data science” that the authors have been teaching at their home institutions Princeton University (AS), UC Davis (TS), and MIT, NYU, and ETH (ASB) . The lecture notes eventually became the basis to this book. While there are specialized books and many advanced research papers on each topic covered in this book, we believe it fills in the gap of being a single source that provides an accessible entry point at an advanced undergraduate, or graduate, level to mathematics of data science. The book can serve readers as a segue to those more advanced and specialized topis. In that light, one of the main purposes of this book is to be used as a textbook at both the (advanced) undergraduate and graduate levels. This book also differs from most texts in the way that it interweaves mathematical theory with some of its applications in data science.
The data science revolution is one of the most profound shifts in modern history, reshaping industries, economies, and societies with unprecedented speed and scale. At its core, the data science revolution is driven by the exponential growth in data, advances in computing power, and the development of sophisticated analytical techniques.
Data science and its cousin artificial intelligence have become a cornerstone of modern decision-making and innovation, penetrating almost all aspects of our life. In healthcare, for example, data science is driving personalized medicine and predictive analytics. By analyzing patient data, healthcare providers can tailor treatments to individual needs, predict potential health issues before they arise, and improve patient outcomes. In finance, data science is revolutionizing risk management, fraud detection, and investment strategies. Algorithms analyze market trends, assess creditworthiness, and identify unusual transactions to mitigate risks and enhance decision-making.
Retailers leverage data science to understand consumer behavior, optimize supply chains, and personalize marketing efforts. The transportation industry benefits from data science through advancements in autonomous vehicles, route optimization, and predictive maintenance. Companies use data to enhance logistics, reduce costs, and improve safety. The energy sector uses data science to optimize resource allocation, predict equipment failures, and enhance energy efficiency. Data-driven insights help in managing renewable energy sources and reducing environmental impact.
From the statistical techniques that form the basis of data analysis to the complex algorithms that power machine learning and artificial intelligence, mathematics is at the heart of data science. Understanding the connection between data science and mathematics is crucial for appreciating the depth and breadth of this revolution.
Data science is an inherently interdisciplinary field that merges techniques from mathematics, statistics, computer science, signal processing, and domain-specific knowledge to extract insights from data. However, at its core, data science is fundamentally about understanding and leveraging patterns in data. This understanding is built on a complex and nuanced foundation of mathematical principles that enable the development of models and algorithms capable of making sense of complex datasets. This book aims to unravel many of these mathematical principles and provide a thorough grounding in the essentials of data science from a rigorous, mathematical perspective.
Mathematics provides the language and framework for formalizing the processes involved in data analysis, from data collection and preprocessing to modeling and evaluation. It offers the tools necessary for designing effective algorithms, making precise predictions, visualizing complex datasets, quantifying uncertainty, and interpreting the results of data-driven experiments. As the field of data science keeps evolving at a rapid speed, new algorithms and techniques are constantly being developed. A strong mathematical foundation enables practitioners to quickly understand and adopt these innovations because they can grasp the underlying principles rather than just following black-box implementations. Moreover, with a solid grasp of mathematics, learning new methods becomes easier.
Also, when algorithms fail to produce correct results in real world applications, we would like to know why they failed. Is it because of mistakes in the experimental setup, did we gather the wrong kind of data, do we have insufficient data, is it because of corrupted measurements, calibration errors, or incorrect modeling assumptions, or perhaps due to fundamentally unrealistic expectations, or is it due to a deficiency of the algorithm itself? If it is the latter, can it be fixed by a better initialization, a more careful tuning of the parameters, or by choosing a different algorithm? Or is a more fundamental modification required, such as developing a different model, including additional prior information, taking more measurements, or a better compensation of calibration errors? How reliable are our algorithms to small changes in the input data and can we explain why an algorithm arrives at a certain prediction?
As we are dealing with larger datasets and we aim for faster and faster throughput, it becomes increasingly important to address the aforementioned challenges in a systematic and principled manner. Thus, a rigorous and thorough study of computational algorithms both from a theoretical and numerical viewpoint is not a luxury, but emerges as an imperative ingredient towards effective data-driven discovery.
While a thorough mathematical framework can never completely avoid some guessing and trial-and-error, it can dramatically reduce the time and resources we spend on trial-and-error. Good mathematical theory can help in predicting if a problem is solvable at all in feasible time. Moreover, fundamental mathematical analysis often leads to new discoveries such as faster or more robust algorithms, and it may reveal hitherto unknown connections to other, already well studied problems.
At the heart of data science lies a rich tapestry of mathematical concepts. Key areas include statistics and probability, linear algebra, optimization, numerical algorithms, analysis, and graph theory, but this list is by no means exhaustive. This book emphasizes the geometric viewpoint of data sets. Specifically, it is a very powerful way to think about a dataset as a point cloud in a high dimensional space for a wide range of analysis tasks such as clustering, classification, dimension reduction, prediction, denoising, outlier detection, and more. In this geometric viewpoint, linear models of data are interpreted as linear subspaces in a Euclidean space, while non-linear models can be viewed as manifolds embedded in the ambient space. Equally powerful is the representation of data points and their interconnections and similarities as a graph and learning using graph algorithms and analysis. In particular, the graph representation provides a powerful way to extend classical methods for function approximation and interpolation to the setting of complex and high dimensional setting of modern data sets. The computational machinery provided by classical harmonic analysis on Euclidean spaces such as Fourier analysis can be extended in this way to more complex geometries and networks.
As data science continues to evolve, new mathematical techniques and approaches will emerge, expanding the possibilities for analyzing and interpreting data. This book provides a solid foundation upon which readers can build their expertise, adapt to new developments, and contribute to the advancement of the field.
Data science also opens a new playground for mathematics, motivating new questions and new areas of mathematical inquiry. For this reason, another goal of this book is to motivate mathematicians (and, in particular, mathematics students) to engage with these topics and to create new mathematics motivated by questions arising from data and computation.
Many of the concepts, algorithms, and methods presented in this book do not only belong in the toolbox of a well trained data scientist, but are also found in the standard repertoire of researchers and practitioners of machine learning and AI.
The purpose of this book is twofold. On the one hand. the book is designed to guide readers through many of the mathematical foundations of data science in a structured and accessible manner. It assumes a basic familiarity with mathematical concepts and aims to build upon this foundation to explore more advanced topics relevant to data science. On the other hand, the selection of data science topics for this book is also guided by our desire to demonstrate how data science leads to deep and exciting mathematical problems, and how (sometimes seemingly unrelated) mathematical concepts can provide key insight into data science tasks. This mutual enrichment is akin to how physics and mathematics have had a vibrant cross-fertilization over many centuries.
While the tools and methods of data science and machine learning that are currently en vogue tend to change quickly, a solid grasp of the underlying mathematical principles provides an enduring foundation that allows one to adapt to, and even shape, the innovations of future data science. We sincerely hope that this book can make a contribution to this endeavor.
What prerequisites should a reader have? An undergraduate level knowledge of linear algebra and probability is assumed.
What is covered in this book? This book contains the material that one might want to teach in either a year-long course or a one-semester course on the mathematical foundations of data science.
The book is separated into sixteen chapters, and an effort was made to intertwine mathematical techniques and motivating applications. It starts with a description of the curious phenomena of high dimensional geometry, taking the opportunity to introduce and recall some probability theory in Chapter 3. It proceeds to discussing linear dimension reduction techniques (such as PCA and truncated SVD) and doing a recap of several linear algebra concepts in Chapter 4. Linear regression and least squares are the central topics in Chapter 5.
We move on to graph theory (including spectral graph theory, and spectral clustering in Chapter 6) and non-linear dimension reduction (including diffusion maps in Chapter 7), continuing to highlight how central the spectrum of matrices formed from data are to understanding the data geometry. Chapter 8 focuses on dimension reduction via randomized methods, including a brief introduction to randomized linear algebra. In Chapter 9 we dive into the tools of optimization that play a key role in data science, such as convex optimization and gradient descent. We explore several classical classification methods in Chapter 10 and present a gentle introduction to Deep Learning in Chapter 11.
In Chapter 12 we analyze the large sample limit of diffusion maps and other non-linear dimensionality reduction methods. The concept and power of convex relaxations is illustrated via the community detection problem in Chapter 13. Chapters 14 and 15 are devoted to probability, the first to Gaussian analysis and concentration of measure, and the second to matrix concentration inequalities. Finally, Chapters 16 and 17 deal with sparse data models, the first one is dedicated to Compressive Sensing, while the second one covers low-rank matrix recovery.
What is not covered in this book? This book does not cover everything related to mathematics of data science. Indeed, there are several topics not included to keep the book at a manageable length. Perhaps the most notable omissions are relevant topics from statistics such as statistical inference and parameter estimation (e.g., Bayesian inference, etc.). There are already excellent textbooks dedicated to these topics, which are also being typically taught in separate courses. Such courses in statistics are of course recommended to those interested in data science, and can be taken either before, after, or in parallel to a course based on this book. The book also does not cover more specialized (but definitely very important) topics like data privacy, which is deeply connected to the mathematics of data science. The book is also at fault to not discuss optimal transport which has gained a lot of attention in mathematical data science. And we do not dive too deep into learning theory (such as VC dimension), as there are already plenty of resources on this topic. Notwithstanding these deliberate omissions, we believe that this book covers most of the foundational mathematical pillars of data science.
At { https://video.ethz.ch/lectures/d-math/2025/autumn/401-4944-20L } you can access videos of lectures given by one of the authors on parts of this book (or see { https://people.math.ethz.ch/ abandeira/videos.html } for more videos on related topics). For the readers that find themselves looking for more problems or exercises: you might enjoy this note [3] which presents many exciting new results in theoretical computer science and high dimensional statistics via mathematical exercises. For open problems related to many topics of this book, you can visit { https://randomstrasse101.math.ethz.ch/ } or [2] (or [1] for a less updated list).
We want to thank our students, colleagues, and readers of earlier drafts of this book, who provided valuable feedback, alerted us to errors, and pointed out typos. Please keep doing so! We are grateful to Junda (Albie) Sheng and Stefan Broecker for generating some of the figures and to Yuan Ni for providing code for some numerical simulations. We are very thankful for the invaluable help that teaching assistants provided while we teach our courses on this topic, including the designing of countless problems and exercises on these topics. A particular thank you to Pedro Abdalla, Kevin Lucca, Anastasia Kireeva, Antoine Maillard, Petar Niz
specialChar{39}{i}c-Nikolac, and Almut Rödder, who have greatly helped with the teaching of classes on Mathematics of Data Science at ETH; many exercises in the book originated as homework problems in these classes [4]. Amit Singer acknowledges support from the Simons Foundation Math+X Investigator Award, AFOSR FA9550-20-1-0266, AFOSR FA9550-23-1-0249, NSF DMS 2009753, NSF DMS 2510039, and NIH/NIGMS R01GM136780-01. Thomas Strohmer acknowledges support from NSF DMS-2208356, NIH R01HL16351, P41EB032840, and DE-SC0023490.
Most of the material in this book will naturally “live” in the context of high dimensions, either motivated by the analysis of high dimensional data or by associating with networks a space whose dimension is the number of network nodes, to name a few. This chapter is about High Dimensions. It discusses the curse of dimensionality, but also many of its blessings. The first is caused by the exponential increase in volume associated with adding extra dimensions to Euclidean space. The latter is a manifestation of an intriguing phenomenon called the concentration of measure. This concentration phenomenon will give rise to many surprising facts about high dimensional geometry that we will discuss. Since several of the results discussed in this chapter require basic tools from probability, we will also review some fundamental probabilistic concepts.
The curse of dimensionality refers to the fact that many algorithmic approaches to problems in \( \mathbb{R}^d\) become exponentially more difficult as the dimension \( d\) grows. The expression “curse of dimensionality” was coined by Richard Bellman to describe the problem caused by the exponential increase in volume associated with adding extra dimensions to Euclidean space [5].
For instance, if we want to sample the unit interval such that the distance between adjacent points is at most 0.01, then 100 evenly-spaced sample points suffice; an equivalent sampling of a five-dimensional unit hypercube with a grid with a spacing of 0.01 between adjacent points would require \( 10^{10}\) sample points. Thus, a modest increase in dimensions results in a dramatic increase in required data points to cover the space at the same density.
Intimately connected to the curse of dimensionality is the problem of overfitting and underfitting. Here, overfitting refers to the issue that an algorithm may show good performance on the training data, but poor generalization to other data. Underfitting in turn, corresponds to poor performance on the training data (and poor generalization to other data). This problem manifests itself in many machine learning algorithms.
We will discuss a toy example from image classification in more detail to illustrate the underlying issues. Assume we want to classify images into two groups, cars and bicycles, say. From the vast number of images depicting cars or bicycles, we are only able to obtain a small number of training images, say five images of cars and five images of bicycles. We want to train a simple linear classifier based on these ten labeled training images to correctly classify the remaining unlabeled car/bicycle images. We start with a simple feature, e.g. the amount of red pixels in each image. However, this is unlikely to give a linear separation of the training data. We add more features and eventually the training images become linearly separable. This might suggest that increasing the number of features until perfect classification of the training data is achieved, is a sound strategy. However, as we linearly increase the dimension of the feature space, the density of our training data decreases exponentially with the feature dimension.
In other words, to maintain a comparable density of our training data, we would need to increase the size of the dataset exponentially – the curse of dimensionality. Thus, we risk producing a model that could be very good at predicting the target class on the training set, but it may fail miserably when faced with new data. This means that our model does not generalize from the training data to the test data, leading to large generalization error. The generalization error is an important concept in data science and machine learning, since it measures how accurately an algorithm can predict outcomes for new, unseen data. As such, it indicates the data science model’s ability to perform well beyond the training data, and is closely related to the concept of overfitting.
When we peel an orange, then after having removed the rind we are still left with the majority of the orange. Suppose now we peel a \( d\) -dimensional orange for large \( d\) , then after removing the orange peel we would be left with essentially nothing. The reason for this – from a healthy nutrition viewpoint discouraging – fact is that for a \( d\) -dimensional unit ball almost all of its volume is concentrated near the boundary sphere. This is just one of many surprising phenomena in high dimensions. Many of these surprises are actually a manifestation of some form of concentration of measure that we will analyze in more detail in the next section (and then these surprises are no longer so startling).
When introducing data analysis concepts, we typically use only a few dimensions in order to facilitate visualization. However, our intuition about space, which is naturally based on two and three dimensions, can often be misleading in high dimensions. Many properties of even very basic objects become counterintuitive in higher dimensions. Understanding these paradoxical properties is essential in data analysis as it allows us to avoid pitfalls in the design of algorithms and statistical methods for high-dimensional data. It is therefore instructive to analyze the shape and properties of some basic geometric forms that we understand very well in dimensions two and three, in high dimensions.
To that end, we will look at some of the properties of the sphere and the cube as the dimension increases. The \( d\) -dimensional hyperball of radius \( R\) is defined by
the \( d\) -dimensional hypersphere (or \( d\) -sphere) of radius \( R\) is given by
and the \( d\) -dimensional hypercube with side length \( 2R\) is the subset of \( \mathbb{R}^d\) defined as the \( d\) -fold product of intervals \( [-R, R]\) :
If there is no danger of confusion, we may write \( B^d\) for the unit ball \( B^d(1)\) , \( S^{d-1}\) for the unit sphere \( S^{d-1}(1)\) , and \( C^d\) for the unit hypercube \( C^d(\frac{1}{2})\) .
In the rest of this section we will establish a variety of (at first) surprising properties of high dimensional geometry. To illustrate the connections between geometry and probability we will derive some of the results first using analytical tools (computing volumes and integrals) and then using tools from Probability, namely concentration inequalities (which the reader might agree gives more elegant arguments). The goal here is not to get the best bounds, but to illustrate these properties and showcase the duality between geometry and probability.
Proposition 1
The volume of \( B^d(R)\) is given by
(1)
Proof
The volume of \( B^{d}(R)\) is given by
(2)
where \( s_d\) denotes the (hyper-)surface area of a unit \( d\) -sphere. A unit \( d\) -sphere must satisfy
Recall that the Gamma function is given by
hence \( \frac{1}{2} s_d \Gamma(\frac{d}{2}) = \Big[ \Gamma(\frac{1}{2}) \Big]^d = \big( \pi^{\frac{1}{2}}\big)^d,\) and thus \( s_d = \frac{2 \pi^{\frac{d}{2}} }{\Gamma(\frac{d}{2})}.\) Plugging this expression into (2) gives
(3)
Recall that for even \( d\) , we have \( \Gamma(d/2) = (d/2 - 1)!\) . To understand the asymptotic behavior \( \rm{Vol}(B^d(R))\) we can use the celebrated Stirling’s Formula,
we obtain an approximation for the volume of the unit \( d\) -ball for large \( d\)
(4)
where \( \approx\) means that the quotient goes to \( 1\) as the relevant parameter, in this case \( d\) , goes to \( \infty\) .
Since the denominator in the parenthesis of equation (4) goes to infinity, the volume of the unit \( d\) -sphere goes rapidly to \( 0\) as the dimension \( d\) increases to infinity, see also Figure 1. Notice that this would still be the case for any fixed radius \( R\) .
Thus, unit spheres in high dimensions have almost no volume—compare this to the unit cube, which has volume \( 1\) in any dimension. For \( B^d(R)\) to have volume equal to 1, its radius \( R\) must be approximately (asymptotically) equal to \( \sqrt{\frac{d}{2\pi e}}\) .
If we take an orange and cut it into slices, then the slices near the center are larger since the sphere is wider there. This effect increases dramatically (exponentially with the dimension) with increasing dimension. Assume we want to cut off a slab around the “equator ” of the \( d\) -unit ball such that 99% of its volume is contained inside the slab. In two dimensions the width of the slab has to be almost 2, so that 99% of the volume are captured by the slab. But as the dimension increases the width of the slab gets rapidly smaller. Indeed, in high dimensions only a very thin slab is required, since nearly all the volume of the unit ball lies a very small distance away from the equator. The following theorem makes the considerations above precise.
Fact 1
Almost all the volume of \( B^d(R)\) lies near its equator.
Proof
It suffices to prove the result for the unit \( d\) -ball. Without loss of generality we pick as “north” the direction \( x_1\) . The intersection of the sphere with the plane \( x_1=0\) forms our equator, which is formally given by the \( d-1\) -dimensional region \( \{x: \|x\| \le 1, x_1=0\}\) , where \( \|x\|\) is the Euclidean norm of \( x\) . This intersection is a sphere of dimension \( d-1\) with volume \( \rm{Vol}(B^{d-1})\) given by the \( (d-1)\) -analog of formula (3) with \( R=1\) .
We now compute the volume of \( B^d\) that lies between \( x_1=0\) and \( x_1=p_0\) . Let \( P_0=\{x: \|x\|\le 1, x_1\ge p_0\}\) be the “polar cap”, i.e., part of the sphere above the slab of width \( 2p_0\) around the equator. To compute the volume of the cap \( P\) we will integrate over all slices of the cap from \( p_0\) to 1. Each such slice will be a sphere of dimension \( d-1\) and radius \( \sqrt{1-p^2}\) , hence its volume is \( (1-p^2)^{\frac{d-1}{2}} \rm{Vol}(B^{d-1})\) . Therefore
Using \( e^x \ge 1+x\) for all \( x\) we can upper bound this integral by
where \( \rm{erfc}(x) = \frac{2}{\sqrt{\pi}}\int_x^{\infty} e^{-u^2}\,du\) is the complementary error function. The upper bound \( \rm{erfc}(x) \leq \frac{e^{-x^2}}{\sqrt{\pi} x}\) gives
(5)
Recall, from (3) that \( \rm{Vol}(B^{d}) = \frac{\pi^{\frac{d}{2}} }{\frac{d}{2} \Gamma(\frac{d}{2})}\) , so, for \( d\) large enough (since \( \frac{\Gamma(\frac{d}{2})}{\Gamma(\frac{d-1}{2})} \approx \sqrt{\frac{d}2}\) ),
(6)
Finally, combining (5) and (6) shows that the ratio between the volume of the polar caps and the entire hypersphere is bounded by
The expression above shows that this ratio decreases exponentially as both \( d\) and \( p\) increase, proving our claim that the volume of the sphere concentrates strongly around its equator.
We consider two concentric balls \( B^d(1)\) and \( B^d(1-\varepsilon)\) . Using equation (3), the ratio of their volumes is
(7)
Clearly, for every \( \varepsilon\) this ratio tends to zero as \( d \to \infty\) . This implies that the spherical shell given by the region between \( B^d(1)\) and \( B^d(1-\varepsilon)\) will contain most of the volume of \( B^d(1)\) for large enough \( d\) even if \( \varepsilon\) is very small. How quickly does the volume concentrate at the surface of \( B^d(1)\) ? We choose \( \varepsilon\) as a function of \( d\) , e.g. \( \varepsilon = \frac{t}{d}\) , then
Thus, almost all the volume of \( B^d(R)\) is contained in an annulus of width \( R/d\) .
Therefore, if we peel a \( d\) -dimensional orange—and even if we peel it very carefully so that we remove only a very thin layer of its peel—we will have removed most of the orange and are left with almost nothing.
We have seen that most of the volume of the hypersphere is concentrated near its surface. A similar result also holds for the hypercube, and it is indeed a tendency for high-dimensional geometric objects. Yet, the hypercube exhibits an even more interesting volume concentration behavior, which we will establish below.
We start with a basic observation.
Proposition 2
The hypercube \( C^d\) has volume 1 and diameter \( \sqrt{d}\) .
The above proposition, although mathematically trivial, hints already at a somewhat counterintuitive behavior of the cube in high dimensions. Its corners seem to get “stretched out” more and more, while the rest of the cube must “shrink” to keep the volume constant. This property becomes even more striking when we compare the cube with the sphere as the dimension increases.
In two dimensions (Figure 2), the unit square is completely contained in the unit sphere. The distance from the center to a vertex (radius of the circumscribed sphere) is \( \frac{\sqrt{2}}{2}\) and the apothem (radius of the inscribed sphere) is \( \frac{1}{2}\) . In four dimensions (Figure 3), the distance from the center to a vertex is \( 1\) , so the vertices of the cube touch the surface of the sphere. However, the apothem is still \( \frac{1}{2}\) . The result, when projected in two dimensions no longer appears convex, however all hypercubes are convex. This is part of the strangeness of higher dimensions - hypercubes are both convex and “pointy.” In dimensions greater than \( 4\) the distance from the center to a vertex is \( \frac{\sqrt{d}}{2} > 1\) , and thus the vertices of the hypercube extend far outside the sphere, cf. Figure 4.
The considerations above suggest the following observation:
Fact 2
Most of the volume of the high-dimensional cube is located in its corners.
Proof
Let \( C^d\) denote the unit hypercube. The subset \( Q_R\) of \( C^d\) of points \( x\in\mathbb{R}^d\) whose distance to the center is smaller that \( R\) (\( Q_R = \{x\in C^d: \|x\|\leq R\}\) ) is given by \( Q = C^d\cap B^d(R)\) . Thus
which goes to zero as long as \( R<\sqrt{\frac{d}{2\pi e}}\) . This shows that most of the volume of \( C^d\) lies in points at distance of order \( \sqrt{d}\) of the center.
We briefly review some fundamental concepts from probability theory, which are helpful or necessary to understand the blessings of dimensionality and some of the surprises encountered in high dimensions. More advanced probabilistic concepts will be presented in Chapter 14. We assume that the reader is familiar with elementary probability as is covered in introductory probability courses (see, for example [6, 7]).
The two most basic concepts in probability associated with a random variable \( X\) are expectation (or mean) and variance, denoted by
respectively.
A useful identity is the Law of Total Variance. This fundamental theorem in probability theory decomposes the variance of a random variable into two distinct components: the variance that can be explained by another variable and the variance that remains as “noise.” Let \( X\) and \( Y\) be random variables on the same probability space, and assume that the variance of \( X\) is finite. The Law of Total Variance states
(8)
The two terms have a natural interpretation:
An important tool to describe probability distributions is the moment generating function (MGF) of \( X\) , defined by
(9)
the choice of nomenclature can be easily justified by expanding \( M_X(t)\) in a series. The \( p\) -th moment of \( X\) is defined by \( \mathbb{E}[X^p]\) for \( p >0\) and the \( p\) -th absolute moment is \( \mathbb{E}[|X|^p]\) .
We can introduce \( L^p\) -norms of random variables by taking the \( p\) -th root of moments, i.e.,
with the usual extension to \( p=\infty\) by setting
Let \( (\Omega,\Sigma,\mathbb{P})\) be a probability space, where \( \Sigma\) denotes a \( \sigma\) -algebra on the sample space \( \Omega\) and \( \mathbb{P}\) is a probability measure on \( (\Omega,\Sigma).\) For fixed \( p\) the vector space \( L^p(\Omega,\Sigma,\mathbb{P})\) consists of all random variables \( X\) on \( \Omega\) with finite \( L^p\) -norm, i.e.,
The random variable can be viewed as a (measurable) map \( X:\Omega\to\mathbb{R}\) (or \( \mathbb{C}\) ). We will usually not mention the underlying probability space. For example, we will often simply write \( L^p\) for \( L^p(\Omega,\Sigma,\mathbb{P})\) .
The case \( p=2\) deserves special attention since \( L^2\) is a Hilbert space with inner product and norm
respectively. Note that the standard deviation \( \sigma(X):=\sqrt{\rm{Var}(X)}\) of \( X\) can be written as
The covariance of the random variables \( X\) and \( Y\) is
(10)
We recall a few classical inequalities for random variables. Hölder’s inequality states that for random variables \( X\) and \( Y\) on a common probability space and \( p,q \ge 1\) with \( 1/p +1/q =1\) , there holds
(11)
The special case \( p=q=2\) is the Cauchy-Schwarz inequality
(12)
Jensen’s inequality states that for any random variable \( X\) and a convex function \( \phi: \mathbb{R} \to \mathbb{R}\) , we have
(13)
Since \( \phi(x) = x^{q/p}\) is a convex function for \( q\geq p \geq 0\) , it follows immediately from Jensen’s inequality that
Minkovskii’s inequality states that for any \( p \in [0,\infty]\) and any random variables \( X, Y\) , we have
(14)
which can be viewed as the triangle inequality.
The cumulative distribution function of \( X\) is defined by
We have \( \mathbb{P}\{X > t\} = 1 -F_X(t),\) where the function \( t \mapsto \mathbb{P} \{ |X| \ge t \}\) is called the tail of \( X\) . The following lemma establishes a close connection between expectation and tails.
Proposition 3 (Integral identity)
Let \( X\) be a non-negative random variable. Then
The two sides of this identity are either finite or infinite simultaneously.
Given an event \( E\) with non-zero probability,\( \mathbb{P}(\cdot |E)\) denotes conditional probability, furthermore for a random variable \( X\) we use \( \mathbb{E}[X|E]\) to denote the conditional expectation.
Markov’s inequality is a fundamental tool to bound the tail of a random variable in terms of its expectation.
Proposition 4
For any non-negative real random variable \( X\) we have
(15)
We provide two versions of the same proof, one using the language of conditional expectations.
Proof
Let \( {\mathcal I}\) denote the event \( \{X \ge t\}\) . Then
where \( p(s)\) denotes the probability of \( s\) ; in case of continuous variables this should be replaced with the density function and \( \sum\) with an integral.
Since \( X\) is non-negative, it holds \( \sum_{s \in {\mathcal I}^c} p(s) X(s) \ge 0\) and
Proof (Using the language of conditional expectation)
where we take the product to be zero if the probability is zero.
Since \( X\) is non-negative, it holds \( \mathbb{P}(X<t) \mathbb{E}[X | X<t] \geq 0\) . Also, \( \mathbb{E}[X | X \geq t] > t\) . Hence,
An important consequence of Markov’s inequality is Chebyshev’s inequality.
Corollary 1
Let \( X\) be a random variable with mean \( \mu\) and variance \( \sigma^2\) . Then, for any \( t>0\)
(16)
Chebyshev’s inequality, which follows by applying Markov’s inequality to the non-negative random variable \( Y = (X - \mathbb{E}[X])^2\) , is a form of concentration inequality, as it guarantees that \( X\) must be close to its mean \( \mu\) whenever the variance of \( X\) is small. Both, Markov’s and Chebyshev’s inequality are sharp, i.e., in general they cannot be improved.
Markov’s inequality only requires the existence of the first moment. We can say a bit more if in addition the random variable \( X\) has a moment generating function in a neighborhood around zero, that is, there is a constant \( b>0\) such that \( \mathbb{E} [ e^{\lambda (X-\mu)}]\) exists for all \( \lambda \in [0,b]\) . In this case we can apply Markov’s inequality to the random variable \( Y = e^{\lambda (X-\mu)}\) and obtain the generic Chernoff bound
(17)
In particular, optimizing over \( \lambda\) in order to obtain the tightest bound in (17) gives
Gaussian random variables are among the most important random variables. A Gaussian random variable \( X\) with mean \( \mu\) and standard deviation \( \sigma\) has a probability density function given by
(18)
We write \( X \sim {\mathcal N}(\mu,\sigma^2)\) . We call a Gaussian random variable \( X\) with \( \mathbb{E}[X] = 0\) and \( \mathbb{E}[X^2] = 1\) a standard Gaussian or standard normal (random variable). In this case we have the following tail bound.
Proposition 5 (Gaussian tail bounds)
Let \( X \sim {\mathcal N}(\mu,\sigma^2)\) . Then for all \( t>0\)
(19)
Proof
Without loss of generality we consider \( \mu=0\) and \( \sigma=1\) , as it is straightforward to extend to the general case with a change of variables. We use the moment-generating function \( \lambda \mapsto \mathbb{E}[e^{\lambda X}]\) . A simple calculation gives
where we have used the fact that \( \int_{-\infty}^{\infty} e^{ -(x- \lambda)^2/2} \, dx\) is just the entire Gaussian integral shifted and therefore its value is \( \sqrt{2\pi}\) . We now apply Chernoff’s bound (17) and obtain \( \mathbb{P}(X \geq t) \le \mathbb{E}[e^{\lambda X}] e^{-\lambda t}\) . Minimizing this expression over \( \lambda\) gives \( \lambda=t\) and thus \( \mathbb{P} (X \geq t) \le e^{-t^2/2}\) .
Definition 1
A random variable \( X\) with mean \( \mu = \mathbb{E}[X]\) is called sub-Gaussian if there is a positive number \( \sigma\) such that
Note that \( \sigma^2\) is not necessarily the variance of \( X\) . If \( X\) satisfies the above definition, we also say that \( X\) is sub-Gaussian with parameter \( \sigma\) , or \( X\) is \( (\mu,\sigma)\) sub-Gaussian in case we want to emphasize \( \mu\) as well. Clearly, owing to the symmetry in the definition, \( -X\) is sub-Gaussian if and only if \( X\) is sub-Gaussian. Obviously, any Gaussian random variable with variance \( \sigma^2\) is sub-Gaussian with parameter \( \sigma\) . We refer to [8] for other, equivalent, definitions of sub-Gaussian random variables.
Combining the moment condition in Definition 1 with calculations similar to those that lead us to the Gaussian tail bounds in 5, yields the following concentration inequality for sub-Gaussian random variables.
Proposition 6 (Sub-Gaussian tail bounds)
Assume \( X\) is sub-Gaussian with parameter \( \sigma\) . Then for all \( t>0\)
(20)
An important example of non-Gaussian, but sub-Gaussian random variables are Rademacher random variables. A Rademacher random variable \( \varepsilon\) takes on the values \( \pm 1\) with equal probability and is sub-Gaussian with parameter \( \sigma\) . Indeed, any bounded random variable is sub-Gaussian (see Remark 1).
While many important random variables have a sub-Gaussian distribution, this class does not include several frequently occurring distributions with heavier tails. A classical example is the chi-squared distribution, which we will discuss at the end of this chapter.
Relaxing slightly the condition on the moment-generating function in Definition 1 leads to the class of sub-exponential random variables.
Definition 2
A random variable \( X\) with mean \( \mu = \mathbb{E}[X]\) is called sub-exponential if there are parameters \( \nu, b\) such that
Clearly, a sub-Gaussian random variable is sub-exponential (set \( \nu = \sigma\) and \( b=0\) , where \( 1/b\) is interpreted as \( +\infty\) ). However, the converse is not true. Take for example \( X \sim {\mathcal N}(0,1)\) and consider the random variable \( Z=X^2\) . For \( \lambda < \frac{1}{2}\) it holds that
(21)
However, for \( \lambda \ge \frac{1}{2}\) the moment-generating function does not exist, which implies that \( X^2\) is not sub-Gaussian. But \( X^2\) is sub-exponential. Indeed, a brief computation shows that
which in turn implies that \( X^2\) is sub-exponential with parameters \( (\nu,b)=(2,4)\) .
Following a similar procedure that yielded sub-Gaussian tail bounds produces concentration inequalities for sub-exponential random variables. However, in this case we see two different types of concentration emerging, depending on the value of \( t\) . In particular, we see a sub-exponential tail behavior.
Proposition 7 (Sub-exponential tail bounds)
Assume \( X\) , with mean \( \mu\) , is sub-exponential with parameters \( (\nu,b)\) . Then
(22)
Both the sub-Gaussian property and the sub-exponential property is preserved under summation for independent random variables, and the associated parameters transform in a simple manner (see Remark 1).
Suppose we wish to predict the outcome of an event of interest. One natural approach would be to compute the expected value of the object. However, how can we tell how good the expected value is to the actual outcome of the event? Without further information of how well the actual outcome concentrates around its expectation, the expected value is of little use. We would like to have an estimate for the probability that the actual outcome deviates from its expectation by a certain amount. This is exactly the role that concentration inequalities play in probability and statistics.
The concentration of measure phenomenon plays a central role in the asymptotic geometry of Banach spaces and in high dimensional probability; see the work of Vitali Milman and Ledoux’s monograph [9, 10].
The celebrated law of large numbers of classical probability theory is the most well known form of concentration of measure; it states that sums of independent random variables are, under very mild conditions, close to their expectation with a large probability. We will see various quantitative versions of such concentration inequalities throughout this course. Some deal with sums of scalar random variables, others with sums of random vectors or sums of random matrices. Such concentration inequalities are instances of what is sometimes called Blessings of dimensionality (cf. [11]). This expression refers to the fact that certain random fluctuations can be well controlled in high dimensions, while it would be very complicated to make such predictive statements in moderate dimensions.
Concentration and large deviations inequalities are among the most useful tools when understanding the performance of some algorithms. We start with two of the most fundamental results in probability. We refer to Sections 1.7 and 2.4 in [6] for the proofs and variations.
Theorem 1 (Strong law of large numbers)
Let \( X_1,X_2,\dots \) be a sequence of i.i.d. random variables with mean \( \mu\) . Denote
Then, as \( n \to \infty\)
(23)
The celebrated central limit theorem tells us that the limiting distribution of a sum of i.i.d. random variables is always Gaussian. The best known version is probably due to Lindeberg-Lévy.
Theorem 2 (Lindeberg-Lévy Central limit theorem)
Let \( X_1,X_2,\dots \) be a sequence of i.i.d. random variables with mean \( \mu\) and variance \( \sigma^2\) . Denote
and consider the normalized random variable \( Z_n\) with mean zero and variance one, given by
Then, as \( n \to \infty\)
(24)
The strong law of large numbers and the central limit theorem give us qualitative statements about the behavior of a sum of i.i.d. random variables. In many applications it is desirable to be able to quantify how such a sum deviates around its mean. This is where concentration inequalities come into play.
The intuitive idea is that if we have a sum of independent random variables
where \( X_i\) are i.i.d. centered random variables, then while the value of \( X\) can be of order \( \mathcal{O}(n)\) it will very likely be of order \( \mathcal{O}(\sqrt{n})\) (note that this is the order of its standard deviation). The inequalities that follow are ways of very precisely controlling the probability of \( X\) being larger (or smaller) than \( \mathcal{O}(\sqrt{n})\) . While we could use, for example, Chebyshev’s inequality for this, in the inequalities that follow the probabilities will be exponentially small, rather than just quadratically small, which will be crucial in many applications to come. Moreover, unlike the classical central limit theorem, the concentration inequalities below are non-asymptotic in the sense that they hold for all fixed \( n\) and not just for \( n \to \infty\) (but the larger the \( n\) , the stronger the inequalities become).
Theorem 3 (Hoeffding’s Inequality)
Let \( X_1,X_2,…,X_n\) be independent bounded random variables with \( |X_i| \leq a_i\) and \( \mathbb{E}[X_i]=0\) . Then,
The inequality implies that fluctuations larger than \( \mathcal{O}\left(\sqrt{n}\right)\) have small probability. For example, if \( a_i=a\) for all \( i\) , setting \( t=a\sqrt{2n\log n}\) yields that the probability is at most \( \frac{2}{n}\) .
Proof
We prove the result for the case \( |X_i| \le a\) , the extension to the case \( |X_i| \leq a_i\) is straightforward. We first get a probability bound for the event \( \sum_{i=1}^n X_i > t\) . The proof, again, will follow from Markov. Since we want an exponentially small probability, we use a classical trick that involves exponentiating with any \( \lambda>0\) and then choosing the optimal \( \lambda\) .
(25)
where the penultimate step follows from Markov’s inequality and the last equality follows from independence of the \( X_i\) ’s.
We now use the fact that \( |X_i|\leq a\) to bound \( \mathbb{E}[e^{\lambda X_i}]\) . Because the function \( f(x) = e^{ \lambda x}\) is convex,
for all \( x\in[-a,a]\) .
Since, for all \( i\) , \( \mathbb{E}[X_i]=0\) we get
Note that
Hence,
(26)
Together with (25), this gives
This inequality holds for any choice of \( \lambda\geq 0\) , so we choose the value of \( \lambda\) that minimizes
Differentiating readily shows that the minimizer is given by
which satisfies \( \lambda >0\) . For this choice of \( \lambda\) ,
Thus,
By using the same argument on \( \sum_{i=1}^n \left( - X_i\right)\) , and union bounding over the two events we get,
Remark 1 (Hoeffding’s inequality and sub-Gaussianity)
It is useful to dissect the proof of Hoeffding’s inequality. Notice that the proof was carried out by showing two things: (i) that the sum of independent sub-Gaussian random variables is sub-Gaussian with parameter whose square is the sum of the squares of the sub-Gaussian parameters of the original random variables (this is effectively what is proven in (25)), and (ii) that bounded random variables are sub-Gaussian (shown in (26)).
Remark 2
Hoeffding’s inequality is suboptimal in a sense we now describe. Let us say that we have random variables \( r_1,\dots, r_n\) i.i.d. distributed as
Then, \( \mathbb{E}(r_i)=0\) and \( |r_i|\leq 1\) so Hoeffding’s inequality gives:
Intuitively, the smaller \( p\) is, the more concentrated \( \left|\sum_{i=1}^n r_i\right|\) should be, however Hoeffding’s inequality does not capture this behaviour.
A natural way to attempt to capture this behaviour is by noting that the variance of \( \sum_{i=1}^n r_i\) depends on \( p\) as \( \mathrm{Var}(r_i) = p\) . The inequality that follows, Bernstein’s inequality, uses the variance of the summands to improve over Hoeffding’s inequality.
The way this is going to be achieved is by strengthening the proof above, more specifically in step (25) we will use the bound on the variance to get a better estimate on \( \mathbb{E}[e^{\lambda X_i}]\) essentially by realizing that if \( X_i\) is centered, \( \mathbb{E} X_i^2 = \sigma^2\) , and \( |X_i|\leq a\) then, for \( k\geq 2\) , \( \mathbb{E} X_i^k \leq \mathbb{E} |X_i|^k \leq a^{k-2}\mathbb{E} |X_i|^{2} \leq a^{k-2} \sigma^2= \left( \frac{\sigma^2}{a^2} \right)a^k\) .
Theorem 4 (Bernstein’s Inequality)
Let \( X_1,X_2,…,X_n\) be independent centered bounded random variables satisfying \( |X_i| \leq a\) and \( \mathbb{E}[X_i^2]=\sigma^2\) . Then,
Remark 3
Before proving Bernstein’s inequality, note that for the example of Remark 2 we get
which exhibits a dependence on \( p\) and, for small values of \( p\) (and appropriate values of \( t\) ) is considerably smaller than what Hoeffding’s inequality gives.
{Proof.}
As before, we will prove
and then union bound with the same result for \( - \sum_{i=1}^n X_i\) , to prove the Theorem.
For any \( \lambda >0\) we have
The following calculations reveal the source of the improvement over Hoeffding’s inequality.
Therefore,
We will use a few simple inequalities (that can be easily proved with calculus) such as \( 1+x \leq e^x, \text{for all } x\in\mathbb{R}\) .
This means that,
which readily implies
As before, we try to find the value of \( \lambda >0\) that minimizes
Differentiation gives
which implies that the optimal choice of \( \lambda\) is given by
If we set
(27)
then \( \lambda^* = \frac{1}{a}\log(1 + u)\) .
Now, the value of the minimum is given by
This means that
The rest of the proof follows by noting that, for every \( u>0\) ,
(28)
which implies:
\( \Box\)
We refer to [8] for several useful variations of Bernstein’s inequality.
Equipped with the probabilistic tools from the previous sections, we will give an alternative proof for Fact 2.
Theorem 5
[See Fact 2] Let \( x\) be a random, uniformly drawn, point in \( C^d\) . We have that \( \|x\|\geq \frac{\sqrt{d}}4\) with high probability (meaning with probability \( 1-o(1)\) ).
The proof of this statement will be based on a probabilistic argument, thereby illustrating (again) the nice and fruitful connection between geometry and probability in high dimension. Pick a point at random in \( C^d\) , which corresponds to \( \left[-\frac12,\frac12\right]^d\) . We want to upperbound the probability that the point is also in the sphere or radius \( R\) .
Let \( x = (x_1, \dots, x_d) \in \mathbb{R}^d\) and each \( x_i \in \left[-\frac12,\frac12\right]\) is chosen uniformly at random. The event that \( x\) also lies in the sphere of radius \( R\) corresponds to the inequality
Let \( z_i = x_i^2\) and note that
which implies \( \mathbb{E}[\|x\|_2^2] = \frac{d}{12}\) . Since the random variables \( z_i - \mathbb{E}[z_i]=z_i-\frac1{12}\) are independent, centered, and bounded (\( |z_i - \mathbb{E}[z_i]|\leq \max\left\{\frac{1}{12},\frac{1}{4}-\frac{1}{12}\right\}=\frac{2}{12}\) ), we can use Hoeffding’s inequality (Theorem 3). This gives
Taking \( R=\frac{\sqrt{d}}4\) gives \( \mathbb{P}\left(\|x\|_2 \leq \frac{\sqrt{d}}4\right)\leq \exp\left[-c_0d\right]\) for a universal constant \( c_0\) (which can be computed in this case to be \( c_0=\frac{\left(1-\frac{12}{16}\right)^2}{8}=\frac1{128}\) , but that’s not important).
Since we now have gained a better understanding of the properties of the cube in high dimensions, we can use this knowledge to our advantage. For instance, this “pointiness” of the hypercube (in form of the \( \ell_1\) -ball) turns out to very useful in the areas of compressive sensing and sparse recovery, see Chapter 16.
If \( X_1,\dots,X_n\) are independent, standard normal random variables, then the sum of their squares, \( Z = \sum_{k=1}^n X_k^2\) is distributed according to the chi-squared distribution with \( n\) degrees of freedom. We denote this by \( Z \sim \chi^2(n)\) . Its probability density function is
Since the \( X_k^2, k=1,\dots,n\) are subexponential with parameters \( (2,4)\) and independent, \( Z = \sum_{k=1}^n X_k^2\) is subexponential with parameters \( (2\sqrt{n},4)\) (analogously to Remark 1). Therefore, using (22), we obtain the \( \chi^2\) tail bound
(29)
A very useful variation of this bound, commonly known as “Lemma 1 in Laurent and Massart [12]” is the following Theorem.
Theorem 6 ( [12])
Let \( X_1,\dots,X_n\) be i.i.d. standard Gaussian random variables (\( \mathcal{N}(0,1)\) ), and \( a_1,\dots,a_n\) non-negative numbers and not all zero. Let
The following inequalities hold for any \( x>0\) :
where \( \|a\|_2^2 = \sum_{k=1}^n a_k^2\) and \( \|a\|_\infty = \max_{1\leq k\leq n}|a_k|\) .
Note that if \( a_k=1\) , for all \( k\) , then \( Z\) is a \( \chi_2\) random variable with \( n\) degrees of freedom, so this theorem immediately gives a deviation inequality for \( \chi_2\) random variables, readily comparable to (29).
How can we sample a point uniformly at random from \( S^{d-1}\) ? The first approach that may come to mind is the following method to generate random points on a unit circle. Independently generate each coordinate uniformly at random from the interval \( [-1,1]\) . This yields points that are distributed uniformly at random in a square that contains the unit ball. We could now project all points onto the unit ball. However, the resulting distribution will not be uniform since more points fall on a line from the origin to a vertex of the square, than fall on a line from the origin to the midpoint of an edge due to the difference in length of the diagonal of the square to its side length.
To remedy this problem, we could discard all points outside the unit ball and project the remaining points onto the sphere. However, if we generalize this technique to higher dimensions, the analysis in the previous section has shown that the ratio of the volume of \( S^{d-1}(1)\) to the volume of \( C^d(1)\) decreases rapidly. This makes this process not practical, since almost all the generated points will be discarded in this process and we end up with essentially no points inside (and thus, after projection, on) the sphere.
Instead we can proceed as follows: Recall that the multivariate Gaussian distribution is rotation invariant about the origin. This means that we can simply construct a vector in \( \mathbb{R}^d\) whose entries are independently drawn from a univariate Gaussian distribution, and then normalize it to lie on the sphere. This gives a distribution of points that is uniform over the sphere.
Having a method of generating points uniformly at random on \( S^{d-1}\) at our disposal, we can now give a probabilistic proof that points on \( S^{d-1}\) concentrate near its equator.
Theorem 7
Let \( x\) be a point randomly, and uniformly, drawn in the sphere in \( d\) dimensions \( S^{d-1}\) . For any \( \rho>0\) and \( d\) large enough, \( |x_1|\geq \sqrt{\frac{\rho}d}\) has probability \( \geq 1-e^{-\frac{\rho}3}\) .
Without loss of generality, we pick the first canonical basis vector \( e_1\) to represents the “north pole”, and the intersection of the sphere with the plane \( x_1=0\) forms our equator. We create a random vector by sampling \( (z_1,\dots,z_d) \sim {\mathcal N}(0,I_d)\) and normalize the vector to get \( x = (x_1,\dots, x_d) = \frac{1}{\sqrt{\sum_{k=1}^d z_k^2}} (z_1,\dots,z_d)\) . Because \( x\) is on the sphere, it holds that \( \|x\|_2=1\) . We are interested in understanding the random variable \( x_1^2\) . Notice that \( 1=\sum_{k=1}^d x_k^2 = \mathbb{E}\left[\sum_{k=1}^d x_k^2\right] =d\,\mathbb{E} x_1^2\) since all coordinates are identically distributed (but not independent), this means that \( \mathbb{E} x_k^2=\frac1{d}\) for all coordinates \( x_k\) . Our goal is to upperbound the probability that \( |x_1|=\frac{|z_1|}{\sqrt{\sum_{k=1}^d z_k^2}}\) is large, we will do that by union bounding the events that \( z_1\) is large (in absolute value) and that \( \sum_{k=1}^d z_k^2\) is small (which can be done with (29)). We will not attempt to derive the strongest possible bound, but rather to showcase an useful argument. Let \( \rho>0\) and \( 0<\varepsilon<1\) be parameters that we will set later (perhaps depending on \( d\) ). We have
where in the last inequality we used the Gaussian tail bound (Proposition 5) in the first term and the \( \chi^2\) bound (29) in the second.
For \( d\) large enough, taking \( \varepsilon\) sufficiently small we have
where the \( 3\) could be replaced by any real number larger than \( 2\) .
A more general version of this phenomenon is that \( k\) coordinates of a uniformly random vector in \( \mathbb{S}^{d-1}\) have \( \ell_2\) norm squared that concentrates well around \( \frac{k}{d}\) . We omit the the proof (it can be found in [13], and the ideas are similar to the ones used to obtain other inequalities in this Chapter).
Lemma 1 ([13])
Let \( x_1, …,x_d\) be i.i.d standard Gaussian random variables and \( X = (y_1,…,y_d)\) . Let \( g:\mathbb{R}^d\to\mathbb{R}^k\) be the projection into the first \( d\) coordinates and \( y = g\left(\frac{x}{\|x\|}\right) = \frac1{\|x\|}(x_1,…,x_k)\) and \( L = \|Z\|^2\) . It is clear that \( \mathbb{E} L = \frac{k}d\) . In fact, \( L\) is very concentrated around its mean
If \( \beta<1\) ,
If \( \beta>1\) ,
Remark 4 (Random vectors in high dimensions)
The results shown in this chapter give us valuable insight about the behavior of random vectors in high dimensions. The results showing that most of the ball is near the boundary, together with the concentration of the norm of the gaussian vector \( z\sim\mathcal{N}(0,I)\) give us the crucial insight that lengths of random high dimensional vectors tend to concentrate. The theorems that establish that most of the sphere is near the equator give us a perhaps even more valuable insight: two random vectors in high dimensions are almost always almost orthogonal. Indeed, we can take one of them to be the “north pole” without loss of generality and (in the case in which they are uniformly drawn in the sphere) Theorem 7 states that their inner product is in the order of \( \frac{1}{\sqrt{d}}\) smaller than the product of their norms, which corresponds to an angle very close to perpendicular.
We will dive deeper into the topic of probability in high dimensions in Chapters 14 and 15. There are several excellent texts about different aspects of high dimensional probability, two notable examples are [14] and [8].
Exercise 1 (Drawing points in the unit ball)
Let \( d \geq 2\) and \( x_1, …, x_n \in \mathbb{R}^d\) be \( n \geq d\) points sampled uniformly at random from the unit ball \( B^d\) . The goal of this exercise is to show that with high probability all points will be contained in an annulus of width \( 2 \ln n / d\) (\( A\) events), and every pair of points will be nearly orthogonal (\( O\) events). Namely, for any distinct numbers \( i, j \in [n]\) define the events
Prove that there exists a constant \( C > 0\) (independent of both \( n\) and \( d\) ) such that
Exercise 2 (Integral identity and Chebyshev’s inequality)
Let \( X\) be a non-negative integrable random variable.
Prove the integral identity:
Let \( X\) be any random variable with finite expected value and finite \( p\) -th central moment \( \mathbb{E}|X-\mathbb{E} X|^p\) , for some \( p \ge 1\) . Prove that for any \( t > 0\) :
Exercise 3 (MGF)
Let \( X\) be a real random variables. Recall the definition of the MGF:
Let \( Z\) be a standard Gaussian random variable, i.e. the one having the probability density function
Show that \( M_Z(\lambda) = e^{\lambda^2 / 2}\) .
Exercise 4 (Cantelli’s inequality)
Let \( X\) be a real random variable with finite mean and finite variance \( \rm{Var}(X)\) . Then for any \( t > 0\) ,
Hint Work with the shifted random variable \( Y = X - \mathbb{E} X + u\) , for arbitrary shift \( u\) .
Exercise 5 (Paley–Zygmund inequality)
Let \( X\) be a non-negative random variable with finite variance. Prove that for any \( 0 \leq \theta \leq 1\) :
Hint Note \( \mathbb{E}\left[ X \right] = \mathbb{E}\left[ X \mathbf{1}_{\left\{ X \leq \theta \, \mathbb{E}\left[ X \right] \right\}} \right] + \mathbb{E}\left[ X \mathbf{1}_{\left\{ X > \theta \, \mathbb{E}\left[ X \right] \right\}} \right]\) . How could one obtain the term \( \mathbb{E}\left[ X^2 \right]\) ?
Exercise 6 (log-MGF and Cramér transform)
Let \( X\) be a centered (i.e. \( \mathbb{E}\left[ X \right] = 0\) ) random variable. We define the logarithm of the moment generating function (log-MGF) for \( \lambda \in \mathbb{R}\) as
Suppose that it exists in an open neighbourhood around zero. The Cramér transform of \( X\) is defined for \( t \in \mathbb{R}\) :
Prove that for any \( t \geq 0\) , one has
Suppose that \( X_1, …, X_n\) are \( n\) i.i.d. copies of \( X\) , and let \( S_n = X_1 + … + X_n\) . Prove that for any \( t \in \mathbb{R}\) :
Exercise 7 (Chernoff bound for polynomial vs. exponential moments)
Let \( X\) be a non-negative real random variable whose MGF is finite over \( \mathbb{R}\) . Fix \( t > 0\) . Show that
Exercise 8 (Poisson tail bound)
Let \( X\) be a Poisson random variable with parameter \( \mu \in (0, \infty)\) . Prove that for any \( t > 0\) :
where \( h(x) = \left( 1+x \right)\log\left( 1+x \right) - x\) .
Exercise 9 (Weak bound for Komlós Conjecture)
Let \( A\in \mathbb{R}^{n \times n}\) matrix whose columns \( a_1, …, a_n\) satisfy \( \|a_i\|_{2} = 1\) for all \( i \in \{1, …, n\}\) . Prove that there exists an absolute constant \( C>0\) such that
Hint Introduce randomness on \( \varepsilon\) and take expectation.
Exercise 10 (Properties of subgaussian random variables)
Show that for any \( \lambda \in \mathbb{R}\) it holds
Using L’Hôpital’s rule, or otherwise, taking \( \lambda \to 0\) deduce that
Hint This inequality might be useful: \( 2 + t^2 \leq e^{t} + e^{-t}\) .
Exercise 11 (Hoeffding’s lemma)
Let \( X\) be a random variables such that \( X \in [a, b]\) a.s., for some real numbers \( a \leq b\) . In the proof of Theorem 3 it was shown that \( X\) is \( (b-a)/2\) -subgaussian. We will show here that this is optimal, and prove a slighly weaker version using symmetrization.
Let \( X'\) be an independent copy of \( X\) , and set \( Y = X - X'\) . This is usually called the symmetrization of \( X\) . Show that for any \( \lambda \in \mathbb{R}\) , the following inequality between MGFs holds:
Show that
Remark 5
Note that in Definition 1 the subgaussianity condition is given in terms of \( X-\mu\) , where \( \mu\) is the mean of \( X\) .
Exercise 12 (Hoeffding’s inequality for subgaussians)
Let \( X_1, …, X_n\) be independent random variables such that \( X_i\) is subgaussian with parameter \( \sigma_i\) , and let \( S_n = X_1 + … + X_n\) be the sum. Fix \( t > 0\) .
Show that the Cramér transform of \( S_n - \mathbb{E} S_n\) is lower bounded by
Using Problem 6 deduce that
Exercise 13 (Bernstein’s inequality - bounded moments)
Let \( X_1, \dots, X_n\) be independent centered random variables such that for all \( i \in [n]\) and integers \( m \geq 2\) , one has
where \( R>0\) and \( \sigma_i>0\) are constants that may depend only on distribution of \( X_i\) .
Prove that, for all \( t > 0\) ,
where \( \nu^2 = \sum_{i=1}^n \sigma_i^2\) .
Deduce Bernstein’s inequality for bounded variables (Theorem 2.17 in lecture notes). Namely, show that for independent centered random variables \( X_1, \dots, X_n\) satisfying \( |X_i|\le a\) a.s. and \( \mathbb{E} X_i^2 \le \sigma^2\) , it holds
for any \( t > 0\) .
Hint After applying the Chernoff bound, choose \( \lambda = \frac{t}{\nu^2 + Rt}\) .
Data is most often represented as a matrix, even network data and graphs are often naturally represented by their adjacency matrix. For this reason Linear Algebra is one of the key tools in data analysis. Perhaps more surprising is the fact that spectral properties of matrices representing data play a crucial role in data analysis. We illustrate this importance with a discussion of the Singular Value Decomposition (SVD) and Principal Component Analysis (PCA) that are often used for data compression, denoising, and dimension reduction. Tools from random matrix theory are then utilized to better understand the performance of SVD and PCA in the high dimensional regime.
The SVD is like a mathematical Swiss Army knife, with its many uses across different areas including linear algebra, operator theory, functional analysis, optimization, numerical analysis, statistics, and information theory. The SVD is also one of the most useful tools for analyzing data. We recommend [15] and [16] as base references in linear algebra and for the SVD.
Given a matrix \( A\in\mathbb{R}^{m\times n}\) , the SVD of \( A\) is defined as
(30)
where \( U\in O(m)\) , \( V\in O(n)\) are orthogonal matrices (meaning that \( U^\top U = UU^\top =\operatorname{I}_{m\times m}\) and \( V^\top V = VV^\top = \operatorname{I}_{n\times n}\) ) and \( \Sigma\in\mathbb{R}^{m\times n}\) is a matrix with non-negative entries on its diagonal and otherwise zero entries.
The columns of \( U\) and \( V\) , denoted by \( u_k\) and \( v_k\) , are referred to as the left and right singular vectors of \( A\) , respectively and the diagonal elements of \( \Sigma\) are the singular values of \( A\) , denoted by \( \sigma_1 \geq \sigma_2 \geq \sigma_r > 0\) . In particular, \( \operatorname{rank}(A)=r\) , that is, the number of non-zero singular values \( r\) is the rank of \( A\) . Through the SVD, any matrix can be written as a sum of rank-1 matrices
(31)
Furthermore, it is straightforward to show that the left singular vectors \( u_1,\dots,u_m\) are eigenvectors of the matrix \( A A^\top \) , the right singular vectors \( v_1,\dots,v_n\) are eigenvectors of the matrix \( A^\top A\) , and the squared singular values \( \sigma_1,\dots,\sigma_r\) are the non-zero eigenvalues of the matrices \( A A^\top \) and \( A^\top A\) , respectively.
Remark 6
The SVD of a complex valued matrix \( A \in \mathbb{C}^{m\times n}\) is given by \( A = U \Sigma V^*\) , where \( U \in \mathbb{C}^{m\times m}\) and \( V \in \mathbb{C}^{n\times n}\) are unitary matrices (\( UU^* = U^* U = \operatorname{I}_{m\times m}\) and \( VV^* = V^*V = \operatorname{I}_{n\times n}\) ) and \( \Sigma\) is the same as in the real case (i.e., \( \Sigma\in\mathbb{R}^{m\times n}\) is a matrix with non-negative entries on its diagonal and otherwise zero entries). We focus our presentation on the SVD of real valued matrices as they are more common in data science, but everything can be straightforwardly extended to the complex case.
Remark 7
Say \( m\leq n\) , it is easy to see that we can also think of the SVD as having \( U\in\mathbb{R}^{m\times n}\) where \( UU^\top =\operatorname{I}\) , \( \Sigma \in\mathbb{R}^{n\times n}\) a diagonal matrix with non-negative entries and \( V\in O(n)\) . Furthermore, if \( \rm{rank} A = r\) , then the “thin” SVD of \( A\) is given by \( A=U\Sigma V^\top \) , where \( U \in \mathbb{R}^{m \times r}\) , \( \Sigma \in \mathbb{R}^{r \times r}\) , and \( V \in \mathbb{R}^{n \times r}\) .
A very powerful modeling tool in data science is given by low rank matrices. In fact, we will devote the whole Chapter 17 to this topic. As already suggested in the expansion (31) the SVD will play an important role in this, being used to provide low rank approximation of data matrices.
In order to be able to talk about low rank approximations of matrices, we need a notion of distance between matrices. Just like with vectors, the distance between matrices can be measured using a suitable norm of the difference. One popular norm is the Frobenius norm, or the Hilbert-Schmidt norm, defined as
(32)
where \( a_{ij}\) are the entries of the matrix \( A\) . This norm is simply the Euclidean norm of a vector of length \( mn\) comprised of the matrix elements. The Frobenius norm can also be expressed in terms of the singular values. To see this, first express the Frobenius norm in terms of the trace of \( A^\top A\) as
(33)
where we recall that the trace of a square matrix \( A\) is defined as
(34)
A particularly important property of the trace is that for any \( A\) of size \( m \times n\) and \( B\) of size \( n\times m\)
(35)
Note that this implies that, e.g., \( \operatorname{Tr}(ABC) = \operatorname{Tr}(CAB)\) , but it does not imply that, e.g., \( \operatorname{Tr}(ABC) = \operatorname{Tr}(ACB)\) which is not true in general. Now, plugging the SVD (30) into (33) gives
(36)
where we used the orthogonality of \( U\) and \( V\) and the trace property (35). We conclude that the Frobenius norm of a matrix equals the Euclidean norm of its vector of singular values.
A different way to define the size of a matrix is by viewing it as an operator and measuring by how much it can dilate vectors. For example, the operator 2-norm is defined as
(37)
This operator norm can also be succinctly expressed in terms of the singular values. Indeed, for any \( x \in \mathbb{R}^n\)
(38)
Using the orthogonality of the left singular vectors \( u_k\) we get
(39)
where the last equality is due to the orthogonality of the right singular vectors \( v_k\) . Moreover, we get equality by choosing \( x=v_1\) . We conclude that the 2-norm is simply the largest singular value
(40)
Before proceeding we briefly recall Hölder’s inequality
Proposition 8
For \( p,q\in(0,\infty)\) such that \( \frac1p+\frac1q=1\) , and \( x,y\in\mathbb{R}^n\) , we have
The following useful form is equivalent:
(41)
for non-negative \( r\) and \( s\) .
The matrix 2-norm plays an important role in proving that any matrix has an SVD.
Theorem 8
If \( A\) is a real \( m \times n\) matrix, then there exist orthogonal matrices
such that
where \( \sigma_1 \geq \sigma_2 \geq … \geq \sigma_p \geq 0\) .
Proof
We will use induction to prove the existence of SVD. Let \( x \in \mathbb{R}^n\) and \( y\in \mathbb{R}^m\) be unit 2-norm vectors that satisfy \( Ax = \sigma y\) where \( \sigma = \|A\|_2\) , the 2-norm of \( A\) . There exist matrices \( V_2 \in \mathbb{R}^{n\times (n-1)}\) and \( U_2 \in \mathbb{R}^{m\times (m-1)}\) such that \( V = [x, V_2] \in \mathbb{R}^{n\times n}\) and \( U = [y, U_2] \in \mathbb{R}^{m\times m}\) are orthogonal matrices (this follows from a simple result in linear algebra that given a basis of a subspace, it is possible to extend it to a basis of the whole space). Consider now the matrix \( U^\top A V\) which has the following structure
A short explanation: we can write \( U^\top AV = [y, U_2]^\top A [x, V_2]\) . Thus, the top left element in the resulting matrix is \( y^\top A x = y^\top \sigma y = \sigma\) (because \( Ax = \sigma y\) and \( \|y\|=1\) ). The leftmost column underneath \( \sigma\) is all 0’s, as we have \( U_2^\top Ax = \sigma U_2^\top y = 0\) by orthogonality of \( U_2\) and \( y\) . The topmost column to the right of \( \sigma\) is some vector \( w^\top \) , and the bottom right of the matrix is represented by a smaller matrix \( B\in \mathbb{R}^{(m-1)\times (n-1)}\) . Since
we have \( \|A_1\|_2^2 \geq (\sigma^2 + \|w\|^2)\) . However, \( \|A_1\|^2 = \|A\|_2^2 = \sigma^2\) , because the matrix 2-norm is invariant under orthogonal transformations. Therefore, \( \|w\|^2 = 0\) and
The proof is completed by applying induction on the smaller matrix \( B\) , resulting in the next largest \( \sigma\) on the diagonal in each iteration, and we eventually end up with \( U^\top AV = \operatorname{diag}(\sigma_1, …, \sigma_p)\) with \( \sigma_1 \geq … \geq \sigma_p \geq 0\) .
A very important property of the SVD is that it provides the best low rank approximation of a matrix, when the approximation error is measured in terms of either the operator norm or the Frobenius norm. Specifically, for any \( 0 \leq s \leq r\) consider the rank-\( s\) matrix \( A_s = \sum_{k=1}^s \sigma_k u_k v_k^\top \) . Then, among all matrices of rank \( s\) , \( A_s\) best approximates \( A\) in terms of the operator norm (or Frobenius norm) error. When measuring error using the operator norm, the approximation error equals \( \sigma_{s+1}\) , which is the largest singular value among the remaining \( r-s\) smallest singular values
(42)
A similar result holds for the Frobenius norm, with the approximation error given in terms of the remaining \( r-s\) smallest singular values as
(43)
In fact, \( A_s\) is the best low rank approximation for any univariate matrix norm satisfying \( \|U A V\| = \| A \|\) for any \( U \in O(m), V\in O(n)\) , that is, norms that are invariant to multiplication by orthogonal matrices [17].
We prove the low rank approximation property for the operator norm case .
Theorem 9
Let the SVD of a matrix \( A\in \mathbb{R}^{m\times n}\) be \( A = U \Sigma V^\top \) . If \( s < r = \operatorname{rank}(A)\) and we have the rank-\( s\) matrix \( A_s\) ,
then
Proof
Since \( A_s\) and \( A\) have the same left and right singular vectors and the same \( s\) leading singular values, it follows that \( U^\top A_s V = \operatorname{diag}(\sigma_1,…,\sigma_s,0,…,0)\) and \( U^\top (A - A_s) V = \operatorname{diag}(0,…,0,\sigma_{s+1},…,\sigma_p)\) , where \( p=\min\{m,n\}\) . This implies \( \|A-A_s\|_2 = \sigma_{s+1}\) , the largest remaining singular value. Now, suppose we have a matrix \( B \in \mathbb{R}^{m\times n}\) with \( \operatorname{rank}(B) = s\) . We can find an orthonormal basis for the null space of \( B\) , i.e. orthonormal vectors \( x_1, …, x_{n-s}\) such that \( \operatorname{null}(B) = \operatorname{span}\{x_1,…,x_{n-s}\}\) . By a dimension argument, we have that
since these are two subspaces of \( \mathbb{R}^n\) of dimension \( n-s\) and \( s+1\) . Take a unit vector \( z\) in this intersection; for this vector, we know that \( Bz = 0\) and \( Az = \sum_{k=1}^{s+1} \sigma_k u_k (v_k^\top z)\) . Therefore,
which completes the proof.
For the Frobenius norm case, the low rank approximation property follows from von Neumann’s trace inequality [18]:
Theorem 10
If \( A\) and \( B\) are complex-valued \( n\times n\) matrices with singular values \( \sigma_1(A),…, \sigma_n(A)\) and \( \sigma_1(B),…, \sigma_n(B)\) , then
The reader is referred to [19] for a proof of Theorem 10. We are now ready to prove that the SVD provides the best low rank approximation in the Frobenius norm.
Theorem 11
Let the SVD of a matrix \( A\in \mathbb{R}^{m\times n}\) be \( A = U \Sigma V^\top \) . If \( s < r = \operatorname{rank}(A)\) and we have the rank-\( s\) matrix \( A_s\) ,
then
Proof
Let \( B\) be any matrix with \( \operatorname{rank}(B) = s < r = \operatorname{rank}(A)\) . Notice that
By von Neumann’s trace inequality (whose statement for square matrices implies the general case of rectangular matrices)
Therefore,
which establishes the lower bound. Finally, the lower bound is clearly attained for \( B = A_s\) .
The low rank approximation property has a wide ranging implication on data compression. The storage size of an \( m\times n\) data matrix is \( mn\) . If that matrix is of rank \( r\) , then storage size reduces from \( mn\) to \( (n+m+1)r\) (for storing \( r\) left and right singular vectors and values). For \( r \ll \min\{n,m\}\) this reduction can be quite dramatic. For example, if \( r=10\) and \( n=m=10^6\) , then storage reduces from \( 10^{12}\) entries to just \( 2\cdot 10^7\) . But even if the matrix is not precisely of rank \( r\) , but only approximately, in the sense that \( \sigma_{r+1} \ll \sigma_1\) , then we are guaranteed by the above approximation results to incur only a small approximation error due to compression using the top \( r\) singular vectors and values. In many cases, the singular values of large data matrices decay very quickly, motivating this type of low rank approximation which oftentimes is the only way to handle massive data sets that otherwise cannot be stored and/or manipulated efficiently. Remarkably, even treating an image as a matrix of pixel intensity values and compressing it this way yields good image compression and de-noising algorithms (as it mitigates the noise corresponding to singular values that are truncated). This is illustrated using a photo of size \( 1224 \times 1632\) pixels taken at Prospect Garden in Princeton University on April 28, 2015 by Amit Singer.
The original photo, see Figure 5(a), is considered as three matrices (one for each RGB color channel). The main features of the image appear already in the rank-10 approximation, Figure 5(b), although many fine details are clearly missing and there are also some visible artifacts (such as striping, smearing, etc.). The rank-100 approximation, Figure 5(c), has exceptional resemblance with the original photo. Of course there are still differences between the two images (such as artifacts on the curbstone) but these are less visible to the naked eye on first inspection. Note that compression using \( r=10\) and \( r=100\) require less than \( 1\%\) and \( 10\%\) , respectively, storage of the original image. The decay of the singular values of the three matrices is illustrated in Figure 9. We use a logarithmic scale due to the rapid decay of singular values. Notice that the singular values of the three matrices are very similar.
Remark 8
The computational complexity of computing the SVD of a matrix of size \( m\times n\) with \( m \geq n\) is \( \mathcal{O}(mn^2)\) . This cubic scaling could be prohibitive for massive data matrices. In Chapter 8.2 we discuss numerical algorithms that use randomization to efficiently compute the low rank approximation of such large matrices more efficiently.
Remark 9
The SVD plays a critical role in sensitivity analysis of linear systems of the form \( Ax=b\) . In particular, the error is bounded in terms of the condition number \( \kappa(A)\) which is the ratio of the largest singular value and the smallest singular value. A rigorous treatment of this important topic is beyond the scope of this book and can be found in other texts on numerical linear algebra [16].
If \( M\in\mathbb{R}^{n\times n}\) is symmetric then it admits a spectral decomposition
where \( V\in O(n)\) is a matrix whose columns \( v_k\) are the eigenvectors of \( M\) and \( \Lambda\) is a diagonal matrix whose diagonal elements \( \lambda_k\) are the eigenvalues of \( M\) . Similarly, we can write
When all of the eigenvalues of \( M\) are non-negative we say that \( M\) is positive semidefinite and write \( M\succeq 0\) . In that case we can write
A decomposition of \( M\) of the form \( M=UU^\top \) (such as the one above) is called a Cholesky decomposition (oftentimes, in a Cholesky decomposition, the matrix \( U\) is required to be triangular, here we do not make this requirement).
For symmetric matrices, the operator 2-norm is also known as the spectral norm, given by
In both this and following chapters, we will be interested in solving problems of the type
where \( M\) is a symmetric \( n\times n\) matrix.
Note that this is equivalent to
(44)
where \( \delta\) is the Kronecker delta (\( \delta_{ij}=1\) for \( i=j\) and \( \delta_{ij}=0\) otherwise).
When \( d=1\) this reduces to the more familiar
(45)
It is easy to see (for example, using the spectral decomposition of \( M\) ) that (45) is maximized by the leading eigenvector of \( M\) and
Furthermore (44) is maximized by taking \( v_1,\dots,v_d\) to be the \( d\) leading eigenvectors of \( M\) and its value is simply the sum of the \( d\) largest eigenvalues of \( M\) . This follows, for example, from a Theorem of Fan (see page 3 of [20]). A fortunate consequence is that the solution to (44) can be computed sequentially: we can first solve for \( d=1\) , computing \( v_1\) , then update the solution for \( d=2\) by simply computing \( v_2\) without changing the first vector.
Remark 10
All of the tools and results above have natural analogues when the matrices have complex entries (and are Hermitian instead of symmetric).
The SVD is intimately connected to the Moore-Penrose pseudoinverse of a matrix [21]. The Moore-Penrose pseudoinverse (named after mathematicians E. H. Moore and Roger Penrose) of \( A\) , denoted as \( A^\dagger\) , is a generalization of the matrix inverse to matrices that may not be square, or if square, may not have full rank. For an invertible matrix, the pseudoinverse is identical to the standard inverse. However, for a rectangular or rank-deficient square matrix, the pseudoinverse provides a unique solution that satisfies a set of four specific conditions known as the Penrose conditions, that uniquely define the pseudoinverse \( A^\dagger\) for any matrix \( A\) . These conditions are a generalization of the properties of a standard matrix inverse. A matrix \( A^\dagger\) is the pseudoinverse of \( A\) if and only if it satisfies all four of the following equations:
(46)
These conditions ensure that the pseudoinverse acts “as much as possible” as an inverse for matrices that are not invertible, including rectangular or rank-deficient square matrices. The above four conditions are equivalent to the matrices \( A A^\dagger\) and \( A^\dagger A\) being orthogonal projectors onto the range of \( A\) and the range of \( A^\top \) respectively.
The primary purpose of the pseudoinverse is to find “best-fit” solution to a system of linear equations \( Ax=b\) when a unique solution does not exist. In cases where the system has multiple solutions, the pseudoinverse provides the one with the minimum Euclidean norm. For systems with no exact solution (an overdetermined system), it provides the least-squares solution, which minimizes the error \( \|Ax - b\|\) . This makes the pseudoinverse a tremendously useful tool in fields like numerical mathematics, statistics, machine learning, and signal processing. We will explore this in more detail for example in Chapter 5.5.
The SVD provides a straightforward and computationally stable way to calculate \( A^\dagger\) . Given \( A = U \Sigma V^\top \) , we can represent \( \Sigma\) in block form as
where \( \Sigma_r = \text{diag}(\sigma_1, \sigma_2, \dots, \sigma_r)\) is an \( r \times r\) diagonal matrix containing the non-zero singular values. The pseudoinverse of \( A\) is given by the formula.
(47)
where the matrix \( \Sigma^\dagger\) is given by
with \( \Sigma_r^{-1} = \text{diag}\left(\frac{1}{\sigma_1}, \frac{1}{\sigma_2}, \dots, \frac{1}{\sigma_r}\right)\) .
This method is particularly powerful because it works for any matrix—square or rectangular, full rank or rank-deficient—and is numerically robust, avoiding the issues with ill-conditioned matrices that can plague other inversion methods. Indeed, in the practical computation of \( \Sigma^\dagger\) one usually chooses a threshold \( \tau\) , such that all singular values less than \( \tau\) are treated as zero.
The SVD and the pseudoinverse play a central role in linear regression and least squares problems, see Chapter 5.
When faced with a high dimensional dataset, a natural approach is to attempt to reduce its dimension, either by projecting it to a lower dimensional space or by finding a better representation for the data using a small number of meaningful features. Beyond data compression and visualization, dimension reduction facilitates downstream analysis such as clustering and regression that perform significantly better in lower dimensions. We will explore a few different ways of reducing the dimension, both linearly and non-linearly.
We start with the classical Principal Component Analysis (PCA). PCA continues to be one of the most effective and simplest tools for exploratory data analysis. It dates back to a 1901 paper by Karl Pearson [22] and was rediscovered several times by different research communities where it is also known under different names such as the proper orthogonal decomposition (POD) and the Karhunen–Lo\‘eve transform (KLT) among others.
Suppose we have \( n\) data points \( x_1,\dots,x_n\) in \( \mathbb{R}^p\) , and we are interested in (linearly) projecting the data to \( d< p\) dimensions. This is particularly useful if, say, one wants to visualize the data in two or three dimensions (\( d=2, 3\) ). There are a couple of seemingly different criteria we can use to choose this projection:
As we will see below, these two approaches are equivalent and they correspond to Principal Component Analysis.
Before proceeding, we recall a couple of simple statistical quantities associated with \( x_1,\dots,x_n\) , that will reappear below.
Given \( x_1,\dots,x_n\) we define its sample mean as
(48)
and its sample covariance as
(49)
Remark 11
If \( x_1,\dots, x_n\) are independently sampled from a distribution, \( \mu_n\) and \( \Sigma_n\) are unbiased estimators for the mean and the covariance of the distribution, respectively.
We start with the first interpretation of PCA and then show that it is equivalent to the second. We are trying to approximate each \( x_k\) by
(50)
where \( v_1,\dots,v_d\) is an orthonormal basis for the \( d\) -dimensional subspace, \( \mu \in \mathbb{R}^p\) represents the translation, and \( \beta_k \in \mathbb{R}^d\) corresponds to the coefficients of \( x_k\) . Without loss of generality we take
(51)
as any joint translation of \( \beta_k\) can be absorbed into \( \mu\) .
If we represent the subspace by \( V = [v_1… v_d]\in\mathbb{R}^{p\times d}\) then we can rewrite (52) as
(52)
where \( V^\top V=\operatorname{I}_{d\times d}\) , because the vectors \( v_i\) are orthonormal.
We will measure goodness of fit in terms of least squares and attempt to solve
(53)
We start by optimizing for \( \mu\) . It is easy to see that the first order condition for \( \mu\) corresponds to
Thus, the optimal value \( \mu^\ast\) of \( \mu\) satisfies
Since we assumed in (51) that \( \sum_{k=1}^n \beta_k = 0\) , we have that the optimal \( \mu\) is given by
the sample mean.
We can then proceed to finding the solution for (53) by solving
(54)
Let us proceed by optimizing for \( \beta_k\) . The problem almost fully decouples in each \( k\) , the only constraint coupling them being (51). We will ignore this constraint, solve the decoupled problems, and verify that it is automatically satisfied. Hence we focus on, for each \( k\) ,
(55)
Since \( v_1,\dots,v_d\) are orthonormal, it is easy to see that the solution is given by \( \left(\beta_k^\ast \right)_i = v_i^\top \left( x_k - \mu_n\right)\) which can be succinctly written as \( \beta_k^* = V^\top \left(x_k - \mu_n\right)\) , which satisfies (51). Thus, (54) is equivalent to
(56)
Note that
Since \( \left( x_k - \mu_n \right)^\top \left( x_k - \mu_n \right)\) does not depend on \( V\) , minimizing (56) is equivalent to
(57)
A few algebraic manipulations using properties of the trace yields:
This means that the solution to (57) is given by the solution of
(58)
As we saw above (recall (44)) the solution is given by \( V=\left[v_1,…,v_d\right]\) where \( v_1,\dots,v_d\) correspond to the \( d\) leading eigenvectors of \( \Sigma_n\) .
We now show that the alternative interpretation of PCA, of finding the \( d\) -dimensional projection of \( x_1,\dots,x_n\) that preserves the most variance, also arrives to the optimization problem (58). We aim to find an orthonormal basis \( v_1,\dots,v_d\) (organized as \( V=\left[v_1,\dots,v_d\right]\) with \( V^\top V = \operatorname{I}_{d\times d}\) ) of a \( d\) -dimensional space such that the projection of \( x_1,\dots,x_n\) onto this subspace has the most variance. Equivalently we can ask for the points
to have as much variance as possible. Hence, we are interested in solving
(59)
Note that
showing that (59) is equivalent to (58) and that the two interpretations of PCA are indeed equivalent.
When given a dataset \( x_1,\dots,x_n\in\mathbb{R}^p\) , in order to compute the Principal Components one needs to compute the leading eigenvectors of
A na
specialChar{34}ive way of doing this is to construct \( \Sigma_n\) (which takes \( \mathcal{O}(np^2)\) work) and then finding its spectral decomposition (which takes \( \mathcal{O}(p^3)\) work). This means that the computational complexity of this procedure is \( \mathcal{O}\left( \max \left\{ np^2, p^3 \right\} \right)\) (e.g. see [15] or [16]).
An alternative is to use the Singular Value Decomposition (30). Let \( X = \left[x_1 … x_n \right]\) , and recall that
Let us take the SVD of \( \frac{1}{\sqrt{n-1}}\left(X - \mu_n\mathbf{1}^\top \right) = U_L D U_R^\top \) with \( U_L \in O(p)\) , \( D\) diagonal, and \( U_R^\top U_R = \operatorname{I}\) . Then,
meaning that \( U_L\) corresponds to the eigenvectors of \( \Sigma_n\) . Computing the SVD of \( X - \mu_n\mathbf{1}^\top \) takes \( \mathcal{O}(\min \{n^2p,p^2n\})\) work but if one is interested in simply computing the top \( d\) eigenvectors then this computational cost reduces to \( \mathcal{O}(dnp)\) . This can be further improved with randomized algorithms. In Chapter 8.2 we will discuss randomized algorithms that compute an approximate solution in \( \mathcal{O}\left( pn\log d +(p+n)d^2 \right)\) time, see also [23, 24, 25].
Numerical stability is another important reason why computing the principal components using the SVD is preferable. Since the eigenvalues of \( \Sigma_n\) are proportional to the squares of the singular values of \( X-\mu_n \mathbf{1}^\top \) , problems arise when the ratio of singular values exceeds \( 10^8\) , causing the ratio of the corresponding eigenvalues of \( \Sigma_n\) to be larger than \( 10^{16}\) . In this case, the smaller eigenvalue would be rounded to zero (due to machine precision), which is certainly not desirable.
Every aspiring data scientist will at some point experiment with the MNIST dataset, a collection of handwritten digits created by researchers Burges, Cortes, and LeCun from data by the National Institute of Standards and Technology (NIST) [26]. The most common version of MNIST has 60,000 training images and 10,000 test images, each image containing \( 28 \times 28\) grayscale pixels. MNIST has become a highly influential, frequently used benchmark in the data science/machine learning community .
We will apply PCA to the MNIST dataset to analyze whether a high-dimensional space (784 dimensions in this case) can be compressed into a low-dimensional latent space that is still able to capture the “essence” of these handwritten digits. To process the data via PCA, we first flatten each image into a vector \( x\in\mathbb{R}^{784}\) . The resulting data matrix \( X\) has a size of \( 60000\times784\) . In this matrix, each row is a single handwritten digit (an observation), while each column represents the intensity of a specific pixel location (a feature).
Before performing PCA, we compute the mean digit \( \bar{x}\) , which represents the “average” handwriting across the entire dataset. By subtracting this mean from every row \( X_{\text{centered}} =X - \bar{x}\) , we shift the coordinate system so that the origin lies at the center of the data cloud. This ensures that the first principal component truly represents the direction of maximum variance. When we compute the SVD of \( X_{\text{centered}}\) , the right singular vectors (the columns of V) are the Principal Components. We can reshape these \( 784 \times 1\) vectors back into \( 28 \times 28\) images, sometimes called eigen-digits, to visualize what the algorithm has “learned.” The first twelve eigen-digits are depicted in Figure 10.
Given a dataset, if the objective is to visualize it then picking \( d=2\) or \( d=3\) might make the most sense. However, PCA is useful for many other purposes, for example:
In these applications (and many others) it is not clear how to pick \( d\) . A fairly popular heuristic is to try to choose the cut-off at a component that has significantly more variance than the one immediately after. Since the total variance is \( \operatorname{Tr}(\Sigma_n) = \sum_{k=1}^p \lambda_k\) , the proportion of variance in the \( i\) ’th component is nothing but \( \frac{\lambda_i}{\operatorname{Tr}(\Sigma_n)}\) . A plot of the values of the ordered eigenvalues, also known as a scree plot, helps to identify a reasonable choice of \( d\) . It is common to then try to identify an “elbow” on the scree plot to choose the cut-off, as illustrated in Figure 11(a). Figure 11(b) shows the scree plot for the MNIST example, where the elbow is less well defined, as often happens in practice. In this case, the point of maximum curvature of the graph can serve as a surrogate for the elbow.
Figure 14 shows the choice of different values of \( k=d\) for the PCA approximation of MNIST, illustrated via some typical example digits.
In the next section we will look into Random Matrix Theory to better understand the behavior of the eigenvalues of \( \Sigma_n\) and gain insight into choosing cut-off values.
Let us assume that the data points \( x_1,\dots,x_n\in\mathbb{R}^p\) are independent draws of a zero mean Gaussian random variable \( g\sim \mathcal{N}(0,\Sigma)\) with some covariance matrix \( \Sigma \in \mathbb{R}^{p\times p}\) . In this case, when we use PCA we are hoping to find a low dimensional structure in the distribution, which should correspond to the large eigenvalues of \( \Sigma\) (and their corresponding eigenvectors). For that reason, and since PCA depends on the spectral properties of \( \Sigma_n\) , we would like to understand whether the spectral properties of the sample covariance matrix \( \Sigma_n\) (eigenvalues and eigenvectors) are close to those of \( \Sigma\) , also known as the population covariance.
Since \( \mathbb{E}\Sigma_n = \Sigma\) , if \( p\) is fixed and \( n\to \infty\) the law of large numbers guarantees that indeed \( \Sigma_n\to \Sigma\) . However, in many modern applications it is not uncommon to have \( p\) of the same order as \( n\) (or, sometimes, even larger). For example, if our dataset is composed of images then \( n\) is the number of images and \( p\) the number of pixels per image; it is conceivable that the number of pixels and the number of images are comparable. Unfortunately, in that case, it is no longer clear that \( \Sigma_n\to \Sigma\) . Dealing with this type of difficulties is an important goal of high dimensional statistics.
For simplicity we will try to understand the spectral properties of
where \( x_1,\dots,x_n\) are the columns of \( X\) . Since \( x\sim \mathcal{N}(0,\Sigma)\) we know that \( \mu_n \to 0\) (and, clearly, \( \frac{n}{n-1}\to 1\) ), hence the spectral properties of \( S_n\) will be essentially the same as \( \Sigma_n\) .
Let us start by looking into a simple example, \( \Sigma = \operatorname{I}\) . In that case, the distribution has no low dimensional structure, as the distribution is rotation invariant. Figure 21 depicts a normalized histogram (left panel) and a scree plot (right panel) of the eigenvalues of a realization of \( S_n\) (when \( \Sigma = \operatorname{I}\) ) for \( p = 500\) and \( n=1000\) . The red line is the eigenvalue distribution predicted by the Marčenko-Pastur distribution (60), that we will discuss below.
As one can see, there are many eigenvalues considerably larger than \( 1\) , as well as many eigenvalues significantly smaller than \( 1\) . Notice that, if given this profile of eigenvalues of \( \Sigma_n\) one could potentially be led to believe that the data has low dimensional structure, when in truth the distribution it was drawn from is isotropic.
Understanding the distribution of eigenvalues of random matrices is at the core of Random Matrix Theory (there are many good books on Random Matrix Theory, e.g. [28, 29, 30]). This particular limiting distribution was first established in 1967 by Marčenko and Pastur [31] and is now referred to as the Marčenko-Pastur distribution. They showed that, if \( p\) and \( n\) both grow indefinitely to \( \infty\) with their ratio fixed \( p/n = \gamma \leq 1\) , the sample distribution of the eigenvalues of \( S_n\) (like the histogram above), in the limit, will be
(60)
with support \( \left[ \gamma_-, \gamma_+ \right]\) , where \( \gamma_- = (1-\sqrt{\gamma})^2\) , \( \gamma_+= (1+\sqrt{\gamma})^2\) , and \( \gamma = p/n\) . This is plotted as the red line in the figure above.
Remark 12
We will not provide the proof of the Marčenko-Pastur law here (you can see, for example, [32] for several different proofs of it), but an approach to a proof is using the so-called moment method. The central idea is to note that one can compute moments of the eigenvalue distribution in two different ways and note that (in the limit) for any \( k\) ,
and that the quantities \( \frac1p \mathbb{E} \operatorname{Tr} \left[ \left( \frac1n XX^\top \right)^k \right]\) can be estimated (these estimates rely essentially on combinatorics). The distribution \( dF_\gamma(\lambda)\) can then be computed from its moments.
What if there actually is some (linear) low dimensional structure in the data? When can we expect to capture it with PCA? A particularly simple, yet relevant, example to analyze is when the covariance matrix \( \Sigma\) is a rank-1 perturbation of the identity matrix and is of the form \( \Sigma = I + \beta uu^\top \) , where \( u\) is a unit norm vector and \( \beta > 0\) . This is a particular case of a spike model.
One way to think about this spike model is that each data point \( x\) consists of a signal part \( \sqrt{\beta}g_0 u\) where \( g_0\) is a scalar standard Gaussian \( \mathcal{N}(0,1)\) (i.e. a normally distributed multiple of a fixed vector \( \sqrt{\beta}u\) ) and a noise part \( g\sim\mathcal{N}(0,I)\) (independent of \( g_0\) ). Then \( x = g + \sqrt{\beta}g_0 u\) is a Gaussian random variable
(61)
Whereas the signal part \( \sqrt{\beta}g_0 u\) resides on a central line in the direction of \( u\) , the noise part is high dimensional and isotropic. We therefore refer to \( \beta\) as the signal-to-noise ratio (SNR). Indeed, \( \beta\) is the ratio of the signal variance (in the \( u\) -direction) to the noise variance (in each direction).
A natural question is whether this rank-\( 1\) perturbation can be seen in \( S_n = \frac{1}{n} XX^\top \) , where the columns of \( X\) are now given by (61). In other words, is it possible to detect the direction of the line \( u\) from noisy measurements in high dimension? Let us build some intuition with an example. Figure 24 shows the histogram of the eigenvalues of a random realization of \( S_n\) for \( p=500\) , \( n=1000\) , \( u\) is the first element of the canonical basis \( u=e_1\) , and \( \beta = 1.5\) :
The histogram suggests that there is an eigenvalue of \( S_n\) that “pops out” of the support of the Marčenko-Pastur distribution (below we will estimate the location of this eigenvalue, and that estimate corresponds to the red “x”). It is worth noting that the largest eigenvalues of \( \Sigma\) is simply \( 1+\beta = 2.5\) while the largest eigenvalue of \( S_n\) appears considerably larger than that.
Let us try now the same experiment with \( \beta = 0.5\) , see Figure 25 for the result. It appears that, for \( \beta = 0.5\) , the histogram of the eigenvalues is indistinguishable from when \( \Sigma = \operatorname{I}\) . In particular, no eigenvalue is separated from the Marčenko-Pastur distribution.
This motivates the following question:
Question: For which values of \( \gamma\) and \( \beta\) do we expect to see an eigenvalue of \( S_n\) popping out of the support of the Marčenko-Pastur distribution, and what is the limiting value that we expect it to take?
As we will see below, there is a critical value of \( \beta\) , denoted \( \beta_c\) , below which we do not expect to see a change in the distribution of eigenvalues and above which we expect one of the eigenvalues to pop outside of the support. This phenomenon is known as the BBP phase transition (after Baik, Ben Arous, and Péché [33]). There are many very nice papers about this and similar phenomena, including [34, 35, 33, 36, 37, 38, 39, 40].
In what follows we will find the critical value \( \beta_c\) and estimate the location of the largest eigenvalue of \( S_n\) for any \( \beta\) . While the argument we will use can be made precise (and is borrowed from [34]) we will be ignoring a few details for the sake of exposition. In other words, the argument below can be transformed into a rigorous proof, but it is not one at the present form.
We want to understand the behavior of the leading eigenvalue of the sample covariance matrix
Since \( x \sim \mathcal{N}(0,I+\beta uu^\top )\) we can write \( x = (I + \beta uu^\top )^{1/2} z\) where \( z \sim \mathcal{N}(0,I)\) is an isotropic Gaussian. Then,
where \( Z_n = \frac{1}{n} \sum_{i=1}^n z_i z_i^\top \) is the sample covariance matrix of independent isotropic Gaussians. The matrices \( S_n = (I + \beta uu^\top )^{1/2} Z_n (I + \beta uu^\top )^{1/2}\) and \( Z_n (I + \beta uu^\top )\) are related by a similarity transformation, and therefore have exactly the same eigenvalues. Hence, it suffices to find the leading eigenvalue of the matrix \( Z_n(I + \beta uu^\top )\) , which is a rank-1 perturbation of \( Z_n\) (indeed, \( Z_n(I + \beta uu^\top ) = Z_n + \beta Z_n uu^\top \) ). We already know that the eigenvalues of \( Z_n\) follow the Marčenko-Pastur distribution, so we are left to understand the effect of a rank-1 perturbation on its eigenvalues.
To find the leading eigenvalue \( \lambda\) of \( Z_n(I + \beta uu^\top )\) , let \( v\) be the corresponding eigenvector, that is,
Subtract \( Z_n v\) from both sides to get
Assuming \( \lambda\) is not an eigenvalue of \( Z_n\) , we can multiply by \( (\lambda I - Z_n)^{-1}\) to get
Our assumption also implies that \( u^\top v \neq 0\) , for otherwise \( v=0\) . Multiplying by \( u^\top \) gives
Dividing by \( \beta u^\top v\) (which is not 0 as explained above) yields
(62)
Suppose \( w_1,…,w_p\) are orthonormal eigenvectors of \( Z_n\) (with corresponding eigenvalues \( \lambda_1,…, \lambda_p\) ), and expand \( u\) in that basis:
Plugging this expansion in (62) gives
(63)
For large \( p\) , each \( \alpha_i^2\) concentrates around its mean value \( \mathbb{E}[\alpha_i^2]=\frac{1}{p}\) (again, this statement can be made rigorous), and (63) becomes
(64)
Since the eigenvalues \( \lambda_1,…,\lambda_p\) follow the Marčenko-Pastur distribution, the limit on the left hand side can be replaced by the integral
(65)
Using an integral table (or an integral software), we find that
(66)
For \( \lambda=\gamma_{+}\) , that is, when the top eigenvalue touches the right edge of the Marčenko-Pastur distribution, (66) becomes \( \frac{1}{4 \gamma} (\gamma_{+}-\gamma_{-})\) . This is the critical point that one gets the pop out of the top eigenvalue from the bulk of the Marčenko-Pastur distribution. To calculate the critical value \( \beta_c\) , we recall that \( \gamma_{-}=(1-\sqrt{\gamma})^2\) and \( \gamma_{+}=(1+\sqrt{\gamma})^2\) , hence
(67)
Therefore, the critical SNR is
(68)
When \( \beta > \sqrt{\frac{p}{n}}\) one can observe the pop out of the top eigenvalue from the bulk.
Eq. (68) illustrates the interplay of the SNR \( \beta\) , the number of samples \( n\) , and the dimension \( p\) . Low SNR, small sample size, and high dimensionality are all obstacles for detecting linear structure in noisy high dimensional data.
More generally, inverting the relationship between \( \beta\) and \( \lambda\) given by (66) (which simply amounts to solving a quadratic), we find that the largest eigenvalue \( \lambda\) of the sample covariance matrix \( S_n\) has the limiting value
(69)
In the finite sample case \( \lambda\) will be fluctuating around that value.
Notice that the critical SNR value, \( \beta_{c} = \sqrt{\gamma}\) is buried deep inside the support of the Marčenko-Pastur distribution, because \( \sqrt{\gamma} < \gamma_{+} = (1+\sqrt{\gamma})^2\) . In other words, the SNR does not have to be greater than the operator norm of the noise matrix in order for it to pop out. We see that the noise effectively pushes the eigenvalue to the right (indeed, \( \lambda > \beta\) ).
The asymptotic squared correlation \( |\langle u, v\rangle |^2\) between the top eigenvector \( v\) of the sample covariance matrix and true signal vector \( u\) can be calculated in a similar fashion. The limiting correlation value turns out to be
(70)
Notice that the correlation value tends to 1 as \( \beta \to \infty\) , but is strictly less than 1 for any finite SNR.
Another very important random matrix model is the Wigner matrix (and it will make appearances in Chapters 14, 15 and 13). Given an integer \( n\) , a standard Gaussian Wigner matrix \( W\in\mathbb{R}^{n\times n}\) is a symmetric matrix with independent \( \mathcal{N}(0,1)\) off-diagonal entries (except for the fact that \( W_{ij}=W_{ji}\) ) and jointly independent \( \mathcal{N}(0,2)\) diagonal entries. In the limit, the eigenvalues of \( \frac1{\sqrt{n}}W\) are distributed according to the so-called semi-circular law
(71)
and there is also a BBP like transition for this matrix ensemble [41]. More precisely, if \( v\) is a unit-norm vector in \( \mathbb{R}^n\) and \( \xi\geq 0\) then the largest eigenvalue of \( \frac1{\sqrt{n}}W+\xi vv^\top \) satisfies
If \( \xi \leq 1\) then
and if \( \xi > 1\) then
(72)
The typical correlation, with \( v\) , of the leading eigenvector \( v_{\max}\) of \( \frac1{\sqrt{n}}W+\xi vv^\top \) is also known:
If \( \xi \leq 1\) then
and if \( \xi > 1\) then
From a statistical viewpoint, a central question is to understand for different distributions of matrices, when it is possible to detect and estimate a spike in a random matrix [42]. When the underlying random matrix corresponds to the adjacency matrix of a random graph and the spike to a bias on the distribution of the graph edges, corresponding to structural properties of the graph, the estimates above are able to predict important phase transitions in community detection in networks, as we will see in Chapter 13.
The spike model and random matrix theory thus offer a principled way for determining the number of principal components, or equivalently of the rank of the hidden linear structure: simply count the number of eigenvalues to the right of the Marčenko-Pastur distribution. In practice, this approach for rank estimation is often too simplistic for several reasons. First, for actual datasets, \( n\) and \( p\) are finite, and one needs to take into account non-asymptotic corrections and finite sample fluctuations [43, 44]. Second, the noise may be heteroskedastic (that is, noise variance is different in different directions). Moreover, the noise statistics could also be unknown and it can be non-Gaussian [45]. In some situations it might be possible to estimate the noise statistics directly from the data and to homogenize the noise (a procedure sometimes known as “whitening”) [46]. These situations call for careful analysis, and many open problems remain in the field.
Another popular method for rank estimation is using permutation methods. In permutation methods, each column of the data matrix is randomly permutated, so that the low-rank linear structure in the data is destroyed through scrambling, while only the noise is preserved. The process can be repeated multiple times, and the statistics of the singular values of the scrambled data matrices are then used to determine the rank. In particular, only singular values of the original (unscrambled) data matrix that are larger than the largest singular value of the scrambled matrices (taking fluctuations into account of course) are considered as corresponding to signal and are counted towards the rank. The mathematical analysis of permutation methods is another active field of research [47, 48].
In some applications, the objective is to estimate the low rank covariance matrix of the clean signal \( \Sigma\) from the noisy measurements. We saw that in the spike model, the eigenvalues of the sample covariance matrix are inflated due to noise. It is therefore required to shrink the computed eigenvalues of \( S_n\) in order to obtain a better estimate of the eigenvalues of \( \Sigma\) . That is, if
is the spectral decomposition of \( S_n\) , then we seek an estimator of \( \Sigma\) , denoted \( \hat{\Sigma}\) of the form
The scalar nonlinearity \( \eta : \mathbb{R}^+ \to \mathbb{R}^+\) is known as the shrinkage function. An obvious shrinkage procedure is to estimate \( \beta = \eta(\lambda)\) from the computed \( \lambda\) by inverting (69) (and setting \( \beta=0\) for \( \lambda < \gamma_{+}\) ). It turns out that this particular shrinker is optimal in terms of the operator norm loss. However, for other loss functions (such as the Frobenius norm loss), the optimal shrinkage function takes a different form [49]. The reason why the shrinker depends on the loss function is that the eigenvectors of \( S_n\) are not perfectly correlated with those of \( \Sigma\) but rather make some non-trivial angle, as in (70). In other words, the eigenvectors are noisy, and it may require more aggressive shrinkage to account for that error in the eigenvector. It can be shown that the eigenvector \( v\) of the sample covariance is uniformly distributed in a cone around \( u\) whose opening angle is given by (70). While we can improve the estimation of the eigenvalue via shrinkage, it is however unclear how to improve the estimation of the eigenvector (without any a priori knowledge about it). Finally, we remark that eigenvalue shrinkage also plays an important role in denoising.
Exercise 14
The \( p\) -norm of a matrix \( A\) is defined as
Prove the following properties of the matrix \( p\) -norm:
Exercise 15
The Schatten \( p\) -norm of an \( m\times n\) matrix \( A\) is given by the \( \ell_p\) norm (\( p\geq 1\) ) of its vector of singular values, namely,
A matrix norm \( \| \cdot \|\) that satisfies \( \|QAZ\| = \|A\|\) for all \( Q\) and \( Z\) orthogonal matrices is called a unitarily invariant norm.
Note that the case \( p=1\) is sometimes called the nuclear norm of the matrix, the case \( p=2\) is the Frobenius norm, and \( p=\infty\) is the operator norm. Verify that the nuclear norm of \( A\) , denoted \( \|A\|_*\) , is given by
Exercise 16
Show that any unitarily invariant matrix norm is dependent only on the singular values of the matrix.
Exercise 17
Given a square \( n\times n\) matrix \( A\) whose SVD is \( A=U\Sigma V^\top \) , show that its closest (in the Frobenius norm) orthogonal matrix \( O\) is given by \( W=UV^\top \) . That is, show that
where \( A=U\Sigma V^\top \) . In other words, \( W\) is obtained from the SVD of \( A\) by dropping the diagonal matrix \( \Sigma\) . Use this observation to conclude what is the optimal rotation (and possibly reflection) that aligns two sets of points \( p_1,p_2,…,p_n\) and \( q_1,…,q_n\) in \( \mathbb{R}^d\) , that is, find \( W\) that minimizes \( \sum_{i=1}^n \|Wp_i-q_i\|^2\) . This is known as the orthogonal Procrustes problem, see also [50, 51, 52].
Exercise 18 (Low rank approximation)
Let \( A \in \mathbb{R}^{m \times n}\) and \( k\) be an integer such that \( 1 \leq k \leq \rm{rank}(A)\) .
Prove that there exists a matrix \( B \in \mathbb{R}^{m \times n}\) of rank \( k\) such that
Exercise 19
For the spike model, show that the asymptotic squared correlation \( |\langle v,u \rangle|^2\) between the eigenvector \( v\) of the sample covariance matrix and the “true" signal vector \( u\) is given by (70). Hint Use MAPLE or an integral table to calculate the integral
where \( dF_\gamma(t)\) is the Marčenko-Pastur measure.
Exercise 20
Confirm Wigner’s semi-circle law using computer simulations (take, e.g., \( n=400\) ).
Exercise 21
Show that the asymptotic largest eigenvalue of a rank-1 perturbation of a Wigner matrix is given by (72).
Exercise 22
Let \( dSC(x) = \frac1{2\pi}\sqrt{4-x^2}1_{[-2,2]}(x)\) be the semi-circle distribution. Prove that if \( X\) is distributed according to \( dSC(x)\) then
where \( C_n\) is the \( n\) -th Catalan number, \( C_n = \frac{1}{n+1} {2n \choose n}\) .
Exercise 23 (Equivalent definitions of spectral/operator norms)
Given a matrix \( M \in \mathbb{R}^{m \times n}\) , prove that all of the following quantities are equal:
Exercise 24 (Maximal entry bound)
Given a matrix \( X \in \mathbb{R}^{n \times m}\) , show that for any \( i \in [n]\) and \( j \in [m]\) we have
Exercise 25 (Symmetrization of matrices)
We are going to explore three ways in which an \( m \times n\) (with \( m \leq n\) ) real-valued matrix \( M\) can be symmetrized.
Let \( A\) be an \( m \times m\) matrix defined by
Check that \( A\) is symmetric, and show that its \( m\) eigenvalues are given by: \( \sigma_1(M)^2, \sigma_2(M)^2, …, \sigma_m(M)^2\) .
Let \( C\) be an \( (m+n) \times (m+n)\) matrix defined by
where \( 0_{r \times r}\) is an \( r \times r\) all-zeros matrix. Check that \( C\) is symmetric, and show that its \( m+n\) eigenvalues are given by:
Exercise 26 (Gershgorin circle theorem)
Let \( A \in \mathbb{R}^{n \times n}\) be a symmetric matrix with entries \( (a_{ij})_{i,j\in[n]}\) . For \( i\in [n]\) let \( R_{i}\) be the sum of the absolute values of the non-diagonal entries in the \( i\) -th row:
Prove that every eigenvalue of \( A\) lies within at least one of the Gershgorin discs \( D(a_{ii},R_{i})\) , i.e. for any eigenvalue \( \lambda\) of \( A\) we can find \( i \in [n]\) such that \( |\lambda - a_{ii}| \leq R_i\) .
Exercise 27 (Quadratic form optimization)
Let \( A \in \mathbb{R}^{n\times n}\) be a symmetric matrix with eigenvalues \( \lambda_1\geq … \geq \lambda_n\) . Given \( r \in \left\{ 1, 2, …, n \right\}\) , consider the following optimization problem:
where \( \delta_{ij}\) is the Kronecker delta defined as
Exercise 28 (Courant-Fischer minimax formula for symmetric matrices)
Let \( A \in \mathbb{R}^{n \times n}_{\text{sym}}\) (\( n \times n\) real symmetric matrix). Prove that for any \( k \in [n]\) :
Hint Any \( V\) with \( \dim(V) = n-k+1\) intersects with the subspace spanned by the top \( k\) eigenvectors of \( A\) .
Exercise 29 (Consequences of Courant-Fischer)
Let \( X, Y \in \mathbb{R}^{m \times n}\) (\( m \times n\) real matrices), with \( m \leq n\) .
Using Problem 25(c) extend the Courant-Fischer formula to hold for asymmetric matrices: for any \( k \in [m]\)
Show the Eckart–Young–Mirsky Theorem for Spectral norm: given any rank-\( r\) matrix \( B\) with \( r < m\) ,
Show Weyl’s inequality for singular values: for all \( 1 \leq i, j \leq m\) satisfying \( i+j-1 \leq m\) we have
Exercise 30 (Inner product between matrices)
For any two matrices \( A, B \in \mathbb{R}^{n \times n}\) , consider the map
Exercise 31 (Rotation minimization)
Let \( A, B \in \mathbb{R}^{m\times n}\) be two arbitrary matrices. Find the solution, in terms of \( A\) and \( B\) , or their SVD decompositions, of the following optimization problem:
Here \( O(m)\) denotes the set of all \( m\times m\) orthogonal matrices.
Exercise 32 (Polar decomposition)
Let \( A \in \mathbb{R}^{n\times n}\) . Prove that there exists a positive semi-definite matrix \( P\) and an orthogonal matrix \( Q\) such that \( A = PQ\) .
Exercise 33 (Power method)
Let \( A \in \mathbb{R}^{n\times n}\) be a symmetric positive semi-definite matrix with eigenvalues \( \lambda_1 \geq … \geq \lambda_n \geq 0\) and associated eigenvectors \( v_1, …, v_n \in \mathbb{R}^n\) (that form an orthonormal basis). In this exercise, the goal is to show that the power method converges exponentially fast.
Let \( y_0 \in \mathbb{R}^n\) be an initial vector that satisfies \( A y_0 \neq 0\) . Define the power method iteration for \( k \geq 0\) :
Prove that these iterations are well-definied, i.e. that \( {\left\lVert{A y_k}\right\rVert} \neq 0\) for any \( k \geq 1\) .
Define the Rayleigh quotient as \( \xi_k = y_k^\top A y_k\) and its relative error by
If \( A\) is diagonal, i.e., \( A = \rm{diag}(\lambda_1, \dots, \lambda_n)\) and \( \lambda_1 = 1\) , show that we can represent the error as
where \( w_i = \left\langle y_0, v_i \right\rangle\) for all \( i \in [n]\) .
If \( A\) is diagonal with \( 1 = \lambda_1 > \lambda_2 > \lambda_3\) , and we start from \( y_0\) such that \( w_1 \neq 0\) and \( w_2 \neq 0\) , show that
Exercise 34
This exercise relates to Theorem 13. Show that an unbiased estimator of \( \sigma^2\) is given by \( \hat{\sigma}^2_{\text{MLE}} = \frac{1}{n-p}\|y - X\hat{\beta}_{\text{LS}}\|^2\) .
Exercise 35 (Moore-Penrose Pseudoinverse)
Prove that if \( A\) has full column rank (its columns are linearly independent) then its pseudoinverse is given by
Exercise 36 (BBP for spiked Wigner model)
In this chapter we analyzed the BBP transition for the Wishart model, i.e., when we observe \( Y = \frac{1}{n} XX^\top\) , where \( X\) is an \( p \times n\) matrix with columns drawn independently from \( \mathbb{N}(0, I_p + \beta u u^\top)\) . We will explore the similar type of phase transition for another model.
Let \( W\) be an \( n \times n\) Wigner matrix, \( v\) be a unit-norm vector in \( \mathbb{R}^n\) and \( \xi \geq 0\) . We define the spiked Wigner model as observing \( Y = \frac{1}{\sqrt n} W + \xi v v^\top\) , with the aim of recovering the signal \( v\) . This model exhibits the following phase transition (as \( n \to \infty\) ) for
the largest eigenvalue \( \lambda_{\max}\) of \( Y\) :
the leading eigenvector \( v_{\max}\) of \( Y\) :
To measure the quality of the recovery procedure we define the mean squared error of an estimate \( w \in \mathbb{R}^n\) as
Find the asymptotic behavior of the mean squared error for the PCA estimator, i.e., the value of
as a function of \( \xi\) .
Remark 13
The mean square error defined as above might appear unnatural for this problem since one can measure the difference between two vectors using \( \ell_2\) norm (up to a sign). However, this type of MSE definition can be more useful when the perturbation is not rank-one and non-symmetric (e.g., in low-rank matrix estimation problems). Additionally, it addresses the issue of sign invariance in the model, where the observation remains the same whether the signal is \( v\) or \( -v\) , and therefore, we can recover the vector only up to a sign.
\begin{myexercise} This exercise is about PCA. We use the classical iris data set as an example (see https://en.wikipedia.org/wiki/Iris_flower_data_set for an explanation of that dataset). You can download a subset of the iris dataset from the UCI Machine Learning Repository).
The dataset contains fifty flowers and for each flower there are four measurements: sepal length, sepal width, petal length and petal width. We want to understand via PCA how these four measurements are related to each other. Are they essentially independent of each other or are some of them (weakly or strongly) correlated?
(a) Assume you loaded the iris data in Matlab into a data matrix \( X\) of size \( 4 \times 50\) . You can examine the structure of the data using plotmatrix:
[~,ax]=plotmatrix(X');
ax(1,1).YLabel.String='Sepal L';
ax(2,1).YLabel.String='Sepal W';
ax(3,1).YLabel.String='Petal L';
ax(4,1).YLabel.String='Petal W';
ax(4,1).XLabel.String='Sepal L';
ax(4,2).XLabel.String='Sepal W';
ax(4,3).XLabel.String='Petal L';
ax(4,4).XLabel.String='Petal W';Which measurements are related and which ones are not-related? Compare your findings based on this visual inspection with your findings based on computing the variance and covariance of the data.
(b) Next carry out a principal component analysis by projecting the data onto the eigenvectors of the (centered) covariance matrix of the data. How much of the variation in the data is captured by the individual components? \end{myexercise}
Exercise 37
(PCA for Dimensionality Reduction). In this exercise we work with the MNIST dataset.
(a) Standardize the data.
(b) Apply PCA and retain enough components to explain 95% variance.
(c) Visualize the first two principal components for a sample of images.
Exercise 38
(Image Compression with Truncated SVD). A grayscale image is represented by a matrix \( A \in \mathbb{R}^{m \times n}\) . Take a gray-scale image of your choice (not too small, at least of size \( 256\times 256\) ).
(a) Compute the rank-\( k\) approximation using the SVD for each \( k=1,\dots,p\) , where \( p =\min(m,n)\) . Measure the relative Frobenius error and plot the reconstruction error as a function of \( k\) . For which range of \( k\) do you see no visual distortion of the compressed image?
It is dawn at Mavericks, California. The swell forecast reads 10 meters at 18 seconds—a massive storm system has sent energy across thousands of miles of Pacific Ocean. For big wave surfers, these are exciting conditions! But they also come with all the dangers of a wipeout.
The hold-down—the time a surfer is trapped beneath the surface after a wipeout—is one of the most critical variables in a big-wave wipeout. Professional big wave surfers can hold their breath for four to five minutes under controlled conditions, but after the physical exertion of paddling into a 12-meter wave, that window shrinks dramatically. Add the disorientation of being tumbled by thousands of tons of water, and you have maybe roughly 20-30 seconds before panic sets in, and perhaps 60-90 seconds before blackout. This motivates a practical and (for some readers) urgent question: Given ocean conditions and wave characteristics, can we predict how long is a surfer likely to be held underwater?
Imagine we have collected data from 50 big wave sessions at various locations (Mavericks, Nazaré, Jaws, Teahupo’o,...) using underwater cameras and GPS trackers on professional surfers. For each wipeout, we have recorded hold-down time (seconds) \( y\) , wave height (meter, measured face) \( x_1\) , wave period (seconds between waves) \( x_2\) , water depth at impact zone (meter) \( x_3\) , and wind speed (knots) \( x_4\) . Tomorrow, a massive northwest swell is forecast with wave height 15m, period 20s, depth 12m, and wind 18 kts. How long should we expect the hold-down to be?
While the true physics is nonlinear (involving fluid dynamics, buoyancy, and turbulent flow), a linear approximation may capture the first-order effects within the range of observed conditions. We thus postulate that hold-down time is approximately a linear function of the wave characteristics
where \( \theta_0\) is the baseline hold-down time, \( \theta_1\) is the increase in hold-down per meter of wave height, \( \theta_2\) is the effect of wave period, \( \theta_3\) is the effect of water depth (deeper water means shorter hold-downs), \( \theta_4\) is the effect of wind, and \( \varepsilon\) represents random variation (wave shape, surfer position, etc.)
With our 50 observations, we can write the model in matrix form
where \( y \in \mathbb{R}^{50}\) is the vector of observed hold-down times, \( X \in \mathbb{R}^{50 \times 5}\) contains the wave characteristics (with a column of 1’s for the intercept), and \( \theta \in \mathbb{R}^5\) are the unknown coefficients we wish to estimate. Once we have found \( \hat{\theta}\) , we can predict tomorrow’s expected hold-down.
But how do we find the “best” estimate \( \hat{\theta}\) ? Is our estimator optimal in some sense? How accurate are our predictions? Should we include all variables, or is simpler better? Linear regression and least squares will provide answers to these questions.
This chapter studies linear regression and least squares from four complementary viewpoints. After introducing the basic idea of linear regression, we first show that least squares is an orthogonal projection problem. Second, we show that it arises naturally from Gaussian noise and conditional-mean prediction. Third, we analyze its bias, variance, and prediction risk. Finally, we show how ridge regression stabilizes least squares by shrinking low-information directions, and we reinterpret this shrinkage as Wiener filtering.
Linear regression is the foundational supervised learning model in data science, statistics, and applied mathematics [53, 54, 16]. While it is often motivated by statistical inference, its mathematical core is a geometric problem: finding the “best” projection of a target vector onto the subspace spanned by the predictors.
Let us formulate the linear regression problem in greater generality. Consider a dataset consisting of \( n\) observations and \( p\) features \( x_1,\dots,x_p\) , represented by the matrix \( X \in \mathbb{R}^{n \times p}\) (often called the design matrix), and a vector of responses \( y \in \mathbb{R}^n\) . Now we introduce a rather strong assumption on the underlying data model: we assume a linear relationship \( y = X\theta + \varepsilon\) , where, as in the previous example, \( \theta \in \mathbb{R}^p\) is the vector of unknown coefficients and \( \varepsilon\) represents noise. The goal is now to find the best estimate \( \hat{\theta}\) of \( \theta\) .
Linear regression serves two primary purposes:
But how can we find an estimate \( \hat{\theta}\) in the first place? Because of noise, we do not expect to recover \( \theta\) exactly from finite data, nor do we expect \( y\) to lie exactly in the column space of \( X\) . So, which error function (or loss function in the terminology of data science, statistics, and machine learning) shall we use to quantify a good (or even optimal) fit?
We propose to compute the \( \hat{\theta}\) that minimizes the sum of squared residuals
(73)
This proposal immediately raises the question, why did we use the least-squares error in (73) and not some other measure of fit? After all, we could consider many alternatives, such as for instance the sum of absolute errors \( \sum_{i=1}^n |y_i -x_i^\top\theta|\) , or the maximum absolute error \( \max_{i=1,…,n} |y_i - x_i^\top\theta|\) .
The choice of the squared loss (73) is not arbitrary. It emerges from multiple complementary perspectives: geometric interpretation, computational tractability, and statistical optimality. We examine each justification in turn .
It is helpful to keep in mind the fundamental differences between linear regression and PCA (discussed in Chapter 4.2). While linear regression and PCA both involve fitting a linear structure to data, they have fundamentally different goals, and assumptions. Linear regression is a supervised method. The goal is to model the relationship between a set of predictor variables \( X\) and a response variable \( y\) . It assumes the \( X\) values are known perfectly and all noise is in \( y\) . In contrast, PCA is an unsupervised method that does not involve a response variable. Instead, it seeks a low-dimensional linear structure that captures as much variation in the given data \( X\) as possible. In a nutshell, regression asks: “How well can \( X\) explain \( y\) ?” while PCA asks: “What is the most efficient way to represent \( X\) ?”
The least squares loss has some appealing geometric interpretations that are not shared by other loss functions, which we collect below (and the verification of which is left as exercises).
Let \( S \subset \mathbb{R}^n\) be a linear subspace. For every \( y \in \mathbb{R}^n\) , there exists a unique decomposition
(74)
Furthemore, \( s\) is the unique minimizer of
Let \( \rm{Col}(X)\) denote the column space of \( X\) and \( P_{\rm{Col}(X)}\) the orthogonal projection onto \( \rm{Col}(X)\) . Applying the subspace decomposition above to the case \( S = \rm{Col}(X)\) implies that for any \( y \in \mathbb{R}^n\) , there exists \( \hat \theta \in \mathbb{R}^p\) such that
Moreover, we have
In the hold-down example, the fitted vector \( X \hat{\theta}\) is the orthogonal projection of the observed hold-down times onto the subspace spanned by the measured wave features.
Let \( X \in \mathbb{R}^{n \times p}\) and \( y \in \mathbb{R}^n\) . A vector \( \hat \theta \in \mathbb{R}^p\) minimizes
if and only if
Equivalently,
(75)
which are also referred to as the normal equations.
Furthermore, if \( X\) has full column rank (\( \mathrm{rank}(X)=p\) ), then \( X^T X\) is invertible and the normal equations have as unique solution the least squares estimator given by
(76)
However, this approach has both practical and theoretical limitations: (i) Computing \( X^\top X\) squares the condition number, amplifying rounding errors. This is not a big deal when the condition number of \( X\) is small (say, \( \kappa(X) = \mathcal{O}(1)\) ), but becomes a major concern when \( X\) is not well conditioned. (ii) When \( \rm{rank}(X) < p\) , the matrix \( X^\top X\) is singular and cannot be inverted; (iii) When \( p > n\) , the system is underdetermined.
The SVD provides an elegant solution that avoids forming \( X^\top X\) explicitly and handles all cases (full rank, rank deficient, underdetermined) in a unified framework .
Theorem 12
Let \( X \in \mathbb{R}^{n \times p}\) have the SVD \( X = U\Sigma V^\top\) with \( \rm{rank} X = r\) . Then the minimum 2-norm least squares solution to \( X\theta = y\) is
(77)
where \( \Sigma^+\) is the Moore-Penrose pseudoinverse of \( \Sigma\) :
(78)
Proof
We seek to minimize \( \|y - X\theta\|^2\) . We substitute the SVD \( X = U\Sigma V^\top\) and obtain
Since \( U\) is orthogonal, \( \|U^\top z\| = \|z\|\) for any vector \( z\) . Thus
Define \( \tilde{y} = U^\top y \in \mathbb{R}^n\) and \( \alpha = V^\top\theta \in \mathbb{R}^p\) . The problem becomes
(79)
We partition \( \Sigma\) , \( \tilde{y}\) , and \( \alpha\) as follows:
where \( \Sigma_r = \rm{diag}(\sigma_1, …, \sigma_r) \in \mathbb{R}^{r \times r}\) .
Then
The second term is independent of \( \alpha\) . To minimize the first term,
For now the component \( \alpha_{\perp}\) is undetermined. We note that setting \( \alpha_{\perp} = 0\) gives the minimum norm solution to (79).
Transforming back gives
Since \( V\) is orthogonal, by Pythagoras the 2-norm of \( \theta\) is minimized if \( V_{\perp} \alpha_{\perp}\) is zero, i.e., if \( \alpha_{\perp} =0\) . With this choice we obtain
The SVD solution has an appealing geometric interpretation: We project \( y\) onto each left singular vector \( u_i^\top y\) , then scale by \( 1/\sigma_i\) , weight the result by the corresponding right singular vector \( v_i\) , and sum over all positive singular values. This explicitly constructs the solution as a linear combination of the right singular vectors, with coefficients determined by the singular values and projections of \( y\) .
Remark 14 (Minimum 2-norm solution)
When \( \rm{rank}(X) = r < p\) , the matrix \( X^\top X\) is singular and the normal equations have infinitely many solutions. We have seen in Theorem 12 that the SVD handles this gracefully. Indeed, when \( \rm{rank}(X) = r < p\) , the set of least squares solutions is
An inspection of the proof of Theorem 12 reveals (namely, setting \( \alpha_{\perp} = 0\) ) that among all \( \theta \in \mathcal{S}\) , the SVD solution \( \hat{\theta} = V\Sigma^+U^\top y\) has the smallest Euclidean norm, i.e.,
The minimum-norm solution is not just a mathematical convenience it is often the state that nature itself selects. This reflects a fundamental tendency in physics: among all configurations consistent with the governing constraints, systems gravitate toward states of minimum energy. In this light, the pseudoinverse is not merely a matrix operator, but a mathematical expression of physical equilibrium.
For dense full-rank least-squares problems, QR factorization is usually the standard method because it is numerically stable and significantly cheaper than the SVD [16]. The SVD is more robust, especially when the matrix is ill-conditioned or rank-deficient, because it reveals the numerical rank and naturally produces minimum-norm solutions.
Before exploring the benefits of using the least squares error function from a statistical viewpoint, we will first impose the following standard assumptions on our linear model \( y= X\theta+\varepsilon\) , which we will make throughout this section unless otherwise noted:
It is instructive to explain the role of each of these assumptions.
Exogeneity is the most important statistical assumption. It stipulates that the errors are uncorrelated with the predictors. Exogeneity would mean, for instance, that the unmodeled part of the hold-down time in our surfing example is not systematically correlated with the recorded wave height, period, depth, or wind speed. It also means there is no “omitted variable bias”, i.e., we have not left out important confounders. Thus, exogeneity is required for unbiasedness and consistency of the least squares solution, as well as for a causal interpretation of coefficients .
Homoscedasticity means the errors have constant variance, i.e., the “variability” of the errors around the regression line is the same for all values of the predictors . Without homoscedasticity, the least squares estimator may still be unbiased but can be inefficient and produce misleading standard errors.
We already encountered the full rank assumption in the previous section, and have seen that it ensures invertibility of \( X^T X\) and uniqueness of the solution. While non-invertibility is not a “deal-breaker”, enforcing uniqueness of the solution would require additional assumptions and regularization (for instance we can replace the inverse with the Moore-Penrose pseudo-inverse, as previously shown), which we will discuss in more detail in Chapter 5.4.
The most compelling statistical justification of the least squares error function (73) arguably comes from maximum likelihood theory.
Let us recall the concept of the likelihood function. Assume we have a set of i.i.d. observations \( \mathcal{D} = \{x_1, x_2, \dots, x_n\}\) drawn from a probability density (or mass) function \( f(x | \theta)\) . The joint probability of the entire dataset is the product of the individual probabilities \( \mathbb{P}(\mathcal{D} | \theta) = \prod_{i=1}^n f(x_i | \theta).\) When we treat the data \( \mathcal{D}\) as fixed and the parameter \( \theta\) as a variable, this function is called the likelihood function, denoted as \( \mathcal{L}(\theta)\) ,
The Maximum Likelihood Estimator (MLE) \( \hat{\theta}_{MLE}\) is defined as the argument that maximizes the likelihood function, i.e.,
where \( \Theta\) denotes a parameter space.
Under suitable regularity conditions (identifiability, correct model specification, and mild technical assumptions), one can show (using e.g. the Uniform Law of Large Numbers and the Argmax Theorem) that the maximum likelihood estimator is consistent [58, 59], i.e.
where \( \theta_0\) is the true parameter and \( \hat{\theta}_n\) is the MLE based on \( n\) samples.
Notice that to actually compute the MLE numerically, one usually considers the log-likelihood function \( \ell(\theta) = \log \mathcal{L}(\theta)\) . Since the natural logarithm is a monotonically increasing function, the value of \( \theta\) that maximizes \( \mathcal{L}(\theta)\) also maximizes the log-likelihood
which has numerically much more stable properties. The score is the gradient of the log-likelihood function with respect to \( \theta\) . To find the MLE, we typically solve the score equation by setting the gradient of the log-likelihood to zero,
Except for a few cases (like least squares, see also Theorem 13 below) the MLE typically lacks a closed-form solution. While many standard models (like logistic regression, see Chapter 10.2) remain computationally tractable due to convexity, more complex models result in non-convex optimization problems where finding the global MLE is often computationally intractable.
When we add a distributional assumption on the errors, we can show that the least squares estimator is actually the maximum likelihood estimator.
Theorem 13 (Least squares as Maximum Likelihood Estimator)
Suppose the errors are i.i.d. Gaussian, i.e, \( \varepsilon_i \sim \mathcal{N}(0, \sigma^2)\) , for \( i = 1, …, n\) . Under the standard assumptions (A1)–(A3), the maximum likelihood estimator (MLE) of \( \theta\) is
and the MLE of \( \sigma^2\) is
Proof
The likelihood function is:
The log-likelihood is:
For fixed \( \sigma^2\) , maximizing \( \ell\) with respect to \( \theta\) is equivalent to minimizing \( \|y - X\theta\|^2\) , which yields \( \hat{\theta}_{\text{LS}}\) .
Substituting \( \hat{\theta}_{\text{LS}}\) and maximizing with respect to \( \sigma^2\) :
gives
(80)
and the proof is complete.
Note that the MLE (80) is biased; the unbiased estimator uses \( n-p\) instead of \( n\) in the denominator (see also Exercise 41).
Remark 15
The Gaussian assumption is often reasonable for errors that arise from the sum of many small independent sources (by the Central Limit Theorem). But what if the error \( \varepsilon\) is not Gaussian? If the error follows a different distribution, the MLE leads to a different loss function. For example for Laplace errors (\( \varepsilon_i \sim \text{Laplace}(0, b)\) ) this results in minimizing \( \sum_i |y_i - x_i^\top\theta|\) , known as \( \ell_1\) regression. And for uniform errors (\( \varepsilon_i \sim \text{Uniform}(-a, a)\) ), we minimize \( \max_i |y_i - x_i^\top\theta|\) , also referred to as Chebyshev regression.
Theorem 14
Suppose \( Y\) is a random variable and we wish to predict \( Y\) with a constant \( c \in \mathbb{R}\) . Among all possible choices of \( c\) , the minimizer of the expected squared error is:
More generally, for conditional prediction given \( x\) , the function that minimizes expected squared error is:
Proof
For the unconditional case we compute
The last expression is minimized when \( c = \mathbb{E}[Y]\) .
For the conditional case, the proof is identical but conditioning on \( x\) throughout.
Theorem 14 tells us that if we believe \( \mathbb{E}[Y | x] = x^\top\theta\) , then minimizing the squared error is the natural way to estimate \( \theta\) ; we are finding the linear function that best approximates the conditional mean. We leave it to the reader to verify that using instead the sum of absolute errors estimates the conditional median.
Theorem 15
Under the standard assumptions (A1)–(A3), the least squares estimator \( \hat{\theta}_{\text{LS}}\) satisfies
Proof
To prove the unbiasedness condition, we compute
The covariance property follows from the following calculation:
A natural question is whether the least squares estimator is optimal among all unbiased linear estimators?
Definition 3 (Linear Estimator)
An estimator \( \tilde{\theta}\) is linear if it can be written as \( \tilde{\theta} = B y\) for some matrix \( B \in \mathbb{R}^{p \times n}\) that may depend on \( X\) but not on \( y\) .
Theorem 16 (Gauss-Markov Theorem)
Under the standard assumptions (A1)–(A3), the least squares estimator \( \hat{\theta}_{\text{LS}}\) is the Best Linear Unbiased Estimator (BLUE). That is, among all linear unbiased estimators \( \tilde{\theta} = By\) , the least squares estimator has the smallest covariance matrix
for any linear unbiased estimator \( \tilde{\theta}\) .
Equivalently, for any linear combination \( a^\top\theta\) , the least squares-based estimator \( a^\top\hat{\theta}_{\text{LS}}\) has the smallest variance among all linear unbiased estimators of \( a^\top\theta\) .
Proof
Let \( \tilde{\theta} = By\) be any linear unbiased estimator. Unbiasedness requires:
for all \( \theta \in \mathbb{R}^p\) . This implies \( BX = I_p\) .
The covariance of \( \tilde{\theta}\) is
Decompose \( B\) as
where \( C = B - (X^\top X)^{-1} X ^\top\) .
The constraint \( B X = I_p\) implies:
Now compute
Since \( CC^\top \succeq 0\) (positive semi-definite), we have:
with equality if and only if \( C = 0\) , i.e., \( \tilde{\theta} = \hat{\theta}_{\text{LS}}\) .
A fundamental tension in statistical estimation is the bias-variance tradeoff: reducing variance often increases bias, and vice versa. In fact, the bias–variance tradeoff is a fundamental identity of squared-error prediction and randomness in estimation, and not specific to linear models. It arises from basic properties of expectations and variance.
Definition 4 (Mean Squared Error)
For an estimator \( \hat{\theta}\) of \( \theta\) , the mean squared error (MSE) is defined as
Also recall that \( \rm{Bias}(\hat{\theta}) = \mathbb{E}[\hat{\theta}] - \theta\) and \( \operatorname{Cov}(\hat{\theta}) = \mathbb{E}\left[ (\hat{\theta} - \mathbb{E}[\hat{\theta}])(\hat{\theta} - \mathbb{E}[\hat{\theta}])^T \right]\) .
Theorem 17 (Bias-variance decomposition for parameter estimation)
Let \( \theta \in \mathbb{R}^p\) be a fixed, unknown parameter vector. Let \( \hat{\theta}\) be an estimator of \( \theta\) , which is a random variable depending on the training data \( \mathcal{D}\) . Assume that \( \mathbb{E} [ \|\hat{\theta}\|^2 ] < \infty\) . Then
(81)
Proof
Let \( \bar{\theta} = \mathbb{E}[\hat{\theta}]\) denote the expected value of the estimator. We compute
We first consider the variance term \( \mathbb{E} [ \|\hat{\theta} - \bar{\theta}\|_2^2 ]\) . By the property of the trace and the definition of the covariance matrix we get
We now proceed to the bias term \( \mathbb{E} [ \|\bar{\theta} - \theta\|_2^2 ]\) . Since both \( \bar{\theta}\) and \( \theta\) are deterministic, the expectation is simply the value itself, i.e.,
Regarding the cross term \( 2\mathbb{E} [ (\hat{\theta} - \bar{\theta})^T (\bar{\theta} - \theta) ]\) we note that since \( (\bar{\theta} - \theta)\) is a constant vector, we can pull it out of the expectation and get
Since \( \mathbb{E}[\hat{\theta}] = \bar{\theta}\) , the term \( \mathbb{E}[\hat{\theta}] - \bar{\theta} = 0\) . Thus, the cross-term vanishes. Summing the remaining terms yields the desired decomposition
To complete the proof we note that our assumption ensures that \( \hat{\theta}\) has finite first and second moments, so all expectations are well-defined and finite.
We point out that Theorem 17 does allow for heteroscedasticity and for correlated errors, Moreover, it does not impose any distributional assumptions beyond zero-mean and finite second moments. Thus, the decomposition holds for any estimator under very mild conditions. This generality makes it a fundamental result in statistical learning theory.
While Theorem 17 concerns estimating the parameter vector \( \theta\) , in practice we often care about predicting new observations. The bias-variance decomposition for prediction includes an additional irreducible error term.
Corollary 2 (Bias-variance decomposition for prediction)
Assume we are given a training set \( \mathcal{D} = \{(x_i, y_i)\}_{i=1}^n\) where \( y_i = f(x_i) + \varepsilon\) is the target variable, \( f\) is the true (but unknown) deterministic function, and \( \varepsilon\) is random noise with \( \mathbb{E}[\varepsilon] = 0\) and \( \rm{Var}(\varepsilon) = \sigma^2\) . Assume that \( \varepsilon\) is independent of the training data. Let \( \hat{f}(x; \mathcal{D})\) be an estimator (a model) trained on \( \mathcal{D}\) . Then, expected squared error of the estimator at a fixed point \( x\) , taken over the distribution of all possible datasets \( \mathcal{D}\) , is given by
(82)
Proof
To simplify notation, let \( y = f + \varepsilon\) , \( \hat{f} = \hat{f}(x; \mathcal{D})\) , and \( \bar{f} = \mathbb{E}_\mathcal{D}[\hat{f}]\) . Note that \( f\) is deterministic, so \( \mathbb{E}_\mathcal{D}[f] = f\) .
The objective is \( \mathbb{E}_\mathcal{D}[(y - \hat{f})^2]\) . Substituting \( y = f + \varepsilon\) we obtain
Since the noise \( \varepsilon\) is independent of the training data \( \mathcal{D}\) it is also independent of \( \hat{f}\) ). Hence,
Also, \( \mathbb{E}_\mathcal{D}[\varepsilon^2] = \rm{Var}(\varepsilon) = \sigma^2\) . Thus, our expression simplifies to
(83)
Now we focus on \( \mathbb{E}_\mathcal{D}[(f - \hat{f})^2]\) . We have
Note that
Also,
since \( \mathbb{E}_\mathcal{D}[\bar{f} - \hat{f}] = \bar{f} - \mathbb{E}_\mathcal{D}[\hat{f}] = \bar{f} - \bar{f} = 0\) .
Finally,
.
Substituting these back into (83) yields
which proves our claim.
The decomposition (82) in Corollary 2 reveals three sources of prediction error:
The bias-variance tradeoff refers to the tension between the first two terms. This brings up the question whether we can accept some bias to achieve substantial variance reduction to achieve lower total prediction error? This is indeed possible and can be accomplished via proper regularization.
For example, for the case of linear regression, when the matrix \( X\) is ill-conditioned, the least squares solution remains unbiased but can have extremely high variance. Historically, the focus was on unbiasedness, because datasets often had rather small values of \( p\) compared to \( n\) , making ill-conditionedness of \( X\) a much less common scenario. The ill-conditionedness of \( X\) happens typically more often when the number of variables \( p\) is comparable to the sample size \( n\) (here, we still assume \( p \le n\) ) . In this regime, minimizing prediction error rather than preserving unbiasedness becomes central, and regularization, such as ridge regression, improves performance by trading bias for variance reduction. We will explore this topic in Chapter 5.5.
Corollary 2 also forms the basis for constructing prediction intervals, see e.g. [60, 53] for details. Specializing to the case of a linear model \( y = X\theta + \varepsilon\) , if the model is correctly specified and the estimator is unbiased, then under Gaussian errors a \( (1-\alpha)\) prediction interval for \( y_{\text{new}}\) is
(84)
where \( \hat{\sigma}^2 = \frac{1}{n-p}\|y - X\hat{\theta}\|^2\) and \( t_{1-\alpha/2, n-p}\) is the critical value of the \( t\) -distribution. Note that the first term under the square root in (84) accounts for the irreducible error and the second term for parameter uncertainty. We emphasize that the probability is in the procedure, not in a single realization. Namely, if we repeatedly collect a training dataset, fit a model (with the same method), construct a prediction interval, and observe a new data point, then on average, \( (1-\alpha) \times 100\%\) of these intervals will contain the new observation. We emphasize that for a biased estimator (such as ridge regression or lasso) constructing prediction intervals is more involved [61, 53].
Generalization gap. In statistical learning theory, the bias-variance tradeoff tells us how the components of risk behave as model complexity changes. Let us recall the notion of risk, which represents the average cost incurred by a predictive model when applied to the entire population of possible data points. Formally, we define risk as follows:
Definition 5
Let \( \mathcal{X}\) be the input space and \( \mathcal{Y}\) the output space. Let \( P\) be a joint probability distribution over \( \mathcal{X} \times \mathcal{Y}\) . Given a decision function (or hypothesis) \( f: \mathcal{X} \to \mathcal{Y}\) and a measurable loss function \( L: \mathcal{Y} \times \mathcal{Y} \to \mathbb{R}_{\geq 0}\) , the Risk \( R(f)\) is defined as the expectation of the loss,
Using the definition of expectation, the risk can be written as the integral over the joint distribution
In data science, the distribution \( P\) is almost always unknown. This leads to the distinction that is central to learning theory:
Empirical Risk (\( \hat{R}_n(f)\) ): This is what we actually minimize using a training set of size \( n\) ; it is given by
The generalization gap is the difference between these two, \( |R(f) - \hat{R}_n(f)|\) . An important part of theory in data science and machine learning is dedicated to bounding this gap to ensure that a model that performs well on training data will also perform well “in the wild”.
Sometimes it is stated in the literature that the generalization gap is the difference between test error and training error. However, the test error is only an estimator of the true risk. Hence, while the test error minus training error is a standard proxy, the true generalization gap is defined against the population risk, and conflating the two can obscure the effects of test set noise, data reuse, and distribution shift.
Model mismatch, underfitting, overfitting: In reality, the prediction error decomposition (82) is almost always wrong, since the true data-generating process does rarely perfectly fit the chosen model. For instance in case of linear regression, when the underlying data is generated by a process that is more complex than a linear model (as is the case with the surfing/hold-down time example used in the beginning of this chapter), we encounter model mismatch, also known as specification error or structural bias.
Model mismatch is closely related to the issue of underfitting/overfitting, but they are not identical. Model mismatch is a design-time issue: the chosen model class does not contain a function capable of representing the true relationship in the data. Even with infinite data, the best possible predictor within the model class cannot recover the true signal.
Underfitting, in contrast, is a run-time phenomenon: the fitted model fails to capture the structure of the data. This may occur because the model class is too restrictive (model mismatch), for example fitting a line to a quadratic relationship. But it can also arise when the estimation procedure overly constrains the parameters, for example through strong regularization or insufficient training. Underfitting typically corresponds to large approximation bias. Overfitting occurs when the model class is too flexible, and thus the estimator fits noise in finite samples. Examples include using a high-degree polynomial or linear regression when \( p > n\) without regularization (see Chapter 5.5). Overfitting manifests as large variance.
Assume we want to predict the optimal drug dosage for a patient using the expression levels of thousands of genes. In such problems the number of features (genes) can be far larger than the number of patients in the study, leading to a high-dimensional regression problem with \( p \gg n\) .
This problem falls into the area of high-dimensional linear regression (assuming one considers the underlying model to be linear). More generally, high-dimensional linear regression refers broadly to regimes where \( p\) is comparable to or larger than \( n\) . This includes the cases \( p > n\) , \( p \gg n\) , and \( p/n \to \gamma > 0\) .
Standard least squares works well when the number of predictors \( p\) is small relative to the sample size \( n\) and the design matrix \( X\) is well-conditioned. However, when predictors are highly correlated or \( p\) approaches \( n\) , least squares becomes unstable, since small changes in the data can lead to large changes in coefficient estimates. In the case \( p > n\) , \( X^\top X\) is singular, and the minimizer is not unique.
Ridge regression addresses these problems by adding a penalty term that shrinks coefficients toward zero, trading a small amount of bias for a potentially substantial variance reduction [62, 53]. In numerical analysis and optimization ridge regression is also known as Tikhonov regularization (named for Andrey Tikhonov [63]).
Definition 6 (Ridge Regression)
Given observations \( \{(x_i, y_i)\}_{i=1}^n\) , the ridge regression estimator with regularization parameter \( \lambda \geq 0\) is
(85)
The ridge objective balances two competing goals:
The regularization parameter \( \lambda\) controls the trade-off between these two goals.
Unlike many regularized methods, ridge regression has an explicit solution.
Theorem 18 (Ridge Regression Solution)
The ridge regression estimator has the closed-form solution:
(86)
Furthermore, \( X^\top X + \lambda I_p\) is invertible for any \( \lambda > 0\) , even when \( X^\top X\) is singular (i.e., when \( p > n\) or when \( X\) has collinear columns).
Proof
The objective function is
Expanding this expression gives
We take the gradient
and set it to zero,
For \( \lambda > 0\) , the matrix \( X^\top X + \lambda I_p\) is positive definite, i.e.,
for all \( \theta \neq 0\) . Hence, we can compute
The Hessian \( \nabla^2 f(\theta) = 2(X^\top X + \lambda I_p) \succ 0\) , which confirms that \( \hat{\theta}_{\text{ridge}}(\lambda)\) is indeed a minimum.
When \( X\) has full column rank, the least squares solution is given by \( \hat{\theta}_{\text{LS}} = (X^\top X)^{-1}X^\top y\) . Ridge regression modifies this by adding \( \lambda I_p\) to \( X^\top X\) , which stabilizes the inversion when eigenvalues of \( X^\top X\) are small and ensures invertibility even when \( X^\top X\) is singular.
The SVD provides deep insight into how ridge regression works.
Theorem 19 (Ridge Regression via SVD)
Let \( X = U\Sigma V^\top\) be the SVD of \( X \in \mathbb{R}^{n \times p}\) with singular values \( \sigma_1 \geq \sigma_2 \geq … \geq \sigma_r > 0\) where \( r = \rm{rank}(X)\) . Write \( U = [u_1, …, u_n]\) and \( V = [v_1, …, v_p]\) . Then,
(87)
where \( D_\lambda = \rm{diag}\left(\frac{\sigma_1}{\sigma_1^2 + \lambda}, …, \frac{\sigma_r}{\sigma_r^2 + \lambda}\right)\) .
Proof
Starting from the ridge solution \( \hat{\theta}_{\text{ridge}} = (X^\top X + \lambda I_p)^{-1}X^\top y\) we have
(88)
Since \( \Sigma^\top\Sigma = \rm{diag}(\sigma_1^2, …, \sigma_r^2, 0, …, 0)\) , it follows that
Therefore,
Substituting this expression into (88) gives
(89)
It is instructive to compare (89) with the least squares solution (when \( r = p\) ):
(90)
In the surfing exmaple, if wave height and wave period are highly correlated in the dataset, ridge regression prevents the fitted coefficients from becoming unstable by shrinking poorly determined combinations of features.
So, how does ridge regression fare with respect to the bias-variance tradeoff? The following result is straightforward (the proof is left to the reader as Exercise 42).
Proposition 9
Under the assumptions (A1) and (A2), the ridge regression estimator \( \hat{\theta}_{\text{ridge}}(\lambda)\) has the following properties:
Furthermore, let the SVD of \( X\) be \( X=U \Sigma V^\top\) with \( \rm{rank} X = r\) , and write \( \tilde\theta = V^\top\theta\) , then the MSE of the estimator \( \hat{\theta}_{\text{ridge}}(\lambda)\) is given by
Unlike in Theorem 15, we do not require that \( X\) has full rank (assumption (A3)), since being able to handle the rank-deficient case is exactly a key motivation for introducing ridge regression in the first place.
Choosing the regularization parameter: Proposition 9 suggests that by choosing an appropriate value for the regularization parameter \( \lambda\) we can achieve a good balance between overfitting and underfitting of the solution. See Figure 27 for an illustration of this bias-variance tradeoff for the prediction error and the interplay between regularization and over/underfitting. The optimal choice for \( \lambda\) via the minimum of the MSE, indicated in Figure 27, is unfortunately not computable in practice, since it would require access to the true solution \( \theta\) . This begs the question how to find \( \lambda\) in practice.
Cross-validation, a widely used technique in data science and machine learning for hyperparameter selection, is a standard way to determine a good choice for \( \lambda\) . We describe the cross-validation approach in the context of ridge regression, but it should be understood that this technique is more broadly applicable.
Definition 7 (\( K\) -fold cross-validation for ridge regression)
To select \( \lambda\) :
Compute the prediction error on fold \( k\) :
If we know that the noise is Gaussian and we have a good estimate for the noise variance \( \sigma^2\) , instead of the rather expensive cross validation we can use Stein’s unbiased risk estimate (SURE). SURE provides an analytic estimate of prediction risk under Gaussian noise [64] and can therefore be used to select hyperparameters such as the ridge penalty or the lasso regularization parameter (see (91)) by minimizing the SURE value. While SURE often has lower variance than cross-validation and uses the full dataset, it relies on stronger assumptions—besides assuming Gaussian noise and knowledge of the noise variance, it imposes a certain smoothness condition (weak differentiability) on the estimator. Cross-validation, though computationally heavier, is thus more broadly applicable.
The work of Donoho and Johnstone [65] was instrumental in moving SURE from a theoretical result in statistics into a cornerstone of signal and image processing, in particular for data denoising (see also [66]).
Stein’s SURE has its roots in his earlier work [67, 68]. In fact, while the Gauss-Markov theorem states that the least squares estimator is the best linear unbiased estimator, Charles Stein proved in a seminal paper [67] the startling result that in dimensions \( p\ge 3\) , the least squares estimator is “inadmissible”. This result, also known as Stein’s Paradox, means there exists a biased “shrinkage” estimator—the James-Stein estimator [68]—that achieves a lower MSE for any true parameter value by pulling individual estimates toward a common average or the origin [69].
Linear regression and sparsity: In many applications in high-dimensional settings—such as in financial econometrics and risk management, natural language processing, recommender systems, neuroimaging, or cheminformatics—it is often believed that only a small subset of variables truly influence the process we try to model. Consequently, it is desirable to construct estimators that set many coefficients exactly to zero. Such sparse models can improve predictive performance by reducing variance, and they also lead to models that are much easier to interpret.
This motivation leads to the lasso (least absolute shrinkage and selection operator) [70, 53], which replaces the \( \ell_2\) -penalty with an \( \ell_1\) -penalty, namely we consider the regularized regression problem
(91)
for some \( \lambda > 0\) . Unlike ridge regression, the \( \ell_1\) -penalty encourages coefficients to be exactly zero, thereby performing variable selection as part of the estimation procedure. We will discuss the reason why the \( \ell_1\) -penalty promotes sparsity, associated theoretical guarantees, and numerical considerations extensively in Chapter 16 in connection with compressive sensing.
Outliers: An important consideration in linear regression (or in any data science task for that matter) is how different error functions handle outliers, i.e., data points that deviate significantly from the pattern exhibited by the majority of observations. The least squares solution is sensitive to outliers, since a single observation with large error \( (y_i - x_i^\top\theta)\) contributes quadratically to the objective, potentially dominating the fit. In contrast, the solution of the \( \ell_1\) objective (also called \( \ell_1\) -regression or least absolute deviations regression) given by
is more robust, since outliers contribute only linearly. However, one downside of the \( \ell_1\) loss function is its lack of smoothness, since the function \( f(x)=|x|\) is not differentiable at the origin. Also, \( \ell_1\) estimators are typically less statistically efficient compared to \( \ell_2\) estimators when the noise is Gaussian.
A good compromise is provided by the Huber method [71]. The Huber loss is defined as
where \( r_i = y_i - x_i^\top \theta\) is the \( i\) -th residual and \( \delta > 0\) is a tuning parameter (see also Figure 28(b)). Because the derivative is continuous everywhere (including the transition points at \( \pm \delta\) ), the Huber loss is \( C^1\) -continuous. This ensures that gradient-based optimization algorithms (like gradient descent, see Chapter 9.4) converge reliably.
Figure 28 shows a comparison of the \( \ell_2\) -loss, the \( \ell_1\) -loss, and the Huber loss for a linear regression example with a few outliers (left panel), together with the associated loss functions (right panel). It is evident that the solution of the \( \ell_2\) objective is affected most by the few outliers. The solutions associated with \( \ell_1\) -loss and with Huber loss, respectively (which are almost identical in this case) are only marginally affected by the outliers.
In classical linear regression, we often treat the data as a collection of fixed points to be “fit.” However, in the presence of noise, a more powerful perspective is to treat the measurement as a corrupted signal. This leads us to the Wiener Filter, the mathematically optimal way to extract a signal from noise via a linear estimator by balancing experimental evidence against prior knowledge [72, 73].
In this section we will show that ridge regression is simultaneously a maximum a posteriori (MAP) estimator under a Gaussian prior, the solution to a properly normalized loss function whose two terms have direct statistical interpretations, and a componentwise Wiener filter applied in the SVD basis of the design matrix. The unifying object is the signal-to-noise ratio (SNR), which controls how strongly the estimator trusts the data relative to the prior. We will see that ridge regression acts as a component-wise Wiener filter in the SVD basis.
The Wiener filter addresses a fundamental question: Given a noisy measurement \( y = s + n\) , how much should we trust \( y\) to estimate the true signal \( s\) ? Let us first gain some intuition for the scalar case. If we assume the signal \( s\) and noise \( n\) are independent, zero-mean scalar random variables with finite variances \( \sigma_s^2\) and \( \sigma_n^2\) , the optimal linear estimate \( \hat{s} = Gy\) is found by minimizing the MSE
(92)
To find the minimum mean squared error (MMSE) estimator, we expand the cost function (92), use the fact the signal and the noise are uncorrelated, and set the derivative of (92) with respect to \( G\) to zero. We arrive at the solution, also called Wiener Gain,
where \( \text{SNR} = \sigma_s^2 / \sigma_n^2\) represents the signal-to-noise ratio . For high SNR, i.e., if the signal is much stronger than the noise, \( G \approx 1\) , we trust the measurement. For low SNR, i.e., if the noise dominates, \( G \approx 0\) , we ignore the measurement to avoid a high-variance error, relying instead on our prior knowledge (that the signal is centered at zero).
We can now generalize this logic to the multivariate case. Consider the linear model
(93)
where \( y \in \mathbb{R}^n\) is the measurement vector, \( X \in \mathbb{R}^{n \times p}\) is the design matrix, \( \theta \in \mathbb{R}^p\) is the unknown parameter vector, and \( \varepsilon\) is Gaussian noise with known variance \( \sigma^2 > 0\) . The likelihood of \( \theta\) given the observations is therefore
(94)
We place a zero-mean isotropic Gaussian prior on \( \theta\) :
(95)
where \( \tau^2 > 0\) is the prior variance.
By Bayes’ theorem the posterior is \( p(\theta | y) \propto p(y | \theta)\,p(\theta)\) . Taking the negative log-posterior and dropping terms that do not depend on \( \theta\) , the MAP estimate is the minimizer of
(96)
This is the normalized loss function. The first term is the data-fidelity term: it measures how well \( \theta\) explains the observations, weighted by the inverse noise variance \( 1/\sigma^2\) . The second term is the regularization term: it penalizes large coefficients, weighted by the inverse prior variance \( 1/\tau^2\) . Both terms now have identical units (nats of log-probability), making the trade-off between them dimensionally consistent.
Remark 16 (Connection to standard ridge regression)
Multiplying \( \mathcal{L}(\theta)\) by \( 2\sigma^2\) gives the standard ridge objective \( \|y - X\theta\|^2 + \lambda\|\theta\|^2\) with regularization parameter
(97)
The standard formulation obscures the individual roles of \( \sigma^2\) and \( \tau^2\) by collapsing them into the single scalar \( \lambda\) . The normalized form (96) keeps them explicit and makes the probabilistic interpretation transparent.
Consider (96) and set \( \nabla_\theta \mathcal{L}(\theta) = 0\) ; this gives
(98)
Rearranging terms and multiplying by \( \sigma^2\) yields
(99)
Since \( X^\top X \succeq 0\) and \( \lambda > 0\) , the matrix \( X^\top X + \lambda I_p \succ 0\) is strictly positive definite for every \( \lambda > 0\) , regardless of the rank of \( X\) . The unique MAP (and ridge) estimate is therefore
(100)
We already confirmed earlier that this gives a strict global minimum.
Because both the likelihood (94) and the prior (95) are Gaussian, the posterior is also Gaussian:
(101)
It is instructive to revisit the componentwise structure of the ridge estimator by using the SVD of the design matrix, \( X=U \Sigma V^\top\) , which we derived in (89). The ridge estimate takes the form
(102)
Now we apply the rotations
(103)
In these coordinates the model (93) becomes \( \tilde y_i = \sigma_i \tilde\theta_i + \tilde\varepsilon_i\) with \( \tilde\varepsilon_i \sim \mathcal{N}(0, \sigma^2)\) i.i.d., and the ridge estimate (102) decouples into \( p\) independent scalar problems:
(104)
We now introduce the per-component signal-to-noise ratio. Under the prior (95), the \( i\) -th rotated coefficient satisfies \( \tilde\theta_i \sim \mathcal{N}(0, \tau^2)\) , so the signal component \( \sigma_i\tilde\theta_i\) has variance \( \sigma_i^2\tau^2\) . The corresponding observation \( \tilde y_i = \sigma_i\tilde\theta_i + \tilde\varepsilon_i\) has noise variance \( \sigma^2\) . The SNR in the \( i\) -th direction is therefore
(105)
Substituting \( \lambda = \sigma^2/\tau^2\) , note that
(106)
so the shrinkage factor in (104) can be written as
(107)
The ridge estimate in the principal-component basis therefore takes the form
(108)
The connection to Wiener filtering deserves elaboration. Consider the scalar model \( \tilde y_i = \sigma_i\tilde\theta_i + \tilde\varepsilon_i\) with \( \tilde\theta_i \sim \mathcal{N}(0,\tau^2)\) and \( \tilde\varepsilon_i \sim \mathcal{N}(0,\sigma^2)\) independent. This is exactly the signal-plus-noise model underlying the Wiener filter that we introduced at the beginning of this section: we observe the signal \( \sigma_i\tilde\theta_i\) corrupted by noise \( \tilde\varepsilon_i\) , and we wish to estimate \( \tilde\theta_i\) .
The linear MMSE estimator of \( \tilde\theta_i\) given \( \tilde y_i\) is:
(109)
Dividing numerator and denominator of the second term on the right-hand side of (109) by \( \sigma^2\) gives
(110)
which is identical to (108). Since the model is jointly Gaussian, the linear MMSE estimator coincides with the MAP estimator, confirming that ridge regression achieves the minimum MSE in each principal direction simultaneously.
The Wiener filter gain \( W_i = \mathrm{SNR}_i/(1+\mathrm{SNR}_i)\) interpolates between two extreme regimes of high SNR and low SNR by continuously interpolating between the data and the prior. The fraction of the least squares estimate that is retained is exactly \( \mathrm{SNR}_i/(1 + \mathrm{SNR}_i) \in (0,1)\) .
Reflecting on the derivations above, we have shown that the following three problems have identical solutions:
Regularized least squares (ridge regression). Minimize the standard ridge objective:
MAP estimation under a Gaussian prior. Minimize the normalized probabilistic loss:
Componentwise Wiener filtering in the SVD basis. Apply the Wiener filter gain to each singular value component:
Exercise 39
Show that if \( x_1,x_2,…, x_n\) are \( n\) independent observations of a \( p\) -dimensional random variable \( X\in \mathbb{R}^p\) , then
is an unbiased estimate of \( \Sigma = \mathbb{E}(X-\mu)(X-\mu)^T\) , where \( \mu = \mathbb{E}X\) is the true mean and \( \mu_n = \frac{1}{n} \sum_{i=1}^n x_i\) is the sample mean. That is, show \( \mathbb{E}(\Sigma_n) = \Sigma\) .
Exercise 40
For the least squares estimator \( \hat{\theta}_{\text{LS}} = (X^\top X)^{-1}X^\top y\) show that the bias-variance expression (81) takes the form
Exercise 41
This exercise relates to Theorem 13. Show that an unbiased estimator of \( \sigma^2\) is given by \( \hat{\sigma}^2_{\text{MLE}} = \frac{1}{n-p}\|y - X\hat{\theta}_{\text{LS}}\|^2\) .
Exercise 42
Prove Proposition 9.
Exercise 43
Consider the linear model
where \( X \in \mathbb{R}^{n \times p}\) is a random matrix with entries \( X_{ij} \sim \mathcal{N}(0, 1/n)\) and \( \varepsilon \sim \mathcal{N}(0, \sigma^2 I_n)\) . Assume \( n > p\) so that \( X\) is full rank almost surely.
Show that conditioned on \( X\) , the estimator follows a Gaussian distribution
Exercise 44
Use the same setup as in the previous exercise. Implement a simulation to verify the theoretical MSE. Fix \( p = 50\) and vary \( n\) from \( 60\) to \( 500\) . For each \( n\) , generate 100 trials of \( X\) and \( \varepsilon\) . Compute the average \( \| \hat{\theta}_{MLE} - \theta \|^2\) and plot it against the theoretical prediction \( \sigma^2 \rm{trace}((X^T X)^{-1})\) .
Exercise 45
Generate a synthetic dataset with \( n=100\) observations and \( p=10\) features where only the first 3 features are truly informative (how do you translate this condition “only the first 3 features are truly informative” into your experimental setup?). Now add Gaussian noise \( \varepsilon \sim \mathcal{N}(0, 0.5)\) to the observations.
Exercise 46
Suppose \( s\) is a Bernoulli signal taking values \( \pm 1\) with equal probability (so \( \mathbb{E}[s] = 0\) , \( \sigma_s^2 = 1\) ), and \( n \sim \mathcal{N}(0, \sigma_n^2)\) independent of \( s\) . The observation is \( y = s + n\) .
Show that the true MMSE estimator is the conditional mean
This exercise tells us the Wiener filter is the best linear approximation to \( \tanh (y/\sigma_n^2)\) , but the two (approximately) coincide only at low SNR (where both are approximately linear) and the gap grows as the SNR increases.
Exercise 47
Suppose the true relationship between a feature \( x\) and a response \( y\) is governed by a quadratic function with additive noise
We are given a small training set \( S\) of \( n=5\) points sampled uniformly from \( x \in [-1, 1]\) .
Exercise 48
Total Least Squares. Suppose we wish to fit a linear model \( y = X\theta\) where \( X \in \mathbb{R}^{n \times p}\) is a matrix of predictors, \( y \in \mathbb{R}^n\) is a vector of observations \( \theta \in \mathbb{R}^p\) is an unknown parameter vector. In standard least squares we assume that the predictor matrix \( X\) is known exactly and that only \( y\) contains noise.
However, suppose both \( X\) and \( y\) are contaminated by measurement errors. Let the true relationship be
where \( \Delta X\) and \( \delta y\) are unknown perturbations.
Total least squares seeks corrections \( \Delta X\) and \( \delta y\) that solve
while minimizing the total squared perturbation
Show that this problem can be written as
where \( A = [X | y]\) is the augmented data matrix.
If \( v =[v_1, \dots, v_p, v_{p+1}]^\top\) is this singular vector, show that
Exercise 49
Consider a random variable \( X\) with \( \mathbb{E}[X] = \mu\) and \( \rm{Var}(X) = \sigma^2\) . Suppose you have \( n\) i.i.d. observations \( x_1, \dots, x_n\) . You are considering two estimators for \( \mu\) :
\begin{myexercise} This exercise is about ridge regression and cross-validation. Use the following Matlab-type code to generate a synthetic high-dimensional dataset where only a few features are truly informative:
rng(100);
n = 500; p = 1000; X = randn(n, p);
theta_true = [ones(10, 1); zeros(p-10, 1)];
y = X * theta_true + 0.5 * randn(n, 1);\end{myexercise}
A crucial part of data science consists of the study of networks. Network science, or graph theory, unifies the study of diverse types of networks, such as social networks, protein-protein interaction networks, gene-regulation networks, and the internet. In this chapter we introduce graph theory and treat the problem of clustering, to identify similar data points, or vertices, in (network) data.
Before we introduce the formalism of graph theory, we describe the celebrated PageRank algorithm. This algorithm is a principal component behind web search algorithms, in particular in Google. The goal of PageRank is to quantitatively rate the importance of each page on the web, allowing the search algorithm to rank the pages and thereby present to the user the more important pages first. Search engines such as Google have to carry out three basic steps:
Here, we will focus on the third step. We follow mainly the derivation in [74]. We aim to develop a score of importance for each webpage. A score will be a non-negative number. A key idea in assigning a score to any given webpage is that the page’s score is derived from the links made to that page from other webpages — “A person is important not if it knows a lot of people, but if a lot of people know that person”.
Suppose the web of interest contains \( n\) pages, each page indexed by an integer \( k\) , \( 1 \le k \le n\) . A typical example is illustrated in Figure 31, in which an arrow from page \( k\) to page \( j\) indicates a link from page \( k\) to page \( j\) . Such a web is an example of a directed graph. The links to a given page are called the backlinks for that page. We will use \( x_k\) to denote the importance score of page \( k\) in the web. \( x_k\) is nonnegative and \( x_j > x_k\) indicates that page \( j\) is more important than page \( k\) .
A very simple approach is to take \( x_k\) as the number of backlinks for page \( k\) . In the example in Figure 31, we have \( x_1 = 2, x_2 = 1, x_3 = 3\) , and \( x_4 = 2\) , so that page 3 is the most important, pages 1 and 4 tie for second, and page 2 is least important. A link to page \( k\) becomes a vote for page \( k\) ’s importance. This approach ignores an important feature one would expect a ranking algorithm to have, namely, that a link to page \( k\) from an important page should boost page \( k\) ’s importance score more than a link from an unimportant page. In the web of Figure 31, pages 1 and 4 both have two backlinks: each links to the other, but the second backlink from page 1 is from the seemingly important page 3, while the second backlink for page 4 is from the relatively unimportant page 2. As such, perhaps the algorithm should rate the importance of page 1 higher than that of page 4.
As a first attempt at incorporating this idea, let us compute the score of page \( j\) as the sum of the scores of all pages linking to page \( j\) . For example, consider the web in our toy example. The score of page 1 would be determined by the relation \( x_1 = x_3 + x_4\) . However, since \( x_3\) and \( x_4\) will depend on \( x_1\) , this seems like a circular definition, since it is self-referential (it is exactly this self-referential property that will establish a connection to eigenvector problems!).
We also seek a scheme in which a webpage does not gain extra influence simply by linking to lots of other pages. We can do this by reducing the impact of each link, as more and more outgoing links are added to a webpage. If page \( j\) contains \( n_j\) links, one of which links to page \( k\) , then we will boost page \( k\) ’s score by \( x_j/n_j\) , rather than by \( x_j\) . In this scheme, each webpage gets a total of one vote, weighted by that web page’s score, that is evenly divided up among all of its outgoing links. To quantify this for a web of \( n\) pages, let \( L_k \subset \{1,2,\dots, n\}\) denote the set of pages with a link to page \( k\) , that is, \( L_k\) is the set of page \( k\) ’s backlinks. For each \( k\) we require
where \( n_j\) is the number of outgoing links from page \( j\) .
If we apply these scheme to the toy example in Figure 31, then for page 1 we have \( x_1 = x_3/1 + x_4/2\) , since pages 3 and 4 are backlinks for page 1 and page 3 contains only one link, while page 4 contains two links (splitting its vote in half). Similarly, \( x_2 = x_1/3, x_3 = x_1/3 + x_2/2 + x_4/2\) , and \( x_4 = x_1/3 + x_2/2\) . These conditions can be expressed as linear system of equations \( Ax =x\) , where \( x=[x_1,x_2,x_3,x_4]^T\) and
Thus, we end up with an eigenvalue/eigenvector problem: Find the eigenvector \( x\) of the matrix \( A\) , associated with the eigenvalue 1. We note that \( A\) is a column-stochastic matrix, since it is a square matrix for which all of its entries are nonnegative and the entries in each column sum to 1. If we build a random walk on the internet where each link is clicked with equal probability then \( A_{ij}\) is the probability that a random walked in page \( j\) goes to page \( i\) . Later, in Chapter 7, we will use random walks on (undirected) graphs in order to embed their nodes in euclidean space, we note that, in that context, we will mostly work with \( M=A^T\) the matrix for which \( M_{ij}\) corresponds to the probability of taking step from \( i\) to \( j\) . Stochastic matrices arise in the study of Markov chains and in a variety of modeling problems in economics and operations research. See e.g. [15] for more details on stochastic matrices. The fact that 1 is an eigenvalue of \( A\) is not just coincidence in this example, but holds true in general for stochastic matrices.
Proposition 10
A column-stochastic matrix \( A\) has an eigenvalue equal to 1 and 1 is also its largest eigenvalue.
Proof
Let \( A\) be an \( n\times n\) column-stochastic matrix. We first note that \( A\) and \( A^T\) have the same eigenvalues (their eigenvector will usually be different though). Let \( \mathbf{1} = [1,1,\dots,1]^T\) be the vector of length \( n\) which has all ones as entries. Since \( A\) is column-stochastic, we have \( A^T \mathbf{1} = \mathbf{1}\) (since all columns of \( A\) sum up to 1). Hence \( \mathbf{1}\) is an eigenvector of \( A^T\) (but not of \( A\) ) with eigenvalue 1. Thus 1 is also an eigenvalue of \( A\) .
To show that 1 is the largest eigenvalue of \( A\) we apply the Gershgorin Circle Theorem [15] to \( A^T\) . Consider row \( k\) of \( A^T\) . Let us call the diagonal element \( a_{k,k}\) and the radius will be \( \sum_{i \neq k} |a_{k,i}| = \sum_{i \neq k} a_{k,i}\) since \( a_{k,i} \ge 0\) . This is a circle with its center at \( a_{k,k} \in [0,1]\) and with radius \( \sum_{i \neq k} a_{k,i} = 1 - a_{k,k}\) . Hence, this circle has 1 on its perimeter. This holds for all Gershgorin circles for this matrix. Thus, since all eigenvalues lie in the union of the Gershgorin circles, all eigenvalues \( \lambda_i\) satisfy \( |\lambda_i| \le 1\) .
In our example, we obtain as eigenvector \( x\) of \( A\) associated with eigenvalue 1 the vector \( x = [x_1,x_2,x_3,x_4]^T\) with entries \( x_1 = \frac{12}{31}, x_2 = \frac{4}{31}, x_3 = \frac{9}{31}\) , and \( x_4 = \frac{6}{31}\) . Hence, perhaps somewhat surprisingly, page 3 is no longer the most important one, but page 1. This can be explained by the fact, that the in principle quite important page 3 (which has three webpages linking to it) has only one outgoing link, which gets all its “voting power”, and that link points to page 1.
In reality, \( A\) can easily be of size a billion times a billion. Fortunately, we do not need compute all eigenvectors of \( A\) , only the eigenvector associated with the eigenvalue 1, which, as we know, is also the largest eigenvalue of \( A\) . This in turn means we can resort to standard power iteration to compute \( x\) fairly efficiently (and we can also make use of the fact that \( A\) will be a sparse matrix, i.e., many of its entries will be zero). The actual PageRank algorithms adds some minor modifications, but the essential idea is as described above.
The idea to use eigenvectors for ranking dates back to the late 1800s to the work of Edmund Landau in the context of ranking in chess tournaments, it was actually Landau’s first mathematical paper when he was 18 years old [75] (with a follow-up later [76]). You can read about this nice story in [77].
We now introduce the formalism for undirected graphs, one of the main objects of study in what follows. A graph \( G = (V,E)\) contains a set of nodes \( V=\left\{v_1,\dots,v_n\right\}\) and edges \( E\subseteq {V \choose 2 }\) . An edge \( (i,j)\in E\) if \( v_i\) and \( v_j\) are connected. Figure 32 depicts one of the graph theorists’ favorite examples, the Petersen graph .
Let us recall some concepts about graphs that we will need.
A particularly useful way to represent a graph is through its adjacency matrix. Given a graph \( G=(V,E)\) on \( n\) nodes (\( |V|=n\) ), we define its adjacency matrix \( A \in \mathbb{R}^{n\times n}\) as the symmetric matrix with entries
(111)
Sometimes, we will consider weighted graphs \( G=(V,E,W)\) , where edges may have weights \( w_{ij}\) that are non-negative \( w_{ij}\geq 0\) and symmetric \( w_{ij} = w_{ji}\) .
Much of the sequel will deal with graphs. Chapter 7 will treat (network) data visualization, dimension reduction, and embeddings of graphs in Euclidean space. Chapter 13 will introduce and study important random graph models. The rest of this Chapter will be devoted to spectral graph theory, clustering, and graph metrics.
Clustering is one of the central tasks in machine learning. Given a set of data points, or nodes of a graph, the purpose of clustering is to partition the data into a set of clusters where data points assigned to the same cluster correspond to similar data points (depending on the context, it could be for example having small distance to each other if the points are in Euclidean space, or having high connectivity if on a graph). We will start with an example of clustering points in Euclidean space, and later move back to graphs.
One the most popular methods used for clustering is \( k\) -means clustering. Given \( x_1,\dots,x_n\in\mathbb{R}^p\) the \( k\) -means clustering partitions the data points into clusters \( S_1\cup \dots \cup S_k\) with centers \( \mu_1,\dots,\mu_k\in\mathbb{R}^p\) as the solution to:
(112)
Note that, given the partition, the optimal centers are given by
Lloyd’s algorithm [78] (also sometimes known as the \( k\) -means algorithm), is an iterative algorithm that alternates between
Given centers \( \mu_1,\dots,\mu_k\) , assign each point \( x_i\) to the cluster \( S_l\) with nearest center
Unfortunately, Lloyd’s algorithm is not guaranteed to converge to the solution of (112). Indeed, Lloyd’s algorithm oftentimes gets stuck in local optima of (112). In the following we will discuss convex relaxations for clustering, which can be used as an alternative algorithmic approach to Lloyd’s algorithm, but since optimizing (112) is \( NP\) -hard there is no polynomial time algorithm that works in the worst-case (assuming the widely believed conjecture \( P\neq NP\) , see also Chapter 13.1)
While popular, \( k\) -means clustering has some potential issues:
A natural way to try to overcome the issues of \( k\) -means depicted in Figure 34 is by transforming the data into a graph and cluster the graph: Given the data points we can construct a weighted graph \( G = (V,E,W)\) using a similarity kernel \( K_{\varepsilon}\) , such as \( K_{\varepsilon}(u) = \exp\left(-\frac1{2\varepsilon}u^2\right)\) , by associating each point to a vertex and, for which pair of nodes, set the edge weight as
Another popular procedure to transform data into a graph is by constructing a graph where data points are connected if they correspond to the nearest neighbors. We note that this procedure only needs a measure of distance, or similarity, of data points and not necessarily that they lie in an Euclidean space. Given this motivation, and the prevalence of network data, we will now address the problem of clustering the nodes of a graph.
Given a graph \( G=(V,E,W)\) , the goal is to partition the graph into clusters in a way that keeps as many of the edges, or connections, within the clusters and has as few edges as possible across clusters. We will focus on the case of two clusters, and briefly address extensions at the end of this chapter. A natural way to measure a vertex partition \( \left(S,S^c\right)\) is
If we represent the partition by a vector \( y\in\{\pm 1\}^n\) where \( y_i=1\) if \( i\in S\) , and \( y_i=-1\) otherwise, then the cut is a quadratic form on the Graph Laplacian.
Definition 8 (Graph Laplacian and Degree Matrix)
Let \( G=(V,E,W)\) be a graph and \( W\) the matrix of weights (or adjacency matrix if the graph is unweighted). The degree matrix \( D\) is a diagonal matrix with diagonal entries
(113)
The graph Laplacian of \( G\) is given by
(114)
Equivalently
recall that \( e_i\) denotes the \( i\) -th canonical basis element with entries given by \( (e_i)_j=\delta_{ij}\) .
Note that the entries of \( L_G\) are given by
If \( S\subset V\) and \( y\in\{\pm 1\}^n\) such that \( y_i=1\) if \( i\in S\) , and \( y_i=-1\) otherwise, then it is easy to see that
The following proposition establishes
(115)
for \( y\in\{\pm 1\}^n\) such that \( y_i=1\) if and only if \( i\in S\) .
Proposition 11
Let \( G=(V,E,W)\) be a graph and \( L_G\) its graph Laplacian. For any \( x\in\mathbb{R}^n\)
Proof
Note that Proposition 11 implies that the graph Laplacian \( L_G\) is a positive semidefinite (PSD) matrix, since \( x^T L x \geq 0\) for all \( x\) (assuming non-negative weights \( w_{ij} \geq 0\) ). This property can also be deduced directly from Definition 8 of \( L_G\) as the (non-negative) weighted sum of rank-1 PSD matrices.
While \( \operatorname{cut}(S)\) is a good way of measuring the fit of a partition, it has a major drawback: the minimum cut is achieved for \( S=\emptyset\) (since \( \operatorname{cut}(\emptyset) = 0\) ) which is a rather meaningless choice of partition. Constraining the partition to be non-trivial would not overcome this drawback, because very unbalanced partitions would still be favored (e.g., partitions with \( |S|=1\) containing just a single node). Below we discuss how to promote more balanced partitions.
Remark 17
One simple way to address this is to simply ask for an exactly balanced partition, \( |S| = |S^c|\) (let us assume the number of vertices \( n=|V|\) is even). We can then identify a partition with a label vector \( y\in\{\pm 1\}^n\) where \( y_i=1\) if \( i\in S\) , and \( y_i=-1\) otherwise. Also, the balanced condition can be written as \( \sum_{i=1}^n y_i = 0\) . This means that we can write the minimum balanced cut as
(116)
which is suggestive of the connection between clustering and spectral properties of \( L_G\) . This connection will be made precise below.
Asking for the partition to be exactly balanced is too restrictive in many cases. There are several ways to evaluate a partition that are variations of \( \operatorname{cut}(S)\) that take into account the intuition that one wants both \( S\) and \( S^c\) not to be too small (although not necessarily equal to \( |V|/2\) ). A prime example is Cheeger’s cut.
Definition 9 (Cheeger’s cut)
Given a graph and a vertex partition \( (S,S^c)\) , the Cheeger cut (also known as conductance, or expansion) of \( S\) is given by
where \( \operatorname{vol}(S) = \sum_{i\in S}\deg(i)\) .
Also, the Cheeger’s constant of \( G\) is given by
A similar object is the Normalized Cut, \( \operatorname{Ncut}\) , which is given by
Note that \( \operatorname{Ncut}(S)\) and \( h(S)\) are tightly related, in fact it is easy to see that:
Below we will show that \( \operatorname{Ncut}\) can be written in terms of a minimization of a quadratic form involving the graph Laplacian \( L_G\) , analogously to the balanced partition as described in Remark 17.
Recall that the cut value of a balanced partition can be written as
An intuitive way to relax the balanced condition is to allow the labels \( y\) to take values in two different real values \( a\) and \( b\) (e.g. \( y_i = a\) if \( i\in S\) and \( y_j = b\) if \( i\notin S\) ) but not necessarily \( \pm1\) . We can then use the notion of volume of a set to ensure a less restrictive notion of balanced by asking that
(117)
where
(118)
Thus (117) corresponds to \( \mathbf{1}^TDy = 0\) .
We also need to fix a scale for \( a\) and \( b\) :
which corresponds to \( y^TDy = 1\) .
This suggests considering
As we will see below, this corresponds precisely to \( \operatorname{Ncut}\) .
Proposition 12
For \( a\) and \( b\) to satisfy \( a\operatorname{vol}\left(S\right) + b\operatorname{vol}\left(S^c\right) = 0\) and \( a^2\operatorname{vol}\left(S\right) + b^2\operatorname{vol}\left(S^c\right) = 1\) it must be that
corresponding to
Note that \( \operatorname{vol}\) is defined in (118).
Proof
The proof involves only doing simple algebraic manipulations together with noticing that \( \operatorname{vol}(S)+\operatorname{vol}(S^c) = \operatorname{vol}(G)\) .
Proposition 13
where \( y\) is given by
Proof
This means that finding the minimum \( \operatorname{Ncut}\) corresponds to solving
(119)
Since solving (119) is, in general, NP-hard, we consider a similar problem where the constraint that \( y\) can only take two values is removed:
(120)
Given a solution of (120) we can round it to a partition by setting a threshold \( \tau\) and taking \( S = \left\{ i\in V:\, y_i \leq \tau \right\}\) . We will see below that \( (120)\) is an eigenvector problem (for this reason we call (120) a spectral relaxation).
In order to better see that (120) is an eigenvector problem (and thus computationally tractable), set \( z = D^{\frac12}y\) and
(121)
then (120) is equivalent
(122)
Note that \( \mathcal{L}_G = I - D^{-\frac12}WD^{-\frac12}\) . We order its eigenvalues in increasing order \( 0=\lambda_1\left( \mathcal{L}_G\right) \leq \lambda_2\left( \mathcal{L}_G\right) \leq … \leq \lambda_n\left( \mathcal{L}_G\right)\) . The eigenvector associated with the smallest eigenvalue is given by \( D^{\frac12}\mathbf{1}\) . By the variational interpretation of the eigenvalues, it follows that the solution of (122) is \( \lambda_2\left( \mathcal{L}_G\right)\) and the minimizer is given by the second smallest eigenvector of \( \mathcal{L}_G = I - D^{-\frac12}WD^{-\frac12}\) , which we call \( v_2\) . Note that this corresponds also to the second largest eigenvector of \( D^{-\frac12}WD^{-\frac12}\) . This means that the optimal \( y\) in (120) is given by \( \varphi_2 = D^{-\frac12}v_2\) . This motivates Algorithm 1, which is often referred to as Spectral Clustering:
Algorithm 1 (Spectral Clustering)
Given a graph \( G=(V,E,W)\) , let \( v_2\) be the eigenvector corresponding to the second smallest eigenvalue of the normalized Laplacian \( \mathcal{L}_G\) , as defined in (121). Let \( \varphi_2 = D^{-\frac12}v_2\) . Given a threshold \( \tau\) (one can try all different possibilities, or run \( k\) -means for \( k=2\) ), set
Because the relaxation (120) is obtained from (119) by removing a constraint we immediately have that
This means that
In what follows we will show a performance guarantee for Algorithm 1.
Lemma 2
There is a threshold \( \tau\) producing a partition \( S\) such that
This implies in particular that
meaning that Algorithm 1 is suboptimal at most by a square-root factor. Note that this also directly implies the famous Cheeger’s Inequality, stated next.
Theorem 20 (Cheeger’s Inequality)
Recall the definitions above. The following holds:
Cheeger’s inequality was first established for manifolds by Jeff Cheeger in 1970 [79], and the graph version is due to Noga Alon and Vitaly Milman [80, 81] in the mid 80s. Cheeger’s inequality for a closed manifold \( M\) gives a bound on the area of a hypersurface \( E\) , that partitions \( M\) into two disjoint parts.
Theorem 21 (Cheeger’s Inequality (Cheeger 1970))
Let \( h_M\) be the Cheeger isoperimetric constant of \( M\) , defined as
where \( E\) is a smooth submanifold of \( M\) of \( n-1\) dimensions that divides it into two disjoint submanifolds \( A\) and \( B\) . Let \( \lambda_M\) be the smallest positive eigenvalue of the Laplacian, or Laplace-Bertrami operator, on \( M\) . Then
Before proving Cheeger’s inequality for graphs, we first discuss another eigenvalue inequality, that gives a flavor of the connection between the second eigenvalue of the normalized graph Laplacian and the geometry of the graph (see also [82]).
Associate a cost \( c(u,v)\) for each pair of nodes inversely proportional to the weight between them:
(123)
A path of length \( k\) connecting \( u\) and \( v\) is of the form
The cost associated with this path is
The geodesic distance or shortest path between \( u\) and \( v\) is the minimum of the cost over all possible paths connecting them:
The diameter of the graph \( G\) is the largest geodesic distance
We demonstrate that for \( \lambda_2(\mathcal{L}_G)\) , the second smallest eigenvalue of the normalized graph Laplacian \( \mathcal{L}_G = D^{-1/2}L_G D^{-1/2}\) ,
(124)
That is, a small second eigenvalue implies that the diameter of the graph must be large. We already know that \( \lambda_2(\mathcal{L}_G) = 0\) implies that the graph is disconnected and the diameter is infinite. The bound (124) is more quantitative from that standpoint.
Proof (of (124))
Taking \( f\) to be an eigenfunction achieving the Rayleigh quotient characterization
Choose \( v_0, u_0\) such that
and
which exist since
Now, suppose
is the shortest path from \( u_0\) to \( v_0\) . We have
there the second-to-last inequality is an application of Cauchy-Schwarz inequality in dimension \( k-1\) (and relies on the fact that the weights \( w_{v_i,v_{i+1}}\) are positive).
The upper bound in Cheeger’s inequality (corresponding to Lemma 2) is more interesting but more difficult to prove, and it is often referred to as the “the difficult part” of Cheeger’s inequality. We will prove this Lemma in what follows. There are several proofs of this inequality (see [83] for four different proofs!). The proof that follows is an adaptation of the proof in this blog post [84] for the case of weighted graphs.
Proof (of Lemma 2)
We will show that given \( y\in\mathbb{R}^n\) satisfying
and \( y^TD\mathbf{1} = 0\) , there is a “rounding of it”, meaning a threshold \( \tau\) and a corresponding choice of partition
such that
Since \( y=\varphi_2\) satisfies the conditions with \( \delta = \lambda_2\left(\mathcal{L}_G \right)\) , this proves the Lemma.
We will pick this threshold at random and use the probabilistic method to show that at least one of the thresholds works.
First we can, without loss of generality, assume that \( y_1\leq … \leq y_n\) (we can simply relabel the vertices). Also, note that scaling of \( y\) does not change the value of \( \mathcal{R}(y)\) . Also, if \( y^TD\mathbf{1}=0\) adding a multiple of \( \mathbf{1}\) to \( y\) can only decrease the value of \( \mathcal{R}(y)\) : the numerator does not change and the denominator \( (y+c\mathbf{1})^TD(y+c\mathbf{1}) = y^TDy + c^2 \mathbf{1}^TD\mathbf{1} \geq y^TDy\) .
This means that we can construct (from \( y\) by adding a multiple of \( \mathbf{1}\) and scaling) a vector \( x\) such that
and
where \( m\) be the index for which \( \operatorname{vol}(\{1,\dots,m-1\}) \leq \operatorname{vol}(\{m,\dots,n\})\) but \( \operatorname{vol}(\{1,\dots,m\}) > \operatorname{vol}(\{m+1,\dots,n\})\) .
We consider a random construction of \( S\) with the following distribution. \( S = \{ i\in V:\, x_i \leq \tau \}\) where \( \tau \in [x_1,x_n]\) is drawn at random with the distribution
where \( x_1 \leq a\leq b \leq x_n\) .
It is not difficult to check that
Let us start by estimating \( \mathbb{E} \operatorname{cut}(S)\) .
Note that \( {\mathbb{P}}\{ (S,S^c) \text{ cuts the edge } (i,j) \} \) is \( \left| x_i^2 - x_j^2 \right| \) if \( x_i\) and \( x_j\) have the same sign and \( x_i^2 + x_j^2\) otherwise. Both cases can be conveniently upper bounded by \( \left| x_i - x_j\right| \left( | x_i | + |x_j | \right)\) . This means that
where the second inequality follows from the Cauchy-Schwarz inequality.
From the construction of \( x\) we know that
Also,
This means that
On the other hand,
to break ties, if \( \operatorname{vol}(S) = \operatorname{vol}(S^c)\) we take the “smallest” set to be the one with the first indices.
Note that \( m\) is always in the largest set. Any vertex \( j<m\) is in the smallest set if \( x_j \leq \tau \leq x_m = 0\) and any \( j>m\) is in the smallest set if \( 0 = x_m \leq \tau \leq x_j\) . This means that,
Which means that
Hence,
Note, however, that \( \frac{\mathbb{E} \operatorname{cut}(S) }{\mathbb{E} \min\{ \operatorname{vol}{S},\operatorname{vol}{S^c} \}}\) and \( \mathbb{E}\frac{\operatorname{cut}(S) }{\min\{ \operatorname{vol}{S},\operatorname{vol}{S^c} \}}\) do not necessarily coincide. Therefore, we do not necessarily have
However, since both random variables are positive,
or equivalently
which guarantees, by the probabilistic method, the existence of \( S\) such that
which is equivalent to
which concludes the proof of the Lemma.
Remark 18
Spectral clustering can also be viewed from the perspective of random walks. In fact, Proposition 15 shows that spectral clustering can be viewed as attempting to find clusters so as to minimize the probability of the random walker to jump from one cluster to the other.
Much of the above can be easily adapted to multiple clusters. Algorithm 2 is a natural extension of spectral clustering to multiple clusters.
Algorithm 2 (Spectral Clustering)
Given a graph \( G=(V,E,W)\) , let \( v_2,\dots,v_k\) be the eigenvectors corresponding to the second through \( k\) ’th eigenvalues of the normalized Laplacian \( \mathcal{L}_G\) , as defined in (121). Let \( \varphi_m = D^{-\frac12}v_m\) . Consider the map \( \phi:V\to\mathbb{R}^{k-1}\) defined as
Cluster the \( n\) points in \( k-1\) dimensions into \( k\) clusters using \( k\) -means.
There is also an analogue of Cheeger’s inequality. A natural way of evaluating \( k\) -way clustering is via the \( k\) -way expansion constant (see [85]):
where the maximum is over all choice of \( k\) disjoint subsets of \( V\) (but not necessarily forming a partition).
Another natural definition is
It is easy to see that
The following are analogues of Cheeger’s inequality for multiple clusters.
Theorem 22 ([85])
Let \( G=(V,E,W)\) be a graph and \( k\) a positive integer
(125)
Also,
Definition 10 (Irreducible matrix)
A matrix \( A \in \mathbb{R}^{n \times n}\) is called irreducible if there is no permutation matrix \( P\) such that
where \( A_{11}\) and \( A_{22}\) are square matrices (not necessarily of same dimensions). In other words, an irreducible matrix cannot be transformed into block upper-triangular matrix by simultaneous row/column permutations.
Exercise 50 (Irreducibility and graphs)
Let \( A \in \mathbb{R}^{n\times n}\) be a matrix with non-negative entries. We define \( G(A)\) , a directed graph associated to \( A\) , in the following way: there is a link from \( i\) to \( j\) if and only if \( A_{ij} > 0\) .
Exercise 51 (PageRank and Random Teleports)
In the lectures, we considered the PageRank algorithm designed for ranking pages based on their importance by analysing their ingoing and outgoing links. However, there exist graphs such that PageRank fails to predict meaningful scores. We will consider a simple fix for this problem which is often referred to as Random Teleports.
Let \( n > k > 1\) . Consider a directed graph on \( n + 1\) vertices, labelled \( 0, 1, …, n\) , with the following links. Vertex \( 0\) links only to itself, and any other vertex \( j \in [n]\) has \( k\) outgoing edges to its next \( k\) vertices: \( j + 1, …, j + k \mod n\) , and an edge to vertex \( 0\) . See Figure 35 for an example of such a graph.
Remark 19
Have you recognized the connection with the notion of irreducibility in this exercise?
Exercise 52 (Lloyd’s algorithm - monotonicity)
Recall the problem of \( k\) -means clustering: given \( k \in \mathbb{N}\) , we wish to separate \( n\) points \( x_1, …, x_n \in \mathbb{R}^p\) (with \( n \geq k\) ) into \( k\) clusters using the following objective function
(126)
This function depends on clusters \( S_1, …, S_k\) (that partition \( [n]\) ) and their centers \( \mu_1, …, \mu_k \in \mathbb{R}^p\) . Denote the minimum value by
Prove the following three properties.
Given a choice for the partition \( S_1, …, S_k\) (of non-empty sets), the centers that minimize (126) are given by
Given the centers \( \mu_1, …, \mu_k \in \mathbb{R}^p\) the partition that minimizes (126) assigns each point \( x_i\) to the cluster
Show that the optimization problem above can be rephrased in terms of the simplified objective function, that only depends on pairwise distances (double summation is taken only over unordered pairs):
(127)
Hint (c): Expand the square in (127) at the optimal choice of centers \( \mu_l = \frac{1}{|S_l|}\sum_{i\in S_l} x_i\) .
Exercise 53 (Lloyd’s algorithm - convergence)
Given any set of \( n\) points in \( \mathbb{R}^p\) , prove that Lloyd’s algorithm stops after a finite number of iterations, in other words, that the objective eventually stops decreasing.
Hint There are finitely many partitions of \( n\) points.
Exercise 54 (Lloyd’s algorithm - different objective)
Let \( n \geq k \geq 2\) , and \( x_1, …, x_n \in \mathbb{R}^p\) . Instead of minimizing sum-of-squares of \( \ell_2\) norms (126), suppose we want to minimize an objective function with \( \ell_1\) norms:
(128)
Denote the minimum value by
Exercise 55 (Properties of the adjacency matrix)
Let \( G = (V,E)\) be a graph and \( A\) its adjacency matrix.
Exercise 56 (Properties of the Laplacian matrix)
Let \( G = (V,E)\) be a graph and \( L\) its Laplacian matrix. Recall the convention: eigenvalues of \( L\) are ordered in non-decreasing order, i.e. \( \lambda_1(L) \leq \lambda_2(L) \leq … \leq \lambda_n(L)\) .
Show that we can express the Laplacian matrix \( L\) as
Let \( S\) be a component (maximal connected subgraph) in \( G\) , and \( \mathbf{1}_S\) a vector given by
Show that \( \mathbf{1}_S\) is in the kernel of \( L\) .
Exercise 57 (Normalized Laplacian)
Given an undirected weighted graph \( G = (V, E, W)\) , we define the normalized Laplacian matrix \( \mathcal{L}_G = D^{-1/2} L_G D^{-1/2}\) , where \( D\) is the degree matrix and \( L_G\) is the graph Laplacian.
Exercise 58
A contraction of a graph \( G\) is formed by identifying two distinct vertices, say \( u\) and \( v\) , into a single vertex \( v^*\) . The weights of edges incident to \( v^*\) are defined as follows:
Show that if \( H\) is formed by contractions from a graph \( G\) , then the second eigenvalue of the normalized Laplacians satisfy
Exercise 59 (Tightness of the upper bound in Cheeger’s inequality)
Let \( n \geq 4\) be an even number, and \( C_n\) a cycle graph on \( n\) vertices, labelled \( 1\) to \( n\) . We choose uniform weights \( w_{ij} = \mathbf{1}\left[ \{i,j\} \in E \right]\) , so that \( W = A\) .
Prove that for every cut \( S\) , with \( \emptyset \subsetneq S \subsetneq [n]\) , its Cheeger’s cut is lower bounded as
Denote by \( \lambda_2(C_n)\) the second smallest eigenvalue of the Laplacian of the graph \( C_n\) . Prove that
where \( c > 0\) is an absolute constant.
Hint (b): Consider the quadratic form \( x^\top L_{C_n} x\) for the vector \( x \in \mathbb{R}^n\) given by \( x_i = |i-\frac{n}{2}|-\frac{n}{4}\) .
Exercise 60 (Tightness of the lower bound in Cheeger’s inequality)
Let \( d \geq 2\) be an integer, \( G = (V,E)\) be the \( d\) -dimensional hypercube, and \( \mathcal{L}_G\) its normalized Laplacian. We index the \( n=2^d\) vertices of the hypercube by \( d\) -dimensional \( \left\{ 0, 1 \right\}\) -vectors, i.e. \( V = \left\{ 0,1 \right\}^d\) , and given any \( x, y \in V\) , we have \( \left\{ x,y \right\} \in E\) if and only if \( x\) and \( y\) differ in exactly one coordinate. The example for \( d = 3\) is given in Figure 36.
Given a (possibly empty) subset \( T \subseteq [d]\) let \( v_T \in \mathbb{R}^n\) be a vector, whose coordinates are indexed by \( n=2^d\) vertices of the hypercube and defined by
where \( x_i\) is the \( i\) -th coordinate of the vertex \( x\in\{0,1\}^d\) . Also, let \( S_T \subseteq V\) be the subset of vertices given by
[When \( T = \emptyset\) , we interpret the empty sum as zero, i.e. \( \sum_{i \in \emptyset}x_i = 0\) .]
Exercise 61 (Characterization of bipartite graphs)
Let \( G = (V,E)\) be a graph.
Hint (d): Try similar ideas as in the proof of the Gershgorin circle theorem, using \( \lambda_n(A) = -d\) .
Exercise 62
We will try various clustering methods on MNIST.
(a) Implement your own version of Lloyd’s k-means algorithm (do not use an existing k-means function; programming it yourself will make you better aware of potential pitfalls or other aspects you need to pay attention to). Test it on MNIST. How well does k-means cluster the data? You need to come up with a performance metric to quantify what “how well” means (in case of MNIST we know the ground truth.). Also note that k-means may give you different results, based on different random initializations - how do you handle that?
(b) Implement spectral clustering and apply it to MNIST. There are parameters that you need to choose (a good value for \( \sigma\) , how may eigenvectors do you keep,...). Recall that spectral clustering has a second step (the “rounding step”), in which you use your k-means algorithm from (a) to cluster the spectrally-embedded data. As in (a), evaluate the performance of your clustering algorithm.
In Chapter 4 we discussed dimension reduction via Principal Component Analysis. Many datasets however have low dimensional structure that is not linear. In this chapter we will discuss nonlinear dimension reduction techniques. Just as with spectral clustering in Chapter 6 we will focus on graph data while noting that most types of data can be transformed into a weighted graph by means of a similarity kernel (Section 7.1.1). The goal of this chapter is to embed the nodes of a graph in Euclidean space in a way that best preserves the intrinsic geometry of the graph (or the data that gave rise to the graph).
Diffusion maps [86] will allow us to represent (weighted) graphs \( G=(V,E,W)\) in \( \mathbb{R}^d\) , i.e. associating, to each node, a point in \( \mathbb{R}^d\) . Before presenting diffusion maps, we will introduce a few important notions. The reader may notice the similarities with the objects described in the context of PageRank in Chapter 6, the main difference is that here the connections between graphs have no direction, meaning that the weight matrix \( W\) is symmetric ; this will be crucial in the derivations below (as we will see in Section 7.7 this symmetry can be viewed as corresponding to a certain Markov Chain being reversible).
Given \( G=(V,E,W)\) we consider a random walk (with independent steps) on the vertices of \( V\) with transition probabilities:
where \( \deg(i) = \sum_j w_{ij}\) . Let \( M\) be the matrix of these probabilities,
(129)
It is easy to see that \( M_{ij}\geq 0\) and \( M\mathbf{1} = \mathbf{1}\) (indeed, \( M\) is a transition probability matrix). Recalling that \( D\) is the diagonal matrix with diagonal entries \( D_{ii} = \deg(i)\) we have
If we start a random walker at node \( i\) (\( X(0)=1\) ) then the probability that, at step \( t\) , is at node \( j\) is given by
In other words, the probability cloud of the random walker at point \( t\) , given that it started at node \( i\) is given by the row vector
Remark 20
A natural representation of the graph would be to associate each vertex to the probability cloud above, meaning
This would place nodes \( i_1\) and \( i_2\) for which the random walkers starting at \( i_1\) and \( i_2\) have, after \( t\) steps, very similar distribution of locations. However, this would require \( d=n\) . In what follows we will construct a similar mapping but for considerably smaller \( d\) .
\( M\) is not symmetric, but a matrix similar to M, \( S = D^{\frac12} M D^{-\frac12}\) is, indeed \( S = D^{-\frac12}WD^{-\frac12}\) . We consider the spectral decomposition of \( S\)
(130)
where \( V= \left[ v_1,\dots,v_n \right]\) satisfies \( V^TV = I_{n\times n}\) and \( \Lambda\) is diagonal with diagonal elements \( \Lambda_{kk} = \lambda_k\) (and we organize them as \( \lambda_1\geq \lambda_2 \geq … \geq \lambda_n\) ). Note that \( Sv_k = \lambda_k v_k\) . Also,
We define \( \Phi = D^{-\frac12} V\) with columns \( \Phi = \left[ \varphi_1,\dots,\varphi_n\right]\) and \( \Psi = D^{\frac12} V\) with columns \( \Psi = \left[ \psi_1,\dots,\psi_n\right]\) . Then
(131)
and \( \Phi,\, \Psi\) form a biorthogonal system in the sense that \( \Phi^T\Psi = I_{n\times n}\) or, equivalently, \( \varphi_j^T\psi_k = \delta_{jk}\) . Note that \( \varphi_k\) and \( \psi_k\) are, respectively right and left eigenvectors of \( M\) , indeed, for all \( 1\leq k\leq n\) :
Also, we can rewrite this decomposition as
and it is easy to see that
(132)
Let us revisit the embedding suggested on Remark 20. It would correspond to
it is written in terms of the basis \( \psi_k\) . The diffusion map will essentially consist of the representing a node \( i\) by the coefficients of the above map
(133)
Note that \( M\mathbf{1} = \mathbf{1}\) , meaning that one of the right eigenvectors \( \varphi_k\) is simply a multiple of \( \mathbf{1}\) and so it does not distinguish the different nodes of the graph. We will show that this indeed corresponds to the the first eigenvalue.
Proposition 14
All eigenvalues \( \lambda_k\) of \( M\) satisfy \( \left|\lambda_k\right| \leq 1\) .
Proof
Let \( \varphi_k\) be a right eigenvector associated with \( \lambda_k\) whose largest entry in magnitude is positive \( \varphi_k\left(i_{\max}\right)\) . Then,
This means, by triangular inequality that, that
Remark 21
It is possible that there are other eigenvalues with magnitude \( 1\) but only if \( G\) is disconnected or if \( G\) is bipartite. Provided that \( G\) is a connected graph, a natural way to remove potential periodicity issues (like the graph being bipartite) is to make the walk lazy, i.e. to add a certain probability of the walker to stay in the current node. This can be conveniently achieved by taking, e.g.,
By the proposition above we can take \( \varphi_1 = \mathbf{1}\) , meaning that the first coordinate of (133) does not help differentiate points on the graph. This suggests removing that coordinate:
Definition 11 (Diffusion Map)
Given a graph \( G=(V,E,W)\) construct \( M\) and its decomposition \( M = \Phi \Lambda \Psi^T\) as described above. The diffusion map is a map \( \mathcal{D}_t: V\to \mathbb{R}^{n-1}\) given by
This map is still a map to \( n-1\) dimensions. But note now that each coordinate has a factor of \( \lambda_k^t\) which, if \( \lambda_k\) is small will be rather small for moderate values of \( t\) . This motivates truncating the diffusion map by taking only the first \( d\) coefficients.
Definition 12 (Truncated Diffusion Map)
Given a graph \( G=(V,E,W)\) and dimension \( d\) , construct \( M\) and its decomposition \( M = \Phi \Lambda \Psi^T\) as described above. The diffusion map truncated to \( d\) dimensions is a map \( \mathcal{D}_t: V\to \mathbb{R}^{d}\) given by
We note that the truncated diffusion map without scaling the coordinates by \( \lambda^t\) (or equivalently, taking \( t=0\) ) is known as Laplacian Eigenmap, introduced by Belkin and Niyogi [87, 88].
In the following theorem we show that the Euclidean distance in the diffusion map coordinates (called diffusion distance) meaningfully measures distance between the probability clouds after \( t\) iterations.
Theorem 23
For any pair of nodes \( v_{i_1}\) , \( v_{i_2}\) we have
Proof
Note that
can be rewritten as
and
Note that \( D^{-\frac12}\psi_k = v_k\) which forms an orthonormal basis, meaning that
where the last equality follows from the fact that \( \varphi_1=\mathbf{1}\) . The proof of the theorem is complete.
As simple example, let us consider the cycle graph (or ring graph) \( C_n\) , which is a graph on \( n\) nodes \( \{1,\dots,n\}\) such that node \( k\) is connected to \( k-1\) and \( k+1\) and \( 1\) is connected to \( n\) . The diffusion map of \( C_{10}\) truncated to two dimensions, shown in Figure 37, gives a very natural way of displaying the graph (indeed, if one is asked to draw the ring graph, this is probably the drawing that most people would do). It is not difficult to analytically compute the diffusion map of \( C_n\) and confirm that it displays the points in a circle.
Very often we are interested in embedding in \( \mathbb{R}^d\) a point cloud of points \( x_1,\dots,x_n \in \mathbb{R}^p\) and not necessarily a graph. One option is to use Principal Component Analysis (PCA), but PCA is only designed to find linear structure of the data and the low dimensionality of the dataset may be non-linear. For example, let us say that our dataset is images of the face of a person taken from different angles and lighting conditions, for example, the dimensionality of this dataset is limited by the amount of muscles in the head and neck and by the degrees of freedom of the lighting conditions but it is not clear that this low dimensional structure is linearly apparent on the pixel values of the images.
Let us consider a point cloud that is sampled from a two dimensional swiss roll embedded in three dimension (see Figure 38). In order to learn the two dimensional structure of this object we need to differentiate points that are near each other because they are close by in the manifold and not simply because the manifold is curved and the points appear nearby even when they really are distant in the manifold (see Figure 38 for an example). We will achieve this by creating a graph from the data points.
Our goal is for the graph to capture the structure of the manifold. To each data point we will associate a node. For this we should only connect points that are close in the manifold and not points that maybe appear close in Euclidean space simply because of the curvature of the manifold. This is achieved by picking a small scale and linking nodes if they correspond to points whose distance is smaller than that scale. This is usually done smoothly via a kernel \( K_\varepsilon\) , and to each edge \( (i,j)\) associating a weight
a common example of a kernel is \( K_\varepsilon(u) = \exp\left( -\frac1{2\varepsilon} u^2 \right)\) , that gives essentially zero weight to edges corresponding to pairs of nodes for which \( \|x_i-x_j\|_2 \gg \sqrt{\varepsilon}\) . We can then take the the diffusion maps of the resulting graph.
A simple and illustrative example is to take images of a blob on a background in different positions (imagine a white square on a black background and each data point corresponds to the same white square in different positions). This dataset is clearly intrinsically two dimensional, as each image can be described by the (two-dimensional) position of the square. However, we do not expect this two-dimensional structure to be directly apparent from the vectors of pixel values of each image; in particular we do not expect vectors of images with this type of structure to lie in a two dimensional affine subspace!
Let us start by experimenting with the above example for one dimension. In that case the blob is a vertical stripe and simply moves left and right. We think of our space as the one in many arcade games, if the square or stripe moves to the right all the way to the end of the screen, it shows up on the left side (and same for up-down in the two-dimensional case). Not only should this point cloud have a one dimensional structure but it should also exhibit a circular structure. Remarkably, this structure is completely apparent when taking the two-dimensional diffusion map of this dataset, see Figure 39.
For the two dimensional example, we expect the structure of the underlying manifold to be a two-dimensional torus. Indeed, Figure 40 shows that the three-dimensional diffusion map captures the toroidal structure of the data.
In many applications, the data are noisy and the Euclidean distances \( \|x_i - x_j\|\) would be affected by the measurement noise. It is therefore common to apply a denoising algorithm to the data prior to the application of diffusion maps. A popular choice is to first denoise and reduce dimensionality using PCA, followed by diffusion maps in the reduced space of principal components. The dimension of PCA is chosen large enough to retain the non-linear structure of the data and the signal variability, but small enough to effectively diminish the noise. See [90, 91] for the application of PCA followed by diffusion maps in biomedical imaging. Fitting a manifold in the presence of noise is a topic of ongoing research [92, 93].
To illustrate the ability of the diffusion map to recover physically meaningful latent structure from image data, we experimentally study its performance on two standard image datasets, MNIST and the Yale Face Database.
In both experiments, the affinity between two images \( x_i, x_j\) is defined by the Gaussian kernel
where \( \varepsilon > 0\) is the bandwidth parameter. Here we choose \( \varepsilon\) proportional to the median of the pairwise squared distances: \( \varepsilon = \frac{1}{2}\mathrm{median}\bigl\{\|x_i - x_j\|^2 : i \neq j\bigr\}\) . The median heuristic (as well as the mean heuristic) is a standard data-adaptive choice that scales \( \varepsilon\) to the typical squared distance between points in the dataset, avoiding the need to tune the bandwidth by hand.
To exhibit the geometry recovered by the diffusion map, we apply it to a subset of the MNIST database. Each image is represented as a vector in \( \mathbb{R}^{784}\) by flattening its pixel intensities, so the data matrix \( X \in \mathbb{R}^{784 \times 600}\) has images as columns and pixel intensities as rows.
The resulting embeddings are shown in Figure 43 and respectively. Figure 43 depicts the diffusion map embedding obtained from the first two diffusion coordinates \( \varphi_1, \varphi_2\) for all 600 images, with a subset of the images displayed as a small thumbnail at its embedding location and colored borders indicating digit class.
The four digit classes separate quite well in the \( (\varphi_1, \varphi_2)\) plane without any use of class labels during training: the diffusion map discovers the class structure from geometry alone. This gives support to the assumption that images of the same digit class lie on a lower-dimensional manifold within \( \mathbb{R}^{784}\) , corresponding to the natural variability in handwriting style, stroke width, and slant within that class. Within each digit class the images are organized continuously: adjacent points in the embedding correspond to images that look similar, and one can trace smooth trajectories through each cluster along which the appearance changes gradually.
Figure 44 shows the the diffusion map embedding corresponding to the first three diffusion coordinates \( \varphi_1, \varphi_2, \varphi_3\) , which reveals a good (but certainly not perfect) unsupervised clustering of the data points according to their digit labels (here, 2 = yellow, 3 = purple, 4 = blue, 6 = red). It is important to emphasize that two and three diffusion coordinates were chosen for visualization purposes, but depending on the task at hand more diffusion dimensions may be needed to accomplish the desired goal. See also the discussion in Chapter 7.4.1 about using diffusion maps as a preprocessing step.
In this experiment we apply the diffusion map to the Extended Yale B database [94], a controlled face image dataset consisting of \( 38\) subjects photographed under \( 64\) distinct illumination conditions. Each image has been cropped and normalized to \( 192 \times 168\) pixels. For this experiment we select a single subject and work with all \( 64\) of their frontal-pose images, representing each as a vector in \( \mathbb{R}^{896}\) obtained by resizing to \( 32 \times 28\) pixels and flattening.
The illumination conditions are parameterized by two angles: the azimuth \( \phi \in [-130^\circ, +130^\circ]\) and the elevation \( \theta \in [-40^\circ, +90^\circ]\) of the light source relative to the camera axis. As the light source moves around the face, the image intensity pattern changes dramatically: under extreme lateral illumination large portions of the face fall into shadow, while under frontal illumination the face appears nearly uniform. Despite this large photometric variation, all \( 64\) images depict the same individual with the same geometry, so they lie on a smooth two-dimensional manifold in \( \mathbb{R}^{896}\) parameterized by \( (\phi, \theta)\) .
The embedding provided by the diffusion map reveals the intrinsic two-dimensional structure of the illumination manifold, see Figure 45. The first diffusion coordinate \( \varphi_1\) correlates strongly with the azimuth of the light source: moving along \( \varphi_1\) corresponds to sweeping the light from left to right across the face, with the shadow pattern shifting accordingly. The second diffusion coordinate \( \varphi_2\) captures the elevation of the light source: moving along \( \varphi_2\) corresponds to raising or lowering the light from below to above the face.
Diffusion maps are tightly connected to spectral clustering (described in Chapter 6). In fact, spectral clustering can be understood as simply performing \( k\) -means on the embedding given by diffusion maps truncated to \( k-1\) dimensions.
A natural way to try to overcome the issues of \( k\) -means depicted in Figure 34 is by using diffusion maps: Given the data points we construct a weighted graph \( G = (V,E,W)\) using a kernel \( K_{\varepsilon}\) , such as \( K_{\varepsilon}(u) = \exp\left(-\frac1{2\varepsilon}u^2\right)\) , by associating each point to a vertex and, for which pair of nodes, set the edge weight as
Recall the construction of a matrix \( M = D^{-1}W\) as the transition matrix of a random walk
where \( D\) is the diagonal with \( D_{ii} = \deg(i)\) . The \( d\) -dimensional diffusion map is given by
where \( M = \Phi \Lambda \Psi^T\) where \( \Lambda\) is the diagonal matrix with the eigenvalues of \( M\) and \( \Phi\) and \( \Psi\) are, respectively, the right and left eigenvectors of \( M\) (note that they form a bi-orthogonal system, \( \Phi^T\Psi = I\) ).
If we want to cluster the vertices of the graph in \( k\) clusters, then it is natural to truncate the diffusion map to have \( k-1\) dimensions (since in \( k-1\) dimensions we can have \( k\) linearly separable sets). If indeed the clusters were linearly separable after embedding then one could attempt to use \( k\) -means on the embedding to find the clusters, this is precisely the motivation for spectral clustering.
Algorithm 3 (Spectral clustering described using diffusion maps.)
Spectral Clustering: Given a graph \( G=(V,E,W)\) and a number of clusters \( k\) (and \( t\) ), spectral clustering consists in taking a \( (k-1)\) dimensional diffusion map
and clustering the points \( \mathcal{D}_{t}^{(k-1)}(1),\mathcal{D}_{t}^{(k-1)}(2),\dots,\mathcal{D}_{t}^{(k-1)}(n)\in\mathbb{R}^{k-1}\) using, for example, \( k\) -means clustering. Usually, the scaling of \( \lambda_m^t\) is ignored (corresponding to \( t=0\) ).
In order to show that this indeed coincides with Algorithm 2, it is enough to show that \( \varphi_m = D^{-\frac{1}{2}}v_m\) where \( v_m\) is the eigenvector associated with the \( m\) -th smallest eigenvalue of \( \mathcal{L}_G\) . This follows from the fact that \( S=D^{-\frac12}WD^{-\frac12}\) as defined in (130) is related to \( \mathcal{L}_G\) by
and \( \Phi = D^{-1/2}V\) .
Proposition 15 below establishes a connection between \( \operatorname{Ncut}\) (as described in Chapter 6) and the random walks introduced above. Let \( M\) as defined in (129) denote the matrix of transition probabilities. Recall that \( M\mathbf{1} = \mathbf{1}\) , corresponding to \( M\varphi_1 = \varphi_1\) , which means that \( \psi_1^TM =\psi_1^T\) , where
This means that \( \left[\frac{ \deg(i)} { \operatorname{vol}(G)} \right]_{1\leq i\leq n}\) is the stationary distribution of this random walk. Indeed it is easy to check that, if \( X(t)\) has a certain distribution \( p_t\) then \( X(t+1)\) has a distribution \( p_{t+1}\) given by \( p_{t+1}^T = p_{t}^TM\)
Proposition 15
Given a graph \( G=(V,E,W)\) and a partition \( (S,S^c)\) of \( V\) , \( \operatorname{Ncut}(S)\) corresponds to the probability, in the random walk associated with \( G\) , that a random walker in the stationary distribution goes to \( S^c\) conditioned on being in \( S\) plus the probability of going to \( S\) condition on being in \( S^c\) , more explicitly:
where \( {\mathbb{P}}\{X(t) = i\} =\frac{ \deg(i)} { \operatorname{vol}(G)} \) .
Proof
Without loss of generality we can take \( t=0\) . Also, the second term in the sum corresponds to the first with \( S\) replaced by \( S^c\) and vice-versa, so we’ll focus on the first one. We have:
Analogously,
which concludes the proof.
We saw that the diffusion distance is a way to equip the graph with a metric that has a nice probabilistic interpretation. A natural question is if there are other meaningful and useful metrics for graphs. Perhaps the first metric that comes to mind is the shortest path metric, or geodesic distance. A cost \( c_{ij}\) is associated with each edge, e.g., \( c_{ij} = w_{ij}^{-1}\) . The cost of a path is the sum of costs along the path edges. The geodesic distance between \( i\) and \( j\) is the smallest possible cost over all possible paths connecting \( i\) and \( j\) . It can be verified that the geodesic distance is indeed a metric (i.e., it satisfies all properties required from a metric), but it is not necessarily an \( \ell^2\) metric. Not every metric can be embedded in a Euclidean (or in general, Hilbert) space. For example, the \( \ell^1\) distance (Manhattan distance) cannot be embedded in a Euclidean space (it does not satisfy the parallelogram identity). Also, the geodesic distance has other shortcomings that will be discussed later in the course, such as its sensitivity to noise. We remark that the geodesic distance is the basis for a remarkable non-linear dimensionality reduction method called Isomap [89], which will be revisited later on.
Are there any other interesting/natural graph metrics? Given the random walk process over the graph, it is natural to consider the average time it takes to get from node \( i\) to node \( j\) . It can be easily seen to satisfy the triangle inequality. However, it is not symmetric: the average time to get from \( i\) to \( j\) may not equal the time from \( j\) to \( i\) . So, we can symmetrize it. Clearly, the time to get from a node to itself is 0, so overall we get a metric. It is called the commute time distance. Surprisingly, a kind of miracle happens: The commute time distance turns out to be a Euclidean distance corresponding to an embedding that is also given in terms of eigenvectors and eigenvalues of the graph Laplacian. Our goal is to prove this by starting from the probabilistic interpretation (see also [95, 96]).
Consider an irreducible random walk \( \{X(t)\}_{t=0}^\infty\) with jump probabilities \( M_{ij} = {\mathbb{P}}\left\{ X(t+1) = j | X(t) = i \right\} = w_{ij}/\deg(i)\) where \( w_{ij}\) are the weights of a undirected graph; irreducibility is then equivalent to the graph being connected. We define the first passage time and mean first passage time as follows:
First Passage Time
(134)
Mean First Passage Time
(135)
The expected commute time between \( {x}_{i}\) and \( {x}_{j}\) is defined as
(136)
Next, we show that the expected commute time is a metric. Let
(137)
Notice that \( \tau_{ii} \neq \tau'_{ii}\) because \( \tau'_{ii} > 0.\) Let
(138)
The random walker can get from \( x_i\) to \( x_j\) either directly in one time step with probability \( M_{ij}=w_{ij}/\deg(i)\) , or it first goes from \( x_i\) to \( x_k\) (\( k\neq j\) ) with probability \( M_{ik}\) and the expected time to get to \( x_j\) is \( 1+t'_{kj}\) . Let \( T\) and \( T'\) denote the matrices with entries respectively \( t_{ij}\) and \( t'_{ij}\) . We have,
that is,
(139)
where \( \mathbf{1}\mathbf{1}^T\) denotes the all-ones matrix and \( \mathrm{ddiag}(T')\) is the diagonal matrix obtained by setting to zero all non-diagonal entries of \( T'\) .
Let us try to determine \( \mathrm{ddiag}(T')\) first. To that end, let \( {\psi}_{1}^T=[\deg(i)]_{1\leq i\leq n}\) be be the left eigenvector of \( M\)
(140)
Multiply (139) by \( {\psi}_{1}^{T}\) on both sides to obtain
Thus, we have
(141)
or equivalently,
(142)
recall that te volume of \( G\) is the sum of the node degrees. \( T'_{ii}\) is the mean return (or recurrence) time from node \( i\) to itself. We see that it is proportional to \( \operatorname{vol}(G)\) : The larger the graph, the more time the random walker wanders (on average) around before returning back. \( T'_{ii}\) is inversely proportional to \( \deg(i)\) : The larger \( \deg(i)\) , the more possibilities the random walker has to return to node \( i\) . Remarkably, \( T'_{ii}\) does not see much about the structure of the graph, besides the total edge weights and the specific node degree.
Now we will show uniqueness of the solution \( T'\) to (139). Indeed, assume that \( T_2'\) is another solution such that
(143)
then
(144)
We see that the columns on \( T'-T_2'\) are right eigenvectors of \( M\) with eigenvalue 1. But if \( M\) is irreducible, the only eigenvector with eigenvalue is 1 is the all-ones vector. Therefore,
(145)
for some \( u\) ; the fact that \( T'\) and \( T'_2\) need to agree on the diagonal means that \( u\) must be zero and we must have \( T'_2=T'\) .
Now that we established that \( T'\) is unique let us solve for it. Notice that that the mean first passage time matrix
can be written as
(146)
Therefore, (139) is equivalent to \( T+\mathrm{ddiag}(T')=\mathbf{1}\mathbf{1}^T+MT\) which we can rewrite as
(147)
Unfortunately, \( (I-M)\) is not invertible, so we cannot obtain \( T\) by simply inverting \( (I-M)\) .
Recall that the graph Laplacian is defined as
(148)
Multiplying (147) by \( D\) gives
(149)
We also recall that \( L\mathbf{1}=0\) and \( L\succeq 0\) .
The eigen-decomposition of \( L\) can be written as
(150)
with \( 0=\mu_{1}\leq\mu_{2}\leq…\leq\mu_{n}\) , and \( \rho_1 = \frac{1}{\sqrt{n}}{\textbf {1}}\) . Note that since \( G\) is connected then \( \mu_{2}>0\) . The pseudo-inverse of the graph Laplacian is given by
(151)
Then, \( L^\dagger\) has the properties listed in (46). Moreover,
(152)
Multiplying (149) by \( L^\dagger\) gives
(153)
Combining (152) and (153) for each column of \( T\) , we have
(154)
for some vector \( u\) , that is,
(155)
(here we used that \( D\,\mathrm{ddiag}(T')= \operatorname{vol}(G) I\) ). From \( t_{ii}=0\) we find
(156)
From (155) and (156), for \( i\neq j\) , the average commute time between \( {x}_{i}\) and \( {x}_{j}\) is
(157)
where
(158)
Define the commute time mapping \( \Psi : V \mapsto \mathbb{R}^{n-1}\) as
(159)
We see that the commute time between \( x_i\) and \( x_j\) is equivalent to the Euclidean distance between \( \Psi(x_i)\) and \( \Psi(x_j)\) :
(160)
Also,
(161)
where \( e_i\) is the \( i\) ’th standard unit vector.
Let us assume that the graph is regular, that is, \( \deg(i)=d\) for all \( i=1,2,…,n\) , or equivalently \( D=dI\) . Then,
(162)
so \( M\) and \( L\) share the same eigenvectors
(163)
and the eigenvalues are related by
(164)
The commute time distance can become meaningless for some families of graphs. We see that the filter corresponding to the commute time distance associates a similar non-zero weight to all small eigenvalues. If all eigenvalues are assigned the same weight (i.e, constant filter), then the resulting distance between nodes \( i\) and \( j\) is simply \( \frac{1}{d_i} + \frac{1}{d_j}\) . This is quite boring, as it tells us nothing about the connectivity between the two nodes. It turns out that in certain cases the commute time distance has exactly this boring behavior [97].
We comment that many other filter/transfer functions are possible in practice, and it all depends on the problem at hand.
The commute time distance is also proportional to the resistance distance, where the graph is viewed as an electrical network of resistors, with the resistance of each edge given by
Using Ohm’s Law and Kirckhoff’s Law it is possible to compute the effective resistance between any two nodes in the graph. The effective resistance turns out to be exactly the same as the commute time distance just without the factor of \( \text{vol}(G)\) . This provides an alternative physical interpretation of the commute time distance.
To see this, suppose that \( \mathbf{v} \in \mathbb{R}^n\) is the vector of electric potentials at the vertices. Recall Ohm’s Law that relates the potential with the resistance \( R\) and the electric current \( I\)
Let \( \mathbf{i} \in \mathbb{R}^{2|E|}\) be the vector of signed edge currents, with
We see that
(165)
where \( U\) is an \( |E|\times n\) signed edge adjacency matrix of \( G\) , meaning that the row of \( U\) corresponding to \( (i,j)\in E\) is given by \( e_i-e_j\) . The signing is arbitrary but needs to be set. \( \Delta=\rm{diag}(\mathrm{vec}[w_{ij}]_{(i,j)\in E})\) is the \( |E|\times |E|\) matrix whose diagonal elements are the edge weights.
Also, Kirckhoff’s Law says that a resistor network cannot hold current: all flow entering vertex \( i\) from edges in the graph must exit \( i\) to an external source. Let \( \mathbf{i}_{\text{ext}} \in \mathbb{R}^n\) denote the vector of external currents, where \( \mathbf{i}_{\text{ext}}(i)\) is the amount of current entering the graph through node \( i\) . We then have
(166)
Equivalently, in matrix form
(167)
Thus, by applying the Laplacian on the vector of potentials we get the external source current. In particular, we distinguish between internal nodes \( i\) for which \( \mathbf{i}_{\text{ext}}(i)=0\) , and boundary nodes with \( \mathbf{i}_{\text{ext}}(i) \neq 0\) . Notice that for internal nodes
is equivalent to
that is, the potential at the node is the weighted average of the potential at its neighbors.
Now, in order to calculate the effective resistance between nodes \( i\) and \( j\) we need to solve
(168)
with nodes \( i\) and \( j\) being boundary nodes and all other nodes being internal nodes. That is, we let
Notice that \( \mathbf{1}^T \mathbf{i}_{i,j,\text{ext}}=0\) , therefore if the graph is connected (the eigenvalue 0 is simple), the solution for the potential vector \( \mathbf{v}\) is given by
(169)
The potential drop between nodes \( i\) and \( j\) is
(170)
Which shows that the effective resistance is
(171)
Therefore, the effective resistance and the commute time distance are equivalent (up to the factor of \( \text{vol}(G)\) ).
Here we demonstrate another application of the pseudo-inverse of the Laplacian and the commute time distance / effective resistance. Consider the time-synchronization problem, in which \( n\) sensing nodes are part of a multi-hop communication network. Each node has a local clock, but each pair of clocks differs by a constant offset. However, nodes that communicate directly can estimate the difference between their local clocks by exchanging messages that are time stamped with local clock times. For example, suppose that nodes \( i\) and \( j\) can communicate directly with each other and have clock offsets \( t_i\) and \( t_j\) with respect to a reference clock. By passing messages back and forth, the nodes can measure the relative clock offset \( t_i-t_j\) with the real-valued measurement
(172)
where \( \xi_{ij}\) is the measurement noise. The task is to estimate the clock offsets \( t_1,…, t_n\) (up to a global offset) from such pair-wise measurements. It is also an instance of a ranking problem, in which \( t_i\) may represent the “strength" of the \( i\) ’th player, and \( s_{ij}\) is the outcome or score of a match between players \( i\) and \( j\) . Clearly, we need that the graph of measurements is connected. Also, suppose that the random variables \( (\xi_{ij})_{(i,j)\in E}\) are independent zero-mean Gaussians, i.e.,
Clearly, using the offset measurements we can only hope to estimate \( t_1,…,t_n\) up to a global shift. We may therefore assume that they are centered, i.e., \( \sum_{i=1}^n t_i = 0\) , or
We seek to find a solution to the over-determined system of linear equations (172) which in vector notation can be written as
and \( \xi \sim \mathcal{N}(0,\rm{diag}(\sigma)^2)\) , where \( \rm{diag}(\sigma)\) is the diagonal \( |E|\times |E|\) matrix with \( \sigma_{ij}\) in the diagonal. We pre-whiten the noise by dividing each equation with the standard deviation \( \sigma_{ij}\) to get
where
The least squares estimator \( \hat{t}\) satisfies
We therefore define weights
for which the least squares estimator satisfies
, where \( \Delta = \rm{diag}(\mathrm{vec}[w_{ij}]_{(i,j)\in E})\) is the \( |E|\times |E|\) matrix whose diagonal elements are the edge-weights. The solution (assuming \( \mathbf{1}^T t = 0\) ) is then given by
(173)
Notice that the least squares estimator is unbiased:
(174)
The error is given by
(175)
Hence, the covariance of the estimation error is given by
(176)
In particular, the mean squared error (MSE) of the \( i\) ’th clock is the \( i\) ’th diagonal term of \( L^\dagger\)
(177)
and the MSE of all \( n\) estimators is
(178)
Finally, the offset \( t_i-t_j\) between nodes \( i\) and \( j\) is estimated as \( \hat{t}_i - \hat{t}_j\) . The MSE of the offset is
which is the effective resistance distance. More accurate offset estimates are reflected by shorter commute time distances.
There are several other similar non-linear dimensional reduction methods. A particularly popular one is Isomap [89]. The idea is to find an embedding in \( \mathbb{R}^d\) for which Euclidean distances in the embedding correspond as much as possible to geodesic distances in the graph. This can be achieved by, between pairs of nodes \( v_i,\,v_j\) finding their geodesic distance and then using, for example, Multidimensional Scaling to find points \( y_i\in\mathbb{R}^d\) that minimize (for example)
which can be done with spectral methods (it is a good exercise to compute the optimal solution to the above optimization problem).
Locally linear embedding (LLE) [98] and Isomap are often considered landmarks in the area of nonlinear dimension reduction. Beyond diffusion maps [86] and Laplacian eigenmaps [87, 88], there are several other nonlinear dimension reduction methods worth mentioning here, including Hessian LLE [99], local tangent space alignment [100], and UMAP [101]. There are other variants of diffusion maps such as anisotropic diffusion maps based on the Mahalanobis distance [102] and alternating diffusion [103] for learning the geometry of common latent variables. Here, we choose to present in more detail t-Distributed Stochastic Neighbor Embedding (t-SNE) [104], a popular method for visualization of high-dimensional data, and later in Chapter 12.4 vector diffusion maps [105] that uses the graph connection Laplacian and generalizes diffusion maps from scalar functions to vector fields.
t-SNE is a nonlinear dimension reduction method designed primarily for the visualization of high-dimensional data [104]. Unlike spectral methods such as diffusion maps, which are based on eigenvalue problems and have a clear operator-theoretic interpretation, t-SNE is formulated as a stochastic optimization problem whose objective is to preserve local neighborhood relations in a probabilistic sense.
The central idea of t-SNE is that points that are close in high-dimensional space should remain close in the embedding, while distant points are modeled with much weaker constraints. To that end we will define two distances, one suitable for the original high-dimensional data space, and one for the low-dimensional embedding space.
Given a set of points \( \{x_1, \dots, x_n\} \subset \mathbb{R}^d\) , we define the similarity of point \( x_j\) to \( x_i\) as the conditional probability \( p_{i|j}\) given by
In contrast to graph Laplacians and diffusion maps, the bandwidth \( \sigma_i\) is not global. Instead it is determined such that it is adapting the scale to the local density of the data.
Let \( \{y_1, \dots, y_n\} \subset \mathbb{R}^m\) (where \( m \ll d\) , typically \( m=2\) or \( 3\) ) denote the embedded points. In the low-dimensional space, we use a heavy-tailed Student t-distribution with one degree of freedom (which is a Cauchy distribution) to model similarities
The choice of the t-distribution in the embedding space alleviates the so-called crowding problem, which arises when high-dimensional neighborhoods are projected into low-dimensional spaces. The heavy tails of the t-distribution allow distant points in \( \mathbb{R}^d\) to be modeled by even larger distances in \( \mathbb{R}^m\) , preventing the “crowding” at the center of the map often seen in standard SNE [106].
The embedding is determined by minimizing the Kullback-Leibler (KL) divergence between the joint probability distribution \( P\) (in \( \mathbb{R}^d\) ) and \( Q\) (in \( \mathbb{R}^m\) )
(179)
with respect to the variables \( y_1,\dots,y_n\) . This cost function is non-convex and is typically optimized via gradient descent . The gradient has a particularly intuitive “spring-force” interpretation
with two opposing forces:
We note that the embedding provided by t-SNE is invariant under global rotations and translations but not under scaling, and global distances and large-scale geometry are generally distorted. Thus, t-SNE may therefore better be viewed as a local neighborhood-preserving visualization method rather than a general-purpose dimension reduction technique.
We demonstrate the effectiveness of t-SNE by applying it to the MNIST (Modified National Institute of Standards and Technology) database [26] of handwritten digits. Each datapoint (image) \( x_i\) is an \( 28 \times 28\) black-and-white image containing a handwritten digit. See the left panel of Figure 48 for some example images. The corresponding 2-D embedded points \( y_i\) are computed via t-SNE. Since the t-SNE objective is non-convex, the final embedding is sensitive to initialization and hyperparameters. Here, we use the implementation proposed in [107]. The resulting embedding is shown in the right panel of Figure 48. It is evident that t-SNE is quite effective in separating the different digits.
There are some interesting connections between t-SNE and spectral clustering, as uncovered in [107] and [108], which provides some of the first rigorous mathematical justifications for why t-SNE behaves so effectively as a clustering tool. First note that the attractive term resembles a graph Laplacian \( (L_P y)_i = \sum_j p_{ij}(y_i - y_j)\) , where \( P\) acts as a weighted adjacency matrix. Also, the gradient descent flow during the initial phase behaves similarly to power iteration on a graph Laplacian [108]. Specifically, the early iterations essentially perform a form of spectral clustering. The clusters are formed based on the dominant eigenvectors of the transition matrix, much like the initial stages of a diffusion process. It is furthermore shown in [107] that if the data contains well-separated clusters (quantified by the spectral gap of the Laplacian), t-SNE is provably guaranteed to keep these clusters separated in the low-dimensional embedding. These connections should not be interpreted as placing t-SNE within the framework of spectral dimension reduction methods; rather, they provide insight into the local dynamics of its optimization landscape.
Diffusion maps are sometimes used as a preprocessing step for t-SNE [109, 110, 111]. The standard pipeline, common in computational biology [109], is to first reduce the data to a moderate number of diffusion coordinates which removes noise and compresses the intrinsic geometric structure into a tractable representation, and then to apply t-SNE (or the closely related UMAP algorithm [101]) to this \( k\) -dimensional intermediate representation to produce the final 2D visualization. This two-stage approach aims to combine the strengths of both methods: diffusion maps provide a geometrically meaningful and noise-robust intermediate representation, while t-SNE optimizes that representation specifically for visual interpretability in two dimensions.
Linear methods are computationally efficient and well-understood, but they fail when the relationship between variables is inherently non-linear. The kernel approach allows us to lift our data into a high-dimensional (potentially infinite-dimensional) feature space where linear boundaries can capture complex structures, all without ever explicitly computing the coordinates in that space, a procedure referred to as the kernel trick.
One of the primary advantages of the kernel approach is its ability to bypass the often difficult task of explicit feature engineering. In many domains—network analysis being a prime example—practitioners may struggle to define a concrete feature vector for an object, yet they can intuitively provide a measure of affinity or similarity between pairs of objects.
From a mathematical perspective, this “user-defined” similarity measure can be accompanied with some rigorous guarantees, as we will demonstrate in this section: If the practitioner’s affinity function qualifies as a positive semi-definite kernel (a property verifiable via Bochner’s Theorem, Theorem 25), then Mercer’s Theorem (Theorem 24) guarantees that this measure corresponds to a valid inner product in some high-dimensional feature space. Consequently, the kernel trick allows us to perform sophisticated non-linear learning via a similarity metric, rather than requiring the explicit construction of a feature map.
In practice, choosing a kernel is a combination of principled heuristics and empirical validation. The linear kernel \( K(x,x') = x^\top x'\) assumes the data is already linearly separable (or nearly so) in its original coordinates. The polynomial kernel \( K(x,x') = (\langle x, x' \rangle + r)^d\) , is useful in image processing where pixel interactions matter. The Gaussian kernel \( K(x,x') = \exp (-\|x-x'\|^2/2\varepsilon^2)\) , which is sometimes also called RBF kernel (where RBF stands for Radial Basis Function) serves as a powerful default for most general-purpose applications, provided its hyperparameter is tuned carefully. The Laplacian kernel \( K(x,x') = \exp\bigl(-\gamma\|x-x'\|\bigr)\) for \( \gamma>0\) is well suited for modeling physical processes or signals that have sharp changes or disjointed behavior (e.g., “edges” in natural images) that a Gaussian kernel might over-smooth.
One property that turns out to be very useful for a kernel is positive-definiteness.
Definition 13 (Positive semi-definite kernel)
Let \( \mathcal{X}\) be a nonempty set. A function \( K\colon\mathcal{X}\times\mathcal{X}\to\mathbb{R}\) is called a positive semi-definite (PSD) kernel if for all \( n\in\mathbb{N}\) , all choices of points \( x_1,…,x_n\in\mathcal{X}\) , and all \( \alpha_1,…,\alpha_n\in\mathbb{R}\) ,
(180)
Equivalently, the Gram matrix \( {G_K}\in\mathbb{R}^{n\times n}\) defined by \( ({G_K})_{ij} = K(x_i,x_j)\) for \( i,j =1,\dots,n\) is positive semi-definite for all such choices.
Condition (180) is purely algebraic and requires no topological structure on \( \mathcal{X}\) . The set \( \mathcal{X}\) can be discrete, a manifold, a function space, or any abstract set.
Reproducing Kernel Hilbert Spaces (RKHS) provide a convenient and rigorous functional analysis framework for kernel learning.
Definition 14
Let \( \mathbb{H}\) be a Hilbert space of real-valued functions on \( \mathcal{X}\) with inner product \( \langle \cdot, \cdot \rangle_{\mathbb{H}}\) . We say \( \mathbb{H}\) is a reproducing kernel Hilbert space (RKHS) if there exists a function \( K\colon\mathcal{X}\times\mathcal{X}\to\mathbb{R}\) such that:
For all \( f\in\mathbb{H}\) and all \( x\in\mathcal{X}\) ,
(181)
The function \( K\) is called the reproducing kernel of \( \mathbb{H}\) .
The following proposition (whose proof is left to the reader) summarizes basic properties of the reproducing kernel.
Proposition 16
Let \( \mathbb{H}\) be an RKHS with reproducing kernel \( K\) . Then:
A kernel \( K\) can often be understood via an explicit feature map \( \phi: \mathcal{X} \to \mathcal{F}\) , where \( \mathcal{F}\) is some (possibly high-dimensional) feature space, such that
(182)
This means the kernel computes the inner product between the feature representations of \( x\) and \( x'\) , without needing to construct \( \phi\) explicitly. This is the kernel trick: algorithms that depend only on inner products between inputs can be kernelized by replacing \( \langle x, x' \rangle\) with \( K(x, x')\) , implicitly working in \( \mathcal{F}\) .
As a simple example, consider \( x \in \mathbb{R}^2\) and the polynomial kernel given by \( K(x, x') = (x^\top x')^2\) . Expanding this out reveals it equals \( \langle \phi(x), \phi(x') \rangle\) for \( \phi(x) = (x^2,\, (x')^2,\, \sqrt{2} x x')^\top\) , a three-dimensional feature map computed via a scalar operation.
While the kernel trick allows us to compute similarities without knowing the coordinates of the data in the feature space, Mercer’s Theorem provides the explicit mathematical construction of those coordinates. It provides a constructive answer to the question “which functions \( K\) are valid kernels, i.e., correspond to an inner product in some feature space?”
Theorem 24 (Mercer’s Theorem)
Let \( \mathcal{X} \subseteq \mathbb{R}^d\) be closed, let \( \mu\) be a strictly positive Borel measure on \( {\mathcal X}\) , and let \( K: \mathcal{X} \times \mathcal{X} \to \mathbb{R}\) be a continuous, symmetric function. If \( K\) is positive semi-definite, then there exist non-negative eigenvalues \( \{\lambda_j\}_{j=1}^\infty\) and an orthonormal sequence of continuous eigenfunctions \( \{\psi_j\}_{j=1}^\infty\) in \( L^2(\mathcal{X})\) such that
(183)
where the series converges absolutely for each pair \( (x,x') \in \mathcal{X} \times \mathcal{X}\) and uniformly on every compact subset of \( \mathcal{X} \times \mathcal{X}\) .
Proof
Define the linear operator \( T_k: L^2(X, \mu) \to L^2(X, \mu)\) by
Because \( K\) is continuous and symmetric, \( T_k\) is a compact, self-adjoint operator. By the Spectral Theorem for compact self-adjoint operators, there exists an orthonormal basis of \( L^2(X, \mu)\) consisting of eigenfunctions \( \{\phi_j\}_{j=1}^\infty\) with corresponding eigenvalues \( \lambda_j\) . Due to positive definiteness, \( \lambda_j \ge 0\) . We order them such that \( \lambda_1 \ge \lambda_2 \ge \dots \to 0\) . The eigenfunctions corresponding to \( \lambda_j > 0\) are continuous because \( \phi_j(x) = \frac{1}{\lambda_j} \int_X K_j(x, t) \phi_j(t) d\mu(t)\) .
To establish pointwise convergence we consider the truncated kernel expansion \( K_n(x, t) = \sum_{j=1}^n \lambda_j \phi_j(x) \phi_j(t)\) . We want to show that as \( n \to \infty\) , \( K_n \to K\) . Define the remainder kernel \( R_n(x, t) := K(x, t) - \sum_{j=1}^n \lambda_j \phi_j(x) \phi_j(t)\) . \( R_n\) is also a continuous, symmetric, positive definite kernel. For any positive definite kernel, the diagonal elements must be non-negative, i.e.,
This implies that for all \( n\) we have
Since the partial sums are monotonic and bounded, the series \( \sum_{j=1}^\infty \lambda_j \phi_j(x)^2\) converges pointwise. By the Cauchy-Schwarz inequality
(184)
This proves the absolute convergence of the series for each pair \( (x, t)\) .
To prove uniform convergence on a compact subset \( S \subset X\) , we invoke Dini’s Theorem. Let \( g_n(x) = \sum_{j=1}^n \lambda_j \phi_j(x)^2\) . We know \( g_n(x)\) is a sequence of continuous functions (sums of squares of continuous eigenfunctions). \( g_n(x)\) is monotonically increasing (\( g_{n+1} \ge g_n\) since \( \lambda_j \ge 0\) ). The limit \( g(x) = \sum_{j=1}^\infty \lambda_j \phi_j(x)^2\) is equal to \( K(x, x)\) (which is continuous). By Dini’s Theorem, if a monotonic sequence of continuous functions converges pointwise to a continuous function on a compact set, the convergence is uniform. Thus, \( \sum \lambda_j \phi_j(x)^2\) converges uniformly to \( K(x, x)\) on \( S\) . Utilizing once more the bound (184), the uniform convergence of the diagonal terms implies the uniform convergence of the cross-terms \( K(x, t)\) .
Finally, we must show the limit is indeed \( K(x, t)\) . To that end, we define \( R(x, t) := K(x, t) - \sum_{j=1}^\infty \lambda_j \phi_j(x) \phi_j(t)\) . Since \( T_R\) is a positive operator with all eigenvalues equal to zero (as we subtracted the entire spectral decomposition), the spectral radius of \( T_R\) is 0. For a self-adjoint compact operator, this implies \( T_R = 0\) . Since \( R(x, t)\) is continuous and \( \mu\) is strictly positive, \( T_R = 0\) implies \( R(x, t) = 0\) for all \( (x, t)\) , hence
which completes the proof.
The closely related but more general Moore-Aronszajn Theorem [112] states that every positive definite kernel defines a unique RKHS (existence and structure). In comparison, Mercer’s Theorem establishes under additional analytic assumptions, that the kernel admits an eigenfunction expansion which comes with an explicit feature map given by
While this concrete construction of the feature map is useful for theoretical purposes, in practice we avoid computing it by using the kernel trick.
While Mercer’s Theorem provides a link between a PSD kernel and a feature map in \( L_2\) , Bochner’s Theorem provides a powerful characterization of PSD kernels for the case when the kernel is translation-invariant, i.e., a kernel that can be expressed in the form \( K(x, x') = \kappa(x - x')\) for some function \( \kappa\) .
Consider a finite Borel measure \( \mu\) of \( \mathbb{R}^p\) . That is, \( \mu(\mathbb{R}^p) < \infty\) and \( \mu(A) = \int_{A \subset \mathbb{R}^p} \,d\mu\) . For example, if \( \mu\) is absolutely continuous with respect to the Lebesgue measure \( dx\) then \( d\mu = f(x)\,dx\) where \( f\) is the probability density function. The Fourier transform of \( \mu\) is
(185)
Observe that
(186)
That is, \( \hat{\mu}\) is bounded. Also, \( \hat{\mu}\) is a continuous function. Moreover, for every \( n=1,2,…\) we can associate with \( \hat{\mu}\) a PSD quadratic form:
(187)
We conclude that \( \hat{\mu}\) is bounded, continuous, and the matrix \( (\hat{\mu}(\xi_i-\xi_j))_{i,j=1}^n\) is PSD for every \( n=1,2,…\) and for all \( \xi_1,…,\xi_n \in \mathbb{R}^p\) .
But the converse is also true: If \( f\) is bounded, continuous, and the matrix \( (f(x_i-x_j))_{i,j=1}^n\) is PSD for all choices of \( n=1,2,…\) and \( x_1,…,x_n\in \mathbb{R}^p\) , then \( f\) is the Fourier transform of a finite Borel measure.
From the convolution theorem and Parseval’s theorem we get
(188)
It follows that
(189)
Since we can choose \( \alpha(x)\) (or \( \hat{\alpha}(\xi)\) ), we must have \( \hat{K}(\xi) \geq 0\) .
We thus have proved Bochner’s theorem [113]:
Theorem 25
A (complex-valued) function \( K \in L^{\infty}(\mathbb{R}^p) \cap C(\mathbb{R}^p)\) is positive definite on \( \mathbb{R}^p\) if and only if it is the (inverse) Fourier transform of a finite non-negative Borel measure \( \mu\) on \( \mathbb{R}^p\) , i.e.,
(190)
When \( K\) is normalized so that \( K(0) = 1\) , the measure \( \mu(\xi)\) becomes a probability distribution over frequencies \( \xi \in \mathbb{R}^d\) . For the Gaussian kernel
the spectral measure \( \mu(\xi)\) is a Gaussian distribution with variance \( 1/\varepsilon^2\) (because the inverse Fourier transform of the Gaussian is also a Gaussian, see e.g. [114, Lemma 1.5.1]), which immediately confirms that the Gaussian kernel is PSD.
This has immediate consequences for diffusion maps. Let \( x_1,x_2,…, x_n \in \mathbb{R}^p\) and consider the \( n\times n\) weight matrix \( W\) with entries \( W_{ij} = e^{-\frac{\|x_i - x_j \|^2}{2\varepsilon^2}}\) . Then \( W\) is PSD for all values of \( n\) , \( p\) , and \( \varepsilon\) . More generally, Bochner’s theorem implies that for positive kernels the eigenvalues of \( W\) and the adjacency matrix \( A\) are non-negative and we can use the diffusion map with any positive real \( t>0\) .
The following theorem, known as Representer Theorem, is fundamental in kernel methods because it guarantees that the optimal solution to a regularized cost functional lives in a finite-dimensional subspace, regardless of how large the underlying Hilbert space is.
Theorem 26
Let \( \mathbb{H}\) be an RKHS with reproducing kernel \( K\) . Given a set of training data \( \{(x_i, y_i)\}_{i=1}^n \subset \mathcal{X} \times \mathbb{R}\) , consider a cost function of the form
where \( L: \mathbb{R}^n \to \mathbb{R}\) is an arbitrary loss function and \( \Psi: [0, \infty) \to \mathbb{R}\) is a strictly monotonically increasing regularization function.
Then, any minimizer \( f^* \in \mathbb{H}\) of \( J(f)\) admits a representation of the form
for some coefficients \( \alpha_i \in \mathbb{R}\) .
Proof
Let \( \mathbb{H}_S = \text{span}\{K(\cdot, x_1), \dots, K(\cdot, x_n)\}\) be the subspace of \( \mathbb{H}\) spanned by the kernel functions at the training points. Any function \( f \in \mathbb{H}\) can be decomposed into its projection onto \( \mathbb{H}_S\) and an orthogonal component \( f_\perp \in \mathbb{H}_S^\perp\) :
By the reproducing property, for any \( j \in \{1, \dots, n\}\) , the evaluation of \( f\) at \( x_j\) is
Since \( f_\perp\) is orthogonal to the span of the kernels, \( \langle f_\perp, K(\cdot, x_j) \rangle_{\mathbb{H}} = 0\) , thus
This shows that the loss term \( L\) depends only on \( f_S\) . Now consider the regularization term. By the Pythagorean theorem we have
Since \( \Psi\) is strictly monotonically increasing, \( \|f_\perp\|_{\mathbb{H}}^2\) must be zero for \( f\) to minimize \( J(f)\) . If \( \|f_\perp\|_{\mathbb{H}} > 0\) , then \( f_S\) would achieve a strictly lower cost than \( f\) . Thus, the minimizer \( f^*\) must lie entirely in \( \mathbb{H}_S\) .
The representer theorem acts as a kind of dimensionality reduction principle for optimization: although learning occurs in a potentially infinite-dimensional RKHS, the optimal solution lies in the finite-dimensional span of kernel evaluations at the training data. Consequently, the optimization problem depends on the number of training observations rather than the dimensionality of the feature space.
Kernel ridge regression: The kernelized version of ridge regression replaces \( \min \|X\theta - y\|^2 + \lambda\|\theta\|^2\) with a minimization over functions \( f\) in a RKHS \( \mathbb{H}\) , i.e., we consider
(191)
By Theorem 26, the solution takes the form \( f^*(x) = \sum_{i=1}^m \alpha_i K(x_i, x)\) , and substituting this into the objective reduces the problem to
(192)
where \( G_K\) is the \( m \times m\) Gram matrix with entries \( (G_K)_{ij} = K(x_i, x_j)\) . Setting the gradient to zero yields the closed-form solution:
(193)
Predictions at a new point \( x\) are then given by \( f^*(x) = K(x)^\top \alpha\) , where \( K(x) = (K(x_1, x), \dots, K(x_m, x))^\top\) . The key insight is that the algorithm never requires explicit access to the feature map \( \phi(x)\) ; all computations are performed through the kernel matrix \( G_K\) .
Kernel regression: While kernel ridge regression is an optimization-based approach, kernel regression is a localized density estimation approach. In particular, it is a non-parametric regression method that estimates the relationship between an input variable \( x\) and an output \( y\) by taking a weighted average of observed responses, where the weights depend on the similarity between inputs measured by a kernel function.
Suppose we observe data \( (x_1,y_1),\dots,(x_n,y_n)\) , to predict the value of \( y\) at a new point \( x\) , kernel regression assigns larger weights to observations whose inputs are close to \( x\) . The resulting prediction is a weighted average of the form
This formula is known as the Nadaraya–Watson kernel regression estimator [115, 116].
See [91] for an application of kernel regression in cryogenic electron microscopy (cryo-EM).
Kernel PCA: Standard PCA finds directions of maximum variance by computing the eigenvectors of the sample covariance matrix. Kernel PCA [117] extends this to nonlinear settings by implicitly performing PCA in the feature space \( \mathcal{F}\) . By exploiting the kernel trick, kernel PCA does not need to set up a feature map explicitly. The (centered) covariance operator in \( \mathcal{F}\) is:
(194)
and one seeks eigenvectors \( v \in \mathcal{F}\) satisfying \( Cv = \mu v\) . Since any such eigenvector must lie in the span of \( \{\phi(x_i)\}\) , we can write \( v = \sum_{i=1}^m \alpha_i \phi(x_i)\) , and the eigenvalue problem reduces to:
(195)
where \( \tilde{G}\) is the centered Gram matrix
(196)
with \( \mathbf{1}_m = \frac{1}{m}\mathbf{1}\mathbf{1}^\top\) the \( m\times m\) matrix with all entries \( 1/m\) . The projection of a new point \( x\) onto the \( r\) -th kernel principal component is:
(197)
where \( \alpha^{(r)}\) is the \( r\) -th eigenvector of \( \tilde{G}\) . Kernel PCA is particularly effective for dimensionality reduction and feature extraction when the data lies on a nonlinear manifold, as the feature space \( \mathcal{F}\) may “unfold” structure that is invisible to linear PCA in the input space.
Both kernel PCA and diffusion maps are spectral manifold learning techniques that embed high-dimensional data into a lower-dimensional space by solving an eigenvalue problem derived from a kernel matrix \( K(x,x')\) . But kernel PCA operates on a centered version of \( K\) . It seeks the directions of maximum variance in a high-dimensional feature space, hence it is concerned with certain geometric projections in Hilbert space. It is also highly sensitive to data density. In contrast, diffusion maps operate on a normalized version of \( K\) , so it can be made more invariant to density via renormalization. It views \( K\) as a transition matrix for a Markov chain on the data and emphasizes intrinsic geometry and connectivity, rather than variance in feature space.
Random Fourier Features: Assume we are given a dataset \( \{x_1, \dots , x_n\} \in \mathbb{R}^d\) . Since the measure \( \mu(\xi)\) arising in Bochner’s Theorem is a probability distribution (for a properly normalized kernel \( K\) ), we can write
where the second equality holds when \( \mu\) is symmetric. This means we can approximate \( K(x, x')\) by drawing random frequencies \( \xi_1, \dots, \xi_r \sim \mu\) with \( r \ll n\) and constructing the \( r\) -dimensional random Fourier feature map
where \( b_i \sim \text{Uniform}[0, 2\pi]\) , so that \( K(x, x') \approx \langle \phi(x), \phi(x') \rangle\) . This approximation (due to Rahimi & Recht [118]) allows kernel methods to scale to large datasets by replacing expensive \( \mathcal{O}(n^2)\) kernel matrix computations with cheaper inner products in a \( r\) -dimensional feature space.
The Random Fourier Features method can be used for instance to create a low-rank approximation of the kernel matrix for kernel PCA. This technique makes kernel PCA scalable to large datasets. Instead of working with the kernel matrix \( K \in \mathbb{R}^{n \times n}\) , we work with the explicit feature matrix \( \Phi \in \mathbb{R}^{n \times D}\) :
(198)
Then one can show that with a certain probability \( K \approx \Phi\Phi^\top\) , see [118]. This is a form of matrix sketching, see also Chapter 8.3.
Kernel SVM: Another natural use case of the kernel approach arises in connection with Support Vector Machines, a classification method which will be discussed in detail (together with its kernel variant) in Chapter 10.4.
Classification is a central task in machine learning which we will explore in detail in Chapters 10 and 11. In this section, we discuss an application of graph Laplacians and diffusion maps to classification in the semi-supervised setting.
In a supervised learning setting we are given many labeled examples and want to use them to infer the label of a new, unlabeled example. For simplicity, let us focus on the case of two labels, \( \{-1,+1\}\) .
Let us consider the task of labeling the point “?” in Figure 51 given the labeled points. The natural label to give to the unlabeled point would be \( 1\) .
However, if we are given not just one unlabeled point, but many, as in Figure 52; then it starts being apparent that \( -1\) is a more reasonable guess.
Intuitively, the unlabeled data points allowed us to better learn the intrinsic geometry of the dataset. That is the idea behind Semi-Supervised Learning (SSL). While supervised learning relies exclusively on labeled examples, semi-supervised learning combines labeled and unlabeled data to leverage the underlying structure of the input space when labeled data are limited.
So, let us explore how we can exploit the structure of the input data to improve classification when labels are scarce. Just as above, we will use the data points to construct (via a kernel \( K_\varepsilon\) ) a graph \( G=(V,E,W)\) where nodes correspond to points. More precisely, let \( l\) denote the number of labeled points with labels \( f_1,\dots,f_l\) , and \( u\) the number of unlabeled points (with \( n=l+u\) ), the first \( l\) nodes \( v_1,\dots,v_l\) correspond to labeled points and the rest \( v_{l+1},\dots,v_n\) are unlabaled. We want to find a function \( f:V\to \{-1,1\}\) that agrees on labeled points: \( f(i)=f_i\) for \( i=1,\dots,l\) and that is “as smooth as possible” on the graph. A way to pose this is the following [119]
Instead of restricting ourselves to giving \( \{-1,1\}\) we allow ourselves to give real valued labels, with the intuition that we can “round” later by, e.g., assigning the sign of \( f(i)\) to node \( i\) .
We thus are interested in solving
If we denote by \( f\) the vector (in \( \mathbb{R}^n\) with the function values) then, recalling Proposition 11, we are can rewrite the problem as
Remark 22
Consider an analogous example on the real line, where one would want to minimize
Integrating by parts
Analogously, in \( \mathbb{R}^d\) :
\( \displaystyle{= \mathrm{B. T.} - \int f(x) \Delta f(x) dx}\) ,
which helps motivate the use of the term graph Laplacian for \( L_G\) .
Let us consider our problem
We can write
and \( f = \left[ \begin{array}{c} f_L \\ f_U \end{array} \right]\) , where \( L\) and \( U\) correspond to the set of indices of labeled and unlabeled nodes, respectively (not to be confused with the graph Laplacian \( L_G\) ).
Then we want to find (recall that \( W_{UL}=W_{LU}^T\) )
By first-order optimality conditions , it is easy to see that the optimal satisfies
If \( D_U-W_{UU}\) is invertible , then
Remark 23
The function \( f\) we constructed is called a harmonic extension [119]. Indeed, it shares properties with harmonic functions in Euclidean space such as the mean value property and maximum principles; if \( v_i\) is an unlabeled point then
which immediately implies that the maximum and minimum value of \( f\) needs to be attained at a labeled point.
Let us try a simple experiment. Let us say we have a grid on \( [-1,1]^d\) dimensions (with say \( m^d\) points for some large \( m\) ) and we label the center as \( +1\) and every node that is at distance larger or equal to \( 1\) to the center, as \( -1\) . We are interested in understanding how the above algorithm will label the remaining points, hoping that it will assign small numbers to points far away from the center (and close to the boundary of the labeled points) and large numbers to points close to the center.
See the results for \( d=1\) in Figure 53, \( d=2\) in Figure 56, and \( d=3\) in Figure 59. While for \( d\leq 2\) it appears to be smoothly interpolating between the labels, for \( d=3\) it seems that the method simply learns essentially \( -1\) on all points, thus not being very meaningful. Let us turn to \( \mathbb{R}^d\) for intuition:
Let us say that we want to find a function in \( \mathbb{R}^d\) that takes the value \( 1\) at zero and \( -1\) at the unit sphere, that minimizes \( \int_{B_{0}(1)}\|\nabla f(x)\|^2 dx\) . Let us consider the following function on \( B_0(1)\) (the ball centered at \( 0\) with unit radius)
A quick calculation suggest that
meaning that, if \( d>2\) , the performance of this function is improving as \( \varepsilon \to 0\) , explaining the results in Figure 59.
One way of thinking about what is going on is through the Sobolev Embedding Theorem. \( H^m\left( \mathbb{R}^d\right)\) is the space of function whose derivatives up to order \( m\) are square-integrable in \( \mathbb{R}^d\) , Sobolev Embedding Theorem says that if \( m > \frac{d}2\) then, if \( f\in H^m\left( \mathbb{R}^d\right)\) then \( f\) must be continuous and bounded (i.e., \( f \in C_0(\mathbb{R}^d)\) ), which would rule out the behavior observed in Figure 59. It also suggests that if we are able to control also second derivatives of \( f\) then this phenomenon should disappear (since \( 2>\frac32\) ). While we will not describe it here in detail, there is, in fact, a way of doing this by minimizing not \( f^TLf\) but \( f^TL^2f\) instead, Figure 62 shows the outcome of the same experiment with the \( f^TLf\) replaced by \( f^TL^2f\) and confirms our intuition that the discontinuity issue should disappear (see, e.g., [120] for more on this phenomenon).
With the material already described in this chapter one is able to very easily describe the basics of the theory of reversible Markov chains, so we will take the opportunity to do this (while pointing the interested reader to [121] for a thorough treatment). We will focus here on Markov chains on finite state spaces .
A Markov chain on \( N\) states is a random walk on the state space, identified with \( [N]\) , whose transition probabilities depend only on the current state and not on the past (the so-called Markovian property). Let us describe the transition probabilities by
(199)
Let \( \pi\in[0,1]^{N}\) (with \( \pi^\top\mathbf{1}=1\) ) be a stationary measure of the Markov chain, meaning that \( \pi^\top M = \pi^\top\) . A Markov chain is said to be irreducible if there is no proper subset of states where the probability mass can be fully trapped, in other words: A Markov chain is irreducible if for all \( i,j\in[N]\) , \( \exists_{t>0}\) such that \( \mathbb{P}\left( X(t)=j | X(0) = i\right)>0\) . One can show that irreducible Markov chains have unique stationary measures (and the stationary measure needs to be strictly positive).
In the rest of this section we will focus on Markov chains with a unique stationary \( \pi\) that furthermore satisfies \( \pi>0\) (we will identify the Markov chain with the transition matrix \( M\) given in (199)). Since \( \pi\) is a stationary measure of \( M\) we must have that, for each state \( i\) , the probability inflow at the: \( \sum_{j\in[N]}\pi_jM_{ji}\) is the same as the probability outflow: \( \sum_{j\in[N]}\pi_iM_{ij}\) . Note that this is indeed equivalent to stationarity as \( \sum_{j\in[N]}\pi_jM_{ji}=\left(\pi^\top M\right)_i\) and \( \sum_{j\in[N]}\pi_iM_{ij} = \pi_i\sum_{j\in[N]}M_{ij}=\pi_i\) . A natural stronger condition is to request that the inflow and outflow are the same per edge, not just total per state: for \( \pi>0\) the stationary measure and for all \( i,j\in[N]\) ,
(200)
Condition (200) is known as the detailed balance condition. Markov chains satisfying detailed balance (200) are called reversible Markov chains, they form a very important class of Markov chains. A reversible Markov chain can be thought of as a Markov chain that, at stationarity (or equilibrium), has the same dynamics when viewed running forward or backwards in time.
Reversibility (condition (200)) can be viewed as \( M\) being self-adjoint in the inner product \( \langle \cdot, \cdot \rangle_\pi\) (given by \( \langle x, y \rangle_\pi = \sum_{i=1}^N \pi_i x_i y_i\) ). Namely
Given \( M\) a reversible Markov chain with a stationary measure \( \pi>0\) , let us define
(201)
where \( \rm{diag}(\pi)\) is the diagonal matrix with diagonal entries given by \( \pi\) . Reversibility is equivalent to \( W\) being a symmetric matrix, since \( W\geq 0\) it can be viewed as the weight matrix of a graph on \( N\) nodes. This means that any reversible Markov chain with a strictly positive stationary measure can be viewed as the diffusion map from some weighted graph \( G=([N],E,W)\) and thus the theory developed in this chapter (including connections with spectral clustering and Cheeger’s Inequality) can be directly used to understand reversible Markov chains.
A very important concept in the study of Markov Chains is that of mixing time: how many iterations of the Markov Chain are needed, when starting from an initial distribution \( \mu_0\) , to reach a distribution that is at most \( \varepsilon\) away from \( \pi\) in Total Variation (TV) distance. The TV distance between two probability distributions \( p\) and \( q\) (defined on the same probability space) is given by \( \sup_E\|p(E)-q(E)\|\) where the supremum is taken over all measurable sets in the probability space. Since in our case the distributions are finite (they are distributions over [N]) we have
where \( \mu_i\) and \( \nu_i\) are the probabilty of \( i\) under, respectively, \( \mu\) and \( \nu\) , and \( \|\cdot\|_1\) denotes the \( \ell_1\) -norm in \( \mathbb{R}^N\) .
Definition 15 (Mixing time)
Given a Markov Chain with transition matrix \( M\in\mathbb{R}^{N\times N}\) and unique stationary measure \( \pi\in\mathbb{R}^N\) and \( \varepsilon>0\) , we define the mixing time from a starting distribution \( \mu^0\) as
The worst-case mixing time is given by the mixing time when the Markov Chain is started from the worst state
where \( \delta_i\) is the delta distribution at state \( i\) ; when viewed as a vector \( \delta_i=e_i\) .
A core idea in the study of Markov Chains is to bound mixing times via functional inequalities that involve the spectrum of the transition matrix. A central object in this context is the Dirichlet Form which measures how a function varies under the transitions of the Markov Chain: given a function \( f:[N]\to\mathbb{R}\) (here viewed as a vector \( f\in\mathbb{R}^N\) ) the Dirichlet Form of \( M\) is given by
(202)
The Markov Chain is said to satisfy a Poincaré inequality with constant \( C_M\) if, for all \( f\in\mathbb{R}^{N}\) ,
(203)
where \( \rm{Var}_{\pi}(f)\) is the variance of \( f\) under the measure \( \pi\) . In other words: \( \rm{Var}_{\pi}(f) = \sum_{i=1}^n \pi_i\left( f_i - \pi^\top f \right)^2\) . Note that \( \pi^\top f=\mathbb{E}_\pi f\) corresponds to the mean of \( f\) under the distribution \( \pi\) .
The best constant in (203) is known as the spectral gap of the Markov Chain:
(204)
Note that we have
(205)
where \( W\) is the weight matrix of a graph, as in (201), and \( D_W=\rm{diag}(\pi)\) and \( L_W=D_W-W\) are the associated degree and graph Laplacian matrices, respectively. Thus, \( \rm{Var}_{\pi}(f)=0\Rightarrow \mathcal{E}_M(f)=0\) and \( \mathrm{gap}_M\) in (204) indeed corresponds to the best Poincaré constant in (203). Similarly, noting that \( \pi^\top f = \mathbf{1}^\top D_W f\) ,
(206)
Recall that, by construction \( \operatorname{Tr} D_W = \sum_{i=1}^N \pi_i = 1\) and that we assume in this section that \( \pi_i>0\) for all \( i\in[N]\) .
Recall from Chapter 6 that the normalized graph Laplacian is given by \( \mathcal{L}_W = I - D_W^{-\frac12} W D_W^{-\frac12}\) and its second smallest eigenvalue is given (as we saw in (120) and (122)) by
Note that adding a multiple of \( \mathbf{1}\) to \( f\in\mathbb{R}^N\) does not affect either \( \mathcal{E}_M(f)\) or \( \rm{Var}_\pi(f)\) (see (205)). This means we can write
where \( \lambda_2(M)\) is the second largest eigenvalue of \( M\) . The second inequality used (205) and (206). The fourth inequality follows from the fact that \( M=\rm{diag}(\pi)^{-1}W\) (recall (201)) is similar to \( \rm{diag}(\pi)^{-\frac12}W\rm{diag}(\pi)^{-\frac12}\) and \( \mathcal{L}_W = I - \rm{diag}(\pi)^{-\frac12}W\rm{diag}(\pi)^{-\frac12}\) .
Similarly to the situation in Remark 21 it is simpler to focus on lazy walks. We say a Markov Chain \( M\) is lazy if \( M_{ii}\geq \frac12\) for all \( i\in[N]\) (this ensures that all eigenvalues of \( M\) are non-negative). Given a transition matrix \( M\) we can consider a lazy version of it by taking \( M_{\text{lazy}}=\frac12M+\frac12I\) . This does not affect reversibility and reduces the spectral gap by half.
We now show a central result in this area: a control on the spectral gap (or, equivalently on \( \lambda_2(\mathcal{L}_W)\) ) provides a bound on the mixing time of a Markov Chain.
Theorem 27 (Spectrum and mixing, see Theorem 12.4 in [121])
Let \( M\) be a reversible Markov Chain with unique stationary measure \( \pi\) (satisfying \( \pi>0\) ). Let \( \mathrm{gap}_M\) denote the spectral gap of \( M\) (meaning that \( M\) satisfies a Poincaré inequality with constant \( \mathrm{gap}_M\) ). Let \( M_{\text{lazy}}=\frac12+\frac12M\) be the lazy version of \( M\) . We have:
If \( M\) itself is a lazy Markov Chain then
Proof
Let \( \varphi_1,\dots,\varphi_N\) be the eigenvectors of \( M\) built in (131) (associated with eigenvalues \( 1=\lambda_1(M)>…\geq\lambda_N(M)\) ). Recall that \( \varphi_1=\mathbf{1}\) and that \( \varphi_k^\top D_W\varphi_\ell=\delta_{k\ell}\) (in other words, they are orthonormal in the inner product \( \langle\cdot,\cdot\rangle_\pi\) ). We can write (see (131)) \( M = \Phi\Lambda\Psi^\top\) where \( \Phi=[\varphi_1,\dots,\varphi_N]\) , \( \Lambda\) is a diagonal matrix with entries \( \Lambda_ii= \lambda_i(M)\) , and \( \Psi = D_W\Phi\) . Furthermore, for \( t>0\) an integer, \( M^t = \Phi\Lambda^t\Psi^\top=\sum_{k=1}^N\lambda_k^t(M)\varphi_k (D_W\varphi_k)^\top\) (see (132) and recall that \( D_W=\rm{diag}(\pi)\) ). Given a starting state \( i\in[N]\) and respective starting measure \( \delta_i\) we have
where \( \varphi_k(i)\) denotes the \( i\) -th entry of \( \varphi_k\) .
Thus, for every \( j\in[N]\) ,
(207)
where \( \lambda_\ast = \max\left\{\lambda_2(M),|\lambda_n(M)|\right\}\) and the second inequality is an application of Cauchy-Schwarz.
Since \( D_W^{\frac12}\Phi\) is an orthogonal matrix, it holds that \( I = D_W^{\frac12}\Phi\left(D_W^{\frac12}\Phi \right)^\top, \) and thus, for every \( i\in[N]\) ,
(208)
Thus, combining (207) and (208)
(209)
This means that
For \( M\) a lazy Markov Chain (meaning that \( M_{ii}\geq \frac12\) for all \( i\in[N]\) ) we have \( \lambda_n\geq 0\) and so \( \mathrm{gap}_M = 1-\lambda_\ast\) . Thus
(210)
This gives
the result for \( M_{\text{lazy}}\) can be obtained by noting that \( M_{\text{lazy}}\) is always a lazy Markov Chain and that \( \mathrm{gap}_{M_{\text{lazy}}}=\frac12\mathrm{gap}_M\) .
Theorem 27 shows that mixing times are governed by a Fiedler eigenvalue \( \lambda(\mathcal{L}_W)\) of the underlying weighted graph. Cheeger’s inequality. Theorem 20, further shows that these are directly related to bottlenecks (small cuts) in the graph. These results together can be interpreted as saying that if there are no bottlenecks in the graph, the associated Markov Chain necessarily mixes fast.
It is generally possible to improve the dependency on \( \pi_{\min}\) on the control of mixing times. A (now) standard way is through so-called Log-Sobolev inequalities. The idea is to develop analogues to Poincaré inequalities that control the entropy of a test function, rather than the variance. This tends to allow one to replace the \( \log(\pi_{\min}^{-1})\) term by a \( \log\log(\pi_{\min}^{-1})\) term. See, e.g., [122].
Remark 24
The theory above adapts relatively easily to Markov Chains on infinite state spaces by considering the spectrum of an associated Markov transition kernel. Furthermore, one can also analogously develop a theory of continuous time Markov Processes (see, e.g., [123]). In fact, the Gaussian Poincaré inequality (Proposition 19) plays the same role as (203) for a certain Markov Process (see Remark 33, and [14] (Section 2)).
As we will see below, many Markov Chains of interest have exponential state spaces (such as \( \{\pm1\}^n\) , meaning that \( N=2^n\) ) and the goal is to have polynomial in \( n\) mixing times.
An important use of Markov Chains is to sample from high dimensional distributions that are easy to access up to normalization. This strategy usually goes by the name of Markov Chain Monte Carlo [124, 125]. These are central objects in both Statistical Physics [126] and high dimensional Bayesian Statistics [127].
Let us focus on a (rich) class of examples for the sake of exposition: The goal is to sample from a probability distribution over the hypercube \( \{\pm1\}^n\) (meaning that \( N=2^n\) ), which \( \pm1\) entry is usually called a spin. Let \( J\in\mathbb{R}^{n\times n}\) be a symmetric matrix. Given \( \beta\geq 0\) we define the following probability distribution over the hypercube, known as a Gibbs measure :
(211)
for \( x\in\{\pm1\}^n\) , where \( Z_n = \sum_{x\in\{\pm1\}^n}\exp{\left(\beta x^TJx\right)}\) is known as a the normalization constant, or partition function.
Distributions of the form of (211) are central in both Statistical Physics and Bayesian Statistics. In Statistical Physics, by taking different choices of \( J\) , it includes very important models such as Curie-Weiss, Ising, Sherrington-Kirkpatrick, and Edward-Anderson models. It is also central in Statistics. In fact the posterior distribution of the node memberships given the graph edges in the Stochastic Block Model (in two communities) of Chapter 13 is naturally written in the form (211), see [128].
The goal will be to construct a Markov Chain whose unique stationary measure is the target distribution. A key property of these measures is that while they are hard to compute (because computing \( Z_n\) requires summing over exponentially many summands) they are easy to access up to normalization, meaning that it is easy to compute relative probabilities, such as \( \pi_x/\pi_y\) for two states \( x\) and \( y\) .
Motivated by the example above let us show the construction of a reversible Markov Chain to sample from a (positive) probability distribution \( \pi\) in \( [N]\) . We start by building a graph on \( [N]\) , and for the sake of exposition, let us say this is a simple unweighted \( d\) -regular graph with adjacency \( W\) . Each step of the Markov Chain proceeds as follows: From state \( x\in[N]\) , the chain picks a neighbor uniformly at random, let us call that neighbor \( y\in[N]\) ; then the Markov Chain moves to \( y\in[N]\) with probability \( \frac{\pi_y}{\pi_x+\pi_y}\) and stays in \( x\) with probability \( \frac{\pi_x}{\pi_x+\pi_y}\) (note that while computing \( \pi_x\) is difficult for, e.g. (211), computing these update probabilities is easy). The reader can check that this Markov Chain is reversible and that \( \pi\) is indeed a stationary measure. This essentially corresponds to the celebrated Metropolis algorithm (see, e.g. [129]).
Returning to the hypercube and the target distribution (211), a classical Markov Chain is obtained by taking the contribution above for the graph whose nodes are elements of \( \{\pm1\}^n\) and two nodes are connected if they differ in only one entry (often called a spin). In this case \( N=2^n\) and \( d=n\) . This gives rise to the celebrated Glauber Dynamics (see [121]). In many situations this process allows one to sample distributions of the form of (211) in time that is polynomial in \( n\) (and so logarithmic in \( N\) ). There has been exciting recent progress on understanding mixing times of these (and other related) chains [130, 131].
Exercise 63 (Random walks: eigenvalues)
Let \( G = (V, E, W)\) be an undirected weighted graph.
Exercise 64 (Random walks: connectivity)
Let \( G = (V, E, W)\) be an undirected weighted graph. Show that the largest eigenvalue of \( M = D^{-1}W\) has multiplicity one if and only if the graph is connected. Here, two vertices are connected if and only if there exists a path from one to another along which all edges have positive weights.
Exercise 65 (Equilibrium distribution)
Let \( G = (V, E, W)\) be an undirected weighted graph, and \( X\) a random walk (with independent set) associated to it, the one having transition probabilities
Suppose that there is an equilibrium distribution \( \pi\) on \( V\) , which means that starting from any \( i \in V\) ,
holds for any \( j \in V\) . Prove that \( \lambda_2(M) < 1\) .
Hint This means that for any \( i_1, i_2, j \in V\) , we have \( \mathbb{P}\left( X(t) = j \mid X(0) = i_1 \right) - \mathbb{P}\left( X(t) = j \mid X(0) = i_2 \right) \to 0\) .
Exercise 66 (Truncated diffusion map of a cycle graph)
Let \( n \geq 2\) and \( \omega = e^{-2\pi i / n} \) be the primitive \( n\) -th root of unity. In this problem, we index rows and columns of \( n \times n\) matrices from \( 0\) to \( n-1\) , rather than \( 1\) to \( n\) .
The Discrete Fourier Transform (DFT) matrix is an \( n \times n\) matrix \( F = (F_{j,k})_{j,k=0}^{n-1}\) with
Prove that \( F\) is a unitary matrix, meaning that \( F^*F = FF^* = I_n\) .
A Circulant matrix is an \( n \times n\) matrix \( C = (C_{j,k})_{j,k=0}^{n-1}\) with \( C_{j,k} = c_{j-k \text{ mod }n}\) , where \( c_0, …, c_{n-1}\) are \( n\) real numbers:
Prove that \( F\) diagonalizes \( C\) , meaning that \( FCF^*\) is a diagonal matrix.
Deduce that the eigenvalues of \( C\) are given by
Note that the eigenvalues \( \lambda_0, …, \lambda_{n-1}\) are not necessarily ordered.
Exercise 67 (Diffusion map of a complete graph)
Let \( K_n\) be complete graph on \( n\) nodes, where \( n \geq 3\) . Find the diffusion map. (Since there are more bases of real-valued eigenvectors, it is sufficient to pick one.)
Exercise 68 (Diffusion map of a lazy walk)
Let \( G = (V, E, W)\) be an undirected weighted graph with the associated transition probability matrix \( M\) . Let \( \varphi_t \colon V \to \mathbb{R}^{n-1}\) be the diffusion map made from \( M\) . Now let \( M' = \frac{1}{2}(M + I)\) be the transition probability matrix of the associated lazy walk, and \( \varphi'_t \colon V \to \mathbb{R}^{n-1}\) be the diffusion map made from \( M'\) . Prove that for any \( t \geq 1\) :
Exercise 69 (Aperiodicity of a lazy walk)
Let \( G = (V, E, W)\) be an undirected weighted graph.
Prove that the lazy random walk is aperiodic, which means that for any vertex \( i \in V\) there is no (period) integer \( k > 1\) such that for any (time) \( t \geq 1\) :
Exercise 70
Show that the mean first passage time \( t_{ij} = \mathbb{E}[\tau_{ij}]\) satisfies that triangle inequality.
Exercise 71
Let \( L = D - W\) be the Laplacian of a weighted undirected connected graph. Show that the pseudo-inverse \( L^\dagger\) is given by
Exercise 72
Is it necessarily the case that all entries of \( L^\dagger\) are non-negative, i.e., that \( L^\dagger_{ij} \geq 0\) for \( i,j=1,…,n\) ?
Exercise 73 (Hitting times and semi-supervised learning)
Let \( G = (V,E,W)\) be an undirected, connected graph with non-negative weights \( w_{ij}\) . The vertex set is partitiond as \( V = V_{+} \cup V_{\scriptstyle -} \cup V^{\star}\) , where \( V_{+}\) are labeled as 1, \( V_{\scriptstyle -}\) are labeled as 0 and \( V^{\star}\) are unlabeled. Suppose that every unlabelled vertex (\( V_{\star}\) ) is connected to at least one labelled vertex (\( V_{+} \cup V_{\scriptstyle -}\) ) by an edge.
To predict the label of the unlabeled vertices, you wish to find a function \( f^{\star}: V \to \mathbb{R}\) which agrees on the labeled vertices and predicts the values of the unlabeled vertices as values in \( \mathbb{R}\) as smoothly as possible:
(212)
Now, consider a random walk \( X\) on \( V\) given by the following transition probabilities:
Given a node \( i \in V\) , let \( g(i)\) be the probability that a random walker starting at \( i\) reaches a node in \( V_{+}\) before reaching one in \( V_{\scriptstyle -}\) . I.e. if \( T_{+} = \inf\left\{ t \geq 0 \colon X(t) \in V_{+} \right\}\) and \( T_{\scriptstyle -} = \inf\left\{ t \geq 0 \colon X(t) \in V_{\scriptstyle -} \right\}\) , then
Prove that \( g\) satisfies the following equality for any unlabelled \( i \in V^\star\) :
(213)
Exercise 74
Suppose we want to denoise the function \( f \in L^2(\Omega)\) where \( \Omega \subset \mathbb{R}^p\) by solving the following regularization problem:
where \( \Delta^k\) is the \( k\) ’th iterated Laplacian. Find \( g\) and determine to what Sobolev space it belongs. Consider the similar graph regularization problem
where \( L^k\) is the \( k\) ’th iterated combinatorial Laplacian \( L^k=(D-W)^k\) .
Hint Express \( g\) in terms of the eigenfunctions/eigenvectors of a suitable operator.
Exercise 75
Show that \( f \in H^1(\mathbb{R}^2)\) does not imply \( f\in C_0(\mathbb{R}^2)\) by constructing a sequence of functions \( \{f_n\}_{n=1}^\infty\) in \( H^1(\mathbb{R}^2)\) satisfying
but \( \lim_{n\to \infty} f_n \notin C_0(\mathbb{R}^2)\) Hint The \( \log\) function.
Exercise 76
Derive the solution to the extension problem with \( l\) labeled points and \( u=n-l\) unlabeled points using the discrete Sobolev norm \( H^m(V)\) (with \( m\geq 1\) ) as the cost function. That is, find \( f\) that solves the minimization problem
Exercise 77
Derive the solution to the ‘noisy’ extension problem, where the \( l\) labeled points may be contaminated by measurement errors. Specifically, find the solution to the minimization problem
Exercise 78
Use a computer simulation (e.g., using Matlab or Python) to sample independently \( n\) unlabeled points \( x_1,x_2,…,x_n\) in \( \mathbb{R}^2\) from a Gaussian mixture model with two isotropic independent Gaussians \( X_1\) and \( X_2\) centered at \( \mu_1=(-1,-1)\) and \( \mu_2=(1,1)\) . That is, let
where \( I = \left( \begin{array}{cc} 1 & 0 \\ 0 & 1 \\ \end{array} \right)\) and define the random vector \( X\) from which \( x_1,…,x_n\) are drawn as
where \( Z\) is a Bernoulli random variable independent of \( X_1\) and \( X_2\) :
Add the two centers as labeled points. That is, define the label of \( \mu_1\) as “RED” and the label of \( \mu_2\) as “BLUE".
In Chapters 4 and 7 we saw both linear and non-linear methods for dimension reduction. In this chapter we will see one of the most fascinating consequences of the phenomenon of concentration of measure in high dimensions, one of the blessings of high dimensions described in Chapter 3. When given a data set in high dimensions, we will see that the projection to a lower dimensional space, taken at random, can preserve (under conditions made precise in the next section) certain geometric features of the data set. The remarkable aspect here is that this “lower” dimension can be strikingly lower. This gives rise to significant computational savings in many data processing tasks by including a random projection as a pre-processing step. Similar ideas are also the driving force behind many algorithms in randomized linear algebra, as we will demonstrate in this chapter via the randomized SVD. There is however another less obvious implication of this phenomenon with important practical implications: since the projection is agnostic of the data, it can be leveraged even when the data set is not explicit, such as the set of all natural images or the set of all “possible” brain scans; this is at the heart of Compressive Sensing, which we will explore in Chapter 16
Suppose one has \( n\) points, \( X = \{x_1,\dots,x_n\}\) , in \( \mathbb{R}^p\) (with \( p\) large). If \( p>n\) , the points actually lie in a subspace of dimension \( n\) , so the projection \( f:\mathbb{R}^p\to \mathbb{R}^n\) of the points to that subspace acts without distorting the geometry of \( X\) . In particular, for every \( x_i\) and \( x_j\) , \( \|f(x_i)-f(x_j)\|^2 = \|x_i-x_j\|^2\) , meaning that \( f\) is an isometry in \( X\) . Suppose instead we allow a bit of distortion, and look for a map \( f:\mathbb{R}^p\to \mathbb{R}^d\) that is an \( \varepsilon-\) isometry , meaning that
(214)
Can we do better than \( d=n\) ?
In 1984, Johnson and Lindenstrauss [132] showed a remarkable lemma that answers this question affirmatively.
Theorem 28 (Johnson-Lindenstrauss Lemma [132])
For any \( 0<\varepsilon<1\) and for any integer \( n\) , let \( d\) be such that
(215)
Then, for any set \( X\) of \( n\) points in \( \mathbb{R}^p\) , there is a linear map \( f:\mathbb{R}^p\to\mathbb{R}^d\) that is an \( \varepsilon-\) isometry for \( X\) (see (214)). This map can be found in randomized polynomial time .
Proof
We follow [13] for an elementary proof for Theorem 28. We will start by showing that, given a pair \( x_i,x_j\) a projection onto a random subspace of dimension \( d\) will satisfy (after appropriate scaling) property (214) with high probability. Without loss of generality we can assume that \( u = x_i - x_j\) has unit norm. Understanding what is the norm of the projection of \( u\) on a random subspace of dimension \( d\) is the same as understanding the norm of the projection of a (uniformly) random point on \( S^{p-1}\) the unit sphere in \( \mathbb{R}^p\) on a specific \( d\) -dimensional subspace—let us say the one generated by the first \( d\) canonical basis vectors.
This means that we are interested in the distribution of the norm of the first \( d\) entries of a random vector drawn from the uniform distribution over \( S^{p-1}\) – this distribution is the same as taking a standard Gaussian vector in \( \mathbb{R}^p\) and normalizing it to the unit sphere.
Let \( g:\mathbb{R}^p\to\mathbb{R}^d\) be the projection on a random \( d-\) dimensional subspace and let \( f:\mathbb{R}^p\to\mathbb{R}^d\) defined as \( f = \sqrt{\frac{p}d}g\) . Then (by the above discussion), given a pair of distinct points \( x_i\) and \( x_j\) , \( \frac{\|f(x_i)-f(x_j)\|^2}{\|x_i-x_j\|^2}\) has the same distribution as \( \frac{p}dL\) , as defined in Lemma 1. Using Lemma 1, we have, given a pair \( x_i,x_j\) ,
since for \( \varepsilon\geq 0\) , \( \log(1-\varepsilon) \leq -\varepsilon -\varepsilon^2/2\) , using (215) we have
On the other hand,
since for \( \varepsilon\geq 0\) , \( \log(1+\varepsilon) \leq \varepsilon -\varepsilon^2/2 + \varepsilon^3/3\) , using (215) we have
By the union bound it follows that
Since there exist \( {n \choose 2}\) such pairs, again, a simple union bound gives
Therefore, choosing \( f\) as a properly scaled projection onto a random \( d\) -dimensional subspace gives an \( \varepsilon\) -isometry on \( X\) (see (214)) with probability at least \( \frac1n\) . We can achieve any desirable constant probability of success by trying \( \mathcal{O}(n)\) such random projections, meaning we can find an \( \varepsilon-\) isometry in randomized polynomial time.
Note that by considering \( d\) slightly larger one can get a good projection on the first random attempt with high confidence. In fact, it is trivial to adapt the proof above to obtain the following lemma:
Proposition 17
For any \( 0<\varepsilon<1\) , \( \tau>0\) , and for any integer \( n\) , let \( d\) be such that
Then, for any set \( X\) of \( n\) points in \( \mathbb{R}^p\) , take \( f:\mathbb{R}^p\to\mathbb{R}^d\) to be a suitably scaled projection on a random subspace of dimension \( d\) , then \( f\) is an \( \varepsilon-\) isometry for \( X\) (see (214)) with probability at least \( 1-\frac1{n^{\tau}}\) .
Proposition 17 is quite remarkable. Consider the situation where we are given a high-dimensional data set in a streaming fashion – meaning that we get each data point at a time, consecutively. To run a dimension-reduction technique like PCA or Diffusion maps we would need to wait until we received the last data point and then compute the dimension reduction map (both PCA and Diffusion Maps are, in some sense, data adaptive). Using Lemma 17 one can just choose a projection at random in the beginning of the process (all one needs to know is an estimate of the logarithm of the size of the data set) and just map each point using this projection matrix which can be done online – we do not need to see the next point to compute the projection of the current data point. Proposition 17 ensures that this (seemingly na
specialChar{34}ive) procedure will, with high probably, not distort the data by more than \( \varepsilon\) .
One might wonder if such low-dimensional embeddings as provided by the Johson-Lindenstrauss Lemma also extend to other norms besides the Euclidean norm. For the \( \ell_1\) -norm there exist lower bounds which prevent such a dramatic dimension reduction (see [133]), and for the \( \ell_{\infty}\) -norm one can easily construct examples that demonstrate the impossibility of dimension reduction. Hence, the Johnson-Lindenstrauss Lemma seems to be a subtle result about the Euclidean norm.
Let us continue thinking about our example of high-dimensional streaming data. After we draw the random projection matrix , say \( M\) , for each data point \( x\) , we still have to compute \( Mx\) which has a computational cost of \( \mathcal{O}(\varepsilon^{-2}\log(n)p)\) since \( M\) has \( \mathcal{O}(\varepsilon^{-2}\log(n)p)\) entries (since \( M\) is a random matrix, generically it will be a dense matrix). In some applications this might be too expensive, raising the natural question of whether one can do better. Moreover, storing a large-scale dense matrix \( M\) is not very desirable either. There is no hope of significantly reducing the number of rows in general, as it is known that the Johnson-Lindenstrauss Lemma is orderwise optimal [134, 135].
We might hope to replace the dense random matrix \( M\) by a sparse matrix \( S\) to speed up the matrix-vector multiplication and to reduce the storage requirements. This method was proposed and analyzed in [136]. Here we discuss a slightly simplified version, see also [137].
We let \( S\) be a very sparse \( d \times p\) matrix, where each row of \( S\) has just one single non-zero entry of value \( \sqrt{p/d}\) at a location drawn uniformly at random. Then, for any vector \( x \in \mathbb{R}^p\)
hence \( \mathbb{E} [\|Sx\|^2] = \mathbb{E} [\sum\limits^d_{i = 1} (Sx_i)^2]=\|x\|^2\) . This result is satisfactory with respect to expectation (even for \( d=1\) ), but not with respect to the variance of \( \|Sx\|^2\) . For instance, if \( x\) has only one non-zero entry we need \( d \sim \mathcal{O}(p)\) to ensure that \( \|Sx\|^2 \neq 0\) with non-negligible probability. More generally, if one coordinate of \( x\) is much larger (in absolute value) than all its other coordinates, then we will need a rather large value for \( d\) to guarantee that \( \|Sx\| \approx \|x\|\) .
A natural way to quantify the “peakiness” of a vector \( x\) is via the peak-to-average ratio measured by the quantity \( \|x\|_\infty/\|x\|\) . It is easy to see that we have (assuming \( x\) is not the zero-vector)
The upper bounds is achieved by vectors with only one non-zero entry, while the lower bound is met by constant-modulus vectors. Thus, if
(216)
we can hope that sparse subsampling of \( x\) will still preserve its Euclidean norm.
Thus, this suggests to include a preprocessing step by applying a rotation so that sparse vectors become non-sparse in the new basis, thereby reducing their \( \infty\) -norm (while their 2-norm remains invariant under rotation). Two natural choices for such a rotation are the Discrete Fourier transform (which maps unit-vectors into constant modulus vectors) and its \( \mathbb{Z}_2\) -cousin, the Walsh-Hadamard matrix . But since the Fast Johnson-Lindenstrauss Transform (FJLT) has to work for all vectors, we need to avoid that this rotation maps dense vectors into sparse vectors. We can address this issue by “randomizing” the rotation, thereby ensuring with overwhelming probability that dense vectors are not mapped into sparse vectors. This can be accomplished in a numerically efficient manner (thus maintaining our overall goal of numerical efficiency) by first randomizing the signs of \( x\) before applying the rotation. Putting these steps together we arrive at the following map.
Definition 16
The Fast Johnson-Lindenstrauss Transform is the map \( \Psi: \mathbb{C}^p \to \mathbb{C}^d\) , defined by \( \Psi:= S F D\) , where \( S\) and \( D\) are random matrices and \( F\) is a deterministic matrix. In particular,
We can carry out the matrix-vector multiplication by the DFT matrix via the Fast Fourier Transform (FFT) in \( \mathcal{O}(p \log p)\) operations; a similar algorithm exists for the Walsh-Hadamard matrix. The FJLT allows for a dimension reduction that is competitive with the Johnson-Lindenstrauss Lemma as manifested by the following theorem.
Theorem 29 (Fast Johnson-Lindenstrauss Transform)
For \( 0<\varepsilon<1\) and \( 0<\delta<1\) , there is a random matrix \( \Psi\) of size \( d \times p\) with \( d = \mathcal{O} \big( \log(p/\delta) \log(1/\delta) /\varepsilon^2\big)\) such that, for each \( x \in \mathbb{C}^p\) ,
holds with probability at least \( 1-\delta\) . Matrix-vector multiplication with \( \Psi\) takes \( \mathcal{O}(p\log p +d)\) operations.
For convenience we will prove Theorem 29 for the case when \( F\) is the Walsh-Hadamard matrix so that the random variables are real-valued and the exposition is lighter. But it is straighforward to adapt the argument to the case when \( F\) is the DFT matrix. Keeping this minor simplification in mind, the proof of Theorem 29 follows from the two lemmas below. We first show that with high probability the random rotation \( FD\) produces vectors with a sufficiently low peak-to-average ratio.
Lemma 3
Let \( y = FDx\) , where \( F\) and \( D\) are as in Definition 16. Then
(217)
Proof
Since \( FD\) is unitary, the quantity \( \|FDx\|_\infty/\|FDx\|\) is invariant under rescaling of \( x\) and therefore we can assume \( \|x\|=1\) .
Let \( \xi_i = \pm 1\) be the \( i\) -th diagonal entry of \( D\) . We have \( y_i = \sum_{j=1}^p \xi_j F_{ij} x_j\) and note that the terms of this sum are i.i.d. bounded random variables. We thus can apply Hoeffding’s inequality. In the notation of Theorem 3, let \( X_j = \xi_j F_{ij} x_j\) . We note that \( X_j = \pm F_{ij} x_j\) , hence \( \mathbb{E}[X_j] =0\) and \( |X_j | \le a_j\) , where \( a_j = \left|F_{ij} x_j\right|\) . It holds that
We can now use Theorem 3 with \( t = \sqrt{2 \log(4p/\delta)/p}\) and obtain
Applying the union bound finishes the proof.
Lemma 4
Let \( 0<\varepsilon<1\) and \( y\in \mathbb{R}^p\) satisfy \( \|y \|_\infty^2 < \frac{2\log (4p/\delta)}{p}\) and \( \|y\|=1\) , then it possible to pick \( d \sim 1/\varepsilon^2 \log(p/\delta) \log(1/\delta)\) such that
Proof
The idea is to use Bernstein’s Inequality (Theorem 4). We write \( S_{ji} = \sqrt{p/d} \delta_{ji}\) , where \( \delta_{ji} \in \{0,1\}\) is our random sample of the columns for row \( j\) . Hence for all \( j\) , \( \sum_{i=1}^p \delta_{ji} = 1\) . We write \( z:= Sy\) and compute
We want to bound the random variable \( \|z\|^2 -1= \sum_j \left(q_j-\frac1d\right)\) . Since the \( q_j\) ’s are independent, and \( \mathbb{E}\left[q_j-\frac1d\right]=0\) , we can apply Berstein’s Inequality (Theorem 4, provided we bound \( \sigma^2\) and \( a\) . Firstly,
and secondly,
Plugging these terms into Bernstein’s Inequality (Theorem 4) gives
where the last inequality uses \( \varepsilon<1\) . Picking \( d = \frac{16}{3\varepsilon^2} \log(4p/\delta) \log(4/\delta)\) gives the desired \( \delta/2\) -bound.
Combining Lemmas 3 and 4, union bounding over the two events, and recalling that if \( \|x\|=1\) then \( \|y\|=1\) since both \( D\) and \( F\) are unitary, establishes Theorem 29.
Besides the potential speedup, another advantage of the FJLT is that it requires significantly less memory compared to storing an unstructured random projection matrix as is the case for the standard Johnson-Lindenstrauss approach.
There are many applications where one wants to perform dimension reduction while preserving the geometry of certain sets with infinite points, such as subspaces. Via an \( \varepsilon\) -net argument it is possible to show that random matrices that are good as Johnson-Lindenstrauss maps for \( N\) points, also approximately preserve the geometry of a (\( \log N\) )-dimensional subspace. These go by the name of Oblivious Subspace Embeddings (see, e.g., Section 5.2.2. in [138] where the fast JL construction we introduced above is shown to be an Oblivious Subspace Embedding). A similar idea will be explored below (Section 8.2) where a random projection will allow us to still approximate the subspace spanned by the singular vectors corresponding to the largest singular values, resulting in a randomized SVD algorithm that is workhorse of large scale linear algebra. In Chapter 14 we will develop analogues of the Johnson-Lindenstrauss Lemma for more general sets, through the celebrated Gordon’s espace through a mesh theorem.
Randomized linear algebra has gained significant relevance in recent years due to its ability to efficiently handle large-scale data problems that traditional methods struggle with. The Johnson-Lindenstrauss dimension reduction discussed in the previous section is one prominent example. The techniques encountered in the Johnson-Lindenstrauss transform naturally lend themselves as key ingredient of the randomized SVD, a method to compute an approximation of the SVD of a matrix. It is especially useful when the matrix is large and dense and can be well approximated by a low-rank matrix.
In this section we will give a detailed description of the randomized SVD. It is based on using random projections to reduce the dimensionality of the matrix before performing a more traditional SVD on the reduced matrix.
Recall from Chapter 4 that the SVD of a matrix \( A\in\mathbb{R}^{m\times n}\) is given by
(218)
where \( U \in \mathbb{R}^{m \times m}\) is a unitary matrix containing the left singular vectors, \( \Sigma \in \mathbb{R}^{m \times n}\) is a diagonal matrix with singular values (in decreasing order) on the diagonal, and \( V \in \mathbb{R}^{n \times n}\) is a unitary matrix containing the right singular vectors.
In practice \( A\) is often large, and we are interested in only a small number \( s\) of the largest singular values and corresponding singular vectors, giving a rank-\( k\) approximation of \( A \) :
where \( U_k \in \mathbb{R}^{m \times k} \) , \( \Sigma_k \in \mathbb{R}^{k \times k} \) , and \( V_k \in \mathbb{R}^{n \times k} \) .
We define the projection \( P_k\) onto the the span of the leading \( k\) left singular vectors of \( A\) via
We know from Theorem 11 that the best rank-\( k\) approximation of \( A\) with respect to the Frobenius norm is given by
Thus, we can compute the best approximation by projecting the target matrix onto the \( k\) -dimensional subspace that captures “most of the action” of the matrix \( A\) .
In many applications it suffices to compute the best approximation with moderate accuracy. Hence, following [23], we let \( s=k+p\) for small \( p\) , and seek a rank-\( s\) approximation \( \hat{A}_s\) that is comparable to the best rank-\( k\) approximation, i.e.,
for some chosen tolerance \( \varepsilon > 0\) .
The aim of the Randomized SVD (RSVD) is essentially to generate an efficient approximation for the best rank-\( k\) approximation of the matrix \( P_k A\) . We proceed in two steps. In the first step we compute a low-dimensional subspace that captures the range of \( A\) . In the second step we project \( A\) onto the subspace and compute the (standard SVD) of the resulting smaller matrix. Regarding the first step, recall that \( P_k\) is the orthogonal projection onto the \( k\) leading left singular vectors of \( A\) . But since we do not know the subspace spanned by \( P_k\) , a sensible choice, as suggested by the Johnson-Lindenstrauss Lemma, is to draw some probing random vectors from a rotationally invariant distribution to estimate the directions of the vectors \( u_i\) that make up \( P_k\) . We collect these probing random vectors in a matrix \( \Psi\) .
Hence, let \( \Psi \in \mathbb{R}^{n \times (k + p)} \) be a random matrix, where \( k \) is the desired number of singular values/vectors, and \( p \) is an oversampling parameter (typically \( p \) is small, like 5 or 10). A promising choice for \( \Psi \) is to select each entry of \( \Psi \) as a sample from a standard normal distribution \( \mathcal{N}(0, 1) \) . We then form the matrix \( Y \in \mathbb{R}^{m \times (k + p)} \) as
This matrix \( Y \) captures the action of \( A \) on a random subspace of dimension \( k + p \) . We will see (in Theorem 30) that, with high probability, the subspace spanned by the columns of \( Y \) contains a good approximation of the subspace spanned by the top \( k \) left singular vectors of \( A \) . Next, we find an orthonormal basis for the range of \( Y \) . Using the standard QR decomposition, we compute
where \( Q \in \mathbb{R}^{m \times (k + p)} \) has orthonormal columns, and \( R \in \mathbb{R}^{(k + p) \times (k + p)} \) is an upper triangular matrix. Now, we project \( A \) onto the lower-dimensional subspace spanned by the columns of \( Q \) by computing
Here, \( B \in \mathbb{R}^{(k + p) \times n} \) is a much smaller matrix that approximates \( A \) (in the sense that \( QB\) approximates \( A\) ).
Next, we compute the exact SVD of the smaller matrix \( B \)
where \( U_B \in \mathbb{R}^{(k + p) \times (k + p)} \) , \( \Sigma_B \in \mathbb{R}^{(k + p) \times n} \) , and \( V_B \in \mathbb{R}^{n \times (k + p)} \) . Finally, the approximate SVD of \( A \) is given by
where \( \tilde{U} = Q U_B \in \mathbb{R}^{m \times (k + p)} \) , \( \tilde{\Sigma} = \Sigma_B \in \mathbb{R}^{ (k + p) \times (k + p)} \) , and \( \tilde{V} = V_B \in \mathbb{R}^{n \times (k + p)} \) .
We summarize these steps in Algorithm 4.
Algorithm 4 (Randomized SVD)
Input: Matrix \( A \in\mathbb{R}^{m\times n}\) , target rank \( k>0\) , oversampling factor \( p>0\) ; set \( s=k+p\) .
Output: Orthogonal \( \tilde{U} \in \mathbb{R}^{m \times (k+p)}\) , orthogonal \( \tilde{V} \in \mathbb{R}^{n \times (k+p)}\) , and diagonal \( \tilde{\Sigma} \in \mathbb{R}^{(k+p) \times (k+p)}\) such that \( A \sim \hat{A}_s:= \tilde{U} \tilde{\Sigma} \tilde{V}^{\ast}\)
The random matrix \( \Psi \) used in the random projection step ensures that with high probability, the subspace spanned by the columns of \( Y = A \Psi \) contains a good approximation to the dominant singular subspace of \( A \) .
Theorem 30 ([23])
Consider a matrix \( A \in \mathbb{R}^{m \times n}\) with singular values \( \sigma_1 \ge \sigma_2 \ge \sigma_3 \ge …\) . Fix the target rank \( k \le \min(m,n)\) . When \( s :=k+p \ge k+2\) , the randomized SVD method produces a random rank-\( s\) approximation \( \hat{A}_s\) that satisfies
(219)
The error on the right hand side consists of the best rank-\( k\) approximation error and an additional factor due to using a randomized projection instead of the optimal projection \( P_k\) .
For the proof of Theorem 30 we need some preparation. In what follows it will be convenient to rewrite the SVD of \( A\) , cf. (218), in block matrix form:
(220)
where \( U_\perp \in \mathbb{R}^{m \times m-k}\) denotes the orthogonal complement of \( U_k \in \mathbb{R}^{m \times k}\) with respect to \( U \in \mathbb{R}^{m \times m}\) . Furthermore, we set
Here, \( \Psi_k\) captures the alignment of \( \Psi\) with the leading right singular vectors of \( A\) , while \( \Psi_\perp\) captures the alignment with the trailing right singular vectors of \( A\) . The matrix \( P_Y\) denotes the orthogonal projection onto the range of \( Y\) . Since this projection is unique, we have that \( P_Y = Q Q^{\ast}\) .
The following deterministic error bound (the bound does not require \( \Psi\) to be Gaussian) will be instrumental:
Lemma 5
We use the same notation as in Theorem 30. Let \( \Psi \in \mathbb{R}^{n \times (k+p)}\) be an arbitrary matrix with \( \rm{rank}(\Psi)=k\) . Then the rank-\( s\) approximation \( \hat{A}_s\) computed by Algorithm 4 satisfies
(221)
Proof
We first fix the target rank \( k \le \min{\{m,n\}}\) and the oversampling factor \( p\) and set \( s=k+p\) . Denoting \( \tilde{A} = U^{\ast} A\) and \( \tilde{Y}= \tilde{A}\Psi\) , we obtain
(222)
Here, the first equality uses the fact that the Frobenius norm is unitarily invariant, whereas in the second equality we have substituted \( P_{\tilde{Y}} = U^{\ast} P_Y U\) . Next, we set \( Z=\tilde{Y} \Psi_k^{\dagger} \Sigma_k^{-1} =: [I \,\,\, F]^{\ast}\) where \( F = \Sigma_\perp \Psi_\perp \Psi_k^{\dagger} \Sigma_k^{-1}\) . Note that \( \rm{range}(Z) \subseteq \rm{range}(\tilde{Y})\) . This in turn yields
(223)
Note that \( P_Z\) has the expansion
Since \( P_Z\) is a projection, we have that \( I - P_Z \succ 0\) . After some linear algebra calculations (left to the reader), we obtain
where \( B = -(I+F^{\ast}F)^{-1} F^{\ast}\) . Multiplying both sides by \( \Sigma\) gives
(224)
Combining (222), (223) and (224) gives
where in the penultimate inequality we have used the fact that the trace is monotone on the cone of positive semidefinite matrices.
Lemma 5 holds for any rank-\( k\) matrix \( \Psi\) . As pointed out in [138], the first term on the right-hand side of (221) captures the trailing singular values of the matrix, which is independent of the specific choice of \( \Psi\) , since this loss occurs for every rank-\( k\) approximation. The second term is the error caused by the dimension reducing matrix \( \Psi\) . We want the component \( \Psi_k\) in the leading directions to be well conditioned (ideally, an identity matrix). We want the component \( \Psi_\perp\) in the trailing directions to be as small as possible.
The bound (221) suggests that in order to establish Theorem 30 we need to get a handle on \( \Psi_k \Psi_\perp^{\dagger}\) when \( \Psi_{ij} \overset{\text{i.i.d.}}{\sim} {\mathcal N}(0,1).\) To that end, the following lemma will be helpful.
Lemma 6
Let \( G \in \mathbb{R}^{m \times n}\) be a standard Gaussian random matrix. Assume \( m \ge 2\) and \( n-m \ge 2\) . Then
(225)
Proof
We follow the proof of the corresponding result in the appendix of [23]. First, note that \( (G G^{\ast})\) is invertible almost surely. We compute
The random matrix \( (G G^{\ast})^{-1}\) follows the inverted Wishart distribution. Hence, we can use formula (12) on page 97 of [139] for the expected trace and obtain (225).
With these lemmata in place, we are now ready to prove Theorem 30.
Proof (of Theorem 30)
Since \( \Psi\) is chosen to be a standard Gaussian matrix and the Gaussian distribution is invariant under unitary transformations, it follows that \( \Psi_k=V^{\ast}_k \Psi\) and \( \Psi_\perp =V^{\ast}_\perp \Psi\) are also standard Gaussian. Moreover, note that matrix \( \Psi_\perp\) has full rank with probability one, since the rows of a (fat) Gaussian matrix are almost surely in general position.
We consider the bound established in Lemma 5, apply expectation to (221) and use Hölder’s inequality to obtain
(226)
Using the law of total expectation as well as the independence of \( \Psi_k\) and \( \Psi_\perp\) we estimate
(227)
where the second inequality follows from Lemma 6.
Combining now (226) with (227) establishes the bound (219).
What is the computational complexity of the RSVD? The dominant costs for the RSVD are:
Thus, the overall complexity of the randomized SVD is \( {\mathcal{O}}(m n (k + p)) \) , which is significantly smaller than the \( {\mathcal{O}}(m n^2) \) cost of the classical SVD when \( k \) is much smaller than \( n \) .
We can further reduce the cost of the matrix-matrix product \( A \Psi \) by introducing structure or sparsity into \( \Psi\) . We already encountered one such choice in Definition 16 in the form of the Fast Johnson-Lindenstrauss transform. The improved computational efficiency usually comes at the cost of additional log-factors in terms of required samples to guarantee the same accuracy.
When the singular values of \( A\) decay slowly, Algorithm 4 is not very accurate in the regime of interest, namely when \( k \ll n\) . The reason is that to achieve a small approximation error the matrix \( Q\) must align well with the first \( k + p\) left singular vectors of \( A\) . As a consequence, the product \( A\Psi\) must reveal the singular vectors, which in turn would require the singular vectors associated with small singular values not to interfere with the calculation.
How can we remedy this issue? We can take inspiration from the power iteration. By raising our matrix to a power \( q\) via \( (AA^{\ast} )^q A\) prior to applying it to \( \Psi\) we can enhance the decay of the spectrum of our matrix without effecting the direction of the eigenvectors. Hence, we replace in Algorithm 4 the step \( Y = A \Psi\) by \( Y = (AA^{\ast} )^q A \Psi\) . A small power of \( q\) (such as \( q=1\) or 2) is often sufficient. In this modified RSVD it is also advisable to increase the oversampling factor \( p\) . We refer to [23, Corollary 10.10] for an approximation error bound for this modified RSVD as well as to [140] for a more detailed discussion.
The key ideas behind the RSVD also form the main ingredients for some other algorithms, such as randomized least squares and randomized Choleksy factorization, see [141, 23, 138].
The methods we encountered in this chapter are closely intertwined with the concept of matrix sketching [142, 143, 144, 23], a family of randomized techniques for constructing a low-dimensional representation of a large matrix while approximately preserving its essential linear-algebraic structure.
Given a data matrix \( A \in \mathbb{R}^{n \times d}\) , the goal is to replace \( A\) by a much smaller matrix—called a sketch—that enables accurate approximation of quantities such as norms, inner products, or dominant singular subspaces.
Two complementary formulations are common. In the projection-based viewpoint, one forms a sketch \( SA\) , where \( S \in \mathbb{R}^{m \times n}\) is a random embedding (e.g., Gaussian or subsampled randomized Hadamard), generalizing the Johnson–Lindenstrauss lemma from vectors to entire subspaces [145, 146].
In the sampling-based viewpoint, one constructs a sketch by randomly selecting and rescaling columns (or rows) of \( A\) , often using leverage-score sampling to retain the most informative directions [147, 148, 149]. Both approaches can be understood as approximately preserving the geometry of the column space of \( A\) .
Matrix sketching does not only underlie the randomized SVD, it provides a principled way to trade controlled approximation error for potentially substantial reductions in computational and memory costs. As such, it enables distributed linear algebra [145] and it is the fundamental mathematical too that makes streaming possible for high-dimensional data [150, 143]. Here, streaming refers to a computational model in which data are processed sequentially, in one (or very few) passes, using limited memory, without storing the entire dataset [151, 145]. Streaming is essential when the dataset is too large to store in memory, data arrive continuously (logs, sensor data, social networks), or computation must be done online.
Let us explore some exemplary results in sketching beyond the Johnson-Lindenstrauss transform and the randomized SVD.
Definition 17
A \( (1\pm \varepsilon)\) \( \ell_2\) -subspace embedding for the column space of an \( n \times d\) matrix \( A\) is a matrix \( S\) for which for all \( x \in \mathbb{R}^d\)
We will occasionally abuse notation and say that \( S\) is an \( \ell_2\) -subspace embedding for \( A\) itself, although it should be clear from the definition that this property is independent from the choice of a particular basis for the representation of the column space of \( A\) .
Theorem 31 (\( \ell_2\) -subspace embedding)
Let \( U \subset \mathbb{R}^n\) be a fixed subspace of dimension \( r\) . Let \( S \in \mathbb{R}^{m \times n}\) be a random matrix such that for any fixed vector \( x \in \mathbb{R}^n\) ,
If
then with probability at least \( 1-\delta\) ,
Proof
By homogeneity, it suffices to prove the inequality for all
There exists an \( \eta\) -net \( \mathcal{N} \subset \mathbb{S}_U\) with \( |\mathcal{N}| \le \left(1+\frac{2}{\eta}\right)^r. \) Choose \( \eta = \frac{\varepsilon}{4}\) , then \( |\mathcal{N}| \le \left(\frac{8}{\varepsilon}\right)^r \le e^{C r}. \) For each fixed \( x \in \mathcal{N}\) ,
By the union bound,
Using the bound on the size of the net, \( |\mathcal{N}| \le e^{C r}\) , we obtain
If
then
Hence
From now on, we condition on this event.
Let \( y \in \mathbb{S}_U\) and choose \( x \in \mathcal{N}\) such that
We write
Using concentration again for the fixed vector \( y-x\) ,
Combining with \( \|Sx\|^2 \le 1+\varepsilon/2\) , one obtains \( \|Sy\|^2 \le 1+\varepsilon\) . A symmetric argument gives the lower bound \( \|Sy\|^2 \ge 1-\varepsilon\) .
Hence, with probability at least \( 1-\delta\) ,
It is easy to see from our previously derived concentration bounds that a Gaussian random matrix and a Subsampled Randomized Hadamard (or Fourier) Transform as introduced in Definition 16 satisfy the conditions of Theorem 31.
Another interesting and useful construction of a sketching matrix is the so-called CountSketch [152, 153]. CountSketch is extremely sparse, making it an appealing choice for processing massive datasets or high-speed data streams. It is often used to estimate frequencies of elements in data streams.
A CountSketch matrix \( S \in \mathbb{R}^{m \times n}\) is defined by two independent hash functions:
The entries of \( S\) are constructed as follows:
The CountSketch construction enjoys the following useful properties: (i) Sparsity: Each column of \( S\) has exactly one non-zero entry. (ii) Efficiency: To compute \( Sx\) , we do not perform a standard matrix-vector product. Instead, for each entry \( x_j\) , we simply update one row of the sketch: \( sketch[h(j)] \leftarrow sketch[h(j)] + g(j)x_j\) . (iii) Time Complexity: Computing \( SA\) for \( A \in \mathbb{R}^{n \times d}\) takes only \( \mathcal{O}(\text{nnz}(A))\) (the number of non-zero entries in \( A\) ) operations.
A typical realization of \( S\) might look like this:
In this specific example, the two underlying hash functions performed the following actions: (i) The bucket hash (\( h\) ): \( h(1)=2, h(2)=4, h(3)=5, h(4)=3, h(5)=1, h(6)=4\) . Note that row 4 received two assignments (from columns 2 and 6, respectively), while row 6 is empty. This “collision” is expected in hashing. (ii) The sign hash (\( g\) ): \( g(1)=+1, g(2)=-1, g(3)=-1, g(4)=+1, g(5)=-1, g(6)=+1\) .
Before proving subspace embeddings, we establish that CountSketch preserves the inner product.
Lemma 7
For any two vectors \( x, y \in \mathbb{R}^n\) , the inner product of their sketches via the CountSketch matrix \( S\) is an unbiased estimator of their true inner product:
The proof is left to the reader in Exercise 85.
Theorem 32
Let \( U \subset \mathbb{R}^n\) be a subspace of dimension \( d\) . If the number of rows \( m\) satisfies
then with probability \( 1-\delta\)
Proof
A matrix \( S\) is an \( \varepsilon\) -subspace embedding for the column space of \( U\) if and only if the eigenvalues of \( (SU)^T (SU)\) are within \( [1-\varepsilon, 1+\varepsilon]\) . This is equivalent to
Since the spectral norm is upper-bounded by the Frobenius norm, it suffices to show that \( \mathbb{P}(\| (SU)^T (SU) - I_d \|_F^2 > \varepsilon^2) \le \delta\) .
Let \( M = (SU)^T (SU) - I_d\) . The entries of the product \( (SU)^T (SU)\) are
where \( u_j\) and \( u_k\) are the \( j\) -th and \( k\) -th columns of \( U\) . From Lemma 7 we know \( \mathbb{E}[\langle Su_j, Su_k \rangle] = \langle u_j, u_k \rangle\) . Since \( U\) has orthonormal columns, \( \langle u_j, u_k \rangle = \delta_{jk}\) . Thus, \( \mathbb{E}[M] = 0\) .
The squared Frobenius norm is the sum of the squares of the entries
We expand the expectation for a single pair \( (j, k)\) . Let \( X_{jk} = \langle Su_j, Su_k \rangle\) . We seek \( \rm{Var}(X_{jk})\) because \( \mathbb{E}[(X_{jk} - \delta_{jk})^2] = \rm{Var}(X_{jk})\) . Using the definition of the CountSketch matrix, we can expand \( X_{jk}\) as follows:
Using the property of random signs \( g\) , the expectation of \( X_{jk}^2\) survives only when indices match in pairs. After some algebraic simplification using the independence of \( h\) and \( g\) we obtain
Summing over all \( j, k \in \{1, \dots, d\}\) gives
Since \( \|u_j\|^2 = 1\) and \( \sum_{j,k} \langle u_j, u_k \rangle^2 = \|U^T U\|_F^2 = \|I_d\|_F^2 = d\) , we get
Applying Chebyshev’s inequality gives
To ensure this probability is at most \( \delta\) , we set
This completes the proof.
The attentive reader will notice a couple of places where this argument is rather suboptimal: the tail bound is obtained with Chebyshev’s inequality, and the quantity controlled is the Frobenius norm rather than the spectral norm (indeed, many \( d\times d\) random matrices tend to have Frobeniues norm that is about \( \sim\sqrt{d}\) times larger than the spectral norm). Using random matrix tools similar to the ones we will develop in Chapter 15, it is possible to significantly improve Theorem 32 (see e.g. [154]). In any case, while CountSketch is efficient, it requires a larger sketch size than Gaussian matrices to achieve the same \( \ell_2\) -subspace embedding guarantee. But CountSketch is the preferred choice when \( n\) and \( d\) are so large that even a single dense matrix multiplication is prohibitive.
The following theorem illustrates the use of sketching to speed up the solution of large-scale least squares problems, as they arise for example in high-dimensional linear regression.
Theorem 33 (Approximate regression via sketching)
Let \( A \in \mathbb{R}^{n\times d}\) , \( y \in \mathbb{R}^n\) , and let \( S\) be an \( \ell_2\) -subspace embedding for \( \mathrm{Range}([A; y])\) (where \( \mathrm{Range}([A; y])\) denotes the subspace spanned by the columns of \( A\) and the vector \( y\) ). Let
Then
Proof
Let
The least-squares solution satisfies
Since \( r(x) \in \rm{range} ([A; y])\) , the \( \ell_2\) -subspace embedding implies
By definition of \( \tilde{x}\) ,
Applying the embedding bounds yields
Dividing by \( 1-\varepsilon\) ,
For \( 0 < \varepsilon \le 1/3\) ,
which yields the desired bound (up to rescaling \( \varepsilon\) ).
Computing the product of two matrices is one of the most common and basic procedures in numerical linear algebra. Let \( A,\,B\) be two arbitrary \( n\times n\) matrices. The cost for the classical way (the standard inner product method) to compute the product \( AB\) is \( {\mathcal O}(n^3)\) .
In 1969 Strassen took the linear algebra community by surprise when he showed that the standard matrix multiplication algorithm is not optimal from a computational viewpoint by presenting an algorithm that uses only \( {\mathcal{O}}(n^{2.808})\) operations [155]. Strassen’s algorithm proceeds as follows. Let us decompose the product of \( A\) and \( B\) into blocks in the following way
where each block is of size \( \frac{n}{2}\times\frac{n}{2}\) . Following the standard way of multiplication, this requires eight \( \left(\frac{n}{2}\times\frac{n}{2}\right)\) matrix multiplications and four additions of \( \frac{n}{2}\times\frac{n}{2}\) matrices. Strassen devised a formula that computes this block matrix multiplication using only seven \( \frac{n}{2}\times\frac{n}{2}\) matrix multiplication and eighteen \( \frac{n}{2}\times\frac{n}{2}\) additions. The cost for multiplying two \( \frac{n}{2}\times\frac{n}{2}\) matrices is \( {\mathcal O}\left(\frac{n}{2}\right)^3\) and the cost for adding two \( \frac{n}{2}\times\frac{n}{2}\) matrices is \( {\mathcal O}\left(\frac{n}{2}\right)^2\) . Since matrix addition is cheaper than matrix multiplication, there is a net gain in computational cost. Proceeding recursively, with blocks of size \( \frac{n}{2}\) , \( \frac{n}{4}\) , …, (up to blocks of size 16) we end up with Strassen’s algorithm. The total cost now is \( \mathcal{O}(n^{\log_2 7})\sim \mathcal{O}(n^{2.8074})\) .
Coppersmith and Winograd improved Strassen’s algorithm further, currently sitting at around \( {\mathcal O}(n^{2.37})\) operations at the cost of an increased constant.
An important open question is whether we can we construct a fast, practical algorithm that can multiply two arbitrary \( n\times n\) matrices in \( {\mathcal O}(n^{2+\varepsilon})\) (or, say, \( {\mathcal O}(n^{2}\log n)\) ) operations.
Yet, in certain cases one may be content with computing \( AB\) approximately instead of exactly. By sacrificing precision, this should allow for a reduced complexity algorithm. Randomized algorithms are a natural candidate to realize this goal.
Let \( A \in \mathbb{R}^{m \times n}\) and \( B \in \mathbb{R}^{n \times p}\) . An intuitive approach, popularized by Drineas, Kannan, and Mahoney [156], treats the product \( AB\) as a sum of \( n\) rank-one outer products
Instead of summing all \( n\) terms, we pick \( c\) indices \( \{i_1, i_2, \dots, i_c\}\) from \( \{1, \dots, n\}\) with replacement, based on a probability distribution \( \{p_i\}\) . We then form the approximation
This is equivalent to \( AB \approx (AS)(S^T B)\) , where \( S\) is a sparse sampling and scaling matrix.
The quality of the approximation depends heavily on the sampling probabilities \( \{p_i\}\) . If we use probabilities that are proportional to the Euclidean norms of the columns and rows,
the expected error is bounded by
While \( \|A\|_F \|B\|_F\) can be large, this bound may be sufficient for applications where the matrices have a are already noisy or when the dimension \( n\) is in the order of millions and \( c\) is in the order of 10000, say. However, the cost for computing all the probabilities \( p_i\) must be factored into the total cost of matrix-matrix multiplication.
Random projections (like the subsampled Randomized Hadamard Transform or Gaussian sketches) lead to bounds of the form
where \( (AB)_k\) is the best rank-\( k\) approximation of the product, see e.g. [23, 137]. This indicates that the randomized product effectively captures the most significant singular values of the true product.
In conclusion, randomized sketching can approximate large matrix products efficiently when the matrices share a very large dimension. However, the benefits are limited when the output size is large, when strong spectral guarantees are required, or when the matrices have large stable rank. Consequently, sketching is most effective when the matrix product serves as an intermediate step in a larger algorithm, such as regression, low-rank approximation, or graph computations.
Exercise 79 (Optimality of the Johnson-Lindenstrauss Lemma)
Recall that the Johnson-Lindenstrauss lemma states that for any set of \( n\) points in \( \mathbb{R}^p\) there is a linear map \( f\colon \mathbb{R}^p \to \mathbb{R}^d\) , which acts almost as an \( \varepsilon\) -isometry, for some \( d \asymp \log n\) . We will show that this dependency is indeed optimal.
Fix some \( d \in \mathbb{N}\) and \( \varepsilon > 0\) . A subset \( S \subseteq \mathbb{R}^d\) is said to be \( \varepsilon\) -separated if there are no distinct \( s, t \in S\) such that \( {\left\lVert{s-t}\right\rVert}_2\leq\varepsilon\) . A packing number of a subset \( T \subseteq \mathbb{R}^d\) is defined as the size of its largest subset that is \( \varepsilon\) -separated, i.e.
Suppose \( S\) is an \( \varepsilon\) -separated subset of \( B^d(1)\) , the unit ball in \( \mathbb{R}^d\) . Using a volume argument, prove that
Consider the set \( X = \left\{ x_1,…,x_n \right\}\) of \( n \geq d\) points in \( \mathbb{R}^n\) , given by
where \( e_i\) is \( i\) -th coordinate vector in \( \mathbb{R}^n\) . Suppose that \( f\colon\mathbb{R}^n\mapsto\mathbb{R}^d\) is an \( \varepsilon\) -isometry for \( X\) . Show that
is an \( (1-\varepsilon)\) separated subset of some translated copy of \( B_d(1+\varepsilon)\) .
Conclude that
Exercise 80 (Johnson-Lindenstrauss Lemma: Alternative Version)
The goal of this exercise is to prove the random projection lemma and then to use this result to prove another version of the Johnson-Lindenstrauss lemma.
Let \( P \in \mathbb{R}^{n\times m}\) be the coordinate projection, which maps a vector in \( \mathbb{R}^n\) onto its first \( m\) coordinates in \( \mathbb{R}^m\) . Let \( z\in S^{n-1}\) be a random vector sampled uniformly on the sphere \( S^{n-1}\) . Show that
Prove the following statement using the result in Problem 168: There exists an absolute constant \( c > 0\) , such that for any \( \varepsilon > 0\) , the following inequality holds with probability at least \( 1-2\exp(-c\varepsilon^2 m)\)
(228)
Note that the result in (b) is stated for a random vector, while in dimension reduction we wish to find a randomized projection such that it preserves geometry for a fixed set of points. However, it can be shown that the same result (228) holds when \( z\in\mathbb{R}^n\) is a fixed vector, and \( P\) is a orthogonal projection onto an \( m\) -dimensional subspace chosen uniformly at random from all \( m\) -dimensional subspaces in \( \mathbb{R}^n\) . In fact, these two models are equivalent.
You can use the mentioned fact without proof. Using (b), show the following result: Let \( \mathcal{X}\) be a set of \( n\) points in \( \mathbb{R}^n\) and let \( \varepsilon > 0\) . Suppose that
Consider a random subspace \( E\) of dimension \( m\) chosen uniformly from all \( m\) -dimensional subspaces in \( \mathbb{R}^n\) , and let \( P\) be an orthogonal projection on this set. Then with probability at least \( 1 - 2 \exp(-c \varepsilon^2 m)\) , the scaled projection \( Q = \sqrt{\tfrac{n}{m}} P\) is an \( \varepsilon\) -approximate isometry for \( \mathcal{X}\) , i.e., for all \( x, y \in \mathcal{X}\) ,
Here \( C,c > 0\) are universal constants.
Exercise 81 (Random projections flatten vectors)
We saw that random projections are good at preserving euclidean distances. In this exercise we’ll study their interaction with the \( \ell_\infty\) -norm. A vector is considered "flat" if its \( \ell_\infty\) -norm is small compared to its euclidean norm. We will show that random projections flatten vectors.
We are given a deterministic matrix \( A \in \mathbb{R}^{m \times n}\) , a fixed vector \( v \in \mathbb{R}^n\) with \( {\left\lVert{v}\right\rVert} =1\) and a random diagonal matrix \( D \in \mathbb{R}^{n \times n}\) that has independent Rademacher entries on its diagonal (so \( \mathbb{P}(D_{i,i} = 1) = \mathbb{P}(D_{i,i} = -1) = \frac12\) ). Prove
where \( {\left\lVert{A}\right\rVert}_\infty = \max_{i,j} |A_{i,j}|\) .
Let \( P \in \mathbb{R}^{m \times n}\) be a uniform random projection matrix. Prove that for some universal constant \( c>0\)
You can use without proof that the distribution of any row of \( P\) is a uniform random vector on the euclidean sphere \( S^{n-1}\) .
Conclude that for \( \mathcal{X} \subseteq S^{n-1}\) being a set of unit vectors of cardinality \( |\mathcal{X}| = k\) , we have that with probability at least \( 1- \frac Cn\) for all \( x \in \mathcal{X}\)
where \( C,C'>0\) are sufficiently large universal constants.
Exercise 82
Implement the Randomized SVD algorithm to approximate the rank-\( k\) SVD of a \( 1000 \times 1000\) Hilbert matrix (a matrix known for rapid singular value decay).
(a) Compute the true SVD and the Randomized SVD with k=10 and p=5.
(b) Plot the singular values obtained from both methods on the same graph.
(c) Report the error.
Exercise 83
Let \( A \in \mathbb{R}^{m \times n}\) be a matrix of rank \( r\) , constructed as \( A = U \Sigma V^T\) , where \( U \in \mathbb{R}^{m\times r}\) and \( V \in \mathbb{R}^{n\times r}\) have orthonormal columns and \( \Sigma =\operatorname{diag}(\sigma_1,\dots,\sigma_r)\) . Consider the following two singular value decay regimes:
For each regime:
(a) Generate a test matrix \( A\) of size \( 1000\times 1000\) .
(b) Compute a rank-\( k\) approximation using randomized SVD without power iterations and compute the relative Frobenius norm error \( \frac{\|A - A_k^{\mathrm{rSVD}}\|_F}{\|A\|_F}\) .
(d) Repeat the experiment with power iterations.
(e) Compare the results with the optimal truncated SVD.
Exercise 84
Show that if \( S\) is a \( (1\pm \varepsilon)\) \( \ell_2\) -subspace embedding for \( A\) , then it is also a \( (1\pm \varepsilon)\) \( \ell_2\) -subspace embedding for \( U\) , where \( U\) is an orthonormal basis for the column space of \( A\) .
Exercise 85
Prove Lemma 7.
Exercise 86
(Comparing sketching matrices in least squares) Let \( A \in \mathbb{R}^{n \times d}\) with \( n \gg d\) and let \( b \in \mathbb{R}^n\) . Consider the overdetermined least-squares problem
Compare the performance of different sketching matrices \( S \in \mathbb{R}^{m \times n}\) for approximating \( x^\star\) via the sketch-and-solve approach.
Comment on which sketch reaches a given accuracy with the smallest \( m\) , which sketch is fastest overall, and how does sparsity of the sketch affect runtime.
\begin{myexercise} Repeat the previous exercise with a sparse random matrix \( A\) , where each row has only 10 nonzero entries (the locations and the entries of the 10 non-zero entries in each row are chosen at random). How does the performance of CountSketch change relative to Gaussian and SRHT?
Exercise 87
Let \( L\) be the graph Laplacian introduced in Definition 8. Let \( S \in \mathbb{R}^{m \times n}\) be a sketching matrix (Gaussian, SRHT, or CountSketch).
Define the sketched quadratic form
and suppose \( S\) is an \( \ell_2\) -subspace embedding for the column space of \( L^{1/2} U\) . Show that, with high probability,
Optimization lies at the heart of modern data science. Whether fitting a linear regression model, clustering data, finding a sparse solution to an underdetermined system of equations, or training a deep neural network, the underlying task is almost always the same: find the parameters that minimize (or maximize) a well-defined objective function.
This chapter provides a brief, rigorous and practical introduction to optimization from a data science perspective. We begin by formalizing what an optimization problem is: a function to be minimized, variables to be chosen, and constraints that restrict which solutions are allowed. From there, we discuss convexity, introduce the necessary tools for analyzing optimality, including gradients, Hessians, the Karush–Kuhn–Tucker conditions, duality, and rate of convergence. Finally, we study gradient descent and popular variants, which play a central role in large-scale machine learning. For a comprehensive study of optimization we recommend the sources [54, 157, 158, 159].
A mathematical optimization problem can be expressed as
(229)
Here, the vector \( x \in {\mathcal D}\) is the optimization variable of the problem and \( {\mathcal D}\) is the search space or domain of \( x\) ; often we set \( {\mathcal D} = \mathbb{R}^n\) . The function \( f: {\mathcal D} \to \mathbb{R}\) is the objective function; in data science and machine learning \( f\) is commonly referred to as the cost function or loss function when minimization is sought, and the utility function when maximization is sought. The functions \( g_i: {\mathcal D} \to \mathbb{R}, i=1,\dots,m\) , \( h_j: {\mathcal D} \to \mathbb{R}, j=1,\dots,r\) are the equality and inequality constraint functions, and the constants \( b_i, c_j\) are the limits, or bounds, for the constraints, respectively. If there are no constraints in (229), the problem is called unconstrained, otherwise it falls in the realm of constrained optimization.
A vector \( x^*\) is called optimal, or a solution of the problem (229), if it has the smallest objective value among all vectors that satisfy the constraints; that is, for any \( z\in{\mathcal D}\) with \( g_i(z) \le b_i, i=1,\dots,m\) , \( h_j(z) = c_j, j=1,\dots,r\) , we have \( f(z) \ge f(x^*)\) . The set of all points satisfying the constraints is known as the feasible region, which we denote by \( {\mathcal F}\) .
Many foundational data science models naturally fit into this structure. For example, linear regression minimizes the mean squared error over all parameter vectors, usually without constraints. Logistic regression minimizes cross-entropy loss, again as an unconstrained problem unless we explicitly add regularization or parameter bounds. Data clustering and community detection can be expressed in the form (229) where the constraints are of discrete type (cf. Chapter 6 and Chapter 13, respectively). Understanding this basic formulation gives the language and framework needed for all the optimization techniques that follow.
The structure of an optimization problem determines both the difficulty of finding a solution and the type of algorithms we can use. We have already seen several optimization problems in the preceding chapter, and will see many more in chapters that follow. For example, the PCA objective (53) is an optimization problem on continuous variables, the \( k\) -means objective (112) was an optimization problem with both discrete variables (the assignments to clusters) and continuous variables (the cluster centers), and the Minimimum bisection problem (116) is an optimization problem on discrete variables. Below we will focus on continuous optimization. Indeed, while this book covers several combinatorial optimization problems the approach we take (as in Chapter 6) is often to relax to a suitable continuous optimization problems. We point the reader to [160, 161] for more on combinatorial optimization.
We have already seen (and will see more) optimization problems for which there are efficient algorithms (such as the PCA example) and optimization problems for which no such algorithm is believed to exist (such as minimum bisection). While the reader might be tempted to conjecture that discrete optimization problems are harder than continuous ones, the situation is more subtle: it is true that combinatorial optimization problems are often formulated over exponential sized sets (such as \( \{\pm1\}^n\) ) but that on itself does not make them computationally hard (just take \( \min_{x\in\{\pm1\}^n} \mathbf{1}^Tx\) as an easy example). Also, note that while the Max-Cut problem (348) is an NP-hard combinatorial problem, it can be equivalently formulated as a continuous one by replacing \( x\in\{\pm1\}^n\) by \( -1\leq x_i\leq 1\) (see Exercise 88).
Convexity is one of the most mathematically important concepts in continuous optimization as it tends to directly impact the complexity and solvability of the problem.
Definition 18
A function \( f : \mathbb{R}^d \to \mathbb{R}\) is convex if for all \( x,y \in \mathbb{R}^d\) and all \( \lambda \in [0,1]\) ,
(230)
Geometrically, this means that the line segment connecting any two points on the graph of the function lies entirely on or above the graph . We call \( f\) strictly convex if the inequality in (230) becomes a strict inequality.
If in addition \( f\) is continuously differentiable, convexity is equivalent to the first-order condition (we leave the proof of this equivalence as an exercise):
(231)
This means that the function \( f\) is above its tangent at \( x\) , as illustrated in Figure 65.
Strengthening convexity by requiring an additional positive quadratic term on the right-hand side of () leads to strong convexity.
Definition 19
A differentiable function \( f : \mathbb{R}^d \to \mathbb{R}\) is \( \mu\) -strongly convex (\( \mu > 0\) ) if
(232)
This assumption will later allow us to establish exponential convergence rates.
Lemma 8
(i) Let \( f: \mathbb{R}^d \to \mathbb{R}\) be a convex function. Then the set of minimizers of \( f\) is convex and has cardinality \( 0, 1\) , or \( \infty\) . (ii) If in addition \( f\) is (differentiable) \( \mu\) -strongly convex, then \( f\) has exactly one minimizer.
Proof
Let \( f\) be convex, and assume that \( x^{*}\) and \( x^{**}\) are two minimizers of \( f\) . By (230), every convex combination is also a minimizer, which establishes the first part of the lemma. Now, assume that \( f\) is \( \mu\) -strongly convex. Then (232) implies \( f\) that is lower bounded by a (strictly) convex quadratic function. Hence there exists at least one minimizer \( x^*\) , which means \( \nabla f(x^*)=0\) . It follows from (232) that \( f(x) > f(x^*)\) for every \( x \neq x^*\) .
Recall that a set \( \mathcal{F}\) is a convex set if, for any two points \( x, y \in {\mathcal F}\) and any scalar \( \lambda \in [0, 1]\) , the convex combination \( \lambda x + (1-\lambda) y\) also belongs to \( {\mathcal F}\) .
Definition 20 (Convex Optimization Problem)
A problem is a convex optimization problem if it satisfies two conditions:
Theorem 34 (Fundamental Theorem of Convex Optimization.)
Let \( f : \mathbb{R}^n \to \mathbb{R}\) be a convex function on a convex set \( C \subseteq \mathbb{R}^n\) . If \( x^* \in C\) is a local minimum of \( f\) over \( C\) , then \( x^*\) is also a global minimum. If \( f\) is furthermore strictly convex, the global minimum is unique.
Proof
Assume \( x^*\) is not a global minimum Then there exists a point \( y \in C\) such that
Since \( C\) is convex, for any \( \lambda \in [0,1]\) , the point \( x_\lambda := (1-\lambda)x^* + \lambda y \) belongs to \( C\) . By convexity of \( f\) ,
Since \( f(y) < f(x^*)\) , we have
Thus,
As \( \lambda \to 0^+\) ,
Hence, for sufficiently small \( \lambda > 0\) , the point \( x_\lambda\) lies inside any neighborhood \( B_\varepsilon(x^*)\) . But we have shown
which contradicts the assumption that \( x^*\) is a local minimum. The assumption that \( x^*\) is not a global minimum must be false. Therefore,
Hence, \( x^*\) is a global minimum.
The proof of the claim of uniqueness is left as an exercise (see Exercise 91).
Theorem 34 is quite useful, since it guarantees that any optimization algorithm that converges to a stationary point is guaranteed to have found the best possible solution.
Convex problems are highly desirable: every local minimum is a global minimum, and efficient algorithms exist with strong guarantees. Many classical models in data science and machine learning such as linear regression, compressive sensing, logistic regression, and support vector machines are convex optimization problems.
We briefly discuss several noteworthy special cases of convex optimization problems, which play an important role in practice and which we will encounter later in this book.
A convex optimization problem is often stated in the form
(233)
where the functions \( f\) , \( g_i, i=1,\dots, m\) are convex.
The optimization problem (233) is called a linear program if the objective and constraint functions are linear (affine). A linear program is thus typically written in the form
(234)
where \( A \in \mathbb{R}^{r \times n}\) , \( c = \{c_i\}_{i=1}^m \in\mathbb{R}^m\) , \( g_1,\dots,g_m\in\mathbb{R}^n\) , \( b \in \mathbb{R}^r\) .
A quadratic program is also a special case of (233), where the objective and the inequality constraints are quadratic functions, i.e., they are polynomials in the \( x\) variable of degree at most two. Linear programs and quadratic programs appear in Chapter 16 (note that not all quadratics are convex, and so quadratic programs can also be non-convex).
In a semidefinite program (SDP) we minimize a linear function subject to the constraint that an affine combination of symmetric matrices is positive semidefinite. Such a constraint is nonlinear but convex, so semidefinite programs are convex optimization problems. Furthermore, efficient algorithms exist for SDPs [162]. Denote by \( \mathbb{S}_n\) the space of all \( n \times n\) real symmetric matrices. The space is equipped with the Hilbert-Schmidt inner product \( \langle A,B \rangle = \rm{trace}(A^T B)\) . An SDP can be stated in standard form as
(235)
where \( C, A_1,\dots,A_m \in \mathbb{S}_n\) . Semidefinite programs will feature prominently in Chapter 13. It is worth mentioning that (235) is not naturally written in form (233) but rather as an optimization problem over a convex cone \( K\) , in this case the cone of positive semidefinite matrices (a cone in \( \mathbb{R}^n\) is a set that is closed under non-negative scaling). While Section 9.3 will focus on problems of the form (233), the arguments and derivations can be adapted to the setting of optimization over convex cones (such as the PSD cone). For example, dual optimization problems tend to involve the dual cone \( K^\ast = \{y\in\mathbb{R}^n: \langle y,x\rangle \geq 0, \forall x\in K\}\) . Note that both the PSD cone (of PSD symmetric matrices), and the cone of non-negative vectors in \( \mathbb{R}^n\) , are self-dual cones. In Chapter 13 we derive the dual optimization problem for a Semidefinite Program.
An optimization problem is non-convex if either the objective function \( f(x)\) is not convex, or the feasible region \( \mathcal{F}\) is not convex (or both). Non-convex problems, common in data science and deep learning, may contain many local minima and saddle points, see Figure 67 for an illustration. These problems often require heuristic or iterative methods and seldom offer guarantees of global optimality. See also the convergence results for gradient descent in Section 9.4.4.
Remark 25 (Smooth vs. non-smooth optimization)
A smooth optimization problem is characterized by having a differentiable objective function (and constraints). Gradient-based algorithms, which will be discussed in detail in Section 9.4, are typically effective for such problems. Non-smooth problems involve objectives or constraints that are not differentiable everywhere. Examples include the \( \ell_1\) -penalty used in compressive sensing (see Chapter 16) or hinge loss in support vector machines (see Chapter 10). These require specialized methods such as subgradient algorithms or proximal techniques.
Optimality conditions provide mathematical criteria for determining whether a candidate solution of an optimization problem is locally or globally optimal. These conditions form the theoretical foundation for most optimization algorithms, as they describe the necessary (and sometimes sufficient) properties that optimal solutions must satisfy.
We start with unconstrained optimization problems.
As the name suggests, first-order conditions rely on gradient information of the optimization function \( f\) . The gradient of \( f\) with respect to \( x\) is a vector of partial derivatives
(236)
If it is clear from the context we simply write \( \nabla f(x)\) instead of \( \nabla_x f(x)\) .
Theorem 35
Let \( f:\mathbb{R}^n\to\mathbb{R}\) be continuously differentiable. If \( x^\star\) is a local minimum of \( f\) , then
Proof
Let \( d\in\mathbb{R}^n\) be any direction and define
Since \( x^\star\) is a local minimum, \( t=0\) is a local minimizer of \( \varphi\) , hence
By the chain rule,
Since this must hold for all directions \( d\) , the only vector satisfying
is
The first-condition in Theorem 35 provides a necessary, but not a sufficient criterion to characterize whether a function has a minimum at a specific point. If \( \nabla f(x)=0\) we may or may not have a local extremum at \( x\) . We therefore call any point \( x\) for which \( \nabla f(x)=0\) a critical point.
To find out whether a critical point is indeed a local extremum, we will utilize second-order conditions.
Definition 21
Let \( f\in C^2\) . A point \( x^\star\) is a saddle point of \( f\) if \( \nabla f(x^\star)=0\) but the Hessian \( \nabla^2 f(x^\star)\) is indefinite.
Thus, a saddle point is a critical point, but it is not a local extremum of the function, see also Figure 68.
Theorem 36
If \( f\in C^2\) and \( x^\star\) is a local minimum, then \( \nabla^2 f(x^\star)\succeq 0\) (i.e., the Hessian is positive semidefinite).
Proof
Consider the Taylor expansion
At a local minimum, for sufficiently small \( d\) ,
Using \( \nabla f(x^\star)=0\) , we obtain
Dividing by \( \|d\|^2\) and letting \( d\to 0\) yields
for all \( d\) . Thus the Hessian is positive semidefinite.
A straightforward variation of Theorem 36 is that if \( x^*\) is a local maximum, then \( \nabla^2 f(x^\star)\preceq 0\) , i.e., the Hessian is negative semidefinite.
Theorem 37
Let \( f\in C^2\) . If \( \nabla f(x^\star)=0\) and \( \nabla^2 f(x^\star)\succ 0\) , then \( x^\star\) is a strict local minimum.
Proof
Positive definiteness implies
for some \( c>0\) . Using the Taylor expansion again:
For sufficiently small \( d\) , the right-hand side is strictly positive. Thus \( x^\star\) is a strict local minimizer.
Notice that if \( f\in C^2\) and the Hessian \( \nabla^2 f\) is positive definite, then \( f\) is strictly convex, but the converse is not necessarily true. Consider for example the function \( f(x)=x^4\) . Then it is easy to check that \( f\) is strictly convex, but at \( x=0\) we have \( f''(x) =0\) , which implies that the (in this case scalar-valued) Hessian is not positive definite.
Example: Least squares. In Chapter 5 we analyzed the least squares problem from a statistical perspective. Now we will investigate it through an optimization lens and put the aforementioned optimality conditions to the test. We consider the least squares problem
(237)
where \( A \in \mathbb{R}^{m \times n}\) with \( m \ge n\) . A standard way to compute its solution is via orthogonal projections, as is usually done in numerical linear algebra. Here, we follow instead the path of optimization by setting the gradient of \( f(x)=\frac{1}{2} \|Ax - b\|^2\) to zero, as suggested by Theorem 35.
To that end we first expand (237) into
Next we compute the gradient of \( f\) with respect to \( x\) . Standard vector calculus yields
Setting the gradient to zero gives
(238)
The equations on the right hand side of (238) are known as the normal equations. Let the residual be \( r(x) = b - Ax\) . The normal equations are equivalent to the orthogonality condition
Thus, the columns of \( A\) span a subspace \( \operatorname{col}(A)\subset\mathbb{R}^n\) , and the least-squares minimizer \( x^*\) makes \( A x^{*}\) the orthogonal projection of \( b\) onto \( \operatorname{col}(A)\) , as illustrated in Figure 69
Equivalently,
and the projection matrix (when \( A\) has full column rank) is
The matrix \( A^T A\) is symmetric and if \( A\) has full rank \( n\) , then \( A^T A\) is positive definite, and thus invertible. In this case the solution to (237) is given by
(239)
This \( x^*\) minimizes \( f\) because the Hessian \( \nabla^2 f = A^T A\) is positive definite, so \( f\) is strictly convex. Thus in this case, by Theorem 34, \( x^*\) is a unique global minimum.
Least squares least norm solutions: If \( A\) does not have full column rank (\( \rm{rank}(A) < n\) ), then \( A^T A\) is symmetric positive semidefinite and singular. The normal equations \( A^T Ax = A^T b\) may have many solutions (note that there must exists at least one solution since the column space of \( A^T b\) is always contained in the column space of \( A^T A\) , which means that the system \( A^\top Ax=A^\top b\) is always consistent).
However, for the least-squares problem there is always at least one canonical minimizer: The set of all solutions of the normal equations (i.e. all minimizers) is
(240)
where \( x_0\) is any particular solution satisfying \( A^T A x_0 = A^T b\) . Among all solutions of the form (240) there is a unique solution of particular interest, namely the solution that has minimal 2-norm. This unique solution can be computed via the Moore–Penrose pseudoinverse \( A^\dagger\) which we already encountered in Section 4.1.6 (recall that \( A^\dagger = (A^T A)^{-1}A^T\) when \( \rm{rank} A = n\) ). More precisely,
is the solution of the optimization problem
(241)
If the system is consistent, the constraint \( A^T A x = A^T b\) reduces to \( Ax = b\) .
The minimal 2-norm solution \( x^\dagger\) satisfies
Thus, it avoids extra nullspace components that do not affect the output.
The minimum-2-norm solution corresponds to the least energy solution in physics, and to the maximum likelihood estimate when the solution is assumed to have i.i.d. Gaussian priors.
We consider the optimization problem (229), which we restate here without loss of generality and with a slight abuse of notation in a more convenient form regarding the constraints:
(242)
Its optimal value is denoted by \( p^*\) , and we do not (yet) assume that the problem is convex.
The key idea in Lagrangian duality is to incorporate the constraints in (242) into the objective function by augmenting it with a weighted sum of the constraint functions.
To that end, we introduce the Lagrangian \( {\mathcal L}: \mathbb{R}^n \times \mathbb{R}^m\times \mathbb{R}^r \to \mathbb{R}\) associated with (229) as
where \( \lambda = \{\lambda_i\}_{i=1}^m\) and \( \nu = \{\nu_j\}_{j=1}^r\) . We refer to \( \lambda_i\ge 0\) , as Lagrange multiplier associated with the inequality constraint \( g_i(x)\le 0\) , and to \( \nu_j\) as the Lagrange multiplier associated with the equality constraint \( h_j(x)=0\) . With a slight abuse of notation we write \( \lambda \ge 0\) when this inequality holds entrywise, i.e., when \( \lambda_i \ge 0, \forall i=1,\dots,m\) .
We define the Lagrange dual function as
The vectors \( \lambda\) and \( \nu\) are also called the dual variables associated with the problem (229). When the Lagrangian is unbounded below in \( x\) , the dual function takes on the value \( -\infty\) , otherwise, \( \theta(\lambda,\nu)\) is a finite value.
The following properties of the dual function will be very useful.
Lemma 9
The dual function \( \theta(\lambda,\nu)\) is jointly concave in \( (\lambda,\nu)\) . Moreover, for any \( \lambda \ge 0\) and any \( \nu\) we have
(243)
Proof
Note that for each fixed \( x\) , the function \( \mathcal{L}(x,\lambda,\nu)\) is affine in \( (\lambda,\nu)\) , hence it is also concave in \( (\lambda,\nu)\) , because linear and affine functions are both convex and concave. Since the dual function \( \theta(\lambda,\nu)\) is the pointwise infimum of a family of affine functions of \( (\lambda,\nu)\) , it is concave. Note that this conclusion holds even when the problem (229) is not convex.
To prove the claim about the lower bound, let \( \lambda \ge 0\) and assume that \( \bar{x}\) is a feasible point for (242), i.e., \( g_i(\bar{x}) \le 0\) , and \( h_j(\bar{x}) = 0\) .
Now consider the Lagrangian for this feasible \( \bar{x}\) , assuming \( \lambda \ge 0\) :
where each term \( \lambda_i g_i(\bar{x})\) is non-positive since \( \lambda_i \ge 0\) and \( g_i(\bar{x}) \le 0\) . Because the summation terms are either zero or non-positive, we have
(244)
The dual function is defined as the infimum of the Lagrangian over all \( x \in \mathcal{D}\) , which includes the subset of feasible points:
Combining this with inequality (244) gives
Since \( \theta(\lambda, \nu) \le f(x)\) holds for every feasible \( x\) , it must also be less than or equal to the minimum value attainable by \( f(x)\) on the feasible set:
Therefore, \( \theta(\lambda, \nu) \le p^*\) for all \( \lambda \ge 0\) and any \( \nu\) .
Let us consider some examples for which we will derive the Lagrange dual function analytically.
Example: Underdetermined linear equations. We consider the problem (241) for consistent systems, i.e.,
(245)
where \( A \in \mathbb{R}^{r \times n}\) . This problem has \( r\) equality constraints (and no inequality constraints). The Lagrangian is
and the dual function is given by \( \theta(\nu) = \inf_{x \in {\mathcal D}} \mathcal{L}(x,\nu)\) . \( \mathcal{L}\) is strictly convex as the reader may readily convince herself. Hence, we can find the unique minimizer via the first-order optimality condition
which gives \( x = - \frac{1}{2} A^T \nu\) . The associated dual function is
Lemma 9 implies that for any \( \nu \in \mathbb{R}^r\) we have the lower bound
Example: Dual of a linear program. Consider the linear program in standard form
(246)
where \( x \in \mathbb{R}^n\) , \( A \in \mathbb{R}^{m \times n}\) , \( b \in \mathbb{R}^m\) , and \( c \in \mathbb{R}^n\) . To compute the Lagrangian we introduce dual variables \( \nu \in \mathbb{R}^m\) for the equality constraint \( Ax=b\) (which we can rewrite as \( Ax-b=0\) ), and dual variables \( \lambda \in \mathbb{R}^n\) for the inequality constraint \( x \ge 0\) (which we can rewrite as \( -x \le 0\) ).
The Lagrangian is
Here, \( \lambda \ge 0\) is required by dual feasibility.
The Lagrange dual function is defined as
We now compute this infimum.
Since the Lagrangian is affine in \( x\) , we distinguish two cases:
Case 1: \( c + A^T \nu - \lambda = 0\) : Then \( L(x,\nu,\lambda) = - b^T \nu\) for all \( x\) , thus \( \theta(\lambda,\nu) = -b^T \nu\) .
Case 2: \( c + A^T \nu - \lambda \neq 0\) : Then the affine function \( (c + A^T \nu - \lambda)^T x - b^T \nu\) is unbounded below as a function of \( x\) , and therefore \( \theta(\lambda,\nu) = -\infty\) .
Combining the two cases gives
(247)
The lower bound property (243) is nontrivial only when \( \lambda\) and \( \nu\) satisfy \( \lambda \ge 0\) and \( c + A^T \nu - \lambda = 0\) . When this happens, then \( -b^T \nu\) is a lower bound on the optimal value of the linear program (246).
Lemma 9 tells us that for each pair \( (\lambda,\nu)\) the Lagrange dual function gives us a lower bound on the optimal value \( p^*\) of the optimization problem (229). This raises the question, what the best lower bound is that we can derive from the Lagrange dual function.
In other words, we are concerned with the so-called Lagrange dual problem associated with problem (229)
(248)
where the mazimization is sought with respect to the variables \( \lambda\) and \( \nu\) . The problem (229) is also referred to as the primal problem. We refer to the pair \( (\lambda^*,\nu^*)\) as dual optimal or optimal Lagrange multipliers if they are the maximizer of (248).
An important point is that the Lagrange dual problem (248) is convex, since the objective to be maximized is concave and the constraint is convex, and this is true whether or not the primal problem (229) is convex.
To put this concept to test, let us compute the Lagrange dual problem for a linear program. We already computed the Lagrangian dual function for a linear program, resulting in (247). The Lagrange dual problem of the linear program (246) is to maximize this dual function \( \theta\) subject to \( \lambda \ge 0\) . That means we need to solve
(249)
Since \( \theta\) is finite only when \( A^T \nu - \lambda +c = 0\) , we can make the equality constraints explicit via the following equivalent problem
(250)
which in turn can be written as the following linear program in inequality form:
(251)
Remark 26 (Duality in Semidefinite Programming)
One can construct the dual of a semidefinite program with a similar construction. The main point to note is that the variables \( \lambda\) in (250), dual variables to the constraints \( x\geq 0\) can be viewed as being in a dual cone: Let \( Q_+\) denote the cone of non-negative vectors in \( \mathbb{R}^n\) , then the constraint \( x\geq 0\) corresponds to \( x\in Q_+\) ; the dual variables are then in the dual cone \( Q_+^\ast\) (in this case \( Q_+^\ast=Q_+\) ). In a semidefinite program a matrix variable \( X\) is in \( K\) the cone of symmetric PSD matrices. It is also self-dual so this variable will have a dual variable \( Q\in K\) . See Chapter 13 for an actual derivation of the dual of an SDP.
We denote the optimal value of the Lagrange dual problem by \( d^*\) . By definition, \( d^*\) is the best lower bound for \( p^*\) that we can compute from the Lagrange dual function. Moreover, we have the straightforward inequality
(252)
And by virtue of Lemma 9 this bound holds even if the original problem is not convex. This property is also called weak duality.
The weak duality inequality (252) also holds when \( p^*\) and \( d^*\) are infinite: if the primal problem is unbounded below, i.e., \( p^* = -\infty\) , this implies \( d^* = -\infty\) , which means the Lagrange dual problem is infeasible; if the dual problem is unbounded above, i.e., \( d^* = \infty\) , this implies \( p^* = \infty\) , which in turn says that the primal problem is infeasible.
Definition 22
The difference \( p^* - d^*\) is called the optimal duality gap of the original problem.
Thus, the optimal duality gap (often with a slight abuse of terminology simply called duality gap), which is always non-negative, gives the gap between the optimal value of the primal problem and the best lower bound on it that can be obtained from the Lagrange dual function.
We say that strong duality holds if the duality gap is zero, that is if we have the equality
(253)
Unlike weak duality, strong duality does not hold in general. Consider for example the problem
The constraint implies \( x \in (-\infty,-1] \cup [1,\infty)\) . The objective is minimized at \( x^* = -1\) with optimal value \( p^* = -1\) .
To compute the Lagrangian dual, we rewrite the constraint as
The Lagrangian is
The dual function is
If \( \lambda > 0\) , the term \( -\lambda x^2\) dominates and \( \theta(\lambda) = -\infty\) . If \( \lambda = 0\) . then \( \theta(0) = \inf_{x} x = -\infty\) . Thus, \( \theta(\lambda) = -\infty\) for all \( \lambda \ge 0\) . The dual problem is
Hence, the primal optimal value is \( p^* = -1\) , while the dual optimal value is \( d^* = -\infty\) , so there is a strict (and rather large) duality gap.
Sometimes the dual problem can be easier to solve compared with the primal problem and the primal solution can be constructed from the dual solution. Thus, we are interested in understanding which conditions can guarantee that strong duality holds. A significant body of work in the optimization literature has been devoted to exploring different possibilities for these conditions. Among the most prominent conditions are Slater’s Condition and the Karush–Kuhn–Tucker Conditions, which we will explore in the following sections.
In essence, at the core of duality is the question of whether minimizing after maximizing gives the same result as maximizing after minimizing. We will make this slogan now more precise.
For convenience we consider the primal problem without equality constraints (it is straightforward to extend our derivations to include equality constraints):
(254)
(255)
Notice that for any \( x \in {\mathcal D}\) the Lagrangian \( \mathcal{L}(x,\lambda)\) satisfies
Indeed, if any \( g_i(x) > 0\) we may send \( \lambda_i \to +\infty\) to make the expression unbounded; if \( x\) is feasible all terms \( \lambda_i g_i(x) \leq 0\) , and the supremum is achieved at \( \lambda = 0\) .
Therefore the primal problem can be reformulated as
(256)
By definition of the dual function and dual optimal value we have that
(257)
Hence, we can express weak duality as
(258)
and strong duality as the equality
Weak duality \( d^* \leq p^*\) is actually an immediate consequence of the following universal inequality, which requires no assumptions on \( \mathcal{L}\) or the sets involved.
Theorem 38 (Max-Min Inequality)
For any function \( \phi : {\mathcal X} \times {\mathcal Y} \to \mathbb{R}\) and any sets \( {\mathcal X}, {\mathcal Y}\) :
Proof
Fix any \( x_0 \in {\mathcal X}\) and \( y_0 \in {\mathcal Y}\) . Then
Taking the supremum over \( y_0\) on the left-hand side and the infimum over \( x_0\) on the right-hand side gives the result.
Strong duality, in turn, is equivalent to the existence of a saddle point.
Theorem 39
The following are equivalent:
There exists a saddle point \( (x^*, \lambda^*)\) of \( \mathcal{L}\) , i.e.,
Moreover, at any saddle point, \( \mathcal{L}(x^*, \lambda^*) = p^* = d^*\) .
We leave the proof of this theorem as an exercise. The saddle point characterization of strong duality shows that the solution to the optimization problem is an equilibrium point where the “force” of the constraints (the dual variables) perfectly balances the “pull” of the objective function.
In convex optimization, strong duality is not guaranteed by default, though it holds for the vast majority of problems satisfying basic regularity conditions. The conditions (beyond convexity), under which strong duality holds are called constraint qualifications. One such constraint qualification is introduced in the next theorem [163, 54].
Theorem 40 (Slater’s Theorem)
Consider the convex optimization problem
(259)
(260)
where the minimization is over \( x \in {\mathcal D}\) . Assume the problem is convex. If there exists a point \( \tilde{x} \in \operatorname {relint} ({\mathcal D})\) , the relative interior of \( \mathcal{D}\) , such that
(261)
then strong duality holds (\( p^* = d^*\) ). Furthermore, if \( p^* > -\infty\) , there exists a dual optimal point \( (\lambda^*, \nu^*)\) that attains the dual supremum.
The conditions (261) are known as Slater’s condition. Geometrically, Slater’s condition means that the feasible set has nonempty interior relative to its affine hull. This “thickness” is exactly what allows separating hyperplanes to exist at the boundary without degeneracy, as the proof will establish rigorously, see also Figure 70.
Proof
Define the set
Since \( f\) and \( g_i, i=1,\dots,m\) are convex, \( \mathcal{C}\) is a convex set. We emphasize that every point \( (u,t) \in \mathcal{C}\) arises from an \( x\) that satisfies all equality constraints exactly. Hence, we are working in an affine subspace determined by \( Ax=b\) .
Note that \( p^* = \inf \{ t: (0,t) \in \mathcal{C} \}\) and that the point \( (0,p^*)\) is not in the interior of \( \mathcal C\) . Indeed, for any \( \varepsilon > 0\) , the point \( (0, p^* - \varepsilon)\) is not in \( \mathcal{C}\) by definition of the infimum. Now define the set
Then \( \mathcal{A}\) is a convex set, \( \mathcal{A} \cap \mathcal{C} = \emptyset\) (a feasible point achieving \( t < p^*\) while satisfying all constraints does not exist), and \( \mathcal{C}\) has nonempty relative interior due to Slater’s condition. Indeed, since \( \tilde{x} \in \operatorname{relint} {\mathcal D}\) and satisfies strict inequalities \( g_i(\tilde{x}) < 0\) , it follows that
By the Separating Hyperplane Theorem (see e.g. [54, Chapter 2]), there exists nonzero vector \( (\lambda,\mu) \in \mathbb{R}^m \times \mathbb{R}\) , \( \lambda \ge 0, \mu > 0\) , and a scalar \( \alpha\) such that
(262)
(263)
Since \( u = 0\) for all \( (u,t) \in \mathcal{A}\) , condition (263) reduces to
(264)
We now use Slater’s condition to prove that the hyperplane cannot be “vertical” (i.e., we must have \( \mu \neq 0\) ). If \( \mu < 0\) , then letting \( t\to -\infty\) in (264) implies \( \mu t \to +\infty\) , contradicting finiteness of \( \alpha\) . Hence \( \mu \ge 0\) . To show that \( \mu >0\) we assume for contradiction that \( \mu=0\) . Then (264) gives \( \alpha \ge 0\) , and (262) becomes
By Slater’s condition, there exists \( \tilde{x}\) with
Hence \( (\tilde u,\tilde t)\in\mathcal C \) with \( \tilde u \in \mathrm{int}(\mathbb{R}^m_-)\) . Then \( \lambda^T \tilde u \ge 0\) , but since \( \lambda \ge 0\) and \( \tilde u < 0\) , this implies \( \lambda = 0\) . Thus \( (\lambda,\mu)=(0,0)\) , contradicting nontrivial separation. Therefore, \( \mu > 0\) .
Equation (264) implies that \( \alpha \ge \mu p^*\) . By definition of \( p^*\) , there exists a sequence \( t_k \downarrow p^*\) such that \( (0,t_k)\in\mathcal C\) . Applying (262) yields \( \mu t_k \ge \alpha\) and taking limits gives \( \mu p^* \ge \alpha\) . Hence \( \alpha = \mu p^*\) .
Now we construct a dual optimal point. For any feasible \( x\) (i.e. \( Ax=b\) ),
We divide by \( \mu>0\) and define
Then
Adding \( \nu^T (Ax-b)=0\) , we obtain
Taking the infimum over \( x\) ,
But weak duality always gives
so we conclude
Thus \( d^* = p^*\) (strong duality), and the dual optimum is attained at \( (\lambda^*,\nu^*)\) .
Slater’s condition plays a dual role in the proof: Structurally, it guarantees \( \operatorname{relint}(\mathcal{C}) \neq \emptyset\) , making the supporting hyperplane theorem applicable. Analytically, the Slater point \( \tilde{x}\) is used a second time to rule out \( \mu = 0\) , forcing the separating hyperplane to be non-degenerate in the objective direction.
Without Slater’s condition, \( \mathcal{C}\) might still have nonempty relative interior, but we would have no guarantee. And more critically, we would lose the second use of \( \tilde{x}\) that forces \( \mu > 0\) . Both uses are essential, and both stem from the same strict feasibility assumption.
For unconstrained optimization, optimality is at least in part characterized by the first-order condition \( \nabla f(x^*) = 0\) . For constrained problems, the KKT conditions play an analogous role, since they describe when no feasible descent direction exists and they encode how constraints interact with the objective. In this sense, KKT is a natural extension of first-order optimality to constrained optimization .
Before deriving the KKT conditions, we introduce some helpful tools.
Complementary slackness: We say that an inequality constraint is slack when it is satisfied with strict inequality at the optimum, and the constraint is tight when it is satisfied with equality at the optimum. If the constraint has “slack,” it cannot exert any “force” on the optimal solution .
Complementary slackness is the condition that at optimality, for each inequality constraint \( i\) we have
Since \( \lambda_i^* \geq 0\) and \( g_i(x^*) \leq 0\) , this says that at least one of the two must be zero for every \( i\) . There are exactly two cases:
Case 1: The constraint is active (tight): \( g_i(x^*) = 0\) . The constraint is binding at the optimum, and \( \lambda_i^*\) is free to be positive – the dual variable is “switched on” and is actively penalizing that constraint.
Case 2: The constraint is inactive (slack): \( g_i(x^*) < 0\) . The constraint has room to spare, and so \( \lambda_i^* = 0\) – the dual variable is “switched off” and contributes nothing to the Lagrangian.
Assume now that strong duality holds, i.e., the duality gap is zero. Let \( x^*\) be a primal optimal and \( (\lambda^*,\nu^*)\) be a dual optimal point. We compute
Here, the equality in the first line is due to the assumption that the duality gap is zero, the second line is just the definition of the Lagrange dual function, the third line follows from the fact the the infimum of the Lagrangian over \( x\) is less than or equal to its value at \( x = x^*\) , and the fourth line follows from \( \lambda^{*}_i \ge 0\) , \( g_i(x^*) \le 0, i = 1,\dots,m\) , and \( h_j(x^*) = 0, j=1,\dots,r\) . Therefore, the two inequalities above must hold with equality.
A take-away of the fact that the inequality in the third line is actually an equality is that \( x^*\) minimizes \( \mathcal{L}(x,\lambda,\nu)\) over \( x\) . Note that \( \mathcal{L}(x,\lambda,\nu)\) could have other minimizers as well.
The fact that the inequality in the fourth line is actually an equality means that \( \sum_{i=1}^m \lambda^{*}_i g_i(x^*)=0\) . Since each term in this sum is non-positive, we draw the conclusion that
(265)
i.e., we have complementary slackness.
If we had a slack constraint with \( \lambda_i > 0\) for some \( i\) , we could slightly improve the objective function by moving in the corresponding direction of \( -\nabla f\) without violating that constraint. This would contradict the assumption that \( x^*\) was already optimal. Whereas if \( \lambda_i >0\) , the constraint must be active (i.e., \( g_i(x^*) = 0\) ). Consequently, examining the optimal dual variables allows us to identify which primal constraints are active at the solution.
We assume that the functions \( f\) , \( g_1,\dots,g_m\) , \( h_1, . . . , h_r\) are continuously differentiable, but not necessarily convex (we will address the convex case later). Furthermore, let \( x^*\) and \( (\lambda^*, \nu^*)\) be any primal and dual optimal points with zero duality gap. Since \( x^*\) minimizes \( \mathcal{L}(x,\lambda^*,\nu^*)\) over \( x\) , it follows that the gradient \( \nabla \mathcal{L}(x,\lambda^*,\nu^*)\) (with respect to \( x\) ) vanishes at \( x^*\) :
This provides us with the set of conditions
(266)
called the Karush-Kuhn-Tucker (KKT) conditions. Here, the first two conditions ensure primal feasibility and the third condition dual feasibility. The fourth condition is the complementary slackness condition we just discussed and the fifth condition represents Lagrangian stationarity.
We can summarize this insight provided by the KKT conditions in the following proposition.
Proposition 18
For any optimization problem with continuously differentiable objective and constraint functions for which strong duality holds, any pair of primal and dual optimal points must satisfy the KKT conditions (266).
We next show that when the primal problem is convex, the KKT conditions are also sufficient.
Theorem 41
Let the functions \( f\) , \( \{g_i\}_{i=1}^m, \{h_j\}_{j=1}^r\) be continuously differentiable. If in addition \( f\) and \( \{g_i\}_{i=1}^m\) are convex and \( \{h_j\}_{j=1}^r\) are affine, then the KKT conditions (266) are necessary and sufficient for the points \( x^*, \lambda^*, \nu^*\) to be primal and dual optimal with zero optimality gap.
Proof
The claim about necessity follows from Proposition 18. Thus we only need to prove the claim about sufficiency.
Note that the first three KKT conditions imply that \( x^*\) is primal feasible, and \( \lambda^*\) is dual feasible. Furthermore, since \( {\mathcal L}(x,\lambda^*,\nu^*)\) is convex in \( x\) , the fifth KKT condition states that \( x^*\) is a global minimizer of \( {\mathcal L}(x,\lambda^*,\nu^*)\) , and therefore
where the last equality follows from the fact that \( h_i(x^*) = 0\) (from primal feasibility), and that \( \lambda^{*}_i g_i(x^*)=0\) (from complementary slackness). This implies that the primal-dual feasible points \( x^*,(\lambda^*,\nu^*)\) are optimal, since the corresponding duality gap is zero.
In the context of Lagrangian duality and KKT conditions, the concept of a dual certificate turns out to be very useful. Given a convex optimization problem
a dual certificate for a candidate point \( x^*\) is a set of dual variables \( (\lambda^*, \nu^*)\) that satisfy the KKT conditions (266). If the problem is convex and satisfies a constraint qualification (like Slater’s condition), the existence of these variables is both necessary and sufficient for global optimality.
The most critical part of the certificate is the stationarity condition
Geometrically, this means the gradient of the objective function at \( x^*\) must lie in the span of the gradients of the active constraints (with the additional constraint that \( \lambda_i \ge 0 \enspace \forall i\) ). The dual variables \( \lambda_i^*\) and \( \nu_j^*\) act as the “weights” that prove the objective cannot be decreased further without violating a constraint.
At a feasible point \( x^*\) , the KKT conditions can be understood geometrically through the normal cone of the feasible set \( \mathcal{F}\) at \( x^*\) , defined as
(267)
that is, the set of all directions that make a non-positive inner product with every feasible direction from \( x^*\) . The stationarity condition requires that \( -\nabla f(x^*) \in N_{\mathcal{F}}(x^*)\) , meaning the negative gradient of the objective must point in a direction that is normal to the feasible set at \( x^*\) , so that no feasible descent direction exists. When \( \mathcal{F}\) is described by smooth inequality constraints \( g_i(x) \leq 0\) and equality constraints \( h_j(x) = 0\) , and an appropriate constraint qualification holds, the normal cone at \( x^*\) admits an explicit representation,
(268)
where \( \mathcal{A}\) denotes the set of active inequality constraints at \( x^*\) . The dual multipliers \( \lambda_i^*\) and \( \mu_j^*\) are then precisely the coefficients that witness membership of \( -\nabla f(x^*)\) in this cone, and together they form the dual certificate that verifies optimality. For convex \( f\) and convex \( \mathcal{F}\) , this condition is both necessary and sufficient for global optimality; in the non-convex setting it remains a necessary condition that any local minimum must satisfy.
We illustrate the above observation via the following linear program, which for ease of visualization has no equality constraints:
(269)
Figure 71 is a geometric depiction of optimality for the LP in (269). The optimal solution is \( x^* = (4,2)\) , the tight constraints are \( g_1(x):= x_1 \le 4\) and \( g_3(x):= x_1+x_2 \le 6\) . As the condition (268) stipulates, \( -\nabla f(x)\) is inside the cone formed by \( \nabla g_1(x^* )\) and \( \nabla g_3(x^*)\) , as required for the solution \( x^*\) to be optimal (in the figure the cone of tight constraints is depicted with its origin shifted to the point \( x^*\) ).
Assume that the conditions of Theorem 41 hold and that we have computed the dual solution \( (\lambda^*,\nu^*)\) . We can now find the solution \( x^*\) to the primal problem using the stationarity condition (the fifth condition in (266)):
Given the optimal dual variables \( (\lambda^*,\nu^*)\) , this is an equation in \( x^*\) . Solving it gives the primal optimizer. The candidate \( x^*\) obtained from stationarity must satisfy
If multiple solutions satisfy stationarity, feasibility selects the correct one.
In some cases the KKT conditions can be solved analytically. Many algorithms for convex optimization are designed (or can be interpreted as) as methods for solving the KKT conditions.
Example: Quadratically constrained quadratic program (QCQP). Consider
Note that the constraint means
We now compute the Lagrangian and the associated dual function:
Since \( \mathcal{L}(x,\lambda)\) is a quadratic function of \( x\) , we minimize it by setting the derivative \( \nabla_x \mathcal{L}(x,\lambda)\) to zero, yielding
Substituting back into \( \mathcal{L}(x,\lambda)\) , simplifying the resulting \( \theta(\lambda)\) and using the fact that we always have \( \lambda \ge 0\) , the dual problem becomes
This expression is finite only if the quadratic is convex in \( x\) , i.e.
Since \( \lambda \ge 0\) , this condition is automatically satisfied. Hence, the dual problem is
We can readily confirm that \( \theta(\lambda)\) is concave (negative second derivative), which is to be expected because dual functions are always concave. A quick calculation yields that the unique optimal point is at \( \lambda^* = 6\) . At this value \( \theta(6)=10 = d^*\) .
We can compute the optimal value \( x^*\) by solving \( \nabla_x \mathcal{L}(x^*,\lambda^*,\nu^*) = 0\) , which we solved already previously. Namely, we have \( x = \frac{7\lambda}{2(\lambda+1)}\) , and inserting \( \lambda=\lambda^*=6\) gives \( x^*=3\) and \( f(3)=10=p^*\) . Thus \( d^{*}=p^{*}\) , confirming optimality and strong duality in this problem.
While convex quadratically constrained quadratic programs (QCQPs), as in the example above, can be solved efficiently, their nonconvex counterparts constitute a class of particularly challenging optimization problems. This fact should not come unexpected, since non-convex QCQPs represent a bridge between continuous and discrete optimization [157] (e.g. \( x^2=1\) is equivalent to \( x\in\{\pm1\}\) ).
Dual certificates also play an important role in mathematically understanding the optimal solution of a convex optimization problem, they will be key in Chapter 13 where it will be shown that the solution of a convex optimization is precisely one is attempt to estimate, in that case the community structure of a network. Moreover, we will make frequent use of the dual certificate in Chapter 16 when we investigate compressive sensing and sparsity and Chapter 17 when we analyze low-rank matrix recovery.
The dual of the dual: What happens if we take the dual of the dual optimization problem? Do we get back the primal problem? The answer depends on the nature of the primal problem.
For convex optimization problems satisfying a constraint qualification (e.g. Slater’s condition), strong duality holds, meaning the duality gap is zero. In this case taking the dual twice does indeed returns us to the primal problem.
If the primal problem is non-convex, the dual of the dual does not necessarily return the original problem. Instead, it returns a convex relaxation of the primal problem, also called the convex biconjugate or biconjugate relaxation. Specifically, the objective of the “dual of the dual” will be the convex envelope (the largest lower-bounding convex function) of the original primal objective and the associated feasible set will be the convex hull of the original primal feasible set.
An interesting aspect here is that in non-convex optimization adding redundant constraints to the primal can introduce additional dual variables, thereby strengthening the dual problem and yielding a tighter convex relaxation when taking the dual of the dual. Thus in non-convex optimization, an algebraically redundant constraint (one that does not change the primal feasible set) is not necessarily computationally redundant.
This is also a key idea behind the Lasserre Hierarchy (and the dual sum-of-squares perspective, which we explore in Chapter 13). The Lasserre hierarchy does not just add a few random redundant constraints; it systematically considers all sum-of-squares weighted combinations of the original constraints up to a given degree. By “lifting” the problem into a higher-dimensional semidefinite program, it provides a sequence of convex relaxations that, under mild conditions, is guaranteed to converge to the global optimum.
We will encounter important situations in which the objective function \( f\) is convex but not differentiable at the solution. This happens for example for \( f(x)=\|x\|_1\) . In this situation the subdifferential takes the role of the derivative.
Let us recall the definition of a subdifferential.
Definition 23
Let \( f: \mathbb{R}^n \to \mathbb{R} \cup \{+\infty\}\) be a convex function. The subdifferential of \( f\) at a point \( x\) , denoted by \( \partial f(x)\) , is the set of all vectors \( g \in \mathbb{R}^n\) such that for all \( y \in \mathbb{R}^n\) :
Each vector \( g\) in \( \partial f(x)\) is called a subgradient.
As shown in Figure 72, there can be more than one subgradient of a function \( f\) at a point \( x\) .
Thus, when the constraint functions \( g_i\) (inequalities) and \( h_j\) (equalities) are differentiable but the objective function \( f\) is not, the stationarity condition becomes a set-inclusion problem. Instead of searching for a point where the gradient of the Lagrangian is zero, we search for a point where the zero vector is contained within the set of all possible “slopes” generated by the subdifferential of the objective and the gradients of the constraints. Therefore, in this case the stationarity condition of the KKT conditions (266) essentially states that there must exist a specific subgradient \( s \in \partial f(x^*)\) such that
Example: Subdifferential for the \( \ell_1\) -norm. Let us compute the subdifferential for the function \( f(x) = \|x\|_1\) . Because the \( \ell_1\) -norm is a separable function, its subdifferential is the Cartesian product of the subdifferentials of each individual absolute value component. So, we start with the scalar case: \( f(x) = |x|\) . For a single variable, the subdifferential \( \partial |x|\) is defined by the set of slopes \( g\) that satisfy the subgradient inequality: \( |y| \geq |x| + g(y - x)\) for all \( y\) . If \( x > 0\) , the function is differentiable with slope \( 1\) . Thus, \( \partial |x| = \{1\}\) . If \( x < 0\) , the function is differentiable with slope \( -1\) . Thus, \( \partial |x| = \{-1\}\) . If \( x = 0\) , we need \( |y| \geq 0 + g(y - 0)\) , which simplifies to \( |y| \geq gy\) . This holds for all \( y\) if and only if \( g \in [-1, 1]\) . We conclude that the subdifferential of the absolute value is the sign function
Therefore, for the vector case, \( f(x)=\|x\|_1\) , the subdifferential is the set of vectors \( g\) such that:
Example: Subdifferential for the nuclear norm. Recall that the nuclear norm of a matrix \( X\in \mathbb{R}^{n_1 \times n_2}\) is defined as the sum of its singular values, i.e.,
where \( X=U\Sigma V\) is the SVD of \( X\) and the \( \sigma_i\) are the diagonal entries of \( \Sigma\) . The nuclear norm plays an important role in optimization, in particular as a convex surrogate in rank minimization problems, see also Chapter 17. We want to compute the subdifferential of \( f(X) = \|X\|_*\) .
We need to identify the set of matrices \( Z\) that satisfy the subgradient inequality
Recall that the nuclear norm and the spectral norm are dual to each other. By the definition of the dual norm
From the definition of a subgradient \( Z \in \partial f(X)\) , it follows that \( X\) must satisfy
Let the SVD of \( X\) be \( X = U \Sigma V^T\) , where \( U \in \mathbb{R}^{n_1 \times r}\) , \( V \in \mathbb{R}^{n_2 \times r}\) , and \( \Sigma\) is an \( r \times r\) diagonal matrix with strictly positive singular values. We define the tangent space \( \mathcal{T}\) at \( X\) relative to the manifold of rank-\( r\) matrices as
The orthogonal complement \( \mathcal{T}^{\perp}\) consists of matrices whose rows are orthogonal to \( V\) and columns are orthogonal to \( U\)
Any matrix \( Z\) can be decomposed as
We require \( \langle Z, X \rangle = \|X\|_*\) . Substituting the SVD
For this sum to equal \( \sum \sigma_i\) (given \( \|Z\| \leq 1\) ), we must have \( (U^T Z V)_{ii} = 1\) for all \( i\) . In fact, the only way to satisfy \( \|Z\| \leq 1\) and achieve this inner product is if
Now consider the component \( W = P_{\mathcal{T}^\perp}(Z)\) . For \( Z\) to be a valid subgradient, the operator norm \( \|Z\|\) must not exceed 1. Since \( UV^T\) and \( W\) have orthogonal row and column spaces (by the definition of \( \mathcal{T}^\perp\) ):
Because \( \|UV^T\| = 1\) , we must ensure that \( \|W\| \leq 1\) . Furthermore, the orthogonality conditions for \( W \in \mathcal{T}^\perp\) are
Combining these requirements yields that the subdifferential has the form
(270)
Gradient descent is an iterative optimization algorithm used to minimize a differentiable function by moving in the direction of the steepest descent , as defined by the negative of the gradient. The gradient of a function at a point gives the direction of the steepest ascent. Therefore, to minimize the function, the gradient descent algorithm updates the parameters iteratively by moving in the opposite direction of the gradient
(271)
where \( x_{0}\) is some initial guess and \( \eta \) is the step size or learning rate.
Typical choices for the initial guess are the zero vector or some random initialization. The step size may be chosen constant, decaying, or adaptively. A step size that is too large might overshoot the minimum, while a step size that is too small may result in poor convergence.
In this section we will discuss gradient descent methods and their convergence, focusing on unconstrained optimization problems. We will start with guarantees of converge of gradients for \( L\) -smooth functions in Section 9.4.1; in Section 9.4.2 we upgrade the conditions to include convexity of the function to be optimized and show convergence of function values to the minimum value; we then introduce the {Polyak-Łojasiewicz condition} to show converge of the iterates themselves to the minimizer in Section 9.4.3.
We recall a useful notion of regularity that quantifies how much a function changes, such that its gradient provides a reliable local linear approximation, and which in turn will enable us to quantify the rate of convergence of gradient descent.
Definition 24
The gradient of a function \( f : \mathbb{R}^d \to \mathbb{R}\) is \( L\) -Lipschitz continuous if there exists a constant \( L > 0\) such that
(272)
It is not difficult to see (and left as an exercise) that the \( L\) -Lipschitz condition is equivalent to the notion of \( L\) -smoothness often used in the literature in connection with gradient descent.
Definition 25
A function \( f : \mathbb{R}^d \to \mathbb{R}\) is called \( L\) -smooth if there exists a constant \( L > 0\) such that
(273)
In other words, \( f\) is bounded above and below by a quadratic function that touches its graph at each point \( x\) , see also Figure 73.
We can use \( L\) -smoothness to quantify the improvement of one step of the gradient descent algorithm. The resulting statement is often referred to as the gradient descent lemma.
Lemma 10 (Gradient Descent Lemma)
Asssume that \( f: \mathbb{R}^d \to \mathbb{R}\) is \( L\) -smooth. Then for any stepsize \( \eta\) with \( 0 < \eta \le \frac{1}{L} \) each step of gradient descent (271) satisfies
(274)
Proof
We apply (273) with \( x=x_k\) and \( y=x_{k+1}\) :
(275)
Substituting the gradient descent formula \( x^{(k+1)} = x^{(k)} - \eta \nabla f(x^{(k)})\) into (275) gives
The assumption \( \eta \le \frac{1}{L}\) implies that \( 1 - \frac{L}{2} \eta \ge \frac{1}{2}\) , and the proof is complete.
This suggests that, for \( L\) -smooth functions, a natural choice for the stepsize is \( \eta = \frac{1}{L}.\)
If \( f\) is lower bounded, the gradient descent lemma also implies that the gradients of the iterates \( x_k\) must eventually become small: indeed, if \( \frac{\eta}{2}\|\nabla f(x_k)\|^2\) stayed non-negligible over many iterates, then (274) would force the function of the values of the iterates to be arbitrarily small, which cannot happen for functions that are bounded below. This will be discussed in Section 9.4.4 (see Theorem 44). Note however that we have not yet assumed convexity of \( f\) and, without assuming convexity (or other suitable regularity conditions), guarantees of small gradients may be of limited use, because they do not necessarily imply that the associated function value is close to optimal. To see this, consider for example the function \( f(x) = \varepsilon \log(1+e^x)\) . The gradient of \( f\) satisfies \( \nabla f \le \varepsilon\) for all \( x \in \mathbb{R}^d\) . Hence, \( x\) could be arbitrarily far away from the optimum, while the associated gradient is nevertheless small.
With convexity we will be able to guarantee convergence of function values. To that end we first introduce a useful tool, the Euclidean mirror descent lemma.
Lemma 11 (Euclidean Mirror Descent Lemma)
Let \( f: \mathbb{R}^d \to \mathbb{R}\) be a differentiable and convex function. Then, for any choice of stepsize \( \eta\) and any two consecutive iterates \( x_k, x_{k+1}\) produced by gradient descent (271) it holds that
(276)
Proof
An easy calculation shows that
(277)
Since \( f\) is convex, we can employ the bound () and obtain that for any \( y \in \mathbb{R}^d\) ,
(278)
Substituting the gradient descent iteration rule \( x_{k+1} = x_k - \eta \nabla f(x_k)\) in (278) we obtain
(279)
Using (277), and rearranging terms gives
which is what we wanted to prove.
We will now use the Euclidean mirror descent lemma to obtain a convergence rate in terms of the objective function value.
Theorem 42
Let \( f : \mathbb{R}^d \to \mathbb{R}\) be convex with \( L\) -Lipschitz continuous gradient, and let \( x^* \in \arg\min_x f(x)\) . Assume we apply gradient descent with constant step size \( 0 < \eta\le \frac{1}{L}\) . Then, for all \( k \ge 1\) ,
Hence, the error in function value decreases at rate \( {\mathcal O}(1/k)\) .
Proof
Since \( x_{k+1} - x_k = \eta \nabla f(x_k)\) by definition of the gradient descent algorithm, we can rewrite the bound (276) as
(280)
We apply Lemma 10 and get
(281)
Plugging (281) into (280) yields
(282)
In particular, setting \( y=x^{*}\) gives
(283)
whenever \( \eta \le \frac{1}{L}\) . By summing over \( k=0,\dots,K-1\) and telescoping over the iterations, we obtain
(284)
Lemma 10 implies that \( f(x_k)\) is non-increasing in \( k\) , which implies that \( \sum_{k=0}^{K-1} f(x_{k+1}) \le K f(x^K)\) . Therefore, \( K f(x_K) \le K f(x^*) + \frac{1}{2\eta} \|x^*-x_0\|^2, \) from which we conclude \( f(x_K) - f(x^*) \le \frac{1}{2K\eta} \|x^*-x_0\|^2\) .
Can we improve Theorem 42 to obtain a statement at the level of the iterates, and not just at the level of the function values? I.e., can we obtain a result stating that \( \|x_k - x^*\|\) decreases at rate \( {\mathcal{O}}(1/k)\) ? Alas, without further assumptions this is not possible. As Nesterov has shown (see Theorem 2.1.7 in [164]), there exist convex \( L\) -smooth functions for which convergence via gradient descent to the optimal point may be arbitrarily slow.
One standard way to obtain the desired convergence rate bound at the level of the iterates \( x_k\) is by assuming in addition that \( f\) is strongly convex. Here, we take a slightly different approach by using a weaker assumption, namely the so-called {Polyak-Łojasiewicz} condition, introduced independently by Polyak [165] and Łojasiewicz [166].
Definition 26 ({Polyak-Łojasiewicz condition})
A lower-bounded function \( f: \mathbb{R}^d \to \mathbb{R}\) satisfies the {Polyak-Łojasiewicz} condition if there exists \( \mu > 0\) such that
We leave it as an exercise to show that strong convexity implies the {Polyak-Łojasiewicz} condition. However, the reverse is in general not true. Take for example the constant function \( f(x)=c\) for some constant \( c \in \mathbb{R}\) , which trivially satisfies the {Polyak-Łojasiewicz} condition, but is clearly not strongly convex. In fact, the {Polyak-Łojasiewicz} condition does not even imply convexity. As case in point, consider the function \( f(x) = x^2 + 3\sin^2(x)\) , which is obviously not convex, but can be shown to satisfy the {Polyak-Łojasiewicz} condition (with \( \mu = \frac{1}{32}\) ), see [167].
We need the following lemma in order to establish the sought-after convergence rate bound on the iterates.
Lemma 12
Let \( f: \mathbb{R}^d \to \mathbb{R}\) be an \( L\) -smooth function which is lower-bounded by \( {f_{\inf}}\) and which satisfies the {Polyak-Łojasiewicz} condition for some constant \( \mu > 0\) . Let the stepsize be given by \( \eta = \frac{1}{L}\) . Then, the \( k\) -th iterate \( x_k\) of gradient descent satisfies
(285)
Proof
Using the gradient descent lemma (Lemma 10) (for \( \eta = \frac{1}{L}\) ) and the {Polyak-Łojasiewicz} condition, we have
Subtracting \( {f_{\inf}}\) on both sides gives
Solving the recurrence completes the proof.
We are now ready to show that a function that satisfies the {Polyak-Łojasiewicz condition} must attain a minimum and that the iterates produced by gradient descent converge at a rate exponential in \( k\) .
Theorem 43
Let \( f: \mathbb{R}^d \to \mathbb{R}\) be an \( L\) -smooth function which is lower-bounded by \( {f_{\inf}}\) and which satisfies the {Polyak-Łojasiewicz condition} for some constant \( \mu > 0\) . Let the stepsize \( \eta\) satisfy \( 0 < \eta \le \frac{1}{L}\) . Then, the sequence of iterates \( x_k\) produced by gradient descent converges to some point \( x^* \in \mathbb{R}^d\) , with
(286)
Moreover, \( \lim_{k \to \infty} f(x_k) = f(x^*) = {f_{\inf}}\) .
Proof
For any \( k=0,1,2,\dots\) , we have
where the second line follows from Lemma 10 and the fourth line from Lemma 12.
For convenience, we denote \( q:=\Big(1-\frac{\mu}{L}\Big)\) . For any \( m < n\) ,
where the use of the geometric series formula is justified since \( 0 \le q < 1\) . Therefore, \( \|x_m - x_n\| \to 0\) as \( m,n\to \infty\) , which establishes that \( \{x_k\}\) is a Cauchy sequence. Since \( \mathbb{R}^d\) is complete, \( x_k\) converges to some \( x^* \in \mathbb{R}^d\) . Now, we set \( m=k\) , let \( n \to \infty\) and obtain
Squaring both sides gives
(287)
where the last line follows from the fact that \( \frac{1}{(1-\sqrt{q})^2} \le \frac{4}{q(1-q)^2}\) . Substituting back the definition of \( q\) in (287) yields the claimed bound in (287).
Note that Theorem 43 does not guarantee that the solution \( x^*\) is the unique minimizer, since the {Polyak-Łojasiewicz condition} is not strong enough for that. Now, if \( f\) is instead \( \mu\) -strongly convex (in addition to being \( L\) -smooth), then \( x^*\) is indeed the unique minimizer and we can tighten the convergence bound in (286) (see e.g. [164]) as follows:
(288)
Remark 27
Sequences of iterates \( \{x_k\}_{k=0}^\infty\) that converge satisfying
for some constant \( C\) are said to converge linearly, since the number of digits of precision increases linearly with iterations . Note that a convergence satisfying (288) corresponds to linear convergence with \( C = \sqrt{1-\frac{\mu}{L}}\) .
Some second-order methods, such as Newton’s method that involves Hessians, often converge quadratically in the sense that the error at each iteration is approximately proportional to the square of the error at the previous iteration, which in practice means that once the algorithm is close to the solution, the number of correct digits of precision roughly doubles with each iteration. The caveat is that these second-order methods come with much higher computational cost per iteration due to forming and inverting the Hessian.
We now turn to the behavior of gradient descent when the objective function \( f:\mathbb{R}^d \to \mathbb{R}\) is not convex. In this regime, the global convergence guarantees of the convex case no longer hold, since a nonconvex function may have multiple local extrema and saddle points. This is typically the case for cost functions employed in deep learning.
In principle, we did already briefly dive into the non-convex setting in the previous section when exploring the {Polyak-Łojasiewicz condition}. However, this assumption is still quite strong and often not fulfilled for optimization problems arising in data science. So, what are minimal assumptions we can build on in the non-convex setting that still give meaningful convergence statements about the stationarity of the iterates?
When a problem fails to be convex, some of our ideas, theorems, and methods may still apply “locally”. One way to do this is by focusing on “critical points”. Recall that a stationary point is a point where the gradient of a function vanishes. A first-order stationary point satisfies \( \nabla f(x^\ast) = 0\) , meaning the function is “locally flat”, although it may correspond to a minimum, maximum, or saddle point.
We again consider the gradient descent iteration
for a differentiable (possibly non-convex) function \( f\) . We make the following two standard assumptions:
(A1) \( f\) has an \( L\) -Lipschitz continuous gradient (is \( L\) -smooth).
(A2) \( f\) is bounded below: \( f(x) \ge f_{\inf} > -\infty, \, \forall x\in\mathbb{R}^d\) , where \( f_{\inf}:= \inf_{x} f(x)\) .
These assumptions are mild and are (locally) satisfied by many neural network loss functions in practice.
By the gradient descent Lemma (Lemma 10) we have for any step size \( 0 < \eta \le 1/L\) :
(289)
This inequality holds regardless of convexity. It shows that, as long as the step size is not too large, each iteration monotonically decreases the objective (unless \( \nabla f(x_k)=0)\) .
We can now establish convergence to stationary points.
Theorem 44
Suppose that \( f\) satisfies assumptions (A1) and (A2), and that gradient descent uses a constant step size \( 0 < \eta \le 1/L\) . Then:
The gradients vanish asymptotically:
Proof
Using assumption (A1), we can apply (289) and obtain
Summing over \( k=0,\dots,K-1\) and employing assumption (A2) gives
Thus the sum of gradient norms squared is finite:
In particular, \( \|\nabla f(x_k)\| \to 0\) as \( k \to \infty\) . Monotone bounded sequences \( \{f(x_k)\}\) converge; and by continuity of \( \nabla f\) , any accumulation point of \( \{x_k\}\) must satisfy \( \nabla f(x_\infty)=0.\)
The above theorem guarantees convergence to a point where \( \nabla f(x)=0\) , but not necessarily to a local minimum/maximum. However, for a number of high-dimensional problems (notably in deep learning), the set of strict saddle points is of measure zero under certain conditions [168, 169, 170]. Thus, in practice, gradient descent (especially with stochastic perturbations and careful parameter tuning) frequently avoids saddle points and converges to local minima. This seems to play a role in the practical success of gradient-based optimization in deep learning.
The proper choice of the stepsize plays a key role for the performance of gradient descent. We have seen that in the convex setting, a fixed stepsize (which must be sufficiently small to respect the Lipschitz constant), suffices. Although recent work has shown that improvements can be gained in the convex setting from variable stepsizes, see e.g. [171]. Conversely, in non-convex landscapes, the step size functions as a “tool for exploration”. While a small step size is necessary for fine-tuning near a solution, a larger or more dynamic step size is often required to provide the “numerical momentum” needed to escape shallow local minima and navigate past stagnant saddle points.
We previously mentioned that vanilla gradient descent can converge slowly, particularly in ill-conditioned problems where the objective function exhibits steep curvature in some directions and shallow curvature in others. In such cases, the algorithm may oscillate across narrow valleys while making little progress toward the optimum.
Momentum methods address this limitation by introducing a velocity variable that accumulates gradient information across iterations [172]. Rather than moving solely in the direction of the current gradient, the update incorporates a running average of past gradients, thereby smoothing the optimization trajectory and accelerating convergence along consistent descent directions.
The classical momentum method updates the velocity \( v_k\) and parameters \( x_k\) as
where \( \mu \in [0,1)\) is the momentum coefficient. Intuitively, the velocity acts as an exponentially decaying memory of past gradients. When successive gradients point in similar directions, their contributions reinforce one another, leading to larger effective steps. Conversely, oscillations in directions of high curvature are damped, improving stability.
Nesterov Accelerated Gradient (NAG) [173]—often referred to as Nesterov momentum—is a “look-ahead” modification designed to correct this behavior. Standard momentum is known in mathematical optimization as the “Heavy Ball” method: Think of a heavy ball rolling down a hill. It gains speed based on the current slope and its previous velocity. However, it does not know it should slow down until it has already started climbing the opposite side of the valley.
Nesterov momentum refines the momentum approach by computing the gradient at a look-ahead position rather than at the current parameters. Instead of evaluating \( \nabla f(x_k)\) , Nesterov momentum evaluates the gradient at the anticipated future position \( x_k + \mu v_k\) .
The update equations become
As a result, Nesterov momentum tends to reduce overshooting and often reaches the global minimum in fewer iterations (and the cost per iteration increases only slightly) compared to vanilla gradient descent, as illustrated in Figure 74.
From a theoretical perspective, Nesterov’s method achieves an improved convergence rate for convex optimization problems. We have seen that for smooth convex functions, standard gradient descent converges (in function values) at a rate of \( {\mathcal O}(1/k)\) (see Theorem 42). In comparison, Nesterov momentum achieves a rate of \( {\mathcal O}(1/k^2)\) under appropriate conditions. This improvement is significant and has made Nesterov momentum an cornerstone of modern optimization, particularly in large-scale data science and machine learning problems.
In practice, momentum coefficients are commonly set in the range \( \mu \in [0.9, 0.99]\) , while the learning rate \( \eta\) must still be tuned to the problem at hand. Nesterov momentum often yields faster and more stable convergence than classical momentum with minimal additional computational cost, as it requires only one gradient evaluation per iteration.
Both momentum and Nesterov acceleration are foundational ideas that underpin more advanced adaptive optimization algorithms, such as Adam [174] or AdaGrad [175] which are often used in high-dimensional, non-convex settings.
Subgradient descent is the most straightforward extension of gradient descent to non-smooth functions, such as the \( \ell_1\) -penalty used in compressive sensing (see Chapter 16) or the nuclear norm in low-rank matrix recovery (see Chapter 17).
The idea is straightforward: Replace the gradient \( \nabla f(x)\) with any subgradient \( g \in \partial f(x)\) . But because the subgradient does not necessarily point in a descent direction, the objective value can fluctuate during iterations. This often results in rather slow convergence. For a general convex function, the converges rate is \( \mathcal{O}(1/\sqrt{k})\) , which means one needs \( \mathcal{O}(1/\varepsilon^2)\) iterations to reach an accuracy of \( \varepsilon\) .
For example, when used in connection with the sparsity-promoting \( \ell_1\) -penalty, subgradient descent rarely produces exactly sparse iterates during the process; sparsity emerges only asymptotically. That is, coefficients will be very small but not exactly zero. Therefore, other methods such as proximal methods or Riemannian manifold optimization (see Section 17.7 for both) are usually preferable in practice.
Stochastic Gradient Descent (SGD) is a variant of gradient descent that updates the parameters using a randomly selected subset of data points (often just a single data point) instead of the entire dataset. This makes SGD more computationally efficient and allows it to escape local minima more easily. Note, however, that even for very small \( \eta\) , the update (271) is no longer guaranteed to reduce the value of the loss function. After all, we have traded the mean for one sample. Hence, as Higham and Higham [176] point out, the term “stochastic gradient descent” is a bit of a misnomer, and it would be more correct to call it just “stochastic gradient”. Alas, we will be more sloppy than [176] and will keep using the term stochastic gradient descent.
In the standard gradient descent algorithm, the gradient is computed as
where \( f_i(x)\) represents the error at the \( i \) -th data point.
In contrast, SGD updates the parameters using the gradient computed from a single randomly selected data point \( (x_i, y_i) \) :
Here, the gradient is an unbiased estimate of the true gradient, which introduces noise into the optimization process. The noise introduced by stochastic sampling in SGD can have both positive and negative effects. On the one hand, noise can help the algorithm escape local minima by introducing random perturbations to the parameters. On the other hand, excessive noise can hinder convergence and lead to suboptimal solutions.
We can gain some valuable insight into the rate of convergence of SGD in the linear setting by exploiting a useful connection to the randomized Kaczmarz method [177]. Indeed, for linear systems, SGD is essentially equivalent to randomized Kaczmarz, as we will demonstrate below.
Consider a (possibly overdetermined) system of linear equations
(290)
where \( A \in \mathbb{R}^{m \times n}\) and \( b \in \mathbb{R}^m\) . We write the rows of \( A\) as \( a_1^T,\dots,a_m^T\) , so the system is
The Kaczmarz method [178] iteratively projects the current iterate onto the solution hyperplane of one equation
where the row index \( i\) is chosen cyclically or deterministically. Geometrically, each step is an orthogonal projection onto the hyperplane \( H_i = \{x : \langle a_i, x\rangle = b_i\}\) .
The randomized Kaczmarz method selects the row index \( i\) at random, with probability
(291)
where \( \|A\|_F^2 = \sum_{j=1}^m \|a_j\|^2\) .
The update is
Now, let us consider the same problem as a least-squares minimization task. We want to minimize the objective function
In SGD, instead of computing the gradient of the entire sum, we pick one component \( f_i(x) = \frac{1}{2} (\langle a_i, x\rangle - b_i)^2\) at random and update \( x\) using its gradient
The SGD update rule with learning rate \( \eta_k\) is
By comparing the two update formulas, the equivalence becomes clear:
If we choose a specific step size for SGD such that \( \eta_k = \frac{1}{\|a_i\|^2}\) , the two methods become identical, cf. also [179].
The convergence rate of classical (deterministic) Kaczmarz method is highly sensitive to the ordering of the rows. If the rows are highly correlated, the projections move the estimate in very small increments, significantly slowing down the convergence rate. Randomization comes to our rescue. Indeed, the randomization in picking the rows during the iterations of the Kaczmarz method can dramatically improve convergence guarantees as the following theorem shows, see also [177].
Theorem 45
Let \( Ax = b\) be consistent, and let \( x^*\) be the unique solution in \( \mathrm{range}(A^T)\) . Then the randomized Kaczmarz method converges in expectation, with the average error
where \( \sigma_{\min}(A)\) is the smallest nonzero singular value of \( A\) .
Thus, the convergence rate is linear (exponential) in expectation. We note that the expression \( \|A\|_F/\sigma_{\min}(A) = \|A\|_F \|A^{-1}\|:= \tilde{\kappa}(A)\) is also known as the scaled condition number, introduced by Demmel in [180].
Proof
We have
(292)
Using the fact that \( \|A\|_F^2=\sum_{j=1}^m \|a_j\|^2\) we can write (292) as
(293)
The main point of the proof is to view the left hand side in (293) as an expectation of some random variable. Namely, recall that the solution space of the \( i\) -th equation of (290) is the hyperplane \( \{y : \langle y, a_i \rangle = b_i \}\) , whose normal is \( \frac{a_i}{\|a_i\|}\) . Define a random vector \( Z\) whose values are the normals to all the equations of (290), with probabilities as in our algorithm:
(294)
Then (293) says that
(295)
The orthogonal projection \( P\) onto the solution space of a random equation of (290) is given by \( P z = z - \langle z - x, Z \rangle \, Z\) .
Now we are ready to analyze our algorithm. We want to show that the error \( \|x_k - x\|^2\) reduces at each step in average (conditioned on the previous steps) by at least the factor of \( (1 - \tilde{\kappa}(A)^{-2})\) . The next approximation \( x_k\) is computed from \( x_{k-1}\) as \( x_k = P_k x_{k-1}\) , where \( P_1, P_2, …\) are independent realizations of the random projection \( P\) . The vector \( x_{k-1} - x_k\) is in the kernel of \( P_k\) . It is orthogonal to the solution space of the equation onto which \( P_k\) projects, which contains the vector \( x_k - x\) (recall that \( x\) is the solution to all equations). The orthogonality of these two vectors then yields
To complete the proof, we have to bound \( \|x_{k-1} - x_k\|^2\) from below. By the definition of \( x_k\) , we have
where \( Z_1, Z_2, …\) are independent realizations of the random vector \( Z\) . Thus
Now we take the expectation of both sides conditional upon the choice of the random vectors \( Z_1, …, Z_{k-1}\) (hence we fix the choice of the random projections \( P_1, …, P_{k-1}\) and thus the random vectors \( x_1, …, x_{k-1}\) , and we average over the random vector \( Z_k\) ). Then
By (295) and the independence,
Taking the full expectation of both sides, we conclude that
We complete the proof by induction.
The randomized Kaczmarz method can also be cast as an iterative sketching method, see [181].
Stochastic gradient descent with importance sampling: We have seen that in the randomized Kaczmarz algorithm, rows are typically sampled with probability proportional to \( \|a_i\|^2\) . In the realm of SGD, this corresponds to importance sampling, which helps to reduce the variance of the stochastic gradient estimate [179]. See also Figure 75, which demonstrates how importance sampling—choosing training examples based on their“influence”—can accelerate convergence (training of a linear model) compared to standard uniform sampling. We consider a dataset with \( m = 1000\) samples and \( n = 100\) features. To simulate a “real-world” scenario, such as in sensor networks, where some data points are more informative than others, we scale the feature vectors (rows of \( A\) ) such that their squared norms \( \|a_i\|^2\) vary across two orders of magnitude. We then generate a consistent target vector \( b = Ax_{\text{true}}\) . For vanilla SGD (i.e., vanilla Kaczmarz) at each iteration, a single sample \( (a_i, b_i)\) is chosen with uniform probability \( 1/m\) . This represents the standard approach in most deep learning frameworks. For SGD with importance sampling (i.e., randomized Kaczmarz with (291)), samples are selected with probability \( P(i) = \|a_i\|^2 / \|A\|_F^2\) . This strategy prioritizes samples that have a larger gradient magnitude, effectively spending more “computational effort” on the most impactful data points. The convergence plot, cf. Figure 75, illustrates the significant speedup enabled by importance sampling. The point of this experiment is to illustrate the potential gain in convergence speed. A full comparison would also need to include the computational cost of calculating the norms of all the rows \( a_i\) for SGD with importance sampling.
Exercise 88
Show that optimization problem (116) remains mathematically unchanged if the constraints \( x\in\{\pm1\}^n\) are replaced by \( -1\leq x_i\leq 1\) (for all \( 1\leq i\leq n\) ).
Exercise 89
Prove that if \( f\) is continuously differentiable, convexity is equivalent to the first-order condition
Exercise 90
Show that strong convexity implies the {Polyak-Łojasiewicz condition}.
Exercise 91
This concerns the second claim in Theorem 34. Prove that if the function \( f\) is strictly convex, then the global minimum is unique.
Exercise 92
Prove that if \( f\in C^2\) and the Hessian \( \nabla^2 f\) is positive definite, then \( f\) is strictly convex.
Exercise 93
Show that the \( L\) -Lipschitz condition is equivalent to the notion of \( L\) -smoothness.
Exercise 94
Show that the general linear program (234) is equivalent to the linear program (sometimes called linear program in standard form):
where \( \tilde{A}\) and \( \tilde{b}\) are properly augmented versions of \( A\) and \( b\) , respectively.
(Hint: decompose \( x\) into \( x=x^{+} - x^{-}\) , where \( x^{+}, x^{-} \ge 0\) , and introduce slack variables.)
Exercise 95
Prove Theorem 39
Exercise 96
Consider the problem
Show that Slater’s condition fails in this case.
Exercise 97
Consider the problem
Show that the KKT conditions fail in this case.
Exercise 98
Consider the problem
where the matrix \( A \in \mathbb{R}^{n\times n}\) is symmetric, but not positive definite, and \( b\in \mathbb{R}^n\) . Thus this is not a convex problem. Show that strong duality nevertheless holds in this case.
Exercise 99
Consider the absolute value function \( f(x) = |x|\) for \( x \in \mathbb{R}\) . If we perform subgradient descent with a constant step size \( \eta\) on \( f(x)\) , starting at \( x^{(0)} = 0.5\eta\) , show that the iterate will “oscillate” across the origin rather than staying at the sparse solution \( x=0\) .
Exercise 100
Find the dual problem for the entropy maximization problem:
with domain \( {\mathcal D} = \mathbb{R}^n_+\)
Exercise 101
Consider the optimization problem
with variables \( x,y\) and domain \( {\mathcal D} = \{(x,y) \, | \, y >0\}\) .
(a) Verify that this is a convex optimization problem. Find the optimal value.
(b) Give the Lagrange dual problem, and find the optimal solution \( \lambda^*\) and optimal value \( d^*\) of the dual problem. What is the optimal duality gap?
(c) Does Slater’s condition hold for this problem?
Exercise 102
Let
where \( A \in \mathbb{R}^{d \times d}\) is symmetric positive definite.
(a) Show that gradient descent converges linearly if
(b) Express the convergence rate in terms of the condition number
Exercise 103
(Euclidean projection onto the probability simplex.) For some probabilistic data science applications, we require that each of our data points is a discrete probability distribution (i.e., the components are positive and sum to 1). Namely, each point \( x\) should belongs to the probability simplex
However, when a data point is not in such a probability simplex we may need to project the data onto this space. For a given vector \( z\in\mathbb{R}^{n}\) , the projection onto the probability simplex is the solution of
(296)
Show from the stationarity condition that
Explain how complementary slackness implies that \( \lambda_i = \max\{\,\nu-z_i,\,0\}\) .
Exercise 104
Consider the function \( f(x,y)=10x^2+y^2\) . This is a “narrow valley” potential (or a ridge, from which the name “ridge regression” is derived). We want to solve \( \min f(x,y)\) via gradient descent (pretending we do not know that the solution is obviously \( (0,0)\) ).
(a) Compare the convergence path and the number of iterations needed to reach \( \|\nabla f\| \le 10^{-4}\) for \( \eta = 0.01\) , \( \eta = 0.05\) , and \( \eta = 0.1\) .
(b) Apply Nesterov momentum with \( \eta = 0.01\) , \( \eta = 0.05\) , and \( \eta = 0.1\) , and compare your results to those in (a).
Exercise 105
(Farkas’ Lemma) Let \( A \in \mathbb{R}^{m \times n}\) and \( b \in \mathbb{R}^m\) . Prove that exactly one of the following two statements holds:
There exists \( x \in \mathbb{R}^n\) such that
There exists \( y \in \mathbb{R}^m\) such that
Hint Use a separating hyperplane argument.
Exercise 106
(Self-dual linear programs). Consider the linear program
where \( A \in \mathbb{R}^{n \times n}\) is skew-symmetric \( (A = -A^T)\) and \( b = -c\) .
(a) Derive the dual linear program and show that it is equivalent to the primal.
(b) Show that if the problem is feasible, then the primal and dual optimal values exist and are equal to zero.
(c) Prove that any primal feasible solution \( x\) and dual feasible solution \( y\) satisfy
(d) Let \( x^*\) be an optimal primal solution. By Parts (a) and (b), \( x^*\) is also dual feasible (with \( y = x^*\) ). Show that complementary slackness implies \( x^T A x = 0\) .
Exercise 107
Find the subdifferential of \( f(x) =\|x\|_p\) for \( p=2\) and \( p=\infty\) .
Exercise 108
The Geometric Median (also known as the Fermat point) of a set of points \( \{x_1, x_2, \dots, x_n\} \subset \mathbb{R}^d\) is defined as the point \( x\) that minimizes the sum of Euclidean distances
(a) Prove that the function \( g(x) = \|x - a\|_2\) is a convex function for any fixed \( a \in \mathbb{R}^d\) .
(b) Using the properties of convex functions, prove that the objective function \( f(x)\) for the geometric median is convex.
(c) Is \( f(x)\) strictly convex? Consider the case where all points \( x_i\) lie on a single line.
(d) Compute the gradient \( \nabla f(x)\) for \( x \notin \{x_1, \dots, x_n\}\) . Set the gradient to zero to find the optimality condition. Express the optimal solution \( x^*\) as a weighted average of the points \( x_i\) .
(e) Explain why this expression is not a “closed-form” solution in the same sense as the arithmetic mean \( \bar{x} = \frac{1}{n}\sum x_i\) . (Hint: Look at where \( x^*\) appears in your equation).
Exercise 109
(Optimal power allocation and the water-filling algorithm.) In communication systems, we often want to allocate a fixed amount of power \( P\) across \( n\) independent channels to maximize the channel capacity. If the noise level in channel \( i\) is represented by \( \alpha_i\) , and we allocate power \( x_i\) , the capacity is proportional to \( \log(1 + x_i/\alpha_i)\) . Maximizing this is equivalent to the following convex problem
For this exercise, we normalize the total power to \( P=1\) .
Show that the optimal power allocation \( x_i^*\) must satisfy:
where \( \eta = 1/\nu\) (often called the “water level”).
Assume you have \( n = 6\) channels with the noise profile
Solve the optimization problem using CVX (in Matlab) or CVXOPT (Python). Plot the results using a bar chart: (i) Plot the noise levels \( \alpha_i\) as the base of the bars; (ii) Plot the allocated power \( x_i\) on top of the noise levels; (iii) Draw a horizontal line representing the resulting “water level” \( \eta\) .
Classification is a fundamental task in data science and machine learning which arises in a wide range of applications, including medical diagnosis, finance, computer vision, text analysis, and scientific data analysis. Patient data (symptoms, lab results, imaging features) are classified to predict the presence or absence of a disease; tumors are classified as benign or malignant based on imaging or genomic features. Loan applicants are classified as low-risk or high-risk based on financial history and demographic features. Images are classified according to the object they contain (e.g., bicycle vs. car). News articles are classified into categories such as politics, sports, technology, or finance. In the area of protein folding, classification models identify the functional category of a protein based on its amino acid sequence, which is essential for drug discovery. In each case, the objective is to assign observations to a finite set of categories based on measured features.
While clustering and classification share the fundamental objective of partitioning the feature space, they have essential differences: In clustering, which falls in the realm of unsupervised learning, the goal is to discover structure (groups) in unlabeled data. In classification, which falls in the realm of supervised learning, the goal is to assign data points to known groups using labeled examples. Clustering is primarily descriptive: it uses optimization to tell us about the structure of the current dataset. Classification is predictive: it uses optimization to create a rule that generalizes to unseen data.
In this chapter we study two central approaches to classification:
Both methods lead to convex optimization problems and play a central role in modern data science.
Deep learning based classification, which has emerged as the dominant technique for large scale datasets, will be discussed in Chapter 11.
We begin our exploration of classification (or discrimination) with the special but very important and instructive case of binary classification: Given labeled data \( \{(x_i,y_i)\}_{i=1}^n\) where the data \( x_i \in \mathbb{R}^d\) and the binary labels \( y_i\) are usually represented by \( \{-1,+1\}\) , the goal is to learn a rule that predicts the label \( y\) of a new observation \( x\) .
In a nutshell, a linear classifier is one whose decision boundaries are linear. Formally, a linear classifier is defined by parameters \( (w,b) \in \mathbb{R}^d \times \mathbb{R}\) and the decision rule
The decision boundary
is a hyperplane that separates the input space into two half-spaces. Learning a classifier thus amounts to choosing \( w\) and \( b\) so that points with different labels lie on different sides of this hyperplane.
Figure 76 shows a simple example of two sets of points and two possible choices of linear classifiers (hyperplanes) that classify the two sets. Which hyperplane shall we choose among the potentially infinitely many candidates? Is there an optimal choice? If so, how can we find it?
Logistic Regression, which has some of its roots in the works of Verhulst [185], Berkson [186] and Cox [182], is one of the most popular algorithms for (binary) classification problems. While the name contains “regression,” it is fundamentally a tool for estimating the probability that an input belongs to a specific category.
We start by considering a random variable (the binary label) \( y\in \{0,1\}\) , with \( \mathbb{P}(y=1) = p\) and \( \mathbb{P}(y=0) = 1-p\) , where \( p \in [0,1]\) . The probability \( p\) is assumed to depend on one or more explanatory variables, represented by the vector \( x \in \mathbb{R}^n\) . For instance, let us say we want to predict whether a patient has a certain disease (\( y=1\) ) or not (\( y = 0\) ). The probability of having this disease is \( q\) , which is modeled as being based on explanatory variables such as age, gender, weight, blood pressure, temperature, collected in the vector \( x.\)
In linear regression, we model the output as a linear combination of inputs
However, \( z\) can range from \( -\infty\) to \( +\infty\) , making it unsuitable for representing a probability, which must be constrained to the interval \( [0, 1]\) .
To map the linear predictor to a probability space, we use the logistic sigmoid function \( \sigma(z) = (1 + e^{-z})^{-1}\) . This gives
Logistic regression can be viewed as a linear model for the log-odds (logit) of the probability \( p\) . If \( p = \mathbb{P}(y=1|x)\) , the odds are defined as \( p/(1-p)\) . An easy calculation shows that taking the natural logarithm gives
This reveals that the decision boundary (where \( p=0.5\) ) is the hyperplane defined by \( w^T x + b = 0\) .
Unlike linear regression, which uses ordinary least squares, the parameters \( w\) and \( b\) in logistic regression are typically estimated using Maximum Likelihood Estimation. Assuming the observations are independent and identically distributed (i.i.d.), the likelihood function for \( n\) observations is
Maximizing the likelihood is equivalent to minimizing the negative log-likelihood,
which is also known as the logistic loss or cross-entropy loss.
It is not difficult to see that \( J(w)\) is a convex function. As a result, logistic regression admits a unique global minimizer (up to degeneracies in the data) and can be solved efficiently using first-order or second-order optimization methods, such as gradient descent or Newton’s method.
The gradient of the loss is remarkably elegant
This gradient resembles the one found in linear regression, though the underlying hypothesis is non-linear.
In the basic logistic regression model, if the data is linearly separable, the optimization algorithm will try to drive the weights \( w\) toward infinity. This is so, since a larger \( \|w\|\) makes the sigmoid function \( \sigma(w^T x + b)\) steeper, pushing the predicted probabilities closer to \( 1\) or \( 0\) . This leads to overfitting and the model becomes sensitive to small fluctuations in the training data. It also can lead to numerical instability and to “exploding” gradients.
There are several pathways to address this problem. To derive the regularized version, we can for instance treat \( w\) not as a fixed parameter to be found, but as a random variable with a prior distribution. This is known as Maximum A Posteriori (MAP) estimation.
Here, we assume a Gaussian prior on the weights \( w\) centered at zero, namely \( w \sim {\mathcal N}(0,\eta^2 I)\) . However, we do not place any prior on \( b\) . We can express this “flat” prior on \( b\) as \( b \sim {\mathcal N}(0,\gamma^2)\) , where \( \gamma \to \infty\) (this is sometimes written as \( b \sim {\mathcal N}(0,\infty)\) ).
According to Bayes’ Theorem [187, Chapter 7.2.3], the posterior probability of the weights \( w\) given the data \( x\) is
(297)
where \( \pi(y | x, w,b)\) is the standard likelihood function used in basic logistic regression. Colloquially, (297) is
To find the MAP estimate, we maximize the log-posterior
where \( C\) is a constant independent of \( w\) .
Substituting the “flat” prior for \( b\) , we have \( \log \pi(b) = - \frac{b}{2\gamma^2} + C\) , which gives \( \log \pi(b) \to 0\) as \( \gamma \to \infty\) .
We now substitute the Gaussian prior for \( w\) and obtain
Thus, by flipping the sign to convert this into a minimization problem, we arrive at the \( \ell_2\) -regularized objective
where the regularization parameter \( \lambda > 0\) controls the trade-off between fitting the data and keeping the weights small.
The \( \ell_2\) -term \( \|w\|^2\) is strictly convex. Adding a strictly convex function to a convex function results in a strictly convex objective. Hence, for \( \lambda>0\) , the objective is strictly convex and thus has a unique minimizer, even in the presence of data degeneracies. It also makes the objective strongly convex, which greatly improves convergence of gradient descent (see Chapter 9).
Note that logistic regression outputs probabilities and not binary decisions. Thus, strictly speaking, logistic regression by itself is not a classifier. Logistic regression produces a score
which is interpreted as an estimated posterior probability. Classification is then typically performed by applying the decision rule
for a particular choice of \( \tau \in [0,1]\) to the output of logistic regression. This is equivalent to a (\( \tau\) -dependent) linear decision boundary
which defines a hyperplane separating the two classes. Thus, logistic regression is a linear classifier, although it differs from margin-based methods such as support vector machines in its objective and interpretation.
But how shall we choose the threshold \( \tau\) ? While it seems natural and tempting to set \( \tau = \frac{1}{2}\) , it is not clear that this would be the best choice. Lowering the threshold typically reduces false negatives while increasing false positives, and raising it has the opposite effect. So how shall we go about choosing \( \tau\) ? This question deserves some consideration, and is directly related to a bigger question, namely how should we evaluate a supervised learning classifier? We take a brief interlude and explore this question in the next section.
The confusion matrix provides a simple way to shed some light on the performance of an algorithm’s predictions against the actual ground truth for binary classification. It breaks down the predictions into four categories:
| Predicted | |||
| Positive | Negative | ||
| Positive |
True Positive (TP) |
False Negative (FN) |
|
| Negative |
False Positive (FP) |
True Negative (TN) |
|
Let us take this opportunity to introduce a few more terms that are often used in practice when evaluating the performance of a classifier. Sensitivity (true positive rate) is the probability of a positive test result, conditioned on the individual truly being positive. Specificity (true negative rate) is the probability of a negative test result, conditioned on the individual truly being negative. False positives, i.e., negative instances incorrectly predicted as positive are also referred to as Type I error, while false negatives, i.e., positive instances incorrectly predicted as negative are called Type II error.
From the counts appearing in the confusion matrix, several frequently used metrics can be derived:
(298)
To visualize the tradeoff between True Positive Rate (TPR) and the False Positive Rate (FPR) as a function of the threshold, one commonly uses the Receiver Operating Characteristic (ROC) curve , see also Figure 77. A random classifier produces a diagonal line (gray line), while a useful classifier lies above this line (blue curve), and a perfect classifier reaches the top-left corner \( (0,1)\) (red curve).
The Area Under the Curve (AUC) summarizes the ROC curve as a single number. If AUC=1, we have perfect class separation, while AUC=0.5 corresponds to random guessing. The AUC can be interpreted as the probability that the classifier assigns a higher score to a randomly chosen positive sample than to a randomly chosen negative sample.
In situations with class imbalance, the ROC curve can be misleading. The Precision–Recall (PR) curve may be preferable in that case. It plots Precision versus Recall (both are defined in (298)) across thresholds. As such, it highlights performance on the positive class, which is critical in rare-event detection (e.g., fraud, disease diagnosis).
So, where does that leave us regarding how to choose the threshold \( \tau\) for logistic regression, the question that triggered this excursion into evaluation of classifiers? The ROC curve does not determine a unique decision threshold \( \tau\) . The default choice \( \tau = 0.5\) is appropriate when class priors are approximately equal and false positives and false negatives have about equal cost. It is often used as a baseline, but rarely optimal in practice. Maximizing the F1 score is a pragmatic way to select a threshold when the impact of different error types is unknown [188]. Another frequently used choice is to pick the \( \tau\) that minimizes the distance to the top-left corner \( (0,1)\) (the optimal point of a perfect classifier), i.e.,
which treats false positives and false negatives symmetrically.
Ultimately, the threshold is a decision parameter, not a model parameter. As such, the “right” choice of \( \tau\) depends on the application-specific trade-off between false positives and false negatives.
A natural idea to construct a linear classifier would be to find an affine function that approximately classifies the points such that one minimizes the number of points misclassified. However, this is in general a computationally infeasible combinatorial optimization problem. One heuristic to circumvent the computational hardness is to instead try to maximize a “gap” between classes, relying only on a critical subset of points called Support Vectors. Support Vector Machines (SVMs) [183] thus represent a shift from the probabilistic perspective of Logistic Regression to a geometric perspective. An important property of support vector machines is that the determination of the model parameters corresponds to a convex optimization problem (as was also the case for logistic regression).
Consider a linearly separable dataset \( \{(x_i, y_i)\}_{i=1}^n\) where \( y_i \in \{-1, 1\}\) . We seek a hyperplane defined by \( w^T x + b = 0\) that separates the two classes.
Let us first determine the distance from a point \( x_i\) to this hyperplane. We can decompose \( x_i\) as
where \( x_i^*\) is the orthogonal projection of \( x_i\) onto the hyperplane (so \( w^T x_i^* + b = 0\) ), and \( r\) is the signed distance – positive if \( x_i\) is on the same side as \( w\) , negative on the other side. We want to find \( r\) . Since \( x_i^* = x_i - r\frac{w}{\|w\|}\) lies on the hyperplane
which, after some basic linear algebra, can be written as
Hence, the signed distance from \( x_i\) to the hyperplane, measured along \( w/\|w\|\) , is \( r\) . Its magnitude is the geometric (unsigned) distance.
Now let us incorporate the label \( y_i\) to get a signed margin. The expression \( r = (w^T x_i + b)/\|w\|\) is positive when \( x_i\) is on the \( w\) -side of the hyperplane and negative on the other side. If \( y_i = +1\) , then \( x_i\) should be on the positive side, so \( w^T x_i + b > 0\) , and \( r > 0\) . If \( y_i = -1\) , then \( x_i\) should be on the negative side, so \( w^T x_i + b < 0\) , and \( r < 0\) .
In both cases, \( y_i \cdot r > 0\) . Multiplying by \( y_i\) therefore flips the sign for negative-class points, making every correctly classified distance positive, giving
The goal of the SVM is to maximize the margin \( \gamma\) , which is the distance to the nearest point, see also Figure 78.
For convenience, we scale \( w\) and \( b\) such that the nearest points satisfy \( y_i(w^T x_i + b) = 1\) . This is called canonical scaling in the SVM literature and the expression \( y_i(w^T x_i + b)\) is also called functional margin. Without loss of generality we can set this quantity to unity, since the direction of the hyperplane is unchanged when we scale both \( w\) and \( b\) by the same factor. The margin then becomes \( 1/\|w\|\) .
Maximizing \( 1/\|w\|\) is equivalent to minimizing \( \frac{1}{2}\|w\|^2\) :
(299)
To solve the constrained optimization, we use the method of Lagrange multipliers, as described in Chapter 9.3. The Lagrangian becomes
where \( \alpha_i \geq 0\) are the Lagrange multipliers.
Setting the partial derivatives of \( \mathcal{L}\) with respect to \( w\) and \( b\) to zero gives
Substituting these back into the Lagrangian yields the dual objective
(300)
By the KKT Complementary Slackness condition (265),
This equation dictates exactly which points “exist” in the final model. To see this, note that based on this KKT condition, all training points \( x_i\) fall into two mutually exclusive categories:
Non-Binding Constraints (the “disappearing” points): If a point \( x_i\) lies strictly outside the margin, then its margin is greater than 1, i.e.,
For the product in the KKT condition to be zero, the Lagrange multiplier must be
Looking at the formula for the weight vector,
(301)
we see that these points make no contribution to the sum. If one were to remove these points from the dataset and retrain the model, the resulting hyperplane would remain identical. In the context of complementary slackness (cf. Chapter 9.3.3), we also refer to such data points as having “slack”.
Binding Constraints (the support vectors): If a point \( x_i\) lies exactly on the margin, then
In this case, the constraint is active, and \( \alpha_i\) can be non-zero (\( \alpha_i > 0\) ). These are the support vectors: they are the only points that “support” the hyperplane.
Let \( S = \{i : y_i(w^T x_i + b) = 1\}\) be the set of indices of the support vectors and denote the optimal weight vector by \( w^*\) . We can rewrite the summation (301) as
Thus, \( w^*\) is a linear combination of only the support vectors.
We summarize this insight in the following theorem:
Theorem 46 (Sparsity of the SVM)
The optimal weight vector \( w^*\) of a Support Vector Machine is determined solely by the subset of training points for which the canonical functional margin is exactly \( 1\) .
Figure 79 illustrates SVM in action. Depicted are a linearly separable data set, the separating hyperplane computed by solving (299), the associated maximal margin and the support vectors.
In real-world data, classes often overlap. To accommodate a trade-off between the margin (the distance between the two critical hyperplanes) and the classification error on the training set, we introduce slack variables \( \xi_i \geq 0\) that allow points to be on the “wrong side” of the margin. Under this soft-margin constraint, the primal problem takes the form
This is a convex quadratic program with linear constraints. Here, \( \mu\) is a hyperparameter that controls the trade-off between maximizing the margin and minimizing classification errors. In the limit \( \mu \to \infty\) , we will recover the earlier hard-margin support vector machine.
The goal of the soft-margin SVM is to find a classifier that balances margin maximization and training errors, yielding robustness to noise and better generalization. Soft-margin SVM is also more robust to outliers, since it prevents a single anomalous data point from dictating the entire boundary.
It is instructive to rewrite the soft-margin SVM as an unconstrained optimization problem. To that end, we first express \( \xi_i\) solely in terms of \( w, b\) , and the data. From the constraints, we see that if the point is correctly classified and outside the margin (\( y_i(w^T x_i + b) \geq 1\) ), the smallest possible \( \xi_i\) that satisfies the constraints is \( 0\) . On the other hand, if the point violates the margin (\( y_i(w^T x_i + b) < 1\) ), the smallest \( \xi_i\) that satisfies the first constraint is \( 1 - y_i(w^T x_i + b)\) . This can be written concisely as
By substituting the expression for \( \xi_i\) back into the primal objective, we get
The term \( \max(0, 1 - z)\) is known as the hinge loss. It is called “hinge” because of its shape: it is flat (zero) for values \( \ge 1\) and increases linearly for values \( <1\) . As the hinge loss is an upper bound on the 0-1 indicator loss (misclassification count), minimizing the SVM objective provides a convex surrogate for minimizing classification error.
Logistic regression can also be considered as a variant of the SVM where the hinge function \( \max(0,1 - z)\) is replaced with the (smooth and convex) logistic function \( \ln(1 + e^{-z})\) . Because the hinge loss is exactly zero for points far from the boundary, the gradient is also zero for those points. This is why SVMs are sparse (only support vectors matter). But unlike the logistic loss, the hinge loss is not differentiable at the “elbow” (where \( y_i(w^T x_i +b)=1\) ). In practice, we use sub-gradient descent to solve this.
Figure 81 shows a comparison between logistic regression and soft-margin SVM. As we can see, the methods produce somewhat different decision boundaries. In logistic regression every point has a non-zero influence on the gradient because the sigmoid derivative is never exactly zero. In contrast, in SVM, once a point is correctly classified and beyond the margin, its gradient becomes exactly zero.
The SVMs we discussed so far are limited to datasets that are (approximately) linearly separable. However, for many real-world datasets this may not be the case. We can address this by mapping the input features \( x \in \mathbb{R}^d\) into a higher-dimensional feature space via a non-linear mapping function \( \Phi(x)\) with the aim that in this higher-dimensional space, a linear separation may become possible.
However, if we perform the mapping \( \Phi(x)\) explicitly, we face a major computational challenge. Indeed, if we want to work in a high-dimensional space, the SVM dual objective requires us to compute the inner product of these transformed vectors. Thus, the kernel-analog of (300) takes the form
(302)
In high dimensions calculating \( \Phi(x_i)\) and then the inner product \( \langle \Phi(x_i), \Phi(x_j)\rangle\) for every pair of points is computationally impossible.
The kernel trick introduced in Chapter 7.5, comes to our rescue: We can simply replace the inner product \( \langle \Phi(x_i), \Phi(x_j) \rangle\) in (302) with the kernel function \( K(x_i, x_j)\) . We are now effectively computing the boundary in a high-dimensional space while only performing simple arithmetic in the original low-dimensional space. This modification of SVM is referred to as kernel SVM [189, 190]. The Gaussian kernel \( K(x,x') = \exp (-\|x-x'\|^2/2\varepsilon)\) is a common default choice for kernel SVM.
Binary classification addresses problems with only two possible outcomes. However, many practical and scientific applications naturally involve multiple classes, making multiclass classification essential. Indeed, in many domains, categories are inherently multi-valued, such as medical diagnosis with multiple disease categories, object recognition (car, pedestrian, bicycle,...), or document topic classification (politics, sports, technology,...).
While binary logistic regression uses the sigmoid function to map a score to a probability, multiclass logistic regression (also known as Softmax Regression) generalizes this by using the Softmax function.
For \( K\) classes, we maintain \( K\) separate weight vectors \( \{w_1, w_2, \dots, w_K\}\) . For a given input \( x\) , the probability that it belongs to class \( k\) is
(303)
where the function on the right-hand side in (303) is also known as softmax function.
The denominator ensures that \( \sum_{k=1}^K \mathbb{P}(y=k \mid x) = 1\) , creating a valid probability distribution. The optimization objective generalizes to the categorical cross-entropy loss
Here, the indicator \( \mathbf{1}\{y_i = k\}\) is the “multiclass version” of the \( y\) and \( (1-y)\) used in binary logistic regression, which equals 1 if the true class of the \( i\) -th sample is \( k\) , and it equals 0 otherwise. \( W\) is a matrix where each column (or row) corresponds to the weight vector \( w_k\) for class \( k\) . The decision rule consists of predicting the class with the highest probability: \( \hat{y} = \arg\max_k \mathbb{P}(y=k \mid x)\) .
Unlike logistic regression, the SVM objective does not naturally produce a probability distribution across multiple classes. Instead, SVMs use meta-strategies to decompose the multiclass problem into multiple binary problems [191].
One such strategy is called “one-vs-all,” this is the most common approach. The strategy consists of training \( K\) separate binary SVMs. For each class \( k\) , we train a classifier where class \( k\) is the positive label (\( +1\) ) and all other classes are the negative label (\( -1\) ). For the prediction step we calculate the decision function \( f_k(x) = w_k^T x + b_k\) for all \( K\) classifiers. The input is assigned to the class with the highest (most positive) score. However, this approach comes with the drawback that the individual classifiers are trained on imbalanced datasets (one class vs. all other classes).
This issue can be mitigated by considering a “one-vs.-one” strategy. There, one trains a binary SVM for every possible pair of classes. This results in \( K(K-1)/2\) classifiers. The prediction is done via a “majority vote”: Each classifier performs a “vote.” If the SVM for class 1 vs. class 2 chooses class 1, then class 1 gets a point. The class with the most votes wins. This strategy has the benefit that each binary problem is smaller and more balanced, and it has the obvious downside that it is computationally more intense.
In this section, we develop a systematic connection between geometric measures of complexity and generalization guarantees for SVMs. We show how Rademacher complexity provides a natural measure that leads directly to margin-based risk bounds [192, 193, 194]. In a nutshell, Rademacher complexity is a measure of the richness of a class of (binary or real-valued) functions with respect to a probability distribution.
Let us start with a thought experiment . Suppose there is an unknown distribution \( {\mathcal D}\) from which we draw \( m\) i.i.d. samples \( S = \{(x_1, y_1), \dots, (x_n, y_n)\}\) . Let \( \ell\) be a given loss function and let \( {\mathcal C}_S(f)=\frac{1}{n} \sum_{i=1}^n \ell(f(x_i), y_i)\) denote the associated empirical loss of a hypothesis \( f \in {\mathcal F}\) , where \( {\mathcal F}\) denotes a (possibly infinite) hypothesis class , and \( {\mathcal C}_{\mathcal D}(f) = \mathbb{E}_{(x,y) \sim {\mathcal D}} [\ell(f(x), y)]\) its true (population) loss. We can compute \( {\mathcal C}_S(f)\) , but since \( {\mathcal D}\) is usually unknown, we cannot calculate \( {\mathcal C}_{\mathcal D}(f)\) directly. In order to establish a generalization bound, we aim to show that the discrepancy between these two quantities is small uniformly over all \( f \in {\mathcal F}\) .
To build intuition, consider the following experiment. Suppose we are given a fixed hypothesis \( f\) together with the sample \( S\) , and we wish to estimate the quantity \( {\mathcal C}_S(f) - {\mathcal C}_{\mathcal D}(f)\) . A natural approach is to employ a form of cross-validation: partition the sample \( S\) into two disjoint subsets, \( S_1\) (training) and \( S_2\) (test), where for simplicity we assume that \( |S_1| = |S_2| = |S|/2\) . We aim to approximate \( {\mathcal C}_S(f) - {\mathcal C}_{\mathcal D}(f)\) by
We now expand this expression more explicitly. Let \( {\textbf {1}}_{(f, x_i)}\) be the indicator function that equals 1 if the hypothesis \( f\) makes an error on the example \( x_i\) , and equals \( 0\) otherwise. The expression above can therefore be rewritten as
(304)
Fixing the sample \( S\) , each loss term \( {\textbf {1}}_{(f, x_i)}\) appears with a coefficient of \( +1\) if \( x_i \in S_1\) and with a coefficient of \( -1\) if \( x_i \in S_2\) . Let us denote this sign by \( \sigma_i\) . With this notation, we may write
Now suppose the sample \( S\) is fixed, and we form the partition into \( S_1\) and \( S_2\) uniformly at random. This is equivalent to choosing the signs \( \sigma_i\) independently and uniformly from \( {\pm 1}\) , in which case the sum above can be viewed as a randomized estimate of the generalization gap. The resulting quantity is commonly referred to as a Rademacher average. Informally, Rademacher complexity, is the supremum of the quantity above, over \( f \in {\mathcal F}\) .
We will make this concept now rigorous. We distinguish between the empirical version (calculated on a specific set) and the population version (an average over all possible sets) of Rademacher complexity.
Definition 27
Let \( \mathcal{F}\) be a class of real-valued functions \( f : \mathcal{X} \to \mathbb{R}\) , and let \( S = (x_1, x_2, …, x_n)\) be a fixed sample from \( \mathcal{X}\) . Let \( \sigma_1, …, \sigma_n\) be independent Rademacher random variables, i.e.
The empirical Rademacher complexity of \( \mathcal{F}\) with respect to \( S\) is defined as
Moving from this data-dependent estimate to its expected, distribution-level counterpart gives the population Rademacher complexity.
Definition 28
Let \( {\mathcal D}\) be a distribution over \( \mathcal{X}\) . The (population) Rademacher complexity of \( \mathcal{F}\) with respect to \( n\) samples from \( {\mathcal D}\) is
If \( \mathcal{F} \subseteq \{ f : \mathcal{X} \to \{0,1\} \}\) , the same definitions apply verbatim, with \( f(x_i) \in \{0,1\}\) .
Rademacher complexity is closely related to the Gaussian width, a concept arising in high-dimensional geometry and statistical learning theory which we will explore in depth in Chapter 14.4. For the current purposes, it suffices to know that for a closed set \( T \subset \mathbb{R}^n\) , the Gaussian width \( w(T)\) is defined as
Thus, for Rademacher complexity we are essentially replacing Gaussian random variables with Rademacher random variables. The close connection between these two concepts is further manifested by the following relationship between the Rademacher complexity and Gaussian width (see Exercise 112):
Rademacher complexity is one of the central tools in classical statistical learning theory. If a hypothesis class has low Rademacher complexity (or Gaussian width), it will generalize well, as established by the following theoretical analysis.
Definition 29
Given a hypothesis \( f \in \mathcal{F}\) , a loss function \( {\mathcal C}\) , and a training sample \( S = \{(x_1, y_1), \dots, (x_n, y_n)\}\) , the empirical risk \( \hat{R}_S(f)\) is defined as
While the “true risk” (or “expected risk”) is the error we expect to see on all future, unseen data, the empirical risk is the error we can actually calculate using the data we have (the training set).
The following theorem connects the true risk to the empirical risk using the population Rademacher complexity. Intuitively, if a hypothesis class cannot fit random noise well, then empirical performance reliably predicts true performance.
Theorem 47 (Fundamental Generalization Bound)
Let \( \mathcal{F}\) be a hypothesis class of functions mapping to \( [0, 1]\) . For any \( \delta > 0\) , with probability at least \( 1 - \delta\) over a sample \( S\) of size \( n\) , every \( h \in \mathcal{F}\) satisfies
(305)
where \( R(f) = \mathbb{E}[{\mathcal C}(f(x), y)]\) is the expected risk, \( \hat{R}_S(f)\) is the empirical risk on the sample \( S\) , and \( \mathfrak{R}_n(\mathcal{F})\) is the population Rademacher complexity.
Proof
The proof has three main components: (i) concentration, (ii) symmetrization, and (iii) reduction to Rademacher complexity.
(i) Concentration via McDiarmid’s Inequality: Define a function \( \Phi(S)\) that represents the maximum gap between true and empirical risk for our class
We want to show that \( \Phi(S)\) does not vary much if we change one element in \( S\) . Let \( S\) and \( S'\) differ only in the \( i\) -th element (\( x_i\) vs \( x'_i\) ). We compute
where we have used that the range of \( f\) is \( [0, 1]\) . By McDiarmid’s Inequality [195], with probability \( 1 - \delta\) it holds that
(306)
(ii) Symmetrization: Now we bound the expectation
To that end, we introduce a “ghost sample” \( S' = \{x'_1, \dots, x'_n\}\) drawn from the same distribution. Note that \( R(f) = \mathbb{E}_{S'}[\hat{R}_{S'}(f)]\) . We have
where we have used Jensen’s inequality in the last step.
(iii) Introducing Rademacher variables: Since \( x_i\) and \( x'_i\) are i.i.d., the distribution of \( (f(x'_i) - f(x_i))\) is symmetric. We can multiply by Rademacher variables \( \sigma_i \in \{-1, 1\}\) without changing the expectation and obtain
(307)
where we have used the property of suprema (\( \sup(A-B) \leq \sup A + \sup(-B)\) ). Both terms are identical and equal to the population Rademacher complexity \( \mathfrak{R}_n(\mathcal{F})\) . Therefore, \( \mathbb{E}_S[\Phi(S)] \leq 2\mathfrak{R}_n(\mathcal{F})\) .
Substituting the result of (307) back into the McDiarmid bound from (306) gives
Since \( R(f) - \hat{R}_S(f) \leq \Phi(S)\) for all \( f \in \mathcal{F}\) , the bound is proved.
If we wish to use the empirical Rademacher complexity \( \hat{\mathfrak{R}}_S(\mathcal{F})\) (which we can actually compute from data), the bound becomes slightly looser to account for the variance of the sample, namely
(308)
The proof of this bound is left to the reader (see Exercise 113).
We are now ready to state the Rademacher Complexity generalization bound for linear classes.
Theorem 48
Denote \( \mathcal{F}_B := \{x \mapsto \langle w, x \rangle : \|w\|\leq B\}\) and let \( S = \{x_1, \dots, x_n\}\) be a sample such that \( \|x_i\| \leq r\) for all \( i\) . The empirical Rademacher complexity of \( \mathcal{F}_B\) satisfies
Proof
We have
To maximize the inner product \( \langle w, \sum \sigma_i x_i \rangle\) subject to the constraint \( \|w\| \leq B\) , we choose \( w\) to be in the same direction as the vector \( \sum \sigma_i x_i\) . Specifically, the optimal \( w^*\) is \( B \frac{\sum \sigma_i x_i}{\|\sum \sigma_i x_i\|}\) . Substituting this in gives
(309)
where we have used the concavity of the square root function and Jensen’s Inequality.
Furthermore,
(310)
Since the \( \sigma_i\) are independent and have mean zero we have that if \( i \neq j\) , then \( \mathbb{E}[\sigma_i \sigma_j] = \mathbb{E}[\sigma_i]\mathbb{E}[\sigma_j] = 0\) , and if \( i = j\) , then \( \mathbb{E}[\sigma_i^2] = 1\) . Hence, the double sum collapses to \( \sum_{i=1}^n \mathbb{E}[\sigma_i^2] \langle x_i, x_i \rangle = \sum_{i=1}^n \|x_i\|^2\) .
Given our assumption that \( \|x_i\| \leq R\) , we have \( \sum_{i=1}^n \|x_i\|^2 \leq nR^2\) . Substituting this back into the inequality (309) yields
The following result, known as Talagrand’s Contraction Lemma, is the key tool for passing from linear predictors to hinge, logistic, or other Lipschitz losses in SVM analysis. It allows us to relate the complexity of the “composed” function class (loss \( \circ\) hypothesis) back to the original hypothesis class.
Theorem 49 (Talagrand’s Contraction Lemma [196])
Let \( \mathcal{F}\) be a class of functions mapping \( \mathcal{X} \to \mathbb{R}\) . Let \( \phi_1, \dots, \phi_n\) be functions such that each \( \phi_i: \mathbb{R} \to \mathbb{R}\) is \( L\) -Lipschitz. Then for any sample \( S = \{x_1, \dots, x_n\}\)
Proof
We assume \( L=1\) without loss of generality. We proceed by induction on \( n\) , the number of samples.
Let \( n=1\) : We want to show that
Expanding the expectation gives
By the Lipschitz property we have \( \phi_1(f(x_1)) - \phi_1(g(x_1)) \leq |f(x_1) - g(x_1)|\) . The right-hand side of the case \( n=1\) is \( \frac{1}{2} \sup_{f, g \in \mathcal{F}} [f(x_1) - g(x_1)]\) . We note that \( \sup_{f,g} |f-g| = \sup_{f,g} (f-g)\) in our case, since \( f\) and \( g\) are interchangeable in the supremum, hence the inequality holds.
Assume now the theorem holds for \( n-1\) . Let \( U_{n-1}(f) := \sum_{i=1}^{n-1} \sigma_i \phi_i(f(x_i))\) . We analyze
(311)
(where we have used the shorthand \( \sigma_{1:n} = (\sigma_1,\dots,\sigma_n)\) ) and isolate the expectation over \( \sigma_n\) . We get
For any fixed values of \( \sigma_{1:n-1}\) , let \( f^*\) and \( g^*\) be the functions that achieve the two suprema above. Then the expression inside the outer expectation is
(312)
Using the Lipschitz property, \( \phi_n(f^*(x_n)) - \phi_n(g^*(x_n)) \leq |f^*(x_n) - g^*(x_n)|\) . We now consider the sign of \( (f^*(x_n) - g^*(x_n))\) : If \( f^*(x_n) \geq g^*(x_n)\) , (312) becomes \( \frac{1}{2} [ U_{n-1}(f^*) + U_{n-1}(g^*) + f^*(x_n) - g^*(x_n) ]\) . If \( f^*(x_n) < g^*(x_n)\) , (312) becomes \( \frac{1}{2} [ U_{n-1}(f^*) + U_{n-1}(g^*) - f^*(x_n) + g^*(x_n) ]\) .
In both cases, notice that this matches the expansion of the supremum of the untransformed \( n\) -th variable
Substituting this back into (311) gives
By repeating this argument for \( \sigma_{n-1}, \sigma_{n-2}, \dots, \sigma_1\) , we peel away each \( \phi_i\) one by one. After \( n\) iterations, we obtain
This completes the proof.
It is easy to see that the hinge loss and the logistic loss are 1-Lipschitz. Therefore, by virtue of Talagrand’s Contraction Lemma, generalization bounds for linear predictors automatically extend to SVM and logistic regression, as manifested by the Theorem 50 below.
We define the margin loss (or ramp loss) \( \Phi_\gamma: \mathbb{R} \to [0, 1]\) by
Theorem 50
Let \( \mathcal{D}\) be a distribution over \( \mathcal{X} \times \{-1, +1\}\) , where \( \mathcal{X}\) is an input space such that \( \|x\| \leq R\) for all \( x \in \mathcal{X}\) . Let \( \mathcal{F}_B\) denote the hypothesis class defined by
For any margin \( \gamma > 0\) , and for any \( \delta \in (0, 1)\) , with probability at least \( 1 - \delta\) over the choice of a sample \( S = \{(x_1, y_1), \dots, (x_n, y_n)\}\) drawn i.i.d. from \( \mathcal{D}\) , every \( f \in \mathcal{F}_B\) satisfies
Proof
We want to bound the true risk \( R(f) = P_{(x,y) \sim \mathcal{D}}(yf(x) \leq 0)\) . Define the indicator loss \( {\mathcal C}_{0/1}(u) = \mathbb{1}_{u \leq 0}\) . The margin loss function \( \Phi_\gamma(u)\) is defined such that for all \( u \in \mathbb{R}\)
Therefore, the true risk is dominated by the expected margin loss
Let \( \mathcal{G}\) be the family of functions \( \mathcal{G} = \{ (x, y) \mapsto \Phi_\gamma(y f(x)) : f \in \mathcal{F}_B \}\) . Since the range of \( \Phi_\gamma\) is \( [0, 1]\) , we apply the bound (308). For any \( \delta > 0\) , with probability at least \( 1 - \delta\)
(313)
Note that \( \Phi_\gamma(u)\) is \( L\) -Lipschitz with \( L = \frac{1}{\gamma}\) . By Talagrand’s Contraction Lemma,
(314)
Consider the term \( \mathbb{E}_\sigma [ \sup \frac{1}{n} \sum \sigma_i y_i f(x_i) ]\) . Since \( y_i \in \{-1, 1\}\) are fixed constants in the empirical complexity and \( \sigma_i\) are independent Rademacher variables, the product \( \sigma_i y_i\) is also a Rademacher variable with the same distribution as \( \sigma_i\) . Thus,
where we have used Theorem 48 in the last step. We combine this bound with the inequality (314) and obtain
(315)
Substitute the bound from (315) into the generalization inequality (313) gives
We complete the proof by noting that \( R(h) \leq \mathbb{E}[\Phi_\gamma(yh(x))]\) .
When applying standard SVM, we assume the data is (essentially) linearly separable. Assuming the linear separability holds strictly, then in hard-margin SVM the optimization ensures that for all training points, \( y_i f(x_i) \geq 1\) . If we set our theoretical margin parameter \( \gamma = 1\) , then the hard-margin SVM ensures \( y_i f(x_i) \geq 1\) , which means \( \Phi_\gamma(y_i f(x_i)) = 0\) for every single training point. Therefore, the empirical risk term in Theorem 50 becomes zero. The generalization bound then tells us that the true error is entirely bounded by the complexity term \( \frac{2BR}{\sqrt{n}}\) and the concentration term.
In a soft-margin SVM, we allow some points to violate the margin using slack variables \( \xi_i\) . Recall that the hinge loss, \( {\mathcal C}_{\text{Hinge}}(u) = \max(0, 1-u)\) , is an upper bound on the ramp loss \( \Phi_\gamma(u)\) . While the ramp loss is what we use in the theorem to get a tight bound between 0 and 1, the soft-margin SVM actually minimizes the hinge loss because it is convex and easier to solve via quadratic programming. Because \( {\mathcal C}_{\text{Hinge}} \geq \Phi_\gamma\) , minimizing the hinge loss is a principled approach to trying to minimize the empirical term in the margin generalization bound.
The generalization bounds are also applicable to kernel-SVM. It is not difficult to establish the following result (see also Exercise 114).
Theorem 51
Let \( K: \mathcal{X} \times \mathcal{X} \to \mathbb{R}\) be a symmetric, positive-definite kernel, and let \( \mathbb{H}_K\) be its associated Reproducing Kernel Hilbert Space with norm \( \|\cdot\|_K\) . Assume there exists a constant \( R > 0\) such that \( K(x, x) \leq R^2\) for all \( x \in \mathcal{X}\) . Let
Then with probability at least \( 1-\delta\)
In this RKHS setting, the empirical Rademacher complexity is strictly bounded by the trace of the kernel matrix
Thus, Theorem 51 shows that even if \( \mathbb{H}_K\) is infinite-dimensional (like with a Gaussian kernel), the complexity of the learning task is governed only by the norm of the function (the parameter \( B\) ) and the kernel’s behavior on the data (the parameter \( R\) ), not the dimensionality of the space.
The choice of classification method depends strongly on factors like the inherent structure of the data (such as its dimensionality, sparsity, and linearity), the practical setting (for instance, a high-frequency trading platform might prioritize speed, while in medical diagnostics accuracy or need for interpretability may have higher priority), the available computational resources, as well as the amount of labeled data available and the signal-to-noise ratio.
Thus, the optimal classifier is not necessarily the most complex one, but rather the model that best balances accuracy, interpretability, robustness, and feasibility within the constraints of the intended application. With this in mind, we briefly mention a variety of alternative classification methods beyond linear models and margin-based classifiers which are widely used in practice.
\( k\) -Nearest Neighbor (k-NN) methods [197] classify data points based on local proximity in feature space and require minimal modeling assumptions, although they scale poorly with dimension.
Random Forests and related tree-based ensembles [198, 199] construct classifiers by aggregating many randomized decision trees, offering strong empirical performance and robustness at the cost of reduced interpretability.
Boosting methods, such as AdaBoost and gradient boosting [200, 201, 202], combine weak learners into a powerful classifier through iterative reweighting, with strong theoretical guarantees under suitable conditions.
Neural networks are currently the state-of-the-art approach for multiclass classification, particularly when the relationship between the input features and the classes is non-linear or highly complex (like in images, audio, or natural language) and when a large number of training data is available.
In fact, the multiclass logistic regression model can be interpreted as a “single-layer” neural network. Deep Learning expands this by adding hidden layers between the input and the final softmax output. We will explore neural networks in more detail in Chapter 11.
Exercise 110
(a) Write down the KKT conditions for the soft-margin SVM.
(b) Interpret each KKT condition geometrically.
(c) Explain how complementary slackness characterizes support vectors.
Exercise 111
Generate a binary classification dataset in \( \mathbb{R}^2\) via:
(a) Fit logistic regression with no regularization;
(b) Fit logistic regression with \( \ell_2\) -regularization \( (\lambda = 0.01, 0.1, 1)\) .
Compare norm of the weight vector, classification accuracy, and margin width. Visualize decision boundaries.
Exercise 112
Show that the following relationship between the Rademacher complexity and Gaussian width holds:
Exercise 113
Prove the following data-dependent generalization bound:
For a hypothesis class \( \mathcal{F}\) mapping to \( [0, 1]\) , with probability at least \( 1 - \delta\) over a sample \( S\) of size \( n\) , every \( f \in \mathcal{F}\) satisfies
Exercise 114
Prove Theorem 51.
Exercise 115
Consider a soft-margin SVM where each training example is a triplet \( (x_i,y_i,p_i)\) with \( 0 < p \le 1\) denoting the importance of example \( i\) .
Exercise 116
Suppose we have a binary classification problem in one dimension. The two classes, \( \mathcal{C}_0\) and \( \mathcal{C}_1\) , are distributed according to Gaussian probability density functions:
Assume \( \mu_1 > \mu_0\) and that the classes have equal prior probabilities, \( \mathbb{P}(\mathcal{C}_0) = \mathbb{P}(\mathcal{C}_1) = 0.5\) . We define a classifier with a decision threshold (cut-off) \( \tau\) , such that we predict class \( \mathcal{C}_1\) if \( x > \tau\) , and class \( \mathcal{C}_0\) otherwise.
Derive analytical expressions for the following metrics as a function of the threshold \( \tau\) , the means \( \mu_0, \mu_1\) , and the variance \( \sigma^2\) . Use the standard normal cumulative distribution function \( \Phi(z)\) or the complementary error function \( \text{erfc}(z)\) in your answers.
Exercise 117
The MNIST dataset consists of grayscale images of handwritten digits \( 0,1,\dots,9\) , each represented as a vector in \( \mathbb{R}^{784}\) . In this problem, we consider the binary classification task of distinguishing between the digits 3 and 8. Let
denote the dataset, where \( y_i = +1\) corresponds to the digit 8 and \( y_i = -1\) corresponds to the digit 3. Extract all images of digits 3 and 8 from the MNIST dataset, and normalize each image so that its pixel values lie in \( [0,1]\) . Split the data into a training set \( 80\%\) and a test set \( 20\%\) .
(a) Compare logistic regression and soft-margin SVM in terms of classification accuracy, convergence behavior, and robustness to misclassified samples.
(b) Visualize several test images that are misclassified by each method.
Exercise 118
(The Breast Cancer Wisconsin Diagnostic Dataset). Download the Breast Cancer Wisconsin (Diagnostic) dataset (e.g. from the UCI Machine Learning Repository). The goal in this exercise is to predict whether a tumor is malignant or benign based on 30 features (radius, texture, smoothness, etc.).
(a) Train SVM on the raw data. Then, standardize the features (subtract mean, divide by standard deviation) and retrain. Why does the SVM performance change so drastically with scaling, while Logistic Regression is relatively more robust?
(b) Extract the weights \( w\) from the Logistic Regression model. Which physical feature (e.g., “area” vs. “concavity”) is the strongest predictor of malignancy?
Exercise 119
The Spambase dataset (UCI Machine Learning Repository) consists of email messages represented as feature vectors of 57 attributes. Each email is labeled as either spam or non-spam. Let
denote the dataset, where \( y_i = +1\) corresponds to spam and \( y_i = -1\) corresponds to non-spam.
(a) Train logistic regression models for \( \ell_1\) -regularization, \( \ell_2\) -regularization, and no regularization.
(b) Train a soft-margin SVM.
Compare logistic regression and soft-margin SVM in terms of classification accuracy, sparsity of learned parameters, and robustness to regularization parameter choice.
Exercise 120
The goal of this exercise is to compare the performance of Support Vector Machines and Feed-Forward Neural Networks as a function of training set size. This project consists of four parts.
Load the MNIST Dataset: Filter the dataset to include only the two digits 4 and 9. This pair is chosen because these two digits are visually (somewhat) similar and provide a meaningful challenge. Flatten the \( 28 \times 28\) images into 784-dimensional vectors. Scale the pixel values to the range \( [0, 1]\) . Reserve a fixed test set of 1,000 images for evaluation.
You will train two models:
Train both models on subsets of increasing size \( N\) of the training data: for each subset size \( N \in \{20, 50, 100, 500, 1000, 5000\}\) , record the test accuracy. (To ensure statistical stability, you should repeat each training session five times with different random subsets and report the average accuracy.)
Exercise 121
This exercise deals with a highly imbalanced dataset, a problem we often encounter in practice.
From the MNIST dataset select two classes: Pick digit “0” (Majority) and digit “8” (Minority). Create an imbalanced dataset by taking 5,000 samples of the digit “0”, and taking only 50 samples of the digit “8”. Combine them into a training set where the minority class represents only 1% of the data. But use a balanced test set (500 of each) to see how the model generalizes. Train a baseline by training a standard Logistic Regression or SVM on this imbalanced set. Then calculate accuracy: You will likely achieve 99% accuracy (why?) Calculate the Precision, Recall, and F1-Score. If the model simply predicts “0” for every single image, what would the accuracy be? Is this model actually useful?
We will explore different intervention strategies to address this imbalance problem.
Compare the results of the three different strategies to the baseline in terms of accuracy, precision for digit “8”, precision for digit “0”, and F1-score. Comment on the advantages and disadvantages of each strategy. Which intervention strategy seems most promising?
Deep learning has emerged as one of the most intriguing developments in modern data science, offering a powerful framework for learning complex patterns directly from data. Unlike traditional machine learning methods that rely heavily on feature engineering, deep neural networks automatically extract hierarchical representations that capture both low-level and high-level structures in data. This capability makes deep learning particularly effective for classification tasks, where the goal is to assign inputs—such as images, sounds, or text—to discrete categories. By composing multiple layers of nonlinear transformations, deep learning models can approximate highly intricate decision boundaries, often achieving impressive performance across a wide range of domains.
The 2024 Nobel Prize in Physics and the 2024 Nobel Prize in Chemistry marked a significant moment of recognition for the field of deep learning and its far-reaching scientific impact. Together, these awards signal how deep-learning architectures have moved from niche algorithmic innovation to being recognized as powerful scientific tools.
Despite this phenomenal empirical success and scientific recognition, the field’s underlying mathematical theory is still nascent; many fundamental questions regarding optimization, generalization bounds, and the precise reasons for the efficacy of overparameterized models remain open problems at the intersection of mathematics, statistics, and computer science.
At its core, deep learning leverages artificial neural networks with many layers—hence the term “deep”—to model complex relationships in data. This chapter provides a mathematical perspective on deep learning, focusing on the foundational concepts and structures that underpin the field. Deep learning has developed its own jargon, often coming up with new names for already well established procedures in signal and image processing, optimization, or statistics. We follow in part the very accessible article by Higham and Higham [176] when bridging deep learning and applied mathematics. We also recommend [203] which covers several topics that we do not discuss in this chapter, such as the generalization properties of deep neural networks.
Neural networks are a cornerstone of modern artificial intelligence, capable of learning patterns from data. Neural networks are used in a variety of applications, including image recognition, natural language processing, and even playing complex games like Go and Chess. Here we focus on using neural networks for classification.
Suppose we have a training dataset of \( n\) points in \( \mathbb{R}^d\) consisting of two classes \( A\) and \( B\) , drawn from some underlying distribution of data with the same labels. Based on this training set, we are looking to design a function \( F: \mathbb{R}^d \rightarrow \{\textrm{A,B}\}\) that will generate labels for new data, for example, the black question mark in Figure 85
If the green line represents the decision boundary of \( F\) , then the question mark will be classified as a \( B\) . Artificial neural networks (or neural networks for short) are a way of generating this function \( F\) .
A neural network is composed of layers of neurons, where each neuron (or node) is a computational unit that processes input and produces an output. The perceptron, introduced by Frank Rosenblatt in 1958 [204], is one of the simplest models of a neuron. Mathematically, a perceptron can be described as:
where \( x_i\) are the input features, \( w_i\) are the weights associated with the inputs, \( b\) is the so-called bias term, \( \sigma\) is an activation function (typically a Heaviside step function, but more generally it can be a nonlinear function like the sigmoid).
A multilayer perceptron (MLP) extends the perceptron by stacking multiple layers of nodes. An MLP consists of an input layer, one or more hidden layers, and an output layer. Each layer \( \ell \) in an MLP is described by the following equation:
where \( a^{(\ell-1)}\) is the output of the previous layer (or the input data for the first layer), \( W^{(\ell)}\) is the weight matrix for layer \( \ell \) , \( b^{(\ell)}\) is the bias vector for layer \( \ell\) , and \( \sigma\) is an element-wise activation function. An MLP is a specific type of neural network, more specifically a subclass of feedforward neural networks. More generally, neural network is an umbrella term that includes various architectures beyond just feedforward networks.
To introduce some further standard terminology, the first layer of a neural network is called the input layer, which usually just corresponds to the data. A hidden layer in a neural network is any layer of nodes that is situated between the first layer and the last layer. The term “hidden” refers to the fact that these layers are not directly exposed to the input data or the final output; they are “hidden” in the sense that they exist only within the network’s architecture. The last layer is the output layer, typically associated with a loss function that measures the discrepancy between the predicted output and the true output. The output layer shapes the data into a shape more appropriate for the downstream task. For example the output layer may transform the data from a hidden shape of, say, 1024, to a shape of 2 for a binary prediction.
We assume the following general setup: The network has \( L\) layers, with layers \( 1\) and \( L\) being the input and output layers, respectively. We assume that the number of nodes in the \( \ell\) -th layer is \( n_\ell\) , for \( \ell = 1, 2, 3, …, L\) . Thus the input dimension is \( n_1\) and the output dimension is \( n_L\) . We denote the matrix of weights at layer \( \ell\) by \( W^{(\ell)} \in \mathbb{R}^{n_\ell \times n_{\ell-1}}\) , where \( w^{(\ell)}_{jk}\) is the weight that node \( j\) at layer \( \ell\) applies to the output from node \( k\) at layer \( \ell-1\) . Similarly, \( b^{(\ell)} \in \mathbb{R}^{n_l}\) is the vector of biases for layer \( \ell\) . Hence, the bias \( b^{(\ell)}_j\) is associated with node \( j\) at layer \( \ell\) .
A neural network with four layers is illustrated in Figure 86 (for simplicity the bias terms are omitted in that figure). \( W_{kj}^{(\ell)}\) represents the connection between unit \( j\) in layer \( \ell\) and unit \( k\) in layer \( \ell+1\) , so the rows of \( W^{(\ell)}\) correspond to the weights going into node \( k\) . In this spirit, we define \( W_i^{ (\ell)}\) to be the \( i^{\textrm{th}}\) row vector of \( W^{(\ell)}\) . In the example shown in Figure 86, \( W^{(1)}\in\mathbb{R}^{4\times 3}\) , \( W^{(2)}\in\mathbb{R}^{2\times 4}\) , and \( W^{(3)}\in\mathbb{R}^{1\times 2}\) . Also, \( a_k^{(\ell)}\) denotes the output, or activation, of unit \( k\) in layer \( \ell\) , while \( z_k^{(\ell)}=\sum_{j}W_{kj}^{(\ell)}x_J\) is the sum into node \( k\) . Hence, in the above example:
We can now represent the action of a deep neural network with \( L\) layers in the following form: Given an input \( x \in \mathbb{R}^{d_1}\) , let \( a^{(\ell)}_j\) denote the output, or activation, from neuron \( j\) at layer \( \ell\) . We compute:
(316)
where, the activation functions \( \sigma_\ell\) and the number of nodes \( d_\ell\) may differ from layer to layer.
Suppose now that we are given a set of \( N\) data points \( x_1,\dots, x_N \in \mathbb{R}^{d_1}\) (our training set), for which we have associated target outputs \( y_1,\dots, y_N\) . The \( x_i\) might be images, each showing either a car or a bicycle, and the corresponding \( y_i\) might be binary labels indicating class membership, i.e., if the depicted object in image \( x_i\) is in fact a car or a bicycle. The task of training a neural net is to minimize a user-specified cost function or loss function \( {\mathcal C}\) which takes as input \( \{x_i\}_{i=1}^N,\{y_i\}_{i=1}^N\) and which will depend on all the weights \( \{W^{(\ell)}\}_{\ell=1}^L\) and biases \( \{b^{(\ell)}\}_{\ell=1}^L\big)\) . One example of such a cost function is
We will discuss other choices of loss functions and how such a network is typically trained (i.e, how to find the weights and biases that minimize the loss function) in Section 11.3.
The activation function \( \sigma \) introduces non-linearity into the model, with the intention that it should enable the network (assuming sufficiently many nodes and layers) to learn complex patterns. We briefly discuss some common activation functions. Sigmoidal type functions satisfy the properties \( \lim_{x \to \infty } \sigma(x) = 1\) and \( \lim_{x \to -\infty } \sigma(x) = 0\) . The sigmoid or logistic function
an example of a sigmoid function, maps the input \( x \) to a value between 0 and 1, making it useful for binary classification problems, as we already have seen in Chapter 10. The hyperbolic tangent
maps the input to a value between -1 and 1, and it is often used in hidden layers of a neural network. The Rectified Linear Unit (ReLU)
is the most popular activation function in deep learning. It is computationally efficient and helps mitigate the vanishing gradient problem [205, 206]. However, it is not differentiable at the origin. The softmax function:
(317)
is typically used in the output layer of a network for multi-class classification problems. It converts the raw output scores into probabilities.
Which activation function shall we use in which layer? Except for the last layer, where the activation function is in part determined by the task at hand (e.g. a classification task will suggest something like a softmax activation function while a ReLU would not help in that case), choosing an activation function is done mainly via trial and error.
While trial and error is often good enough for most application, one might ask if, instead of such an ad hoc approach, can we take a data driven approach and learn the activation functions like we do for the weights and biases? One approach to do this in a principled manner is given by Kolmogorov-Arnold Networks which have learnable activation functions. Indeed, Kolmogorov-Arnold Networks have no linear weights at all, since every weight parameter is replaced by a univariate function parametrized as a spline. We refer to interested reader to [207] for details.
Although many facets of deep learning still lack a thorough mathematical explanation, the approximation properties of (shallow) neural networks are relatively well understood. The Universal Approximation Theorem [208, 209, 210, 211, 212] is a fundamental result in neural network theory. It essentially states that a feedforward neural network with a single hidden layer containing a finite number of nodes can approximate any continuous function on compact subsets of \( \mathbb{R}^n\) , given appropriate parameters (weights and biases).
One of the foundational versions of the Universal Approximation Theorem (UAT) for shallow neural networks is due to George Cybenko [210]. It applies to single-hidden-layer feedforward networks with sigmoidal activation functions. We need some notation before we can present the rigorous statement.
Let \( I_n = [0,1]^n \) be the unit hypercube in \( \mathbb{R}^n \), and let \( C(I_n) \) be the space of continuous real-valued functions on \( I_n \), equipped with the supremum norm \( \|f\| = \sup_{x \in I_n} |f(x)| \). We recall that a function \( \sigma: \mathbb{R} \to \mathbb{R} \) is called sigmoidal if \( \lim_{t \to +\infty} \sigma(t) = 1 \) and \( \lim_{t \to -\infty} \sigma(t) = 0 \).
Theorem 52 (Cybenko, 1989)
: Let \( \sigma \) be any continuous sigmoidal function. Then, the set of all finite sums of the form
where \( N \in \mathbb{N} \), \( \alpha_j, \theta_j \in \mathbb{R} \), and \( y_j \in \mathbb{R}^n \), is dense in \( C(I_n) \). In other words, for any \( f \in C(I_n) \) and any \( \varepsilon > 0 \), there exists such a \( G \) satisfying
This theorem implies that a single-hidden-layer neural network with a continuous sigmoidal activation function (e.g., the logistic sigmoid \( \sigma(t) = \frac{1}{1 + e^{-t}} \)) can approximate any continuous function on a compact set to arbitrary accuracy, provided sufficiently many hidden neurons are used. Note that the result extends naturally to any compact subset of \( \mathbb{R}^n \) by rescaling and shifting, and to multi-output functions component-wise.
The proof relies on concepts from functional analysis, including the Hahn-Banach theorem and the Riesz representation theorem. It first establishes a more general result for “discriminatory” functions defined below, and then shows that continuous sigmoidal functions are discriminatory.
Definition 30
Let \( M(I_n) \) denote the space of finite signed regular Borel measures on \( I_n \). A function \( \sigma: \mathbb{R} \to \mathbb{R} \) is called discriminatory if, for any \( \mu \in M(I_n) \),
implies \( \mu = 0 \).
Theorem 53
Let \( \sigma \) be any continuous discriminatory function. Then, finite sums of the form
are dense in \( C(I_n) \).
Proof
Let \( S \) be the subspace of \( C(I_n) \) consisting of all finite linear combinations of functions of the form \( x \mapsto \sigma(\langle y, x \rangle + \theta) \) for \( y \in \mathbb{R}^n \) and \( \theta \in \mathbb{R} \) (i.e., the span of such functions). Clearly, \( S \) is a linear subspace.
Assume, for contradiction, that the closure \( \overline{S} \) (in the supremum norm) is a proper closed subspace of \( C(I_n) \). By the Hahn-Banach theorem, there exists a nonzero bounded linear functional \( L: C(I_n) \to \mathbb{R} \) such that \( L(g) = 0 \) for all \( g \in \overline{S} \) (and hence for all \( g \in S \)).
By the Riesz representation theorem, since \( L \) is a bounded linear functional on \( C(I_n) \), there exists a unique \( \mu \in M(I_n) \) such that
In particular, for each fixed \( y \in \mathbb{R}^n \) and \( \theta \in \mathbb{R} \), the function \( h(x) = \sigma(\langle y, x\rangle + \theta) \) belongs to \( S \) (and thus to \( \overline{S} \)), so
Since \( \sigma \) is discriminatory, this implies \( \mu = 0 \). But \( \mu = 0 \) means \( L = 0 \), contradicting the assumption that \( L \neq 0 \).
Therefore, \( \overline{S} = C(I_n) \), so \( S \) is dense in \( C(I_n) \).
To apply Theorem 53 to sigmoidal functions, we need the following result:
Lemma 13
Any continuous sigmoidal function \( \sigma \) is discriminatory.
Proof
Assume
We aim to show that \( \mu = 0\) .
Fix \( y \in \mathbb{R}^n \), \( \theta \in \mathbb{R} \), and consider scaling the argument. For any \( \lambda > 0 \), replace \( y \) with \( \lambda y \) and \( \theta \) with \( \lambda \theta \):
As \( \lambda \to +\infty \), the integrand \( \sigma(\lambda (\langle y,x\rangle + \theta)) \) converges pointwise to the step function
(since \( \sigma \) is sigmoidal with limits 1 and 0). Moreover, since \( \sigma \) is continuous and thus bounded on \( \mathbb{R} \), the convergence is bounded.
By the Lebesgue dominated convergence theorem (applicable because \( I_n \) has finite Lebesgue measure and the functions are bounded),
where \( H_{y,\theta} = \{ x \in I_n | \langle y, x\rangle + \theta > 0 \} \) is the open half-space and \( \Pi_{y,\theta} = \{ x \in I_n | \langle y, x \rangle + \theta = 0 \} \) is the hyperplane.
To isolate terms, note that by varying \( \theta \) slightly or using different scalings, we can show \( \mu(\Pi_{y,\theta}) = 0 \) for almost all hyperplanes (since hyperplanes have measure zero in general position). More rigorously, consider the pushforward measure along the line in direction \( y \).
Define the linear functional \( F: C(\mathbb{R}) \to \mathbb{R} \) by
which is well-defined and bounded (since \( \mu \) is finite). The assumption implies \( F(\sigma(\cdot + \theta)) = 0 \) for all \( \theta \), and by the scaling argument above, \( F \) vanishes on the indicators of half-lines \( (a, +\infty) \) for any \( a \in \mathbb{R} \) (by choosing appropriate \( \theta \)).
Since indicators of intervals generate the Borel algebra, and simple functions (finite linear combinations of indicators) are dense in \( L^1(\mathbb{R}, \nu) \) for the induced measure \( \nu\) (the pushforward of \( \mu\) under the map \( x \mapsto \langle y, x\rangle \) ), \( F\) vanishes on a dense set in the continuous functions.
In fact, since \( F(\exp(2\pi i t \cdot)) = 0\) for the Fourier basis (by approximating exponentials via sigmoidal superpositions or directly from the vanishing on steps), the characteristic function of the pushforward measure is zero everywhere, implying the pushforward is zero. Thus,
implying the Fourier transform of \( \mu\) vanishes, so \( \mu = 0\) by uniqueness of Fourier transforms for measures.
Proof (of Theorem 52)
The proof of Theorem 52 follows now immediately by combining Theorem 53 and Lemma 13.
This proof demonstrates the validity of Theorem 52 without constructing explicit approximations, relying instead on separation theorems in functional analysis. Extensions (e.g., [208, 209]) provide alternative proofs for broader classes of activations, see also [203].
However, since the proof is nonconstructive, it “only” guarantees the existence of an approximating neural network, but it does not provide a method to find the weights \( \alpha_j, y_j, \theta_j \) or the number of neurons \( N \) .
There exists extensive theory establishing convergence rates for the approximation of a function \( f\) by a neural network, see e.g. [213, 211, 214]. For classical smoothness spaces it has been shown that to achieve an accuracy of \( \varepsilon\) , the size of the network needs to increase exponentially in \( d\) , and this exponential dependence on \( d\) is unavoidable [215, 214].
Thus, additional assumptions on the function \( f\) are needed if one wants to avoid this curse of dimensionality. One such regularity assumption is captured by the so-called Barron class. Barron, in [212], introduces a Banach space of regular functions (now known as Barron class), defined by the semi-norm \( \|f\|_B:= \int |\hat{f}(\omega) | |\omega| \,d\omega\) . Barron shows that, for any \( n\) , there exists a network with \( n\) neurons such that the approximation error is of the order \( 1/\sqrt{n}\) , when measured in the \( L^2\) -norm.
Adding more layers (depth) does not increase the class of functions that can be approximated in principle, since we just saw that even one hidden layer already suffices for density. But it dramatically changes the efficiency and representational complexity of approximation.
It is known (see e.g. [216, 217, 218]) that some functions can be approximated exponentially more efficiently by deep networks than by shallow ones. For example let \( f(x) = x_1 x_2 … x_d\) be a high-order monomial. In this case it has been shown that a shallow network needs exponentially many neurons in \( d\) to approximate \( f(x)\) , while a deep network can approximate \( f(x)\) with \( {\mathcal O}(d)\) neurons using compositional structure [216].
However, while it is not too difficult to construct a neural network (deep or shallow) that enables some form of universal approximation power, it is important to emphasize that this sheds little light on the success of deep learning. How come (carefully fine-tuned) neural networks with a huge number of parameters (weights) are able to generalize astonishingly well? Traditional approaches fail to explain why large neural networks generalize well in practice [219, 220].
Can Rademacher complexity help? Recall that Rademacher complexity bounds measure the worst-case capacity of an entire hypothesis class, and for large neural networks these bounds are often huge, leading to vacuous generalization bounds. However, the effective complexity seems to be much smaller than the worst-case class complexity. Understanding precisely when and why overparameterized networks generalize remains one of the central open questions in modern learning theory.
The “double descent phenomenon” is a noteworthy theoretical development in this context, which helps to shed some light on why deep neural networks generalize so well despite being massively overparameterized [221]. It suggests that in the highly over-parameterized regime, deep networks achieve generalization by finding the most mathematically parsimonious way to interpolate the training data. Thus, the double descent curve refines our understanding of the bias-variance tradeoff in the overparametrized regime. Generalization depends not just on model size, but how the model is trained and which solutions are preferred.
When we let the depth of a neural network approach infinity, we arrive at so-called neural differential equations [222]. To see this, let us consider a standard feedforward neural network with \( L\) layers, where each layer applies a transformation of the form
with \( a^{(0)} = x\) denoting the input and \( a^{(L)}\) the final hidden representation or output. This formulation corresponds to a residual network (ResNet) architecture, in which the update rule explicitly adds a residual term to the identity mapping.
To interpret this recursion as a discretization scheme, introduce a continuous “depth” variable \( t \in [0, T]\) and let each layer correspond to a discrete time point \( t_\ell = \ell,\Delta t\) with step size \( \Delta t = T/L\) . Then the layer-wise update can be rewritten as
This is precisely the forward (explicit) Euler method applied to the initial value problem
Hence, in the limit as the number of layers \( L \to \infty\) (and thus \( \Delta t \to 0)\) , the discrete-depth neural network converges formally to a neural differential equation, or more specifically, a neural ordinary differential equation. The dynamics of the hidden representation are governed by
where \( f\) is a neural network parameterizing the instantaneous rate of change of \( a(t)\) .
This continuous-depth perspective allows one to treat neural network architectures as parameterized dynamical systems. The terminal state \( a(T)\) is obtained by integrating the differential equation from \( t=0\) to \( t=T\) ,
and the parameters \( \theta(t)\) are optimized to minimize a loss functional defined over the final state.
From an analytical viewpoint, this interpretation reveals that the expressiveness of deep networks can be understood through the lens of continuous-time dynamical systems theory, with residual connections corresponding to first-order numerical integration schemes.
Training a neural network involves finding the optimal weights \( W^{(\ell)}\) and biases \( b^{(\ell)}\) that minimize a cost function or loss function \( {\mathcal C}\) . Due to the typically large amount of data, higher-order optimization methods are usually prohibitively expensive. The work horse for this process typically comprises gradient-based optimization algorithms, regardless of the specific network architecture.
Loss functions (called cost functions in optimization or error functions in numerical analysis) are critical in guiding the learning process by quantifying how well the model’s predictions align with the true targets. The choice of the loss function depends on the specific task (e.g., regression, classification) and the characteristics of the data. For example, the mean squared error is often employed for regression tasks:
The mean absolute error is given by
It is also used for regression tasks, particularly when robustness to outliers is desired, since it is less sensitive to outliers than the mean squared error.
The cross-entropy loss is a standard choice for classification tasks:
The multi-class cross-entropy loss generalizes binary cross-entropy to multiple classes. In detail, for multi-class classification, where the true target is a one-hot encoded vector \( \mathbf{y}_i \) and the predicted probabilities for each class are given by \( \hat{\mathbf{y}}_i \) , the cross-entropy loss is:
where \( C \) is the number of classes, \( y_{ic} \) is the true label (1 or 0) for class \( c \) , and \( \hat{y}_{ic} \) is the predicted probability for class \( c \) .
The Hinge Loss is primarily used in Support Vector Machines but also finds use in neural networks. For binary classification, where \( y_i \in \{-1, 1\} \) and \( \hat{y}_i \) is the predicted score (not a probability), the hinge loss is defined as:
The hinge loss is used in contexts where the predictions are scores rather than probabilities, and it aims to ensure that the true class is not only predicted correctly but with a margin of at least 1. If \( y_i \hat{y}_i \geq 1 \) , the loss is 0, meaning the prediction is correct with a sufficient margin. If \( y_i \hat{y}_i < 1 \) , the loss increases linearly, penalizing the model for incorrect or insufficiently confident predictions.
The Kullback-Leibler (KL) Divergence measures how one probability distribution diverges from a second, expected probability distribution. It is typically used in variational autoencoders and reinforcement learning. For two probability distributions \( P \) (true distribution) and \( Q \) (predicted distribution), the KL divergence is defined as:
It is not symmetric, meaning \( \text{KL}(P \parallel Q) \neq \text{KL}(Q \parallel P) \) . In deep learning, the KL divergence is often used in settings where the model needs to match its output distribution \( Q \) to a target distribution \( P \) .
The Huber loss attempts to combine the best properties of the mean squared error and the mean absolute error. For a prediction \( \hat{y}_i \) and target \( y_i \) , it is defined as:
where
The Huber loss is typically used for regression tasks, particularly when dealing with outliers. It is less sensitive to outliers than the mean squared error.
Training a neural network corresponds to choosing its parameters, i.e., the weights and biases, that minimize the cost function. Given the high dimensionality and non-linearity of neural networks, finding the optimal parameters becomes a challenging task. So, how shall we do that?
Enter gradient descent ! The use of gradient descent is usually discouraged in classical numerical optimization and often for good reason: Gradient descent generally can have a slow rate of convergence, is sensible to the choice of step size and initialization, and can easily get stuck in saddle points and local extrema [159]. However, in many applications in data science and machine learning it suffices to compute a solution with relatively low accuracy and often one is content with finding local minima. Also, since gradient descent uses only first-order information (namely, the gradient), it can better cope with limited computing resources vis-à-vis very large datasets compared to second-order methods. Due to these considerations gradient descent has become the workhorse in training neural networks.
Specializing the results in Chapter 9.4 to the setting to neural networks, we interpret \( f(x)\) as the network’s cost function \( {\mathcal C}(\theta)\) , with its parameters \( \theta\) (the weights and biases) collected in the vector \( x\) .
Deep learning uses stochastic gradient descent (SGD), which was discussed in Chapter 9.4, instead of standard (full-batch) gradient descent because of computational, statistical, and optimization-landscape reasons that become decisive at the scale and structure of modern neural networks.
Recall that in the standard gradient descent algorithm, the gradient is computed as
where \( {\mathcal C}_i(\theta)\) represents the loss for the \( i \) -th data point.
In contrast, SGD updates the parameters using the gradient computed from a single randomly selected data point \( (x_i, y_i) \) :
A common variant of SGD in deep learning is mini-batch gradient descent, where the gradient is computed over a small batch of data points instead of a single data point
where \( B_k \) is the set of indices in the \( k \) -th mini-batch, and \( |B_k| \) is the batch size. Mini-batch gradient descent attempts to strike a balance between the computational efficiency of SGD and the stability of full-batch gradient descent. It is widely used in practice due to its ability to leverage parallelism and its effectiveness in noisy environments. The convergence of SGD can be analyzed in terms of the expected value of the loss function, see also Section 9.4.7.1 for the special case of applying SGD to a linear system of equations.
The step size of gradient descent, in this context called the learning rate, is an important design parameter. If the learning rate is too large, the noise can cause the algorithm to diverge. Conversely, if the learning rate is very small, the algorithm may converge rather slowly. If the learning rate \( \eta \) is sufficiently small, SGD converges to a neighborhood around a local minimum. The exact nature of this neighborhood depends on the noise characteristics and the curvature of the loss function.
One way to enhance stability is to use a decaying learning rate
where \( \eta_0 \) is the initial learning rate, and \( \alpha \) is a decay factor.
Adaptive methods such as Adam [174] or AdaGrad [175] adjust step sizes dynamically and this frequently leads to empirical improvements but complicates the theoretical guarantees [223]. While Adam is often the method of choice for training speed, it has been observed in simulations that switching to SGD with momentum (see Chapter 9.4 for a discussion of gradient descent with momentum) for the final stages of training can achieve better generalization on test data for some architectures [224].
Backpropagation is the fundamental algorithm used for training neural networks by computing the gradients of the loss function with respect to each weight in the network. It leverages the chain rule from calculus to efficiently compute the gradient of the loss function with respect to every weight in the network.
It will be convenient in the following to denote a neural network by a function \( f(x,W)\) , where \( x\) are the input data and \( W\) represents all the weight and bias parameters. The goal of training is to find the set of parameters \( W^*\) that minimizes a loss function \( {\mathcal C}\) . It will be helpful in our derivation of the backpropagation algorithm to make the dependence of the loss function on the the network parameters explicit by writing \( {\mathcal C}\big(f(x_i, W), y_i\big)\) . We are concerned with solving:
where, as above, \( y_i\) is the true output for input \( {x}_i\) . Backpropagation computes the gradient \( \nabla_{W} L\) so that the weights can be updated using (stochastic) gradient descent:
where \( \eta\) is the learning rate.
The goal is to compute \( \frac{\partial {\mathcal C}}{\partial w_{jk}^{(\ell)}}\) and \( \frac{\partial {\mathcal C}}{\partial b_j^{(\ell)}}\) for all weights \( w_{jk}^{(\ell)}\) and biases \( b_j^{(\ell)}\) . The input \( z_j^{(\ell)}\) to neuron \( j\) in layer \( \ell\) is a weighted sum of the outputs from the previous layer, \( a_k^{(\ell-1)}\) , i.e.,
Applying the chain rule, the gradient of the loss \( {\mathcal C}\) with respect to a weight \( w_{jk}^{(\ell)}\) in layer \( \ell\) is:
From the definition of \( z_j^{(\ell)}\) , we have
Substituting this back, and defining the term \( \delta_j^{(\ell)}\)
the weight gradient becomes
(318)
Similarly, the bias gradient is
(319)
The key challenge is to compute the error term \( \delta_j^{(\ell)}\) for all layers. The loss \( {\mathcal C}\) depends directly on the output activations \( a_j^{(L)}\) and the activations \( a_j^{(L)}\) depend on the net inputs \( z_j^{(L)}\) . We have
Since \( a_j^{(L)} = \sigma(z_j^{(L)})\) , the second term is the derivative of the activation function
Hence, the output layer error is
(320)
The error term \( \delta_j^{(\ell)}\) for a hidden layer \( \ell\) is found by relating it to the errors in the next layer, \( \delta_k^{(\ell+1)}\) . This is where the name backpropagation comes from.
Applying the chain rule again gives
(321)
where the sum is over all neurons \( k\) in layer \( \ell+1\) .
Substituting the definition \( \delta_k^{(\ell+1)} = \frac{\partial {\mathcal C}}{\partial z_k^{(\ell+1)}}\) into (321) yields
(322)
Now we compute the second term. From \( z_k^{(\ell+1)} = \sum_{j'} w_{kj'}^{(\ell+1)} a_{j'}^{(\ell)} + b_k^{(\ell+1)}\) and \( a_j^{(\ell)} = \sigma(z_j^{(\ell)})\) we get
Plugging this back into equation (322) gives
We now factor out the term \( \sigma'(z_j^{(\ell)})\) which is independent of the summation and arrive at
(323)
This is the “Backpropagation Error Equation”: the error at layer \( \ell\) is calculated by taking a weighted sum of the errors from the next layer \( \ell+1\) and multiplying it by the derivative of the activation function at layer \( \ell\) .
Backpropagation has two phases, a forward pass and a backward pass. The forward pass consists of the following steps:
Propagate the input \( x\) through the network, layer by layer, computing all net inputs \( {z}^{(\ell)}\) and activations \( {a}^{(\ell)}\) for all \( \ell\) .
The backward pass consists of four steps which comprise the gradient calculation and update:
Output error (\( \delta^{(L)}\) ): Compute the error term for the output layer \( L\) using equation (320):
Backpropagate error (\( \delta^{(\ell)}\) ): Compute the error term for each preceding layer \( \ell=L-1, L-2, \dots, 1\) using the errors from the layer above (equation (323)):
Calculate gradients (\( \nabla_{W} {\mathcal C}\) and \( \nabla_{{b}} {\mathcal C}\) ): Use the computed error terms \( \delta^{(\ell)}\) to find the gradients for all weights and biases, (equations (318) and (319)):
Update parameters: Perform a gradient descent step to update the weights and biases
Backpropagation is computationally efficient because it reuses intermediate computations from the forward pass. Specifically, it computes gradients layer by layer in reverse, leveraging the fact that the gradient of the loss with respect to earlier layers can be expressed recursively in terms of gradients from later layers. This efficiency is crucial for training deep neural networks, where the number of parameters can be large, and the computation of gradients must be optimized.
Training deep networks presents several challenges, which necessitate the use of some form of regularization. These challenges include:
Vanishing and exploding gradients: During backpropagation, gradients can become very small or very large, making learning difficult. Techniques such as careful initialization, batch normalization, and gradient clipping as well as using ReLU as activation function are used to mitigate these issues.
Overfitting: Deep networks with many parameters are prone to overfitting the training data. To prevent overfitting, regularization techniques are often employed. Common methods include adding a penalty term such as \( \lambda \|W\|_2^2 \) to the loss function and a technique called dropout: to randomly drop units from the neural network during training to prevent co-adaptation of neurons.
Early stopping is a particularly effective strategy in which training is halted once performance on the validation set ceases to improve. This implicitly regularizes the model and reduces the risk of fitting noise in the training data.
Data augmentation is another technique used to avoid overfitting by increasing the diversity of the training data without actually collecting new data. It involves applying various transformations to the existing data to create new, slightly modified versions of it. For example, in image classification, an object should be recognizable regardless of its position, orientation, or lighting conditions. By augmenting the data to include controlled variations in the image training data, such as shifts, rotations, flips, scaling, and changes in brightness or contrast, we can help the model to generalize better to unseen data.
Training a neural network is not only a matter of choosing an architecture and an optimization algorithm; it also requires a carefully designed experimental protocol to ensure that the resulting model generalizes beyond the data it was trained on. We briefly describe best practices for setting up a reliable neural network training pipeline. These principles actually apply to any supervised data science learning task.
A fundamental principle of supervised learning is the separation of data into disjoint subsets with distinct roles. Typically, the available dataset is divided into a {training set}, a validation set, and a test set. A common heuristic is to split the data into 70% training, 10% validation, and 20% test data .
The training set is used to fit the model parameters via optimization algorithms such as stochastic gradient descent. The validation set is used to tune hyperparameters and make modeling decisions, while the test set is held out and used only once to obtain an unbiased estimate of the final model’s generalization performance. Cross-validation (introduced in connection with ridge regression in Definition 7) is typically used for parameter tuning. Crucially, the test set must not influence any aspect of model design or training.
Neural networks involve numerous hyperparameters, including learning rates, batch sizes, network depth and width, regularization coefficients, and optimization settings. Hyperparameter tuning is typically performed by training multiple models on the training set and evaluating their performance on the validation set. Techniques range from manual tuning and grid search to more sophisticated approaches such as random search or Bayesian optimization. Importantly, all hyperparameter choices must be finalized before evaluating performance on the test set.
Data leakage occurs when information from outside the training set is inadvertently used during training or model selection, leading to overly optimistic performance estimates. Common sources of leakage include preprocessing steps (such as normalization or feature selection) performed using the full dataset, or repeated evaluation on the test set during model development.
To avoid data leakage, all data-dependent preprocessing operations should be fit exclusively on the training data and then applied unchanged to the validation and test sets. Likewise, the test set should remain completely isolated until the very end of the training pipeline.
Once the training and tuning process is complete, the final model is evaluated on the test set to estimate its generalization performance. This evaluation should be performed exactly once to prevent data leakage.
Training large neural networks requires significant computational resources. The development of specialized hardware (e.g., GPUs, TPUs) and distributed training techniques has helped to alleviate this problem.
However, computational complexity remains a critical concern, in particular for Large Language Models. Training these models demands immense computational resources, with cost and time scaling rapidly with model size, dataset volume, and sequence length. Architectures like Transformers involve operations that scale quadratically with input length, making efficiency a key bottleneck.
Various architectures have been developed to handle different types of data and tasks. In the previous sections we already have discussed (fully connected) feedforward networks, also known as multilayer perceptrons. In this section we briefly survey other widely used architectures.
Convolutional Neural Networks [225, 226] (CNNs) are the architecture that fundamentally enabled the modern breakthrough in computer vision. Indeed, CNNs are particularly effective for processing grid-like data such as images. They use convolutional layers to extract local patterns through learned filters.
Mathematically, a CNN is a neural network where the weight vectors in a given layer are formed by discrete convolution with a finite number of kernels. For one-dimensional data, this is equivalent to saying that the weight matrix \( W^{(\ell)}\) is a Toeplitz matrix, i.e.,
(324)
where for convenience we have omitted the layer dependence in the individual matrix entries in (324). The Toeplitz matrix can be equivalently represented by a filter or kernel \( g\) defined via \( g(j) = t_j\) . When the input is two-dimensional (such as images), the weight matrix of a CNN has the structure of a block-Toeplitz matrix with Toeplitz blocks. In either case, one can take advantage of the Toeplitz-type structure, which gives rise to fast matrix-vector multiplication via the (1D or 2D) Fast Fourier transform.
CNNs typically use multiple kernels in their convolutional layers. This is motivated by the hope that each filter will learn to detect a different kind of feature in the input. Having multiple filters allows the layer to build up a set of complementary feature maps that together describe the input from different perspectives.
There are two main advantages to a CNN compared to a general neural network:
Usually this convolution is combined with subsampling, which is intended to create insensitivity against scaling. In the CNN literature, this is known as pooling, and there are several ways this is implemented, such as max pooling or average pooling. Consider a “pooling window” of size \( k \times k\) centered or anchored at position \( (i,j)\) (in the initial layer position \( (i,j)\) corresponds to the pixel in the \( i\) -th row and \( j\) -th column of the input image). Max pooling selects the maximum value within the window. It acts as a non-linear feature detector, identifying the presence of a specific pattern (like an edge or texture) regardless of its exact location within the window. Average pooling computes the arithmetic mean of all values in that window. It treats the feature map as a signal and acts as a low-pass filter, smoothing out the activations
Figure 91 illustrates a common architecture for a Convolutional Neural Network (CNN) used for image classification.
There is ample empirical evidence that in early layers of the CNN, filters might detect simple local patterns (edges, corners, color gradients), while in deeper layers, filters respond to more complex “global” patterns (textures, shapes, or object parts). See Figure 92 for an illustration of this observation. Here we use a CNN with four convolutional layers. The input image to the CNN is an image of a goldfish. The figure displays a so-called Class Activation Map (CAM) for each layer. The CAM is a technique used for CNN’s in connection with image classification to visualize which regions of an input image are most responsible for a model’s decision for a particular class [227]. It is intended to provide an interpretable heatmap highlighting the spatial regions that contribute most strongly to the predicted class score. A CAM is essentially a weighted sum of all the feature maps of a specific layer. The left column in Figure 92 shows the CAM for layers 1 to 4 (from top to bottom). The right columns depicts the CAM overlaid with the original image . It is evident how the CNN picks up localized information in the initial layers and more global features in the latter layers.
CNNs are widely used in computer vision tasks, such as image classification [226, 229] (assigning a label to an entire image), object detection [230] (identifying and locating objects within an image), and image segmentation [231, 232] (classifying each pixel in an image to a particular class), which is useful in tasks like medical image analysis.
A Graph Neural Network (GNN) is a machine learning model designed to perform inference on data structured as graphs [233, 234]. A GNN learns representations by iteratively propagating and transforming information along the edges of a graph, combining local connectivity via message passing with learnable nonlinear transformations
Given a graph \( G=(V,E)\) with nodes \( v \in V\) and edges \( e \in E\) , let \( h_{v}^{(k)}\) denote the representation of node \( v\) at layer \( k\) . A generic message-passing update is:
(325)
where \( \mathcal{N}(v)\) denotes neighbors of \( v\) , \( m_v^{(k)}\) is the updated message, and \( \phi\) is a learnable message function possibly depending on edge features \( e_{uv}\) . This preserves permutation invariance of node orderings.
At a high level, a graph neural network layer consists of two conceptually distinct operations, repeated across layers:
By stacking multiple GNN layers, a node’s final representation \( h_v^{(L)}\) can capture information from its \( L\) -hop neighborhood (nodes up to \( L\) steps away). The final representations are then used for downstream tasks like node classification, link prediction, or graph classification.
A popular GNN variant, is the Graph Convolutional Network (GCN) [234]. The layer-wise propagation rule of a GCN can be expressed as:
where \( H^{(k-1)} \in \mathbb{R}^{|V| \times d_{k-1}}\) is the matrix of node representations from layer \( k-1\) , \( W^{(k)}\) is a learnable weight matrix (the model’s parameters), \( \sigma\) is a non-linear activation function, \( \tilde{A} = A + I\) is the adjacency matrix with self-loops (allowing a node to include its own previous state in the aggregation), where \( A\) is as defined in (111), and \( \tilde{D}\) is the degree matrix (as defined in (113)) of \( \tilde{A}\) .
The reader may wonder where the concept of a convolution enters in graph convolutional networks, which would justify their name. Spectral graph theory provides the answer. We can define the concept of a convolution on a graph in terms of the graph Laplacian \( L = D - A\) , as defined in (114). The graph Laplacian has an orthonormal eigendecomposition \( L = U \Lambda U^T\) , where \( U\) contains the eigenvectors (graph Fourier modes), and \( \Lambda\) the eigenvalues (graph frequencies) of \( L\) . We can now define convolution on graphs by analogy to the standard convolution theorem where \( U\) plays the role of the Fourier transform on a graph. One can then show that a GCN is a first-order approximation of convolution on graphs [235].
Graph neural networks find applications in particle physics [236], molecular and chemical modeling to predict molecular properties [237], drug discovery [238], and protein structure analysis [239], as well as in traffic network modeling and in recommendation systems [240].
For sequential data, Recurrent Neural Networks (RNNs) [241] introduce recurrence by updating a hidden state \( h_t\) using input \( x_t\) via
where we emphasize that \( h_t\) depends on \( h_{t-1}\) . The hidden state carries memory across time steps. Variants such as Long Short-Term Memory (LSTM) [242] modify the update rule by introducing gating mechanisms to mitigate vanishing and exploding gradients, enabling modeling of longer dependencies.
RNNs have been applied to natural language modeling (before transformers took over), in time-series forecasting (financial markets, weather prediction, physiological monitoring in healthcare), and to sequential control (robotics and reinforcement learning environments with temporal structure).
In RNNs, the influence of a past input \( x_t\) on later states \( h_{t+k}\) propagates through repeated multiplication by the recurrent Jacobian
This leads to vanishing (or sometimes exploding) gradients, making it difficult to learn dependencies over long distances in the sequence. While standard feed forward neural networks also can suffer from this problem as they grow (deeper for neural networks, longer for RNNs), the mathematical mechanism in RNNs makes the decay exponential relative to the sequence length. RNN multiplies the same recurrent matrix many times. This makes the vanishing/exploding behavior potentially much more systematic and severe.
Although LSTMs were explicitly designed to solve the vanishing gradient problem that plagued simple RNNs, they still struggle to effectively maintain information and capture dependencies over very long sequences in practice.
The fundamental design of RNNs and LSTMs requires them to process sequence data (like words in a sentence) one step at a time. The calculation for the current word’s hidden state depends on the hidden state of the previous word, meaning one cannot compute the representation for the entire sequence simultaneously. This sequential dependency makes it impossible to fully parallelize the computation across modern hardware (like GPUs or TPUs). Training RNNs and LSTMs, therefore, becomes computationally expensive and time-consuming as datasets and sequences become very large, because the network must be “unrolled” over the entire sequence and trained via backpropagation through time, leading to linear growth in computation and memory with sequence length. Additionally, the inherently sequential structure prevents parallelization across time steps, and LSTMs add further per-step computational overhead.
The creation of Transformers was driven primarily by the two aforementioned major limitations of RNNs and their variants like LSTM networks: the inability to efficiently capture long-range dependencies and the lack of parallelization. The transformer architecture [243] addresses these limitations by replacing recurrence with so-called attention mechanisms, creating a direct link between every word and every other word in the sequence, regardless of distance and allowing global context to be modeled in parallel. Transformers have become the state-of-the-art architecture for natural language processing tasks and as such are the core architecture behind modern Large Language Models (LLMs).
We give a brief mathematical derivation of transformers, following in part the approach taken in [244]. A token is the fundamental unit into which input data of a transformer is divided before being processed by the model. For text, a token usually corresponds to a word, subword, or even a single character, depending on the chosen tokenization scheme. Similarly, an image can be broken up into a set of patches which are then used as tokens. Each token is mapped to a vector embedding before entering the transformer. The embeddings can be fixed or they can be learned together with the other parameters of the model. Each token is mapped to a vector embedding (a technique pioneered by methods like word2vec [245]) before entering the transformer.
Let a sequence of \( n\) \( d\) -dimensional tokens be given as
where each \( x_j^{(0)}\) is a vector embedding of the \( j\) -th token.
Since the core attention mechanism is invariant to the order of the input, and since the order of inputs matters for applications like NLP, the network needs to be explicitly supplied with information about the position of each token. This is achieved by adding a positional encoding vector \( p_j \in \mathbb{R}^d\) to the input embedding \( x_j\) :
(326)
The original Transformer uses fixed sinusoidal functions for the positional encoding. An alternative, often used in modern LLMs, is to make the positional encodings learnable parameters.
The collection of inputs \( z_j\) forms a matrix
The transformer will take as input the position-encoded token sequence matrix \( Z^{(0)}\) and return a representation of the sequence in terms of another \( d \times n\) matrix \( Z^{(L)}\) , where \( L\) denotes the number of layers in the transformer.
The output \( Z^{(L)}\) is calculated by iteratively applying a transformer block
The transformer block consists of two stages: one stage that operates along the sequence dimension and another that operates across the feature dimension. The first stage contains the key innovation of transformers, the so-called self-attention mechanism. In this first stage, each feature is refined based on dependencies among tokens across the sequence—for instance, how a word at position \( j\) depends on a previous word at positions \( j'\) , or how two image patches correspond to one another. This stage acts vertically across the columns of \( Z^{(\ell-1)}\) . In the second stage the features associated with each token are refined. This stage acts horizontally along the rows of \( Z^{(\ell-1)}\) . Through repeated application of the transformer block, the representation of token \( j\) and feature \( i\) becomes influenced by information from token \( j'\) and feature \( i'\) . As Turner points out in [244], the concept of interleaving processing across the sequence and across features is common among many machine learning architectures. For example, in graph neural networks one interleaves processing across nodes and across features.
We will describe the first stage of the tranformer-block, namely the multi-head self-attention in more detail.
Attention. The output of the first stage of the transformer block in the \( \ell\) -iteration is a \( d \times n\) matrix \( Y^{(\ell)}\) . The output is produced by aggregating information across the sequence independently for each feature using an operation called attention. This is the fundamental operation of transformers, which proceeds as follows. The output vector at location \( j\) , denoted by \( y^{(\ell)}_j\) is calculated by a weighted average of the input features \( z^{(\ell-1)}\) at location \( j' = 1,\dots,n\) via
(327)
Here the weighting is done by a so-called attention matrix \( A_{j,j'}^{(\ell)}\) of size \( n \times n\) . The attention matrix is normalized such that \( \sum_{j'=1}^n A_{j',j}^{(\ell)} = 1\) for all \( j=1,\dots,n\) .
The idea of the attention matrix is that \( A_{j,j'}^{(\ell)}\) will take a large value for locations in the sequence \( j'\) that are of high relevance for location \( j\) , and a small value in case there is little relevance between the two.
We can conveniently write this correspondence as matrix multiplication
Self-attention. But we have not yet explained how we decide which values to assign to the entries of the attention matrix \( A_{j,j'}^{(m)}\) . One of the key aspects of the transformer is that the entries of the attention matrix are determined via the input data themselves, i.e., attention is computed via self-attention. We could do this by measuring the similarity between two locations by the inner product between the features at those two locations, i.e., by considering \( \langle z_{j'}^{(\ell)}, z_{j}^{(\ell)} \rangle\) . And we could turn these inner products into probabilities by applying the softmax function defined in equation (317). The softmax operation ensures that attention weights are nonnegative and sum to one across each row. So, shall we compute the attention matrix as
Alas, this simple approach is doomed to fail, since it entangles information about the similarity between locations in the sequence with the content of the sequence itself.
One possibility to curtail this undesirable entanglement is to apply a linear transformation \( W\) to the sequence \( z_j^{(\ell)}\) . That is, shall we consider
Yet, this choice is still not quite suitable, at least not for natural language processing tasks. Indeed, the inherent symmetry of the expression \( \exp\big(\langle W z_{n}^{(\ell)} , W z_{n'}^{(\ell)} \rangle\big)\) contrasts with the lack of symmetry we typically encounter in the relationship between words. For instance, the word marsupial is strongly related to the word mammal. In contrast, the word mammal is only weakly associated with marsupial, since there are many other mammals and many among those (e.g., lion, elephant, whale,...) are much more frequently associated with mammals.
It is easy to break this symmetry by introducing for instance two different linear transforms, let us call them \( W_{k}\) and \( W_q\) . For convenience, we choose both matrices to be of dimension \( d_k \times d\) . Usually one chooses \( d_k < d\) such that \( W_k\) and \( W_q\) project onto lower-dimensional subspaces, with the aspiration that only the most important features of \( z_j^{(\ell)}\) prevail in the similarity computations. Moreover, for improved numerical stability we divide the matrices in the exponents by the square-root of the dimensionality of the projected vectors. With this asymmetric notion of similarity and normalization in place, we arrive at the desired formula for our attention matrix, namely
(328)
Equations (327) and (328) taken together represent what is referred to as the self-attention mechanism. Owing to the fact that the entries of \( A_{j',j}^{(\ell)}\) are non-negative and each column of \( A\) sums up to 1 by construction, each output vector \( y_j^{\ell}\) is formed by a convex combination of the input features \( z_j^{\ell-1}\) .
The two quantities \( q_j = W_q z_j^{(\ell)}\) and \( k_j = W_k z_j^{(\ell)}\) arising in the inner products of (328) are typically known as the queries and the keys, respectively (where we have adopted the convention of suppressing the subscripts in the queries and the keys).
The reader who is used to seeing the attention mechanism in the form
(329)
may rest assured that we can easily recover expression (329) from (328) and (327). To that end we first collect the queries \( q_j\) and keys \( k_j\) in matrices \( Q = [W_q Z^{(\ell)}]^T \in \mathbb{R}^{n \times d_k}\) and \( K = [W_k Z^{(\ell)}]^T \in \mathbb{R}^{n \times d_k}\) , respectively. This already establishes that \( \operatorname{softmax} \big( QK^\top/\sqrt{d_k} \big) = A^{(\ell)}\) .
Why is the value-matrix \( V\) (or \( W_v\) for that matter) not present in (327) or in (328)? The reason we skipped \( V\) until now is that the original transformer architecture introduces another projection in the so-called multi-head self-attention (discussed in subsequent paragraphs), which as noted in [244], creates unnecessary redundancy that we are avoiding here.
The transformer’s self-attention can be viewed as a kernel smoother: after learned linear projections \( Q\) ,\( K\) ,\( V\) the output at query \( q\) is a normalized, similarity-weighted average of value vectors \( z_j\) . This is mathematically analogous to kernel regression estimation (cf. Chapter 7.5 and also [115, 116]) with the attention score \( \exp (\langle q, k \rangle)\) acting as the kernel. The difference is that in classical kernel regression, the kernel function, often chosen as \( K(z,z') = \exp(\frac{-\|z-z'\|^2}{2\sigma^2})\) , is fixed (up to hyperparameters like the kernel bandwidth \( \sigma\) ). It defines a static notion of similarity between data points. By contrast, in a transformer’s attention, the (non-symmetric) kernel \( K(z_i,z_j)=\exp(\langle q_i, k_j \rangle)=\exp(\langle W_q z_i , W_k z_j\rangle)\) is learned and adaptive. The similarity metric itself depends on trainable parameters \( W_q, W_k\) . As training progresses, these parameters change to reflect task-specific or context-dependent notions of similarity.
Multi-head self-attention. A single attention head must use one set of attention weights per token to encode all the different features and relationships. This forces it to average or blend various types of information, which limits its expressive power. This can be addressed by using multiple heads.
The multi-head attention mechanism is a refinement that allows the model to collectively attend to information from different representation subspaces at different positions. Instead of performing a single attention function, the query, key, and value matrices are linearly projected several times with different, learned parameter matrices.
Instead of a single attention operation, the transformer block employs attention in \( H\) parallel sets, called heads, and then linearly projects the output onto \( d \times n\) arrays. This enables the model to capture dependencies across multiple representational subspaces simultaneously. The use of multiple heads in transformers is akin to the use of multiple channels in CNNs. In detail, the multi-head self-attention operation is given by
(330)
where the \( H\) matrices \( V_h^{(\ell)}\) are of dimension \( d \times d\) . The standard multi-head presentation can be recovered by simply setting \( V_h\) to be a low-rank matrix \( V_h = W_h W_{v,h}\) where \( W_h \in \mathbb{R}^{d \times d_v}\) and \( W_{v,h} \in \mathbb{R}^{d_v \times d}\) . In this case, the matrices \( V_h^{(\ell)}\) act like (non-orthogonal) projections onto a \( d_v\) -dimensional linear subspace. The matrices \( W_k^{(\ell)}, W_q^{(\ell)}\) , \( W_{v,h}^{(\ell)}\) , and \( W_v^{(\ell)}\) are unknown parameters that need to be learned during the training.
In the second stage of the tranformer block a pointwise feed-forward network is applied row-wise across features. This simple two-layer fully connected network takes the form
A transformer layer combines multi-head attention with feed-forward transformations (together with two standard tricks of the trade, namely residual connections and layer normalization, to stabilize training). Stacking \( L\) such layers yields the encoder (or decoder) of a transformer.
An encoder processes input sequence embeddings into contextual representations. A decoder generates outputs, using both self-attention and cross-attention, where queries attend over encoder outputs. More specifically, in cross-attention the Queries (Q) come from the target sequence (e.g., the sentence being generated in the Decoder), while the Keys (K) and Values (V) come from the source sequence (e.g., the sentence being translated in the encoder). In self-attention the model asks, “How do the words in this sentence relate to each other?”. In cross-attention the model asks, “Which part of the input sentence is relevant to the word I am currently writing?”
The transition from high-dimensional internal hidden states to a discrete output (like words or tokens) occurs in the final output head. This stage is structured to map a continuous vector representation back into a probability distribution over the model’s vocabulary.
After the final decoder block, each token position is represented by a hidden vector \( h \in \mathbb{R}^d\) , where \( d\) is the model dimension (e.g., 512 or 768). To map this to the vocabulary, the model applies a linear transformation
where \( W_U \in \mathbb{R}^{d \times V}\) is the so-called unembedding matrix, \( V\) is the vocabulary size (often 30,000 to 100,000+), and the \( u \in \mathbb{R}^V\) are the logits. Each element \( u_i\) represents the raw “score” for the \( i\) -th word in the dictionary. The logits are unconstrained real numbers. To interpret them as probabilities, the softmax function is applied
where the hyperparameter \( \tau\) is called the temperature , which controls the “sharpness” of the resulting probability distribution across every single unique token in the model’s vocabulary. A low \( \tau\) (\( \tau < 1\) ) makes the model more deterministic, while a high \( \tau\) (\( \tau > 1\) ) increases randomness.
The transformer architecture underlies a number of well known models such as BERT [246] (encoder-only), GPT [247], Gemini [248], and Claude [249] (generally understood to be decoder-only) and of course the original Transformer [243] (encoder–decoder). Regarding expressivity, it has been shown that transformers are universal approximators of sequence-to-sequence functions under mild assumptions [250].
While attention-based architectures have become ubiquitous in machine learning, our mathematical understanding of the reasons for their effectiveness remains limited. There is no comprehensive theory yet describing how architectural elements such as depth, width, attention heads, and positional encodings jointly determine expressivity or enable emergent algorithmic structure. Also, the quadratic scaling of the self-attention mechanism creates a significant computational bottleneck for long-sequence data. Progress will likely require new tools from functional analysis, dynamical systems, information theory, and statistical learning theory, as well as closer links between theory and empirical behavior.
In previous chapters we encountered different approaches to dimension reduction: PCA finds the optimal linear subspace by minimizing the \( \ell_2\) -reconstruction error, the Johnson-Lindenstrauss lemma guarantees nearly isometric embeddings in logarithmically small dimensions, and diffusion maps reveal the intrinsic geometry of a data manifold through the eigenfunctions of a Markov operator. Each of these methods imposes structure on the embedding—linearity, isometry, or smoothness with respect to a diffusion process—and derives guarantees from that structure.
Autoencoders offer a complementary perspective based on neural networks. Rather than prescribing the form of the embedding analytically, they learn an encoder–decoder pair from data by minimizing a reconstruction objective. The latent representation that emerges occupies the same conceptual space as the principal components or diffusion coordinates: a low-dimensional summary of high-dimensional data [251, 252]. What changes is the hypothesis class. By using nonlinear, multi-layer mappings, autoencoders can capture structure that lies beyond the reach of PCA.
Definition 31 (Autoencoder)
An autoencoder consists of an encoder \( f_\phi : \mathbb{R}^d \to \mathbb{R}^k\) , where \( k \ll d\) , and a decoder \( g_\psi : \mathbb{R}^k \to \mathbb{R}^d\) , each parameterized by weights \( \phi\) and \( \psi\) drawn from some neural network architecture. Given a dataset \( \{x_1, …, x_n\} \subset \mathbb{R}^d\) , the parameters are found by minimizing the reconstruction loss
(331)
The composition \( \Pi = g_\psi \circ f_\phi : \mathbb{R}^d \to \mathbb{R}^d\) is called the reconstruction map, and the image \( f_\phi(x_i) \in \mathbb{R}^k\) is the latent code or latent representation of \( x_i\) .
The architecture of the encoder and decoder is flexible. Typically, both are deep networks with multiple hidden layers and pointwise nonlinearities. The bottleneck layer of dimension \( k\) forces the network to compress information, producing a low-dimensional representation as a byproduct of learning to reconstruct, as illustrated in Figure 101.
It is instructive to consider linear autoencoders. A linear autoencoder constrains both \( f_\phi\) and \( g_\psi\) to be linear maps:
where \( W \in \mathbb{R}^{k \times d}\) and \( V \in \mathbb{R}^{d \times k}\) . The reconstruction loss becomes
(332)
where \( X \in \mathbb{R}^{n \times d}\) is the data matrix with rows \( x_i^\top\) . A straightforward calculations shows that the global minimizers of this objective are precisely the PCA subspaces [253].
However, the power of autoencoders lies in their nonlinear generalizations. When \( f_\phi\) and \( g_\psi\) are nonlinear maps—realized as multi-layer networks—the autoencoder can in principle learn to exploit nonlinear structure in the data manifold.
The Universal Approximation Theorem implies that sufficiently wide or deep encoders and decoders can approximate any continuous function on a compact set. This expressivity comes at a cost: unlike PCA, nonlinear autoencoders have non-convex loss landscapes, and gradient-based training finds only local minima in general.
Vanilla autoencoders as described so far are purely discriminative: they learn a deterministic encoder–decoder pair without placing any structure on the latent space. Indeed, without regularization, the learned latent space may not have any useful geometric structure: nearby points in \( \mathbb{R}^d\) need not map to nearby codes in \( \mathbb{R}^k\) . Several structured variants address these issues. Arguably the most successful approach to date is the variational autonecoder that we will describe next.
In a standard autoencoder, the encoder maps each data point to a single code, and there is no mechanism preventing the latent codes from collapsing into isolated clusters with large empty regions between them. Decoding a point from such an empty region produces meaningless output. A so-called variational autoencoder (VAE) tries to prevent this by imposing a probabilistic model on the latent space, and thereby aims to enable both principled inference and generation of new samples [254, 255].
A latent variable model posits that each observed data point \( x \in \mathbb{R}^d\) is generated by first sampling an unobserved latent variable \( z \in \mathbb{R}^k\) from a prior distribution \( p(z)\) , and then sampling \( x\) from a conditional distribution \( p_\psi(x | z)\) parameterized by \( \psi\) . The joint distribution is
and the marginal likelihood of an observation is
(333)
The canonical choice is a standard Gaussian prior \( p(z) = \mathcal{N}(0, I_k)\) and a Gaussian or Bernoulli likelihood \( p_\psi(x | z)\) parameterized by a neural network. The goal of learning is to find \( \psi\) maximizing the log-likelihood \( \sum_{i=1}^n \log p_\psi(x_i)\) .
The fundamental difficulty is that the integral (333) is intractable for nonlinear \( p_\psi(x | z)\) ; one cannot evaluate it in closed form, and naive Monte Carlo estimation has prohibitively high variance in high dimensions. The VAE resolves this by introducing a tractable approximate posterior.
We proceed as follows. For any distribution \( q(z | x)\) , Jensen’s inequality applied to the concave logarithm gives
(334)
The right-hand side of (334) is called the evidence lower bound (ELBO), also written \( \mathcal{L}_{\mathrm{ELBO}}(x; \phi, \psi)\) . The gap between the log-likelihood and the ELBO is exactly the KL divergence between the approximate and true posterior:
(335)
This identity has two important consequences. First, the ELBO is indeed a lower bound on the log-likelihood for every choice of \( q\) . Second, the bound is tight (i.e., \( \mathrm{ELBO} = \log p_\psi(x)\) ) if and only if \( q_\phi(z | x) = p_\psi(z | x)\) almost surely, that is, when the approximate posterior equals the true posterior. Maximizing the ELBO therefore simultaneously pushes toward higher likelihood and toward a better approximation of the posterior.
This is the key for the variational autoencoder, which parameterizes the approximate posterior as a Gaussian with a diagonal covariance:
(336)
where \( \mu_\phi : \mathbb{R}^d \to \mathbb{R}^k\) and \( \sigma_\phi^2 : \mathbb{R}^d \to \mathbb{R}^k_{>0}\) are neural networks with shared weights up to the final layer (the encoder). The likelihood is parameterized as
(337)
where \( g_\psi : \mathbb{R}^k \to \mathbb{R}^d\) is a neural network (the decoder) and \( \tau^2 > 0\) is a fixed or learned variance. The parameters \( (\phi, \psi)\) are trained to maximize the ELBO summed over the dataset, i.e,
(338)
The ELBO term in (338) decomposes into two competing terms, each with a distinct interpretation:
Without the KL regularization term, the model could simply assign each input to a very distant narrow point in latent space to minimize reconstruction error, leading to a “fractured”latent space. The KL term forces the clusters to overlap and stay centered, with the goal that points close to each other in the latent space decode to visually or structurally similar outputs.
Autoencoders have found broad application across scientific and engineering domains, owing to their ability to learn compact, task-relevant representations without labeled data [256, 257, 258, 259]. The latent codes learned by an autoencoder can serve as features for downstream supervised tasks, especially in settings where labeled data is scarce [260, 261]. Autoencoders now frequently appear as components of larger systems, rather than standalone dimension-reduction tools. Examples include privacy-preserving and federated learning pipelines, anomaly detection systems, and generative models.
While in generative AI autoencoders have been outperformed by diffusion models in terms of quality of the generated data [262, 263], latent diffusion models often rely on high-quality autoencoder-style compression as a preprocessing step, underscoring the continued relevance of learned low-dimensional representations even when the final objective is generative rather than descriptive [264, 265].
Exercise 122
(Linear classification with the perceptron). The perceptron is a simple linear classifier for binary classification. Given a dataset
the perceptron algorithm iteratively updates a weight vector \( w \in \mathbb{R}^d\) and bias \( b \in \mathbb{R}\) as follows:
For each misclassified point \( x_i\) (i.e., \( y_i(w^T x_i + b) \le 0)\) update:
(a) Prove that if the data are linearly separable, there exists a finite number of updates after which the perceptron algorithm finds a separating hyperplane.
(b) Let \( R = \max_i |x_i|\) and \( \gamma\) the margin of separation. Show that the number of updates is at most \( (R/\gamma)^2\) .
Exercise 123
Let \( d \in \mathbb{N}\) , and let
where
Show that for every \( N \in \mathbb{N}\) , there exists a one-hidden-layer ReLU neural network \( f_N\) with \( N\) neurons such that
where \( C>0\) is an absolute constant. Conclude that infinite ReLU networks with \( \ell^1\) -summable coefficients admit dimension-independent approximation rates \( O(N^{-1/2})\) .
Exercise 124
(Why the sigmoidal assumption in the UAT is important). Let \( \sigma:\mathbb{R}\to\mathbb{R}\) be a polynomial.
Show that any function in
is a polynomial in \( x\) .
Exercise 125
Assume \( \sigma\) is a sigmoidal activation.
Exercise 126
(Universal approximation in other norms). Let \( 1 \le p < \infty\) .
Exercise 127
Backpropagation and the “vanishing gradient”: Consider a simple \( L\) -layer neural network where each layer has a single neuron. The output is \( y = a_L\) , where \( a_l = \sigma(z_l)\) \( z_l = w_l a_{l-1} + b_l\) \( \sigma(z) = \frac{1}{1 + e^{-z}}\) is the sigmoid activation.
(a) Using the chain rule, derive the expression for the gradient of the loss \( \mathcal{L}\) with respect to the first weight \( w_1\) , i.e., \( \frac{\partial \mathcal{L}}{\partial w_1}\) .
(b) The derivative of the sigmoid function \( \sigma'(z)\) is maximized at \( z=0\) . What is this maximum value?
(c) Explain why, as the number of layers \( L\) increases, the gradient \( \frac{\partial \mathcal{L}}{\partial w_1}\) tends toward zero if the weights are initialized near 1.
Exercise 128
Batch normalization transforms a mini-batch of activations \( X = \{x_1, \dots, x_m\}\) to a new batch \( \hat{X}\) by
(a) Prove that for any input batch \( X\) , the transformed batch \( \hat{X}\) has a mean of 0 and a variance of 1.
(b) If we add a learnable scale \( \gamma\) and shift \( \beta\) such that \( y_i = \gamma \hat{x}_i + \beta\) , what happens to the representation if the network learns \( \gamma = \sqrt{\sigma_B^2 + \varepsilon}\) and \( \beta = \mu_B\) ?
Exercise 129
(The efficiency of depth). This exercise is about an empirical comparison of the number of parameters required by a shallow network versus a deep network to approximate a high-frequency repeating pattern.
We want to approximate a nested sawtooth function \( f(x)\) on the interval \( [0, 1]\) . A sawtooth function \( S(x)\) is defined as
We are interested in the \( k\) -th composition, \( f(x) = S(S(S(\dots S(x) \dots )))\) , which creates \( 2^{k-1}\) “teeth” or oscillations. For this problem, we will target \( k=4\) , which results in 8 oscillations.
Compare the mean squared error for these different network architectures and parameters.
Exercise 130
(Another “depth vs width” exploration). Consider the function
Approximate \( f\) using two neural network architectures with ReLU activation:
Part (a): Shallow network approximation:
Part (b): Deep network approximation:
For each trained model, compute the total number of trainable parameters. Create a plot of approximation error vs number of parameters, with shallow and deep networks on the same axes. Identify which architecture achieves a given target error (e.g. \( 10^{-3})\) with fewer parameters.
Exercise 131
Implement and compare the performance for a network with three hidden layers using different activation functions: sigmoid, tanh, ReLU, and Leaky ReLU on MNIST digit classification.
(a) Plot the gradient norms at each layer during training for each activation function. Which exhibits the worst vanishing gradient problem?
(b) Compare final test accuracy and training time for each activation function.
We want to analyze the behavior of diffusion maps and other non-linear dimensionality reduction methods in the case where the data points
are i.i.d samples from a probability distribution over \( \mathcal{M}\) , a \( d\) -dimensional Riemannian manifold embedded in \( \mathbb{R}^p\) , i.e., \( \operatorname{dim}M = d \ll p\) . We call \( \mathcal{M}\) the intrinsic manifold and \( \mathbb{R}^p\) the ambient space. The weights are defined via a kernel function \( K\) with a local scale \( \sqrt{\varepsilon}\) as follows
For example, weights for the Gaussian kernel are given by
We have previously discussed the random walk matrix \( A = D^{-1}W\) , the random walk Laplacian \( L_{rw} = I - A\) , the graph Laplacian \( L = D - W\) , and the normalized graph Laplacian \( \mathcal{L} = I - D^{-1}W\) . We would like to understand the possible limits
as \( n\to \infty\) and \( \varepsilon \to 0\) , and perhaps we also need to specify the dependency of \( \varepsilon\) on \( n\) (i.e., \( \varepsilon = \varepsilon_n\) ) for the limit to exist and in what sense. We expect that the discrete random walk would converge to a continuous diffusion process over the manifold, but we have to be careful when taking limits. Specifically, we need to be mindful of how to choose \( \varepsilon\) as a function of \( n\) to guaranty convergence, understand the convergence rate, and different types of convergence. Intuitively, one might hope that the discrete graph Laplacian converges to the Laplace-Beltrami operator over the manifold. It turns out that the limiting operator also depends on the distribution of sampled point clouds over the manifold, and different normalizations of the graph Laplacian can yield different limiting operators. Understanding the graph Laplacian at the large sample limit is a powerful tool for gaining insight into the behavior of diffusion maps and related algorithms for nonlinear dimension reduction and the main topic of this chapter.
The problem of density estimation from a point cloud turns out to be intimately related to that of understanding large sample limits of graph Laplacians, and we therefore discuss it first.
We first consider the problem of density estimation on the real line. Let \( p(x)\) be the probability density function (pdf) of the random variable \( X\) , and let \( x_1,x_2,…,x_n\) be i.i.d observations of \( X\) . We employ the Parzen Window [266] for density estimation of the pdf \( p(x)\) from the samples \( \{x_i\}_{i=1}^n\) . We assume that \( p(x)\) is uniformly continuous. To build our estimator, consider a sum of bump functions for estimating \( p(x)\) , \( p_{n,\varepsilon}(x)\) :
It makes sense to choose \( K\) that satisfies the following conditions:
The estimator \( p_{n,\varepsilon}\) is nothing but a smoothed histogram.
In the limit \( n\rightarrow \infty\) , the Law of Large Numbers gives:
(339)
where
is a scaled kernel whose width is \( \sqrt{\varepsilon}\) and height is \( 1/\sqrt{\varepsilon}\) . The estimator \( p_{n,\varepsilon}\) is a convolution of the kernel \( K_\varepsilon\) with the true density \( p\) (i.e. blurring due to \( \varepsilon\) ). In order to reduce the blurring it is tempting to take \( \varepsilon \rightarrow 0\) . This corresponds to narrower bumps about the data (like a delta function), and we see with the above expression that our estimator satisfies
In practice, we do not have an infinite number of samples, so taking \( \varepsilon\) too small can lead to significant errors. We move on to analyze the finite sample case.
For small \( \varepsilon>0\) we use a change of variables \( z = (y-x)/\sqrt{\varepsilon}\) on the integral in (339), and then a Taylor expansion to get:
(340)
where
In (340) the \( \sqrt{\varepsilon}p^\prime(x) z\) term drops out because \( z\) is odd while \( K\) is an even function of \( z\) . Similarly, all integrals involving odd powers of \( z\) vanish. Thus, for \( \varepsilon>0\) our estimator does not converge to \( p(x)\) as \( n\to \infty\) . The estimator is biased, with
Recall the bias-variance decomposition of the mean squared error derived in Chapter 5.4. Now we turn our attention to the variance error of \( p_{n,\varepsilon}\) for finite \( n\) :
(341)
(342)
where for (341), as \( \varepsilon \rightarrow 0\) , we showed that it approaches \( p(x)\) , so it is \( O(1)\) . In (342) we define
Overall,
(343)
where
We see as we try to take \( \varepsilon \rightarrow 0\) , that the standard deviation \( \sigma(\xi_{n,\varepsilon}) = \sqrt{\text{Var}[\xi_{n,\varepsilon}]} \rightarrow \infty\) , so we must pick some optimal choice of \( \varepsilon = \varepsilon_n\) to balance things out. The MMSE criterion
gives
The decay of \( \varepsilon_n\) to 0 is rather slow: the bandwidth is \( \sqrt{\varepsilon_n} = n^{-1/5}\) . For this choice, the MSE decays as \( n^{-4/5}\) instead of the usual \( n^{-1}\) decay in parametric estimation. The decay of the MSE to 0 means that we get pointwise convergence: for every \( x\) , as \( n\to \infty\) , \( p_{n,\varepsilon}(x)\to p(x)\) with probability 1.
Suppose \( x_1,…,x_n\) are i.i.d samples of a random variable \( X\) in \( \mathbb{R}^d\) . We define the density estimator as
If
then
satisfies
We also assume that the kernel function is radially symmetric, that is, it is only a function of the distance:
As before, we calculate the expectation using the change of variables \( z = \frac{x-y}{\sqrt{\varepsilon}}\)
where
Notice that integrals involving mixed terms \( z_iz_j\) for \( i\neq j\) vanish due to the radial symmetry of \( K\) . We see that the Laplacian emerges in a natural way. Let us explain the emergence of the Laplacian from a different viewpoint. Suppose \( K\) is the Gaussian kernel
For \( \varepsilon = 2t\) we have
which is the heat kernel in \( \mathbb{R}^d\) . The convolution
is simply the solution of the heat equation
with the initial condition
In other words, the Gaussian kernel \( K_{2t}(x)\) is the Green function for the heat equation. Formally, the solution is
This shows that for the Gaussian kernel
so that \( m_2 = 1\) (which we already know, since the variance of the standard Gaussian is 1). The Laplacian appears in the bias for all kernels: the only difference is the coefficient \( m_2\) .
Now, let us calculate the variance. The calculation is similar to the one dimensional case:
where
Minimizing the mean squared error
gives
or
so
The MSE is
This is another form of the curse of dimensionality. The number of sample points needed for a given approximation error (MSE) increases exponentially with the dimension \( d\) :
We now turn our attention back from density estimation to the problem of convergence of graph Laplacians in the large sample limit. Note that there are different notions of convergence, and here we choose to focus on pointwise convergence, which although weaker than spectral convergence of eigenvalues and eigenvectors, it does not require too advanced analysis yet highlights the main concepts. The convergence of graph Laplacians is covered in numerous papers and remains a topic of active research [267, 268, 269, 270, 271, 272, 273, 274, 275].
Suppose \( x_1,x_2,…,x_n\) are i.i.d samples from a distribution over \( \mathbb{R}^d\) with pdf \( p(x)\) . We construct an \( n\times n\) weight matrix \( W\) with
The graph Laplacian is the \( n\times n\) matrix
and the random walk Laplacian is
We view all matrices as operators from \( \mathbb{R}^{|V|} \to \mathbb{R}^{|V|}\) . That is, we can apply the matrices to vectors of length \( n=|V|\) that are functions over the data. In other words, we regard the vector
as
with \( f_i = f(x_i)\) . We abuse notation and think of the vector \( f\) as \( n\) samples of the function \( f : \mathbb{R}^d \to \mathbb{R}\) , where the exact usage should be clear from the context. We regard the function \( f\) as being deterministic. That is, given \( x\) the value \( f(x)\) is completely known. Furthermore, we assume that \( f\) is a nice function in the sense that \( f\in C^4(\mathbb{R}^d)\) .
The entries of the diagonal matrix \( D\) are given by
The previous discussion about kernel density estimators shows that for a fixed value of \( \varepsilon\) ,
Since \( f\) is deterministic, we also have
We remark that the term corresponding to \( w_{ii}\) needs to be excluded from the sum, since it is deterministic. However, its contribution is only \( \frac{K(0)}{n}\) and tends to 0 as \( n\to \infty\) . Now, let us consider \( Wf\) :
and its expected value is given by
It follows that
Therefore,
almost surely as \( n\to \infty\) . For the uniform distribution, \( p(x)=const\) the gradient vanishes \( \nabla p = 0\) and we end up with the Laplacian. However, for non-uniform distributions, we get a different operator with diffusion constant and drift that both depend on \( p\) . We conclude that
Let us consider the limiting operator for the random walk Laplacian
We have
We cannot simply conclude that the expected value \( \mathbb{E}[(L_{rw}f)(i)]\) is the ratio of expectations of the numerator and of the denominator since they are not independent. Instead, we use the Law of Large Numbers to conclude that as \( n\to \infty\)
For the uniform distribution (\( p=const\) ) we get that the random walk Laplacian converges to the Laplacian. In the non-uniform case, we get convergence to the backward Fokker-Planck operator [276]: Define a potential function
then
and we have
For example, if the samples come from a Gaussian distribution, i.e.,
then
is a parabolic potential, and the diffusive particle sees a linear drift towards the origin with a slope depending on the location.
Suppose that the data points are sampled from a regular \( C^3\) curve embedded in \( \mathbb{R}^p\) parameterized as \( \gamma(s)\) , where \( s\) is the natural arc-length parameterization, satisfying
Differentiating \( \|\gamma'(s)\|^2=1\) gives
that is, \( \gamma''(s)\) is perpendicular to \( \gamma'(s)\) . Taylor expansion near \( s=0\) gives
We can set a local coordinate system with the origin at \( \gamma(0)\) , the \( x\) -axis in the direction of \( \gamma'(0)\) , and the \( y\) -axis in the direction of \( \gamma''(0)\) (if \( \gamma''(0)=0\) then just pick the \( y\) -axis to be in any direction orthogonal to the \( x\) -axis). In the local coordinate system
where \( a = \|\gamma''(0)\|\) is the curvature. This just means that locally every regular curve looks like a planar parabola. We also need information about the third derivative. Differentiating \( \gamma'(s)\cdot \gamma''(s) = 0\) gives
so
This gives a slightly refined Taylor expansion
In practice, however, we can only measure Euclidean distances in \( \mathbb{R}^p\) . We have no knowledge of the curve and we cannot measure geodesic distances. Luckily, the Euclidean distance is a very good approximation of the geodesic distance for short distances. Specifically, for the chordal distance:
hence
(344)
so we see that the chordal and geodesic distances are the same up to both first and second order. Let \( u=\|\gamma(s)\|\) be the chordal distance, then
and
so
Suppose that the distribution of samples along our path has density \( p(s)\) , and \( x_i=0\) . The expectation of \( D_{ii} = \sum_{j=1}^n w_{ij}\) is (we neglect the contribution of the term \( j=i\) which is \( O(n^{-1})\) )
In the calculation of the integral we substituted \( u =\|\gamma(s)\|\) , and used the change of coordinates \( \frac{ds}{du} = 1 + \frac{1}{8}a^2u^2+ o(u^2)\) , and then substituted \( z = u/\sqrt{\varepsilon}\) , rewrote \( m_2 := \int K(z)z^2\,dz\) , and used the fact that \( \int K(z)dz=1\) , and its symmetry \( K(z)=K(-z)\) . If the curve is \( C^4\) then the \( o(\varepsilon)\) can be replaced by \( O(\varepsilon^2)\) .
It follows that
and
Therefore
While curvature affects both \( D\) and \( W\) , luckily the effect cancels out for the Laplacian! This means that it does not matter how the curve is embedded in \( \mathbb{R}^p\) , you can bend and twist it, yet \( L\) remains the same (to leading order). In that sense, \( L\) depends only on the intrinsic geometry of the data.
A similar cancellation of the curvature effect also applies to the random walk Laplacian:
Thus, even though we have curvature, our normalization brings us back to the Fokker-Planck operator.
What happens on a general manifold? In 1-d we saw that the effect of curvature can be summarized as
In general, through any point on a \( d\) -dimensional manifold we can find an orthogonal system of geodesics. Suppose we can take through a point \( x\) a direction \( x_1\) , and an orthogonal direction \( x_2\) , and another \( x_3\) , etc. We have a system \( s_1, s_2, …, s_d\) .
The Laplace Beltrami operator takes the form
In the case \( \operatorname{dim}(\mathcal{M}) = d\) , every direction may have different curvature \( a_1(x), a_2(x), …, a_d(x)\) , and thus there will be a correction term in the Laplacian. In 1D, the correction was \( \frac{a^2}{4}p\) . Similarly, it can be shown that in \( d\) dimensions the correction term \( E(x)\) in
is
Still, the curvature term \( E(x)\) drops in both \( L\) and \( L_{rw}\) and we have
and
Again, if we define a potential \( U(x) = -2\log p(x)\) then the random walk Laplacian converges to the backward Fokker-Planck operator
The backward Fokker-Planck operator plays a significant role in the analysis of stochastic ordinary differential equations (SDEs) and It^o diffusion processes. Similar to the Laplacian that appears in the heat/diffusion equation describing the evolution of the probability density function of the Brownian motion, the time evolution of the probability density function of a Brownian motion in a potential well \( U(x)\) (i.e., Brownian motion + drift) is governed by the forward Fokker-Planck equation.
The Laplace-Beltrami operator is a self-adjoint operator. Indeed, if we integrate over a manifold with no boundary, we see that
i.e. \( \langle f, \Delta g \rangle = \langle \Delta f, g \rangle\) . This fact that the Laplacian is self adjoint is left as an exercise.
The adjoint \( \mathcal{L}^*\) of the backward Fokker-Planck operator, known as the forward Fokker-Plank operator, is given by
The forward operator can be written as divergence of flux:
where
Here, the first term is flux due to concentration gradient and the second term is due to the drift \( F = -\nabla U\) .
Intuitively, the discrete random walk on the graph of data points cannot get absorbed and the total probability is conserved. As the random walk reaches a boundary point it has no choice but to be reflected back into another data point on the manifold. We therefore have a reflection boundary condition, or no-flux boundary condition given by \( J=0\) . Let us derive the corresponding boundary condition for \( f\) and show that \( \mathcal{L}^*\) is indeed the adjoint of \( \mathcal{L}\) .
This shows that \( \mathcal{L}^*\) is the formal adjoint of \( \mathcal{L}\) if the boundary condition for \( f\) is the homogeneous Neumann
The eigenvectors of \( L_{rw}\) are discrete approximations of the eigenfunctions of the backward Fokker-Plank operator with homogeneous Neumann boundary condition in case \( \partial \mathcal{M} \neq \emptyset\) :
We now turn our attention to a different normalization of the similarities \( w_{ij}\) that leads to different limiting operators. Recall that we began with the symmetric similarity matrix
but now we introduce a new similarity:
where
are the row sums. This yields the symmetric matrix
which can be used to define a new diagonal matrix \( \tilde{D}\) with
and a new Laplacian and a random walk Laplacian
and
Then, \( \tilde{L}_{rw}\) converges to the Laplace-Beltrami operator independent of the density \( p\) , while \( \tilde{L}\) still has some dependency on \( p\) :
and
This means that using this re-normalization the random walk Laplacian \( \tilde{L}_{rw}\) approaches the Laplace-Beltrami operator, even if the sampling distribution is non-uniform. We don’t even need to know the distribution of sampling (i.e. no density estimation required)! However, \( d_i\) in some sense does give you the density. Indeed, \( d_i \propto p(x_i)\) since we previously showed that:
(345)
as \( n\to \infty\) . We have
Therefore,
Hence,
And similarly,
Altogether,
For the random walk Laplacian,
Thus, the density invariant normalized random walk Laplacian converges to the Laplace-Beltrami operator, regardless of the density. The normalization separates the density from the geometry.
We remark that other normalizations and variations of the graph Laplacian have been proposed, analyzed, and applied in practice. For example, the bi-stochastic normalization that can be computed efficiently by Sinkhorn–Knopp (SK) iterations is robust to noise heteroskedasticity [277, 278]. Motivated by the success of self-tuning spectral clustering [279], variable bandwidth diffusion kernels and anisotropic diffusion were analyzed in [102, 280]. Diffusion maps with affinity kernels based on non-Euclidean distances such as optimal transportation Wasserstein distances and others were considered in [281, 282].
For simplicity of exposition, we assume that the points are sampled in \( \mathbb{R}^d\) . The discussion can be extended to the \( d\) -dimensional manifold case without much difficulty. We previously derived the limiting operators for the graph Laplacian and the random walk Laplacian as the number of samples goes to infinity. In practice, however, the number of samples is finite and we need to choose \( \varepsilon = \varepsilon_n\) in a suitable manner in order to ensure that the variance error is not too large. A similar consideration was made earlier for non-parametric density estimation.
We begin by considering the graph Laplacian
The variance is
where
Typically, the leading order term is of size \( \frac{1}{n\varepsilon^{d/2}}\) , but since the function vanishes at \( x_i\) (\( f(x_i) - f(x)|_{x=x_i} = 0\) ), the leading order term vanishes and we get an asymptotically smaller variance. Recall
Therefore, for the uniform distribution \( p(x)=const\) and \( g(x)=f(x_i)-f(x)\) we have
Hence, for the uniform distribution the variance error is \( O(\frac{1}{n\varepsilon^{d/2-2}})\) whenever \( \nabla f = 0\) . For example, if the manifold is the sphere in \( \mathbb{R}^3\) , then \( f(x,y,z)=z\) is extremal at the north and south poles, and the variance error is asymptotically smaller there.
The random walk Laplacian is given by
It is a ratio of two dependent random variables, therefore the variance cannot be simply computed. We can write
where
We want to show that
and to control the size of the fluctuation as a function of \( n\) and \( \varepsilon\) . Recall
and
We conclude that
The correlation between \( F_j\) and \( G_j\) is
Altogether,
Therefore,
By balancing the variance and squared bias we get
or
so the optimal kernel bandwidth is
We can also get bounds on large deviation with high probability. The random variables \( F_j\) are uniformly bounded by
and their variance is
We see that
so Bernstein’s inequality could in principle provide a large deviation bound that is tighter than that provided by Hoeffding’s inequality. Recall Bernstein’s inequality
Since we estimate a quantity of size \( O(\varepsilon)\) (the prefactor of the Laplacian), we need to take \( \alpha \ll \varepsilon\) . Let us take \( \alpha=o(\varepsilon)\) . The exponent in Bernstein takes the form
Choosing
means that the deviation happens with probability that goes to 0 as \( n\to \infty\) (even at all points by union bound). This means that the deviation is of size
We see that the only price to pay in order to get a large deviation bound is a factor of \( \sqrt{\log n}\) . Taking a series \( \varepsilon_n\to 0\) with \( \frac{\sqrt{\log n}}{n^{1/2}\varepsilon_n^{d/4-1/2}}\to 0\) guarantees point-wise convergence, and also uniform convergence.
In the case of data points sampled from a manifold, it is desirable to show that the discrete eigenvectors of the Laplacian operators converge to the eigenfunctions of the differential operators. The pointwise convergence and even the uniform convergence are unfortunately not sufficient to demonstrate this type of convergence. The precise treatment of such spectral convergence is beyond the scope of this textbook.
Consider the eigenvalue problem
which in 1-D is
and if we multiply by the integrating factor \( \exp(-U)\) we get
which is a Sturm-Liouville equation. Thus we know that it has a countable number of eigenvalues, its eigenfunctions form an orthonormal basis for the suitable weighted \( L^2\) space, and everything else that comes with the Sturm-Liouville theory. In particular, Sturm-Liouville theory implies that the first non-trivial eigenfunction sorts points on an open curve according to its arclength, and the embedding of a closed curve in the plane encircles the origin exactly once (see rexercises at the end of this chapter).
Cheeger’s inequality provides a geometric meaning for the second eigenvalue of the Laplacian as an isoperimtric inequality. It holds for both the discrete (graph) and the continuous (manifold) Laplacians. What other geometric information is encoded by the eigenvalues of the Laplacian? The continuous case has been widely explored, and it turns out that the eigenvalues encode some shape information, as was put famously by Mark Kac in his paper in the American Mathematical Monthly in 1966 [283].
The Laplacian appears in many of the important PDEs describing physical phenomenon such as wave propagation, diffusion and heat equation, quantum mechanics (Schrödinger equation), and more. This is perhaps due to the fact that the Laplacian commutes with rotations and translations and therefore appears in the description of physical phenomenon with such symmetries.
Consider a “drum" or vibrating membrane \( D \subset \mathbb{R}^2\) , whose configuration over time \( u(t,x)\) is described by the {wave equation}
where \( \Delta u = u_{x_1x_1} + u_{x_2x_2}\) , and \( c\) is the wave velocity. Fixing the boundary accounts for the Dirichlet boundary condition
We can derive the solution using the usual separation of variables technique. Suppose \( u(t,x) = T(t) X(x)\) , then
resulting in \( T''(t)=-\lambda T \Rightarrow T(t) = e^{\pm \imath \sqrt{\lambda}t}\) and
Therefore, we wish to find the eigenfunctions \( \lbrace\varphi_n\rbrace_{n=1}^\infty\) of the Laplacian \( \Delta\) with Dirichlet boundary condition:
with eigenvalues \( 0 < \lambda_1 \leq \lambda_2 \leq … \leq \lambda_n \leq …\) . We see that the following relationship holds:
Because \( \varphi_1, \varphi_2, …\) form an orthonormal basis to \( L^2(D)\) , we can write
To find \( a_n\) and \( b_n\) , we need initial conditions
and
In 1-D, we have \( u_t=\Delta u\) over the internal \( x\in[0,L]\) . With Neumann boundary conditions \( u_x(t,0)=0\) , \( u_x(t,L)=0\) , the eigenfunctions
are given by
with
Therefore,
In 2-D, the Laplacian is \( \Delta u=u_{xx} + u_{yy}\) . For a rectangle of size \( L_x\times L_y\) we construct the eigenfunction \( \phi_{n m}(x,y)\) by taking the tensor products of eigenfunctions of the respective 1-D equations, e.g.,
The eigenfunction problem then becomes
Then
Notice that the growth of eigenvalues for 2-D is different than the 1-D case.
We count the number of eigenvalues:
For the 1-D case: \( \left(\frac{n\pi}{L}\right)^2 \le \lambda\) , so \( N(\lambda)=\sqrt{\frac{\lambda L^2}{\pi^2}}=\frac{L}{\pi}\lambda^{1/2}\)
For the 2-D case: \( \left(\frac{n\pi}{L_x}\right)^2 + \left(\frac{m\pi}{L_y}\right)^2\le \lambda\) , so \( \frac{n^2}{\left(\frac{\sqrt{\lambda}L_x}{\pi}\right)^2} + \frac{m^2}{\left(\frac{\sqrt{\lambda} L_y}{\pi}\right)^2} \le 1\)
.
In the 2-D, \( N(\lambda)\) is the number of regular lattice points inside the first quadrant of the ellipse with semi axes \( \frac{\sqrt{\lambda}L_x}{\pi}\) and \( \frac{\sqrt{\lambda}L_y}{\pi}\) . Therefore, \( N(\lambda)\) is approximately \( \frac{1}{4}\) the area of the ellipse
We see that in 1-D, \( N(\lambda) = \frac{L}{\pi}\lambda^{1/2}\) , and in 2-D, \( N(\lambda) \sim \frac{\lambda L_x L_y}{4\pi}\) . Similar considerations can be made for higher dimensional boxes.
From this, we can guess that \( N(\lambda) \sim c \lambda^{d/2}\) , \( c = c(d) |D|\) , where \( c(d)\) is some constant that depends on \( d\) and \( |D|\) is the volume of the domain.
The Green’s function \( G_t(x,y)\) enables us to write the solution to the diffusion equation for any initial distribution \( u(0,y)=f(y)\) as
We see that \( G_t(x,y)\) needs to satisfy some conditions. First, from \( u_t = \Delta u\) we must have
Since we want it to hold for any \( f\) , then \( G\) should satisfy the diffusion equation by itself
Also, \( G_t(x,y)\) must satisfy the initial and boundary conditions, e.g.,
and
for Dirichlet boundary condition, or
for Neumann boundary condition.
The heat kernel \( G_t(x,y)\) has the following probabilistic interpretation: it is the probability density function of a Brownian motion \( X(t)\) that starts at \( X(0)=y\) at time 0 to be at \( X(t)=x\) at time \( t\) . It can therefore be regarded as the propagator of the probability density.
Since \( G_t(\cdot,y)\) satisfies the diffusion equation with the boundary condition, we can write
Also, for \( t=0\) we formally have
and upon taking inner product with \( \phi_m\) we get
where we used the orthogonality of Laplacian eigenfunctions. Therefore,
Just like with spectral decomposition of finite matrices, the last equation gives the spectral decomposition of the heat kernel \( G_t\) in terms of its eigenvalues and eigenfunctions. We can also understand the spectral representation of the heat kernel from the fact that the solution to the diffusion equation
is
in the same way that the solution to a system of ODEs
with a constant coefficient matrix \( A\) is
The {trace} of \( G\) is defined as
If we know the spectrum \( \{\lambda_n\}_{n=1}^\infty\) then we can construct the trace, and vice versa, from the trace we can get the eigenvalues (e.g.,
and we can peel-off the eigenvalues one by one).
Motivated by the eigenvalues of the Laplacian in a box, we conjectured that
or equivalently,
which is known as Weyl’s law, that we now derive.
First, we observe that
diverges as \( t\to 0\) because it becomes an infinite sum of ones. At what rate does it diverge? We show that for a region \( \Omega \subset \mathbb{R}^d\) we have
We start with diffusion over the entire real line (no boundary conditions). In this case, the Green function is the Gaussian kernel. Indeed, the Green function satisfies
with the initial condition
We ask then: what does the heat kernel \( G_t(x,y)\) look like? The answer is
so that the solution to the heat equation is obtained by convolving the initial distribution with \( G_t\) :
This result can be proven by taking the Fourier transform of the diffusion equation:
which is a linear first order ODE for each \( \xi\) and \( y\) with solution
Taking the Fourier transform of the the initial condition
we get
Therefore,
and we have
This is a shifted Gaussian in \( \xi\) . The (inverse) Fourier transform of a Gaussian is also a Gaussian. It can be easily verified that
In considering \( \mathbb{R}_+\) for \( u_t=\Delta u\) with Neumann boundary condition \( u_x(0)=0\) , we use the {method of images} to derive the heat kernel. This is done by placing an imaginary diffusive particle at \( -y\) , so its trajectory enters the positive line whenever the original particle leaves it, thus preserving the no-flux boundary condition. The corresponding Green’s function is therefore
Note that for the Dirichlet boundary condition at the origin, the Green’s function is the difference between the two terms.
It is a homework exercise to derive the heat kernel for diffusion in the finite interval \( [0,L]\) . This can be done using the method of images, but now an infinite number of images is required. Still, the short time asymptotic behavior is that of the heat kernel over the entire real line: at very short times our diffusive particle does not “see" the boundary.
{Short-time asymptotics of the heat kernel}: for small times (\( t\rightarrow 0\) ), we obtain \( G_t(x,y)\sim\frac{1}{\sqrt{4\pi t}} e^{\frac{-(x-y)^2}{4t}}\) , again as \( t\rightarrow0\) .
Again, using the Fourier transform we can derive the heat kernel for diffusion in \( \mathbb{R}^d\) and get
Alternatively, the heat kernel in \( \mathbb{R}^d\) is the product of \( d\) one-dimensional heat kernels, corresponding to independent Brownian motions in each dimension. This is also the short time asymptotic behavior of the heat kernel for any domain \( \Omega \subset \mathbb{R}^d\) , by arguing that at very short times the particle does not see the boundary. More formally, we can consider an asymptotic expansion of the form
Plugging this into the heat equation, we get the Eikonal equation \( |\nabla S_k|=1\) for the \( S_k\) ’s, and transport equations for the \( Z_{k,n}\) ’s. The \( S_k\) ’s correspond to length of geodesics, or billiard trajectories from \( y\) to \( x\) that can be reflected from the boundary. The expansion of diagonal terms is \( G_t(x,x)\sim\frac{1}{(4\pi t)^{d/2}}\) . Therefore, the trace becomes
as \( t\rightarrow0\) .
To examine \( N(\lambda)=\#\{\lambda_n<\lambda\}\) , we look at
Assuming \( N(\lambda)\sim c \lambda^\alpha\) and \( N'(\lambda)\sim\alpha c \lambda^{\alpha-1}\) we get
Hence,
Therefore,
and so we get the asymptotic behavior (Weyl’s Law):
(346)
For \( d=1\) , we have
For \( d=2\) , we have
From the spectrum we can therefore infer the dimension of the region and also its volume by considering the growth rate of the eigenvalues (e.g., by looking at the eigenvalues on a log-plot).
For \( d=2\) , Kac found additional higher order terms in the asymptotic expansion:
basically showing that besides the area of the domain \( |\Omega|\) , we can hear the length of its boundary \( |\partial \Omega|\) and the number of holes \( h\) inside the domain. In fact, all these terms are just integrals over the boundary of curvature (Gauss’ formula gives the area, length of boundary is clear, Euler’s characteristic is given by the Gauss-Bonnet theorem, etc.)
However, by just looking at the eigenvalues, it is typically impossible to {exactly} determine the manifold/domain. There are domains which are different but have the same spectrum. These are called isospectral domains. So, no, one cannot hear the shape of the drum exactly. Still, the eigenvalues provide a spectral signature, acting as a hash function of the domain.
Define the embedding of the domain/manifold into \( \ell^2\) :
where
(347)
are the eigenfunctions of the Laplacian over the manifold with Neumann boundary conditions (if there is a boundary) \( 0 = \lambda_1 < \lambda_2 \leq \lambda_3 \leq …\) . Indeed,
because
that is, the diagonal of the heat kernel is the squared norm, and in general, the inner products are given by
(again, notice that \( G_t\) is PSD.)
From the short time asymptotic behavior \( G_t(x,x)\sim\frac{1}{(4\pi t)^{d/2}}\) and
we conclude that all \( \Phi_t(x)\) have roughly the same norm as \( t\rightarrow 0\) for all \( x\) . In other words, \( \Phi_t\) maps the domain/manifold to some subset of the sphere of radius \( \frac{1}{(4\pi t)^{d/4}}\) . Also, from the probabilistic interpretation of \( G_t(x,y)\) it follows that
for all \( x\) , \( y\) , and \( t\) . The angle between any two vectors \( \Phi_t(x)\) and \( \Phi_t(y)\) is acute. As a result \( \Phi_t(\Omega)\) occupies only a small portion of the sphere.
The diffusion distance
whenever \( \|x-y\| \ll \sqrt{t}\) . We see that the diffusion distance behaves locally like the geodesic distance. However, the global behavior is very different:
for \( \|x-y\| \gg \sqrt{t}\) as \( t\to 0\) . That is, the distances between points of large geodesic distance are roughly the same, that is, the distance saturates.
The idea of embedding Riemannian manifolds by their heat kernel goes back to Bérard, Besson, and Gallot in 1994 [284]. It took another decade until the idea was rediscovered by the applied math community.
Let us turn our attention to the commute time distance introduced in Chapter 7.3.There, we defined the commute time embedding as
We claim that for \( d\geq 2\) , the embedding cannot be in \( \ell^2\) . Indeed,
Assume to the contrary that there is a constant \( M>0\) such that
for all \( x\in \Omega\) . Integrating over \( \Omega\) gives
But this is a contradiction to Weyl’s Law, because
and the sum
diverges for \( d \geq 2\) . Only for \( d=1\) the sum converges. Thus, the commute time embedding is in \( \ell^2\) only for \( d=1\) .
We can understand this in terms of the behavior of the Green’s function for Poisson’s equation in \( \mathbb{R}^d\) . The Green’s function in that case is the fundamental solution for the electric/gravitational potential due to a point charge/mass. It is singular for dimension \( d\geq 2\) (log singularity \( \log(r)\) for \( d=2\) and algebraic singularity \( 1/r^{d-2}\) for \( d\geq 3\) ) and is regular only for \( d=1\) . Recall that Poisson’s equation is
Again, we can write the solution in terms of the fundamental solution
with Neumann boundary conditions, as
And similar to the previous derivation
The operator \( \Delta^2\) which is the second iterate of the Laplacian is called the {biharmonic operator}. It appears in linear elasticity and fluid flow. The Green’s function to
with appropriate boundary conditions is
By Weyl’s Law
which converges for \( d < 4\) , for which the fundamental solution is regular. The biaharmonic distance is popular in computer graphics in order to measure distances on surfaces: unlike the commute time distance it does not diverge as the mesh is refined, and unlike the diffusion distance it is global, i.e., the distance does not saturate. Up to a logarithmic factor, the biharmonic distance behaves similar to the geodesic distance. In general, given the dimension \( d\) of space, one can define an embedding using any suitable iterate of the Laplacian \( \Delta^m\) .
We conclude this chapter with vector diffusion maps and the graph connection Laplacian that extend diffusion maps and the graph Laplacian mathematical from scalar functions to vector fields [105].
To set the stage for vector diffusion maps, it is convenient to briefly recall the construction and some basic properties of standard diffusion maps. Recall that in this setting we have data points \( x_1, x_2, …, x_n\) that are related by affinities \( w_{ij}\) in a weighted graph. We build the weight matrix \( W\) from the affinities \( w_{ij}\) and consider the random walk matrix \( A = D^{-1}W\) , where \( D\) is the diagonal matrix of degrees \( d_i = \sum \limits_{j} w_{ij}\) . \( A\) is similar to the symmetric matrix \( D^{-1/2}WD^{-1/2}\) . By the spectral theorem, this can be written as \( V \Lambda V^T\) , where \( \Lambda\) is the diagonal matrix of eigenvalues \( \lambda_i\) in decreasing order of magnitude, and \( V\) is the matrix of eigenvectors. Then the eigenvectors of \( A\) are \( \phi_l = D^{-1/2}v_l\) .
Then recall that the diffusion map is the function from the data to \( \mathbb{R}^n\) given by:
The inner product between the embeddings of \( x_i\) and \( x_j\) is:
This inner product can also be expressed, up to a normalizing factor, via the entries of \( A^{2t}\) . Indeed from the spectral decomposition of \( A\) :
where \( \psi_l\) satisfy \( \psi_l(j) = d_j \phi_l(j)\) , therefore
Recall that \( A^{2t}(i,j)\) gives the probability that starting at \( i\) , the random walk according to \( A\) will end up at \( j\) in \( 2t\) time steps.
The basic setup of vector diffusion maps is analogous to that of diffusion maps. We have data points \( x_i\) and scalar affinities \( w_{ij}\) between them, and we think of the data as forming a weighted graph. In addition, however, we also have orthogonal matrices \( O_{ij}\) of size \( d\times d\) (for some \( d\) ) that give additional information about the similarity between the data points. For instance, if the data points are two-dimensional images, then \( O_{ij}\) may be the in-plane rotation that aligns them best, assuming that the images have been centered.
In general, we can think of an abstract group \( G\) acting on the set \( X\) where the data comes from. If \( g_{ij}\) denotes the group element that aligns the data points best, and \( G\) has an orthogonal representation \( \rho\) , then \( O_{ij}\) may correspond to \( \rho(g_{ij})\) .
With this additional information we want to say that two data points are similar if they are connected by many of paths in the graph, but also if the transformations one obtains by traversing those paths and composing the \( O_{ij}\) along the way are similar.
We make use of the transformations by constructing the following block matrix \( W_1\) :
Note that \( W_1(i,j)\) is a \( d \times d\) matrix, thus \( W_1\) is of size \( nd \times nd\) . We think of \( W_1\) as having \( n \times n\) blocks of size \( d \times d\) . The diagonal blocks of \( W_1\) are set to \( w_{ii}I\) . Since \( O_{ij} = O_{ji}^T\) (e.g., the matrix that aligns \( i\) to \( j\) is the inverse of the matrix that aligns \( j\) to \( i\) ), we see that \( W_1\) is a symmetric matrix. We can make \( W_1\) sparse by setting some blocks \( W_1(i,j)\) equal to zero, for instance those with small affinity \( w_{ij}\) .
In analogy with diffusion maps, we also define the diagonal matrix \( D_1\) of degrees of size \( nd \times nd\) :
where \( d_i = \sum_j w_{ij}\) is the node degree. We define the graph connection Laplacian as
The graph connection Laplacian \( L_1\) can be applied to vectors \( v\) of length \( nd\) , viewed as \( n\) vectors in \( \mathbb{R}^d\) , i.e., \( v = [v(1),…,v(n)]^T\) with \( v(i) \in \mathbb{R}^d\) . Moreover, as a quadratic form \( L_1\) satisfies
(the proof is left as an exercise). It follows that \( L_1 \succeq 0\) , and \( L_1\) has a non-trivial null space iff there exists a non-zero \( v\) such that \( v(i) = O_{ij}v(j)\) for all \( i\sim j\) . We refer to \( v^T L_1 v\) as the frustration of \( v\) , and can also define the frustration of the connection graph as the minimum over all \( v\) with \( \|v(i)\|=1\) for all \( i\) . It is possible to bound this frustration using the eigenvalues of graph connection Laplacian, which can be regarded as a generalization of Cheeger’s inequality to the graph connection Laplacian [285].
The matrix \( D_1^{-1}W_1\) is similar to the symmetric matrix \( D_1^{-1/2}W_1D_1^{-1/2}\) via
Therefore, as in diffusion maps, \( D_1^{-1}W_1\) has a complete basis of eigenvectors, but now there are \( nd\) of them. These vectors are of length \( nd\) , and we think about them in blocks of \( d\) .
Let us consider the spectral decomposition of the matrix \( \tilde{W}_1=D_1^{-1/2}W_1D^{-1/2}\) :
We emphasize that here the eigenvalues \( \lambda_l\) are different from those of the random walk matrix \( A = D^{-1}W\) , in particular there are now \( nd\) of them. From the above decomposition, we obtain as in the case of diffusion maps:
where the vectors \( w_l, u_l\) are defined by \( w_l(i) = d_i^{-1/2}v_l(i)\) and \( u_l(i) = d_i^{1/2}v_l(i)\) . Then \( D_1^{-1}W_1\) raised to the power \( 2t\) can be expressed as
The matrix \( \left( D_1^{-1}W_1\right)^{2t}\) plays a critical role in vector diffusion maps. Specifically, \( \left( D_1^{-1}W_1\right)^{2t}(i,j)\) is obtained by considering all paths of length \( 2t\) between \( i\) and \( j\) , and for each path summing the probability of traversing that path multiplied by the composition of transformations along the path. We want to define an affinity between our vertices so it depends on the ‘size’ or ‘magnitude’ of this matrix. If the transformations along several paths lead to similar transformations, then the overall magnitude will be large, while if the transformations cancel out, then the magnitude will be smaller. It turns out that the Frobenius (or Hilbert-Schmidt) norm
will be convenient for measuring the magnitude of that matrix. To understand this quantity, we use the formula derived above in terms of the eigenvalues and eigenvectors of \( D_1^{-1/2}W_1D_1^{-1/2}\) :
Now we try to simplify the terms in the sum. Note that \( w_l(j)^T w_r(j) = \langle w_l(j), w_r(j) \rangle\) is a scalar. In addition, the trace function is linear, so we can bring it inside the summation, and for each term factor out the scalar. Finally, we also have \( \text{Tr}(AB)=\text{Tr}(BA)\) for any two matrices, and we can rewrite the above as:
Therefore, we define the vector diffusion map as
and we have the identity
The vector diffusion map is an embedding of the data in a real Euclidean space, just like the ordinary diffusion map. However, we note some differences. The dimension of the space into which the data is embedded is now \( (nd)^2\) , as opposed to \( n\) for diffusion map. Also, the coordinates of the embedding are given by inner products of eigenvectors, not just their evaluations. In fact, one way to think about the embedding is that it takes all eigenvectors \( w_1,…,w_{nd}\) , looks at their \( i\) -th block, and evaluates all possible inner products between them. There is some redundancy in the current definition, since the coordinates \( (l,r)\) and \( (r,l)\) always agree. This way we can get a reduction by a factor of almost two in the dimension of the embedded space.
From the interpretation of \( \left( D_1^{-1}W_1\right)^{2t}(i,j)\) we see that \( \langle V_t(i), V_t(j) \rangle\) gives us a notion of affinity between the vertices. We mention that we can also define vector diffusion distances \( d_{\text{VDM},t}^2\) from the inner product \( \langle V_t(i), V_t(j) \rangle\) as
One apparently inconvenient feature of the vector diffusion map is its high dimensionality. However, the eigenvalues of \( D_1^{-1}W_1\) help with this issue - indeed, all eigenvalues are at most one in absolute value (the proof is left as an exercise). Therefore, we can proceed as in diffusion maps, and truncate the embedding to keep only the largest eigenvalues. Note also that unlike diffusion maps, here it can happen that all eigenvalues have norm strictly less than one. Similar to diffusion maps, it is possible to use different normalizations of the graph connection Laplacian to define other normalized vector diffusion maps. For example, the mapping \( i \to \left((\lambda_l\lambda_r)^t\langle v_l(i), v_r(i) \rangle \right)_{l,r=1}^{nd},\) (that uses \( v\) ’s instead of \( w\) ’s) corresponds to the unnormalized graph connection Laplacian.
Next, we consider the manifold learning setup, where the data points are assumed to lie on a \( d\) -dimensional manifold \( \mathcal{M}\) embedded in \( \mathbb{R}^p\) , where \( d \ll p\) . In this case, the transformations \( O_{ij}\) can be obtained from the data, and below we outline a procedure for this task.
For simplicity, we assume that the dimension \( d\) of the manifold is known in advance. If that is not the case, it is possible to estimate it from the local variability of the data set computed at different scales using the SVD at each point [286].
Obtaining the transformations \( O_{ij}\) : If the dimension of the manifold is \( d\) , we construct \( d\) -dimensional orthogonal transformations as follows. The first step is known as local PCA. We choose a parameter \( \varepsilon_{PCA}\) and perform PCA for each point \( x_i\) on its set of neighbors closer than \( \sqrt{\varepsilon_{PCA}}\) in Euclidean distance, i.e., using \( x_j\) ’s for which \( \|x_j - x_i\| \leq \sqrt{\varepsilon_{PCA}}\) . The first \( d\) singular vectors are a numerical approximation of the tangent plane to the manifold at \( x_i\) . An asymptotic order of magnitude of \( \varepsilon_{PCA}\) for which this procedure works well can be derived in terms of \( n\) and \( d\) [105].
Let us denote by \( O_i\) the \( p \times d\) matrix obtained by local PCA at \( x_i\) . Then the columns of \( O_i\) are orthonormal: \( O_i^TO_i = I_{d\times d}\) . Note that we could take any linear combination of the columns and still have the same approximation to the local tangent plane - however, the vector diffusion maps only depend on inner products of vectors, and these inner products are invariant to the choice of the basis.
Now we come to the second step, known as alignment. Here we use the \( O_i\) and \( O_j\) for neighboring \( x_i\) and \( x_j\) to obtain the \( d\times d\) orthogonal transformation \( O_{ij}\) . We consider another scale parameter \( \varepsilon\) , much larger than \( \varepsilon_{PCA}\) . To make our final matrix \( W_1\) sparse, we can set to zero all entries \( W_1(i,j)\) where \( \|x_i-x_j\|>\sqrt{\varepsilon}\) . We consider only the remaining pairs \( (i,j)\) .
To see how the matrices \( O_{ij}\) come about, we can look at the simple example when the manifold is \( \mathbb{R}^2\) (i.e., flat manifold). In that case, the matrices \( O_i^TO_j\) are orthogonal, and show how to change basis from the local tangent plane at \( x_j\) to the local tangent plane at \( x_i\) . In this case we can simply take \( O_{ij} = O_i^TO_j\) .
However, for manifolds with non-vanishing curvature, \( O_i^TO_j\) will not be orthogonal in general. Still, we can define \( O_{ij}\) as the closest orthogonal transformation to \( O_i^T O_j\) :
This optimization problem can be solved efficiently using the SVD of \( O_i^TO_j\) . Namely, if the SVD is \( O_i^TO_j = U\Sigma V^T\) , then \( O_{ij} = UV^T\) . Thus, we construct \( O_{ij}\) in two steps, using local PCA and alignment. Using this construction of \( W_1\) , we can proceed to compute the vector diffusion maps as before.
Now we want to give some interpretations of the above construction in the limit as the number of points \( n\) tends to infinity, and as \( \varepsilon \to 0\) . It turns out that in this limit \( O_{ij}\) approximates the parallel transport operator from differential geometry.
Here we will give an intuitive explanation of the parallel transport operator. Consider two points \( x_i\) and \( x_j\) in the manifold \( \mathcal{M}\) . The parallel transport operator \( P_{x_ix_j}\) is a linear mapping from the tangent space at \( x_j\) , denoted by \( T_{x_j}\) , to the tangent space \( T_{x_i}\) . Consider a geodesic between \( x_i\) and \( x_j\) . If we take a vector in \( T_{x_j}\) , and slide it parallel to the geodesic to \( T_{x_i}\) , we get the image of the vector under parallel transport.
It is possible to show that \( O_{ij}\) constructed above gives a good approximation to the parallel transport operator for nearby points. We mention that obtaining the best orthogonal estimate as opposed to simply using \( O_i^TO_j\) as an approximation is crucial for deriving convergence theorems [105].
The operator \( D_1^{-1}W_1\) can be viewed as an averaging operator over vector fields. Indeed,
Thus, each vector \( v(j)\) is brought from the tangent plane \( T_{x_j}\) to the tangent plane \( T_{x_i}\) via parallel transport, and then weighted averaged by \( w_{ij}\) .
We previously obtained the large sample limits for diffusion maps. Under uniform sampling, the discrete graph Laplacian converges to a differential operator known as the Laplace-Beltrami operator on the manifold in the limit of infinite sample. In that setup, the operator was acting on scalar functions on the manifold. As mentioned above, we now think of our vectors as having \( n\) entries of dimension \( d\) . Thus, in this case, the limiting operator will act on tangent vector fields (or one-forms) on the manifold. We mention that it is possible to devise similar constructions for higher order forms as well by taking tensor powers of \( O_{ij}\) .
For diffusion maps, we have the convergence result
for sufficiently smooth functions \( f\) . In vector diffusion maps, we have an analogous statement:
where \( X\) is a vector field and \( \nabla^2\) denotes the connection Laplacian over the manifold.
Vector diffusion maps can be used to obtain topological information about the underlying manifold. For instance, orientability can be detected by forming the signed matrix of \( \det(O_{ij})\) and considering its eigenvectors and eigenvalues [287]. Specifically, we encode the information about reflections in a symmetric \( n \times n\) matrix \( Z\) with entries
That is, \( Z_{ij}=1\) if no reflection is needed, \( Z_{ij}=-1\) if a reflection is needed, and \( Z_{ij}=0\) if the points are not nearby. We then normalize \( Z\) by the node degrees, i.e., consider the eigenvalues of \( D^{-1}Z\) .
If the manifold is orientable, the matrix can be “synchronized" in the sense that we can find a vector of signs \( \{z_i\}_{i=1}^n\) such that
(equivalently, using our previous notation, the graph connection Laplacian has no frustration). This recovers the orientations of the local bases. Otherwise, it can be used to construct an embedding of the orientable double cover in Euclidean space. Thus, orientability can be detected with vector diffusion maps, which look only at local information about the data set.
Embedding obtained using the eigenvectors of the (normalized) matrix gives the double cover of non-orientable manifolds.
We remark that learning the topology of a manifold from random samples [288] is still an active area of research. Beyond the graph Laplacian and the connection Laplacian, other Laplacian operators, namely, the Hodge Laplacians reveal topological information such as the Betti numbers (number of connected components, number of holes, etc.) through their harmonic forms. Readers interested in topological data analysis are referred to [289] as a starting point for this topic.
Exercise 132
Find an ‘optimal kernel’ \( K\) that minimizes the variance error term for a given bias error of the density estimator (343). That is, find \( K\) that minimizes
such that \( K \geq 0\) , \( \int K(z)\,dz = 1\) , \( K(z) = K(-z)\) , and \( \int_{\mathbb{R}}K(z)z^2\,dz = m_2\) .
Exercise 133
In the uniform sampling case, show that if \( L_{rw}\phi = \lambda \phi\) , as \( n\rightarrow \infty\) followed by \( \varepsilon \to 0\) , then \( \phi\) satisfies the boundary condition \( \frac{\partial \phi}{\partial \nu} = 0\) \( \forall x \in \partial \mathcal{M}\) where \( \nu\) is the normal vector to the boundary \( \partial \mathcal{M}\) at \( x\) .
Hint Start with the 1D case where \( \mathcal{M}\) is the interval \( [0,L]\) and observe that at the endpoints (i.e., the boundary) the integral of the kernel function \( K_{\varepsilon}\) cannot be approximated any longer as a Dirac delta function plus an \( O(\varepsilon)\) Laplacian (second derivative) correction term as we saw for interior points. At the boundary only half of the kernel function gets to be integrated, which can be viewed as half a Dirac delta function, and we also get an \( O(\sqrt{\varepsilon})\) correction term involving the first derivative, because the integral involving the linear term does not vanish as it did before. Argue that the \( O(\sqrt{\varepsilon})\) term must vanish which leads to the no-flux boundary condition. A rigorous treatment requires an asymptotic analysis in powers of \( \sqrt{\varepsilon}\) and matching the outer solution to the boundary layer.
Exercise 134
Suppose the normalization of \( w_{ij}\) is
for \( \alpha \in [0,1]\) . That is,
and define the corresponding diagonal matrix
What are the limiting operators for \( L^{(\alpha)}\) and \( L_{rw}^{(\alpha)}\) ? For the random walk Laplacian we know that for \( \alpha=0\) we get the backward Fokker-Planck operator, and for \( \alpha=1\) we get the Laplace-Beltrami operator. What is the limiting operator for \( \alpha\) between 0 and 1, and specifically for \( \alpha=\frac{1}{2}\) ?
Exercise 135 (Spherical harmonics)
Find the eigenfunctions and eigenvalues of the Laplacian on the sphere \( \mathbb{S}^2 \subset \mathbb{R}^3\) . What are the multiplicities of the eigenvalues? (Hint: use the chain rule to get the Laplacian in spherical coordinates \( (r,\theta,\phi)\) and find its form for functions that are independent of \( r\) ).
Exercise 136 (Hermite polynomials)
The density of a one-dimensional Gaussian is
and the corresponding potential function is
Find the eigenfunctions \( \phi_n(x)\) and eigevalues \( \lambda_n\) of the backward Fokker-Planck operator
Exercise 137 (Line segment + noise)
Consider \( n\) data points \( z_1,z_2,…,z_n\) in \( \mathbb{R}^2\) sampled independently from the probability density function \( p(x,y)\) (to avoid confusion, we denote the first coordinate of \( z\in \mathbb{R}^2\) by \( x\) and the second coordinate by \( y\) , that is, \( z=(x,y)\) ):
where
and
In other words, the \( x\) -coordinate is uniformly distributed on the interval \( [0,L]\) and the \( y\) -coordinate has a normal distribution with zero mean and standard deviation \( \sigma\) .
Find the eigenfunctions and eigenvalues of the backward Fokker-Planck operator
where \( U(x,y) = -2\log (p_1(x)p_2(y))\) and \( \Delta = \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2}\) . Hint Separation of variables.
Exercise 138
Show that the first nontrivial eigenfunction of the second order ordinary differential equation
is monotonic. Conclude that the first nontrivial eigenfunction basically orders the data points sampled from an open curve according to its arclength, i.e. \( x_i \rightarrow \phi(x_i)\) is an embedding of the high dimensional data points in 1-D.
Hint Use the Pr
specialChar{34}ufer transformation (see [290]).
Exercise 139
For the Fokker-Planck operator in 1-D with periodic boundary conditions, show that we get an embedding that encircles the origin exactly once. Also show that the angle that the two eigenfunctions make for the different points on the curve is monotonic. Hint Again, the key to this proof is the Pr
specialChar{34}ufer transformation.
Exercise 140
Find the heat kernel for diffusion in the finite interval \( [0,L]\) with Neumann boundary conditions at the endpoints. Hint The method of images with an infinite number of images.
Exercise 141
The Riemann \( \zeta\) -function is defined as
Define the \( \zeta\) -function of a domain (or, in general, a manifold) as
That is, \( \zeta(x,y,s)\) is the Green function for \( (-\Delta)^s\) with Dirichlet boundary conditions. Show that \( \zeta(x,y,s)\) is given by the Mellin transform of the heat kernel, that is, show:
where \( \Gamma(s)\) is the Gamma function. Can you give a probabilistic interpretation of the right-hand-side integral of the heat kernel in terms of moments of first passage/hitting times?
Exercise 142
Consider the commute-time embedding of a domain \( \Omega \subset \mathbb{R}^d\) :
where \( \Delta \phi_n = -\lambda_n \phi_n\) . Explain the failure of this embedding for \( d\geq 2\) in light of the Green functions \( G(r)\) for Poisson’s equation from electrostatics \( \Delta u = f\) (i.e., \( G(r)=\frac{1}{2\pi}\log r\) for \( d=2\) and \( G(r)=-\frac{1}{4\pi r}\) for \( d=3\) ). Find the distance \( D^2(x,y) = G(x,x)+G(y,y)-2G(x,y)\) , where \( G(x,y)\) is the Green’s function for the Poisson equation on the interval \( [0,L]\) and observe its relation to the geodesic distance.
Exercise 143 (Biharmonic distance)
In computer graphics \( 2\) -dimensional surfaces in \( \mathbb{R}^3\) are very popular and one often wants to have distances that resemble the geodesic distances. It was suggested in [291] to use the embedding
that corresponds to the Green function of the biharmonic equation
Find the Green function for the biharomic equation in \( \mathbb{R}^2\) and derive the squared distance \( D^2(x,y)\) \( (x,y\in \mathbb{R}^2)\) . To what extent does this distance resembles the geodesic distance \( \|x-y\|\) ?
Exercise 144
Show that the graph connection Laplacian \( L_1 = D_1 - W_1\) satisfies
for any \( v \in \mathbb{R}^{nd}\) viewed as \( n\) vectors \( v(1),…, v(n) \in \mathbb{R}^d\) .
Exercise 145
Show that if \( \lambda\) is an eigenvalue of \( \tilde{W}_1=D_1^{-1/2}W_1D^{-1/2}\) then \( -1 \leq \lambda \leq 1\) .
Exercise 146 (Vector spherical harmonics)
Use a computer simulation to generate \( n\) points on the unit sphere \( S^2 \subset \mathbb{R}^3\) and compute the eigenvalues of \( D_1^{-1}W_1\) (use \( \varepsilon_{\text{PCA}}\) and \( \varepsilon\) as you see fit). What are the multiplicities of the eigenvalues? The corresponding eigen-vector-fields are known as the “vector spherical harmonics” and are routinely used in geophysics and other applications. Try to derive the vector spherical harmonics from the scalar spherical harmonics by taking their gradient and projecting to the tangent plane to the sphere.
Exercise 147 (\( \mathbb{R}P^2\) , orientability and double-cover)
The real projective plane \( \mathbb{R}P^2\) is the space of lines in \( \mathbb{R}^3\) passing through the origin. \( \mathbb{R}P^2\) can be regarded as the quotient of the two-sphere
by the antipodal relation
It is a two-dimensional non-orientable manifold that cannot be embedded in \( \mathbb{R}^3\) without intersecting itself, but it can be embedded in \( \mathbb{R}^4\) and higher-dimensional Euclidean spaces.
Suppose we sample \( n\) points from the uniform distribution on \( S^2 \subset \mathbb{R}^3\) denoted \( x_1,x_2,…,x_n\) and define affinities \( w_{ij}\) between them as
where \( K\) is a positive function, e.g.,
for some \( \varepsilon>0\) . Determine the eigenfunctions and eigenvalues of the corresponding diffusion map matrix in the limit \( n\to \infty\) . Hint Distinguish between odd and even functions on the sphere, and observe that the limiting operator commutes with reflection.
Use a computer simulation to construct the \( n\times n\) symmetric matrix \( Z\) with
and
where \( \Phi\) is the diffusion map embedding in \( \mathbb{R}^5\) . That is, the elements of \( Z\) are either \( 1\) , \( -1\) or \( 0\) . Determine that \( \mathbb{R}^2\) is non-orientable by inspecting the top eigenvalue and eigenvector of \( D^{-1}Z\) (where \( D\) is a diagonal \( n\times n\) matrix with the weighted degrees on its diagonal).
Use a computer simulation to construct the \( 2n \times 2n\) symmetric matrix \( \tilde{Z}\) given by
Observe the numerical multiplicities of \( \tilde{D}^{-1}\tilde{Z}\) (where \( \tilde{D}\) is a \( 2n\times 2n\) diagonal matrix with the weighted degrees).
This chapter presents the idea of a convex relaxation, illustrated via problems on graphs. We start with the introduction of the Goemans-Williamson semidefinite relaxation for the Max-Cut problem, and move on to the problem of community detection in the Stochastic Block Model.
Many data analysis tasks include in them a step consisting of solving a computational problem, oftentimes in the form of finding a hidden parameter that best explains the data, or model specifications that provide best-fits. Many such problems, including examples in previous chapters, are computationally intractable. In complexity theory this is often captured by \( NP\) -hardness. Unless the widely believed \( P\neq NP\) conjecture is false, there is no polynomial algorithm that can solve all instances of an NP-hard problem. Thus, when faced with an NP-hard problem (such as the Max-Cut problem discussed below) one has three natural options: to use an exponential type algorithm that solves exactly the problem in all instances, to design polynomial time algorithms that only work for some of the instances (hopefully relevant ones), or to design polynomial algorithms that, in all instances, produce guaranteed approximate solutions.
This section is about the third option, another example of this approach is the earlier discussion on Spectral Clustering and Cheeger’s inequality. The second option, of designing algorithms that work in many, rather than all, instances is discussed later in this chapter, notably these goals are often achieved by the same algorithms.
The Max-Cut problem is defined as follows: Given a graph \( G=(V,E,W)\) with non-negative weights \( w_{ij}\) on the edges, find a set \( S\subset V\) for which \( \text{cut}(S)\) is maximal. Goemans and Williamson [292] introduced an approximation algorithm that runs in polynomial time, has a randomized component in it, and is able to obtain a cut whose expected value is guaranteed to be no smaller than a particular constant \( \alpha_{GW}\) times the optimum cut. The constant \( \alpha_{GW}\) is referred to as the approximation ratio.
Let \( V=\{1,…,n\}\) . One can restate Max-Cut as
(348)
The \( y_i\) ’s are binary variables that indicate set membership, i.e., \( y_i=1\) if \( i\in S\) and \( y_i=-1\) otherwise.
Consider the following relaxation of this problem:
(349)
This is a relaxation because if we restrict \( u_i\) to be a multiple of \( e_1\) , the first element of the canonical basis, then (349) is equivalent to (348). For this to be a useful approach, the following two properties should hold:
Definition 32
Given a graph \( G\) , we define \( \mathrm{MaxCut}(G)\) as the optimal value of (348) and \( \mathcal{R}\mathrm{MaxCut}(G)\) as the optimal value of (349).
We start with property ((I)). Set \( X\) to be the Gram matrix of \( u_1,…,u_n\) , that is, \( X=U^TU\) where the \( i\) ’th column of \( U\) is \( u_i\) . We can rewrite the objective function of the relaxed problem as
One can exploit the fact that \( X\) having a decomposition of the form \( X=Y^TY\) is equivalent to being positive semidefinite, denoted \( X\succeq 0\) . The set of PSD matrices is a convex set. Also, the constraint \( \|u_i\|=1\) can be expressed as \( X_{ii}=1\) . This means that the relaxed problem is equivalent to the following semidefinite program (SDP):
(350)
This SDP can be solved (up to \( \varepsilon\) accuracy) in time polynomial on the input size and \( \log(\varepsilon^{-1})\) [162] (It is a convex optimization problem, which were discussed in Chapter 9; note however that in this chapter optimization problems are more often formulated as maximization problems).
There is an alternative way of viewing (350) as a relaxation of (348). By taking \( X = yy^T\) one can formulate a problem equivalent to (348)
(351)
The SDP (350) can be regarded as a relaxation of (351) obtained by removing the non-convex rank constraint. In fact, this is how we will later formulate a similar relaxation for the minimum bisection problem, in Section 13.2.
We now turn to property ((II)), and consider the problem of forming a solution to (348) from a solution to (350). From the solution \( \{u_i\}_{i=1,…,n}\) of the relaxed problem (350), we produce a cut subset \( S'\) by randomly picking a vector \( r \in \mathbb{R}^n\) from the uniform distribution on the unit sphere and setting
In other words, we separate the vectors \( u_1,…,u_n\) by a random hyperplane (perpendicular to \( r\) ). We will show that the cut given by the set \( S'\) is comparable to the optimal one.
Let \( W\) be the value of the cut produced by the procedure described above. Note that \( W\) is a random variable, whose expectation is easily seen (see Figure 118) to be given by
If we define \( \alpha_{GW}\) as
it can be shown that \( \alpha_{GW}>0.87\) (see, for example [292]).
By linearity of expectation
(352)
Let \( \mathrm{MaxCut}(G)\) be the maximum cut of \( G\) , meaning the maximum of the original problem (348). Naturally, the optimal value of (349) is larger or equal than \( \mathrm{MaxCut}(G)\) . Hence, an algorithm that solves (349) and uses the random rounding procedure described above produces a cut \( W\) satisfying
(353)
thus having an approximation ratio (in expectation) of \( \alpha_{GW}\) . Note that one can run the randomized rounding procedure several times and select the best cut. We thus have
A natural question is to ask whether there exists a polynomial time algorithm that has an approximation ratio better than \( \alpha_{GW}\) .
The unique games problem (as depicted in Figure 119) is the following: Given a graph and a set of \( k\) colors, and, for each edge, a matching between the colors, the goal in the unique games problem is to color the vertices as to agree with as high of a fraction of the edge matchings as possible. For example, in Figure 119 the coloring agrees with \( \frac34\) of the edge constraints, and it is easy to see that one cannot do better.
The Unique Games Conjecture of Khot [293], has played a major role in hardness of approximation results.
Conjecture 1
For any \( \varepsilon>0\) , the problem of distinguishing whether an instance of the Unique Games Problem is such that it is possible to agree with a \( \geq 1-\varepsilon\) fraction of the constraints or it is not possible to even agree with a \( \varepsilon\) fraction of them, is NP-hard.
There is a sub-exponential time algorithm capable of distinguishing such instances of the unique games problem [294], however no polynomial time algorithm has been found so far. At the moment one of the strongest candidates to break the Unique Games Conjecture is a relaxation based on the Sum-of-squares hierarchy that we will discuss below.
Remarkably, approximating Max-Cut with an approximation ratio better than \( \alpha_{GW}\) is as hard as refuting the Unique Games Conjecture (UG-hard) [295]. More generality, if the Unique Games Conjecture is true, the semidefinite programming approach described above produces optimal approximation ratios for a large class of problems [296].
Not depending on the Unique Games Conjecture, there is a NP-hardness of approximation of \( \frac{16}{17}\) for Max-Cut [297].
Remark 28
Note that a simple greedy method that assigns membership to each vertex as to maximize the number of edges cut involving vertices already assigned achieves an approximation ratio of \( \frac12\) (even of \( \frac12\) of the total number of edges, not just of the optimal cut).
We now give a different interpretation to the approximation ratio obtained above. Let us first slightly reformulate the problem (recall that \( w_{ii}=0\) ).
Recall from Proposition 11 that a cut can be rewritten as a quadratic form involving the graph Laplacian. We can rewrite (348) as
(354)
Similarly, (350) can be written (by taking \( X\) as the PSD matrix variable that is a surrogate for \( X=yy^T\) ) as
(355)
In Section 13.2 we will derive the the dual program to (355) in the context of recovery in the Stochastic Block Model. Here we will simply state it, and show weak duality as it will be important for the argument that follows.
(356)
Indeed, if \( X\) is a feasible solution to (355) and \( D\) a feasible solution to (356) then, since \( X\) and \( D - \frac14 L_G\) are both positive semidefinite \( \operatorname{Tr}\left[ X\left( D - \frac14 L_G \right) \right] \geq 0\) which gives
since \( D\) is diagonal and \( X_{ii}=1\) . This shows weak duality, the fact that the value of (356) is larger than the one of (355).
If the Slater condition (261) is satisfied then strong duality holds, i.e., the optimal values of both programs coincide. In this case, the Slater condition asks whether there is a matrix strictly positive definite that is feasible for (355), and the identity is such a matrix. This means that there exists \( D^{\natural}\) feasible for (356) such that
Since, for any \( y\in\mathbb{R}^n\) , we have \( y^TD^\natural y=\sum_{i=1}^n D^\natural_{ii}y_i\) , we can write the following equality that holds for any \( y\in\mathbb{R}^n\) :
(357)
Since \( D^{\natural} - \frac14L_G\succeq 0\) , there exists \( V\) such that \( D^{\natural} - \frac14L_G = VV^T\) with the columns of \( V\) denoted by \( v_1,\dots,v_n\) , meaning that \( y^T\left( D^{\natural} - \frac14L_G\right)^Ty = \left\| V^T y\right\|^2 = \sum_{k=1}^n (v_k^Ty)^2\) . Hence, for any \( y\in\mathbb{R}^n\) ,
(358)
There is a particularly fruitful interpretation of the equality (358): It provides a certificate that no cut of \( G\) is larger than \( \mathcal{R}\mathrm{MaxCut}\) . Indeed, if \( y\in\{\pm1\}^n\) then \( y_i^2=1\) and so \( \sum_{i=1}^n D_{ii}^{\natural}\left( y_i^2 - 1 \right)=0\) while \( \sum_{k=1}^n (v_k^Ty)^2\geq 0\) since it is a sum of squares (of degree 2). Furthermore, while it certifies a bound on \( 2^n\) many possible assignments \( y\in\{\pm1\}^n\) , (358) can be verified efficiently: because it needs to hold for all \( y\in\mathbb{R}^n\) , it amounts to checking that the coefficients of the quadratic polynomials on the left- and right-hand sides match.
This is known as a sum-of-squares certificate [298, 299, 300, 301, 302, 303]; by following this argument in reverse one can show that \( \mathcal{R}\mathrm{MaxCut}\) is precisely the smallest real number for which a certificate of the type of (358) exists (while \( \mathrm{MaxCut}\) is the smallest real number for which \( \mathrm{MaxCut} - \frac14 y^TL_Gy\) is non-negative in the hypercube. This gap shrinks if one allows sum-of-square certificates of higher degree ).
The remarkable fact is that sum-of-squares certificates of at most a specified degree can be found using Semidefinite programming [300, 301] (in fact, the SDP (356) is finding the smallest real number \( \Lambda\) for which a certificate such as (358) (of degree 2) exists. On the other hand, the primal is in some sense constraining the degree \( 2\) moments of \( y\) , \( X_{ij}=y_iy_j\) . Many natural questions remain open towards a precise understanding of the power of SDPs corresponding to higher degree sum-of-squares certificates. There are several very nice lecture notes, surveys, and courses on Sum-of-Squares, see for example [299, 306, 307]
Remark 29 (triangular inequalities and Sum of squares level 4)
A natural follow-up question is whether the relaxation of degree \( 4\) is actually strictly tighter than the one of degree \( 2\) for Max-Cut (in the sense of forcing extra constraints). What follows is an interesting set of inequalities that degree \( 4\) enforces and that degree \( 2\) does not, known as triangular inequalities. This example helps illustrate the differences between Sum-of-Squares certificates of different degree.
Since \( y_i\in \{\pm 1\}\) we naturally have that, for all \( i,j,k\)
this would mean that, for \( X_{ij} = y_iy_j\) we would have,
however it is not difficult to see that the SDP (355) of degree 2 is only able to constraint
which is considerably weaker. There are a few different ways of thinking about this, one is that the three vector \( u_i,u_j,u_k\) in the relaxation may be at an angle of 120 degrees with each other. Another way of thinking about this is that the inequality \( y_iy_j + y_jy_k + y_ky_i \geq -\frac32\) can be proven using sum-of-squares proof with degree \( 2\) :
However, the stronger constraint cannot.
On the other hand, if degree \( 4\) monomials are involved, (let us say \( X_S = \prod_{s\in S} y_s\) , note that \( X_{\emptyset} =1\) and \( X_{ij}X_{ik} = X_{jk}\) ) then the constraint
implies \( X_{ij} + X_{jk} + X_{ik} \geq -1\) just by taking
Also, note that the inequality \( y_iy_j + y_jy_k + y_ky_i \geq -1\) can indeed be proven using sum-of-squares proof with degree \( 4\) (recall that \( y_i^2=1\) ):
Interestingly, it is known [308] that these extra inequalities alone will not increase the approximation power (in the worst case) of (350).
The problem of detecting communities in network data is a central problem in data science, examples of interest include social networks, the internet, or biological and ecological networks. In Chapter 6 we discussed clustering in the context of graphs, and described performance guarantees for spectral clustering (based on Cheeger’s Inequality) that made no assumptions on the underlying graph. While these guarantees are remarkable, they are worst-case and hence pessimistic in nature. In an effort to understand the performance of some of these approaches on more realistic models of data, we will now analyze a generative model for graphs with community structure, the stochastic block model. On the methodology side, we will focus on convex relaxations, based on semidefinite programming (as in Chapter 13.1), and will show that this approach achieves exact recovery of the communities on graphs drawn from this model. The techniques developed to prove these guarantees mirror the ones used to prove analogous guarantees for a variety of other problems where convex relaxations yield exact recovery (such as some of the problems covered in Chapter 17).
The Stochastic Block Model is a random graph model that produces graphs with a community structure. While, as with any model, we do not expect it to capture all properties of a real world network (examples include network hubs, power-law degree distributions, and other structures) the goal is to study a simple graph model that produces community structure, as a test bed for understanding fundamental limits of community detection and analyzing the performance of recovery algorithms.
Definition 33 (Stochastic Block Model)
Let \( n\) and \( k\) be positive integers representing respectively the number of nodes and communities, \( c\in [k]^n\) be the vector of community memberships for the different nodes, and \( P\in [0,1]^{k\times k}\) a symmetric matrix of connectivity probabilities. A graph \( G\) is said to be drawn from the Stochastic Block Model on \( n\) nodes, when for each pair of nodes \( (i,j)\) the probability that \( (i,j)\in E\) is independent from all other edges and given by \( P_{c_i,c_j}\) .
We will focus on the special case of the two communities (\( k=2\) ) balanced symmetric block model where \( n\) is even, both communities are of the same size, and
where \( p,q\in[0,1]\) are constants, cf. Figure 122. Furthermore, we will focus on the associative case (\( p>q\) ), while noting that all that follows can be easily adapted to the disassociate case (\( q>p\) ).
We note also that when \( p=q\) this model reduces to the classical Erdős-Reny
specialChar{39}{i} model described in Chapter 6. Since there are only two communities we will identify their membership labels with \( +1\) and \( -1\) .
Many fascinating questions can be asked in the context of this model. Natural questions include to characterize statistics of the model, such as number of triangles or larger cliques. In this chapter, motivated by the problem of community detection, we are interested in understanding when is it possible to reconstruct, or estimate, the community memberships from an observation of the graph, and what efficient algorithms succeed at this inference task.
Before proceeding we note that the difficulty of this problem should certainly depend on the value of \( p\) and \( q\) . As illustrative examples, this problem is trivial when \( p=1\) and \( q=0\) and hopeless when \( p=q\) (notice that even in the easy case the actual membership can only be determined up to a re-labeling of the communities). As \( p>q\) , we will attempt to recover the original partition by trying to compute the minimum bisection of the graph; while related to the Max-Cut problem described in Section 13.1, notice how the objective here is to produce the minimum balanced cut.
A natural approach is to draw motivation from Chapter 6 and to use a form of spectral clustering to attempt to partition the graph.
Let \( A\) be the adjacency matrix of \( G\) ,
(359)
Note that in our model, \( A\) is a random matrix. We would like to solve
(360)
The optimal solution \( x\) of (360) takes the value \( +1\) on one side of a partition and \( -1\) on the other side, where the partition is balanced and achieves the minimum cut between the resulting clusters.
Relaxing the condition \( x_i=\pm1, \forall_i\) to \( \|x\|_2^2=n\) would yield a spectral method
(361)
The solution of (361) corresponds to the leading eigenvector of the matrix obtained by projecting \( A\) on the orthogonal complement of the all-ones vector \( \mathbf{1}\) .
The matrix \( A\) is a random matrix whose expectation is given by
Let \( g\) denote the vector corresponding to the true community memberships, with entries \( +1\) and \( -1\) ; note that this is the vector we want to recover. We can write
and
In order to remove the term \( \frac{p+q}2 \mathbf{1}\mathbf{1}^T\) we consider the random matrix
It is easy to see that
This means that \( \mathcal{A}\) is the sum of a random matrix whose expected value is zero and a rank-1 matrix, i.e.
where \( W = \big(\mathcal{A}-\mathbb{E}[\mathcal{A}]\big)\) and \( \lambda vv^T = \frac{p-q}2n \left(\frac{g}{\sqrt{n}}\right)\left(\frac{g}{\sqrt{n}}\right)^T\) . In Chapter 4 we saw that for a large enough rank-1 additive perturbation to a Wigner matrix, there is an eigenvalue associated with the perturbation that pops outside of the distribution of eigenvalues of a Wigner Gaussian matrix \( W\) . Moreover, whenever this happens, we saw that the leading eigenvector has a non-trivial correlation with \( g\) .
Since \( \mathcal{A}\) is simply \( A\) minus a multiple of \( \mathbf{1}\mathbf{1}^T\) , problem (361) is equivalent to
(362)
Since we have subtracted a multiple of \( \mathbf{1}\mathbf{1}^T\) , we will drop the constraint \( \mathbf{1}^T x =0\) . Notice how a deviation from \( \mathbf{1}^T x =0\) would be penalized in the new objective, the fact that the multiple we subtracted is sufficient for us to drop the constraint will be confirmed by the success of the new optimization problem, now given by
(363)
whose solution corresponds to the leading eigenvector of \( \mathcal{A}\) .
Recall that if \( \mathcal{A}-\mathbb{E}[\mathcal{A}]\) is a Wigner matrix with i.i.d. entries with zero mean and variance \( \sigma^2\) then its empirical spectral density follows the semicircle law and it is essentially supported in \( [-2\sigma\sqrt{n},2\sigma\sqrt{n}]\) . We would then expect the top eigenvector of \( \mathcal{A}\) to correlate with \( g\) as long as
(364)
Unfortunately \( \mathcal{A}-\mathbb{E}[\mathcal{A}]\) is not a Wigner matrix in general. In fact, half of its entries have variance \( p(1-p)\) while the variance of the other half is \( q(1-q)\) .
Putting rigor aside for a second, if we were to take \( \sigma^2 = \frac{p(1-p)+q(1-q)}2\) then (364) would suggest that the leading eigenvector of \( \mathcal{A}\) correlates with the true partition vector \( g\) as long as
(365)
This argument is of course not valid, because the matrix in question is not a Wigner matrix. The special case \( q = 1-p\) can be easily salvaged, since all entries of \( \mathcal{A}-\mathbb{E}[\mathcal{A}]\) have the same variance and they can be made to be identically distributed by conjugating with \( \mathrm{diag}(g)\) . This is still an impressive result, it says that if \( p=1-q\) then \( p-q\) needs only to be around \( \frac1{\sqrt{n}}\) to be able to make an estimate that correlates with the original partitioning!
An interesting regime (motivated, for example, by friendship networks in social sciences) is when the average degree of each node is constant. This can be achieved by taking \( p = \frac{a}n\) and \( q = \frac{b}n\) for constants \( a\) and \( b\) . While the argument presented to justify condition (365) is not valid in this setting, it nevertheless suggests that the condition on \( a\) and \( b\) needed to be able to make an estimate that correlates with the original partition, often referred to as partial recovery, is
(366)
Remarkably this was posed as a conjecture by Decelle et al. [309] and proved in a series of works by Mossel et al. [310, 311] and Massoulie [312]. While describing the proof of this conjecture is outside the scope of this book, we note that the conjectures were obtained by studying fixed points of a certain linearization of belief propagation using techniques from statistical physics. The lower bound can be proven by showing contiguity between the two models below the phase transition, and the upper bound is obtained by analyzing an algorithm that is an adaptation of belief propagation and studying the so-called non-backtracking operator. We refer the reader to the excellent survey of Abbe [128] and references therein for further reading.
Remark 30 (More than three communities)
The balanced symmetric stochastic block model with \( k>3\) communities is conjectured to have a fascinating statistical-to-computational gap. In the sparse regime of inner probability \( p=\frac{a}{n}\) and outer probability \( q = \frac{b}{n}\) it is believed that, for \( k>3\) there is a regime of the parameters \( a\) and \( b\) such that the problem of partially recovering the community memberships is statistically, or information-theoretically, possible but that there does not exist a polynomial-time algorithm to perform this task. These conjectures are based on insight obtained with tools from statistical physics. We refer the reader to [309, 313, 314, 315] for further reading.
We now turn our attention to the problem of recovering the cluster membership of every single node correctly, not simply having an estimate that correlates with the true labels. We will keep our focus on the balanced, symmetric, two communities setting. This will serve as an illustration for two phenomena: (i) the fact that convex relaxations often find optimal solutions, not just approximations, when the input are “typical instances”; (ii) convex relaxations such as semidefinite programs over random instances can often be readily understood via matrix concentration inequalities (such as the ones in Chapter 15). If the inner-probability is \( p = \frac{a}n\) then it is not hard to show that each cluster will (with high probability) have isolated nodes, making it impossible to recover the membership of every possible node correctly. In fact this is the case whenever \( p \leq \frac{(2-\varepsilon)\log n}n\) , for some \( \varepsilon>0\) . For that reason we focus on the regime
(367)
for some constants \( \alpha>\beta\) .
A natural algorithm would be to compute the minimum bisection (360) which corresponds to the Maximum Likelihood Estimator, and also the Maximum a Posteriori Estimator when the community memberships are drawn uniformly at random. In fact, it is known (see [316] for a proof) that if
(368)
then, with high probability, (360) recovers the true partition. Moreover, if
no algorithm can, with high probability, recover the true partition.
In this section we will analyze a semidefinite programming relaxation, analogous to the ones described in Section 13.1 for Max-Cut. By making use of convex duality, we will derive conditions for exact recovery with this particular algorithm, reducing the problem to a problem in random matrix theory. We will present a solution to the resulting random matrix question, using the matrix concentration tools developed in Chapter 15. While not providing the strongest known guarantee, this approach is extremely adaptable and can be used to solve a large number of similar questions.
Let \( x\in\mathbb{R}^n\) with \( x_i =\pm 1\) represent a partition of the nodes (recall that there is an ambiguity in the sense that \( x\) and \( -x\) represent the same partition). Note that if we remove the constraint \( \sum_j x_j = 0\) in (360) then the optimal solution becomes \( x=\mathbf{1}\) . Let us define \( B = 2A - (\mathbf{1}\mathbf{1}^T -I)\) , meaning that
(369)
It is clear that the problem
(370)
has the same solution as (360). However, when the constraint is dropped,
(371)
\( x= \mathbf{1}\) is no longer an optimal solution. As with (363) above, the penalty created by subtracting a large multiple of \( \mathbf{1}\mathbf{1}^T\) will be enough to discourage unbalanced partitions (the reader may notice the connection with Lagrangian duality). In fact, (371) is the problem we will set ourselves to solve.
Unfortunately (371) is in general NP-hard (one can encode, for example, Max-Cut by picking an appropriate \( B\) ). We will relax it to an easier problem by the same technique used to approximate the Max-Cut problem in the previous section (this technique is often known as matrix lifting). If we write \( X=xx^T\) then we can formulate the objective of (371) as
Also, the condition \( x_i = \pm1\) implies \( X_{ii} = x_i^2 = 1\) . This means that (371) is equivalent to
(372)
The fact that \( X=xx^T\) for some \( x\in\mathbb{R}^n\) is equivalent to \( \rm{rank}(X) = 1\) and \( X\succeq 0\) . This means that (371) is equivalent to
We now relax the problem by removing the non-convex rank constraint
(373)
This is an SDP that can be solved (up to arbitrary precision) in polynomial time [162] (note that it is the same SDP as (355), with a different coefficient matrix).
Since we removed the rank constraint, the solution to (373) is no longer guaranteed to be rank-1. We will take a different approach from the one we used in Section 13.1 to obtain an approximation ratio for Max-Cut, which was a worst-case approximation ratio guarantee. In this section we will show that, for some values of \( \alpha\) and \( \beta\) , with high probability, the solution to (373) not only satisfies the rank constraint but it coincides with \( X = gg^T\) where \( g\) corresponds to the true partition. From \( X\) one can compute \( g\) by simply calculating its leading eigenvector. Besides being a good approximation algorithm, SDP relaxations such as (355) provide optimal solutions in many instances (but not always).
A standard technique to show that a candidate solution is the optimal one for a convex problem is to use convex duality, which we discussed in Section 9.3.3. Note that unlike in Chapter 9, problems here are formulated as maximization problems.
We will now describe duality with a game theoretical intuition in mind. The idea will be to rewrite (373) without imposing constraints on \( X\) but rather have the constraints be implicitly enforced. Consider the following optimization problem.
(374)
Let us provide a game theoretical interpretation for (374). Suppose that there is a primal player (picking \( X\) ) whose objective is to maximize the objective and a dual player (picking \( Z\) and \( Q\) after seeing \( X\) ) trying to make the objective as small as possible. If the primal player does not pick \( X\) satisfying the constraints of (373) then we claim that the dual player is capable of driving the objective to \( -\infty\) . Indeed, if there is an \( i\) for which \( X_{ii} \neq 1\) then the dual player can simply pick \( Z_{ii} = -c\frac1{1-X_{ii}}\) and make the objective as small as desired by taking a large enough \( c\) . Similarly, if \( X\) is not positive semidefinite, then the dual player can take \( Q=c vv^T\) where \( v\) is such that \( v^TXv <0\) . If, on the other hand, \( X\) satisfies the constraints of (373) then
Since equality can be achieved if for example the dual player picks \( Q = 0_{n\times n}\) , then it is evident that the values of (373) and (374) are the same:
With this game theoretical intuition in mind, it is clear that if we change the “rules of the game” and have the dual player decide their variables before the primal player (meaning that the primal player can pick \( X\) knowing the values of \( Z\) and \( Q\) ) then it is clear that the objective can only increase, which means that:
Note that we can rewrite
When playing:
if the dual player does not set \( B+Q-Z=0_{n\times n}\) then the primal player can drive the objective value to \( +\infty\) , this means that the dual player is forced to chose \( Q = Z-B\) and so we can write
which clearly does not depend on the choices of the primal player. This means that
This is known as weak duality (strong duality says that, under some conditions the two optimal values actually match, see for example [162], recall that we used strong duality when giving a sum-of-squares interpretation to the Max-Cut approximation ratio, a similar interpretation can be given in this problem, see [317]).
Also, the problem
(375)
is called the dual problem of (373).
The derivation above explains why (in maximization optimization problems) the objective value of the dual problem is always greater or equal to the primal problem (for minimization problems the opposite is true; in fact, (373) is the dual to (375)). Nevertheless, there is a much simpler proof (although not as enlightening): let \( X,Z\) be a feasible point of (373) and (375), respectively. Since \( Z\) is diagonal and \( X_{ii}=1\) , it follows that \( \operatorname{Tr}(ZX)=\operatorname{Tr}(Z)\) . Also, \( Z-B\succeq 0\) and \( X\succeq 0\) , therefore \( \operatorname{Tr}[(Z-B)X] \geq 0\) . Altogether,
as stated.
Recall that we want to show that \( gg^T\) is the optimal solution of (373). Then, if we find \( Z\) diagonal, such that \( Z-B \succeq 0\) and
then \( X=gg^T\) must be an optimal solution of (373). To ensure that \( gg^T\) is the unique solution we just have to ensure that the nullspace of \( Z-B\) only has dimension 1 (which corresponds to multiples of \( g\) ). Essentially, if this is the case, then for any other possible solution \( X\) one could not satisfy complementary slackness.
This means that if we can find \( Z\) with the following properties:
then \( gg^T\) is the unique optimum of (373) and so recovery of the true partition is possible (with an efficient algorithm). \( Z\) is known as the dual certificate, or dual witness (note that this essentially corresponds to establishing the KKT conditions discussed in Section 9.3.3).
The idea to build \( Z\) is to construct it to satisfy properties (1) and (2) and try to show that it satisfies (3) and (4) using concentration. In fact, since \( Z\) is diagonal this design problem has \( n\) free variables. If \( Z-B \succeq 0\) then condition (2) is equivalent to \( (Z-B)g=0\) which provides \( n\) equations, as the resulting linear system is non-singular, the candidate arising from using conditions (1) and (2) will be unique.
A couple of preliminary definitions will be useful before writing out the candidate \( Z\) . Recall that the degree matrix \( D\) of a graph \( G\) is a diagonal matrix where each diagonal coefficient \( D_{ii}\) corresponds to the number of neighbors of vertex \( i\) and that \( \lambda_2(M)\) is the second smallest eigenvalue of a symmetric matrix \( M\) .
Definition 34
Let \( \mathcal{G}_+\) (resp. \( \mathcal{G}_-\) ) be the subgraph of \( G\) that includes the edges that link two nodes in the same community (resp. in different communities) and \( A\) the adjacency matrix of \( G\) . We denote by \( D_{\mathcal{G}}^+\) (resp. \( D_{\mathcal{G}}^-\) ) the degree matrix of \( \mathcal{G}_+\) (resp. \( \mathcal{G}_-\) ) and define the Stochastic Block Model Laplacian to be
Note that the inclusion of self loops does not change \( L_{SBM}\) . Also, we point out that \( L_{SBM}\) is not in general positive-semidefinite.
Now we are ready to construct the candidate \( Z\) . Condition (2) implies that we need \( Z_{ii} = \frac1{g_i}B[i,:]g\) . Since \( B = 2A - (\mathbf{1}\mathbf{1}^T -I)\) we have
meaning that
This is our candidate dual witness. As a result
It trivially follows (by construction) that
This immediately gives the following lemma.
Lemma 14
Let \( L_{\text{SBM}}\) denote the Stochastic Block Model Laplacian as defined in Definition 34. If
(376)
then the relaxation (373) recovers the true partition.
Note that \( 2 L_{\text{SBM}} +11^T\) is a random matrix and so this reduces to “an exercise" in random matrix theory.
We will dedicate Chapter 15 to random matrix theory and matrix concentration inequalities that aim to control the largest eigenvalue or spectral norm of random matrices. In this section we present a general use concentration inequality for sums of independent random matrices, while noting that, as with scalars, many random variables can be written as sums of independent random variables even when it’s not trivially apparent (and we will see below that this is the case for the matrix appearing in Lemma 14).
Let us recall Bernstein’s inequality (Theorem 4) copied here with slightly different notation, and with only one of the tails: If \( X_1,X_2,…,X_n\) are independent centered random variables satisfying \( |X_i| \leq r\) and \( \mathbb{E}[X_i^2]=\frac1n\nu^2\) . Then,
(377)
A very useful generalization of this inequality exists for bounding the largest eigenvalue of the sum of independent random matrices
Theorem 54 (Matrix Bernstein Inequality, Theorem 1.4 in [318])
Let \( \{X_k\}_{k=1}^n\) be a sequence of independent random symmetric \( d\times d\) matrices. Assume that each \( X_k\) satisfies:
Then, for all \( t\geq 0\) ,
Recall that \( \|A\|\) denotes the spectral norm of \( A\) . Comparing with (377) the attentive reader will notice an extra dimensional factor of \( d\) ; a simple change of variables shows that this corresponds to a poly-logarithmic factor on the random variable, a factor that will be discussed later in this chapter where we will also include an improved inequality (Theorem 71). Theorem 54 can be easily extended to rectangular matrices, see e.g. Theorem 1.6 in [318].
In Chapter 15 we will discuss matrix concentration inequalities in detail and prove inequalities similar to Theorem 54 (for the proof of the precise bound in Theorem 54, which is based on a different toolkit than what we will explore in Chapter 15, we point the reader to [318]). For now we will use this inequality to show that the SDP approach presented above achieves exact recovery of communities in the stochastic block model.
In this section we show how the resulting question amounts to controlling the largest eigenvalue of a random matrix, which can be done with the matrix concentration tools described above.
Let us start by noting that
and \( \mathbb{E} D_{\mathcal{G}}^+ = \frac{n}2 \frac{\alpha\log(n)}{n} I\) , \( \mathbb{E}D_{\mathcal{G}}^- = \frac{n}2 \frac{\beta\log(n)}{n} I\) . Moreover, \( \mathbb{E} A\) is a matrix with four \( \frac{n}2\times \frac{n}2\) blocks where the diagonal blocks have entries \( \frac{\alpha\log(n)}{n}\) and the off-diagonal blocks have entries \( \frac{\beta\log(n)}{n}\) . In other words
This means that
Since \( L_{\text{SBM}}g=0\) and \( 11^Tg = 0\) , we can safely ignore what happens in the span of \( g\) , and it is not hard to see that
Thus, it is enough to show that
(378)
which is a large deviation inequality; recall that \( \|\cdot\|\) denotes operator norm.
The idea is to write \( L_\text{SBM} - \mathbb{E}\left[ L_\text{SBM} \right]\) as a sum of independent random matrices and use the Matrix Bernstein Inequality (Theorem 54). This gives an illustrative example of the applicability of matrix concentration tools, as many random matrices of interest can be rewritten as sums of independent matrices.
Let us start by defining, for \( i\) and \( j\) in the same community (i.e. \( g_i=g_j\) ),
and
where \( e_i\) (resp. \( e_j\) ) is the vector of all zeros except the \( i^{th}\) (resp. \( j^{th}\) ) coefficient which is 1.
For \( i\) and \( j\) in different communities (i.e. \( g_i \neq g_j\) ), define
and
We have
We note how \( (\gamma_{ij}^+)_{i,j}\) and \( (\gamma_{ij}^-)_{i,j}\) are jointly independent random variables with expectations \( \mathbb{E} (\gamma_{ij}^+) = \frac{\alpha\log n}{n}\) and \( \mathbb{E} (\gamma_{ij}^-)= \frac{\beta\log n}{n}\) . \( \Delta^+_{ij}\) and \( \Delta^-_{ij}\) are deterministic matrices. This means that
We can then use Theorem 54 by setting
(379)
and \( R=2\) , since \( \left\|\Delta^+_{ij}\right\|=\left\|\Delta^-_{ij}\right\|=2\) and both \( (\gamma_{ij}^+)_{i,j}\) and \( (\gamma_{ij}^-)_{i,j}\) take values in \( [-1,1]\) . Note how this bound is for the spectral norm of the summands, not just the largest eigenvalue, as our goal is to bound the spectral norm of the random matrix. In order to compute \( \sigma^2\) , we write
and
.
Since \( \mathrm{Var}\left[\gamma^+\right] \leq \frac{\alpha\log n}{n}\) , \( \mathrm{Var}\left[\gamma^-\right] \leq \frac{\beta\log n}{n}\) , and all the summands are positive semidefinite we have
Using Theorem 54 for \( t= \frac{\alpha-\beta}2\log n\) on both the largest and smallest eigenvalue gives
Together with Lemma 14, this implies that as long as
(380)
the semidefinite programming relaxation (373) recovers the true partition, with probability tending to \( 1\) as \( n\) increases.
While it is possible to obtain a stronger guarantee for this relaxation, the derivation above illustrates the matrix concentration technique in a simple, yet powerful, instance. In fact, the analysis in [316] uses the same technique. In order to obtain a sharp guarantee (Theorem 55 below) one needs more specialized tools. We refer the interested reader to [319] or [320] for a discussion and proof of Theorem 55; the main idea is to separate the diagonal from the non-diagonal part of \( L_\text{SBM} - \mathbb{E}\left[ L_\text{SBM} \right]\) , treating the former with scalar concentration inequalities, and the latter with specialized matrix concentration inequalities such as the ones in [321].
Theorem 55
Let \( G\) be a random graph with \( n\) nodes drawn according to the stochastic block model on two communities with edge probabilities \( p\) and \( q\) . Let \( p = \frac{\alpha \log n}n\) and \( q = \frac{\beta \log n}n\) , where \( \alpha> \beta\) are constants. Then, as long as
(381)
the semidefinite program considered above coincides with the true partition with high probability.
Note that, if
(382)
then exact recovery of the communities is impossible, meaning that the SDP algorithm is optimal. Furthermore, in this regime (382), one can show that there will be a node on each community that is more connected to the other community than to its own, meaning that a partition that swaps them would have more likelihood. The fact that the SDP will start working essentially when this starts happening appears naturally in the analysis in [319]. Later, it was proven that the spectral method (361), followed by a simple thresholding step, also gives exact recovery of the communities [322]. An analogous analysis has recently been obtained for the (normalized or unnormalized) graph Laplacian in place of the adjacency matrix, see [323]. However, the proof techniques for the graph Laplacian are different and a bit more involved, since—unlike the adjacency matrix—the graph Laplacian does not exhibit row/column-wise independence.
Remark 31
An important advantage of semidefinite relaxations is that they are often able to produce certificates of optimality. Indeed, if the solution of the relaxation (373) is rank 1 then the user is sure that it must be the solution of (371). These advantages, and ways of producing such certificates while bypassing the need to solve the semidefinite program are discussed in [317]. Semidefinite relaxation has also been effectively used to show rigorously that spectral clustering can indeed outperform clustering via \( k\) -means [324, 325, 326]
In fact, the convex relaxation of optimization problems involving low-rank constraints plays an important role in many areas of science and engineering. There one often one seeks to minimize the rank of a matrix subject to linear or convex constraints. Rank minimization is intrinsically non-convex and combinatorial, making it computationally intractable in general. A standard convex relaxation replaces the rank function with the nuclear norm (or Schatten-1 norm), defined as the sum of the singular values of a matrix.
This relaxation leads to tractable convex programs—often semidefinite programs or efficiently solvable via first-order methods—that promote low-rank solutions while retaining strong theoretical guarantees. Amazingly, under suitable conditions, nuclear norm minimization is provably exact, recovering the original minimum-rank solution. As a result, convex nuclear norm minimization provides a principled and computationally efficient surrogate for rank minimization in a wide range of applications, including matrix completion, system identification, and robust principal component analysis. We will discuss this idea and several applications in detail in Chapter 17.
Exercise 148
[ Max-Cut Bound] Show that every undirected graph with \( |E|\) edges contains a cut that separates at least \( |E|/2\) edges. Hint Consider the expected cut value of a random partition \( (S,S^c)\) where each vertex has probability \( 1/2\) to be in \( S\) .
Exercise 149 (Random MaxCut and Boosting)
We consider the following naive (but surprisingly effective) procedure to find a large cut in a graph \( G\) with an even number of vertices: choose a set \( S\) of \( n/2\) vertices uniformly at random in \( G\) . We want to show that the partition \( (S, S^c)\) cuts a large number of edges with some (small but positive) probability. Then we boost the procedure to increase the probability of finding a large cut.
Show that for any fixed \( \varepsilon \in (0, \frac{1}{2})\)
where \( |E|\) is the number of edges in graph \( G\) . Hint For (a) it may be easier to study the set of edges that are NOT being cut.
The result of the previous subproblem is rather unsatisfying, since if we want to find a cut with \( 0.49 |E|\) edges, the probability of success may be as low as \( 0.01\) . For this reason we will modify our procedure, namely to improve our accuracy we sample \( S\) several times.
Suppose we run the procedure \( k\) times and get sets \( S_1, \dots, S_k\) . We want to construct a set \( S^*\) from these outputs such that for any \( \delta \in (0,1)\) ,
Find such cut and give an estimate on the required number of trials \( k(\delta, \varepsilon)\) depending on probability parameter \( \delta\) and approximation parameter \( \varepsilon\) .
Remark: observe that the same technique can be applied to other randomized algorithms as well.
Exercise 150 (Dual SDP)
To find the solution to the community detection problem in SBM, in the course we introduce convex relaxation of the problem and subsequently use convex duality to certify the optimality. In this problem, we will find the dual problem using the Lagrangian function.
Recall the definition of a semidefinite program (SDP).
Definition A semidefinite program (SDP) is an optimization problem of the following type:
(383)
where \( A, B_1, \dots, B_m \in \mathbb{R}^{n \times n}\) and \( b_i \in \mathbb{R}\) are given.
In SDPs, one of the constraints is positive semidefiniteness of a matrix. This constraint can be incorporated in the Lagrangian function as follows:
where \( Y \in \mathbb{R}^{n\times n}\) is positive semidefinite matrix, and \( \nu \in \mathbb{R}^m\) . Using this Lagrangian, we can easily check that
coincides with the optimal value of the original SDP (383).
Using the expression for the Lagrangian function, find the dual function
defined for PSD matrices \( Y\in \mathbb{R}^{n\times n}\) and \( \nu \in R^m\) (note that the dual function may be infinite for certain values of \( Y\) ). Then write the dual program of the SDP (383) (the dual program just minimizes the dual function and contains the constraints that prevent the dual function from being infinite).
Using (a), find the dual of the following semidefinite program:
Exercise 151 (Connectedness of the Erdős-Rényi graph)
We define the Erdős-Rényi graph as a random graph \( G \sim \mathcal{G}(n,p)\) with \( n\) vertices generated by placing each possible edge independently at random with probability \( p\) . The Erdős-Rényi graph is a popular model to study the performance of several optimization algorithms on graphs. Many of these algorithms rely on the graphs being connected and in this problem we study when this is the case for the Erdős-Rényi model.
We define \( p:=\frac{\lambda\log n}{n}\) for some constant \( \lambda >0\) .
Prove that if \( \lambda \le 1-c\) , where \( c>0\) is an absolute constant, then the graph \( G\) has an isolated vertex with probability \( 1-o(1)\) . (We use the standard asymptotic notation, \( f(n) = o(1)\) if \( \lim_{n \rightarrow \infty}f(n) = 0\) .)
Hint For (a) consider the random variable that counts the number of isolated vertices.
Hint Use Problem 5.
Exercise 152 (Sum of Squares Proof)
Let \( x,y\) be real numbers, prove
Hint Add and subtract an appropriate monomial.
Exercise 153 (Smallest Eigenvalue Program)
Let \( A \in \mathbb{R}^{d \times d}\) be a symmetric matrix. Prove that the following optimization problem has the smallest eigenvalue of \( A\) as optimal value:
(Recall that \( X \succeq 0\) means that \( X\) is PSD.)
Exercise 154 (Discrepancy Relaxation)
Let \( A \in \mathbb{R}^{d \times m}\) be a matrix. We define its discrepancy as the optimal value of the following minimization problem:
The vector discrepancy of \( A\) is the minimal value of the problem
where \( \mathbb{S}^{m-1} \subset \mathbb{R}^m\) denotes the euclidean unit sphere, so \( {\left\lVert{u_i}\right\rVert}_2 = 1\) for all \( 1\leq i \leq m\) . The goal of this exercise is to show that vector discrepancy is a convex relaxation of discrepancy, which can be solved using a semidefinite program.
Prove the inequality
Prove that the quantity \( \operatorname{vecdisc}(A)^2\) is the optimal value of the following semidefinite program:
Hint Use the square-root of the matrix \( X\) to construct your unit vectors.
Exercise 155 (Minimum Bisection and Community Detection)
The goal of this exercise is to relate the minimum bisection problem with exact recovery in the community detection problem. Assume that \( n\) is even and consider the graph with \( n\) vertices drawn from the stochastic block model with two balanced communities, i.e, each community has size \( n/2\) , moreover, the two communities are chosen uniformly at random. Let \( p\) be the probability that an edge is placed inside the communities and \( q\) across the communities with \( p>q\) .
Our goal is to estimate the partition \( \Omega\) induced by the communities with an estimator \( \hat{\Omega}(G)\) that depends only on one sample of the random graph \( G\) . Prove that the estimator that minimizes the probability of error is equivalent to solve the minimum bisection of the observed graph \( G\) (the minimum bisection is a partition into two equally-sized subsets, such that the number of edges being cut by such a partition is minimal). The probability of error \( P_e\) is given by
Here the sum is taken over all possible realizations of the random graph \( G\) .
Hint Use Bayes’ rule to simplify and note that you can ignore terms that do not depend on \( \hat{\Omega}\) .
Exercise 156 (PSD Set Convexity)
Show that the set \( S_n^+ = \{A \in \mathbb{R}^{n\times n}: A \succeq 0 \}\) is convex and that it is invariant under multiplication with a positive scalar.
\begin{myexercise}[ Spectral Algorithm for Planted Clique]
We want to analyze parts of a spectral algorithm, which is used to find the largest clique in a graph \( G\) on \( n\) vertices. This algorithm is often analyzed for the planted clique model, where \( G \sim \mathcal{G}(n,1/2)\) is random Erdős-Rényi graph and then \( k\) vertices of \( G\) are randomly uniformly selected and then edges will be added to \( G\) until these \( k\) vertices become a clique (fully connected amongst each other). We call the graph we get after this procedure \( \tilde{G}\) . The goal is to find this planted clique with the so called "AKS spectral algorithm", which relies on computing the top eigenvector of the matrix \( M \mathrm{:=} A - \frac12 \mathbf{1}_n\mathbf{1}_n^\top\) , where \( A\) is the adjacency matrix of \( \tilde{G}\) and \( \mathbf{1}_n \in \mathbb{R}^n\) is the all-ones vector. The idea behind this algorithm is that the matrix \( M\) is typically close to the matrix \( \frac 12 \mathbf{1}_S \mathbf{1}_S^T\) , where \( \mathbf{1}_S\) is the indicator vector of the planted clique \( S\) , and if the matrices are close, then their top eigenvectors should in some sense also be close. This is the part that you will prove in this exercise: \begin{myList}{numbered}[(a)] \item Let \( 0< \varepsilon < 1\) , and suppose there exists a symmetric matrix \( M \in \mathbb{R}^{n \times n}\) and a subset \( S \subset [n]\) with the property \( |S| > 2(1+ \varepsilon^{-1}){\left\lVert{M- \frac12 \mathbf{1}_S \mathbf{1}_S^\top}\right\rVert}\) , where \( \mathbf{1}_S \in \mathbb{R}^n\) is the indicator vector of \( S\) (so \( 1\) whenever the coordinate is in \( S\) and \( 0\) otherwise). If \( v\) is an eigenvector corresponding to the largest eigenvalue of \( M\) with norm \( {\left\lVert{v}\right\rVert}_2^2 = |S|\) , prove that the following inequality holds:
You may use the following theorem without proof:
Theorem 56
Let \( M \in \mathbb{R}^{n \times n}\) be a symmetric matrix and let \( v\) be an eigenvector corresponding to the largest eigenvalue of \( M\) . Let \( y \in \mathbb{R}^n\) be any vector and let \( \theta\) be the angle between \( y\) and \( v\) , then
Hint Use the fact that the dot product of \( \mathbf{1}_S\) and \( v\) depends on the angle between these vectors.
\end{myList} \end{myexercise}
Exercise 157 ("Baby" Davis-Kahan Theorem)
The aim of this problem is to prove the matrix peturbation theorem you were given in Problem . Let \( M \in \mathbb{R}^{n \times n}\) be a symmetric matrix and let \( v\) be a unit-length eigenvector corresponding to the largest eigenvalue of \( M\) (in magnitude). Let \( y \in \mathbb{R}^n\) be any vector and let \( \theta\) be the angle between \( y\) and \( v\) , then
Let \( P_{y^\perp}\) be the \( n \times n\) orthogonal projection matrix that projects a vector onto the orthogonal complement of \( y\) and let \( \lambda\) be the eigenvalue of \( M\) corresponding to \( v\) . Prove
Exercise 158 (Sign Rounding)
As seen in the lecture, often we would like to round an eigenvector we computed in a spectral algorithm to a sign vector. A very naive (but sometimes effective) method is to simply take the sign of every entry of the vector. So given \( x \in \mathbb{R}^d\) we define \( \operatorname{sgn}(x) \in \mathbb{R}^d\) by \( \operatorname{sgn}(x)_i = 1\) if \( x_i \geq 0\) and \( \operatorname{sgn}(x)_i = -1\) otherwise. This method works well when the eigenvector is already close to a sign vector as you will show.
Let \( x \in \mathbb{R}^d\) be a vector and let \( y \in \{-1,+1\}^d\) be a sign vector. Prove that if
then the number of indices \( i\) with \( \operatorname{sgn}(x)_i \neq y_i\) is at most \( \varepsilon^2 d\) .
Exercise 159 (Little Grothendieck Problem)
Let \( C\succeq 0\) (\( C \in \mathbb{R}^{n \times n}\) is positive semidefinite). In this problem you will show an approximation ratio of \( \frac{2}{\pi}\) to the problem
Similarly to Max-Cut, we consider
The goal is to show that, for \( g \sim\mathcal{N}\left(0,I_{n\times n}\right)\) , taking \( x_i= \operatorname{sign}(v_i^T g)\) a randomized rounding,
(384)
The difficulty lies in the fact that \( \mathbb{E}[x_i x_j]\) is not easy to compute, which is why we divide this exercise into two parts.
Define the matrix \( S \in \mathbb{R}^{n \times n}\) with entries
Show that
holds, and use this fact to prove the inequality (384).
Exercise 160 (Minimum Bisection Relaxation)
In Problem 155 we saw that the problem of community detection is equivalent to solving the minimum bisection problem in a graph \( G\) . Unfortunately, solving the minimum bisection problem is NP-hard, so we would like to solve a semidefinite relaxation of it. For a graph on \( n\) vertices with adjacency matrix \( A\) the semidefinite relaxation of the minimum bisection problem is given by
Find matrices \( B_1, …, B_k\) and real numbers \( b_1, …, b_k\) for some integer \( k\) , such that the problem can be written as
(385)
In this chapter we significantly expand on the concepts presented in Chapter 3, showcasing several other instances of the Concentration of Measure phenomena, and focusing on Gaussian Analysis to develop a toolkit that is used throughout the book, including the celebrated Gordon’s Escape through a Mesh Theorem. Our treatment draws inspiration from the excellent texts [14, 327].
Notation: In this chapter, we try to reserve \( g\) for an isotropic Gaussian vector and use \( X\) and \( Y\) to denote Gaussian vectors with other covariances.
We start by covering some basics in Gaussian analysis, starting with a very useful fact about Gaussian random variables: Gaussian integration by parts.
Lemma 15 (Gaussian integration by parts)
Let \( g\) be an \( n\) dimensional vector of iid \( \mathcal{N}(0,1)\) random variables (\( g\sim\mathcal{N}(0,I_{n\times n})\) ). Let \( \psi:\mathbb{R}^n\to\mathbb{R}\) be any differentiable function with at most exponential growth, then for any \( i\in[n]\) ,
Proof
For \( \phi\) a univariate function, integration by parts gives
as long as \( \phi\) is differential and has at most exponential growth. The proof follows by taking \( \phi(x)=F(g_1,\dots,g_{i-1},x,g_{i+1},\dots,g_n)\) and conditioning on \( g_1,\dots,g_{i-1},g_{i+1},\dots,g_n\) .
It is straightforward to extend this formula to non-isotropic Gaussian vectors, and we record this here as a corollary.
Corollary 3
Let \( X\) be a centered \( n\) -dimensional Gaussian vector with covariance \( \Sigma\) , i.e. \( X\sim\mathcal{N}(0,\Sigma)\) . Let \( \varphi\in\mathbb{R}^n\to\mathbb{R}\) be any differentiable function with at most exponential growth, then for any \( j\in[n]\) ,
Proof
We can write \( X=\Sigma^{\frac12}g\) where \( g\) has iid \( \mathcal{N}(0,1)\) entries (note that \( \Sigma \succeq 0\) ). Defining \( \psi(g) = \varphi(\Sigma^{\frac12}g) \) and using Lemma 15 yields
where in the first equality in the third line we used Lemma 15. The last equality follows from matrix multiplication and the fact that \( \Sigma^{\frac12}\) is a symmetric matrix.
Lemma 16 (Gaussian moments)
Let \( g\) be a standard univariate Gaussian. We have
where \( (2p-1)!! = (2p-1)(2p-3)\cdots3\cdot1\) . Also,
Proof
This is a straightforward application of Gaussian integration by parts (Lemma 15). Let \( \phi(g)=g^{2p-1}\) then \( \mathbb{E}[g\cdot g^{2p-1}] = \mathbb{E}[(2p-1) g^{2p-2}]\) . Iterating and using \( \mathbb{E} g^2=1\) gives \( \mathbb{E} g^{2p} = (2p-1)!!\) . While it is easy to see that \( (2p-1)!!\leq (2p)^{p}\) , which proves the intended inequality, it is instructive to see a different, direct, proof:
Since \( \mathbb{E}[g^{2p}] = \mathbb{E}[(2p-1) g^{2p-2}]\) and, by Jensen, \( \mathbb{E}[g^{2p-2}]\leq \left(\mathbb{E}[g^{2p}]\right)^{\frac{2p-2}{2p}}\) , we have
which can be rewritten as \( \left(\mathbb{E}[g^{2p}]\right)^{\frac{1}{p}}\leq (2p-1)\) .
We will be interested in computing trace moments of Gaussian matrices, which will involve computing expected values of polynomials of Gaussians. It is clear that the expected value of any polynomial of i.i.d. standard Gaussians can be computed using Gaussian integration by parts for each monomial (just as in Lemma 16). Wick’s formula is a very useful way of organizing this calculation. Before stating Wick’s formula, we need to define the notion of pair partition.
Definition 35 (Pair Partition)
Given \( k\) a positive integer, we define \( \mathbb{P}_2[k]\) as the set of partitions of \( [k]\) into subsets of size 2 each. If \( k\) is odd then \( \mathbb{P}_2[k]\) is empty. Given a function \( u\) on \( [k]\) and a pair partition \( \nu\in\mathbb{P}_2[k]\) we say that \( u\) is compatible with \( \nu\) , and write \( u\sim\nu\) if for all sets \( \{i,j\}\in\nu\) we have \( u(i)=u(j)\) .
Lemma 17 (Wick’s formula)
Let \( g_1,\dots,g_n\) be iid standard Gaussian random variables and let \( u:[p]\to[n]\) then
where \( \mathbb{P}_2[p]\) denotes a set of pair partitions and \( u \sim \nu\) means that the function \( u\) is compatible with \( \nu\) (see Definition 35)
Proof
Since both sides are zero when \( p\) is odd we can focus on the case when \( p\) is even. We can then prove the identity by induction. It is trivially true for \( p=2\) , let \( p\geq 4\) an even number. Using Gaussian integration by parts
Using the induction hypothesis for \( \mathbb{E}\left[ g_{u(2)} … g_{u(i-1)} g_{u(i+1)}… g_{u(p)}\right]\) (which is a product of \( p-2\) factors) we get
where \( u_{|[p]\setminus\{1,i\} }\) denotes the restriction of \( u\) to the set \( [p]\setminus\{1,i\}\) .
In this section, we start with a classical tool in Gaussian analysis that we will use several times, namely the idea of Gaussian Interpolation.
Lemma 18 (Gaussian Interpolation)
Let \( X\) and \( Y\) be two centered independent \( n\) dimensional Gaussian vectors with covariances, respectively \( \Sigma^X\) and \( \Sigma^Y\) . Define, for \( t\in[0,1]\) ,
(386)
with \( X\) and \( Y\) independent from each other, and let \( f:\mathbb{R}^n\to\mathbb{R}\) be a twice differentiable function with at most exponential growth. Then
(387)
Before proving this lemma, we note that the parameterization of the path, although perhaps peculiar at first, is the one that in the case that \( X\) and \( Y\) are identically distributed, renders \( Z_t\) identically distributed to them for any \( t\) ; it is also the parameterization for which \( \operatorname{Cov}(Z_t) = t\operatorname{Cov}(X)+(1-t)\operatorname{Cov}(Y)\) , where \( \operatorname{Cov}(X)=\mathbb{E} XX^T\) (since \( \mathbb{E} X=0\) ).
Proof
The idea will be to use Gaussian integration by parts (Corollary 3). By the chain rule (and swapping the order of differentiating and taking the expectation)
For the first term, conditioning on \( Y\) and using Corollary 3 on the random variable \( \sqrt{t}X\) gives
An analogous calculation for the second terms completes the proof.
Gaussian interpolation will play (at least) two important roles in the following: (i) together with the fundamental theorem of calculus it will allows us to compare \( \mathbb{E} f(X)\) with \( \mathbb{E} f(Y)\) for various functions \( f\) and Gaussian random variables \( X\) and \( Y\) , this is the key tool behind the comparison inequalities of Section 14.3; (ii) another important role of Gaussian interpolation is to provide concentration inequalities, roughly speaking by interpolating between \( (X,X)\) containing two exact copies of a random variable and \( (X,X')\) containing two independent copies, allows to quantitatively say how much two independent copies of a random variable behave similarly, resulting in concentration of measure. The first instance of this idea is in the so-called Gaussian covariance identity, but we will see it again in the Gaussian Poincaré inequality and in Gaussian concentration.
Lemma 19 (Gaussian covariance identity)
Let \( \phi\) and \( \psi\) be two differentiable functions (from \( \mathbb{R}^n\) to \( \mathbb{R}\) ) of at most exponential growth. Let \( g\) and \( g'\) be two iid \( n\) dimensional \( \mathcal{N}(0,I)\) vectors. Define
(388)
We have
Before proving this lemma, let us remark on how the interpolation in (388) is related to the one in (386). The interpolation used in (386) is an interpolation between two distributions of random variables linearly parameterized on the covariance of these random variables. The interpolation in the covariance identity (388) creates a path between a random variable and an i.i.d. copy of it, linearly parameterized by the covariance between \( g\) and \( g_{(t)}\) . As we will see in the proof below, we can study (388) by taking \( Z_t = \sqrt{t}X+\sqrt{1-t}Y\) where \( X\) and \( Y\) are two \( 2n\) -dimensional Gaussian random variables with covariances
(389)
since, for each \( t\in[0,1]\) , \( Z_t \sim \left[\begin{array}{c} g \\ g_{(t)}\end{array}\right]\) (in the since of having the same probability law).
Proof
Let us start by defining \( \ell(t) = \mathbb{E} \left[\phi(g)\psi(g_{(t)})\right]\) . One has
thus
The idea now is to compute \( \ell'(t)\) using Lemma 18. We leverage the construction above and consider \( Z_t=\sqrt{t}X+\sqrt{1-t}Y\) where \( X\) and \( Y\) are independent Gaussian vectors distributed accordingly to (389). Since, for each \( t\in[0,1]\) , \( Z_t\) has the same law as \( \left[\begin{array}{c} g \\ g_{(t)}\end{array}\right]\) we have that \( f(Z_t)\) has the same law as \( \phi(g)\psi(g_{(t)})\) for \( f:\mathbb{R}^{2n}\to\mathbb{R}\) given by \( f\left(\left[\begin{array}{c} y \\ z\end{array}\right]\right) = \phi(y)\psi(z)\) for \( y,z\in\mathbb{R}^n\) , and so \( \ell(t) = \mathbb{E} \left[ f(Z_t) \right]\)
The rest of the proof is a straightforward computation using Lemma 18:
An elegant consequence of this lemma is the celebrated Gaussian Poincaré inequality, which bounds the variance of a function of a Gaussian vector by its gradient yielding a form concentration of measure: “If a function \( f\) has small gradient, \( f(X)\) has small variance”.
Proposition 19 (Gaussian Poincaré Inequality)
Let \( f:\mathbb{R}^n\to\mathbb{R}\) be a differentiable function with at most exponential growth. Let \( g\sim\mathcal{N}\left(0,I_{n\times n}\right)\) . Then
We note that this inequality (as the others in this chapter) can be effortlessly extended to Lipchitz functions by a standard approximation argument.
Proof
By the Gaussian covariance identity (Lemma 19) we have
where the inequality follows from Cauchy-Schwarz on both the inner-product and the expectation and the penultimate equality follows from the fact that \( g\sim g_{(t)}\) .
We will now prove one of the most important results in concentration of measure, Gaussian concentration. Although being a concentration result specific for normally distributed random variables, it will be very useful throughout this book. Much like Poincaré’s inequality above, it intuitively it says that if \( F:\mathbb{R}^n\to\mathbb{R}\) is a function that is stable in terms of its input then \( F(X)\) is well concentrated around its mean, where \( X\in\mathcal{N}(0,I)\) . Unlike Pointcaré’s inequality above, Gaussian concentration provides Gaussian tail bounds. More precisely:
Theorem 57 (Gaussian Concentration)
Let \( g\sim\mathcal{N}(0,I_{n\times n})\) be a vector with i.i.d. standard Gaussian entries and \( f:\mathbb{R}^n\to\mathbb{R}\) a \( \sigma\) -Lipchitz function (i.e.: \( |f(x)-f(y)|\leq \sigma \|x-y\|\) , for all \( x,y\in\mathbb{R}^n\) ). Then, for every \( t\geq 0\)
Proof
We will assume that the function \( f\) is smooth as a limiting argument can generalize the result from smooth functions to general Lipschitz functions. The existence of the integrals we use follows from the constraints that the Lipschitz property forces on growth of \( f\) . We also assume \( \mathbb{E} f(g)=0\) for ease of notation, as we can simply consider \( \phi(g)=f(g)-\mathbb{E} f(g)\) .
We consider the moment generating function (as in (9))
and note that
since \( \mathbb{E} f(g)=0\) .
The Gaussian covariance identity (Lemma 19) then gives
The Lipchitz condition implies that \( |\langle \nabla f(g),\nabla f(g_{(t)}) \rangle|\leq \sigma^2\) which together with the fact that \( M_f(\lambda)\geq 0\) gives
Since \( M_f(0)=1\) this implies (one can see this, e.g., by noting that \( \log M_f(0)=0\) and \( \left|\frac{d}{d\lambda}\log M_f(\lambda) \right| \leq |\lambda| \sigma^2\) ) that
The rest of the proof follows from the standard Chernoff trick and Markov Inequality (the same we did in Proposition 5), Formally, we showed that \( f(g)\) is a sub-Gaussian random variable (in the sense of Definition 1) and the proof can be finished by using Proposition 6.
There is a direct argument for a weaker version of this inequality that does not require the covariance identity. We refer the interested reader to Theorem 2.1.12 in [29] (the original argument is due to Maurey and Pisier).
A remarkable result by Talagrand [330], Talagrand’s concentration inequality, provides an analogue of Gaussian concentration for bounded random variables.
Theorem 58 (Talagrand concentration, Thm. 2.1.13 [29])
Let \( K>0\) , and let \( X_1,\dots,X_n\) be independent bounded random variables with \( |X_i|\leq K\) for all \( 1\leq i \leq n\) . Let \( F:\mathbb{R}^n \to \mathbb{R}\) be a \( \sigma\) -Lipschitz and convex function. Then, for any \( t\geq 0\) ,
for positive constants \( c_1\) , and \( c_2\) .
Other useful similar inequalities (with explicit constants) are available in [331].
We will start this section with the celebrated Slepian’s Comparison Lemma, also known as the Sudakov-Fernique inequality, are crucial tools to compare Gaussian processes. A Gaussian process is a family of Gaussian random variables indexed by some set \( T\) , \( \left\{X_t\right\}_{t\in T}\) (if \( T\) is finite this is simply a Gaussian vector). Given a Gaussian process \( X_t\) , a particular quantity of interest is \( \mathbb{E}\left[\sup_{t\in T}X_t\right]\) .
We will focus on Gaussian Processes that are whose maximum is well approximated by maximum on finite sets, meaning Gaussian Processes for which
(390)
To not significantly deviate from the main message of this process we won’t discuss regularity and measurability issue of Gaussian processes in detail, but note that the standard class of Gaussian processes that satisfy (390) are so-called separable Gaussian processes (you can see a definition in Definition 5.22 of [14], it essentially requires that there exists a countable subset \( T_0\) of the domain for which, for any \( t\in T\) , \( X_t\) lies in the limit points of \( X_s\) for \( s\in T_0\) and \( s\to t\) ). In any case, the Gaussian processes we will consider are either finite, which case they are trivially separable (and (390) holds), or they are defined over a separable set \( T\) and have path continuity on the process metric \( d(t,u) = \sqrt{\mathbb{E}(X_t-X_u)^2}\) which also ensures (390). In most cases, in fact, one can simply think of the approximating subsets as \( \varepsilon\) -nets of \( T\) .
We will be particularly interested in comparing two different Gaussian processes, usually one of interest with one that is simpler to understand. Intuitively, if we have two Gaussian processes \( X_t\) and \( Y_t\) with mean zero \( \mathbb{E}\left[X_t\right] = \mathbb{E}\left[Y_t\right] = 0\) , for all \( t\in T\) , and the same variance, then the process that has the “least correlations” should have a larger maximum (think the maximum entry of vector with i.i.d. Gaussian entries versus one always with the same Gaussian entry). Theorem 59 makes this intuition precise and extends it to processes with different variances.
Theorem 59 (Slepian/Sudakov-Fernique inequality)
Let \( \left\{X_u\right\}_{u\in U}\) and \( \left\{Y_u\right\}_{u\in U}\) be two (almost surely bounded) separable centered Gaussian processes indexed by the same (compact) set \( U\) ( satisfying (390) ). If, for every \( u,v\in U\) :
(391)
then
Proof
Since \( X\) and \( Y\) are separable processes, we can reduce to the case in which \( U\) is finite, by showing the inequality for all finite subsets of the indexing set (see (390)).
The idea is to use Gaussian Interpolation (Lemma 18) on a soft-max. We take
For \( \beta>0\) we define
Gaussian Interpolation (Lemma 18) implies that
Setting \( p_u(Z) = e^{\beta Z_u(t)} / \sum_{v\in U} e^{\beta Z_v(t)}\) (we dropped the \( t\) from \( p_u(Z(t))\) to ease notation), we have
Our goal is to show that \( \frac{d}{dt}\mathbb{E} F_\beta(Z(t))\) is non-positive, implying that \( \mathbb{E} F_\beta(X) \leq \mathbb{E} F_\beta(Y)\) which by taking \( \beta\to\infty\) , and recalling that
finishes the proof.
Showing that \( \frac{d}{dt}\mathbb{E} F_\beta(Z(t))\) is non-positive is mechanical computation (using \( \sum_{u\in U}p_u(Z)=1\) and \( \mathbb{E}\left[X_{u}-X_{v}\right]^2 = \Sigma^X_{uu}-2\Sigma^X_{uv}+\Sigma^X_{vv}\) ). Indeed,
(392)
and
where the last equality follows from \( \sum_{v\in U\setminus \{u\}}p_v(Z) = 1-p_u(Z)\) .
We will also use in the following an extension due to Gordon [332, 333]. While we omit the proof here, we note that it can be shown by a similar argument as above, by taking a soft min-max, see, e.g., [333] or Problem 6.2. in [14]).
Theorem 60
[Theorem A in [333]] Let \( \left\{X_{t,u}\right\}_{(t,u)\in T\times U}\) and \( \left\{Y_{t,u}\right\}_{(t,u)\in T\times U}\) be two (almost surely bounded) separable centered Gaussian processes indexed by the same (compact) sets \( T\) and \( U\) .
If, for every \( t_1,t_2\in T\) and \( u_1,u_2 \in U\) :
(393)
and, for \( t_1\neq t_2\) ,
(394)
then
Note that Theorem 59 easily follows by setting \( |T|=1\) .
Before proceeding with Gordon’s Escape Through a Mesh Theorem we take a brief detour to showcase the usefulness of what we already developed in this chapter.
Let \( W\in\mathbb{R}^{n\times n}\) be a standard Gaussian Wigner matrix, a symmetric matrix with (otherwise) independent Gaussian entries, the off-diagonal entries have unit variance and the diagonal entries have variance \( 2\) (recall (71)). \( \lambda_{\max}(W)\) depends on \( \frac{n(n+1)}2\) independent (standard) Gaussian random variables and it is easy to see that it is a \( \sqrt{2}\) -Lipschitz function of these variables, since
The symmetry of the matrix and the variance \( 2\) of the diagonal entries are responsible for an extra factor of \( \sqrt{2}\) .
Using Gaussian Concentration (Theorem 57) we immediately get
On the other hand, one can prove \( \mathbb{E} \lambda_{\max}(W) \leq 2\sqrt{n}\) using Slepian’s inequality (Theorem 59) by comparing the Gaussian process \( X_u = u^Wu\) with the Gaussian process \( Y_u = \sqrt{2}g^Tu\) for \( g\in\mathcal{N}\left(0,I_{n\times n}\right)\) , this is an excellent exercises that we leave to the reader. Combining these we get the following.
Proposition 20
Let \( W\in\mathbb{R}^{n\times n}\) be a standard Gaussian Wigner matrix, a symmetric matrix with (otherwise) independent Gaussian entries, the off-diagonal entries have unit variance and the diagonal entries have variance \( 2\) . Then,
Note that this gives a rather precise control of the fluctuations of \( \lambda_{\max}(W)\) . In fact, for \( t = 2\sqrt{\log n}\) this gives
This illustrated the level of concentration we can expect from the spectral norm, or largest eigenvalues, of random matrices. As we will see in Chapter 15 the main challenge in many cases is in controlling the expected value of the spectral norm, or largest eigenvalue.
In Section 8.1 we showed that in order to approximately preserve the distances (up to \( 1\pm \varepsilon\) ) between \( n\) points, it suffices to randomly project them to \( \Theta\left(\varepsilon^{-2} \log n \right)\) dimensions. The key argument was that a random projection approximately preserves the norm of every point in a set \( S\) , in this case the set of differences between pairs of \( n\) points. What we showed is that in order to approximately preserve the norm of every point in \( S\) , it is enough to project to \( \Theta\left(\varepsilon^{-2} \log |S| \right)\) dimensions. The question this section is meant to answer is: can this be improved if \( S\) has a special structure? Given a set \( S\) , what is the measure of complexity of \( S\) that explains how many dimensions one needs to project on to still approximately preserve the norms of points in \( S\) . We shall see below that this will be captured—via Gordon’s Theorem—by the so called Gaussian width of \( S\) .
Definition 36 (Gaussian width)
Given a closed set \( S\subset \mathbb{R}^{p}\) , its Gaussian width \( \omega(S)\) is defined as:
where \( g_p\sim \mathcal{N}\left(0,I_{p\times p}\right)\) .
Similarly to the proof of Theorem 28 we will restrict our attention to sets \( S\) of unit norm vectors, meaning that \( S\subseteq \mathbb{S}^{p-1}\) (which in particular implies it is compact).
Also, we will focus our attention not in random projections but in the similar model of random linear maps \( G:\mathbb{R}^{p}\to\mathbb{R}^{d}\) that are given by matrices with i.i.d. Gaussian entries. For this reason the following proposition will be useful:
Proposition 21
Let \( g_d\sim \mathcal{N}\left(0,I_{d\times d}\right)\) , and define
Then \( \sqrt{d-1}\leq\sqrt{\frac{d}{d+1}}\sqrt{d}\leq a_d\leq \sqrt{d}\) .
We will prove here the weaker lower bound \( \sqrt{d-1}\leq a_d\leq \sqrt{d}\) which is sufficient for our purposes and has a very elegant proof.
Proof
The upper bound is a straightforward consequence of Jensen’s inequality
The lower bound \( \sqrt{d-1}\leq a_d\) follows from the Gaussian Poincaré Inequality (Proposition 19): let \( f(g_d)=\|g_d\|\) (and recall that since \( f\) is Lipschitz it has a gradient a.e. and we can apply Proposition 19. Thus \( \rm{Var}(f(g_d)) \leq \mathbb{E} \| \nabla f(g_d) \|^2\) which gives:
We are now ready to present Gordon’s Theorem.
Theorem 61 (Gordon’s Escape Through a Mesh [333])
Let \( G\in\mathbb{R}^{d\times p}\) be a random matrix with independent \( \mathcal{N}(0,1)\) entries and \( S\subset \mathbb{S}^{p-1}\) be a closed subset of the unit sphere in \( p\) dimensions. Then
(395)
and
(396)
where \( a_d = \mathbb{E}\|g_d\|\) and \( \omega(S)\) is the Gaussian width of \( S\) . Recall that \( \sqrt{\frac{d}{d+1}}\sqrt{d}\leq a_d\leq \sqrt{d}\) .
Before proving Gordon’s Theorem we will note some of its direct implications. The theorem suggests that \( \frac1{a_d}G\) preserves the norm of the points in \( S\) up to \( 1\pm \frac{\omega(S)}{a_d}\) , indeed we can make this precise with Gaussian concentration (Theorem 57).
Note that the function \( F(G) = \max_{x\in S} \left\|Gx\right\|\) is 1-Lipschitz. Indeed
Similarly, one can show that \( F(G) = \min_{x\in S} \left\| Gx\right\|\) is 1-Lipschitz. Thus, one can use Gaussian concentration to get
(397)
and
(398)
This gives us the following theorem.
Theorem 62
Let \( G\in\mathbb{R}^{d\times p}\) a random matrix with independent \( \mathcal{N}(0,1)\) entries and \( S\subset \mathbb{S}^{p-1}\) be a closed subset of the unit sphere in \( p\) dimensions. Then, for \( \varepsilon>\frac{\omega(S)}{a_d}\) , with probability \( \geq 1-2\exp\left[ -\frac{a_d^2}{2}\left( \varepsilon - \frac{\omega(S)}{a_d} \right)^2\right]\) :
for all \( x\in S\) .
Recall that \( d\frac{d}{d+1} \leq a_d^2 \leq d\) .
Proof
This is readily obtained by taking \( \varepsilon = \frac{\omega(S)+t}{a_d}\) , using (397) and (398).
Remark 32
Note that a simple use of a union bound shows that \( \omega(S)\lesssim \sqrt{2\log|S|}\) , which means that taking \( d\) to be of the order of \( \log|S|\) suffices to ensure that \( \frac1{a_d} G\) to have the Johnson Lindenstrauss property. This observation shows that Theorem 62 essentially directly implies Theorem 28 (although not exactly, since \( \frac1{a_d} G\) is not a projection).
Theorem 62 suggests that, if \( \omega(S)\leq a_d\) , a uniformly chosen random subspace of \( \mathbb{R}^n\) of dimension \( (n-d)\) (which can be seen as the nullspace of \( G\) ) avoids a set \( S\) with high probability. This is indeed the case and is known as Gordon’s Escape Through a Mesh Theorem (Corollary 3.4. in Gordon’s original paper [333]). See also [335] for a description of the proof. We include the Theorem below for the sake of completeness.
Theorem 63 (Corollary 3.4. in [333])
Let \( S\subset \mathbb{S}^{p-1}\) be a closed subset of the unit sphere in \( p\) dimensions. If \( \omega(S)<a_d\) , then for a \( (p-d)\) -dimensional subspace \( \Lambda\) drawn uniformly from the Grassmanian manifold we have
where \( \omega(S)\) is the Gaussian width of \( S\) and \( a_d = \mathbb{E}\|g_d\|\) where \( g_d\sim \mathcal{N}(0,I_{d\times d})\) .
We are now ready to prove Gordon’s Theorem.
Proof (of Theorem 61)
Let \( G\in\mathbb{R}^{d\times p}\) with i.i.d. \( \mathcal{N}(0,1)\) entries. We define two Gaussian processes: For \( v\in S\subset \mathbb{S}^{p-1}\) and \( u\in \mathbb{S}^{d-1}\) let \( g\sim\mathcal{N}\left(0,I_{d\times d}\right)\) and \( h\sim\mathcal{N}\left(0,I_{p\times p}\right)\) and define the following processes:
and
For all \( v,v'\in S \subset \mathbb{S}^{p-1}\) and \( u,u'\in \mathbb{S}^{d-1}\) ,
This means that \( \mathbb{E} \left| A_{v,u} - A_{v',u'} \right|^2 - \mathbb{E} \left| B_{v,u} - B_{v',u'} \right|^2\geq 0\) and \( \mathbb{E} \left| A_{v,u} - A_{v',u'} \right|^2 - \mathbb{E} \left| B_{v,u} - B_{v',u'} \right|^2 = 0\) if \( v=v'\) . This implies that we can use Theorem 60 with \( X=A\) and \( Y=B\) (these processes are well approximated by \( \varepsilon\) -nets and separable, see (390)), to get
Noting that
and
gives the second part of the theorem.
On the other hand, since \( \mathbb{E} \left| A_{v,u} - A_{v',u'} \right|^2 - \mathbb{E} \left| B_{v,u} - B_{v',u'} \right|^2\geq 0\) then we can similarly use Theorem 59 with \( X = B\) and \( Y = A\) , to get
Noting that
and
concludes the proof of the theorem.
A remarkable application of Gordon’s Theorem is that one can use it for abstract sets \( S\) such as the set of all natural images or the set of all plausible user-product ranking matrices. In these cases Gordon’s Theorem suggests that a measurements corresponding just to a random projection may be enough to keep geometric properties of the data set in question, in particular, it may allow for reconstruction of the data point from just the projection. These phenomenon and the sensing savings that arises from it is at the heart of compressive sensing and several recommendation system algorithms, among many other data processing techniques. Motivated by these two applications we will focus in this section on understanding which projections are expected to preserve the norm of sparse vectors and low-rank matrices. Both compressed sensing and low-rank matrix modeling will be discussed in length in Chapters 16 and 17, respectively.
Remark 33 (Ornstein-Uhlenbeck process)
There is an important side of Gaussian Analysis that we do not cover, related to the theory of Markov semigroups, and in particular, the Ornstein-Uhlenbeck process. In fact, this approach is arguably the most natural way of proving Poincaré’s inequality (this is intimately connected to the material in Section 7.7), and also yields Log-Sobolev and hypercontractivity inequalities. We point the reader to Chapter 2 of [14] for an excellent pedagogical introduction to these ideas.
Remark 34 (Hermite Polynomials)
Another central set of ideas in Gaussian analysis that we do not cover in this book is the theory of Hermite polynomials, which are a basis of orthogonal polynomials in the Gaussian measure, forming an analogue of Fourier analysis in the Gaussian setting. Writing a function \( f\in L^2(\mathcal{N}(0,1))\) , or in \( L^2(\mathcal{N}(0,I))\) , in its Hermite polynomial expansion is a classical idea, often known as a Wiener Chaos expansion. Due to Gaussian integration by parts (Lemma 15) taking the gradient of such a function yields simple transformations on the expansion coefficients. In fact, this yields a very simple proof of Poincaré’s inequality (try it!). The Hermite polynomials are the eigenfunctions of the Ornstein-Uhlenbeck Operator (mentioned in Remark 33). We point the reader to the classical reference [337] for more on Hermite polynomials and an introduction to the beautiful theory of orthogonal polynomials.
Exercise 161 (Moments of Gaussians)
Let \( Z\) be a standard gaussian random variable. Recall that Gaussian integration by parts states the following: given any differentiable function \( f \colon \mathbb{R} \to \mathbb{R}\) whose derivative is absolutely integrable with respect to the standard normal measure, we have
Let \( p \geq 1\) be an integer and \( Z\) be a standard gaussian random variable. Show that
Here, \( !!\) denotes the double factorial, defined as \( n!! = n \cdot (n-2) … 3 \cdot 1\) for an odd natural number \( n\) . (There are \( (p-1)!!\) possible pairings of \( p\) elements (when \( p\) even), and this is not a coincidence!)
Exercise 162 (Maximum of Gaussians)
Let \( g_1, …, g_d\) be a collection of (not necessarily independent) Gaussian random variables with zero mean and variance \( \sigma^2\) .
Prove that the following bound holds
(If you do not manage to prove the inequality with sharp constant 2 in the square root, you can replace it by an absolute constant \( C>0\) .)
Prove that the bound in the previous item is sharp up to an absolute constant if we assume that all the Gaussian random variables are independent, i.e. there exists a universal constant \( c > 0\) such that
Exercise 163 (Application of Slepian’s lemma)
Let \( W\) be a \( d \times d\) Gaussian Wigner matrix.
Prove that
where \( g \in \mathbb{R}^d\) is a standard Gaussian random vector.
Apply Slepian’s lemma to prove that
Hint For (b), consider the stochastic process \( Y_{v}:=2\langle g,v\rangle\) . For (c), first show \( \mathbb{E}{\left\lVert{g}\right\rVert}_2 \leq c\sqrt{d}\) by integration.
Lemma 20 (Gamma Function Bound)
Let \( x \geq \frac12\) , we have
Exercise 164 (Moments of Subgaussian Variables)
Let \( Y\) be a \( \sigma^2\) -subgaussian random variable, so for all \( t \geq 0\) it holds
Prove that for all \( p\geq 1\) we have
where \( C>0\) is a universal constant. Hint Use Problem 2(a) and bounds on the gamma function.
Theorem 64 (Gaussian Lipschitz concentration)
Let \( g_1, …, g_n\) be i.i.d standard Gaussian random variables. Let \( f:\mathbb{R}^n\rightarrow \mathbb{R}\) be a \( L\) -Lipschitz function with respect to the Euclidean norm. Then, for all \( t>0\) ,
(399)
Exercise 165 (Variance of a Gaussian Process)
Let \( g \in \mathbb{R}^d\) be a standard random gaussian vector and let \( v_1, …, v_n \in \mathbb{R}^d\) be fixed vectors. Define \( f(g) = \sup_{1 \leq i\leq n} \langle v_i,g \rangle\) . We aim to show that the variance of \( f\) is (up to a constant factor) at most the maximal variance of the variables we take the supremum over.
Exercise 166 (Sudakov’s Inequality)
Let \( g \in \mathbb{R}^d\) be a standard random gaussian vector and let \( I= \{v_1, …, v_n\} \subseteq \mathbb{R}^d\) be a finite set of fixed vectors. Define \( f(g) = \sup_{v \in I } \langle v,g \rangle\) . The goal of this problem is to show the link between packing numbers and gaussian processes. We say a set \( S\) is \( \varepsilon\) -separated, if for all \( v,w \in S\) with \( v \neq w\) we have \( {\left\lVert{v-w}\right\rVert}_2 > \varepsilon\) .
Let \( \varepsilon >0\) and suppose \( I\) has an \( \varepsilon\) -separated subset \( S\) . Combine part (b) of Problem 162 with Slepian’s Lemma to prove
for some universal constant \( c>0\) .
Let \( \mathcal{D}(\varepsilon)\) be the maximal cardinality of an \( \varepsilon\) -separated subset of \( I\) . Conclude
Exercise 167 (Absolute Values Only Make Small Differences)
Let \( X\) be a real scalar random variable. In many scenarios we would like to estimate its expected absolute value with an optimal leading constant. For technical reasons this is however less tractable than just estimating its expectation in many cases, but when the variance of \( X\) is small, the quantities bound each other reasonably well. This also turns out to be the case when we look at maxima of random variables under certain assumptions.
Let \( Y_1, …, Y_n\) be a collection of scalar random variables (not necessarily i.i.d.), such that for all \( i\) both \( Y_i\) and \( -Y_i\) are identically distributed and consider \( Z = \max_{1 \leq i \leq n} Y_i\) . Prove using a union bound and Chebyshev’s inequality that
Use tail integration to conclude
Theorem 65 (Lipschitz Concentration on the Sphere)
Assume that \( f:\sqrt{n}S^{n-1} \rightarrow \mathbb{R}\) is a \( L\) -Lipschitz function and let \( X\) be a random vector uniformly distributed on the sphere \( \sqrt{n}S^{n-1}\) . Then, for all \( t>0\) ,
(400)
Here \( c>0\) is an absolute constant.
Exercise 168 (Lipschitz Concentration around \( L_p\) norms)
In this problem we will extend the Lipschitz concentration on the sphere to concentration around \( L_p\) norms for \( p \ge 1\) , i.e., we will prove that under the same assumptions as in (400) and additionally assuming that \( f\) is non-negative,
(401)
where \( c_p>0\) is a constant only depending on \( p\) and \( \| Z \|_{L_p} := (\mathbb{E} |Z|^p)^{1/p}\) for a random variable \( Z\) such that its \( p\) -th absolute moment is well-defined.
We will split the proof into several steps.
Let \( Y\) be an \( L^2\) -subgaussian random variable in the sense of Problem 164. Prove that for any \( A \geq 0\) there exists a constant \( c_A\) only depending on \( A\) , such that
holds for some constant \( c_A >0\) only depending on \( A\) .
Show that for any non-negative random variable \( Z\) ,
You can assume that all the moments are well-defined. Use Problem 164 and (400) to conclude
for some universal constant \( C>0\) .
Exercise 169 (MGF bounds via the Poincaré inequality)
Suppose we have a random vector \( X \in \mathbb{R}^d\) satisfies the following Poincaré inequality: For any bounded differentiable function \( f\) on \( \mathbb{R}^d\) we have
The goal of this exercise is to show that the moment generating functions with small gradient can in this case be bounded well.
Prove for any differentiable bounded function \( g\) on \( \mathbb{R}^d\) that \( \nabla(e^{g(x)}) = e^{g(x)} \nabla g(x)\) and combine this with the Poincaré inequality to conclude that if \( {\left\lVert{\nabla g(X)}\right\rVert}_2^2 \leq 1\) holds almost surely, then
holds for all \( \lambda \geq 0 \)
Assume further that \( \frac{C_p\lambda^2}{4} <(1/2)\) and that \( \mathbb{E}[e^{\lambda g(x)/n}]^n\) converges to some number \( \alpha\) as \( n\) goes to infinity. Use (a) recursively to show
for some universal constant \( K>0\) . You can use without proof that \( \frac{1}{1-x}\leq e^{2x}\) holds for \( 0\leq x \leq 1/2\) .
Prove that for bounded functions \( g\) and any \( \lambda\) we have
Exercise 170 (Duality and Covering Numbers)
We will present the principle of duality in a completely different context. Suppose you have a set \( T \subseteq \mathbb{R}^n\) and some number \( \varepsilon>0\) . We call a subset \( S \subseteq T\) an \( \varepsilon\) -covering of \( T\) , if for every \( t \in T\) there exists an \( s \in S\) , such that \( {\left\lVert{s-t}\right\rVert}_2 \leq \varepsilon\) . We call a subset \( S \subseteq T\) an \( \varepsilon\) -separated set, if for every \( s \neq s' \in S\) we have \( {\left\lVert{s-t}\right\rVert}_2 > \varepsilon\) . We define the following optimal values:
Show that these two optimization problems are duals in the following sense:
Use part (a) to show that for the euclidean ball in \( d\) -dimensions one has the following covering number estimates for every \( 0< \varepsilon < 1\) :
Exercise 171 (Norm of a Gaussian Vector)
Given a standard Gaussian vector \( g \in \mathbb{R}^d\) , it is an easy consequence of Jensen’s inequality that \( \mathbb{E}\|g\|_2 \le \sqrt{d}\) . The goal of this exercise is to give a simple proof that this is sharp using the Gaussian Poincaré inequality.
Exercise 172 (Gaussian Width of the Simplex)
The gaussian width of a set \( S \subseteq \mathbb{R}^d\) is defined as
where \( g \in \mathbb{R}^d\) is a standard gaussian vector, so all coordinates of \( g\) are independent and \( \mathcal{N}(0,1)\) -distributed. Consider the \( d-1\) -dimensional simplex
Our goal is to show that there exist universal constants \( c,C >0\) , such that
For any subset \( T \subseteq \mathbb{R}^d\) we define its convex hull \( \operatorname{conv}(T)\) as follows:
Prove the equality
Exercise 173
Consider the following quantity:
Definition: (Gaussian Complexity) \em{ The Gaussian complexity of a subset \( T \in \mathbb{R}^n\) is defined as
where \( g \in {\mathcal N}(0, I_n)\) .}
What can you say about the relationship between Gaussian complexity and Gaussian width of a set \( T\) ? Under what circumstances on \( T\) does equality hold? Using this, what can you say about the set \( T-T\) ? Give an example where these quantities are certainly different.
There are many applications where one needs to control the spectrum of random matrices. Depending on the context, these matrices may represent the noise whose effect in a spectral algorithm is controlled by its spectral norm, or the size of a dual variable that needs to be controlled to show the exactness of a convex relaxation (such as in Chapter 13). While some of the tools we developed in Chapter 3 could be used to control the size of the entries of random matrices, which could translate to spectral bounds, this would likely introduce many suboptimal dimensional factors.
In what follows we will state and prove various matrix concentration results, somewhat similar to Theorem 54 (in Section 13.2.7). We will focus on understanding, and bounding, the typical value of the spectral norm of random matrices by upper bounding \( \mathbb{E}\|X\|\) , as these tend to be high dimensional objects themselves they often have enough concentration that tail bounds are then easy to obtain (as it was illustrated in Chapter 14 with Proposition 20). Our presentation will rely on Gaussian analysis (developed in Chapter 14). Our treatment of the Non-commutative Khintchine inequality, and the Matrix Concentration inequality we will prove follows parts of [327] and [338].
We start with a particularly important inequality involving the expected value of a random matrix. It is intimately related to the non-commutative Khintchine inequality [340], and for that reason we will often refer to it as Non-commutative Khintchine (see, for example, (4.9) in [318]). We will prove this inequality in Section 15.1.2.
Theorem 66 (Non-commutative Khintchine (NCK))
Let \( A_1,\dots,A_n\in \mathbb{R}^{d\times d}\) be symmetric matrices and \( g_1,\dots,g_n\sim\mathcal{N}(0,1)\) i.i.d., then:
(402)
where
(403)
Note that, akin to Proposition 20, we can also use Gaussian Concentration to get a tail bound on \( \left\| \sum_{k=1}^{n} g_k A_k \right\|\) . We consider the function
We now estimate its Lipschitz constant; let \( g,h\in\mathbb{R}^n\) then
where in the first inequality we made use of the triangular inequality and in the last one we used Cauchy-Schwarz.
This motivates us to define a new parameter, the weak variance \( \sigma_\ast\) .
Definition 37 (Weak Variance (see, for example, [339]))
Given symmetric matrices \( A_1,\dots,A_n\in\mathbb{R}^{d\times d}\) . We define the weak variance parameter as
This means that, using Gaussian concentration (Theorem 57), and setting \( t = u\sigma_\ast\) , we have
(404)
Thus, although the expected value of \( \left\| \sum_{k=1}^{n} g_k A_k \right\|\) is controlled by the parameter \( \sigma\) , its fluctuations seem to be controlled by \( \sigma_\ast\) . We compare the two quantities in the following proposition.
Proposition 22
Given \( A_1,\dots,A_n\in\mathbb{R}^{d\times d}\) symmetric matrices, recall that
We have
Proof
Using the Cauchy-Schwarz inequality,
The following simple calculation is suggestive that the parameter \( \sigma\) in Theorem 66 is indeed the correct parameter to understand \( \mathbb{E} \left\| \sum_{k=1}^{n} g_k A_k \right\|\) .
But a natural question is whether the logarithmic term in (402) is needed. Motivated by this question we will explore a couple of examples.
Example 1
We can write a \( d\times d\) Wigner matrix \( W\) (recall Section 4.3.2) as a Gaussian series, by taking \( A_{ij}\) for \( i\leq j\) defined as
if \( i\neq j\) , and
It is not difficult to see that, in this case, \( \sum_{i\leq j}A_{ij}^2 = (d+1)I_{d\times d}\) , meaning that \( \sigma = \sqrt{d+1}\) . This implies that Theorem 66 gives us
however, we know that \( \mathbb{E}\|W\| \asymp \sqrt{d}\) , meaning that the bound given by NCK (Theorem 66) is, in this case, suboptimal by a logarithmic factor.
The next example will show that the logarithmic factor is in fact needed in some examples
Example 2
Consider \( A_k = e_ke_k^T\in\mathbb{R}^{d\times d}\) for \( k=1,\dots,d\) . The matrix \( \sum_{k=1}^{n} g_k A_k\) corresponds to a diagonal matrix with independent standard Gaussian random variables as diagonal entries, and so its spectral norm is given by \( \max_k |g_k|\) . It is known that \( \max_{1\leq k \leq d} |g_k| \asymp \sqrt{\log d}\) . On the other hand, a direct calculation shows that \( \sigma = 1\) . This shows that the logarithmic factor cannot, in general, be removed.
This motivates the question of trying to understand when is it that the extra dimensional factor is needed. For both these examples, the resulting matrix \( X = \sum_{k=1}^{n} g_k A_k\) has independent entries (except for the fact that it is symmetric). In the case of independent entries it is possible to write a stronger inequality using \( \sigma_\ast\) [321]:
Theorem 67 ([321])
If \( X\) is a \( d\times d\) random symmetric matrix with Gaussian independent entries (except for the symmetry constraint) whose entry \( i,j\) has variance \( b_{ij}^2\) then
Remark 35
\( X\) in the theorem above can be written in terms of a Gaussian series by taking
for \( i< j\) and \( A_{ii} = b_{ii}e_ie_i^T\) . One can then compute \( \sigma\) and \( \sigma_\ast\) :
This means that, when the random matrix in NCK (Theorem 66) has independent entries (modulo symmetry) then
(405)
Recently an improvement, using ideas from Free Probability to remove the dimensional factor in some situations, was obtained in [342] (see [344] for non-Gaussian extensions). Interestingly, the same work shows that (405) does not hold in general, disproving a conjecture that was included in an earlier version of this manuscript. See Section 15.3 for a more thorough discussion on these improvements.
We are now ready to prove Theorem 66, the Non-commutative Khintchine inquality (NCK). See Section 7.2. in [345, Section 7.2] and [327] for presentations of the same argument.
Proof (of Theorem 66)
Let \( p\) be a positive integer. Let \( X = \sum_{k=1}^{n} g_k A_k\) , we have
where the first inequality follows from Jensen and the second from the fact that the trace of a positive semidefinite matrix dominates its spectral norm.
Using Gaussian integration by parts (Lemma 15) we get
If the matrices \( A_1,\dots,A_n\) were commutative, then we would have that \( \operatorname{Tr}\left(A_kX^qA_kX^{2p-2}\right) = \operatorname{Tr}\left(A_k^2X^{2p-2}\right)\) for all \( q\) . It turns out that this is the worst possible situation and the commutative upper bound always dominates. We state and prove in Lemma 21 below that, for all \( 0\leq q\leq 2p-2\) , \( \operatorname{Tr}\left(A_kX^qA_kX^{2p-2}\right) \leq \operatorname{Tr}\left(A_k^2X^{2p-2}\right)\) . This implies that
Hölder’s inequality on Schatten norms then gives
Iterating this procedure gives
which implies
(406)
Taking \( p = \lceil \log d \rceil\) and using the fact that \( (2p-1)!! \leq \left( \frac{2p+1}{e} \right)^p\) (see [338] for an elementary proof consisting essentially of taking logarithms and comparing the sum with an integral, note also that Lemma 16 would yield the same bound up to a constant of \( e\) ) we get
Lemma 21 (Commutative is the worst-case I)
Let \( A\) and \( X\) be symmetric matrices. For any \( p,q\) non-negative integers satisfying \( 0\leq q \leq 2p-2\) we have
Proof
Consider the spectral decomposition \( X = \sum_{i=1}^d \lambda_i v_iv_i^T\) , then
where the inequality follows from Hölder’s inequality (Proposition 8, in particular (41)).
Remark 36
Theorem 66 is an upper bound on a Gaussian process, and thus an orderwise optimal bound can (in theory) be obtained by Talagrand’s generic chaining, and up to a logarithmic factor by covering number arguments via a Dudley’s (see [346]). Interestingly, there is no known proof of a bound that is optimal up to logarithmic factors based on these techniques (in other words, without using operator theoretical arguments). Such an argument would likely extend well beyond the setting of spectral norm in matrices, see [347] for a discussion on this and related problems.
In what follows, we closely follow [338] and present an elementary proof of a few useful matrix concentration inequalities using Theorem 66. We start with a Rademacher version of Theorem 66.
Theorem 68
Let \( H_1,\dots,H_n\in \mathbb{R}^{d\times d}\) be symmetric matrices and \( \varepsilon_1,\dots,\varepsilon_n\) i.i.d. Rademacher random variables (meaning \( =+1\) with probability \( 1/2\) and \( =-1\) with probability \( 1/2\) ), then:
where
(407)
Proof
Let \( g_1,\dots,g_n\) by iid standard Gaussians independent from the Rademacher random variables, since the sign and absolute value of \( g_k\) are independent and \( \mathbb{E}|g_k| = \sqrt{\frac2\pi}\) , Jensen implies
The conclusion then follows by applying Theorem 66.
We note that Theorem 68 holds without the extra \( \frac{\pi}{2}\) factor (see [338] for a proof that boils down to the same as argument as the one above to prove its Gaussian counterpart, Theorem 66).
Using Theorem 68, we will prove the following theorem.
Theorem 69
Let \( T_1,\dots,T_n\in\mathbb{R}^{d\times d}\) be random independent symmetric positive semidefinite matrices, then
where
(408)
A key step in the proof of Theorem 69 is an idea that is extremely useful in Probability, the trick of symmetrization. For this reason we isolate it in a lemma.
Lemma 22 (Symmetrization)
Let \( T_1,\dots,T_n\) be independent random matrices (note that they do not necessarily need to be positive semidefinite, for the sake of this lemma) and \( \varepsilon_1,\dots,\varepsilon_n\) random i.i.d. Rademacher random variables (independent also from the matrices). Then
Proof
The triangular inequality gives
Let us now introduce, for each \( i\) , a random matrix \( T_i'\) identically distributed to \( T_i\) and independent (all \( 2n\) matrices are independent). Then
where we use the notation \( \mathbb{E}_a\) to mean that the expectation is taken with respect to the variable \( a\) and the last step follows from Jensen’s inequality with respect to \( \mathbb{E}_{T'}\) .
Since \( T_i-T_i'\) is a symmetric random variable, it is identically distributed to \( \varepsilon_i \left( T_i - T_i' \right)\) , which gives
concluding the proof.
Proof (Proof of Theorem 69)
Using Lemma 22 and Theorem 68 we get
The trick now is to make a term like the one in the LHS appear in the RHS. For that we start by noting (you can see Fact 2.3 in [338] for an elementary proof) that, since \( T_i\succeq 0\) ,
This means that
Furthermore, applying the Cauchy-Schwarz inequality for \( \mathbb{E}\) gives,
Now that the term \( \mathbb{E} \left\| \sum_{i=1}^n T_i \right\|\) appears in the RHS, the proof can be finished with a simple application of the quadratic formula (see Section 6.1. in [338] for details).
We now show an inequality for general symmetric matrices
Theorem 70
Let \( Y_1,\dots,Y_n\in\mathbb{R}^{d\times d}\) be random independent symmetric matrices satisfying \( \mathbb{E} Y_i=0\) , then
where,
(409)
and, as in (408),
Proof
Using Symmetrization (Lemma 22) and Theorem 68, we get
Jensen’s inequality gives
and the proof can be concluded by noting that \( Y_i^2\succeq 0\) and using Theorem 69.
Remark 37 (The rectangular case)
One can extend Theorem 70 to general rectangular matrices \( S_1,\dots,S_n\in\mathbb{R}^{d_1\times d_2}\) by setting
the so-called Hermitian dilation, and noting that
For details we refer to [338].
In Section 15.1.1 we saw that the logarithmic factor in the Non-commutative Khintchine (Theorem 66) inequality is required in the worst-case but superfluous in some instances. If we pay close attention to the proof of Theorem 66, we notice that there is a potential loss in using Lemma 21 when \( A_1,\dots,A_n\) are non-commutative, and that perhaps the \( (2p-1)\) factor coming from bounding every summand with the \( q=0\) one, could be (in some cases) replaced by a constant, which would remove the logarithmic factor in the final bound. Tropp [345] made an important early connection between improvements in the Non-commutative Khintchine inequality and ideas in Free Probability [348] showing an improvement of Theorem 66 in [345]. This is done by using Gaussian Integration by parts twice and controlling, with a (sometimes) smaller parameter \( \omega\) – called the matrix alignment parameter – the summands where the factors from different applications of Gaussian Integration by parts “cross”. This allows for a more efficient iteration argument and replaces the \( \theta\big((\log n)^{\frac12}\big)\) factor multiplying \( \sigma\) by a \( \theta\big((\log n)^{\frac14}\big)\) factor.
We briefly describe below an improvement to Theorem 66 in [342] that often yields sharp bounds. To describe it, it is worth showing a slightly different proof of Theorem 66. Let \( X=\sum_{k=1}^ng_kA_k\) and \( p\geq 1\) as in Theorem 66. Wick’s formula (Lemma 17) gives
If the matrices \( A_k\) were commutative then the summands
would coincide for all pair partitions, and in particular with the pair partition \( \nu_0 \mathrel{ :}= \{(1,2),(3,4),\dots,(2p-1,2p)\}\) on which the summand is given by
The following Lemma is analogous to Lemma 21 and due to Buchholz [349].
Lemma 23 (Commutative is the worst-case II [349])
For any \( \nu\in\mathbb{P}[2p]\) and \( A_1\dots,A_{n}\) symmetric matrices
If \( \sum_{k=1}^n A_k^2\) is a multiple of the identity matrix, there are many pair partitions that match the upper bound above: whenever there is an adjacent pair, it can be “peeled-off” in the sum and potentially make adjacent pairs that were not adjacent before; the partitions that can be fully “peeled-off” this way are precisely the so-called non-crossing partitions and they indeed match the upper bound above (see Lemma 23).
Definition 38 (Crossing and Non-crossing Partitions)
We say \( \nu\in\mathbb{P}[2p]\) is a crossing partition when it has pairs \( (i_1,i_2)\in\nu\) and \( (j_1,j_2)\in\nu\) such that \( i_1< j_1 < i_2 < j_2\) . Otherwise we say \( \nu\) is non-crossing. The set of non-crossing partition is denoted by \( \mathrm{NC}[2p]\subset \nu\in\mathbb{P}[2p]\) .
Bandeira, Boedihardjo, and van Handel [342] showed that, in many settings, the random matrix \( X\) exhibits intrinsic freeness in the sense that only the summand corresponding to non-crossing partitions are non-negligible.
This is done by interpolating (using Gaussian Interpolation, Lemma 18) the Gaussian model \( X\) with a Free Probability model \( X_{\mathrm{free}}\) where the Gaussians are replaced by a semi-circular family – these can be viewed, in a sense, as “non-commutative random variables” for which Wick’s formula (Lemma 17) holds when summing only over \( \mathrm{NC}[2p]\) (this can be viewed as the limiting behavior of Lemma 24 below, and indeed the argument can be viewed as replacing Gaussians by ever larger Wigner matrices). While the matrix alignment parameter of Tropp is a key component in the argument, intrinsic freeness is controlled by \( v^2=\left\| \mathrm{Cov} X \right\|\) , the spectral norm of the covariance matrix of the entries of \( X\) (this covariance matrix is a \( d^2\times d^2\) matrix). When \( \frac{\sigma}{v} \gg\mathrm{polylog}(d) \) the improvement yields \( \mathbb{E}\|X\| \leq (2+o(1))\sigma\) .
Furthermore, Brailovskaya and van Handel [344] developed a universality principle that roughly states that for any sum of independent random matrices \( Y = \sum_{i=1}^n Y_i\) (such as in Theorem 70), as long as the summands are sufficiently small, the matrix \( Y\) behaves like a Gaussian analogue \( Y_G\) where the entries of \( Y\) are replaced by Gaussian random variables with the same mean and covariance, and for which the results in [342] can be used (notice that this is different than the argument, based on symmetrization, done to prove Theorem 70 from Theorem 66). Combining these two tools, one obtains an improvement over the matrix Bernstein inequality.
Theorem 71 ([342, 344])
Let \( Y_1,\dots,Y_n\in\mathbb{R}^{d\times d}\) be random independent symmetric matrices satisfying \( \mathbb{E} Y_i=0\) , and such that \( \|Y_i\|\leq R\) , for all \( i\in[n]\) , almost surely. Then
and
where, \( C\) is a universal constant,
(410)
Note that if \( v,\sigma_\ast,R\ll \frac{1}{\mathrm{polylog}(d)}\sigma\) , which happens often in applications (see [342, 344]), then all terms multiplying the universal constant \( C\) are negligible and, in the tail bound, the tail parameter \( t\) only appears in low-order terms.
An instructive pursuit is to compute an analogue of Wick’s formula for a complex valued analogue of the Wigner matrix that has appeared in Section 4.3.2 and Example 4.3.2). This is an instance in which the phenomenon of cancellations arising from crossing partitions is particularly transparent (and it is tightly connected to the seminal work of Voiculescu [350] and Haagerup-Thorbj{ø}rnsen [351], and to the methods in [342] that give rise to the inequalities in Theorem 71).
Definition 39 (Gaussian Unitary Ensemble (GUE))
A random \( D \times D\) GUE matrix \( W\) is a random Hermitian (self-adjoint) matrix whose upper off-diagonal entries are iid \( \mathbb{C}\mathcal{N}(0,\frac1D)\) and whose diagonal entries are iid \( \mathcal{N}(0,\frac1D)\) (also independent from the off-diagonal entries). \( W_{ij}\sim \mathbb{C}\mathcal{N}(0,\frac1D)\) means that \( \operatorname{Re}\left(W_{ij}\right) \sim \mathcal{N}(0,\frac1D)\) , \( \operatorname{Im}\left(W_{ij}\right) \sim \mathcal{N}(0,\frac1D)\) , and that both are independent.
The goal of this subsection is to show that, for large-dimensional GUEs, there is Wick’s formula whose non-negligible terms only involve non-crossing partitions.
Lemma 24 (Wick’s formula for GUEs (cf. Lemma 17))
Let \( W_1,\dots,W_n\) be iid \( D\times D\) GUE matrices and let \( u:[2p]\to[n]\) then
where \( \mathrm{NC}_2[2p]\) denotes de set of non-crossing pair partitions, \( u \sim \nu\) means the function \( u\) is compatible with \( \nu\) , and the constant in \( \mathcal{O}\) may depend on \( n,p,\) and \( u\) (see Definitions 35 and 38).
We start by showing that non-crossing terms do not have cancellations.
Definition 40
Let \( \nu\in\mathbb{P}[2p]\) (see Definition 35). We define \( u_{\nu}:[2p]\to[p]\) as first surjective assignment \( u:[2p]\to[p]\) , in the lexicographic order, that satisfies \( u\sim \nu\) .
Proposition 23
Let \( \nu\in\mathrm{NC}[2p]\) , and let \( W_1,\dots,W_{p}\) be iid \( D\times D\) GUE matrices, then
(411)
Proof
Since \( \nu\) is non-crossing there must exist \( i\in[2p-1]\) such that \( u_\nu(i)=u_\nu(i+1)\) . For such as \( i\) we have that the LHS of (411) is equal to
where the outside expectation is over the other random matrices. Furthermore, since \( \left(\mathbb{E}_{W_{u_\nu(i)}} W_{u_\nu(i)}^2 \right)=I\) , such pairs can be “peeled-off” one by one to finish the proof (formally, one can do induction by noting that \( \nu\setminus\{i,i+1\}\) is also non-crossing).
We are now ready to examine crossing partitions.
Proposition 24
Let \( B_1,B_2,B_3,B_4\) be \( D\times D\) (complex) matrices and let \( W,V\) be two independent \( D\times D\) GUE matrices. We have
(412)
Proof
This follows from a computation, and noting that for \( W\sim\mathrm{GUE}\) we have \( \mathbb{E} W_{i_1j_1}W_{i_2j_2} = \frac1{D}\delta_{i_1j_2}\delta_{i_2j_1}\) (where \( \delta_{ij}\) is the indicator of \( i=j\) ). Indeed, expanding the LHS of (412) we see it is equal to
Proposition 25
Let \( \nu\in\mathbb{P}[2p]\setminus\mathrm{NC}[2p]\) be a crossing partition, and let \( W_1,\dots,W_{p}\) be iid \( D\times D\) GUE matrices, then
(413)
Proof
This follows by taking a crossing \( \{i,j,i',j'\}\) such that \( i<j<i'<j'\) , \( u_\nu(i)=u_\nu(i')\) , and \( u_\nu(j)=u_\nu(j')\) , applying Proposition 24 on \( W_{u_\nu(i)}\) and \( W_{u_\nu(j)}\) and using induction on \( p\) .
Proof (of Lemma 24)
With all the ingredients collected, this follows directly from the useful equality
(414)
and Propositions 25 and 23.
The equality (414) is a consequence of Lemma 17, a formal proof follows by noting that \( W_{\ell}\) are Gaussian matrices and thus we can write \( W_{\ell} = \sum_{j=1}^m g_{\ell;j} A_j\) for some \( A_j\) (complex valued). This means we have
and on the other hand,
where the second equality uses the fact that \( \nu\) is the only pairing compatible with \( u_\nu\) .
Definition 41 (Gaussian Wigner matrix)
Let \( W\) be a \( d \times d\) matrix, which is a gaussian series by taking \( W = \sum_{1 \leq k \leq l \leq d}g_{kl}A_{kl}\) , where
Exercise 174 (Constructing Wigner)
Let \( Z\) be a \( d \times d\) random matrix whose entries are all independent standard gaussians (in total \( d^2\) of them). Show that \( \frac{1}{\sqrt{2}}\left( Z + Z^\top \right)\) is a Gaussian Wigner matrix.
Definition 42 (Diagonal matrix with Gaussian entries)
Let \( D\) be a \( d \times d\) diagonal matrix, which is a gaussian series by taking \( D = \sum_{1 \leq k \leq d}g_{k}A_{k}\) , where
Exercise 175 (Computing the \( \sigma\) parameter)
Let \( W\) be a \( d \times d\) Gaussian Wigner matrix and let \( D\) be a \( d \times d\) diagonal matrix with independent standard gaussians on the diagonal. Show that \( {\left\lVert{\mathbb{E}W^2}\right\rVert}^{\frac12} = \sigma(W) = \sqrt{d+1}\) and \( {\left\lVert{\mathbb{E}D^2}\right\rVert}^{\frac12} = \sigma(D) = 1\) , and upper bound \( \mathbb{E}{\left\lVert{W}\right\rVert}\) and \( \mathbb{E}{\left\lVert{D}\right\rVert}\) using the Non-commutative Khintchine inequality.
Exercise 176 (Intrinsically free Non-commutative Khintchine Inequality)
In fact, a stronger version of the Non-commutative Khintchine inequality is known. Let \( A_1, …, A_n \in \mathbb{R}^{d \times d}\) by symmetric matrices and \( g_1, …, g_n \in \mathbb{N}(0,1)\) i.i.d. The gaussian series \( X = \sum_{t=1}^n g_t A_t\) satisfies
where \( C > 0\) is an absolute constant, \( \sigma^2 = {\left\lVert{ \sum_{i=1}^n A_i^2}\right\rVert}\) , and \( v\) is given by
Here, matrix covariance \( \operatorname{Cov}(X)\) is a \( d^2 \times d^2\) matrix, whose row and column coordinates are indexed by pairs of indices, and entries are given by
Compute \( \operatorname{Cov}(W)\) and \( \operatorname{Cov}(D)\) , where \( W\) and \( D\) are as in Problem 175, and deduce using the intrinsically free Non-commutative Khintchine Inequality that there is an absolute constant \( C' > 0\) , such that
Hint As a start, show that \( \operatorname{Cov}(X)_{ij,kl} = \sum_{t=1}^n \left[ A_t \right]_{ij} \left[ A_t \right]_{kl}\) .
Exercise 177 (Hermitian dilation)
In order to extend the matrix Bernstein inequality from symmetric to general rectangular matrices, we will use Hermitian dilation. For a matrix \( S \in \mathbb{R}^{d_1 \times d_2}\) , the Hermitian dilation \( \mathcal{H}(S)\) is defined as
In Problem 25(c) we showed that \( \mathcal{H}(S)\) is symmetric and that \( {\left\lVert{\mathcal{H}(S)}\right\rVert} = {\left\lVert{S}\right\rVert}\) .
Let \( S_1, \dots, S_n \in \mathbb{R}^{d_1 \times d_2}\) be random rectangular matrices satisfying \( \mathbb{E}\left[ S_i \right] = 0\) for every \( i \in [n]\) . Show that
where \( d = d_1 + d_2\) , \( C(d) = 4 + 8 \lceil \log d \rceil\) and
Exercise 178 (Bernstein’s inequality - expectation bound)
Let \( \left\{ X_k \right\}_{k=1}^n\) be a sequence of independent random symmetric \( d \times d\) matrices. Assume that each \( X_k\) satisfies:
In this exercise, the goal is to show that
(415)
To get a bound on expectation from the tail bound in Theorem 54, we will use an integral identity for the expectation (see Problem 2(a)).
Show that for any \( a, b > 0\)
Apply it to the exponent in the right-hand side of matrix Bernstein’s inequality so that you get integrals that are easier to compute.
Exercise 179 (Randomized matrix multiplication)
Let \( A \in \mathbb{R}^{n\times m}\) be a real-valued matrix with unit spectral norm \( {\left\lVert{A}\right\rVert} = 1\) . The cost of computing \( AA^\top\) , using the standard matrix multiplication method, is of the order of \( n^2 m\) , which can be prohibitive when \( n\) and \( m\) are very large. In some cases, it is sufficient to obtain only an approximate solution which allows us to reduce the costs significantly. In this problem you will show that by using randomness we can get an approximation of the product more efficiently.
Denote \( a_1, \dots, a_m \in \mathbb{R}^n\) columns of matrix \( A\) . Define a random matrix \( X\) such that \( \mathbb{P}\left( X = m \cdot a_k a_k^\top \right) = \frac{1}{m}\) .
Define the coherence statistic as \( \mu(A) = m \cdot \displaystyle{\max_{k = 1, \dots, m} \|a_k\|^2} \) . Show that:
and
Use Problem 178 (proof not needed) to show that, for an absolute constant \( C\) , if the number of samples \( s\) satisfies
then the procedure achieves \( \varepsilon\) -accuracy, i.e., \( \mathbb{E}{\left\lVert{\hat{X}_s - AA^\top}\right\rVert} \le \varepsilon\) .
Exercise 180 (Commuting vs. simultaneously diagonalizable)
Let \( A, B \in \mathbb{R}^{d\times d}\) be two symmetric matrices.
Hint For (b) show that if \( B v = \lambda v\) for some \( v \in \mathbb{R}^n\) and \( \lambda \in \mathbb{R}\) then \( B (A v) = \lambda (A v)\) .
Exercise 181 (NCK for commuting matrices)
In the book we discussed the role of commutativity of the matrices for the upper bound of the expected value of the spectral norm of a random matrix. Recall that for \( X \mathrm{:=} \sum_{i=1}^n g_i A_i\) , where \( A_1, \dots, A_n \in \mathbb{R}^{d\times d}\) are symmetric matrices and \( g_1, \dots, g_n \overset{\text{iid}}{\sim} \mathbb{N}(0,1)\) , it holds
where \( \sigma^2 \mathrm{:=} {\left\lVert{ \sum_{i=1}^n A_i^2}\right\rVert}\) .
Suppose that \( A_1, \dots, A_n \in \mathbb{R}^{d\times d}\) are symmetric commuting matrices. This means that they are simultaneously diagonalizable (well known fact, no proof needed), so there is an orthogonal matrix \( Q \in \mathbb{R}^{d \times d}\) so that \( D_i \mathrm{:=} Q A_i Q^{-1}\) is a diagonal matrix for any \( i \in [n]\) . Let \( \lambda^{(i)}_{1}, \dots, \lambda^{(i)}_{d}\) be the entries that appear, in that order, on the diagonal of \( D_i\) . Show that
Deduce using Problem 162(a) that
Find an example of commuting matrices \( A_1, \dots, A_n\) such that Problem 162(b) implies
Exercise 182 (Trace Commutativity Inequality)
The goal of this exercise is to show the following key inequality that proves why commuting matrices perform worse than non-commuting matrices in trace moment estimations. One can actually follow a slightly different approach than the one shown in the book if one follows the hint in (b).
Let \( X,A \in \mathbb{R}^{d \times d}\) be symmetric matrices and let \( k,l\) be nonnegative integers with \( k+l\) being even, then
Let \( X = \sum_{i=1}^d \lambda_i u_i u_i^\top\) be the the eigenvalue decomposition of \( X\) , prove
Finish the proof by showing
Hint Use Young’s Inequality on the product of eigenvalues.
Most of us have noticed how saving an image in JPEG dramatically reduces the space it occupies on our hard drives (as opposed to file types that save the value of each pixel in the image). The idea behind these compression methods is to exploit known structure in the images; although our cameras will record the value (even three values in RGB) for each pixel, it is clear that most collections of pixel values will not correspond to pictures that we would expect to see. Natural images do not correspond to arbitrary arrays of pixel values, but have some specific structure to them. It is this special structure one aims to exploit by choosing a proper representation of the image. Indeed, natural images are known to be approximately sparse in certain bases (such as the wavelet bases) and this is the core idea behind JPEG (actually, JPEG2000; JPEG uses a different basis).
Let us think of \( x\in \mathbb{C}^p\) as the signal corresponding to the image already represented in the basis in which it is sparse. The modeling assumption is that \( x\) is \( s\) -sparse, or \( \|x\|_0\leq s\) , meaning that \( x\) has at most \( s\) non-zero components and, usually, \( s\ll p\) . The \( \ell_0\) -norm \( \|x\|_0\) of a vector \( x\) is the number of non-zero entries of \( x\) . This means that when we take a picture, our camera makes \( p\) measurements (each corresponding to a pixel) but then, after an appropriate change of basis, it keeps only \( s\ll p\) non-zero coefficients and drops the others. This seems a rather wasteful procedure and thus motivates the question: “If only a few degrees of freedom are kept after compression, why not in the first place measure in a more efficient way and take considerably less than \( p\) measurements?”.
The question whether we can carry out data acquisition and compression simultaneously is at the heart of Compressive Sensing [352, 353, 354, 355, 356, 357]. It is particularly important in MRI imaging [358, 359], as fewer measurements potentially means shorter data acquisition time. Indeed, current MRI technology based on concepts from compressive sensing can, in certain cases, reduce the time needed to collect the data by a factor of six or more [358], which has been reported to have significant benefits especially in pediatric MR imaging [360]. We recommend the book [357] as a great in-depth reference about compressive sensing.
In mathematical terms, the acquired measurements \( y \in \mathbb{C}^m\) are connected to the signal of interest \( x \in \mathbb{C}^p\) , with \( m \ll p\) , via
(416)
The matrix \( A \in\mathbb{C}^{m \times p}\) models the linear measurement (information) process. Classical linear algebra tells us that if \( m < p\) , then the linear system (416) is underdetermined and that there are infinitely many solutions (assuming that there exists at least one solution). In other words, without additional information, it is impossible to recover \( x\) from \( y\) in the case \( m < p\) .
In this chapter, we assume that \( x\) is \( s\) -sparse with \( s<m\ll p\) . The goal is to recover \( x\) from this underdetermined system and do this in a computationally efficient manner. We emphasize that we do not know the location of the non-zero coefficients of \( x\) a priori , otherwise the task would be trivial.
Before discussing algorithms, let us discuss well-posedness of the problem at hand: In order to be able to reconstruct \( x\) from \( y\) we need at the very least that \( A\) is injective on sparse vectors. Furthermore, in order for reconstruction to be stable, one should ask not only that \( A\) is injective with respect to \( s\) -sparse vectors, but actually that it is almost an isometry, meaning that the \( \ell_2\) distance between \( Ax_1\) and \( Ax_2\) should be comparable to the distances between \( x_1\) and \( x_2\) , if they are \( s\) -sparse. Since the difference between two \( s\) -sparse vectors is in general a \( 2s\) -sparse vector, we can alternatively ask for \( A\) to approximately preserve the norm of \( 2s\) -sparse vectors. Gordon’s Theorem (Theorem 61) suggests that we can take \( A\in\mathbb{R}^{m\times p}\) to have i.i.d. Gaussian entries and to take \( m\approx \omega^2\left(\mathcal{S}_{2s}\right)\) , where \( \mathcal{S}_{2s} = \left\{x:\,x\in\mathbb{S}^{p-1},\,\|x\|_0\leq 2s\right\}\) is the set of \( 2s\) -sparse vectors, and \( \omega\left(\mathcal{S}_{2s}\right)\) denotes the Gaussian width of \( \mathcal{S}_{2s}\) (see Definition 36).
Proposition 26
If \( s\leq p\) , the Gaussian width \( \omega\left(\mathcal{S}_{s}\right)\) of \( \mathcal{S}_s\) , the set of unit-norm vectors that are at most \( s\) -sparse, satisfies
{Proof.}
where \( g\sim \mathcal{N}(0,I_{p\times p})\) . We have
where \( g_{\Gamma}\) is the restriction of \( g\) to the set of indices \( \Gamma\) .
Given a set \( \Gamma\) , Theorem 6 yields
Union bounding over all \( \Gamma\subset [p],\, |\Gamma|=s\) gives
Taking \( u\) such that \( t=su\) , gives
(417)
Taking \( u> \log\left(e\frac{p}s\right)\) reveals that the typical size of \( \max_{\Gamma\subset [p],\, |\Gamma|=s} \|g_{\Gamma}\|^2\) is \( \lesssim s\log\left(\frac{p}s\right)\) . The proof can be completed by integrating (417) in order to get a bound of the expectation of \( \sqrt{\max_{\Gamma\subset [p],\, |\Gamma|=s} \|g_{\Gamma}\|^2}\) .
\( \Box\)
This suggests that \( \approx 2s\log\left(\frac{p}{2s}\right)\) measurements suffice to stably identify a \( 2s\) -sparse vector. Indeed, we will see below that at this order of number of measurements it will actually be possible to efficiently recover an \( s\) -sparse vector.
Since the system (416) is underdetermined and we know that \( x\) is sparse, the natural approach to try to recover \( x\) is to solve
(418)
and hope that the optimal solution \( z\) corresponds to the signal in question \( x\) . However the optimization problem (418) is NP-hard in general [361, 357]. Instead, the approach usually taken in sparse recovery is to consider a convex surrogate of the \( \ell_0\) norm, namely the \( \ell_1\) norm: \( \|z\|_1 = \sum_{i=1}^p |z_i|\) . Figure 125 depicts the \( \ell_p\) balls and illustrates how the \( \ell_1\) norm can be seen as a convex surrogate of the \( \ell_0\) norm due to the pointiness of the \( \ell_1\) ball in the direction of the basis vectors, i.e. in “sparse” directions.
The process of \( \ell_p\) minimization can be understood as inflating (or deflating) the \( \ell_p\) ball until one hits the affine subspace of interest. Figure 131 illustrates how \( \ell_1\) norm minimization promotes sparsity, while \( \ell_2\) norm minimization does not favor sparse solutions. We have seen in Chapter 3.2.2.1 that the \( \ell_1\) ball becomes “increasingly pointy” with increasing dimension. This behavior works in our favor in compressive sensing—another manifestation of the blessings of dimensionality.
This motivates us to consider the following optimization problem (surrogate to (418)):
(419)
In order for (419) to be a good procedure for sparse recovery we need two things: for the solution of it to be meaningful (hopefully to coincide with \( x\) ); and for (419) to be efficiently solvable.
Remark 38
We will consider for the moment the real-valued case \( x\in\mathbb{R}^p, A\in\mathbb{R}^{m\times p}\) and formulate (419) as a linear program (and thus show that it is efficiently solvable). Let us think of \( \omega^{+}\) as the positive part of \( z\) and \( \omega^{-}\) as the symmetric of the negative part of it, meaning that \( z = \omega^{+} - \omega^{-}\) and, for each \( i\) , either \( \omega^{-}_i\) or \( \omega^{+}_i\) is zero. Note that, in that case,
Motivated by this, we consider:
(420)
which is a linear program. It is not difficult to see that the optimal solution of (420) will indeed satisfy that, for each \( i\) , either \( \omega^{-}_i\) or \( \omega^{+}_i\) is zero and it is indeed equivalent to (419); if both \( \omega^{-}_i\) and \( \omega^{+}_i\) are non-zero, one can lower the objective while keep satisfying the constraints by reducing both variables. Since linear programs are efficiently solvable [54], this implies that the \( \ell_1\) -optimization problem (419) is efficiently solvable. This optimization program is also efficiently solvable over \( \mathbb{C}\) despite not being a linear program, but a quadratic program.
In what follows we will discuss under which circumstances one can guarantee that the solution of (419) coincides with the sparse signal of interest. We will discuss a couple of different strategies to show this, as different strategies generalize better to other problems of interest. Later in this chapter we also discuss strategies for constructing sensing matrices.
Given a \( s\) -sparse vector \( x\) , our goal is to show that under certain conditions \( x\) is the unique optimal solution to
(421)
Let \( S = \operatorname{supp}(x)\) , with \( |S|=s\) . If \( x\) is not the unique optimal solution of the \( \ell_1\) minimization problem, there exists \( z\neq x\) as optimal solution. Let \( v = z-x\) , it satisfies
this means that \( Av=0\) . Also,
where the last inequality follows by applying the triangle inequality. This means that \( \|v_S\|_1 \geq \|v_{S^c}\|_1\) , but since \( |S|\ll p\) it is unlikely for \( A\) to have vectors in its nullspace that are so concentrated on such few entries. This motivates the following definition.
Definition 43 (Null Space Property)
\( A\) is said to satisfy the \( s\) -Null Space Property (\( A\in \text{s-NSP}\) ) if, for all \( v\) in \( \ker(A)\) (the nullspace of \( A\) ) and all \( |S| = s\) , we have
From the argument above, it is clear that if \( A\) satisfies the Null Space Property for \( s\) , then \( x\) will indeed be the unique optimal solution to (419). In fact, as the property is described in terms of any set \( S\) of size \( s\) , it implies recovery for any \( s\) -sparse vector.
Theorem 72
Let \( x\) be an \( s\) -sparse vector. If \( A\in\text{s-NSP}\) then \( x\) is the unique solution to the \( \ell_1\) optimization problem \( (419)\) with \( y=Ax\) .
The Null Space Property is a statement about certain vectors not belonging to the null space of \( A\) , thus we can again resort to Gordon’s Theorem (Theorem 61) to establish recovery guarantees for Gaussian sensing matrices. Let us define the intersection with the unit-sphere of the cone of such vectors
(422)
Since for an \( m\times p\) matrix \( A\) , \( A\in\text{s-NSP}\) is equivalent to \( \ker(A) \cap C_s = \emptyset \) , Gordon’s Theorem, or more specifically Gordon’s Escape Through a Mesh Theorem (Theorem 63), implies that there exists a universal \( C>0\) such that if \( A\) is drawn with iid Gaussian entries, it will satisfy the s-NSP with high probability provided that \( m \geq C\, \omega^2\left( C_s \right)\) , where \( \omega\left( C_s \right)\) is the Gaussian width of \( C_s\) (as defined in (422)).
Proposition 27
Let \( s\leq p\) and \( C_s\subset \mathbb{S}^{p-1}\) defined in (422). There exists a universal constant \( C\) such that
where \( \omega\left( C_s \right)\) is the Gaussian width of \( C_s\) (as defined in (422)).
{Proof.} The goal is to upper bound
for \( g\sim\mathcal{N}(0,I)\) . Note that \( C_s\) is invariant under permutations of the indices. Thus, the maximizer \( v\in C_s\) will have its largest entries (in absolute value) in the coordinates where \( g\) has its largest entries (in absolute value). Let \( S\) be the set of the \( s\) coordinates with largest absolute value of \( g\) . We have
The key idea is to notice that the condition \( \left\|v_S\right\|_1\geq \left\|v_{S^c}\right\|_1\) imposes a strong bound on the \( \ell_1\) norm of \( v_{S^c}\) via \( \left\|v_{S^c}\right\|_1 \leq \left\|v_S\right\|_1 \leq \sqrt{s} \left\|v_S\right\| \leq \sqrt{s}\) . This can be leveraged by noticing that
This gives
where \( S\) corresponds to the set of the \( s\) coordinates with largest absolute value of \( g\) .
We saw in the proof of Proposition 26, in the context of computing the Gaussian width of the set of sparse vectors, that \( \mathbb{E} \left\|g_S\right\| \lesssim \sqrt{s \log\left( \frac{p}s \right)}\) . Since all entries of \( g_{S^c}\) are smaller, in absolute value than any entry in \( g_S\) we have that \( \left\|g_{S^c}\right\|_\infty^2 \leq \frac{1}s \left\|g_S\right\|^2\) . This implies that \( \mathbb{E} \left\|g_{S^c}\right\|_\infty \lesssim \sqrt{\log\left( \frac{p}s \right)}\) , concluding the proof. \( \Box\)
Together with Theorem 72 this implies the following recovery guarantee, matching the order of number of measurements suggested by the Gaussian width of sparse vectors.
Theorem 73
There exists a universal constant \( C\geq 0\) such that if \( A\) is a \( m\times p\) matrix with i.i.d. Gaussian entries, and \( m\geq C s \log\left(\frac{p}{s}\right)\) , the following holds with high probability: For any \( x\) an \( s\) -sparse vector, \( x\) is the unique solution to the \( \ell_1\) -optimization problem (419) with \( y=Ax\) .
An alternative (and more classical) approach to establishing exact recovery via \( \ell_1\) -minimization is through the Restricted Isometry Property (RIP), which corresponds precisely with the property of approximately preserving the length of sparse vectors.
Definition 44 (Restricted Isometry Property (RIP))
An \( m\times p\) matrix \( A\) (with either real or complex valued entries) is said to satisfy the \( (s,\delta)\) -Restricted Isometry Property (RIP),
for all \( s\) -sparse \( x\) .
If \( A\) satisfies the RIP for sparsity \( 2s\) , it means that it approximately preserves distances between \( s\) -sparse vectors (hence the name RIP). This can be leveraged to show that \( A\) satisfies the NSP.
Theorem 74 ([362])
Let \( y=Ax\) where \( x\) is an \( s\) -sparse vector. Assume that \( A\) satisfies the RIP property with \( \delta_{2s} < \frac{1}{3}\) , then the solution \( x_*\) to the \( \ell_1\) -minimization problem
(423)
becomes \( x\) exactly, i.e., \( x_* = x\)
To prove this theorem we need the following lemma.
Lemma 25 ([362])
We have
for all \( x, x^\prime\) supported on disjoint subsets \( S, S^\prime \subseteq [1, …, p]\) , \( x, x^\prime \in \mathbb{R}^p\) , and \( |S| \leq s\) , \( |S^\prime| \leq s^\prime\)
{Proof.}
Without loss of generality, we can assume \( \|x\| = \|x^{\prime}\| = 1\) , so that the right hand size of the inequality becomes just \( \delta_{s+s^\prime}\) . Since \( A\) satisfies the RIP property, we have
Since \( x\) and \( x^\prime\) have disjoint support, \( \| x \pm x^\prime \|^2 = \|x\|^2 + \|x^\prime\|^2 = 2\) ; the RIP property then becomes
The polarization identity implies:
\( \Box\)
To prove Theorem 74, we simply need to show that the Null Space Property holds for the given conditions.
Proof (of Theorem 74)
Take \( h \in \ker(A) \setminus 0\) . Let index set \( S_0\) be the set of indices of \( s\) largest entries (by modulus) of \( h\) . Let index sets \( S_1, S_2, …\) be index sets corresponding to the next \( s\) to \( 2s\) , \( 2s\) to \( 3s\) , \( …\) largest entries of \( h\) .
Since \( A\) satisfies the RIP, we have
(424)
Note that
We can rewrite (424) as
(425)
Also, by the Cauchy-Schwarz inequality,
(426)
We have \( \delta_{2s} < \frac{1}{3}\) as a condition, so
(427)
Combining (425), (426), and (427), we get
(428)
Now we show that (428) is equivalent to \( \|h_{S}\|_1 < \|h_{S^C}\|_1\) :
Thus, we have shown that \( \|h_{S_0}\|_1 < \|h_{S^C}\|_1\) , which is the Null Space Property and by virtue of Theorem 72 our proof is complete.
Many results in compressive sensing (such as Theorem 74) can be extended will little extra effort to the case where \( x\) is not exactly \( s\) -sparse, but only approximately \( s\) -sparse, a property that is sometimes referred to as compressible. See [363, 357] for a detailed discussion.
Theorem 73 (and its proof) showed conditions under which a random gaussian matrices satisfy the NSP. To show the same for RIP is straightforward with the mathematical machinery we have now developed. Indeed, using Proposition 26 and Theorem 62, one can readily show that matrices with Gaussian entries satisfy the RIP with \( m \approx s \log\left( \frac{p}{s} \right)\) .
Theorem 75
Let \( A\) be an \( m\times p\) matrix with i.i.d. standard Gaussian entries, there exists a constant \( C\) such that, if
(429)
then \( \frac1{\sqrt{m}}A\) satisfies the \( \left(s,\frac14\right)\) -RIP with high probability.
We point out an important aspect in this context. Theorems 73 and 75 combined with Theorem 74 yield a uniform recovery guarantee for sparse vectors with Gaussian sensing matrices. Once a Gaussian matrix satisfies the RIP or NSP (which it will for certain parameters with high probability), then exact recovery via \( \ell_1\) -minimization holds uniformly for all sufficiently sparse vectors.
Figure 134 illustrates the phase transition phenomenon in compressive sensing: The plot shows that for a given sparsity level \( s\) , \( \ell_1\) minimization almost always succeeds in finding the sparsest solution if the number of measurements is above a certain threshold, while it almost always fails if the number of measurements is below that threshold. The very sharp transition between failure and success visible in the plot is supported by theoretical analysis [364, 365]. The sensing matrix in this experiment is a Gaussian random matrix of dimension \( m \times p\) where the ambient dimension \( p=100\) is fixed. The number of measurements, \( m\) varies from 1 to 100, and the sparsity \( s\) varies from 1 to \( m\) . For each choice of \( s\) and \( m\) we construct a sparse vector \( x\) with non-zero random coefficients at \( s\) locations chosen uniformly at random from \( 1,\dots,100\) . We compute \( y=Ax\) and solve for \( x\) via (423). For each choice of \( s\) and \( m\) this experiment (randomly chosen \( A\) and \( x\) ) is repeated 50 times. We plot the empirical rate of success (here, success means that the relative reconstruction error is less than \( 10^{-5}\) ), where black means complete failure and white means complete success. A detailed analysis of this phase transition phenomenon can be found in [364, 365].
While there are obvious similarities between Johnson-Lindenstrauss projections and sensing matrices that satisfy the RIP, there are also important differences. We note that for JL dimension reduction to be applicable (an upper estimate of ) the number of vectors must be known a priori (and this number if finite). JL projection preserves (up to \( \varepsilon\) ) pairwise distances between these vectors, but the vectors do not have to be sparse. As a consequence, JL projections \( P\) are, in general, a one-way street, as in general one cannot recover \( x\) from \( y=Px\) . In contrast, a matrix that satisfies the RIP works for infinitely many vectors, however with the caveat that these vectors must be sparse. Moreover, one can recover such sparse vectors \( x\) from \( y=Ax\) (and can do so numerically efficiently).
As a consequence of these considerations, a matrix that satisfies the RIP does not necessarily have to satisfy the Johnson-Lindenstrauss Lemma. While a Gaussian random matrix does indeed satisfy both, RIP and the Johnson-Lindenstrauss Lemma, other matrices do not satisfy both simultaneously. For example, take a randomly subsampled Fourier matrix \( A\) of dimensions \( m \times p\) . In the notation of the definition of the Fast Johnson-Lindenstrauss transform, this matrix \( A\) would correspond to \( A= SF\) , but without the diagonal matrix \( D\) that randomizes phases (or signs) of \( x\) . This matrix \( A\) will not meet the Johnson-Lindenstrauss properties of Theorem 28. But the absence of the phase randomization matrix \( D\) is not a hurdle for \( A=SF\) to satisfy the RIP under appropriate conditions on the matrix dimensions.
Indeed, it is known [355] that if \( m=\Omega_\delta(s\operatorname{polylog} p)\) , then the partial Fourier matrix satisfies the RIP with high probability. The exact number of logarithmic factors needed is the object of much research with the best known upper bound due to Haviv and Regev [367], giving an upper bound of \( m=\Omega_\delta(s\log^2s\log p)\) . On the side of lower bounds it is know that the asymptotics established for Gaussian matrices of \( m=\Theta_\delta(s\log (p/s))\) are not achievable in general [368].
Checking whether a matrix satisfies the RIP or not is in general NP-hard [369, 370]. While Theorem 75 suggests that RIP matrices are abundant for \( s \approx \frac{m}{\log\left( p \right)}\) , it appears to be very difficult to deterministically construct matrices that satisfy RIP for \( s\gg \sqrt{m}\) , known as the square bottleneck [371, 372, 373, 374, 375, 376]. The only known unconditional construction that is able to break this bottleneck is due to Bourgain et al. [375]; their construction achieves \( s \approx m^{\frac12+\varepsilon}\) for a small, but positive, \( \varepsilon\) . There is also a conditional construction, based on the Paley Equiangular Tight Frame [372, 374].
In Section 16.5.1 we will consider more practical conditions for designing sensing matrices. These conditions, which are better suited for applications, are based on the concept of the coherence of a matrix. Interestingly, the phase randomization of \( x\) that is notably absent in the partial Fourier matrix mentioned above, will reappear in this context in connection with nonuniform recovery guarantees.
Remark 39
If one is interested in understanding the probability of exact recovery of a specific sparse vector, and not a uniform guarantee on all sparse vectors simultaneously, then it is possible to do a more refined version of the arguments above that are able to predict the exact asymptotics of the number of measurements required; see [377] for an approach based on Gaussian widths and [365] for an approach based on Integral Geometry.
In this section we describe yet another approach to show exact recovery of sparse vectors via (419). In this section we take an approach based on duality, the same strategy we took in Chapter 13 to show exact recovery in the Stochastic Block Model. The approach presented here is essentially the same as the one followed in [378] for the real case, and in [379] for the complex case.
In Chapter 9 we derived the dual of a Linear Program using the Lagrangian formulation (we recommend the reader to work out the alternative derivation using the game theoretic approach used in Chapter 13 (there it was used to derived the dual of a Semidefinite Program). The dual to the Linear Program (420) is given by:
(430)
Weak duality (the fact that \( (430)\leq(420)\) ) is, as usual, easy to verify: If \( \omega^{-}\) and \( \omega^{+}\) are primal feasible and \( u\) is dual feasible, then
(431)
showing that \( (430)\leq(420)\) . Furthermore, we know from Chapter 9.3 that strong duality holds, and it guarantees that the optimal values of the two programs actually match.
In order to show that \( \omega^{+} - \omega^{-} = x\) is an optimal solution to (420), we will find a dual feasible point \( u\) for which the dual matches the value of \( \omega^{+} - \omega^{-} = x\) in the primal, \( u\) is known as a dual certificate that we introduced in Chapter 9.3.3.
From (431) it is clear that \( u\) must satisfy
the complementary slackness condition from Chapter 9.3.3. This means that we must take the entries of \( A^Tu\) be \( +1\) or \( -1\) when \( x\) is non-zero (and be \( +1\) when it is positive and \( -1\) when it is negative), in other words
where \( S = \operatorname{supp}(x)\) , and \( \left\| A^Tu\right\|_\infty \leq 1\) (in order to be dual feasible).
Remark 40
It is not difficult to see that if we further ask \( \left\| \left( A^Tu\right)_{S^c}\right\|_\infty < 1\) , any optimal primal solution would have to have its support contained in the support of \( x\) . Indeed, extending Theorem 41 to the case when the objective \( f\) is not differentiable but has a subdifferential (as is the case for \( f(x) = \|x\|_1\) ), and then using the properties of the subdifferential for the \( \ell_1\) -norm that we computed in Chapter 9.3.5, gives the following lemma.
Lemma 26
Consider the problem of sparse recovery discussed above. Let \( S = \operatorname{supp}(x)\) , if \( A_S\) is injective and there exists \( u\in\mathbb{R}^{M}\) such that
and
then \( x\) is the unique optimal solution to the \( \ell_1\) -minimization problem (419).
Since we know that \( \left( A^Tu\right)_S = \operatorname{sign}\left(x_S\right)\) (and that \( A_S\) is injective), we try to construct \( u\) by least squares and hope that it satisfies \( \left\| \left( A^Tu\right)_{S^c}\right\|_\infty < 1\) . More precisely, we take
where \( \left( A^T_S \right)^\dagger = A_S \left( A_S^TA_S \right)^{-1}\) is the Moore-Penrose pseudo-inverse of \( A^T_S\) . This gives the following corollary.
Corollary 4
Consider the problem of sparse recovery. Let \( S = \operatorname{supp}(x)\) . If \( A_S\) is injective and
then \( x\) is the unique optimal solution to the \( \ell_1\) -minimization problem (419).
Theorem 75 establishes that if \( m \geq Cs\log\left(\frac{p}s\right)\) , for a universal constant \( C\) , and \( A \in \mathbb{R}^{m\times p}\) is drawn with i.i.d. Gaussian entries \( \mathcal{N}\left(0,\frac1m\right)\) then it will, with high probability, satisfy the \( (s,1/3)\) -RIP. Note that, if \( A\) satisfies the \( (s,1/3)\) -RIP then, for any \( |S|\leq s\) one has \( \|A_S\| \leq \sqrt{1+\frac13}\) and \( \|\left(A_S^TA_S\right)^{-1}\| \leq \left(1-\frac13\right)^{-1} = \frac32\) , where \( \|\cdot\|\) denotes the operator norm \( \|B\| = \max_{\|x\|=1}\|Bx\|\) .
This means that if we take \( A\) random with i.i.d. \( \mathcal{N}\left(0,\frac1m\right)\) entries then, for any \( |S|\leq s\) we have that
and because of the independency among the entries of \( A\) , \( A_{S^c}\) is independent of this vector and so for each \( j\in S^c\) we have
where \( A_j\) is the \( j\) -th column of \( A\) .
An application of the union bound gives
which implies
which means that we expect to exactly recover \( x\) via \( \ell_1\) minimization when \( m \gg s\log(p)\) . While this can be asymptotically worse then the bound of \( m \gtrsim s\log\left(\frac{p}s\right)\) , and this guarantee is not uniformly obtained for all sparse vectors, the technique in this section is generalizable to several circumstances and illustrates the flexibility of approaches based in construction of dual witnesses. We will discuss nonuniform guarantees in more detail in the next section.
In applications, we usually cannot completely freely choose the sensing matrix to our liking. This means that Gaussian random matrices play an important role as benchmark, but from a practical viewpoint they play a marginal role. Clearly, randomness in the sensing matrix seems to be very beneficial for compressive sensing. However, in practice, there are numerous design constraints on the sensing matrix \( A\) , as in many applications one only has access to structured measurement systems. For example, we may still have the freedom to choose, say the positions of the antennas in radar systems that employ multiple antennas [380, 381], the position of sensors in MRI [358, 382, 383, 384], or the sampling locations in digital signal acquisition [385]. By choosing these randomly, we can still introduce randomness in our system. Or, we can transmit random waveforms in sonar and radar systems [386, 387]. Yet, in all these cases the overall structure of \( A\) is still dictated by the physics of wave propagation. In other applications, it will be other physical constraints or design limitations that will dictate how much randomness we can introduce into the sensing matrix.
While establishing the RIP (with high probability) for Gaussian or Bernoulli random matrices is not too difficult, it is already significantly harder to do so for the partial Fourier matrix [355, 388, 367] and time-frequency matrices [389], and even harder for more specific sensing matrices.
A useful concept to overcome the practical limitations of the RIP is via the concept of the (in)coherence of a matrix. This concept has proven to be widely applicable in practice. While we want to avoid the constraints of the RIP, we nevertheless take it as our point of departure. Recall that the RIP (Definition 44) asks that any \( S\subset [p]\) , \( |S|\leq s\) satisfies:
for all \( x\in \mathbb{R}^{|S|}\) . This is equivalent to
or equivalently
If the columns of \( A\) are unit-norm vectors (in \( \mathbb{R}^m\) ), then the diagonal of \( A_S^TA_S\) is all-ones, this means that \( A_S^TA_S - I\) consists only of the non-diagonal elements of \( A_S^TA_S\) . If, moreover, for any two columns \( a_i\) , \( a_j\) , of \( A\) we have \( \left| a_i^Ta_j\right| \leq \mu\) for some \( \mu\) then, Gershgorin’s circle theorem tells us that \( \left\| A_S^TA_S - I \right\| \leq \mu (s-1)\) .
More precisely, given a symmetric matrix \( B\) , the Gershgorin’s Circle Theorem [15] states that all of the eigenvalues of \( B\) are contained in the so called Gershgorin discs (for each \( i\) , the Gershgorin disc corresponds to
If \( B\) has zero diagonal, then this reads: \( \|B\| \leq \max_i \sum_{j\neq i} \left|B_{ij}\right|\) .
Given a set of \( p\) unit-norm vectors \( a_1,\dots,a_p\in\mathbb{R}^m\) we define its worst-case coherence \( \mu\) as
(432)
Assume now the vectors \( a_1,\dots,a_p\in\mathbb{R}^m\) have worst-case coherence \( \mu\) . If we form a matrix with these vectors as columns, then it will satisfy the \( \left( s , \mu(s-1) \right)\) -RIP, implying that it will satisfy the \( \left( s , \frac13 \right)\) - RIP for \( s \leq \frac13\frac{1}\mu\) .
This motivates the problem of designing sets of vectors \( a_1,\dots,a_p\in\mathbb{R}^m\) with smallest possible worst-case coherence. This is a central problem in Frame Theory [390, 391, 392, 393]. Recall that in finite dimensions, a set of vectors \( a_1,\dots,a_p \in\mathbb{H}^m\) (where \( \mathbb{H} = \mathbb{R}\) or \( \mathbb{C}\) ) is called a frame for \( \mathbb{H}^m\) if there exist constants (frame bounds) \( 0<A\le B < \infty\) such that
(433)
for every \( x\in \mathbb{H}^m\) . The associated frame operator \( S\) is defined by
(434)
The frame definition (433) can be equivalently expressed as requiring that \( A I \preccurlyeq S \preccurlyeq B I\) holds, where \( \preccurlyeq\) denotes the positive-semidefinite order. A frame is called tight if \( A=B\) , in which case \( S=AI\) . If \( \|a_i\| = 1\) for all \( i=1,\dots,p\) then \( \{a_k\}_{i=1}^p\) is called a unit norm frame. We call a unit norm frame \( \{a_k\}_{i=1}^p\) equiangular if
(435)
for some constant \( c\ge 0\) . Obviously, any orthonormal basis is equiangular.
We can now provide an elucidating answer to the question of a lower bound on the coherence of a set of vectors \( a_1,\dots,a_p\) via the following theorem from frame theory.
Theorem 76 ([390])
Let \( \{a_k\}_{k=1}^p\) be a unit-norm frame for \( \mathbb{H}^m\) , where \( \mathbb{H} = \mathbb{R}\) or \( \mathbb{C}\) Then
(436)
Equality holds in (436) if and only if \( \{a_k\}_{k=1}^p\) is an equiangular tight frame.
Proof
A simple calculation shows that
Let \( \lambda_1 \ge \dots \ge \lambda_m\) be the eigenvalues of \( S\) . Let \( {\textbf {1}}\) denote the all-one vector. By the Cauchy-Schwarz inequality
which can be stated equivalently as
(437)
Equality holds in (437) if and only if \( \lambda_1 = \dots = \lambda_p = p/m\) , i.e., if and only if \( \{a_k\}_{k=1}^p\) is a tight frame
We now consider
(438)
with equality if and only if \( \{a_k\}_{k=1}^p\) is equiangular. By the bound (437) we have
(439)
with equality if and only if \( \{a_k\}_{k=1}^p\) is a tight frame. Inequalities (438) and (439) together give (436) and the proof is complete.
We note that if \( \mathbb{H}=\mathbb{R}\) equality in (436) can only hold if \( p \le m(m+1)/2\) , while if \( \mathbb{H}=\mathbb{C}\) then equality in (436) can only hold if \( p \le m^2\) . This can be shown by a so-called tensoring trick (we invite the reader to try): by analyzing the gram matrix of the vectors \( \{a_k\otimes \overline{a_k}\}_{k=1}^p\) (the \( m(m+1)/2\) and \( m^2\) bounds then appear by the dimension of the subspace in which these vectors lie), see Table II of [394].
The coherence bound (436) of a set of \( p\) unit-norm vectors in \( m\) dimensions is also known as Welch bound [395]. Due to this limitation implied by Theorem 76, deterministic constructions based on coherence cannot yield matrices that satisfy the RIP for \( s\gg \sqrt{m}\) , known as the square-root bottleneck [372, 371, 375, 374].
However, as we will see in Section 16.5.2, if we are willing to accept slightly weaker recovery guarantees than provided by the RIP, matrices with low coherence do give rise to sensing matrices that come with appealing theoretical guarantees while also being useful in practice.
Theorem 76 suggests that in order to design sensing vectors of minimal coherence, we should look for equiangular tight frames (ETFs). The existence and construction of ETFs is a rather challenging problem that intersects with a wide range of areas such as harmonic analsyis, algebraic, combinatorics, finite geometry, group theory and representation theory, and coding theory [390, 393]. Applications include signal processing, wireless communications, numerical linear algebra, and quantum physics. Indeed, ETFs are deeply connected to Zauner’s conjecture, particularly through their role in quantum information theory and the concept of SIC-POVMs (Symmetric Informationally Complete Positive Operator-Valued Measures) [396, 397, 398].
Another interesting and very useful construction of sensing vectors with low coherence is given by so-called mutually unbiased bases [399, 400, 401, 402, 390]. These bases are widely used in quantum information theory as well as in radar and signal processing. Two orthonormal bases \( \{ \phi_j \}_{j=0}^{m-1}, \{ \psi_j \}_{j=0}^{m-1} \in \mathbb{C}^m\) are called mutually unbiased if and only if
(440)
The classical example of an MUB consists of the identity matrix and the Discrete Fourier transform matrix concatenated into a \( m\times 2m\) matrix. But, perhaps surprisingly, for certain values of \( m\) , there exist MUBs in \( \mathbb{C}^m\) consisting of \( m+1\) orthonormal bases \( \{ \phi^{(k)}_j \}_{j=0}^{m-1}, k=0,\dots,m\) such that condition (440) is satisfied for any two orthonormal bases \( \{\phi^{(i)}_j\}_{j=0}^{m-1}, \{\phi^{(k)}_j\}_{j=0}^{m-1}\) , see for example [399, 401, 402, 390, 403]. Thus, MUBs give rise to structured sensing matrices of dimension \( m \times m^2\) with coherence \( \mu = 1/\sqrt{m}\) , which thus almost achieve the Welch bound. Here is a simple example for an MUB in \( \mathbb{C}^m\) : Let \( m\) be a prime number \( \ge 5\) and set \( g(j) = \frac{1}{\sqrt{m}}e^{2\pi i j^3/m}\) for \( j=0,\dots,m-1\) . Then the vectors \( \{g_{k,l}\}_{k,l=0}^{m-1}\) defined via
(441)
satisfy \( |\langle g_{k,l}, g_{k',l'} \rangle| \in \{0,1/\sqrt{m}\}\) for all \( g_{k,l} \neq g_{k',l'}\) , which follows from basic properties of quadratic Gauss sums (cf. Theorem 2 in [403]). We can add the \( m \times m\) identity matrix and end up with \( m^2+m\) vectors (split into \( m+1\) ONBs) in \( \mathbb{C}^m\) which form a MUB of maximal size. For other, nonequivalent constructions, of MUBs (which, however, still revolve around translations and modulations in form of the finite Heisenberg group) see [402]. Remarkably, for \( m\) not a power of a prime number it is not known how many MUB exist; this is an open problem even for \( m=6\) [2]. For \( \mathbb{R}^m\) the construction and existence of MUBs faces more constraints. Even the existence of two bases is equivalent to the existence of so-called Hadamard matrices (\( m\times m\) \( \pm1\) matrices with orthogonal columns) for which the existence for dimensions that are a multiple of \( 4\) is still a (celebrated) open question (see, e.g. [2]).
As mentioned before, it follows from Theorem 76 that deterministic constructions based on coherence cannot yield matrices that satisfy the RIP for \( s\gg \sqrt{M}\) , known as the square-root bottleneck [372, 371]. To overcome this square root bottleneck it seems that something has to give. One fruitful direction is to sacrifice the uniform recovery granted by the RIP. Namely, once a matrix satisfies the RIP, it is guaranteed that the solution to the \( \ell_1\) -optimization problem is identical to the solution to the \( \ell_0\) -optimization problem (the sparsest solution) for all \( s\) -sparse vectors. In contrast, we can consider scenarios in which \( \ell_0\) -optimization and \( \ell_1\) optimization having the same solution holds “only” for most \( s\) -sparse vectors. This leads to nonuniform recovery results, which we will pursue below. The benefits however are often worth the sacrifice, since we end up with theoretical guarantees that are much more practical.
Recall that we consider a general linear system of equations \( A x = y\) , where \( A \in \mathbb{C}^{m \times p}\) , \( x \in \mathbb{C}^p\) and \( m \le p\) . We introduce the following generic \( s\) -sparse model:
As an example for a theoretical nonuniform guarantee using coherence-based sensing matrices we state (without proof) the following theorem, and refer to [357] for a proof.
Theorem 77 (Theorem 14.5 in [357])
Let \( A \in \mathbb{C}^{m \times p}, m \le p\) , be a matrix with \( \ell_2\) -normalized columns and coherence \( \mu\) . Let \( S\) be a subset of \( \{1,\dots,p\}\) selected at random according to the uniform model with \( \rm{card}(S) = s\) . Let \( x \in \mathbb{C}^p\) be a vector supported on \( S\) for which \( \operatorname{sign}(x_S)\) is a Steinhaus sequence independent of \( S\) . Assume that, for \( \eta,\varepsilon \in (0,1)\)
(442)
(443)
for an appropriate constant \( c > 0\) . Then, with probability at least, the vector \( x\) is the unique minimizer of \( \|z\|_1\) subject to \( Az = Ax\) .
A simple calculation shows that for a unit-norm tight frame the condition 442 is satisfied if
which is in the ballpark of condition (429) for Gaussian sensing matrices. Theorem 77 demonstrates that by allowing for nonuniform recovery guarantees one can successfully reconstruct sparse signals under much milder coherence conditions than imposed by the aforementioned square root bottleneck. That being said, establishing that the support set of real-world signals can be modeled as random is, in general, difficult to justify rigorously. For instance, the wavelet coefficients of natural images are typically concentrated along edges, giving rise to structured, tree-like patterns in the locations of significant coefficients. This insight is utilized in practical compressive sensing systems as, for example, in MRI [358, 382]. The fact that the support set of many natural signals does not conform to a uniform distribution highlights the relevance of the recovery results established in Sections 16.1–16.3, which hold for all sufficiently sparse signals. Furthermore, as pointed out in [357], the stability guarantees currently available for models based on random supports are notably weaker than those derived from the restricted isometry property.
Various other versions of nonuniform recovery results can be found e.g., in [404, 363, 357]. See [380, 405, 382] for some theoretical results geared towards applications.
When moving the ideas of compressive sensing to move from theory into practice we encounter some challenges: (i) the choice of the sensing matrix is often limited by practical considerations and physical constraints (both usually rule out a Gaussian sensing matrix); (ii) signals are often not sparse in the measurement domain, but only with respect to some properly chosen transform (and even then, signals are often only approximately sparse); (iii) for various reasons (speed being one of them) we may need alternative sparse solvers instead of vanilla \( \ell_1\) -minimization. We already have discussed (i) earlier in this section and will discuss items (ii) and (iii) succinctly below. We recommend [382] for a detailed treatment of how to span the gap between theory and practice of compressive sensing.
As indicated above, signals are often not sparse in the canonical basis, but they are (approximately) sparse after a suitable transformation. For examples audio signals are sparse with respect to a localized Fourier transform such as a Gabor transform [406] or some other local trigonometric transform [407, 408]. JPEG exploits the sparsity of images in the discrete cosine basis or wavelet basis [408] while curvelet transforms are effective sparsifiers for images arising in astronomy [409]. Radar signal are sparse when (properly) transformed into the time-frequency domain [386]. Some signals may even require a redundant dictionary (perhaps consisting of a combination of a wavelet basis, a curvelet basis, and a Fourier basis), see e.g. [408, Chapter 12]. But how do such transform-sparse signals fit into our framework?
As before, let \( x \in \mathbb{C}^p\) be the signal (or image) of interest and we observe \( y=Ax\) , where \( A \in \mathbb{C}^{m \times p}\) is a sensing matrix, where \( m < p\) . We assume that \( x\) is sparse with respect to some basis or frame \( U \in \mathbb{C}^{p \times n}\) , where \( n \ge p\) (and \( n=p\) if we restrict \( U\) to be a basis). Denote this sparse representation by \( w \in \mathbb{C}^n\) , i.e., \( x= Uw\) . We write \( B:=AU\) and can now solve for \( w\) via
(444)
Having solved this problem (assuming it does indeed yield \( w\) ), we can recover \( x\) from \( w\) by simply computing \( x=Uw\) .
Thus, we can (try to) apply the theoretical results developed in the previous sections to the matrix \( B=AU\) in place of \( A\) . In a nutshell, the sensing matrix \( A\) has to be incoherent with respect to the transform in which the signal is sparse. An important example arises in MRI. There, the wavelet transform is often chosen as sparsifying transform and the sensing matrix is derived from randomly subsampling the two-dimensional Discrete Fourier Transform or the Radon transform, see [358, 382]. In practice, it has been observed that even better results are obtained when the random subsampling of the Fourier coefficients is combined with a deterministic sampling of the Fourier coefficients corresponding the low frequencies, a strategy that has already been suggested in one of the original papers on compressive sensing [356]. We refer to [358, 382] for many more details and modifications.
Figure 135 shows an example of compressive sensing applied to MRI. The test image is the so-called GLPU phantom (introduced by Guerquin-Kern, Lejeune, Pruessmann and Unser in [410]). It is a continuous, piecewise constant MRI-type image with an analytic expression for its Fourier transform. The reconstruction of the discrete GLPU phantom from 30% randomly chosen discrete Fourier measurements. The wavelet transform with a Haar wavelet has been used as sparsifying transform \( U\) . The image \( x\) is recovered by first solving (444) for \( w\) , followed by computing \( x=Uw\) .
There are various other efficient and rigorous methods to recover sparse vectors from underdetermined systems besides \( \ell_1\) -minimization and the lasso. For example, homotopy methods, greedy algorithms or methods based on approximate message passing. We refer to [357, 382] for a comprehensive discussion of these techniques. Furthermore, [382] contains a detailed discussion of some subtle potential numerical stability issues one should be aware of.
Exercise 183 (Sparse vector approximation in \( \ell^2\))
Let \( N \geq s \geq 1\) be integers and \( x \in \mathbb{C}^N\) be a vector. Show that there exists an \( s\) -sparse vector \( y \in \mathbb{C}^N\) such that
Exercise 184 (\( \ell_0\) -Minimization Recovery)
Let \( A \in \mathbb{C}^{m\times p}\) be a matrix. Suppose that every \( s\) -sparse vector \( x\) can be uniquely recovered by \( A\) via \( \|.\|_0\) minimization, i.e, we choose \( x^{\ast}\) that minimizes \( \|z\|_{0}\) subject to the constraint \( Ax=Az\) and \( x\) is the unique minimum of this problem if \( x\) has at most \( s\) nonzero entries.
Exercise 185 (Stable nullspace property)
A fundamental fact in compressed sensing is that in order to recover an \( s\) -sparse vector \( x \in \mathbb{R}^N\) by minimizing the \( \ell_1\) norm, the measurement matrix \( \Phi \in \mathbb{R}^{d\times N}\) needs to satisfy the null space property. The goal of this exercise is to study the compressed sensing problem when \( x\) is approximately sparse.
We say that a matrix \( \Phi \in \mathbb{R}^{d\times N}\) satisfies the \( (s,\rho)\) -stable null space property if for every non-zero vector \( v \in \ker(\Phi)\) and all sets \( S\) such that \( |S|\le s\) , the following holds
Prove the following facts
Given a set \( S\subset \{1,…,N\}\) and vectors \( x,z \in \mathbb{R}^N\) ,
Prove that if \( \Phi \in \mathbb{R}^{d\times N}\) satisfies the \( (s,\rho)\) -stable nullspace property with \( \rho \in (0,1)\) , then the solution of the optimization program
satisfies
where \( \sigma_s(x)\) is the \( s\) -best term approximation error of \( x\) , given by \( \sigma_s(x) \mathrm{:=} \inf_{z:\|z\|_0 \le s} \|x-z\|_1\) .
Exercise 186
Let \( i =\sqrt{-1}\) and set
Using the null space property, show that \( \ell_1\) -minimization will recover any 1-sparse vector \( x\) , given \( Ax = y\) .
Exercise 187
On the connection between (in)coherence parameter \( \mu\) and restricted isometry constant \( \delta_{s}\) : Show that \( \delta_1 = 0, \delta_2 = \mu\) , and \( \delta_s \le (s-1)\mu\) .
Exercise 188
Let \( A \in \mathbb{R}^{k \times d}\) be a Gaussian random matrix. Give an estimate for the coherence \( \mu\) of \( A\) .
Exercise 189
The proximal operator for the \( \ell_1\) norm is defined as
Derive the closed-form solution (Soft-Thresholding) for \( \text{prox}_{\lambda \|\cdot\|_1}(y)\) .
Exercise 190
Consider \( y=Ax\) , where \( A\) is a \( 100 \times 400\) Gaussian random matrix and \( x\) is an \( s\) -sparse vector of length 400. The locations of the non-zero entries of \( x\) are chosen uniformly at random and the non-zero coefficients of \( x\) are normal-distributed. For \( s=1,2,\dots,\) solve
(e.g. using the Matlab toolbox cvx, see cvxr.com/cvx, or its Python version cvxopt or its R version cvxr.). For each fixed \( s\) repeat the experiment 10 times. Create a graph plotting \( s\) versus the relative reconstruction error (averaged over the ten experiments for each \( s\) ). Starting with which value of \( s\) (approximately) does \( \ell_1\) -minimization fail to recover \( x\) ?
Exercise 191
Same setup as in the previous exercise, but now the non-zero entries of \( x\) are non-negative. Taking this information into account, we now solve
(here, \( z\ge 0\) is meant entrywise, i.e., for each \( k: z_k \ge 0\) ). (The positivity constraint is easy to include in cvx). Repeat the simulations as described in the previous exercise. Compare your findings to the results from your experiments of the previous exercise and try to quantify the difference regarding the range for \( s\) for which recovery is still possible in this case.
Exercise 192
Let \( m\) be a prime number \( \ge 5\) and set
for \( j=0,\dots,m-1\) . Define the vectors \( \{g_{k,l}\}_{k,l=0}^{m-1}\)
Prove that these \( m^2\) vectors \( \{g_{k,l}\}_{k,l=0}^{m-1}\) plus the \( m\) unit vectors \( \{e_k\}_{k=0}^{m-1}\) together form a mutually unbiased basis (MUB) of \( m(m+1)\) vectors for \( \mathbb{C}^m\) .
Exercise 193
This exercise is a bit more involved. It asks you to prove Zauner’s Conjecture, a fascinating conjecture that pervades many areas of mathematics, including quantum information theory, harmonic analysis and frame theory, finite group theory and representation theory, algebraic number theory, algebraic geometry, discrete and combinatorial geometry, operator algebras, and matrix analysis. (If you actually succeed in proving Zauner’s Conjecture, T.S. will send you one of the famous Zaunerstollen (different Zauner) as reward; and you may also become a serious contender for significant mathematical awards).
Zauner’s Conjecture: [396, 411] For every integer \( d \ge 2\) , there exists a unit vector \( \psi \in \mathbb C^d\) (called a fiducial vector such that its orbit under the Weyl–Heisenberg group,
forms an equiangular tight frame of \( d^2\) vectors in \( \mathbb C^d\) . Here \( T_x\) is the cyclic translation operator defined by \( T_x f(t) = f(t-x)\) where \( t= 0,\dots,d-1\) and \( x= 0,\dots,d-1\) (thus the translation index \( t-x\) is computed modulo \( d\) ) and \( M_{\omega}\) is the modulation operator defined by \( M_{\omega} f(x) = f(x) e^{2\pi i \omega t/d}\) for \( \omega =0,\dots,d-1.\) .
Low-rank matrices arise throughout the sciences because many high-dimensional datasets are governed by a small number of latent factors, leading to strong correlations among variables [412]. Low-rank matrix recovery is a fundamental problem in mathematics and computer science that deals with recovering a matrix from incomplete measurements [413]. What does incomplete mean in this context? Consider for example a matrix \( X \in \mathbb{R}^{n_1\times n_2}\) . Then, \( X\) is determined by \( n_1 n_2\) parameters. Assume we are given \( k\) measurements of this matrix with \( k \ll n_1n_2\) . Without any further assumptions, the problem of recovering \( X\) from these measurements is ill-posed in this case, admitting infinitely many solutions. But what if \( X\) is a low-rank matrix? Can we recover a low-rank matrix from fewer measurements, and if so, can we do it in a numerically robust and efficient manner? And what other conditions do the measurements have to satisfy to make such an endeavour possible? These are the questions we intend to answer in this chapter.
A prominent example of matrix completion and low-rank modeling is collaborative filtering, widely used in recommender systems [414, 415, 416]. Imagine a user-item rating matrix \( X\) , where \( X_{i,j}\) represents the rating given by user \( i\) to item \( j\) . Most entries in this matrix are typically missing, as users usually rate only a small fraction of the available items. The goal of collaborative filtering is to predict the missing ratings, allowing the system to recommend relevant items to users. By assuming that the rating matrix is approximately low-rank (reflecting latent factors like user preferences and item characteristics), we can use matrix completion techniques to infer the missing ratings and provide personalized recommendations. A famous example is the “Netflix Prize” competition conducted between 2006 and 2009, see [417] for details.
An important application of low-rank matrix recovery arises in quantum tomography [418]. In this context, the matrix \( X\) represents the density matrix of a quantum system. Due to limitations in measurement devices, we often can only obtain incomplete information about the density matrix. The density matrix is a positive semi-definite matrix with trace 1, and often, it is low-rank, especially for systems in a mixed state or when only a limited number of degrees of freedom are accessible. Matrix completion techniques can be used to reconstruct the full density matrix from the incomplete measurements. This reconstruction is crucial for characterizing the state of the quantum system and performing quantum information processing tasks. The low-rank assumption is justified by the physical nature of many quantum states, and carefully exploiting it allows for efficient and robust state reconstruction.
Other applications of matrix recovery and low-rank modeling arise in link prediction in social networks [419, 420], Euclidean distance matrix embedding [421, 422], robust photometric stereo [413], phase retrieval [423], blind deconvolution [424], and self-calibration [425]. We will discuss some of these applications in more detail later in this chapter.
As the reader may suspect, there are strong connections between compressive sensing and low-rank matrix recovery. The connection lies in the fact that both rely on parsimonious structural assumptions (sparsity for compressive sensing and low-rank for matrix recovery) and can be tackled using convex relaxation. In both cases, the idea is to exploit these structures to recover the original data efficiently despite having far fewer observations than the ambient dimension of the signal of interest. Thus, it is not surprising that throughout this chapter we will see many parallels to compressive sensing. Nevertheless, matrix recovery poses some additional challenges, as the attentive reader will discover.
We will refer to a matrix \( X \in \mathbb{R}^{n_1 \times n_2}\) as low-rank if its rank \( r\) is small compared to \( \min\{n_1, n_2\}\) . The choice that \( X\) is real-valued is just for convenience, but all results can easily be adapted to the complex-valued setting. A simple computation reveals that such an \( X\) has \( r(n_1+n_2-r)\) degrees of freedom, which corresponds to the dimension of the tangent space to the manifold of rank-\( r\) matrices.
We write \( {\mathcal H}_n\) for the Hilbert space of all \( n \times n\) Hermitian matrices equipped with the Hilbert-Schmidt inner product \( \langle X,Y \rangle := Tr(Y^\ast X)\) We will also deal with linear transformation which acts on the space \( \mathbb{R}^{n_1\times n_2}\) , we will use calligraphic letters to denote these operators, as in \( {\mathcal A}(X)\) .
Now, consider a matrix \( X_0 \in \mathbb{R}^{n_1 \times n}\) with rank \( r \ll \min(n_1,n_2)\) . and assume we are given measurements of the form
(445)
where the \( A_j\) are some matrices in \( \mathbb{R}^{n_1 \times n_2}\) . For notational convenience, we define the measurement operator
(446)
Thus, we can express the (possibly noisy) matrix measurement process in compact form via
where \( y=\{y_j\}_{j=1}^m\) contains all measurement outcomes and \( \varepsilon \in \mathbb{R}^m\) denotes additive noise.
For reference, the adjoint operator \( {\mathcal A}^*\) maps real-valued inputs into Hermitian matrices, and is given by
Let us first consider the noiseless case. A natural approach to recovering \( X_0\) is to solve the rank minimization problem
(447)
This formulation directly encodes the assumption that the solution should have minimal rank among all matrices consistent with the measurements.
In a few cases, rank-minimization problems can be solved explicitly and efficiently. Consider for example the problem
(448)
where \( A \in \mathbb{R}^{n_1\times n_2}\) is a given matrix. Let \( A= \sum_{i=1}^{\min(n_1,n_2)} \sigma_i u_i v_i^T\) denote the SVD of \( A\) . Utilizing our findings in Chapter 4.1.3, it is easy to see that the solution is given by a properly truncated SVD of \( A\) , namely \( X= \sum_{i=1}^{r} \sigma_i u_i v_i^T\) , where \( r\) is the smallest number such that \( \sigma_{r+1} \le \varepsilon\) .
However, the rank function is non-convex, discontinuous, and combinatorial in nature. As a result, rank minimization problems are NP-hard in general, even in seemingly simple settings [162, 426]. One way to see this is by considering the special case where \( X\) is a diagonal matrix. In that case we have \( \rm{rank} X = \|X\|_0\) and the rank minimization problem takes the form
which played a central role in Chapter 16, and we already know it to be NP-hard [361, 357].
This computational intractability motivates the search for tractable relaxations that retain the essential structure of the original problem.
A standard convex surrogate for the rank function is the nuclear norm, defined as
where \( {\sigma_i(X)}\) are the singular values of \( X\) . The nuclear norm is convex and can be viewed as the matrix analogue of the \( \ell_1\) -norm for vectors, which is known to promote sparsity. In fact, the nuclear norm is the tightest convex lower bound of the rank function on the unit spectral-norm ball, see e.g. Theorem 1 in [427]. Compare also Figure 136 to Figure 131(a).
Replacing the rank objective in (447) by the nuclear norm yields the convex optimization problem [426, 428, 429]
(449)
This problem can be cast as a semidefinite program (see Exercise 199). Consequently it can be solved efficiently using interior-point methods for moderate problem sizes or first-order methods for large-scale instances.
In the presence of noise, i.e,, \( y={\mathcal A}(X_0)+w\) , where \( w\) represents the noise term, one typically considers a relaxed formulation
(450)
where \( \tau\) is an upper bound on the error, that is \( \|w\|\le \tau\) .
Although nuclear norm minimization is only a relaxation of rank minimization, it has been shown to recover the true low-rank solution exactly under suitable conditions on the measurement operator \( \mathcal{A}\) . These conditions can be expressed in various ways, including restricted isometry properties, incoherence assumptions, or geometric criteria based on descent cones and Gaussian width.
The success of the convex relaxation is therefore not accidental: the nuclear norm captures the essential geometry of low-rank matrices in a way that allows both computational tractability and provable recovery guarantees, similarly to how the \( \ell_1\) does for Sparsity (Chapter 16). As a result, nuclear norm minimization has become a cornerstone of modern low-rank matrix recovery theory. We will explore this topic in more detail in the next sections.
A central challenge in low-rank matrix recovery is to determine when a convex optimization procedure—typically nuclear norm minimization—can exactly recover a matrix of low rank from a set of linear measurements. A powerful and general framework to analyze this question arises from descent cone analysis and conic geometry, developed in [377, 365, 430] and refined in numerous followup papers, such as [431, 432, 433]. Our analysis will follow in part the perspicuous presentations in [430, 433].
Definition 45
The descent cone \( \mathcal{D}(f,X_0)\) of a proper convex function \( f: \mathbb{C}^{n_1 \times n_2}\rightarrow \mathbb{R}\) at a point \( X_0 \in \mathbb{C}^{n_1 \times n_2}\) is the conic hull of directions in which \( f\) decreases near \( X_0\)
The descent cone of a convex function is always a convex cone, but it may not be closed.
The descent cone analysis approach is widely applicable. In connection with low-rank matrix recovery, we are concerned with the case where \( f(X) = \|X\|_*\) .
Consider now the following two convex optimization problems:
(451)
(452)
We start with the noiseless case. If \( X_0\) is the ground truth to \( \mathcal{A} \left(X \right) = y\) , then any minimizer \( \hat{X}\) of (451) must satisfy \( f(\hat{X}) \le f(X_0)\) and \( {\mathcal A}(\hat{X}) = y\) . This implies that \( \hat{X}\) can be decomposed into \( \hat{X} = X_0+Z\) , where \( Z \in \mathcal{D}(f,X_0) \cap \ker({\mathcal A})\) . If the intersection between the nullspace \( \ker({\mathcal A})\) and the descent cone \( \mathcal{D}(f,X_0)\) only contains the zero element, then \( X_0\) must be the unique optimal solution to (451), as illustrated in Figure 137(a).
In the noisy case, we cannot ask for exact recovery. But in light of (452) we hope that the error between a solution \( \hat{X}\) and the ground truth \( X_0\) is of the order of \( \tau\) . Let \( \hat{X}=X_0+Z\) be a feasible solution of (452) and note that the constraint \( \|\mathcal{A} \left(X_0+Z\right) - y\|_2\le \tau\) implies \( \|\mathcal{A} \left(Z\right)\|_2\le \tau\) . Thus, to bound the error \( \|\hat{X} - X_0\|_F = \|Z\|_F\) , we need to focus our attention on the intersection of \( \mathcal{D}(f,X_0)\) and \( \{Z: |\mathcal{A} \left(Z\right)\|_2\le \tau\}\) . The smaller the size of the intersection, the smaller the error will be, cf. also Figure 137(b).
The size of \( \mathcal{D}(f,X_0) \cap \{Z: |\mathcal{A} \left(Z\right)\|_2\le \tau\}\) can be controlled by a quantity called the smallest conic singular value [430, 377, 433], which is defined by
(453)
The following proposition shows that when \( \sigma_{\min}\big({\mathcal A},\mathcal{D}(f,X_0)\big)\) is large, the size of the intersection will be small, which in turn would yield a smaller error [430, 377, 433].
Proposition 28
Let \( {\mathcal A}: \mathbb{R}^{n_1\times n_2} \to \mathbb{R}^m\) be a linear operator and assume that \( y = {\mathcal A}(X_0)+w\) with \( \|w\|\le \tau\) . Then, any minimizer \( \hat{X}\) of the optimization problem (452) satisfies
(454)
Proof
We have
(455)
for any feasible \( Z\) . Here, the first inequality in (455) follows from the definition of \( \sigma_{\min}\big({\mathcal A},\mathcal{D}(f,X_0)\big)\) , the second inequality from the triangle inequality, and the third one from \( \|\mathcal{A} \left(Z\right)\|_2\le \tau\) and the assumption \( \|w\|\le \tau\) . Rearranging the terms in (455) concludes the proof.
As a consequence, if we can show that \( \sigma_{\min}\big({\mathcal A},\mathcal{D}(f,X_0)\big) > 0\) , then this would imply exact recovery in the noiseless scenario. However, Proposition 28 is deceptive in its simplicity. In general it is actually rather difficult to compute or bound the smallest conic singular value of a matrix. The situation becomes more promising once we introduce randomness in the measurement process, and thereby into \( {\mathcal A}\) . We will explore such a scenario next.
We consider the case of low-rank matrix recovery with measurements of the form
where the \( A_i\) are \( n_1 \times n_2\) Gaussian matrices.
The proof strategy to bound \( \sigma_{\min}\big({\mathcal A},\mathcal{D}(f,X_0)\big)\) for this Gaussian measurement operator is based on Gordon’s Theorem, the use of which was first proposed in the context of sparse recovery by Rudelson and Vershynin in [388, Section 4]. It revolves around the concept of Gaussian width, which we introduced in Definition 36.
Setting \( S:= \{Z \in \mathcal{D}(\|\cdot \|_*,X_0):\|Z\|_F =1\}\) , our goal becomes to bound \( \inf_{Z \in S} \|{\mathcal A}(Z)\|\) from below. Revisiting Gordon’s Theorem, an inspection of the proof of Theorem 61 (in particular (398)) yields the following tail bound
(456)
with probability at least \( e^{-t^2/2}\) , where we have used the well known bound \( a_d \ge \sqrt{d-1}\) in (396) and \( d=m\) to adapt the notation in Chapter 14 to the current setting (\( m\) denotes the number of measurements in this chapter). If \( w(S)\) does not exceed \( \sqrt{m-1}\) , then we can obtain probabilistic recovery guarantees via Proposition 28.
As pointed out in [433], Gordon's Theorem---and therefore also the tail bound in (456)---only requires \( S\) to be a subset of the Frobenius unit sphere \( {\mathcal S}_F(\mathbb{R}^{n_1\times n_2})\) . Therefore, one is not restricted to a specific descent cone but one can instead choose the union over all possible descent cones corresponding to rank-\( r\) matrices in order to obtain uniform recovery guarantees:
Proposition 29 ([433], Corollary 2.1)
The Gaussian width of \( S_r\) , the union over all possible descent cones with an anchor point of rank-\( r\) can be bounded by
Furthermore, let \( \mathcal{A}: \mathbb{R}^{n_1\times n_2}\rightarrow \mathbb{R}^m\) be a Gaussian measurement operator. Then, \( \lambda_{\min} \left( \mathcal{A}, \mathcal{D}(f,X)\right)\) is bounded away from zero for any rank-\( r\) matrix X w.h.p. if
The proof of Proposition 29 makes use of the following result, which we state without proof.
Lemma 27 ([433], Lemma 2.2)
Suppose that \( Z \in \mathbb{R}^{n_1 \times n_2}\) is contained in the nuclear norm descent cone of a rank-\( r\) matrix \( X \in \mathbb{R}^{n_1 \times n_2}\) . Then,
Proof (of Proposition 29)
Using Hölder’s inequality and Lemma 27, the Gaussian width \( w(S_r)\) can be bounded in terms of the expected operator norm of a standard Gaussian matrix:
where in last inequality we have used the bound \( \mathbb{E}\|A\| \lesssim \sqrt{n_1}+\sqrt{n_2}\) , which can be found in e.g. [434, Remark 4.4.4]. Using the tail bound (456) derived from Gordon’s Theorem, we obtain
with probability at least \( 1-e^{-t^2/2}\) . Therefore, if
we can pick \( t>0\) , such that \( \inf_{X\in S_r}\|\mathcal{A}(Z)\|_2 \) is positive w.h.p.
The descent cone approach, while geometrically appealing, faces arduous challenges when we deal with problems where additional structure, such as incoherence of the unknown signals, is critical to exclude exceptional instances where the reconstruction must necessarily fail (see [433] for a more detailed discussion of the issues that arise). Thus, in applications like quantum state tomography, phase retrieval, and matrix completion, an approach based on dual certification introduced in Chapter 9.3, is often preferable.
The next lemma will pave the way to establishing tractable conditions that the nuclear norm relaxation (449) attains its optimal value at a specific point is through the provision of a dual certificate (sometimes also called dual witness).
Recall from our computation of the subdifferential of the nuclear norm in Chapter 9.3.5 the definition the tangent space \( \mathcal{T}\) at a rank\( -r\) \( n_1 \times n_2\) matrix \( X\) with SVD \( X = U \Sigma V^T\) relative to the manifold of rank-\( r\) matrices:
Lemma 28 (Dual certificate, [437])
Let \( X_0 \in \mathbb{R}^{n_1 \times n_2}\) be such that \( \mathcal{A}\left( X_0 \right) = y \in \mathbb{R}^m\) . Assume that the following two conditions hold:
There exists a vector \( \lambda \in \mathbb{R}^m\) such that \( Y=\mathcal{A}^* \lambda\) satisfies
(457)
Then \( X_0\) is the unique minimizer of (449).
Proof
Suppose \( X_0\) is feasible and has SVD \( X_0 = U \Sigma V^T\) with \( \rm{rank}(X_0)=r\) . Let \( P_{{{\mathcal T}_{X_0}}}\) and \( P_{{{\mathcal T}^{\perp}_{X_0}}}\) denote the orthogonal projections on \( \mathcal{T}_{X_0}\) and \( {{\mathcal T}^{\perp}_{X_0}}\) , respectively.
The Lagrangian is
The KKT conditions for optimality of \( X_0\) are (note that we do not have inequality constraints): (i) Primal feasibility: \( \mathcal A(X_0)=b\) . (ii) Dual feasibility: \( \mathcal A^*(\lambda) \in \partial\|X_0\|_*\) . (iii) Complementary slackness: these are trivially fulfilled here since all constraints are equalities. Thus, to certify optimality it suffices to construct a \( \lambda\) such that
We have seen in (270) that
So any matrix of the form
is a valid subgradient.
Suppose now there exists \( Y=\mathcal A^*(\lambda)\) such that \( \mathcal P_{{{\mathcal T}_{X_0}}}(Y) = UV^T\) and \( \|\mathcal P_{{{\mathcal T}^{\perp}_{X_0}}}(Y)\| < 1\) . We will show that this implies \( Y\in\partial\|X_0\|_*\) .
Write
where \( W := \mathcal P_{{{\mathcal T}^{\perp}_{X_0}}}(Y)\) . By assumption, \( W \in {{\mathcal T}^{\perp}_{X_0}}\) and \( \|W\|< 1\) , thus all conditions in (270) are satisfied, and therefore \( Y \in \partial\|X_0\|_*\) . Since \( X_0\) is feasible and \( Y=\mathcal A^*(\lambda)\in\partial\|X_0\|_*\) , the KKT conditions hold, so \( X_0\) is optimal.
If additionally
then one can show that for any feasible \( X\neq X_0\) ,
hence \( X_0\) is the unique minimizer. This follows from the subgradient inequality
with equality only if \( X-X_0\in {{\mathcal T}_{X_0}}\) .
The hard part is now to verify that a given measurement operator \( {\mathcal A}\) actually satisfies the conditions of Lemma 28, in particular condition (457). One of the most successful and widely applicable approaches for this relies on the so-called golfing scheme, introduced by David Gross [438]. In [438] Gross demonstrates that the conditions in Lemma 28 can be relaxed and that the existence of an approximate dual certificate suffices to establish uniqueness and this approximate dual certificate can be constructed via the golfing scheme in an iterative manner .
The concept of an approximate dual certificate allows for small errors on the tangent space \( \mathcal{T}\) and a margin of safety on the orthogonal complement \( \mathcal{T}^\perp\) .
Definition 46
A matrix \( Y \in \rm{range}(\mathcal{A}^*)\) is an \( (\alpha, \beta)\) -approximate dual certificate for \( X_0 = U\Sigma V^\top\) if it satisfies the two conditions:
(458)
(459)
The operator \( \mathcal{P}_{\mathcal{T}} \mathcal{A}^* \mathcal{A} \mathcal{P}_{\mathcal{T}^\perp}\) will play an important role in our subsequent analysis. It dictates how much of a signal can hide in the kernel of the operator relative to its projection onto the tangent space \( \mathcal{T}\) . The next lemma quantifies the “spectral-to-Frobenius” leakage. It ensures that any matrix in the kernel of the measurement operator cannot have its energy concentrated in the “signal” space \( \mathcal{T}\) without having significantly more energy in the “noise” space \( \mathcal{T}^\perp\) .
Lemma 29 (Leakage Lemma)
Let \( \mathcal{A}: \mathbb{C}^{d \times d} \to \mathbb{R}^m\) be a measurement operator. For any \( H \in \ker(\mathcal{A})\) , the following inequality holds
where the leakage constant is defined as
and \( \lambda_{\min}(\mathcal{P}_{\mathcal{T}} \mathcal{A}^* \mathcal{A} \mathcal{P}_{\mathcal{T}})\) denotes the smallest eigenvalue of \( \mathcal{P}_{\mathcal{T}} \mathcal{A}^* \mathcal{A} \mathcal{P}_{\mathcal{T}}\) .
Proof
Since \( H \in \ker(\mathcal{A})\) , we have \( \mathcal{A}(H) = 0\) and \( \mathcal{A}(P_{\mathcal{T}}(H)) = -\mathcal{A}(P_{\mathcal{T}^\perp}(H))\) . Lower Bound (RIP on \( \mathcal{T}\) ): Let \( \mathcal{R}_{\mathcal{T}} = \mathcal{P}_{\mathcal{T}} \mathcal{A}^* \mathcal{A} \mathcal{P}_{\mathcal{T}}\) . For any \( Z \in \mathcal{T}\) , we have \( \|\mathcal{A}(Z)\|^2 = \langle Z, \mathcal{R}_{\mathcal{T}} Z \rangle \ge \lambda_{\min}(\mathcal{P}_{\mathcal{T}} \mathcal{A}^* \mathcal{A} \mathcal{P}_{\mathcal{T}}) \|Z\|_F^2\) . Applying this to \( P_{\mathcal{T}}(H)\) gives
We have
Applying Cauchy-Schwarz and induced norms gives
Dividing both sides by \( \lambda_{\min}(\mathcal{P}_{\mathcal{T}} \mathcal{A}^* \mathcal{A} \mathcal{P}_{\mathcal{T}}) \|P_{\mathcal{T}}(H)\|_F\) establishes the desired bound.
Theorem 78
Let \( X_0\) be a rank-\( r\) matrix with tangent space \( \mathcal{T}\) . Suppose there exists an \( (\alpha, \beta)\) -approximate dual certificate \( Y = \mathcal{A}^*(y)\) . with leakage constant \( \xi\) such that \( \alpha < \frac{1-\beta}{\xi}\) , then \( X_0\) is the unique minimizer of the nuclear norm minimization problem (449).
Proof
We must show that for any non-zero \( H \in \ker(\mathcal{A})\) , \( \|X_0 + H\|_* > \|X_0\|_*\) .
By the definition of the nuclear norm subgradient at \( X_0\)
Since \( H \in \ker(\mathcal{A})\) and \( Y \in \text{range}(\mathcal{A}^*)\) , we have \( \langle Y, H \rangle = 0\) . Thus
Substituting this identity into the subgradient inequality gives
By Hölder’s inequality,
Using Cauchy-Schwarz gives \( \langle P_{\mathcal{T}}(Y) - UV^\top, P_{\mathcal{T}}(H) \rangle \le \alpha \|P_{\mathcal{T}}(H)\|_F\) . We now apply the Leakage Lemma and obtain \( \alpha \|P_{\mathcal{T}}(H)\|_F \le \alpha \xi \|P_{\mathcal{T}^\perp}(H)\|\) . Hence,
Since \( \|P_{\mathcal{T}^\perp}(H)\|_* \ge \|P_{\mathcal{T}^\perp}(H)\|\) for any matrix we get
If \( \alpha < \frac{1-\beta}{\xi}\) , the term in the parentheses is strictly positive, which implies that \( \|X_0 + H\|_* > \|X_0\|_*\) .
Remark 41
The approach we have just outlined using the approximate dual certificate and the Leakage Lemma is essentially a dual-space perspective on the primal-space descent cone geometry that we described in Chapter 17.2. In the descent cone approach we ask how much the operator \( \mathcal{A}\) “shinks” vectors that are trying to decrease the nuclear norm. If the smallest conic singular value is large, the operator captures these directions, and they cannot be in the kernel. In the approximate dual certificate approach the leakage constant \( \xi\) quantifies how much a kernel element \( H\) can “hide” its energy in the tangent space. A large smallest conic singular value \( \sigma_{\min}\big({\mathcal A},\mathcal{D}\big)\) corresponds to a small leakage constant \( \xi\) (but not in a way that allows us to easily convert one into the other).
The reader may wonder whether so far we just have been ‘kicking the can down the road’, since we moved from the primal problem to the dual certificate to the approximate dual certificate to the leakage constant. After all, while Theorem 78 proves that a certificate \( Y\) allows for recovery, it still does not tell us how to find one.
Fortunately , there are now several techniques at our disposal to address this critical issue. One such technique is the aforementioned golfing scheme. It provides an ingenious algorithm to build \( Y \in \rm{range}(\mathcal{A}^*)\) by successively projecting the “residual error” from the tangent space \( \mathcal{T}\) back into the range of the measurement operator. The concrete application of Theorem 78 and the golfing scheme will depend on the specific nature and setting of the low-rank problem under consideration. In the following we will explore three compelling applications, matrix completion, quantum state tomography, and phase retrieval.
While the overall proof architecture via approximate dual certificate and golfing scheme is shared across all three applications, the specific mathematical properties of the measurements affects key steps in the proofs significantly. The difficulty in each proof lies in how the specific measurement operator \( {\mathcal A}\) interacts with the Tangent Space \( \mathcal{T}\) .
Matrix completion is the problem of recovering an unknown matrix from a subset of its entries, under the assumption that the matrix has low rank [428, 439]. Cast in the form of (445), this means that the measurement matrices take the form \( e_{i} e_{j}^{\ast}\) , whence \( \langle e_i e_j^{\ast}, X \rangle = X_{i,j}\) , i.e., the measurements reveal individual entries of the matrix. We define the sampling operator \( \mathcal{P}_\Omega = \sum_{(i,j) \in \Omega} \mathcal{P}_{ij}\) , where \( \mathcal{P}_{ij}(X) = \langle e_i e_j^\top, X \rangle e_i e_j^\top\) , where \( \Omega\) is some subset of the complete set of matrix entry indices \( [n_1] \times [n_2]\) . Thus, in the notation of (445), \( {\mathcal A}=P_{\Omega}\) and \( ({\mathcal A}(X))_{ij} = X_{ij}\) .
Without further knowledge the problem of recovering \( X\) from the entries \( \mathcal{P}_\Omega(X)\) is ill-posed and has infinitely many solutions—just fill in the missing entries with arbitrary values. But assuming that \( X\) is a low-rank matrix, can we then fill in the missing entries of \( X\) in a unique way and can we do so in a numerically feasible way? This problem arises for example in recommender systems, collaborative filtering (user–item ratings, preferences), crowdsourcing and survey data [414, 413, 415, 416].
By counting degrees of freedom of \( X\) , it is apparent that for low-rank matrix completion we need at least \( r(n_1+n_2-r)\) many measurements. But this condition will in general not suffice. Take for example a rank-one matrix whose entries are all zeros, except for, say, its very first entry which we set equal to one. Since a priori we do not know the location of the non-zero entry, in the worst case we would need to take \( n_1 n_2\) measurements (equal to the ambient dimension of the matrix) in order to successfully complete all missing matrix entries.
This should not come as a complete surprise, since we have encountered a similar situation in compressive sensing. There, we had to impose some notion of incoherence (e.g., via the RIP or directly via the concept of coherence) in order to develop a non-trivial, compelling theory (and numerics) of sparse recovery. We will need to do something similar for matrix completion. In Chapter 16.5.1 (see equation (432)) we introduced the concept of the (in)coherence of a set of vectors. For matrices we follow the notion of (in)coherence introduced in [428].
Definition 47
Let \( X \in \mathbb{R}^{n_1 \times n_2}\) be a rank-\( r\) matrix with singular value decomposition \( X = U \Sigma V^T\) , where \( U \in \mathbb{R}^{n_1 \times r}\) , \( V \in \mathbb{R}^{n_2 \times r}\) . We say that \( X\) satisfies the incoherence condition with parameter \( \mu\) if
Incoherence requires the energy of singular vectors to be spread across coordinates. This prevents “spiky” singular vectors, which would make recovery from few entries impossible. The smallest coherence is 1, achieved if \( U\) and \( V\) are spanned by vectors whose entries all have magnitude \( 1/\sqrt{n_1}\) and \( 1/\sqrt{n_2}\) , respectively. The largest possible value for \( \mu\) is \( \max(n_1,n_2)/r\) , which would correspond to any \( U\) or \( V\) that contains a standard basis element.
We will now apply Theorem 78 and the golfing scheme to solve the matrix completion problem, see also [428, 438]
Theorem 79
Assume \( X_0 \in \mathbb{R}^{n_1 \times n_2}\) is a rank-\( r\) matrix and let \( X_0\) be \( \mu\) -incoherent. Suppose we observe \( m\) entries of \( X_0\) with locations sampled uniformly with replacement. Then there exists a constant \( C\) such that if
where \( n = \max(n_1, n_2)\) , then \( X_0\) is the unique minimizer of the nuclear norm minimization problem
with probability at least \( 1-n^{-3}\) .
In the proof of Theorem 79 we will make use of the following notation. We denote the normalized sampling operator by \( \mathcal{R} := \frac{1}{p} \mathcal{P}_\Omega\) , where \( p = m/(n_1 n_2)\) , and the associated subspace projections by \( \mathcal{R}_{\mathcal{T}} := \mathcal{P}_{\mathcal{T}} \mathcal{R} \mathcal{P}_{\mathcal{T}}\) and \( \mathcal{R}_{\mathcal{T}, \mathcal{T}^\perp} := \mathcal{P}_{\mathcal{T}} \mathcal{R} \mathcal{P}_{\mathcal{T}^\perp}\) . Note that \( \mathcal{P}_{\mathcal{T}}\) acts as identity on \( \mathcal{T}\) .
We will employ the following two lemmata. The first one establishes injectivity of the sampling operator on \( \mathcal{T}\) m the second one provides a bound on the leakage constant.
Lemma 30
Given the assumptions of Theorem 79, for \( m \ge C \mu n r \log n\) , we have
with probability at least \( 1 - 2n^{-3}\)
Proof
We define the centered random operator \( \mathcal{S} = \mathcal{R}_{\mathcal{T}} - \mathcal{P}_{\mathcal{T}}\) . This can be written as a sum of \( m\) independent, zero-mean operators \( \mathcal{Z}_k\)
We have
where we have used the incoherence assumption in the last step. For the variance \( \sigma^2\) we have \( \sigma^2 = \| \sum \mathbb{E}[\mathcal{Z}_k^* \mathcal{Z}_k] \| \le \frac{2\mu n r}{m}\) .
The matrix Bernstein inequality of Theorem 54 reads in our setting
(460)
Substituting the computed bounds for \( \|\mathcal{Z}_k\|\) (the \( R\) in (460)) and \( \sigma^2\) into the exponent of the right-hand side of (460) gives for the exponent
To ensure the probability is less than a small failure tolerance \( \eta\) (in this lemma we use \( \eta = n^{-3}\) ), we set
We take the logarithm, rearrange for \( m\) , and get
If we treat \( \delta\) as a fixed constant (such as e.g., \( \delta = 1/2\) ), the term \( \frac{2(2 + \delta)}{\delta^2}\) becomes a constant \( C_1\) . Since \( \log(2nr/\eta) = \log(2r n^4) = C_2 \log n\) , we get (by absorbing both constants into \( C\) )
(461)
We point out that the particular choice of \( \delta \in (0,1)\) only affects the constant \( C\) in (461).
Lemma 31
Given the assumptions of Theorem 79, suppose the number of measurements satisfies \( m \ge C \mu n r \log n\) . Then with probability at least \( 1 - 2n^{-3}\) for every \( H \in \ker(\mathcal{P}_\Omega)\)
with leakage constant \( \xi \le 4 \sqrt{\frac{nr \log n}{m}}\) .
Proof
Let \( H \in \ker(\mathcal{P}_\Omega)\) . As meanwhile usual, we decompose \( H\) into \( H_{\mathcal{T}} + H_{\mathcal{T}^\perp}\) where \( H_{\mathcal{T}} = P_{\mathcal{T}}(H)\) . A simple calculation gives
(462)
Define the event \( \mathcal{E}_1 = \{ \|\mathcal{R}_{\mathcal{T}} - \mathcal{P}_{\mathcal{T}}\| \le 1/2 \}\) . We aim to apply the matrix Bernstein inequality to the sum of operators \( \mathcal{Z}_k = \frac{1}{m} (\frac{1}{p} \mathcal{P}_{\mathcal{T}} \mathcal{P}_{ij} \mathcal{P}_{\mathcal{T}} - \mathcal{P}_{\mathcal{T}})\) . We compute \( R = \|\mathcal{Z}_k\| \le \frac{n^2}{m} \frac{2\mu r}{n} = \frac{2\mu n r}{m}\) . And \( \sigma^2 \le \frac{2\mu n r}{m}\) . Hence, by matrix Bernstein, if \( m \ge C \mu n r \log n\) , then \( \mathbb{P}(\mathcal{E}_1^c) \le n^{-3}\) . On \( \mathcal{E}_1\) , the minimum eigenvalue \( \lambda_{\min}(\mathcal{R}_{\mathcal{T}}) \ge 1 - 1/2 = 1/2\) . Thus
We define the event \( \mathcal{E}_2 = \{ \|\mathcal{R}_{\mathcal{T}, \mathcal{T}^\perp}\|_{\text{op} \to \text{F}} \le \varepsilon \}\) . Consider the operator \( X \mapsto \mathcal{P}_{\mathcal{T}} \mathcal{R} \mathcal{P}_{\mathcal{T}^\perp}(X)\) . This is a sum of \( m\) independent operators \( \mathcal{Y}_k(X) := \frac{n^2}{m} \langle e_i e_j^\top, X \rangle \mathcal{P}_{\mathcal{T}}(e_i e_j^\top)\) , restricted to \( X \in \mathcal{T}^\perp\) . Note that the induced norm \( \|\cdot\|_{\text{op} \to \text{F}}\) of a rank-1 map \( \langle A, \cdot \rangle B\) is \( \|A\|_* \|B\|_F\) . Hence
For the variance \( \sigma^2\) of \( \mathcal{Y}_k\) we compute
Since \( \sum_{i,j} \|\mathcal{P}_{\mathcal{T}}(e_i e_j^\top)\|_F^2 = \text{dim}(\mathcal{T}) = r(n_1 + n_2 - r) \le 2nr\) we get \( \sigma^2 \le \frac{2nr}{m}\) . Applying matrix Bernstein gives for \( \delta = \sqrt{\frac{4nr \log n}{m}}\) , the probability \( \mathbb{P}(\mathcal{E}_2^c) \le 2n \exp(\frac{-\delta^2/2}{\sigma^2 + L\delta/3}) \le n^{-3}\) .
On the event \( \mathcal{E}_1 \cap \mathcal{E}_2\) : \( \|(\mathcal{R}_{\mathcal{T}})^{-1}\| \le 2\) \( \|\mathcal{R}_{\mathcal{T}, \mathcal{T}^\perp}\|_{\text{op} \to \text{F}} \le \sqrt{\frac{4nr \log n}{m}}\) We substitute these into the inequality (462) and obtain
By the union bound, \( \mathbb{P}(\mathcal{E}_1 \cap \mathcal{E}_2) \ge 1 - 2n^{-3}\) .
With these two lemmata in place, we are now ready to prove Theorem 78.
Proof (Proof of Theorem 79)
In the proof \( C\) denotes a constant that may change throughout the derivations. By Theorem 78, \( X_0\) is the unique minimizer if \( \alpha < \frac{1-\beta}{\xi}\) , and by Lemma 31 we have \( \xi \le 4\sqrt{\frac{ n r \log n}{m}}\) .
We will now construct an \( (\alpha,\beta)\) -approximate dual certificate iteratively via the golfing scheme. To that end we divide the sampling set \( \Omega\) into \( k\) independent batches \( \Omega_1, \Omega_2, \dots, \Omega_k\) of about equal size \( m/k\) . On the one hand, the size of the batches will have to be chosen large enough to allow for the application of the matrix-valued concentration of measure bounds tailored for independent random variables. On the other hand, the batch size \( m/k\) cannot be too large, since the speed of convergence is exponential in \( k\) . We will determine the proper value of \( k\) later.
Let \( \mathcal{R}_j\) be the normalized sampling operator for batch \( j\) . While taking \( Y=UV^T\) as the dual certificate does not work since the dual certificate must live in the range of the sampling operator, it still serves as good first initial guess. The idea of the golfing scheme is to iteratively refine this initial guess until condition (458) is fulfilled. We proceed as follows:
By expanding the recursion, it is easy to see that \( Y\) satisfies
We want to show that \( P_{\mathcal{T}}Y\) is sufficiently close to \( UV^\top\) , which is equivalent to showing that \( Q_k\) is sufficiently small. From Lemma 30, we know that for each batch
with high probability. Therefore,
Iterating this \( k\) times gives
To make \( \alpha = \|Q_k\|_F \le n^{-2}\) , we set \( \delta = 1/2\) and \( k \approx \log(n^2 \sqrt{r}) \approx \log n\) .
We must also ensure that the “leakage” of the approximate certificate into the orthogonal space \( \mathcal{T}^\perp\) remains small, i.e., we want \( \beta = \|P_{\mathcal{T}^\perp} Y\| < 1/2\) . Expanding \( Y\) gives
Each term \( W_j = \mathcal{P}_{\mathcal{T}^\perp} \mathcal{R}_j Q_{j-1}\) is a random matrix. By induced norms,
We can expand \( \|\mathcal{P}_{\mathcal{T}^\perp} \mathcal{R}_j \mathcal{P}_{\mathcal{T}}\) into a sum of independent random rank-1 operators and apply the (rectangular) matrix Bernstein inequality. A standard calculation, that is left to the reader, yields
where \( R \le \frac{n^2}{m_j}\) and \( \sigma^2 \le \frac{C \mu n r}{m_j}\) . We solve for \( \gamma\) with \( m_j \ge C \mu n r \log n\) and get
Summing the geometric series gives
with high probability. Since \( \delta = 1/2\) and using our \( \gamma\) bound we get
Choosing \( m \ge C \mu n r \log^2 n\) and using the incoherence assumption implies that \( \beta \le 1/2\) , and also that \( 1-\beta > \alpha \xi\) . This means all conditions for the approximate dual certificate in Theorem 78 are met with high probability, and the nuclear norm minimizer is unique and equal to \( X_0\) .
The extra \( \log n\) factor in the number of measurements \( m\) (compared to the \( \log n\) in standard concentration) arises from the number of iterations \( k\) in the golfing scheme needed to make the error \( \alpha\) sufficiently small.
One can find many variations and refinements of Theorem 78 in the literature, see e.g. [440, 439, 441, 442, 433, 413, 443, 444] for a small sample. For instance, recent work [445] has shown that the joint coherence condition \( \|UV^\top\|_\infty \le \sqrt{\frac{\mu r}{n_1 n_2}}\) is not necessary, just the standard incoherence conditions (small row and column coherence) suffice. Moreover, is not difficult to extend Theorem 79 to the case of noisy measurements. The reader will find various such extensions in the aforementioned literature on matrix completion.
In quantum mechanics, the state of a system is described by a density matrix \( \rho \in \mathbb{C}^{d \times d}\) , cf. [446]. Standard Quantum State Tomography (QST) aims to reconstruct this matrix by performing a series of measurements. However, as the number of qubits \( q\) increases, the dimension of the Hilbert space \( d = 2^q\) grows exponentially, making traditional reconstruction methods computationally and physically prohibitive [447].
Low-rank matrix recovery offers a powerful solution to this “curse of dimensionality” when the underlying quantum state is pure or nearly pure [418].
A pure quantum state is represented by a unit vector \( |\psi\rangle\) . Its corresponding density matrix is
A state density matrix is Hermitian, positive-semidefinite, and has unit-trace. Pure states correspond to rank-one density matrices. In many practical settings—quantum optics, trapped ions, superconducting qubits—the prepared quantum state is either pure or nearly pure. Even in the presence of environmental noise or decoherence, many physical systems exist in “mixed states” that are dominated by a few principal components, making \( \rho\) effectively low-rank. This observation places quantum state tomography squarely within the scope of low-rank matrix recovery.
This structural property allows us to apply the principles of compressive sensing: we can reconstruct \( \rho\) using far fewer measurements than the \( d^2\) required by classical linear inversion [418].
In QST, measurements are typically performed using an observable \( A\) . The expectation value of the measurement is given by the Born rule
To recover the state, we collect a set of measurement results \( y_1, y_2, \dots, y_m\) from different observables \( \{A_i\}_{i=1}^m\) . This can be modeled as a linear operator \( \mathcal{A}(\rho) = y\) . We thus formulate the QST reconstruction problem as a convex optimization problem
(463)
Since \( \rho \succeq 0\) , the nuclear norm \( \|\rho\|_*\) is simply the trace \( \text{Tr}(\rho)\) . Given that the trace is fixed to 1 for any valid density matrix, the nuclear norm minimization problem (463) effectively collapses into a feasibility problem, namely the search for a PSD matrix that satisfies the measurement constraints. Surprisingly however, from a theoretical point of view, the feasibility problem is not easier to analyze than the nuclear norm minimization problem.
A standard choice for QST are Pauli measurements, which are not only theoretically appealing, but also provide a very practical way to extract information from a quantum processor because they align with how quantum hardware is physically built and controlled [448].
Pauli measurements: For a single qubit, define the Pauli matrices [446, 438]
For a \( q\) -qubit system \( (d = 2^q)\) , the Pauli group
forms a basis of \( \mathbb{C}^{d\times d}\) with cardinality \( d^2\) (see Exercise 202). We define the normalized Pauli operators by
These operators satisfy
thus \( \{P_i\}_{i=1}^{d^2}\) is an orthonormal basis for the Hilbert–Schmidt inner product (see Exercise 202). Therefore, any density matrix admits the expansion
In the noisefree case one measures expectation values of Pauli observables
where the \( P_i\) are drawn uniformly at random from the Pauli group (and then normalized). Define the sampling operator
This defines a random linear measurement ensemble.
Theorem 80
Let \( \rho \in \mathbb{C}^{d \times d}\) be a density operator of rank \( r\) , where \( d=2^q\) . Let \( \mathcal{A}: \mathbb{C}^{d \times d} \to \mathbb{R}^m\) be a measurement operator that samples \( m\) Pauli observables \( \{P_i\}_{i=1}^m\) uniformly at random from the complete Pauli basis (excluding the identity). If
then with high probability, \( \rho\) is the unique minimizer of the nuclear norm minimization problem
Proof sketch. The proof follows overall the same architecture as the proof of Theorem 79. Therefore, instead of giving a detailed proof that would duplicate many derivations of the proof of Theorem 79, it is more instructive to give a proof sketch which highlights the key differences.
We start with a trivial, but still useful observation. For a rank-\( r\) state \( \rho\) with singular value decomposition \( U \Sigma V^*\) , we have \( V=U\) , since \( \rho\) is Hermitian. Hence, the tangent space \( \mathcal{T}\) is defined by the span of matrices \( \{Uz^*, wU^*\}\) .
Because Pauli matrices are unitary and perfectly “spread out” in the Hilbert-Schmidt sense, the incoherence \( \mu\) is effectively constant (\( \mu = 1\) ). Specifically, for any Pauli matrix \( P\)
This replaces the \( \frac{\mu nr}{m}\) scaling in matrix completion with a much more favorable \( r/d\) relative scaling.
We define the sampling operator \( \mathcal{R}: \mathbb{C}^{d \times d} \to \mathbb{C}^{d \times d}\) as
Note the normalization factor \( d/m\) arises because
Using the matrix Bernstein inequality as before, the variance \( \sigma^2\) is bounded by the incoherence. Since \( \|P\|=1\) , we find that for \( m \ge C r d \log^2 d\)
with high probability.
The most critical technical change appears in the derivation of the leakage constant \( \xi\) . In matrix completion, \( \xi\) grew as \( \sqrt{n}\) . In QST, the Pauli basis elements \( P_i\) are unitaries. When we compute \( \|\mathcal{P}_{\mathcal{T}} \mathcal{R} \mathcal{P}_{\mathcal{T}^\perp}\|_{\text{op} \to F}\) , we look at the variance
Since \( \|\mathcal{P}_{\mathcal{T}}(P)\|_F^2 \le 2r\) , and \( \sum |\langle P, H \rangle|^2 \le d \|H\|_F^2 \le d^2 \|H\|^2\) we have
Thus, \( \xi \approx \sqrt{\frac{d r \log d}{m}}\) . Plugging in \( m = C d r \log^2 d\) , we find
The key difference is that unlike the entry-wise case in matrix completion, for Pauli measurements, the leakage constant is independent of the dimension \( d\) (up to log-factors, which we did hide in the constant).
To construct \( Y\) via the golfing scheme, we initialize \( Q_0 = U U^{\ast}\) and iterate \( Q_j = Q_{j-1} - \mathcal{P}_{\mathcal{T}} \mathcal{R}_j Q_{j-1}\) . The key properties of the approximate dual certificate we need to fulfill are:
Applying the same line of argument as in the matrix completion proof we conclude
Because \( \xi\) is constant and \( \alpha \le d^{-2}\) , the positivity of \( (1-\beta)\) dominates for any \( H \in \ker(\mathcal{R})\) , which completes our proof sketch.
Remark 42
The semidefinite program in Theorem 80 differs from the semidefinite program in (463) insofar as it does not include the PSD and trace constraints. So, why did we not make use of them in Theorem 80? While including those constraints would make the optimization problem perhaps easier to solve numerically, it does not change the sample complexity \( m\) required for unique recovery in the noiseless case. In a nutshell, the bottleneck for recovery is not the “shape” of the set (PSD vs. general), but the nullspace of the sampling operator \( {\mathcal R}\) .
Phase retrieval—the problem of recovering a function from the squared magnitude of its Fourier transform—arises in numerous applications such as X-ray crystallography [449, 450], diffraction imaging [451], optics [452], fiber optic communications [453], quantum mechanics [454], astronomy [455], and biomedical imaging [456]. This problem has confounded engineers, physicists, and mathematicians for over a century. Recently, phase retrieval has seen a resurgence in research activity, ignited by new imaging modalities [457, 458] and novel mathematical concepts [423, 459].
There are many ways in which one can pose the phase-retrieval problem, for instance depending upon whether one assumes a continuous or discrete-space model for the signal. Here, we consider finite length signals (one-dimensional or multi-dimensional) for simplicity, and because numerical algorithms ultimately operate with digital data. To fix ideas, suppose we have a 1D signal \( x = (x_0, x_1,\) \( …, x_{n-1}) \in \mathbb{C}^n\) and write its Fourier transform as
(464)
Here, \( \Omega\) is a grid of sampled frequencies and an important special case is \( \Omega = \{0,1, …, n-1\}\) so that the mapping is the classical unitary discrete Fourier transform (DFT). The phase retrieval problem consists in finding \( x\) from the intensity measurements \( |{\hat x}(\omega)|^2\) , \( \omega \in \Omega\) .
Without further information about the unknown signal \( x\) , this problem is ill-posed since there are many different signals whose Fourier transforms have the same magnitude. Clearly, if \( x\) is a solution to the phase retrieval problem, then (1) \( c x\) for any scalar \( c \in \mathbb{C}\) obeying \( |c| = 1\) is also solution, (2) the “mirror function” or time-reversed signal \( \bar{x}(-t \text{ mod } n)\) where \( t = 0,1, …, n-1\) is also solution, and (3) the shifted signal \( x(t - a \text{ mod } n)\) is also a solution. From a physical viewpoint these “trivial associates” of \( x\) are acceptable ambiguities. But in general infinitely many solutions can be obtained from \( \{|\hat{x}[\omega]|^2 : \omega \in \Omega\}\) beyond these trivial associates, making it a rather challenging ill-posed problem.
For mathematical purposes, it is convenient to formulate the phase retrieval problem in a more general way as follows: Given information about the squared modulus of the inner product between the signal \( x \in \mathbb{C}^n\) and some vectors \( a_k \in \mathbb{C}^n\) , namely,
(465)
we want to recover \( x\) from \( \{y_k\}_{k=1}^m\) . Here, successful recovery means that we find a solution \( x^*\) which differs from \( x\) only by a multiplicative constant of modulus 1, i.e., \( x^* = cx\) , where \( c\in\mathbb{C}\) with \( |c|=1\) .
The key observation is that quadratic measurements can be lifted up and interpreted as linear measurements about the rank-one matrix \( X = x x^*\) , see [460, 423]. Indeed,
(466)
where \( A_k := a_k a_k^*\) . Adopting the notational conventions from (445) and (446), one can express the data collection \( y_k = |\langle x, a_k\rangle |^2 =\rm{trace}(A_k X)\) , \( k=1,\dots,m\) as
(467)
Hence, the phase retrieval problem can be cast as low-rank matrix recovery problem [461, 423]
(468)
Indeed, we know that a rank-one solution exists so the optimal \( X\) has rank one. We then factorize the solution as \( x x^*\) in order to obtain solutions to the phase-retrieval problem. This gives \( x\) up to multiplication by a unit-normed scalar.
As the reader will expect at this point, the idea is now to solve (468) via a convex relaxation. Thus, we solve
(469)
The program (469) is a semidefinite program in standard form. If the solution has rank one, we factorize it as above to recover our signal \( x\) (up to a global constant of magnitude 1). This method which lifts the problem of vector recovery from quadratic constraints up into that of recovering a rank-one matrix from affine constraints via semidefinite programming is known under the name PhaseLift [461, 423].
The phase retrieval problem, when rephrased as rank-one matrix recovery problem, bears many similarities with QST for pure states . But there is a crucial difference, which prevents us to simply incorporate the theoretical treatment of phase retrieval in Theorem 80. Unlike Pauli measurements which are unitary, the measurement matrices \( a_j a_j^*\) are “spiky” in the spectral domain (their only eigenvalue is \( \|a_j\| \approx n)\) . This complicates matters in the theoretical analysis, as we will see below.
In it not difficult to see that we can recover \( x\) from \( m=n^2\) many measurements (for properly chosen \( a_k\) ). Yet, this is neither interesting nor practical, since \( x\) has only \( n\) unknowns. It has been shown that for \( x \in \mathbb{C}^n\) about \( 4n\) measurements are necessary in general to recover \( x\) [462, 463]. But this does not mean that this can be done in a numerically feasible way. In the next theorem will show that under mild conditions PhaseLift can recover \( x\) exactly (up to a global phase factor) with high probability, provided that the number of measurements is on the order of \( n \log n\) .
Theorem 81
[461] Consider an arbitrary signal \( x\) in \( \mathbb{R}^d\) or \( \mathbb{C}^d\) . Let the measurement vectors \( a_k\) be sampled independently and uniformly at random on the unit sphere, and suppose that the number of measurements obeys \( m \ge C \, d \log^2 d\) , where \( C\) is a sufficiently large constant. Then with high probability the solution to the trace-minimization program is exact with high probability in the sense that (469) has a unique solution obeying
(470)
Before we proceed to the proof of this theorem, a few remarks are in order. At first glance, the phase retrieval problem with Gaussian measurement vectors \( a_k\) appears strikingly similar to the generic low rank matrix recovery problem we studied in Chapter 17.2.1 successfully via descent cone analysis. However, there is a crucial difference. Here, each measurement matrix \( A_k = a_k a_k^*\) is a rank-one matrix, which is far from a generic random matrix (for example a matrix with standard normal entries is almost surely never rank-deficient). While a descent-cone based proof is still possible under appropriate assumptions [433], it is considerably more involved than the dual certificate approach.
The original proof of Theorem 81 in [461] constructs an approximate dual certificate in a clever way without resorting to the golfing scheme. However, this construction is rather technical and beyond the scope of our discussion here. We will instead pursue a proof that involves the by now familiar golfing scheme. In [464] the sampling complexity \( m \ge C \, d \log^2 n\) has been improved to the information-theoretic optimum (modulo the constant) \( m \ge C \, m\) .
Before proceeding to the proof of Theorem 81, we need some preparation. We will make use of the following approximate \( \ell_1\) -isometry bound on the measurement operator \( {\mathcal A}\) .
Lemma 32 (Lemma 3.1 in [461])
Fix any \( \delta\) in \( (0,1/2)\) and assume \( m \ge 20 \delta^{-2} \, d\) . Then for all unit vectors \( u\) ,
(471)
on an event \( E_\delta\) of probability at least \( 1-2e^{-m \varepsilon^2/2}\) , where \( \delta/4 = \varepsilon^2 + \varepsilon\) . On the same event,
for all positive semidefinite matrices. The right inequality holds for all Hermitian matrices.
Proof
Let \( Z^*\) be the \( n \times m\) matrix with the measurement vectors \( a_i\) ’s as columns. Then
so that
The claim is a consequence of deviations bounds concerning the singular values of Gaussian random matrices which we explored in Chapter 15, namely,
The conclusion follows from taking \( m \ge \varepsilon^{-2} \, n\) and \( t = \sqrt{m} \varepsilon\) (and from \( \varepsilon^2 \geq \delta^2/20\) for \( 0 < \delta \le 1/2\) ). For the second part of the lemma, observe that \( X = \sum_j \lambda_j u_j u_j^*\) with nonnegative eigenvalues \( \lambda_j\) so that
The claim follows from (471). The last claim is a consequence of \( \|{\mathcal A}(X)\|_* \le \sum_j \sum_i |\lambda_j| |\langle u_j,a_i\rangle|^2\) together with \( \sum_j |\lambda_j| = \|X\|_*\) .
We will also need a bound on the leakage constant \( \xi\) , which is provided by the following lemma.
Lemma 33
Let \( \mathcal{A}\) be as defined in Theorem 81 and let \( \mathcal{T}\) be the tangent space at a rank-1 matrix \( X=xx^*\) . For \( m \ge C d \log^2 d\) , the leakage constant \( \xi\) satisfies
with high probability.
Proof
To bound the minimum eigenvalue, we use Jensen’s inequality (13),
Applying Lemma 32 gives
Since \( \|M\|_* \ge \|M\|_F\) for any matrix, for a unit-Frobenius matrix \( M \in \mathcal{T}\) (\( \|M\|_F=1\) ), we have
This establishes that the denominator is bounded below by a constant independent of \( d\) .
The numerator \( \|\mathcal{P}_{\mathcal{T}} \mathcal{A}^* \mathcal{A} \mathcal{P}_{\mathcal{T}^\perp} \|_{op \to F}\) requires bounding the Frobenius norm of \( Z = \mathcal{P}_{\mathcal{T}} \mathcal{A}^* \mathcal{A} W\) for \( W \in \mathcal{T}^\perp\) with \( \|W\|=1\) . Let \( \{B_i\}_{i=1}^{2d-1}\) be an orthonormal basis for \( \mathcal{T}\) . We have:
Each term in this sum is \( Y_i := \frac{1}{m} \sum_k (a_k^* B_i a_k)(a_k^* W a_k)\) . Since \( B_i \perp W\) , the expectation is \( \mathbb{E}[Y_i] = \langle B_i, W \rangle = 0\) . The variance of \( Y_i\) is determined by the 4th moments of the Gaussian vectors. For rank-one measurements we have
(472)
For \( W \in \mathcal{T}^\perp\) with \( \|W\|=1\) , the Frobenius norm \( \|W\|_F\) can be as large as \( \sqrt{d-1} \approx \sqrt{d}\) .
Substituting \( \|B_i\|_F=1\) and \( \|W\|_F \approx \sqrt{d}\) into (472) gives
Taking the square root and applying an \( \varepsilon\) -net argument, we get the numerator scaling
We combine the constant denominator and the numerator scaling and obtain \( \xi \lesssim \frac{d / \sqrt{m}}{c_0^2} \approx \frac{d}{\sqrt{m}}\) . For the regime \( m = C d \log^2 d\) this yields
Proof (Proof of Theorem 81)
Recall that to apply Theorem 78 we need to verify that \( (1-\beta) > \alpha \xi\) . We already have seen that \( \xi\) scales like \( \sqrt{d}\) . This means we need to make \( \alpha\) sufficiently small and carefully keep track of this goal when applying the golfing scheme.
We first partition \( m\) measurements into \( k\) independent batches of size \( n = m/k\) . For each batch \( j\) , we define the renormalized sampling operator \( \mathcal{R}_j\) given by
To recover \( X = xx^*\) from \( y_j = \text{tr}(a_j a_j^* X)\) using the golfing scheme, we must handle the non-zero mean of the Gaussian measurements. To that end, we define the centered operator \( \tilde{\mathcal{R}}_j\) as the difference between the random sampling and its expectation
From the Gaussian moment property \( \mathbb{E}[|a^* z|^2 aa^*] = 2zz^* + \|z\|^2 I\) , we know
The centered operator for a single measurement \( a\) is
(473)
To use the matrix Bernstein inequality, we need the variance of the sum of \( n\) independent centered operators: \( \sigma^2 = \| \sum_{i=1}^n \mathbb{E}[X_{a,i}^2] \|\) . Since the measurements are i.i.d., \( \sigma^2 = n \| \mathbb{E}[X_a^2] \|\) .
To find the variance, we must compute \( \mathbb{E}[X_a^* X_a]\) , which involves the eighth moments of \( a\) . To see this, note that the term \( \langle a a^*, X \rangle\) is a quadratic form in \( a\) and the summand \( X_a\) involves \( \langle a a^*, X \rangle a a^*\) , which is a matrix where each entry involves \( a\) raised to the fourth power. Multiplying two of these fourth-power terms together results in an expectation involving the eighth power of the Gaussian entries .
Since \( (\mathbb{E}[X_a])^2\) is a positive semi-definite matrix, subtracting it from \( \mathbb{E}[X_a]\) only reduces the eigenvalues. Therefore
Therefore it suffices to bound the second moment of the uncentered operator \( \mathbb{E} \left[ |a^* X a|^2 \|a\|^2 a a^* \right]\) .
But we can simplify things further. Due to the rotation invariance of the normal distribution, we can assume that \( X\) is a diagonal rank-1 matrix with \( X = e_1 e_1^*\) (so \( \|X\|_F = 1\) ) and let \( v = e_1\) . In the next derivations, we denote the individual entries of \( a\) by \( a(1),\dots, a(d).\) Hence, the expression under consideration simplifies to
We split the sum into two parts: the term where the index \( k\) matches the \( X\) -index (\( k=1\) ) and the terms where it does not (\( k > 1\) ) and get
Using the fact that for complex Gaussians \( \mathbb{E}|a|^2 = 1\) and the univariate moment formula \( (2p-1)!!\) from Lemma 16, we apply Wick’s formula (Lemma 17) and get:
Term 1 (The \( k=1\) case): This is the 8th moment of a single Gaussian.
There is one such term (and its value is independent of \( d\) ).
Term 2 (The \( k \neq 1\) cases): Because \( a(1)\) and \( a(k)\) are independent for \( k \neq 1\) , the expectation factors as
where we have again applied the Gaussian moment formula. There are \( (d-1)\) such terms in the sum.
Adding all terms together and normalizing by \( 1/n^2\) (from the definition of \( \mathcal{R}_j\) ) gives
hence \( \sigma^2 = \mathcal{O}(d/n)\) .
We now apply the golfing scheme to construct \( Y\) iteratively. We initialize \( Q_0 = xx^*/\|x\|^2\) and then iterate \( Y_j = \mathcal{R}_j(Q_{j-1})\) , \( Q_j = Q_{j-1} - \mathcal{P}_{\mathcal{T}} Y_j\) for \( j=1\) to \( k\) . The final approximate dual certificate is \( Y = \sum_{j=1}^k Y_j\) . By construction, the projection onto \( \mathcal{T}\) is a telescoping sum \( \mathcal{P}_{\mathcal{T}} Y = \sum (Q_{j-1} - Q_j) = Q_0 - Q_k\) . Hence, if \( Q_k \to 0\) , then \( \mathcal{P}_{\mathcal{T}} Y \to Q_0\) .
The golfing scheme relies on three critical parameters that govern convergence and certifiability, namely \( \alpha, \beta\) and \( \xi\) .
Recall that the parameter \( \alpha \ge \|\mathcal{P}_{\mathcal{T}}(Y) - UV^*\|_F\) tracks how far the certificate is from the ideal subgradient on the tangent space. Note that
We will now show that the operator \( \mathcal{R}_j\) satisfies
By Lemma 32 for any \( M \in \mathcal{T}\) with \( \|M\|_F = 1\) we have
By Jensen’s Inequality, we have
This proves that the eigenvalues of \( \mathcal{P}_{\mathcal{T}} \mathcal{R} \mathcal{P}_{\mathcal{T}}\) are bounded away from zero by a constant \( 1 - \delta_{\text{lower}}\) .
The upper bound follows from standard sub-exponential concentration. Since \( a_k^* M a_k\) are sub-exponential, the sum of their squares concentrates around the mean \( \mathbb{E}[\langle M, \mathcal{R} M \rangle] = \langle M, (2 \mathcal{I} + \text{Tr}(\cdot)I) M \rangle\) . For \( m \ge C d \log d\) , we obtain
We thus have established that the eigenvalues of \( \mathcal{P}_{\mathcal{T}} \mathcal{R} \mathcal{P}_{\mathcal{T}}\) acting on \( \mathcal{T}\) satisfy
where \( \delta = \max(\delta_{\text{lower}}, \delta_{\text{upper}})\) . By taking \( m_j\) (the size of a single batch) to be a sufficiently large multiple of \( d\) , we can make \( \delta \le \varepsilon\) , where \( \varepsilon\) is a desired constant. We set \( \varepsilon = 1/2\) .
This gives us the recursive contraction
(474)
We know that \( \|Q_0\|_F = \|UV^*\|_F = \sqrt{r} = 1\) (for rank-1). We need \( \alpha \le \frac{1}{4\sqrt{d}}\) and thus \( \left(\frac{1}{2}\right)^k \le \frac{1}{4\sqrt{d}}\) . We can achieve this by setting
The parameter \( \beta \ge \|\mathcal{P}_{\mathcal{T}^\perp}(Y)\|\) measures the contribution of the dual certificate in the orthogonal space. In the orthogonal complement \( \mathcal{T}^\perp\) , we have
For each batch \( j\) , \( \mathcal{R}_j\) is a random operator. Since \( Q_{j-1} \in \mathcal{T}\) and we are projecting onto \( \mathcal{T}^\perp\) , the expectation \( \mathbb{E}[\mathcal{R}_j(Q_{j-1})]\) is zero, i.e.,
To bound the deviation of the expectation from zero, we again use the matrix Bernstein inequality. For rank-one measurements, each batch must satisfy \( m_j \ge C d \log d\) to ensure
Summing these deviations over \( k\) batches gives
Because \( \|Q_j\|_F\) shrinks geometrically (see (474)), this sum is dominated by the first term. By choosing \( m_j\) sufficiently large, we ensure \( \delta\) is small enough (e.g., \( 1/4\) ) so that the total sum \( \beta\) never exceeds \( 1/2\) .
The last step of the proof proceeds along a well-traveled path. We need to show that \( 1-\beta > \alpha \xi\) in order to apply Theorem 78. Plugging in our bounds for \( \xi, \alpha\) , and \( \beta\) we see that this condition is indeed satisfied and the proof is complete.
Remark 43
Because in matrix completion we sample discrete entries, it suffers from the Coupon Collector problem . To ensure every row and column is sampled at least once, we need \( \mathcal{O}(n \log n)\) measurements. This is why the \( \log n\) factors in matrix completion are structurally different from the “union bound” \( \log n\) factors in phase retrieval. In phase retrieval, the Gaussians are delocalized by default. In matrix completion, we need to use the incoherence property to force the matrix to be delocalized so that random sampling actually works.
It is clear that the Gaussian sampling vectors in Theorem 81 are not useful in real-world applications. But this result can be extended to more practical setting. For example, [465] studies a physically realistic setup where one can modulate the signal of interest and then collect the intensity of its diffraction pattern, each modulation thereby producing a coded diffraction pattern or random mask, as suggested in [423]. In this setup, a measurement vector \( a_k\) is the result of a pointwise multiplication followed by a Fourier transform.
To be more precise, let \( D_{\ell}\) be a diagonal matrix representing the \( \ell\) -th random mask (or code) . The entries of \( D_{\ell}\) are usually random phases (e.g., \( e^{2\pi i \phi}\) where \( \phi\) is chosen uniformly from \( [0, 1]\) ). A single measurement in the \( \ell\) -th mask at frequency index \( \omega\) is given by
When moving from Gaussian \( a_k\) to coded diffraction Lemmata 32 and 33 still hold, but the constants change. The masks introduce a form of incoherence by ensuring that the signal is spread out in the Fourier domain. One typically needs \( L \approx \log^2 d\) or \( \log^3 d\) masks, leading to a total \( m = L d\) that still scales as \( \mathcal{O}(d \text{polylog } d)\) , see e.g. [465, 466, 467].
Let us explore this phase retrieval framework in a numerical example. We apply PhaseLift to a stylized version of a setup one encounters in X-ray crystallography or diffraction imaging. The test image, shown in Figure 140(a) (magnitude), is a complex-valued image of size \( 256 \times 256\) , whose pixel values correspond to the complex transmission coefficients of a collection of gold balls at nanoscale embedded in a medium (data courtesy of Stefano Marchesini from Lawrence Berkeley National Laboratory). We use four coded diffraction illuminations, where the entries of the diffraction matrices are either \( +1\) or \( -1\) with equal probability. We use the TFOCS based implementation of PhaseLift from [423] with reweighting.
The numerical algorithm to solve (469) in the example illustrated in Figure 140 was implemented in Matlab using TFOCS [468]. That implementation avoids setting up the matrix \( X\) explicitly and only keeps an \( n\times r\) matrix with \( r \ll n\) in memory.
The impressive achievements of convex relaxation based methods has also inspired a significant body of research on non-convex algorithms for low-rank matrix recovery with rigorous performance guarantees. While SDP based methods provide strong theoretical guarantees, first-order and non-convex algorithms are often preferred in practice because they are more memory-efficient and faster for large-scale data.
The core idea behind most non-convex methods for low-rank recovery is to move from the space of full matrices \( X \in \mathbb{R}^{n_1 \times n_2}\) to the space of low-rank factors. The Burer-Monteiro Factorization [469] is the most common foundation for non-convex methods in this case. Instead of optimizing over a large matrix \( X\) , we represent it as the product of two much smaller, thin matrices \( X = UV^T\) where \( U \in \mathbb{R}^{n_1 \times r}\) and \( V \in \mathbb{R}^{n_2 \times r}\) . If the rank \( r\) of \( X\) is small, one only needs to store \( (n_1 + n_2)r\) parameters instead of \( n_1 \times n_2\) . However, this factorization comes with a significant trade-off: While the original problem in \( X\) was convex, the product \( UV^T\) introduces non-convexity.
Alternating minimization is one of the standard techniques used in such a setting [470, 441]. Since the objective is non-convex in \( (U, V)\) together but convex in each factor individually, the algorithm alternates between the two steps:
This method is appealingly simple (although developing rigorous recovery guarantees is far from simple) and was used in early implementations of the Netflix Prize recommendation engine [471].
Riemannian optimization on fixed-rank manifolds [472, 473] is another common technique. Here, instead of treating \( U\) and \( V\) as independent variables, we treat the set of all rank-\( r\) matrices as a Riemannian manifold. We perform gradient descent, but after each step, “project” the result back onto the manifold of rank-\( r\) matrices (often using a truncated SVD). The updates are restricted to the tangent space \( \mathcal{T}_{X_0}\) to ensure we stay close to the low-rank structure.
A related (but distinct) idea is Iterative Hard Thresholding (IHT) [429], which keeps the problem in the \( X\) -space but enforces the rank constraint at every step. For example, the core steps of Iterative Hard Thresholding are
where \( P_r\) is the projection operator that keeps only the top \( r\) singular values and sets the remaining singular values to zero.
While Iterative Hard Thresholding and Riemannian manifold-based algorithms share the same goal of maintaining a low-rank structure, they are fundamentally different in how they treat the geometry of the problem. Iterative Hard Thresholding takes a step in the “ambient” space (the space of all matrices, regardless of rank) and then pulls the result back to the low-rank set. It treats the rank-\( r\) constraint as a set to project onto. In contrast, Riemannian algorithms never leave the manifold. The gradient itself is projected onto the tangent space \( \mathcal{T}_{X_k}\) first. The update moves along a “geodesic” that follows the curvature of the rank-\( r\) surface.
Proximal methods like Iterative Soft-Thresholding Algorithm (ISTA, [474]) are also very effective for nuclear minimization problems, or more generally for non-smooth optimization where the objective can be split into a smooth part \( g(X)\) and a non-smooth part \( h(X)\) . For nuclear norm minimization the proximal method is applied to the objective \( f(X) = \frac{1}{2}\|{\mathcal A}(X)-y\|^2 + \lambda \|X\|_*\) ). Instead of taking a subgradient step on the whole function, we take a gradient step on the smooth part (i.e., \( g(X)=\frac{1}{2}\|{\mathcal A}(X)-y\|^2 \) ) and then apply a proximal operator to handle the non-smooth part (i.e., \( h(X)=\lambda \|X\|_*\) ). How does the proximal operator look like in this case? For a matrix \( Y\) and a parameter \( \tau > 0\) , the proximal operator of the nuclear norm \( h(X) = \tau \|X\|_*\) is defined as the solution to
The closed-form solution is obtained by performing an SVD of \( Y\) and applying soft-thresholding to its singular values. If the SVD of \( Y\) is \( U \Sigma V^T\) , then
where \( \Sigma_\tau\) is a diagonal matrix whose entries are \( (\sigma_i - \tau)_+ = \max(\sigma_i - \tau, 0)\) .
While a hard thresholding operator cuts singular values abruptly, a proximal operator shrinks singular values continuously (soft thresholding), see also Figure 143.
In both ISTA and IHT, the most computationally expensive step is the full SVD required to find the singular values and vectors. As the matrix dimensions grow, a full SVD becomes a massive bottleneck. For very large-scale matrices, the randomized SVD algorithm of Chapter 8.2 or Krylov subspace based methods [16] provide an effective way to overcome this bottleneck, especially when we know the target rank is much smaller than the matrix dimensions.
Spectral initialization [475, 476] has turned out to be an important ingredient in many non-convex iterative methods. To construct a good initializer, one sets
Under appropriate conditions (such as having a large enough number of random measurements) one can show that this initialization ensures
(for some appropriate constant \( c>0\) ) with high probability. Once an approximation is within this \( c\) -ball, the objective function behaves locally like a strongly convex function, allowing methods like gradient descent to converge at a linear rate to the global optimum.
A notable development in the last decade [477, 478, 413] was that for many low-rank problems (like matrix completion or phase retrieval), the non-convex landscape is “benign”, which means that under certain conditions (like RIP) there are no spurious local minima (every local minimum is also a global minimum) and all other critical points are “strict saddles,” meaning there is always a direction of descent to escape them.
We refer the reader to [413] for an in-depth analysis of convex and nonconvex methods and a detailed discussion of further interesting applications of low-rank matrix recovery.
Exercise 194
Let \( A\) be a matrix with singular values \( \sigma_1, \sigma_2, \dots, \sigma_r > 0\) . Prove that the nuclear norm \( \|A\|_*\) is the convex envelope of \( \text{rank}(A)\) on the set \( \{A : \|A\| \leq 1\}\) .
Exercise 195
A linear map \( \mathcal{A}: \mathbb{R}^{m \times n} \to \mathbb{R}^p\) satisfies the matrix-RIP with constant \( \delta_r\) if for all matrices \( X\) of rank at most \( r\)
If \( \delta_{2r} < 1\) , prove that there is at most one matrix of rank \( r\) that satisfies \( \mathcal{A}(X) = b\) .
Exercise 196
Let \( C \subset \mathbb{R}^n\) be a closed convex cone. The statistical dimension of \( C\) , denoted \( \delta(C)\) , is defined as:
where \( g \sim \mathcal{N}(0, I_n)\) is a standard Gaussian vector in \( \mathbb{R}^n\) and \( \Pi_C(g)\) denotes the Euclidean projection of \( g\) onto \( C\) . Intuitively, \( \delta(C)\) measures the “effective dimension” of \( C\) in \( \mathbb{R}^n\) in a probabilistic sense, analogous to the dimension of a subspace.
(a) Prove that for a subspace \( L \subset \mathbb{R}^n\) of dimension \( d\) , \( \delta(L) = d\) .
(b) Let \( w\) denote the Gaussian width introduced in Definition 36. Prove that for a convex cone \( C\) we have
So the statistical dimension is essentially the squared Gaussian width of the intersection of the cone with the unit sphere.
Exercise 197
Let \( M_1, M_2 \in \mathbb{R}^{n_1\times n_2}\) be two matrices, and let \( M=[M_1, M_2]\) be their concatenation. Show that
(a) \( \|M\|_* \le \|M_1\|_* + \|M_2\|_*\) .
(b) \( \|M\|_* = \|M_1\|_* + \|M_2\|_*\) if \( M_1^{T} M_2 = 0\) .
Exercise 198
Let \( A\) and \( B\) be matrices of the same dimensions. Prove the following: If \( A B^T = 0\) and \( A^T B = 0\) then \( \|A+B\|_* = \|A\|_* +\|B\|_*\) .
Exercise 199
Show that the nuclear norm minimization problem
can be rewritten as
which is a standard SDP in the variables \( (X, W_1, W_2)\) .
(Note: At first glance, the objective \( \frac{1}{2}\left(\operatorname{tr}(W_1) + \operatorname{tr}(W_2)\right)\) does not seem to involve \( X\) , but the Schur complement of \( \begin{pmatrix} W_1 & X \\ X^\top & W_2 \end{pmatrix}\) reveals that \( X\) appears implicitly in the objective.)
Exercise 200
(Schoenberg’s Theorem) Given \( n\) points \( x_1,\dots,x_n \in \mathbb{R}^d\) , the Euclidean distance matrix \( D = [d_{ij}] \in \mathbb{R}^{n \times n}\) is defined by
(Note that the distances are squared in the definition of \( D\) .)
(a) Show that \( D \in \mathbb{R}^{n \times n}\) is a Euclidean distance matrix if and only if \( D=D^T\) and \( H D H^{\ast} \preceq 0\) , where \( H = I_n - \frac{1}{n}\mathbf{1}\mathbf{1}^T\) is the centering matrix and \( \mathbf{1}\) is the vector whose entries are all ones.
(b) Show that \( \rm{rank}(H D H^{\ast}) \le d\) . (This condition implies that \( D\) is a low-rank matrix if \( d \ll n\) ).
Exercise 201
Let \( X = [x_1, x_2, \dots, x_n]^T \in \mathbb{R}^{n \times d}\) be a matrix where each row \( x_i \sim \mathcal{N}(0, I_d)\) is an independent Gaussian random vector in \( d=3\) dimensions. We consider \( n=200\) points. The full squared Euclidean distance matrix \( D\) is defined as
The squared distance matrix \( D\) can be expressed as
where \( z\) is a vector containing the squared norms of the rows of \( X\) .
Exercise 202
(a) Show that the Pauli group
forms a basis of \( \mathbb{C}^{d\times d}\) with cardinality \( d^2\) .
(b) Prove that the normalized Pauli operators satisfy
hence \( \{P_\alpha\}_{\alpha=1}^{d^2}\) is an orthonormal basis for the Hilbert–Schmidt inner product.
Exercise 203
Low-Rank Quantum State Tomography: Consider a 5-qubit system (\( n=5\) ). Assume the quantum system is prepared in a state \( \rho\) that is pure. The density matrix \( \rho\) is an \( 32 \times 32\) complex matrix. You are given the expectation values of \( m\) randomly sampled Pauli observables \( \{A_k\}_{k=1}^m\) . In the noise-free case each measurement \( y_k\) is given by
The observables \( A_k\) are chosen from the set of 5-qubit Pauli strings \( \{I, X, Y, Z\}^{\otimes 5}\) . Since \( \rho\) is known to be PSD and has a trace of 1, we use the following convex optimization problem to recover \( \rho\) from the measurements \( y\) :
(Note that because \( \rho\) is PSD, the nuclear norm is simply the trace: \( \|\rho\|_* = \text{Tr}(\rho)\) . Since we already constrain \( \text{Tr}(\rho) = 1\) , the nuclear norm is constant. The “low-rank” promotion actually comes from the PSD constraint combined with the objective function.)
Exercise 204
Consider the phase retrieval problem where we want to reconstruct a signal \( x\in \mathbb{C}^n\) from intensity measurements of the form \( \{|\langle x,a_k \rangle|^2\}_{k=1}^m\) .
Assume the measurement vectors \( \{a_k\}_{k=1}^m\) form an equiangular tight frame for \( \mathbb{C}^n\) with \( m=n^2\) . Let \( X=x x^\top\) . Show that in this case the solution takes on the very simple form
(475)
[1] Ten Lectures and Forty-Two Open Problems in the Mathematics of Data Science 2016 Available online at: https://people.math.ethz.ch/ abandeira//TenLecturesFortyTwoProblems.pdf
[2] Randomstrasse101: Open Problems of 2024 2025 arXiv preprint arXiv:2504.20539
[3] Average-case complexity in statistical inference: A puzzle-driven research seminar 2025 available at https://arxiv.org/abs/2506.22182
[4] Exercises in Mathematics of Data Science available at https://people.math.ethz.ch/ abandeira//MDS-Exercises-2025.pdf 2025
[5] Dynamic programming Princeton University Press 1957 Princeton
[6] Probability: theory and examples Cambridge University Press 2019 49
[7] Introduction to probability models Academic Press 2014
[8] High-dimensional probability: An introduction with applications in data science Cambridge University Press 2018 47
[9] Asymptotic theory of finite-dimensional normed spaces, lecture notes in mathematics 1200 1986
[10] The concentration of measure phenomenon American Mathematical Soc. 2001
[11] High-dimensional data analysis: The curses and blessings of dimensionality AMS Math Challenges Lecture 2000
[12] Adaptive estimation of a quadratic functional by model selection Ann. Statist. 2000
[13] An elementary proof of the Johnson-Lindenstrauss Lemma Random Structures & Algorithms 2003 22 1 60–65
[14] Probability in High Dimensions ORF 570 Lecture Notes, Princeton University 2014
[15] Matrix analysis Cambridge University Press 1990 Cambridge Corrected reprint of the 1985 original
[16] Matrix Computations Johns Hopkins University Press 1996 third
[17] Symmetric gauge functions and unitarily invariant norms The quarterly journal of mathematics 1960 11 1 50–59
[18] Some matrix-inequalities and metrization of matrix-space Tomsk Univ. Rev. 1937 1 286–300
[19] A trace inequality of John von Neumann Monatshefte für mathematik 1975 79 4 303–306
[20] KY FAN INEQUALITIES Available online at arXiv:1108.1467 [math.FA] 2011
[21] Generalized inverses: theory and applications Springer 2003
[22] On lines and planes of closest fit to systems of points in space Philosophical Magazine, Series 6 1901 2 11 559–572
[23] Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions SIAM review 2011 53 2 217–288
[24] A randomized algorithm for principal component analysis Available at arXiv:0809.2274 [stat.CO] 2009
[25] Stronger and Faster Approximate Singular Value Decomposition via the Block Lanczos Method Available at arXiv:1504.05477 [cs.DS] 2015
[26] The MNIST database of handwritten digits http://yann. lecun. com/exdb/mnist/ 1998
[27] Patterns, predictions, and actions: Foundations of machine learning Princeton University Press 2022
[28] Spectral analysis of large dimensional random matrices Springer 2010 20
[29] Topics in Random Matrix Theory American Mathematical Soc. 2012 Graduate studies in mathematics
[30] An introduction to random matrices Cambridge University Press 2010 Cambridge studies in advanced mathematics Cambridge, New York, Melbourne
[31] Distribution of eigenvalues in certain sets of random matrices Mat. Sb. (N.S.) 1967 72 114 507–536
[32] Methodologies in Spectral Analysis of Large Dimensional Random Matrices: A Review Statistics Sinica 1999 9 611–677
[33] Phase transition of the largest eigenvalue for nonnull complex sample covariance matrices The Annals of Probability 2005 33 5 1643–1697
[35] On the distribution of the largest eigenvalue in principal components analysis The Annals of Statistics 2001 29 2 295–327
[36] Asymptotics of sample eigenstructure for a large dimensional spiked covariance model Statistics Sinica 2007 17 1617–1642
[37] Eigenvalues of Large Sample Covariance Matrices of Spiked Population Models Journal of Multivariate Analysis 2006 97 6 1382–1408
[38] Recent results about the largest eigenvalue of random covariance matrices and statistical application Acta Physica Polonica B 2005 36 9
[39] The eigenvalues and eigenvectors of finite, low rank perturbations of large random matrices Advances in Mathematics 2011
[40] The singular values and vectors of low rank perturbations of large rectangular random matrices Journal of Multivariate Analysis 2012
[41] The largest eigenvalue of rank one deformation of large Wigner matrices Communications in Mathematical Physics 2006 272 1 185–228
[42] Optimality and Sub-optimality of PCA for Spiked Random Matrices and Synchronization Available online at arXiv:1609.05573 [math.ST] 2016
[43] Determining the number of components in a factor model from limited noisy data Chemometrics and Intelligent Laboratory Systems 2008 94 1 19–32
[44] Non-parametric detection of the number of signals: Hypothesis testing and random matrix theory IEEE Transactions on Signal Processing 2009 57 10 3930–3941
[45] \( e \) PCA: High dimensional exponential family PCA The Annals of Applied Statistics 2018 12 4 2121–2150
[46] Optimal singular value shrinkage with noise homogenization arXiv preprint arXiv:1811.02201 2018
[47] Permutation methods for factor analysis and PCA arXiv preprint arXiv:1710.00479 2017
[48] Deterministic parallel analysis: an improved method for selecting factors and principal components Journal of the Royal Statistical Society: Series B (Statistical Methodology) 2018
[49] Optimal shrinkage of eigenvalues in the spiked covariance model Annals of statistics 2018 46 4 1742
[50] Least-squares fitting of two 3-D point sets IEEE Transactions on pattern analysis and machine intelligence 1987 9 5 698–700
[51] Some metric inequalities in the space of matrices Proceedings of the American Mathematical Society 1955 6 1 111–116
[52] Closest unitary, orthogonal and hermitian operators to a given operator Mathematics Magazine 1975 48 4 192–197
[53] The Elements of Statistical Learning: Data Mining, Inference and Prediction Springer 2008 New York
[54] Convex Optimization Cambridge University Press 2004
[55] Gauss and the invention of least squares The Annals of Statistics 1981 465–474
[56] The history of statistics: The measurement of uncertainty before 1900 Harvard University Press 1990
[57] Conjugate gradient type methods for ill-posed problems Chapman and Hall/CRC 2017
[58] Note on the consistency of the maximum likelihood estimate The Annals of Mathematical Statistics 1949 20 4 595–601
[59] Asymptotic statistics Cambridge University Press 2000 3
[60] Linear regression analysis John Wiley & Sons 2003
[61] An introduction to the bootstrap Chapman and Hall/CRC 1994
[62] Ridge regression: Biased estimation for nonorthogonal problems Technometrics 1970 12 1 55–67
[63] On the solution of incorrectly formulated problems and the method of regularization Doklady Akademii Nauk SSSR 1963 151 3 501–504
[64] Estimation of the mean of a multivariate normal distribution The annals of Statistics 1981 1135–1151
[65] Adapting to unknown smoothness via wavelet shrinkage Journal of the american statistical association 1995 90 432 1200–1224
[66] The SURE-LET approach to image denoising IEEE Transactions on Image Processing 2007 16 11 2778–2786
[67] Inadmissibility of the usual estimator for the mean of a multivariate normal distribution Proceedings of the third Berkeley symposium on mathematical statistics and probability, volume 1: Contributions to the theory of statistics 1956 3 197–207 University of California Press
[68] Estimation with quadratic loss Proceedings of the fourth Berkeley symposium on mathematical statistics and probability 1961 1 361–379 University of California Press
[69] Improving efficiency by shrinkage: The James–Stein and Ridge regression estimators Routledge 2017
[70] Tibshirani, R., Regression shrinkage and selection via the lasso, J. Roy. Statist. Soc. Ser. B, Journal of the Royal Statistical Society. Series B. Methodological, 58, 1996, 1, 267–288
[71] Robust estimation of a location parameter Breakthroughs in statistics: Methodology and distribution Springer 1992 492–518
[72] Extrapolation, interpolation, and smoothing of stationary time series: with engineering applications The MIT Press 1949
[73] Linear estimation Prentice Hall 2000
[74] K. Bryan and T. Leise, The $25,000,000,000 eigenvector: The linear algebra behind Google, Siam Review, 48(3):569–581, 2006
[75] Landau, Edmund, Zur relativen Wertbemessung der Turnierresultate, Deutsches Wochenschach, 11, 42, 51–54, 1895
[76] Landau, Edmund, Über Preisverteilung bei Spielturnieren, Zeitschrift für Mathematik und Physik, 63, 192–202, 1914, Schlömilch's Zeitschrift
[77] Landau on Chess Tournaments and Google's PageRank arXiv preprint arXiv:2210.17300 2022
[78] Lloyd, S., Least Squares Quantization in PCM, IEEE Trans. Inf. Theor., March 1982, 28, 2, 1982, 129–137
[79] A lower bound for the smallest eigenvalue of the Laplacian, J. Cheeger, Problems in analysis (Papers dedicated to Salomon Bochner, 1969), pp. 195–199. Princeton Univ. Press, 1970
[80] Eigenvalues and expanders, N. Alon, Combinatorica, 6, 83–96, 1986
[81] Isoperimetric inequalities for graphs, and superconcentrators, Journal of Combinatorial Theory, 38, 73–88, N. Alon and V. Milman, 1985
[82] F. R. K. Chung, Spectral Graph Theory, AMS, 1997
[83] Chung, F., Four proofs for the Cheeger inequality and graph partition algorithms, Fourth International Congress of Chinese Mathematicians, pp. 331–349, 2010, Amer Mathematical Society
[84] in theory BLOG: CS369G Llecture 4: Spectral Partitionaing 2011
[85] Multi-way spectral partitioning and higher–order Cheeger inequalities, J.R. Lee and S.O. Gharan and L. Trevisan, STOC '12 Proceedings of the forty-fourth annual ACM symposium on Theory of computing, 2012
[86] Diffusion maps, Coifman, Ronald R and Lafon, Stéphane, Applied and computational harmonic analysis, 21, 1, 5–30, 2006, Elsevier
[87] Laplacian eigenmaps and spectral techniques for embedding and clustering NIPS 2001 14 585–591
[88] Laplacian eigenmaps for dimensionality reduction and data representation Neural computation 2003 15 6 1373–1396
[89] J. B. Tenenbaum and V. de Silva and J. C. Langford, A Global Geometric Framework for Nonlinear Dimensionality Reduction, Science, 290, 5500, 2319–2323, 2000
[90] Two-dimensional tomography from noisy projections taken at unknown random directions SIAM journal on imaging sciences 2013 6 1 136–175
[91] Cryo-EM heterogeneity analysis using regularized covariance estimation and kernel regression Proceedings of the National Academy of Sciences 2025 122 9 e2419140122
[92] Estimation of Local Geometric Structure on Manifolds from Noisy Data Journal of Machine Learning Research 2025 26 64 1–89
[93] Fitting a manifold of large reach to noisy data Journal of Topology and Analysis 2025 17 02 315–396
[94] From Few to Many: Illumination Cone Models for Face Recognition under Variable Lighting and Pose IEEE Transactions on Pattern Analysis and Machine Intelligence 2001 23 6 643–660
[95] Random walks and electric networks American Mathematical Soc. 1984 22
[96] Random walks on graphs Combinatorics, Paul erdos is eighty 1993 2 1-46 4
[97] Hitting and commute times in large random neighborhood graphs The Journal of Machine Learning Research 2014 15 1 1751–1798
[98] Nonlinear dimensionality reduction by locally linear embedding science 2000 290 5500 2323–2326
[99] Hessian eigenmaps: Locally linear embedding techniques for high-dimensional data Proceedings of the National Academy of Sciences 2003 100 10 5591–5596
[100] Principal manifolds and nonlinear dimensionality reduction via tangent space alignment SIAM journal on scientific computing 2004 26 1 313–338
[101] Umap: Uniform manifold approximation and projection for dimension reduction arXiv preprint arXiv:1802.03426 2018
[102] Non-linear independent component analysis with diffusion maps Applied and Computational Harmonic Analysis 2008 25 2 226–239
[103] Learning the geometry of common latent variables using alternating-diffusion Applied and Computational Harmonic Analysis 2018 44 3 509–536
[104] Visualizing data using t-SNE Journal of machine learning research 2008 9 Nov 2579–2605
[105] A. Singer and H.-T. Wu, Vector Diffusion Maps and the Connection Laplacian, cpam, 65, 8, 1067–1144, 2012
[106] Stochastic neighbor embedding Advances in Neural Information Processing Systems 2002 15
[107] {Clustering with {t-SNE} SIAM journal on mathematics of data science 2019 1 2 313–332
[108] Theoretical foundations of t-SNE for visualizing high-dimensional clustered data Journal of Machine Learning Research 2022 23 301 1–54
[109] SCANPY: large-scale single-cell gene expression data analysis Genome biology 2018 19 1 15
[110] Visualizing structure and transitions in high-dimensional biological data Nature biotechnology 2019 37 12 1482–1492
[111] Diffusion maps for high-dimensional single-cell analysis of differentiation data Bioinformatics 2015 31 18 2989–2998
[112] Theory of reproducing kernels Transactions of the American mathematical society 1950 68 3 337–404
[113] Vorlesungen über Fouriersche Integrale Akademische Verlagsgesellschaft 1932
[114] Gröchenig, K., Foundations of Time-Frequency Analysis, Birkhäuser, Boston, 2001
[115] On estimating regression Theory of Probability & Its Applications 1964 9 1 141–142
[116] Smooth regression analysis Sankhyā: The Indian Journal of Statistics, Series A 1964 359–372
[117] Nonlinear component analysis as a kernel eigenvalue problem Neural computation 1998 10 5 1299–1319
[118] Random features for large-scale kernel machines Advances in neural information processing systems 2007 20
[119] Semi-supervised learning using Gaussian fields and harmonic functions Proceedings of the 20th International conference on Machine learning (ICML-03) 2003 912–919
[120] Nadler, Boaz and Srebro, Nathan and Zhou, Xueyuan, Semi-Supervised Learning with the Graph Laplacian: The Limit of Infinite Unlabelled Data, Advances in neural information processing systems, 22, 1330–1338, 2009
[121] Markov chains and mixing times American Mathematical Society, Providence, RI 2017 Second With contributions by Elizabeth L. Wilmer, With a chapter on “Coupling from the past'' by James G. Propp and David B. Wilson 10.1090/mbk/107
[122] Logarithmic Sobolev inequalities for finite Markov chains, P. Diaconis and L. Saloff-Coste, The Annals of Applied Probability, 6, 3, 695–750, 1996
[123] https://doi.org/10.1515/9783110218091 , Dirichlet Forms and Symmetric Markov Processes, Masatoshi Fukushima and Yoichi Oshima and Masayoshi Takeda, De Gruyter, Berlin, New York, doi:10.1515/9783110218091, 9783110218091, 2010
[124] Monte Carlo sampling methods using Markov chains and their applications Oxford University Press 1970
[125] Monte Carlo Springer 1999 2
[126] Statistical mechanics: algorithms and computations OUP Oxford 2006 13
[127] Bayesian data analysis Chapman and Hall/CRC 1995
[128] http://dx.doi.org/10.1561/0100000067 , 2018, 14, Foundations and Trends® in Communications and Information Theory, Community Detection and Stochastic Block Models, 10.1561/0100000067, 1567-2190, 1-2, 1-162, Emmanuel Abbe
[129] Newman, M E J and Barkema, G T, Monte Carlo Methods in Statistical Physics, Oxford University Press, 1999, 02, 9780198517962, 10.1093/oso/9780198517962.001.0001, https://doi.org/10.1093/oso/9780198517962.001.0001
[130] Nima Anari and Kuikui Liu and Shayan Oveis Gharan, Spectral Independence in High-Dimensional Expanders and Applications to the Hardcore Model, Proc. 61st IEEE Annual Symposium on Foundations of Computer Science (FOCS), 1–12, 2020, IEEE
[131] Chen, Yuansi and Eldan, Ronen, Localization schemes: A framework for proving mixing bounds for Markov chains, Duke Mathematical Journal, 174, 8, 1431–1510, 2025, 10.1215/00127094-2024-0063
[132] W. Johnson and J. Lindenstrauss, Conference in modern analysis and probability (New Haven, Conn., 1982), 7030987, 189–206, 2010-08-24 14:44:11, 2, American Mathematical Society, Contemporary Mathematics, Extensions of Lipschitz mappings into a Hilbert space, 26, 1984
[133] Embedding the diamond graph in \( L_p\) and dimension reduction in \( L_1\) Geometric & Functional Analysis GAFA 2004 14 4 745–747
[134] N. Alon, Problems and results in extremal combinatorics I, Discrete Mathematics, 273, 1–3, 31–53, 2003
[135] K. G. Larsen and J. Nelson, Optimality of the Johnson-Lindenstrauss Lemma, Available online at arXiv:1609.02094, 2016
[136] Nir Ailon and Bernard Chazelle, The fast Johnson-Lindenstrauss transform and approximate nearest neighbors, SIAM J. Comput, 2009, 302–322
[137] Optimal approximate matrix product in terms of stable rank ICALP 2016 2016 11:1–11:14
[138] Randomized matrix computations: Themes and variations, Kireeva, Anastasia and Tropp, Joel A, arXiv preprint arXiv:2402.17873, 2024
[139] Aspects of multivariate statistical theory John Wiley & Sons 2009
[140] Randomized algorithms for low-rank matrix approximation: Design, analysis, and applications arXiv preprint arXiv:2306.12418 2023
[141] A fast randomized algorithm for overdetermined linear least-squares regression Proceedings of the National Academy of Sciences 2008 105 36 13212–13217
[142] Simple and deterministic matrix sketching Proceedings of the 19th ACM SIGKDD international conference on Knowledge discovery and data mining 2013 581–588
[143] Randomized algorithms for matrices and data Foundations and Trends\textregistered in Machine Learning 2011 3 2 123–224
[144] Sampling from large matrices: An approach through geometric functional analysis Journal of the ACM (JACM) 2007 54 4 21–es
[145] Sketching as a tool for numerical linear algebra Foundations and Trends\textregistered in Theoretical Computer Science 2014 10 1–2 1–157
[146] Practical sketching algorithms for low-rank matrix approximation SIAM Journal on Matrix Analysis and Applications 2017 38 4 1454–1485
[147] Fast Monte-Carlo algorithms for finding low-rank approximations Journal of the ACM (JACM) 2004 51 6 1025–1041
[148] CUR Proceedings of the National Academy of Sciences 2009 106 3 697–702
[149] Subspace sampling and relative-error matrix approximation: Column-based methods International Workshop on Approximation Algorithms for Combinatorial Optimization 2006 316–326 Springer
[150] Sketching and streaming entropy via approximation theory 2008 49th Annual IEEE Symposium on Foundations of Computer Science 2008 489–498 IEEE
[151] Data streams: Algorithms and applications Foundations and Trends in Theoretical Computer Science 2005 1 2 117–236
[152] Finding frequent items in data streams International Colloquium on Automata, Languages, and Programming 2002 693–703 Springer
[153] Tabulation-based 5-independent hashing with applications to linear probing and second moment estimation SIAM Journal on Computing 2012 41 2 293–331
[154] OSNAP 2013 IEEE 54th Annual Symposium on Foundations of Computer Science 2013 117–126 IEEE
[155] Gaussian elimination is not optimal, Strassen, Volker, Numerische Mathematik, 13, 4, 354–356, 1969, Springer
[156] Fast Monte Carlo algorithms for matrices I: Approximating matrix multiplication SIAM Journal on Computing 2006 36 1 132–157
[157] Optimization models Cambridge University Press 2014
[158] Introductory lectures on convex optimization: A basic course Springer Science & Business Media 2013 87
[159] Numerical optimization Springer 2006
[160] Integer and combinatorial optimization John Wiley & Sons 1999
[161] Combinatorial optimization: polyhedra and efficiency Springer 2003
[162] Vandenberghe, Lieven and Boyd, Stephen, Semidefinite Programming, SIAM Review, 38, 49–95, 1996
[163] Convex analysis Princeton University Press 2015
[164] Lectures on convex optimization Springer 2018 137
[165] Gradient methods for the minimisation of functionals, Polyak, Boris T, USSR Computational Mathematics and Mathematical Physics, 3, 4, 864–878, 1963, Elsevier
[166] A topological property of real analytic subsets Coll. du CNRS, Les équations aux dérivées partielles 1963 117 87-89 2
[167] Linear convergence of gradient and proximal-gradient methods under the Polyak-\Lojasiewicz condition Joint European conference on machine learning and knowledge discovery in databases 2016 795–811 Springer
[168] Gradient descent only converges to minimizers Conference on learning theory 2016 1246–1257 PMLR
[169] Gradient Descent Only Converges to Minimizers: Non-Isolated Critical Points and Invariant Regions 8th Innovations in Theoretical Computer Science Conference (ITCS 2017) 2017 Papadimitriou, Christos H. 67 Leibniz International Proceedings in Informatics (LIPIcs) 2:1–2:12 Schloss Dagstuhl – Leibniz-Zentrum für Informatik
[170] A geometric analysis of phase retrieval Foundations of Computational Mathematics 2018 18 5 1131–1198
[171] Acceleration by random stepsizes: Hedging, equalization, and the arcsine stepsize schedule arXiv preprint arXiv:2412.05790 2024
[172] Some methods of speeding up the convergence of iteration methods USSR Computational Mathematics and Mathematical Physics 1964 4 5 1–17
[173] A method for solving the convex programming problem with convergence rate \( {\mathcal O}(1/k^2)\) Dokl akad nauk Sssr 1983 269 543
[174] Adam: A method for stochastic optimization arXiv preprint arXiv:1412.6980 2014
[175] Adaptive subgradient methods for online learning and stochastic optimization. Journal of machine learning research 2011 12 7
[176] Deep learning: An introduction for applied mathematicians Siam review 2019 61 4 860–891
[177] A randomized Kaczmarz algorithm with exponential convergence JFAA 15 4
[178] Angenaherte Auflösung von Systemen linearer Gleichungen Bull. Int. Acad. Pol. Sic. Let., Cl. Sci. Math. Nat. 1937 355–357
[179] Stochastic gradient descent, weighted sampling, and the randomized Kaczmarz algorithm Advances in neural information processing systems 2014 27
[180] The probability that a numerical analysis problem is difficult Mathematics of Computation 1988 50 182 449–480
[181] Randomized iterative methods for linear systems SIAM Journal on Matrix Analysis and Applications 2015 36 4 1660–1690
[182] The regression analysis of binary sequences Journal of the Royal Statistical Society Series B: Statistical Methodology 1958 20 2 215–232
[183] Support-vector networks Machine learning 1995 20 3 273–297
[184] The origins of logistic regression Tinbergen Institute discussion paper 2002
[185] Recherches mathématiques sur la loi d'accroissement de la population Académie Royale de Bruxelles 1844 18
[186] Application of the logistic function to bio-assay Journal of the American statistical association 1944 39 227 357–365
[187] Statistical inference Chapman and Hall/CRC 2024
[188] The geometry of information retrieval Cambridge University Press 2004
[189] A training algorithm for optimal margin classifiers Proceedings of the fifth annual workshop on Computational learning theory 1992 144–152
[190] Learning with kernels: support vector machines, regularization, optimization, and beyond MIT Press 2002
[191] A comparison of methods for multiclass support vector machines IEEE Transactions on Neural Networks 2002 13 2 415–425
[192] Rademacher and Gaussian complexities: Risk bounds and structural results Journal of machine learning research 2002 3 Nov 463–482
[193] Rademacher processes and bounding the risk of function learning High dimensional probability II Springer 2000 443–457
[194] Understanding machine learning: From theory to algorithms Cambridge University Press 2014
[195] On the method of bounded differences Surveys in combinatorics 1989 141 1 148–188
[196] Probability in Banach spaces Springer-Verlag, Berlin 1991 23 Ergebnisse der Mathematik und ihrer Grenzgebiete (3) [Results in Mathematics and Related Areas (3)]
[197] Nearest neighbor pattern classification IEEE transactions on information theory 1967 13 1 21–27
[198] The random subspace method for constructing decision forests IEEE Transactions on Pattern Analysis and Machine Intelligence 1998 20 8 832–844
[199] Random forests Machine learning 2001 45 1 5–32
[200] A decision-theoretic generalization of on-line learning and an application to boosting Journal of computer and system sciences 1997 55 1 119–139
[201] Greedy function approximation: a gradient boosting machine Annals of statistics 2001 1189–1232
[202] XGBoost Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining 2016 785–794
[203] Mathematical theory of deep learning arXiv preprint arXiv:2407.18384 2024
[204] The perceptron: a probabilistic model for information storage and organization in the brain. Psychological review 1958 65 6 386
[205] Untersuchungen zu dynamischen neuronalen Netzen Diploma, Technische Universität München 1991
[206] Learning long-term dependencies with gradient descent is difficult IEEE transactions on neural networks 1994 5 2 157–166
[207] KAN: arXiv preprint arXiv:2404.19756 2024
[208] Universal approximation of an unknown mapping and its derivatives using multilayer feedforward networks Neural networks 1990 3 5 551–560
[209] Approximation capabilities of multilayer feedforward networks Neural networks 1991 4 2 251–257
[210] Approximation by superpositions of a sigmoidal function Mathematics of control, signals and systems 1989 2 4 303–314
[211] Approximation theory of the MLP model in neural networks Acta numerica 1999 8 143–195
[212] Universal approximation bounds for superpositions of a sigmoidal function IEEE Transactions on Information theory 2002 39 3 930–945
[213] Approximation properties of a multilayered feedforward artificial neural network Advances in Computational Mathematics 1993 1 1 61–80
[214] Nonlinear approximation Acta numerica 1998 7 51–150
[215] Approximation of infinitely differentiable multivariate functions is intractable Journal of Complexity 2009 25 4 398–404
[216] Why and when can deep-but not shallow-networks avoid the curse of dimensionality: a review International Journal of Automation and Computing 2017 14 5 503–519
[217] Error bounds for approximations with deep ReLU networks Neural networks 2017 94 103–114
[218] Benefits of depth in neural networks Conference on learning theory 2016 1517–1539 PMLR
[219] Understanding deep learning requires rethinking generalization arXiv preprint arXiv:1611.03530 2016
[220] Understanding deep learning (still) requires rethinking generalization Communications of the ACM 2021 64 3 107–115
[221] Reconciling modern machine-learning practice and the classical bias–variance trade-off Proceedings of the National Academy of Sciences 2019 116 32 15849–15854
[222] Neural ordinary differential equations Advances in neural information processing systems 2018 31
[223] Adagrad stepsizes: Sharp convergence over nonconvex landscapes Journal of Machine Learning Research 2020 21 219 1–30
[224] The marginal value of adaptive gradient methods in machine learning Advances in neural information processing systems 2017 30
[225] Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position Biological cybernetics 1980 36 4 193–202
[226] Gradient-based learning applied to document recognition Proceedings of the IEEE 2002 86 11 2278–2324
[227] Learning deep features for discriminative localization Proceedings of the IEEE conference on computer vision and pattern recognition 2016 2921–2929
[228] TorchCAM March 2020
[229] Imagenet classification with deep convolutional neural networks Advances in Neural Information Processing Systems 2012 25
[230] You only look once: Unified, real-time object detection Proceedings of the IEEE conference on computer vision and pattern recognition 2016 779–788
[231] Fully convolutional networks for semantic segmentation Proceedings of the IEEE conference on computer vision and pattern recognition 2015 3431–3440
[232] U-net: Convolutional networks for biomedical image segmentation International Conference on Medical image computing and computer-assisted intervention 2015 234–241 Springer
[233] The graph neural network model IEEE transactions on neural networks 2008 20 1 61–80
[234] Semi-Supervised Classification with Graph Convolutional Networks International Conference on Learning Representations (ICLR) 2017
[235] Convolutional neural networks on graphs with fast localized spectral filtering Advances in Neural Information Processing Systems 2016 3837–3845
[236] Neural relational inference for interacting systems International conference on machine learning 2018 2688–2697 Pmlr
[237] Molecular graph convolutions: moving beyond fingerprints Journal of computer-aided molecular design 2016 30 8 595–608
[238] Molecular generative graph neural networks for drug discovery Neurocomputing 2021 450 242–252
[239] Protein interface prediction using graph convolutional networks Advances in neural information processing systems 2017 30
[240] Graph neural networks: A review of methods and applications AI open 2020 1 57–81
[241] Learning phrase representations using RNN encoder-decoder for statistical machine translation arXiv preprint arXiv:1406.1078 2014
[242] Long short-term memory Neural Computation 1997 9 8 1735–1780
[243] Attention is all you need Advances in neural information processing systems 2017 30
[244] An introduction to transformers arXiv preprint arXiv:2304.10557 2023
[245] Efficient estimation of word representations in vector space arXiv preprint arXiv:1301.3781 2013
[246] BERT Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, volume 1 (long and short papers) 2019 4171–4186
[247] Improving language understanding by generative pre-training 2018 OpenAI
[248] Gemini: a family of highly capable multimodal models arXiv preprint arXiv:2312.11805 2023
[249] {The {Claude} 3 Model Family: {Opus} 2024
[250] Are transformers universal approximators of sequence-to-sequence functions? arXiv preprint arXiv:1912.10077 2019
[251] Reducing the dimensionality of data with neural networks science 2006 313 5786 504–507
[252] Representation learning: A review and new perspectives IEEE transactions on pattern analysis and machine intelligence 2013 35 8 1798–1828
[253] Neural networks and principal component analysis: Learning from examples without local minima Neural networks 1989 2 1 53–58
[254] Auto-encoding Variational Bayes International Conference on Learning Representations ICLR2014) 2014
[255] An introduction to variational autoencoders Foundations and Trends\textregistered in Machine Learning 2019 12 4 307–392
[256] End-to-end optimized image compression arXiv preprint arXiv:1611.01704 2016
[257] Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. Journal of machine learning research 2010 11 12
[258] Variational autoencoder based anomaly detection using reconstruction probability Special lecture on IE 2015 2 1 1–18
[259] Automatic chemical design using a data-driven continuous representation of molecules ACS central science 2018 4 2 268–276
[260] Extracting a biologically relevant latent space from cancer transcriptomes with variational autoencoders Pacific Symposium on Biocomputing 2018: Proceedings of the Pacific Symposium 2018 80–91 World Scientific
[261] Multimodal Deep Learning for ARDS Detection 2025
[262] Score-based generative modeling through stochastic differential equations arXiv preprint arXiv:2011.13456 2020
[263] Denoising diffusion probabilistic models Advances in neural information processing systems 2020 33 6840–6851
[264] Diffusion autoencoders: Toward a meaningful and decodable representation Proceedings of the IEEE/CVF conference on computer vision and pattern recognition 2022 10619–10629
[265] High-resolution image synthesis with latent diffusion models Proceedings of the IEEE/CVF conference on computer vision and pattern recognition 2022 10684–10695
[266] On estimation of a probability density function and mode The annals of mathematical statistics 1962 33 3 1065–1076
[267] Towards a theoretical foundation for Laplacian-based manifold methods International conference on computational learning theory 2005 486–500 Springer
[268] From graphs to manifolds–weak and strong pointwise consistency of graph Laplacians International Conference on Computational Learning Theory 2005 470–485 Springer
[269] From graph to manifold Laplacian: The convergence rate Applied and Computational Harmonic Analysis 2006 21 1 128–134
[270] Convergence of Laplacian eigenmaps Advances in neural information processing systems 2006 19
[271] Empirical graph Laplacian approximation of Laplace-Beltrami operators: large sample results Lecture Notes-Monograph Series 2006 238–259
[272] Spectral convergence of the connection Laplacian from random samples Information and Inference: A Journal of the IMA 2017 6 1 58–123
[273] A variational approach to the consistency of spectral clustering Applied and Computational Harmonic Analysis 2018 45 2 239–281
[274] Error estimates for spectral convergence of the graph Laplacian on random geometric graphs toward the Laplace–Beltrami operator Foundations of Computational Mathematics 2020 20 4 827–887
[275] Improved spectral convergence rates for graph Laplacians on \( \varepsilon\) -graphs and k-NN graphs Applied and Computational Harmonic Analysis 2022 60 123–175
[276] Diffusion maps, spectral clustering and reaction coordinates of dynamical systems Applied and Computational Harmonic Analysis 2006 21 1 113–127
[277] Doubly stochastic normalization of the gaussian kernel is robust to heteroskedastic noise SIAM journal on mathematics of data science 2021 3 1 388–413
[278] Bi-stochastically normalized graph Laplacian: convergence to manifold Laplacian and robustness to outlier noise Information and Inference: A Journal of the IMA 2024 13 4 iaae026
[279] Self-tuning spectral clustering Advances in neural information processing systems 2004 17
[280] Variable bandwidth diffusion kernels Applied and Computational Harmonic Analysis 2016 40 1 68–96
[281] Manifold learning with arbitrary norms Journal of Fourier Analysis and Applications 2021 27 5 82
[282] Manifold learning in metric spaces Applied and Computational Harmonic Analysis 2026 80 101813 https://doi.org/10.1016/j.acha.2025.101813
[283] Can one hear the shape of a drum? The American Mathematical Monthly 1966 73 4P2 1–23
[284] Embedding Riemannian manifolds by their heat kernel Geometric & Functional Analysis GAFA 1994 4 4 373–398
[285] A Cheeger Inequality for the Graph Connection Laplacian SIAM J. Matrix Anal. Appl. 2013 34 4 1611–1630
[286] Multiscale Estimation of Intrinsic Dimensionality of Data Sets Manifold Learning and its Applications 2009
[287] Orientability and Diffusion Maps Appl. Comput. Harmon. Anal. 2011 31 1 44–58
[288] Finding the homology of submanifolds with high confidence from random samples Discrete & Computational Geometry 2008 39 1 419–441
[289] Topology and data Bulletin of the American Mathematical Society 2009 46 2 255–308
[290] Theory of ordinary differential equations McGraw Hill 1955
[291] Biharmonic Distance ACM Transactions on Graphics 2010 29 3 June
[292] Improved Approximation Algorithms for Maximum Cut and Satisfiability Problems Using Semidefine Programming Journal of the Association for Computing Machinery 1995 42 1115–1145
[293] On the power of unique 2-prover 1-round games Thiry-fourth annual ACM symposium on Theory of computing 2002
[294] Subexponential algorithms for unique games and related problems Journal of the ACM (JACM) 2015 62 5 1–25
[295] Optimal Inapproximability Results for MAX-CUT and Other 2-Variable CSPs? SIAM Journal on Computing 2007 37 1 319–357
[296] Optimal Algorithms and Inapproximability Results for Every CSP? Proceedings of the Fortieth Annual ACM Symposium on Theory of Computing 2008 STOC '08 245–254 ACM
[297] Some optimal inapproximability results Journal of the ACM 2001 48 4 798–859
[298] Sum-of-Squares Proofs and the Quest toward Optimal Algorithms Survey, ICM 2014 2014
[299] Sum of Squares Upper Bounds, Lower Bounds, and Open Questions Available online at http://www.boazbarak.org/sos/files/all-notes.pdf 2014
[300] Structured semidefinite programs and semialgebraic geometry methods in robustness and optimization California Institute of Technology 2000
[301] Global Optimization with Polynomials and the Problem of Moments SIAM Journal on Optimization 2001 11 3 796–817
[302] An approach to obtaining global extremums in polynomial mathematical programming problems Cybernetics and Systems Analysis 1987 23 5 695–700
[303] Squared functional systems and optimization problems High performance optimization 2000 13 405-440
[304] Around Hilbert's 17th Problem Documenta Mathematica - Extra Volume ISMP 2012 433–438
[305] A Nullstellensatz and a Positivstellensatz in semialgebraic geometry Math. Ann. 207 1974 207 87–97
[306] Semialgebraic Proofs and Efficient Algorithm Design Foundations and Trends in Theoretical Computer Science 2019 14 1-2 1-221 10.1561/0400000086
[307] High-dimensional estimation from sum-of-squares proofs ICM 2018
[308] The Unique Games Conjecture, Integrality Gap for Cut Problems and Embeddability of Negative Type Metrics into L1 Available online at arXiv:1305.4581 [cs.CC] 2013
[309] Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications Phys. Rev. E 2011 84 December
[310] Stochastic Block Models and Reconstruction Probability Theory and Related Fields (to appear) 2014
[311] A Proof Of The Block Model Threshold Conjecture Available online at arXiv:1311.4115 [math.PR] 2014 January
[312] Community Detection Thresholds and the Weak Ramanujan Property Proceedings of the 46th Annual ACM Symposium on Theory of Computing 2014 STOC '14 694–703 ACM 10.1145/2591796.2591857
[313] Phase transitions in semisupervised clustering of sparse networks Phys. Rev. E 2014 90
[314] Detectability thresholds and optimal algorithms for community structure in dynamic networks Available online at arXiv:1506.06179 [stat.ML] 2015
[315] Detection in the stochastic block model with multiple clusters: proof of the achievability conjectures, acyclic BP, and the information-computation gap Available online at arXiv:1512.09080 [math.PR] 2015
[316] Exact Recovery in the Stochastic Block Model IEEE Transactions on Information Theory 2016 62 1 417–487
[317] A note on Probably Certifiably Correct algorithms Comptes Rendus Mathematique, to appear 2016
[318] User-Friendly Tail Bounds for Sums of Random Matrices Foundations of Computational Mathematics 2012 12 4 389-434
[319] Random Laplacian Matrices and Convex Relaxations Available online at arXiv:1504.03987 [math.PR] 2015
[320] Achieving Exact Cluster Recovery Threshold via Semidefinite Programming Available online at arXiv:1412.6156 2014
[321] Sharp nonasymptotic bounds on the norm of random matrices with independent entries Annals of Probability, to appear 2015
[322] Entrywise Eigenvector Analysis of Random Matrices with Low Expected Rank Available online at arXiv:1709.09565 2017
[323] {Strong Consistency, Graph {Laplacians} arXiv preprint arXiv:2004.09780 2020
[324] Certifying global optimality of graph cuts via semidefinite relaxation: A performance guarantee for spectral clustering Foundations of Computational Mathematics 2020 20 3 367–421
[325] A performance guarantee for spectral clustering SIAM Journal on Mathematics of Data Science 2021 3 1 369–387
[326] Strong consistency, graph laplacians, and the stochastic block model Journal of Machine Learning Research 2021 22 117 1–44
[327] Nonasymptotic Random Matrix Theory St Flour Lecture Notes 2022
[328] On a formula for the product-moment coefficient of any order of a normal frequency distribution in any number of variables Biometrika 1918 12 1/2 134–139
[329] The evaluation of the collision matrix Physical review 1950 80 2 268
[330] Concentration of measure and isoperimetric inequalities in product spaces Inst. Hautes Etudes Sci. Publ. Math. 1995 81 73–205
[331] About the constants in Talagrand's concentration inequalities for empirical processes The Annals of Probability 2000 28 2
[332] Some inequalities for Gaussian processes and applications Israel J. Math 1985 50 109–110
[333] On Milman's inequality and random subspaces which escape through a mesh in \( {\mathbb R}^n\) Geometric Aspects of Functional Analysis: Israel Seminar (GAFA) 1986–87 2006 84–106 Springer
[334] Blog post: “Note to Self: Norm of a Gaussian Random Vector'' 2023
[335] Short, Fat Matrices BLOG: Gordon's escape through a mesh theorem 2014
[336] Notes on Computational Hardness of Hypothesis Testing: Predictions Using the Low-Degree Likelihood Ratio Mathematical Analysis, its Applications and Computation: ISAAC 2019, Aveiro, Portugal, July 29–August 2 Springer 2022 Paula Cerejeiras and Michael Reissig 385 Springer Proceedings in Mathematics & Statistics 1–50 Cham 10.1007/978-3-030-97127-4_1
[337] Orthogonal Polynomials American Mathematical Society 1975 23 American Mathematical Society Colloquium Publications Providence, RI 4th
[338] The Expected Norm of a Sum of Independent Random Matrices: An Elementary Approach High Dimensional Probability VII 2016 {Houdré, Christian and Mason, David M. and Reynaud-Bouret, Patricia and Rosi{ń}ski 173–202 Springer International Publishing
[339] An Introduction to Matrix Concentration Inequalities Foundations and Trends in Machine Learning 2015
[340] Introduction to operator space theory Cambridge University Press, Cambridge 2003 294 London Mathematical Society Lecture Note Series 10.1017/CBO9781107360235
[341] The dimension-free structure of nonhomogeneous random matrices Inventiones mathematicae 2018 214 3 1031–1080
[342] Matrix concentration inequalities and free probability Inventiones Mathematicae 2023 234 1 419–487
[343] Extremal random matrices with independent entries and matrix superconcentration inequalities Annals of Probability 2026 54 669–704
[344] Universality and sharp matrix concentration inequalities Geometric and Functional Analysis 2024 34 6 1734–1838
[345] Second-order matrix concentration inequalities In preparation 2015
[346] Upper and Lower Bounds for Stochastic Processes: Modern Methods and Classical Problems Springer Berlin Heidelberg 2014 Ergebnisse der Mathematik und ihrer Grenzgebiete. 3. Folge / A Series of Modern Surveys in Mathematics
[347] A Geometric Perspective on the Injective Norm of Sums of Random Tensors Available online at arXiv:2411.10633 [math.PR] 2024
[348] Lectures on the combinatorics of free probability London Mathematical Society Lecture Note Series, Cambridge University Press 2006 335
[349] Operator Khintchine inequality in non-commutative probability Mathematische Annalen 2001 319
[350] Limit laws for random matrices and free products Inventiones mathematicae 1991 104 1 201–220 10.1007/BF01245072
[351] A new application of random matrices: \( {\mathrm Ext}(C^*_{\mathrm{red}}(F_2))\) is not a group Annals of Mathematics 2005 162 2 711–775 10.4007/annals.2005.162.711
[352] Robust uncertainty principles: exact signal reconstruction from highly incomplete frequency information IEEE Trans. Inform. Theory 2006 52 489–509
[353] Stable signal recovery from incomplete and inaccurate measurements Comm. Pure Appl. Math. 2006 59 1207–1223
[354] Decoding by linear programming IEEE Trans. Inform. Theory 2005 51 4203–4215
[355] Near optimal signal recovery from random projections: universal encoding strategies? IEEE Trans. Inform. Theory 2006 52 5406–5425
[356] Compressed sensing IEEE Trans. Inform. Theory 2006 52 1289–1306
[357] A Mathematical Introduction to Compressive Sensing Birkhauser 2013
[358] Sparse MRI: The application of compressed sensing for rapid MR imaging Magnetic Resonance in Medicine: An Official Journal of the International Society for Magnetic Resonance in Medicine 2007 58 6 1182–1195
[359] Compressed sensing for body MRI Journal of Magnetic Resonance Imaging 2017 45 4 966–987
[360] Improved pediatric MR imaging with compressed sensing Radiology 2010 256 2 607–616
[361] Sparse approximate solutions to linear systems SIAM journal on computing 1995 24 2 227–234
[362] The restricted isometry property and its implications for compressed sensing Comptes Rendus Mathematique 2008 346 9 589–592
[363] Near-ideal model selection by \( \ell_1\) minimization Annals of Statistics 2009 37 5A 2145–2177
[364] Observed universality of phase transitions in high-dimensional geometry, with implications for modern data analysis and signal processing Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences 2009 367 1906 4273–4293
[365] Living on the edge: Phase transitions in convex programs with random data Information and Inference: A Journal of the IMA 2014 3 3 224–294
[366] New and improved Johnson–Lindenstrauss embeddings via the restricted isometry property SIAM Journal on Mathematical Analysis 2011 43 3 1269–1281
[367] The restricted isometry property of subsampled Fourier matrices Geometric aspects of functional analysis: israel seminar (gafa) 2014–2016 2017 163–179
[368] Discrete uncertainty principles and sparse signal processing Available online at arXiv:1504.01014 [cs.IT] 2015
[369] Certifying the Restricted Isometry Property is Hard IEEE Trans. Inform. Theory 2013 59 6 3448–3450
[370] The Computational Complexity of the Restricted Isometry Property, the Nullspace Property, and Related Concepts in Compressed Sensing IEEE Trans. Inf. Theory 2014
[371] What's new BLOG: Open question: deterministic UUP matrices 2007
[372] The Road to Deterministic Matrices with the Restricted Isometry Property Journal of Fourier Analysis and Applications 2013 19 6 1123-1149
[373] Derandomizing restricted isometries via the Legendre symbol Available online at arXiv:1406.4089 [math.CO] 2014
[374] A conditional construction of restricted isometries Available online at arXiv:1410.6457 [math.FA] 2014
[375] Explicit Constructions of RIP Matrices and Related Problems Duke Mathematical Journal 2011 159 1
[376] Explicit Matrices with the Restricted Isometry Property: Breaking the Square-Root Bottleneck available online at arXiv:1403.3427 [math.FA] 2014
[377] The convex geometry of linear inverse problems Foundations of Computational mathematics 2012 12 6 805–849
[378] On sparse representations in arbitrary redundant bases Information Theory, IEEE Transactions on 2004 50 6 1341-1344
[379] Recovery of short, complex linear combinations via \( \ell_1\) minimization IEEE Transactions on Information Theory 2005 4 1568–1570
[380] Analysis of sparse MIMO radar Applied and Computational Harmonic Analysis 2014 37 3 361–388
[381] Accurate imaging of moving targets via random sensor arrays and Kerdock codes Inverse Problems 2013 29 8 085001
[382] Compressive imaging: structure, sampling, learning Cambridge University Press 2021
[383] Undersampled radial MRI with multiple coils. Iterative image reconstruction using a total variation constraint Magnetic Resonance in Medicine: An Official Journal of the International Society for Magnetic Resonance in Medicine 2007 57 6 1086–1098
[384] Auto-calibration and biconvex compressive sensing with applications to parallel MRI arXiv preprint arXiv:2401.10400 2024
[385] From theory to practice: Sub-Nyquist sampling of sparse wideband analog signals IEEE Journal of selected topics in signal processing 2010 4 2 375–391
[386] High-resolution radar via compressed sensing IEEE Transactions on Signal Processing 2009 57 6 2275–2284
[387] Sparsity and compressed sensing in radar imaging Proceedings of the IEEE 2010 98 6 1006–1020
[388] On sparse reconstruction from Fourier and Gaussian measurements Communications on Pure and Applied Mathematics 2008 61 8 1025–1045
[389] Refined analysis of sparse MIMO radar Journal of Fourier Analysis and Applications 2017 23 3 485–529
[390] Grassmannian frames with applications to coding and communications Appl. Comput. Harmon. Anal. 2003 14 3 257–275
[391] An introduction to frames and Riesz bases Birkhäuser 2003 Boston
[392] Finite Frames: Theory and Applications Birkhaeuser 2012
[393] An introduction to finite tight frames Springer 2018
[394] Bounds for systems of lines and Jacobi poynomials Philips Res. Repts 1975 30 3 \( 91^*\) –\( 105^*\) Issue in honour of C.J. Bouwkamp
[395] Lower bounds on the maximum cross correlation of signals (corresp.) IEEE Transactions on Information theory 2003 20 3 397–399
[396] Quantendesigns: Grundzüge einer nichtcommutativen Designtheorie University of Vienna 1999
[397] SIC-POVMs: A new computer study J. Math. Phys. 2010
[398] Tight frames, Hadamard matrices and Zauner’s conjecture Journal of Physics A: Mathematical and Theoretical 2019 52 29 295301
[399] Optimal state-determination by mutually unbiased measurements Annals of Physics 1989 191 2 363–381
[400] On mutually unbiased bases International journal of quantum information 2010 8 04 535–640
[401] A new proof for the existence of mutually unbiased bases Algorithmica 2002 34 512–528
[402] {\( {\mathbb Z}_4\) -{K}erdock codes Proceedings of the London Mathematical Society 1997 75 2 436–480
[403] Complex sequences with low periodic correlations (Corresp.) IEEE Transactions on Information Theory 1980 26 3 350–354
[404] On the Conditioning of Random Subdictionaries Appl. Comput. Harmon. Anal. 2008 25 1–24
[405] Remote sensing via \( \ell_1\) -minimization Foundations of Computational Mathematics 2014 14 1 115–150
[406] Sparse adaptive representations for musical signals Signal processing methods for music transcription Springer 2006 65–98
[407] Signal processing with lapped transforms Artech House, Inc. 1992
[408] A wavelet tour of signal processing: The sparse way, 3rd edition Academic Press 2009
[409] Astronomical image representation by the curvelet transform Astronomy & Astrophysics 2003 398 2 785–800
[410] Realistic analytical phantoms for parallel magnetic resonance imaging IEEE Transactions on Medical Imaging 2011 31 3 626–636
[411] Symmetric informationally complete quantum measurements Journal of Mathematical Physics 2004 45 6 2171–2180
[412] Why are big data matrices approximately low rank? SIAM Journal on Mathematics of Data Science 2019 1 1 144–160
[413] High-dimensional data analysis with low-dimensional models: Principles, computation, and applications Cambridge University Press 2022
[414] Matrix factorization techniques for recommender systems Computer 2009 42 8 30–37
[415] Statistical methods for recommender systems Cambridge University Press 2016
[416] Generalized low rank models Foundations and Trends\textregistered in Machine Learning 2016 9 1 1–118
[417] The Netflix Prize Proceedings of KDD Cup and Workshop 2007
[418] Quantum state tomography via compressed sensing Physical review letters 2010 105 15 150401
[419] Prediction and clustering in signed networks: a local to global perspective The Journal of Machine Learning Research 2014 15 1 1177–1213
[420] Link prediction via matrix factorization Joint european conference on machine learning and knowledge discovery in databases 2011 437–452 Springer
[421] Localization from incomplete noisy distance measurements Foundations of Computational Mathematics 2013 13 3 297–345
[422] Euclidean distance matrices: essential theory, algorithms, and applications IEEE Signal Processing Magazine 2015 32 6 12–30
[423] Phase retrieval via matrix completion SIAM J. Imag. Sci. 2013 6 1 199–225
[424] Blind deconvolution using convex programming IEEE Transactions on Information Theory 2013 60 3 1711–1732
[425] Self-calibration and biconvex compressive sensing Inverse Problems 2015 31 11 115002
[426] Matrix rank minimization with applications PhD thesis, Stanford University 2002
[427] A rank minimization heuristic with application to minimum order system approximation Proceedings of the 2001 American control conference.(Cat. No. 01CH37148) 2001 6 4734–4739 IEEE
[428] Exact matrix completion via convex optimization Foundations of Computational Mathematics 2009 9 6 717–772
[429] Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization SIAM review 2010 52 3 471–501
[430] Convex recovery of a structured signal from independent random linear measurements Sampling theory, a renaissance 2015 67–101
[431] Low rank matrix recovery from rank one measurements Applied and Computational Harmonic Analysis 2017 42 1 88–116
[432] Universality in learning from linear measurements Advances in Neural Information Processing Systems 2019 32
[433] Proof methods for robust low-rank matrix recovery Compressed sensing in information processing Springer 2022 37–75
[434] Introduction to the non-asymptotic analysis of random matrices arXiv preprint arXiv:1011.3027 2010
[435] Learning without concentration Journal of the ACM (JACM) 2015 62 3 1–25
[436] Bounding the smallest singular value of a random matrix without concentration International Mathematics Research Notices 2015 2015 23 12991–13008
[437] Exact matrix completion via convex optimization Foundations of Computational Mathematics 2009 9 6 717–772
[438] Recovering low-rank matrices from few coefficients in any basis IEEE Transactions on Information Theory 2011 57 3 1548–1566
[439] The power of convex relaxation: Near-optimal matrix completion IEEE transactions on information theory 2010 56 5 2053–2080
[440] Matrix completion with noise Proceedings of the IEEE 2010 98 6 925–936
[441] Matrix completion from a few entries IEEE transactions on information theory 2010 56 6 2980–2998
[442] Robust principal component analysis? Journal of the ACM (JACM) 2011 58 3 1–37
[443] Tensor completion and low-n-rank tensor recovery via convex optimization Inverse problems 2011 27 2 025010
[444] Tensor completion for estimating missing values in visual data IEEE transactions on pattern analysis and machine intelligence 2012 35 1 208–220
[445] Incoherence-optimal matrix completion IEEE Transactions on Information Theory 2015 61 5 2909–2923
[446] Quantum computation and quantum information Cambridge University Press 2010
[447] Quantum state estimation Springer Science & Business Media 2004 649
[448] Photonic state tomography Advances in atomic, molecular, and optical physics 2005 52 105–159
[449] Phase retrieval in crystallography and optics J. Opt. Soc. Am. A. 1990 7 394–-411
[450] Phase problem in crystallography J. Opt. Soc. Am. A 10 5 1045–1055
[451] A practical algorithm for the determination of phase from image and diffraction plane pictures Optik 1972 35 237–246
[452] The question of phase retrieval in optics Opt. Acta 10 (1963) 41–49 1963
[453] Phase retrieval-based coherent receivers: Signal design and degrees of freedom Journal of Lightwave Technology 2022 40 5 1296–1307
[454] {The {P}auli problem Rep. Math. Phys. 2006 57 53–68
[455] Phase retrieval and image reconstruction for astronomy Image Recovery: Theory and Application Academic Press 1987 H. Stark New York
[456] Ptychographic X-ray computed tomography at the nanoscale Nature 2010 467 7314 436–439
[457] Potential for biomolecular imaging with femtosecond X-ray pulses Nature 2000 406 6797 752–757
[458] Femtosecond time-delay X-ray holography Nature 2007 448 7154 676–679
[459] The Numerics of Phase Retrieval Acta Numerica 2020 29 125–228
[460] Painless reconstruction from magnitudes of frame coefficients Journal of Fourier Analysis and Applications 2009 15 4 488–501
[461] PhaseLift Communications on Pure and Applied Mathematics 2013 66 8 1241–1274
[462] On signal reconstruction without phase Applied and Computational Harmonic Analysis 2006 20 3 345–356
[463] Saving phase: Injectivity and stability for phase retrieval Applied and Computational Harmonic Analysis 2014 37 1 106–125
[464] Solving quadratic equations via PhaseLift when there are about as many equations as unknowns Foundations of Computational Mathematics 2014 14 5 1017–1026
[465] Phase retrieval from coded diffraction patterns Applied and Computational Harmonic Analysis 2015 39 2 277–299
[466] A partial derandomization of phaselift using spherical designs Journal of Fourier Analysis and Applications 2015 21 2 229–266
[467] Recovery Performance of PhaseLift for Phase Retrieval from Coded Diffraction Patterns arXiv preprint arXiv:2509.10300 2025
[468] Templates for convex cone problems with applications to sparse signal recovery Mathematical programming computation 2011 3 3 165–218
[469] A nonlinear programming algorithm for solving semidefinite programs via low-rank factorization Mathematical programming 2003 95 2 329–357
[470] Low-rank matrix completion using alternating minimization Proceedings of the forty-fifth annual ACM symposium on Theory of computing 2013 665–674
[471] Large-scale parallel collaborative filtering for the Netflix prize International conference on algorithmic applications in management 2008 337–348 Springer
[472] Low-rank matrix completion by Riemannian optimization SIAM Journal on Optimization 2013 23 2 1214–1236
[473] Optimization algorithms on matrix manifolds Princeton University Press 2008
[474] A singular value thresholding algorithm for matrix completion SIAM Journal on optimization 2010 20 4 1956–1982
[475] Phase retrieval via Wirtinger flow: Theory and algorithms IEEE Transactions on Information Theory 2015 61 4 1985–2007
[476] Low-rank Matrix Completion Using Alternating Minimization Proceedings of the Forty-fifth Annual ACM Symposium on Theory of Computing 2013 STOC '13 665–674
[477] Global optimality of local search for low rank matrix recovery Advances in Neural Information Processing Systems 2016 29
[478] No spurious local minima in nonconvex low rank problems: A unified geometric analysis International conference on machine learning 2017 1233–1242 PMLR