Flat minima generalize for low-rank matrix recovery
Lijun Ding, Dmitriy Drusvyatskiy, Maryam Fazel, Zaid Harchaoui
Introduction
Recent advances in machine learning and artificial intelligence have relied on fitting highly overparameterized models, notably deep neural networks, to observed data tan2019efficientnet ; kolesnikov2020big ; huang2019gpipe ; zhang2021understanding . In such settings, the number of parameters of the model is much greater than the number of data samples, thereby resulting in models that achieve near-zero training error. Although classical learning paradigms caution against overfitting, recent work suggests ubiquity of the “double descent” phenomenon belkin2019reconciling , wherein significant overparameterization actually improves generalization. There is an important caveat, however, that is worth emphasizing. There is typically a continuum of models with zero training error; some of these models generalize well and some do not. Reassuringly, there is evidence that basic algorithms, such as the stochastic gradient method, are implicitly biased towards finding models that do generalize; see for example soudry2018implicit ; gunasekar2018implicitNN ; jacot2018neural ; heckel2020compressive ; jastrzkebski2017three ; smith2017bayesian ; hoffer2017train ; masters2018revisiting ; neyshabur2014search ; gunasekar2018implicit ; du2018algorithmic ; mulayoff2020unique . Other seminal works bartlett1998sample ; bartlett2002rademacher ; neyshabur2017exploring seeking to explain generalization have focused on quantifying stability, capacity, and margin bounds. Understanding generalization of overparameterized models remains an active area of research, and is the topic of our work.
Do flat minimizers generalize for a broad family of overparameterized problems?
Putting generalization aside, one would hope that flat solutions are in some sense regular, occurring in a benign region where algorithms perform well. For example, numerical methods for neural network training are strongly influenced by how balanced the parameters appear. Namely, the set of interpolating neural networks contains models with consecutive weight matrices that are poorly scaled relative to each other du2018algorithmic ; shamir2018resnets . It has recently been shown that gradient descent in continuous time keeps the factors balanced ye2021global ; ma2021beyond for matrix factorization and for deep learning du2018algorithmic ; mulayoff2020unique . Despite ubiquity of the three notions discussed so far—small norm, flatness, and balancedness—the exact relationship between them is unclear. Thus our secondary question is as follow:
Are flat minimizers nearly norm-minimal and nearly balanced for a broad family of overparameterized problems?
We answer both questions in the setting of low-rank matrix factorization—a prototypical problem class often used to gain insight into more general deep learning models li2018algorithmic ; du2018algorithmic ; ye2021global . Setting the stage, consider a ground truth matrix with rank . The goal is to recover from the observed measurements under a linear measurement map . A common approach to this task is through the nonconvex optimization problem:
The set of minimizers of , which we denote by , consists of all solutions to the equation . In order to model overparameterization, we focus on the rank-overparameterized setting ; indeed can be arbitrarily large. The three notions discussed so for can be formally defined for pairs as follows.
is norm-minimal if it minimizes over the square Frobenius norm \mathopen{}\mathclose{{}\left\|L}\right\|_{\mbox{\tiny{F}}}^{2}+\mathopen{}\mathclose{{}\left\|R}\right\|_{\mbox{\tiny{F}}}^{2}.
is balanced if it satisfies .
is flat if it minimizes over the “scaled trace” of the Hessian, .
Thus being norm-minimal means that is the closest pair from to the origin in Frobenius norm. Being balanced amounts to requiring and to have the same singular values and right-singular vectors. Flat solutions are defined in terms of the “scaled trace” of the bilinear form defined as
For various statistical models, flat solutions of (1) exactly recover . Moreover, flat solutions have nearly minimal norm and are almost balanced.
The exact recovery guarantee may be striking at first because flat solutions are distinct from minimal norm solutions, and thus do not correspond to nuclear norm minimization over . Yet, our main result shows that flat solutions do exactly recover the ground truth under standard statistical assumptions. The precise statistical models for which this is the case are matrix and bilinear sensing, robust PCA (or PCA with outliers), covariance matrix estimation, and single hidden layer neural networks with quadratic activation functions. Moreover, we prove weak recovery for the matrix completion problem, though our numerical experiments suggest that exact recovery holds here as well.
2 Main results and outline of the paper
We next outline our main results and the arguments that underpin them. We begin in Section 2 with the idealized “population level” setting where is the identity map. In this case, we show that there is no distinction between flat, norm-minimal, and balanced solutions. As soon as deviates from the identity, however, all three notions become distinct in general.
We will show in Theorem 3.2 that flat solutions can be identified with minimizers of the problem
It is worthwhile to note that without the and matrices and without the rank constraint, the problem (4) is classically known to characterize norm-minimal solutions and is known as nuclear norm minimization. Herein, we already see the distinction between the two solution concepts. A natural convex relaxation for flat solutions simply drops the rank constraint:
Summarizing, verifying that flat solutions exactly recover is reduced to showing that (which has rank ) is the unique solution of the convex problem (5).
Suppose that is generated according to a Gaussian matrix sensing or bilinear sensing model. Then as long as we are in the regime and , with high probability, any flat solution satisfies and is nearly norm-minimal and nearly balanced.
Note that our requirement on the sample size matches the known regime for exact recovery with nuclear norm minimization candes2011tight ; cai2015rop . Since we are interested in the high dimensional regime, the extra condition can be assumed without harm. Appendix A presents a generalization of this result when the measurements are corrupted by noise.
Suppose that is generated from the Bernoulli matrix completion model with success probability and let be the incoherence parameter of .See (34) for the definition of the incoherence parameter . Then provided we are in the regime , with high probability, any flat solution satisfies \mathopen{}\mathclose{{}\left\|L_{f}R_{f}^{\top}-M_{\natural}}\right\|_{*}\leq\gamma\mathopen{}\mathclose{{}\left\|M_{\natural}}\right\|_{*} and is nearly norm-minimal and nearly balanced.
Hence according to this theorem, in order to conclude that flat solutions achieve a constant relative error, we must be in the regime . This is a stronger requirement than is needed for exact recovery of the ground truth matrix by nuclear norm minimization chen2015incoherence , which is . We stress, however, that our numerical results suggest that flat solutions exactly recovery the ground truth matrix in this wider parameter regime.
We next focus on the problem of Robust Principal Component Analysis (PCA) in Section 6. Though this problem is not of the form (1), we will see that flat solutions (appropriately defined) exactly recover the ground truth under reasonable assumptions. Specifically, following candes2011robust ; chandrasekaran2011rank , the robust PCA problem asks to find a low-rank matrix that has been corrupted by sparse noise . Thus, we observe a matrix of the form
where the matrix is assumed to have at most nonzero entries in any column and in any row. A popular formulation of the problem (see (ha2020equivalence, , Eqn. (19)), (ge2017no, , Eqn. (6))) takes the form
Let be the strong incoherence parameter of . See (48) for the definition of the strong incoherence parameter . Then, in the regime , any flat minimizer satisfies .
Section 7 analyzes the last problem class of the paper, motivated by the problems of covariance matrix estimation and training of shallow neural networks. Setting the stage, consider a ground truth matrix satisfying
where . Note that in the special case , this problem reduces to covariance matrix estimation chen2015exact and further reduces to phase retrieval when candes2013phaselift . The added generality allows to also model shallow neural networks with quadratic activation functions; see details below. A natural optimization formulation of the problem takes the form
where the sensing matrices are and for . Since , we declare a minimizer to be flat if it has minimal trace among all minimizers of (9). We prove the following.
In the regime and , with high probability, any flat solution of (9) satisfies .
with hidden weights and output layer weights , where , and . It is straightforward to see that by partitioning the matrix , this problem is exactly equivalent to recovering the matrix from the observations (8).
Section 8 numerically validates our theoretical results. Section 9 summarizes our findings and speculates about the role of depth on generalization properties of flat solutions.
Norm-minimal, flat, and balanced solutions with an identity measurement map
In this section, we focus on the idealized objective (1) where the measurement map is the identity:
We begin with the following lemma that provides a convenient expression for .
The second-order derivative of the function at any is the quadratic form:
A straightforward computation shows for any pair the expression
We are now ready to prove the claimed equivalence between the three properties.
Norm-minimal, flat, and balanced solutions of (11) all coincide.
First, the equivalence of flat and norm-minimal solutions follows directly from the expression (13) in Lemma 2.1. Next, we prove the equivalence between minimal norm and balanced solutions. Suppose is balanced. The equality implies that and have the same nonzero singular values and the same set of right singular vectors. Therefore, we may form compact singular value decompositions and . Since equality holds, we see that . Hence, the nuclear norm of is simply \mathopen{}\mathclose{{}\left\|M_{\natural}}\right\|_{*}=\mathop{\rm tr}(\Sigma^{2}). Noting the equality \frac{1}{2}\mathopen{}\mathclose{{}\left(\mathopen{}\mathclose{{}\left\|L}\right\|_{\mbox{\tiny{F}}}^{2}+\mathopen{}\mathclose{{}\left\|R}\right\|_{\mbox{\tiny{F}}}^{2}}\right)=\mathop{\rm tr}(\Sigma^{2}) along with (10), we deduce that is a minimal norm solution, as claimed. Conversely, suppose that is a minimal norm solution. Define the function
over the open set of invertible matrices . Clearly is a local minimizer of and therefore must be the zero matrix. A quick computation yields the expression and therefore is balanced, as claimed. ∎
Convex relaxation and regularity of flat solutions
In this section, we begin investigating flat minimizers of the problem (1) with general linear measurement maps . It will be convenient to write the linear map in coordinates as
The section presents two main results: Theorems 3.2 and 3.3. The former presents a convex relaxation for verifying that a solution is flat, while the latter shows that flat solutions are nearly balanced and nearly norm-minimal, whenever the matrices and are well-conditioned.
Flat solutions are by definition minimizers of the highly nonconvex problem The main result of this section is to present an appealing convex relaxation of this problem. We begin with a convenient expression for the scaled trace . Namely, recall that Lemma 2.1 showed the equality {\textrm{str}}(D^{2}f(L,R))=2\mathopen{}\mathclose{{}\left\|L}\right\|_{\mbox{\tiny{F}}}^{2}+2\mathopen{}\mathclose{{}\left\|R}\right\|_{\mbox{\tiny{F}}}^{2} in the simplified setting . Lemma 3.1 provides an analogous statement for general maps up to rescaling the factors by and .
The second-order derivative of the function at any is the quadratic form:
Moreover, the scaled trace can be written as
An elementary computation yields for any the expression
Noting that for any the first term on the right is zero yields the claimed expression (15). Next, we verify (16) by a direct calculation. To this end, the definition of the scaled trace (2) yields the expression
Let us analyze the second term on the right. Letting denote the ’th column of , we compute
A similar argument shows \mathopen{}\mathclose{{}\left\|D_{2}R}\right\|_{\mbox{\tiny{F}}}^{2}=\frac{1}{md_{1}}\sum_{i=1}^{d_{1}}\sum_{j=1}^{k}\mathopen{}\mathclose{{}\left\|\mathcal{A}(e_{i}e_{j}^{\top}R^{\top})}\right\|_{2}^{2}, completing the proof. ∎
In particular, Lemma 3.1 implies that flat solutions are exactly the minimizers of the problem
In turn, it follows directly from (10) that so long as , are invertible, the problem (19) is equivalent to minimizing the nuclear norm over rank constrained matrices:
Therefore, a natural convex relaxation for finding the flattest solution drops the rank constraint:
The following theorem summarizes these observations.
Suppose the matrices and are invertible. Then the problems (19) are (20) are equivalent in the following sense. Let .
the optimal values of (19) and (20) are equal,
if solves (19), then is a minimizer of (20).
if a solution of (20) has a singular value decomposition for some diagonal matrix with nonnegative entries, then the matrices and are minimizers of (19) when , and the matrices and are minimizers of (19) when .
Moreover, if is the unique minimizer of the problem (21), then any flat solution satisfies .
The three claims follow directly from making a variable substitution and and using (10). The “moreover” part follows from (21) being a convex relaxation of (20). ∎
Section 4 will verify that the convex relaxation (21) indeed recovers under restricted isometry properties on the measurement map , and therefore flat solutions exactly recover .
2 Regularity of flat solutions
In this section, we show that the condition numbers of the rescaling matrices and determine balancedness and norm minimality of flat solutions. The main result is the following theorem.
Suppose that there exist constants satisfying for each . Define the constant . Then any flat solution of (1) satisfies the following properties.
Norm-minimal: the pair is approximately norm-minimal:
Balanced: The pair is approximately balanced:
The proof of Theorem 3.3 relies on the following simple linear algebraic lemma.
Lemma 2.2 implies that the pair is balanced, meaning . Hence, we may decompose in the following way:
We bound the first term on the right as follows,
Here, and follow, respectively, from the basic inequalities: \mathopen{}\mathclose{{}\left\|FG}\right\|_{*}\leq\mathopen{}\mathclose{{}\left\|F}\right\|_{\mbox{\tiny{F}}}\mathopen{}\mathclose{{}\left\|G}\right\|_{\mbox{\tiny{F}}} and \|FG\|_{F}\leq\mathopen{}\mathclose{{}\left\|F}\right\|_{\mbox{\tiny{{op}}}}\mathopen{}\mathclose{{}\left\|G}\right\|_{\mbox{\tiny{F}}}, which hold for all matrices and with compatible dimensions. A similar argument yields the inequality
The claimed estimate (25) follows immediately. ∎
We first prove inequality (22). To this end, for any , we successively estimate:
where the second inequality follows from the characterization (19) of flat solutions. Taking the infimum over pairs completes the proof of (22).
We next verify (23). To this end, define the matrix . Then clearly is a minimizer of the problem
Lemma 3.4 therefore guarantees the estimate
The already established estimate (22) ensures
In particular, minimizing the right hand-side over satisfying yields an upper bound of 2\kappa^{2}\mathopen{}\mathclose{{}\left\|M_{\natural}}\right\|_{*}. The proof is complete. ∎
Flat minima under RIP conditions: matrix and bilinear sensing
We say that is a Gaussian ensemble if the entries of are i.i.d standard normal random variables .
We say that is a Gaussian bilinear ensemble if the matrices take the form where the entries of and are i.i.d. standard normal random variables
The main results of the section is the following theorem, stated here informally.
is a Gaussian ensemble and ,
is a Gaussian bilinear ensemble, , and .
Then with high probability, any flat solution of (1) satisfies and is nearly norm-minimal and nearly balanced:
We begin by formally defining the restricted isometry property of a measurement map .
holds for all matrices with rank at most .
Our goal is to show that under RIP conditions, with reasonable parameters, flat solutions exactly recover the ground truth . We will need the following lemma, whose proof is immediate from definitions.
The following lemma will be our main technical tool; it establishes that if satisfies RIP, then so does the perturbed map , provided that the condition numbers of the positive definite matrices and are sufficiently close to one.
Consider two positive definite matrices and constants satisfying for each . Define and let be a linear map satisfying one of the following conditions.
Then is the unique solution of the following convex program
In the proof of Lemma 3.1 (equation (18)), we actually showed the expression:
A similar argument shows that satisfies the analogous inequality with . ∎
Let be a Gaussian bilinear ensemble. Then there exist constant such that for any as long as we are in the regime and , the estimate holds:
First observe for each index . Bernstein’s inequality (vershynin2018high, , Theorem 2.8.3) implies
Taking a union bound, we can therefore be sure that with probability at least the estimate
holds simultaneously for all . In this event, we estimate
Therefore, after summing for we deduce
Concentration of covariance matrices (vershynin2018high, , Exercise 4.7.3) in turn implies that the estimate
holds with probability at least . Taking a union bound, we therefore deduce
holds with probability at least . Setting , we see that there is a constant such that as long as , we have
with probability at least . The result follows. ∎
The following are the two main results of the section.
Suppose that is a Gaussian ensemble. Then there exists a constant such that the following hold for any . There exist constants depending only on such that in the regime , with probability at least , any flat solution of (1) satisfies and is automatically nearly norm-minimal and nearly balanced:
Suppose that is a Gaussian bilinear ensemble. Then for any there exist numerical constants depending only on such that in the regime and , with probability at least any flat solution of (1) satisfies and is automatically nearly norm-minimal and nearly balanced:
Therefore in this regime, we may upper bound the condition number of and by . In light of Lemma 4.7, in order to ensure exact recovery, it remains to simply choose a large enough such that the inequality holds (recall are numerical constants). An application of Lemma 4.7 and Theorem 3.3 completes the proof. ∎
Appendix A generalizes the material in this section to the noisy observation setting, wherein with for some .
Matrix completion and approximate recovery
In this section, we focus on the matrix completion problem recht2011simpler ; candes2009exact . This is an instance of (1) where the linear measurement map is generated as follows. For each and , let be independent Bernoulli random variables with success probability . The linear map is then defined by the relation
The difficulty of recovering the matrix is typically measured by an incoherence parameter, which we now define. Given a singular value decomposition with , the incoherence parameter is the smallest satisfying
Suppose that is a random sampling map described in (33). Then there exist numerical constants such that the following is true. Given any , provided we are in the regime
with probability at least , any flat solution satisfies
Hence according to Theorem 5.1, in order to conclude that flat solutions achieve a constant relative error, we must be in the regime . This is a stronger requirement than is needed for exact recovery of the ground truth matrix chen2015incoherence , which is . Our numerical experiments, however, suggest that flat solutions exactly recover the ground truth.
As the first step towards proving Theorem 5.1, we estimate the condition numbers of , .
For any given and , as long as p\geq\frac{(1+c)\log\mathopen{}\mathclose{{}\left(d_{\max}}\right)}{2\delta^{2}d_{\min}}, with probability at least , the estimate
Let and set the sensing matrices for all pairs and . Therefore the equality holds, and we can write
Bernstein’s inequality (vershynin2018high, , Theorem 2.8.1) implies for each index the estimate
Taking the union bound over we deduce that the condition
Using the same argument for and taking a union bound completes the proof. ∎
Next, we will show that flat solutions are almost optimal for the standard convex relaxation of the matrix completion problem:
Suppose that is a solution of the problem (39) and suppose that the condition numbers of and are upper bounded by some constant . Then any flat solution of (1) is nearly optimal for the convex relaxation (39) in the sense that:
where the first and last inequalities follow from (10) and the second inequality follows from Theorem 3.3. We therefore deduce \mathopen{}\mathclose{{}\left\|L_{f}R_{f}^{\top}}\right\|_{*}-\mathopen{}\mathclose{{}\left\|M_{\natural}}\right\|_{*}\leq(\kappa^{2}-1)\mathopen{}\mathclose{{}\left\|M_{\natural}}\right\|_{*}, as claimed. ∎
It remains to translate the suboptimality gap (40) into an estimate on the distance \mathopen{}\mathclose{{}\left\|L_{f}R_{f}^{\top}-M_{\natural}}\right\|_{*}. This is the content of the following lemma.
Suppose the linear map is generated according to the matrix completion model. Then there exist constants such that in the regime , with probability at least , any feasible matrix of the problem (39) satisfies the inequality:
Set . Observe that we may bound \mathopen{}\mathclose{{}\left\|R}\right\|_{*} as follows:
where the step is due to the fact that has rank no more than . We now bound \mathopen{}\mathclose{{}\left\|P_{\mathcal{T}^{\perp}}(R)}\right\|_{*} and \mathopen{}\mathclose{{}\left\|P_{\mathcal{T}}(R)}\right\|_{\mbox{\tiny{F}}} separately. As verified in (ding2020leave, , Section 6), the premise in (chen2015incoherence, , Proposition 2) is satisfied with probability at least for some universal under the condition . Hence, the result (chen2015incoherence, , Proposition 2 and its proof)Specifically, the first displayed equation above (chen2015incoherence, , Lemma 5) shows that with probability at least , there holds the inequality
Moreover, the premise in (chen2015incoherence, , Lemma 5) is satisfied with probability at least for some universal constant as verified in (candes2009exact, , Lemma 4.1) or in (chen2013low, , Lemma 11). Hence, (chen2015incoherence, , Lemma 5 and its proof)In the displayed equation in the statement of the lemma, one can simply replace by and set . shows that with probability at least , the inequality
holds. Combining (43),(44), and (45), yields the desired inequality (41). ∎
Putting all the lemmas together, we can now prove Theorem 5.1.
Lemma 5.4 ensures that in the regime , with probability at least , the estimate
holds for all satisfying . In this event, is clearly a minimizer of (39). Lemma 5.3 therefore ensures that the matrix satisfies
where is an upper bound on the condition numbers of and . Lemma 5.2 in turn ensures that for any , in the regime p\geq\frac{3\log\mathopen{}\mathclose{{}\left(d_{\max}}\right)}{\delta^{2}d_{\min}}, with probability at least , the upper bound is valid. Algebraic manipulations therefore yield, within these events, the estimate:
for a some numerical constant . To summarize, there exist numerical constants such that the following is true. Given any , provided we are in the regime
with probability at least , any flat solution satisfies (46). Let us now try to set
This choice is consistent with the requirement (47) as long as (35) holds. With this choice of , the estimate (46) becomes \mathopen{}\mathclose{{}\left\|L_{f}R_{f}^{\top}-M_{\natural}}\right\|_{*}\leq\gamma\mathopen{}\mathclose{{}\left\|M_{\natural}}\right\|_{*}, as claimed. ∎
Robust principal component analysis (PCA)
In this section, we focus on problem of principal component analysis (PCA) with outliers, also known as “robust PCA”, following the approach in candes2011robust ; chandrasekaran2011rank . Though this problem is not of the form (1), we will see that flat solutions (appropriately defined) exactly recover the ground truth under reasonable assumptions. The robust PCA problem asks to find a matrix that has been corrupted by sparse noise . More precisely, we observe a matrix of the form
The matrix is assumed to have at most many nonzero entries in any column and in any row, and has rank . Moreover, following existing literature we assume that the matrix is strongly incoherent with parameter . That is, given a singular value decomposition with , we let denote the smallest constant satisfying
where \mathopen{}\mathclose{{}\left\|\cdot}\right\|_{\infty} denotes the entrywise sup-norm.
One common approach for recovering is to solve the problem:
Observe that we may express the problem (51) more compactly as
The following is the main result of the section.
There is a numerical constant such that in the regime , any flat minimizer of (50) satisfies .
Let be a solution of (50). Since , the equality holds. In particular, we may write as
where we define . Therefore appealing to Lemma 2.1, we may write the scaled trace as
Thus any flat solution of (50) solves the problem:
Equivalently, the characterization (10) implies that the matrix solves the problem
On the other hand, the result (chen2013low, , Theorem 3)The result (chen2013low, , Theorem 3) actually shows that uniquely solves minimize \displaystyle\quad\mathopen{}\mathclose{{}\left\|X}\right\|_{*}+\lambda\mathopen{}\mathclose{{}\left\|S}\right\|_{1,1} (55) subject to for some . Now for any solution to (56), the pair is feasible for (55) and satisfies \mathopen{}\mathclose{{}\left\|X_{1}}\right\|_{*}+\lambda\mathopen{}\mathclose{{}\left\|Y-X_{1}}\right\|_{1,1}\leq\mathopen{}\mathclose{{}\left\|M_{\natural}}\right\|_{*}+\lambda\mathopen{}\mathclose{{}\left\|S_{\natural}}\right\|_{1,1}, by definition of . Hence by the uniqueness of (55), we know . shows that is the unique minimizer of the convex relaxation
Hence, we know also uniquely solves (54) and we conclude , as claimed. ∎
Neural networks with quadratic activations and covariance matrix estimation
In this section, we investigate flat minimizers of a one hidden layer neural network, considered in the work soltanolkotabi2018theoretical ; li2018algorithmic for the purpose of analyzing the energy landscape around saddle points. Though this problem is not in the form (1), we will see that flat minimizers (naturally defined) exactly recover the ground truth under reasonable statistical assumptions. As a special case, we will obtain guarantees for flat minimizers of the overparameterized covariance matrix estimation problem.
We aim to fit the data with an overparameterized neural network with a single hidden layer with weights and an output layer with weights , where , and . The prediction of the neural network on input is thus given by
Thus the overparameterized problem we aim to solve is
with high probability over the training set flat solutions
Indeed, we will prove a stronger result by relating the problem (58) to low-rank matrix factorization. To see this, we can write as:
Here, we write with and . Note that the matrix is symmetric. Using (59), we may rewrite the objective of (58) as
where the linear map is defined as with for any . In particular, from the second equation in (59) and our assumption on , there always exists a matrix satisfying . Therefore, the set of minimizers of is nonempty and it coincides with . Note that in the special case , the problem (60) becomes covariance matrix estimation chen2015exact and further reduces to phase retrieval when candes2013phaselift .
There exist numerical constant , such that in the regime and , with probability at least , any flattest solution of (58) satisfies
The rest of the section is devoted to the proof of Theorem 7.1. The general strategy is very similar to the one pursued in Section 4. We begin with the following lemma that expresses the trace of the Hessian in the same spirit as Lemma 3.1. With this in mind, we define the matrix
The second order derivative of the function at any matrix is the quadratic form:
The expression for follows immediately from algebraic manipulations. The trace of the Hessian therefore can be written as
Using the symmetry of the matrices , the first term can be written as
Following exactly the same computation as (18) completes the proof. ∎
In particular, Lemma 7.2 implies that flat solutions are exactly the minimizers of the problem
We would like to next rewrite this problem in terms of minimizing a nuclear norm of a matrix. With this in mind, we will require the following two lemmas in the spirit of the characterization of the nuclear norm (10).
admits a decomposition for some matrices ,
has at most non-negative eigenvalues and non-positive eigenvalues.
The implication follows immediately from an eigenvalue decomposition of . Conversely, suppose that 1 holds. Observe that 1 clearly is equivalent to being able to write with , , and . Let be the number of strictly positive eigenvalues of and let be the number of strictly negative eigenvalues of . We now prove by contradiction. A similar arguments yields . Suppose indeed and consider the matrix . Let be the span of eigenspaces corresponding to the top eigenvalues of . Note that has dimension . Cauchy’s interlacing theorem implies that the -th largest eigenvalue of satisfies that . Since , for any we estimate . We conclude that that rank of is at least , which is a contradiction since has rank at most . ∎
Lemma 7.3 and 7.4 directly imply that the problem (67), which characterizes flat solutions, is equivalent to the rank constrained problem:
Therefore a natural convex relaxation simply drops the requirements on the eigenvalues:
The following theorem summarizes these observations.
Suppose that the matrix is invertible. Then the problems (67) and (68) are equivalent in the following sense.
The optimal values of (67) and (68) are equal.
If solves (67), then is optimal for (68).
Moreover, if is the unique minimizer of the problem (69), then any flat solution satisfies .
Define the linear map by
and consider the convex optimization program
If is the unique solution of (71), then it is also the unique solution of (69).
It follows immediately that any that is feasible for (69) is also feasible for (71). Consequently, if the symmetric matrix is a unique minimizer of (71), then it must also be a unique minimizer of (69). This completes the proof. ∎
Exactly the same proof as that of Lemma 4.9 ensures that there exist constants such that as long as we are in the regime, and , the estimate holds:
Consequently, in this regime we may upper bound the condition number of by . In light of Lemma 4.7, in order to ensure that is the unique minimizer of (71), it remains to simply choose such that the inequality holds. Using Lemmas 7.5-7.6 completes the proof. ∎
Numerical experiments
Recall that we have proved that for a variety of overparameterized problems, under standard statistical assumptions, in the noiseless setting, (1) flat solutions recover the ground truth and (2) flat solutions are nearly norm-minimal and nearly-balanced (but not exactly). In this section, we numerically validate both of the claims, in order. Note that finding flat solutions in these examples, amounts to solving a convex optimization problem as long as the number of measurements is sufficiently large.
We consider four problems described earlier in the paper: (a) matrix sensing, (b) bilinear sensing, (c) matrix completion, and (d) neural networks with quadratic activation. For each setting, we consider different combination of the dimension and the number of measurements ( for matrix completion). For each combination ( for matrix completion), we randomly generate a rank ground truth unit Frobenius norm matrix (rank for the setting of neural network with quadratic activation), then repeatedly generate the linear measurement map and solve ten times the convex relaxation associated with being a flat solution and the nuclear norm minimization problem.
To measure the success of exact recovery, for a solution from the convex relaxation of the scaled trace problem (or from the nuclear norm minimization), we measure the Frobenius norm error \mathopen{}\mathclose{{}\left\|D_{1}^{-1}\hat{X}D_{2}^{-1}-M_{\natural}}\right\|_{\mbox{\tiny{F}}} (or \mathopen{}\mathclose{{}\left\|\hat{X}-M_{\natural}}\right\|_{\mbox{\tiny{F}}} for the nuclear norm minimization). Our criterion for exact recovery is whether this error is smaller than or not. Figure 3 shows the empirical probability of success recovery (averaging over ten times) for each combination of dimension and number of measurements. The figure is in gray scale and the whiter color indicates higher success probability. We observe that the frequency of exact recovery by flat solutions almost matches the frequency of exact recovery by nuclear norm minimization. Notice moreover that flat solutions exactly recover the ground truth matrix, though we are only able to show weak recovery for matrix completion.
Next we test the regularity of flat solutions for the (a) matrix sensing, (b) bilinear sensing, (c) matrix completion problems. We only consider the pairs such that the matrices are nonsingular. Let be the solution of the convex relaxation for being a flat solution and let be the solution to the nuclear norm minimization problem. We compute the factors and using the full SVD of . We then use the quantity \frac{\mathopen{}\mathclose{{}\left\|L_{f}}\right\|_{\mbox{\tiny{F}}}^{2}+\mathopen{}\mathclose{{}\left\|R_{f}}\right\|_{\mbox{\tiny{F}}}^{2}}{2\mathopen{}\mathclose{{}\left\|\hat{X}_{\texttt{nuc}}}\right\|_{*}} to measure the norm-minimality of flat solutions, and the quantity \mathopen{}\mathclose{{}\left\|L_{f}^{\top}L_{f}-R_{f}^{\top}R_{f}}\right\|_{*}/\mathopen{}\mathclose{{}\left\|M_{\natural}}\right\|_{*} to measure balancedness. Whenever one of the matrices is singular, we set both measures to be . The result (in scale) is shown in Figure 4. We observe that whenever flat solutions exactly recover the ground truth, both measures are small but not exactly zero. In particular, the norm-minimal and flat solutions are distinct.
Conclusion and discussion on depth
In this paper, we analyzed a variety of low rank matrix recovery problems in rank-overparameterized settings. We considered overparameterized matrix and bilinear sensing, robust PCA, covariance matrix estimation, and single hidden layer neural networks with quadratic activation functions. In all cases, we showed that flat minima, measured by the scaled trace of the Hessian, exactly recover the ground truth under standard statistical assumptions. For matrix completion, we established weak recovery, although empirical evidence suggests exact recovery holds here as well.
Matrix factorization problems are suggestive of the behavior one may expect for two layer neural networks. Therefore, an appealing question is to consider the effect that depth may have on generalization properties of flat solutions. In this section, we argue that depth may not bode well for generalization of flat solutions. As a simple model, we consider the setting of sparse recovery under a “deep” overparameterization. Namely, consider a ground truth vector with at most nonzero coordinates. The goal is to recover from the observed measurements under a linear map . We assume that satisfies the restricted isometry property (RIP): there exist such that
The flat solutions are naturally defined as those solving the following problem:
To compute the Hessian , let be the -th column of . Following a similar calculation as in Lemma 3.1 yields the expression
for any where
The following lemma shows that is close to the identity matrix.
Suppose that the linear map satisfies RIP for some . Then the matrix satisfies
Indeed, since is diagonal, we only need to show for each index . Note that \frac{1}{m}\mathopen{}\mathclose{{}\left\|Ae_{i}}\right\|_{2}^{2}=\frac{1}{m}a_{i}^{\top}a_{i}. Since is a sparse vector with only one nonzero, using the RIP, we have \frac{1}{m}a_{i}^{\top}a_{i}=\frac{1}{m}\mathopen{}\mathclose{{}\left\|Ae_{i}}\right\|_{2}^{2}\in[(1-\delta)^{2}\mathopen{}\mathclose{{}\left\|e_{i}}\right\|_{2},(1+\delta)^{2}\mathopen{}\mathclose{{}\left\|e_{i}}\right\|_{2}^{2}]=[(1-\delta)^{2},(1+\delta)^{2}] and our proof is complete. ∎
The next lemma shows that the following optimization problem is equivalent to the optimization problem defining flat solutions (76).
Denote by the -th component of the vector variable for .
Problem (76) is equivalent to Problem (79) in the following sense:
If solves (79), then any satisfying and for any solves (76).
If solves (76), then solves (79).
According to (77), the trace of the Hessian is
In the step , we use the well-known AM-GM inequality. The equality holds if and only if for any . The rest follows by letting .
There is a universal constant such that if the linear map satisfying RIP with . Then for , any solution to (76) satisfies .
On the other hand, higher values of do not encourage sparsity. In the extreme case , the objective function in (79) is close to \mathopen{}\mathclose{{}\left\|x}\right\|_{2}^{2} which should give a dense solution in general. Indeed, in Figure 5, we plot the solution performance of (79) for different values and measured by the relative error \frac{\mathopen{}\mathclose{{}\left\|x-x_{\natural}}\right\|_{2}}{\mathopen{}\mathclose{{}\left\|x_{\natural}}\right\|_{2}}. We set and and generate the signal with first components being and zero otherwise. For each configuration of , we randomly generate realizations of the Gaussian sensing matrix and solve (79) for each . The performance metric \frac{\mathopen{}\mathclose{{}\left\|x-x_{\natural}}\right\|_{2}}{\mathopen{}\mathclose{{}\left\|x_{\natural}}\right\|_{2}} is averaged over these trials. Indeed, exact recovery is observed for , while the relative error degrades significantly as increases.
References
Appendix A Extension to noisy observation
This section considers an extension of the flat solution concept to the setting where the observations are corrupted by noise:
where is the noise level and is the standard -dimensional Gaussian. Our discussion in the rest of the paper focused on the simpler case . We define the flat solution in this setting as follows. We continue to use the scaled trace as the flatness measure of the objective function. However, instead of considering all solutions that interpolate the data, we consider those pairs that are in the sublevel set:
The reason for this choice is that in the noisy observation setting, the global solution of (1) (with ) has the potential of overfitting no matter what regularization has been enforced. Indeed, consider the simplest case , i.e., the map is the identity map. In this setting, any global minimizer is simply the observation itself. With the above preparation, we define the flat solutions to be the minimizers of the following problem.
The goal of the section is to prove the following.
Suppose that is a Gaussian ensemble and the noise follows . Then there exists universal constants such that for any , with probability at least , any solution of (83) satisfies
Note that the bound is minimax optimal according to .
Following (19) and (20) in Section 3.1, we see that (83) is equivalent to (in the sense of Theorem 3.2) minimizing the nuclear norm over rank constrained matrices so long as matrices are invertible Note that the condition is not needed for (16) to hold, which is critical for the step (19) to hold in the noisy case. :
Our proof is based on the argument in . Starting with the feasibility of , we have
First, let us introduce a lemma that decomposes .
[47, Lemma 2.3 and 3.4] For any , there exists such that (1) , (2) , (3) and , (4) \mathopen{}\mathclose{{}\left\|A+B_{2}}\right\|_{*}=\mathopen{}\mathclose{{}\left\|A}\right\|_{*}+\mathopen{}\mathclose{{}\left\|B_{2}}\right\|_{*}, and (5) .
Using Lemma A.2, we can decompose such that , , , and \mathopen{}\mathclose{{}\left\|Y_{0}+R_{c}}\right\|_{*}=\mathopen{}\mathclose{{}\left\|Y_{0}}\right\|_{*}+\mathopen{}\mathclose{{}\left\|R_{c}}\right\|_{*}. Hence, we have
Using the optimality of \mathopen{}\mathclose{{}\left\|\hat{Y}}\right\|_{*}\leq\mathopen{}\mathclose{{}\left\|Y_{0}}\right\|_{*}, we have that
Using the fact that has rank no more than and , we have
Here in the first step, we use the triangle inequality for \mathopen{}\mathclose{{}\left\|\Delta}\right\|_{*}. This finishes the upper bound of \mathopen{}\mathclose{{}\left\|\Delta}\right\|_{*}.
Next we partition into a sum of matrices each of rank at most as in [47, Theorem 3.3]. Let be the singular value decomposition of . For each define the index set , and let . Using the fact that and the construction of , , we also have
which implies . We can then compute the following bound
where the step is due to (87), and the step is due to the fact that . From this inequality, we also have
The last equality is due to that . Hence, we have that
Combining (86), (89), (94), and (95), we conclude \mathopen{}\mathclose{{}\left\|\Delta}\right\|_{\mbox{\tiny{F}}}\lesssim\sigma\sqrt{\frac{r_{\natural}(d_{1}+d_{2}}{m}}, as claimed.
A.2 A numerical demonstration
Finally, we validate Theorem A.1 via a numerical experiments. We compare the performance of the minimizer of Problem (85) for the case and the solution of the nuclear norm minimization (Problem (85) with being the identity).
We set and . We generate the underlying unit Frobenius norm ground truth matrix randomly with rank . We vary the noise level . For each rank , we generate the sensing Gaussian ensemble with and use the same one for different noise levels. Then for each noise level, we generate 25 realization of the noise following , and solve the corresponding Problem (85) and the nuclear norm minimization problem. We then average the error \mathopen{}\mathclose{{}\left\|D_{1}^{-1}\hat{X}D_{2}^{-1}-M_{\natural}}\right\|_{\mbox{\tiny{F}}} and \mathopen{}\mathclose{{}\left\|\hat{X}-M_{\natural}}\right\|_{\mbox{\tiny{F}}} over the trials for each configuration of and .
We plot the error in Figure 6. The white color indicates small error and the dark color indicates large error. It can be seen that it is hard to differentiate the performance of the solution to the nuclear norm minimization problem and the solution to Problem (85). This result validates our theoretical results in Theorem A.1.