A Provably Convergent Scheme for Compressive Sensing under Random Generative Priors
Wen Huang, Paul Hand, Reinhard Heckel, Vladislav Voroninski
Introduction
Generative models have greatly improved the state of the art in computer vision and image processing, including inpainting, super resolution, compression, compressed sensing, image manipulation, MRI imaging, and denoising [GPAM+14, OKK16, MSY16, YCL+17, SCT+16, LTH+16, JAFF16, MPB15, MB17, ZKSE16, RB17, MGC+17, MMP+17, MPB15, MB17]. At the heart of this success is the ability of generative models to sample from a good approximation of the manifold of natural signals or images relevant for a particular task. These models can be efficiently learned, in an unsupervised way, from a collection of examples of images of that signal class. The progress in generative modeling over just the past two years has been immense; as an example, multiple methods can now generate synthetic photorealistic images of celebrity faces [KALL17, KD18]. Generative models have also been trained in other contexts, and the quality of such models is expected to keep improving.
A reason for the success of some generative models in inverse problems is that they can efficiently map a low-dimensional space, called a latent code space, to an estimate of the natural signal manifold in high-dimensional signal space. That is, generative models can provide an explicit parameterization of an approximation of the natural signal manifold. This property then allows signal recovery problems to be posed in a low dimensional space. In contrast, a standard structural model for natural signals over the past decade or so has been sparsity in an appropriate basis, such as a wavelet basis. This perspective leads to a high dimensional optimization problem that cannot directly be solved and instead relies on a convex relaxation. While this relaxation has been quite successful in linear regimes, such as compressive sensing, it has not yet been effective in nonlinear regimes, such as compressive phase retrieval.
In comparison to sparsity-based methods, generative methods can permit lower dimensional representations of some signal classes. To see how lower dimensional representations are possible, consider the following toy model. Consider a 1-parameter family of high resolution natural images of a toy train rolling down wooden tracks. The representation of each image in terms of a wavelet bases will be approximately sparse, relative to the image dimensionality, but accurate reconstruction will still require many wavelet coefficients. In contrast, if that collection of images was directly modeled as a one-dimensional manifold, recovery should be possible with approximately 1 measurement.
In comparison to sparsity based methods, generative methods can be exploited more efficiently in some contexts. For example, in compressive phase retrieval [HLV18] show that the empirical risk objective under suitable assumptions has a favorable optimization landscape, in that there are no spurious local minima, when the number of generic measurements is linear in the latent dimensionality of a random generative model. In contrast, no algorithm for compressive phase retrieval is known to succeed under less than generic measurements, where is the signal sparsity.
In the context of compressive sensing from linear measurements and under generative priors, recovery can be posed as a nonconvex empirical risk optimization, which can be solved by first order gradient methods. When solved this way, generative models have been shown to empirically outperform sparsity models in the sense that they can give comparable reconstruction error with 5-10x fewer compressive measurements in some contexts. This empirical result indicates both that representations from generative models are low dimensional and can be efficiently exploited. Nonetheless, this observation does not have a firm theoretical footing. In principle, such gradient algorithms for nonconvex programs could get stuck in local minima. Thus, it is important to provide algorithms that provably recover the underlying signal.
In this paper, we introduce a gradient descent algorithm for empirical risk minimization under a generative network, given noisy compressive measurements of its output. We prove that if the network is random, the size of each layer grows appropriately, there are a sufficient number of compressive measurements, and the magnitude of the noise is sufficiently small, then the gradient descent algorithm converges to a neighborhood of the global optimizer and the size of the neighborhood only depends on the magnitude of the noise. In particular, the gradient descent algorithm converges to the global minimizer for noiseless measurements. To the best of our knowledge, this is the first recovery guarantee for compressive sensing under a generative neural network model. Using numerical experiments, we empirically verify recovery up to the noise level, and in particular exact recovery in the noiseless case.
The justification for studying random networks is as follows. First, the weights of some neural networks trained on real data exhibit statistics consistent with Gaussians. Second, the theory for inverse problems under generative priors is nascent and challenging even for Gaussian networks. Third, it is not immediately clear what model for the weights of trained generative models is most realistic while maintaining mathematical tractability. And finally, random neural networks have recently been shown to be useful for image processing tasks [UVL18, HH18]; thus, any theoretical analysis of them may be relevant for those contexts.
A first theoretical analysis of compressive sensing under a generative prior appeared in [BJPD17]. In that work, the authors studied the task of recovering a signal near the range of a generative network by the same nonconvex empirical risk objective as in the present paper. They establish that if the number of measurements scales linearly in the latent dimensionality, then if one can solve to global optimality the nonconvex empirical risk objective, then one recovers the signal to within the noise level and representational error of the network. Because the objective is nonconvex, and nonconvex problems are NP-hard in general, it is not clear that any particular computationally efficient optimization algorithm can actually find the global optimum. That is, it is possible that any particular numerically efficient optimization algorithm gets stuck in local minima. In the present paper, we provide a specific computationally efficient numerical algorithm and establish a recovery guarantee for compressive sensing under generative models that satisfy suitable architectural assumptions.
A recent paper by a subset of the authors [HV17] provides a global analysis of the nonconvex empirical risk objective below for expansive Gaussian networks. The paper shows that, under appropriate conditions, there are descent directions, of the nonconvex objective, outside neighborhoods of the global optimizer and a negative multiple thereof in the latent code space. That work, however, does not provide an analysis of the behavior of the empirical risk objective within these two neighborhoods, a specific algorithm, a proof of convergence of an algorithm, or a principled reason why the negative multiple of the global optimizer would not be returned by a naively applied gradient scheme. Additionally, that work does not study noise tolerance. Each of these aspects require considerable technical advances, for example establishing a nontrivial convexity-like property near the global minimizer.
The paper [ALM15] presents a simple layer-wise inversion process for neural networks. In the current setting, this result is not applicable because the final compressive layer can not be directly inverted without structural assumptions. Instead, in the present paper, we analyze the inversion of the compressive measurements and the generative network together.
Problem statement
For notational convenience, we let denote the matrix obtained by zeroing out the rows of that do not have a positive dot product with , i.e.,
The matrix contains the rows of that are active after taking a ReLU if the input to the network is . Therefore, under the model for , the empirical risk (2.1) becomes
Main Results: Two algorithms and a convergence analysis
In this section, we propose two closely related algorithms for minimizing the empirical loss (2.1). The first algorithm is a subgradient descent method which is provably convergent. The second algorithm is a practical implementation that can be directly implemented with an explicit form of the gradient step that may or may not be within the subdifferential of the objective at some points.
Any vector in is called a subgradient of at . Note that if is differentiable at , then . We can now state Algorithm 1.
This subgradient method has an important twist. In lines 3–7, the algorithm checks whether negating the current iterate of the latent code causes a lower objective, and if so accepts that negation. The motivation for this step is as follows: In expectation, the empirical loss has a global minimum at , a local maximum at 0, and a critical point at , where , as established in [HV17]. Moreover, the empirical loss concentrates around its expectation. Thus, a simple gradient descent algorithm could in principle be attracted to , and this check is used in order to ensure that it does not.
2 Convergence analysis for Algorithm 1
In this section, we prove that Algorithm 1 converges to the global minimizer up to an error determined by the noise . Consequently, the signal estimate is also recovered up an error determined by the noise. In the noiseless case (i.e., ), Algorithm 1 converges to , and is recovered exactly. Our theorem relies on two deterministic assumptions about the network and the sensing matrix .
First, we assume that the weights of the network, , satisfy the Weight Distribution Condition (WDC) defined below. This condition states that the weights are roughly uniformly distributed over a sphere of an appropriate radius.
Second, we assume that the measurement matrix satisfies an isometry condition with respect to , defined below.
These deterministic conditions are satisfied with some probability by neural networks and measurement matrices that are such that
The network weights have i.i.d. entries in the th layer.
The network is expansive in each layer, in that
where is a universal constant and is sufficiently small.
The measurement vectors have i.i.d. entries.
There are a sufficient number of measurements in that
where is a universal constant and is sufficiently small.
The probability that the WDC and RRIC hold with constant under the assumption above is at least
As our main theoretical result, we prove that the iterates generated by Algorithm 1 converge to up to a term dependent on the noise level. The proof is given in Section 5.
Suppose the WDC and RRIC hold with and the noise obeys . Consider the iterates generated by Algorithm 1 with step size . Then there exists a number of iterations, denoted by and upper bounded by such that
where . Here, , , , , and are universal positive constants.
Theorem 3.1 shows that after a certain number of iterations , an iterate of Algorithm 1 is in a neighborhood of the true latent code , and the size of this neighborhood depends on the sample complexity parameter and the noise (see (3.4)). Furthermore, by (3.5), the theorem guarantees that once the iterates are in this ball, they converge linearly to a smaller neighborhood of , and the size of the neighborhood only depends on the noise term . If the noise term is zero, the algorithm converges linearly to . Similarly, it follows from (3.6) that the recovered image converges to up to the noise.
Combining Proposition 4 from the paper [HV17, Proposition 4], with Theorem 3.1 yields the following corollary.
Consider an expansive generative neural network that satisfies (a) and (b), and let the measurements satisfy (c) and (d). Suppose and . Then, at least with probability (3.3), the iterates generated by Algorithm 1 with step size satisfies the following: There exists a number of step upper bounded by such that
3 Practical Algorithm
Experiments
In this section, we tested the performance of Algorithm 2 on synthetic data with various sizes of noise, and verified Theorem 2 by numerical results.Note that we do not observe that any entry in , is zero in our experiments. Therefore, Algorithm 2 is equivalent to Algorithm 1 in this case.
Figure 1 reports the empirical probability of successful recovery for noiseless problems. A run is called success if the relative error is smaller than . We observe that Algorithm 1 is able to find the true code when is sufficiently large relative to . This experiment shows that signal recovery by empirical risk optimization for compressive sensing under expansive Gaussian generative priors succeeds in a much larger parameter range than that given by the theorem. In particular, the empirical dependence on appears to be much milder in practice than what was assumed in the theorem.
Figure 3 shows the relationships between the relative error and the number of iterations for the four values of SNR. The number of input neurons is . Note that in the tests for the different values of SNR, all the other settings are identical, i.e., the initial iterate, latent code , weights matrices and are the same. We observe that after approximately 20 iterations, Algorithm 1 converges linearly to a neighborhood of the true solution , and the size of the neighborhood only depends on the magnitude of the noise. These results are consistent with Theorem 1. Additionally, this figure demonstrates that the relative error in the recovered latent code scales linearly with the magnitude of the noise, which is also consistent with the theorem.
Proof of Theorem 3.1
In this section, we prove our main result. Recall that the goal of Algorithm 1 is to minimize the cost function
The proof relies on a concentration of measure argument which ensures that the cost function and the step direction concentrate around and , respectively. In particular, if the WDC and the RRIC hold with and the noise is 0, then and . The idea of our convergence analysis is to prove properties of and the direction that are sufficient for a convergence analysis, if our method where to be run on with step directions given by , and then show that the actual cost function and step direction are ‘close enough’ to establish convergence.
It is well known that if the gradient of a function is Lipschitz continuous, then a steepest descent method with a sufficient small step size converges to a stationary point from any starting point [NW06]. However, this result can not be used here since the gradient of the function (2.2) is not continuous. We overcome this technical difficulty by the following three steps, rigorously stated in Lemma 5.1, Lemma 5.2, and Lemma 5.3, respectively.
The function is Lipschitz continuous except in a ball around 0.
The (sub)-gradient of is close to .
The iterates generated by Algorithm 1 stay sufficiently far away from 0.
Those three steps are sufficient to show that the gradient of is close to being Lipschitz continuous, and therefore the iterates from Algorithm 1 converge to a neighborhood of a stationary point. The size of the neighborhood depends on how close the (sub)-gradient of is to , and is controlled by the noise energy and the variable in the WDC and the RRIC. Of course, we also have to ensure that the algorithm not only converges to any of the three stationary points, but that it actually converges to a point close to , for this we rely on the ‘tweak’ of the algorithm in steps 1-3.
The remainder of the proof is organized as follows. We start by defining notation used throughout the proof (see Section 5.1). In Section 5.2 we introduced several technical results formalizing the steps 1-3 above, and in Section 5.3 we use those properties to formally prove Theorem 3.1.
Here, we define some useful quantities, in particular and , and introduce standard notation used throughout. We start with defining a function that is helpful for controlling how the operator distorts angles, and is defined as
where , and .
2 Preliminaries
In this section, we state formal results making steps 1-3 from the beginning of this section rigorous, and collect properties used later in the proof of Theorem 3.1.
We start by showing that the function is Lipschitz continuous except in a ball around :
In addition, if for any , then .
The next lemma states that and the sub-gradient are close:
Suppose the WDC and RRIC hold with . Then for any and any ,
Next, we ensure that after sufficiently many steps, the algorithm will be relatively far from the maximum around :
Recall that is the set of points with the norm of upper bounded by . The following lemma shows that this set is contained in balls around and , thus outside those balls, the norm of is lower bounded, which, together with Lemma 5.2, establishes that the sub-gradients are bounded away from zero. This in turn is important to show that outside those balls our gradient scheme makes progress.
[HHHV18, Lemma 8] For any ,
Here, obeys as .
It has been shown in [HV17] that the function has three stationary points: one at , one global minimizer at and a local maximizer at . Therefore, Algorithm 1 could in principle be attracted to . Lemma 5.5 guarantees that with the tweak from Step 3 to Step 7, the iterates of Algorithm 1 converges to a neighborhood of .
Suppose the WDC and RRIC hold with . Moreover, suppose the noise satisfies , where is a universal constant. Then for any , it holds that
for all and , where is a universal constant.
Once an iterate is in a small neighborhood of , Lemma 5.6 guarantees that the search directions of the iterates afterward point to up to the noise . Therefore, the iterates by Algorithm 1 converge to up to the noise. In other words, the parameter in WDC and RRIC does not influence the size of the neighborhood that iterates converge to.
Suppose the WDC and RRIC hold with and . Then for all and for all ,
3 Proof of Theorem 3.1
The proof can be divided into three parts. We first show that the iterates converge to a neighborhoods of and , whose sizes depend on and the noise energy . Second, we show that the iterates only converge to the neighborhood of that depends both on as well as on the noise energy . Lastly, we show that once an iterate is in the aforementioned neighborhood of , the subsequent iterates converge to a neighborhood of whose size only depends on the noise , but not on .
Convergence to a neighborhood of or : We prove that if is sufficiently large, specifically if the iterate is not in the set with
then Algorithm 1 makes progress in the sense that is smaller than a certain negative value. Therefore, the iterates of Algorithm 1 converge to .
where the second inequality follows from the definition of and Lemma 5.2, and the third inequality follows from the definition of .
Second, by Lemma 5.1 and Lemma 5.3, for all and ( is defined in Lemma 5.3), we have
where the second inequality follows from Lemma 5.2 and (5.6), and the fourth inequality follows from Lemma A.1 and the assumption .
with the appropriate constants chosen sufficiently small, where is a universal constant. Choosing yields
Therefore, combining (5.3) and (5.8) yields
where we used that by the assumption that the step size obeys and by taking appropriately small. Applying (5.5) to (5.9) yields
Convergence to a neighborhood of : Note that by the assumption and , our choice of obeys for sufficiently small , and thus the assumptions of Lemma 5.4 are met and we have
Here, we defined the radius , and and are universal constants and are used in (3.4).
By the assumption and and choosing and sufficiently small, we have and . Note that the powers of in the upper bounds of and , which are and respectively, are used to get . It follows from (5.10) that
where is defined in Lemma 5.5, and is a universal constant.
Using (5.11) and , we have
where and is a universal constant. Repeatedly applying (5.12) yields
where the last inequality follows from the definition of and the step size , and is a universal constant. This finishes the proof for (3.5). Inequality (3.6) follows from Lemma A.8.
This concludes the proof of our main result. In the remainder, we provide proofs of the lemmas above.
4 Proof of Lemma 5.1
For brevity of notation, let . Combining (5.13) and (5.14) gives . Inequality (5.15) implies . It follows that
We use the following result which is proven later in Lemma A.2:
Using (5.13) and (5.14) and noting yield
Finally, combining (5.16), (5.17), (5.18), (5.19) and (5.20) yields the result.
5 Proof of Lemma 5.2
For any and suppose is differentiable at , we have
where the second inequality follows from [HV17, (29)] and the third inequality follows from Lemma A.3 given later.
Since is a piecewise quadratic function, by [Cla17, Theorem 9.6], we have
where denotes the convex hull of the vectors , is the number of quadratic functions adjoint to and is the gradient of the -th quadratic function at . Therefore, for any , there exist such that and . Note that for any , there exists so that , and is differentiable at for sufficiently small .
The proof is concluded by appealing to the continuity of with respect to nonzero , inequality (5.21), and by noting that
where we used the inequality above and that .
6 Proof of Lemma 5.3
We next show that, for any , and , it holds that .
Therefore, . Therefore, we have
If is not differentiable at , by equation (3.7), we have
for all . This concludes the proof of (5.22).
7 Proof of Lemma 5.5
and note that . Consider , for a that will be specified later. Note that
where the second inequality holds by Lemma A.3, and the last inequality holds by our assumption on . Thus, by Lemma A.5 and Lemma A.6, we have
Additionally, for , we have
where the last inequality follows from , , , and assuming .
Similarly, we have that for any
Using , , , , and assuming , the right side of (5.25) is smaller than the right side of (5.26) if
It follows from Lemma A.4 that . Thus, it suffices to have and for an appropriate universal constant , and for an appropriate universal constant .
8 Proof of Lemma 5.6
Therefore, . Combining with Lemma A.9 yields that
For any and for any , by (3.7), there exist such that and . It follows that .
References
Appendix A Supporting Lemmas
Lemma A.1 is used in proofs for Section 5.3 and Lemma 5.3.
Suppose that the WDC and RRIC holds with and that the noise satisfies . Then, for all and all ,
where and are universal constants.
Define for convenience . We have
where the second inequality follows from the definition of and Lemma 5.2, the third inequality uses , and the last inequality uses the assumption . ∎
Lemma A.2 is used in proofs for Lemma 5.1.
Suppose for , and . Then it holds that
Prove by induction. It is easy to verify that the inequality holds if . Suppose the inequality holds with . Then
Lemma A.3 is used in proofs for Lemma 5.2, Lemma 5.3, and Lemma 5.5.
Suppose the WDC and RRIC hold with . Then we have
where . In addition, if is differentiable at , then we have
where the second inequality follows from RRIC and the last inequality follows from [HV17, (10)]. Therefore, .
Combining above inequality with given in [HV17, (10)] yields
where the second inequality follows from the assumption on . Therefore, we obtain
Lemma A.4 is used in proofs for Lemma 5.5.
We recall the results in [HV17, (36), (37), and (50)]:
Therefore, we have for all ,
where the second and the fifth inequalities follow from (A.2) and (A.3) respectively. Since , we have that for all
where we use and . Since and for all , we have . ∎
Lemma A.5 is used in proofs for Lemma 5.5.
Fix . For any , it holds that
If , then we have , , and . Note that . We have
where the last inequality is by Lemma A.4 and .
If , then we have , and . It follows that
Lemma A.6 is used in proofs for Lemma 5.5.
If the WDC and RRIC hold with , then we have
For brevity of notation, let . We have
where the first inequality uses the WDC, the RRIC, and [HV17, Lemma 6]. ∎
Lemma A.7 is used in proofs for Lemma A.8.
Combining (A.4), (A.6), and given in [HV17, (10)] yields the result. ∎
Lemma A.8 is used in proofs for Lemma 5.6 and Lemma A.9.
Suppose , and the WDC holds with . Then it holds that
In this proof, we denote and by and respectively. Since , we have
By [HV17, (14)], we also have . It follows that
Note that . We have
where the second inequality is from that if . Combining the above inequality with Lemma A.7 yields
Lemma A.9 is used in proofs for Lemma 5.6.
Suppose , and the WDC holds with . Then it holds that
For brevity of notation, let . We have
where the first equation is by [HV17, (10)]; the second equation is by (A.6); the third equation is by Lemma A.8 and (A.8). The result follows from (A.9), (A.10) and (A.11). ∎