Signal Recovery from Pooling Representations
Joan Bruna, Arthur Szlam, Yann LeCun
Introduction
The purpose of the pooling layer in each module is to give invariance to the system, perhaps at the expense of resolution. This is done via a summary statistic over the outputs of groups of nodes. In the trained system, the columns of the weight matrix corresponding to nodes grouped together often exhibit similar characteristics, and code for perturbations of a template (Kavukcuoglu et al., 2009; Hyvärinen and Hoyer, 2001).
where as usual, if , this is
If the outputs of the nonlinearity are nonnegative (as for the half rectification function), then corresponds to average pooling, and the case is max pooling.
2 Phase reconstruction
3 What vs. Where
If the columns of the weight matrix in a pool correspond to related features, it can be reasonable to see the entire pool as a “what”. That is, the modulus of the pool indicates the relative presence of a grouping of (sub)features into a template, and the phase of the pool describes the relative arrangement of the subfeatures, describing “where” the template is, or more generally, describing the “pose” of the template.
From this viewpoint, phase reconstruction results make rigorous the notion that given enough redundant versions of “what” and throwing away the “where”, we can still recover the “where”.
4 Contributions of this work
Injectivity and Lipschitz stability of Pooling Operators
This section studies necessary and sufficient conditions guaranteeing that pooling representations are invertible. It also computes upper and lower Lipschitz bounds, which are tight under certain configurations.
where contains the coordinates of .
We shall measure the stability of the inverse pooling with the Euclidean distance in the representation space. Given a distance in the input space, the Lipschitz bounds of a given operator are defined as the constants such that
In the remainder of the paper, given a frame , we denote respectively by and its lower and upper frame bounds. If has vectors and , we denote the frame obtained by keeping the vectors indexed in . Finally, we denote the complement of .
In order to study the injectivity of pooling representations, we first focus on the properties of the operators defined by the point-wise nonlinearities.
have been extensively studied in the literature (Balan et al., 2006; Balan and Wang, 2013), in part motivated by applications to speech processing (Achan et al., 2003) or X-ray crystallography (Ohlsson, 2013). It is shown in (Balan et al., 2006) that if then it is possible to recover from , up to a global sign change. In particular, (Balan and Wang, 2013) recently characterized the stability of the phaseless operator, that is summarized in the following proposition:
In particular, is injective if and only if for any subset , either or is an invertible frame.
A frame satisfying the previous condition is said to be phase retrievable.
We now turn our attention to the half-rectification operator, defined as
For that purpose, let us introduce some extra notation. Given a frame , a subset is admissible if
We denote by the collection of all admissible sets, and the vector space generated by . The following proposition, proved in Section B, gives a necessary and sufficient condition for the injectivity of the half-rectification.
Let A_{0}=\min_{\Omega\in\overline{\Omega}}\lambda_{-}({\left.\kern-1.2pt{\mathcal{F}}_{\Omega}\vphantom{\big{|}}\right|_{V_{\Omega}}}). Then the half-rectification operator is injective if and only if . Moreover, it satisfies
with .
The half-rectification has the ability to recover the input signal, without the global sign ambiguity. The ability to reconstruct from is thus controlled by the rank of any matrix whose columns are taken from a subset belonging to . In particular, if , since , it results that is necessary in order to have .
The rectified linear operator creates a partition of the input space into polytopes, defined by (8), and computes a linear operator on each of these regions. A given input activates a set , encoded by the sign of the linear measurements .
As opposed to the absolute value operator, the inverse of , whenever it exists, can be computed directly by locally inverting a linear operator. Indeed, the coordinates of satisfying form a set , which defines a linear model which is invertible if .
In order to compare the stability of the half-rectification versus the full rectification, one can modify so that it maps and to the same point. If one considers
It results that the bi-Lipschitz bounds of the half-rectification operator, when considered in under the equivalence , are controlled by the bounds of the absolute value operator, up to a factor . However, the lower Lipschitz bound (11) consists in a minimum taken over a much smaller family of elements than in (5).
From its definition, it follows that pooling operators and can be expressed respectively as a function of phaseless and half-rectified operators, which implies that for the pooling to be invertible, it is necessary that the absolute value and rectified operators are invertible too. Naturally, the converse is not true.
thus contains all the orthogonal bases of each subspace .
The following proposition, proved in section B, computes upper and lower bounds of the Lipschitz constants of .
This proposition thus generalizes the results from (Cahill et al., 2013), since it shows that not only controls when is invertible, but also controls the stability of the inverse mapping.
Proposition 2.4 and Corollary 2.5 give a lower Lipschitz bound which gives sufficient guarantees for the inversion of pooling representations. Corollary 2.5 indicates that, in the case , the lower Lipschitz bounds are sharper than the non-rectified case, in consistency with the results of section 2.1. The general case remains an open issue.
We give in this section sufficient and necessary conditions such that the max-pooling operator is injective, and we compute a lower bound of its lower Lipschitz constant.
and as a result the input space is divided into a collection of Voronoi cells defined from linear equations. Restricted to each cone , the max-pooling operator computes the phaseless mapping from equation (3) corresponding to .
Given vectors and , as usual, set the angle For each such that and for each , we define
This is a modified first principal angle between the subspaces {\left.\kern-1.2pt{\mathcal{F}}_{s}\vphantom{\big{|}}\right|_{\Omega}} and {\left.\kern-1.2pt{\mathcal{F}}_{s^{\prime}}\vphantom{\big{|}}\right|_{\Omega}}, where the infimum is taken only on the directions included in the respective cones. Set \Lambda_{s,s^{\prime},\Omega}=\lambda_{-}({\left.\kern-1.2pt{\mathcal{F}}\vphantom{\big{|}}\right|_{\Omega}})\cdot\sin(\beta(s,s^{\prime},\Omega)).
Given , , we also define . Recall is the size of each pool. Set
The following proposition, proved in section B, gives a lower Lipschitz bound of the max-pooling operator.
For all and , the max-pooling operator satisfies
where .
Propostion 2.6 shows that the lower Lipschitz bound is controlled by two different phenomena. The first one depends upon how the cones corresponding to disjoint switches are aligned, whereas the second one depends on the internal incoherence of each frame . One may ask how do these constants evolve in different asymptotic regimes. For example, if one lets the number of pools be fixed but increases the size of each pool by increasing . In that case, the set of possible switches increases, and each cone gets smaller. The bound corresponding to decreases since the infimum is taken over a larger family. However, as the cones become smaller, the likelihood that any pair share the same switches decreases, thus giving more importance to the case . Although the ratio decreases, the lower frame bounds , will in general increase linearly with . The lower bound will thus mainly be driven by the principal angles . Although the minimum in (28) is taken over a larger family, each angle is computed over a smaller region of the space, suggesting that one can indeed increase the size of each pool without compromising the injectivity of the max-pooling.
Another asymptotic regime considers pools of fixed size and increases the number of pools . In that case, the bound increases as long as the principal angles remain lower bounded.
We also consider the stability of max-pooling with a half-rectification. By redefining the switches accordingly:
the following proposition, proved in section B, computes a lower bound of the Lipschitz constant of .
The rectified max-pooling operator satisfies
defined using the cones obtained from (18).
3 Random Pooling Operators
What is the minimum amount of redundancy needed to invert a pooling operator? As in previous works on compressed sensing (Candes and Tao, 2004) and phase recovery (Balan et al., 2006), one may address this question by studying random pooling operators. In this case, the lower Lipschitz bounds derived in previous sections can be shown to be positive with probability given appropriate parameters and .
The size of the pools does not influence the injectivity of random pooling, but it affects the stability of the inverse, as shown in proposition 2.6. The half-rectified case requires extra care, since the set of admissible switches might contain frames with columns with non-zero probability, and is not considered in the present work.
Numerical Experiments
A greedy method for recovering the phase from the modulus of complex measurements is given in (Gerchberg and Saxton, 1972); this method naturally extends to the case at hand. As above, denote the frame , let be the frame vectors in the th block, and set to be the indices of the th block. Let be the pseudoinverse of ; set . Starting with an initial signal , update
, ,
In the experiments below, we will use random, Gaussian i.i.d. , but also we will use the outputs of dictionary learning with block sparsity. The generated this way is not really a frame, as the condition number of a trained dictionary on real data is often very high. In this case, we will renormalize each data point to have norm , and modify the update to
.
In practice, this modification might not always be possible, since the norm is not explicitly presented in . However, in the classical setting of Fourier measurements and positive , this information is available. Moreover, our empirical experience has been that using this regularization on well conditioned analysis dictionaries offers no benefit; in particular, it gives no benefit with random analysis matrices.
1.2 Phaselift and Phasecut
1.3 Nearest neighbors regression
We would like to use the same basic algorithm for all settings to get an idea of the relative difficulty of the recovery problem for different , but also would like an algorithm with good recovery performance. If our algorithm simply returns poor results in each case, differences between the cases might be masked.
The alternating minimization can be very effective when well initialized. When given a training set of the data to recover, we use a simple regression to find . Fix a number of neighbors (in the experiments below we use , and suppose is the training set). Set , and for a new point to recover from , find the nearest neighbors in of , and take their principal component to serve as in the alternating minimization algorithm. We use the fast neighbor searcher from (Vedaldi and Fulkerson, 2008) to accelerate the search.
2 Experiments
We discuss results on the MNIST dataset, available at http://yann.lecun.com/exdb/mnist/, and on patches drawn from the VOC dataset, available at http://pascallin.ecs.soton.ac.uk/challenges/VOC/voc2012/. For each of these data sets, we run experiments with random dictionaries and adapted dictionaries. We also run experiments where the data and the dictionary are both Gaussian i.i.d.; in this case, we do not use adapted dictionaries.
In the experiments with adapted dictionaries, the dictionary is built using block OMP and batch updates with a K-SVD type update (Aharon et al., 2006); in this case, is the transpose of the learned dictionary. We again use groups of size in the adapted dictionary experiments.
We run two sets of experiments with Gaussian i.i.d. data and dictionaries, with and . We consider in the range from to . On this data set, phaselift outperforms alternating minimization; see the supplementary material.
We draw approximately 5 million grayscale image patches from the PASCAL VOC data set; these are sorted by variance, and the largest variance 1 million are kept. The mean is removed from each patch. These are split into a training set of 900000 patches and a test set of 100000 patches. In this experiment, we let range from 30 to 830. On this data set, by measurements, alternating minimization with nearest neighbor initialization recovers mean angle of ; for comparison, Phaselift at has mean angle of ; see the supplementary material.
3 Analysis
The experiments show (see figures 1 and 2) that:
For every data set, with random initializations and dictionaries, recovery is easier with half rectification before pooling than without (green vs dark blue in figures).
Good initialization improves performance; indeed, alternating minimization with nearest neighbor regression outperforms phaselift and phasecut (which of course do not have the luxury of samples from the prior, as the regressor does). We believe this of independent interest.
Adapted analysis “frames” (with regularization) are easier to invert than random analysis frames, with or without regularization (the bottom row of each pair of graphs vs the top row of each pair in Figure 2).
Each of these conclusions is unfortunately only true up to the optimization method- it may be true that a different optimizer will lead to different results. With learned initializations and alternating minimization, recovery results can be better without half rectification. Note this is only up until the point where the alternating minimization gets better than the learned initialization without any refinement, and is especially true for random dictionaries. The simple interpretation is that the reconstruction step 2 of the alternating minimization just does not have a large enough span with roughly half the entries removed; that is, this is an effect of the optimization, not of the difference between the difficulty of the problems.
Conclusion
However, we are not anywhere near where we would like to be in understanding these systems, or even the invertibility of the layers of these systems. This work gives little direct help to a practicioner asking the question “how should I design my network?”. In particular, our results just barely touch on the distribution of the data; but the experiments make it clear (see also (Ohlsson et al., 2012)) that knowing more information about the data changes the invertibility of the mappings. Moreover, preservation of information needs to be balanced against invariance, and the tension between these is not discussed in this work. Even in the setting of this work, without consideration of the data distribution or tension with invariance, Proposition 2.4 although tight, is not easy to use, and even though we are able to use 2.6 to get an invertibility result, it is probably not tight.
References
Appendix A Comparison between phaselift and the various alternating minimization algorithms
In figure of 3, we use random data and a random dictionary. As the data has no structure, we only compare against random initialization, with and without half rectification. We can see from figure 3 in this case, where we do not know a good way to initialize the alternating minimization, alternating minimization is significantly worse than phasecut. On the other hand, recovery after rectified pooling with alternating minimization does almost as well as phasecut.
In the examples where we have training data, shown in figure 4, alternating minimization with the nearest neighbor regressor (red curve) performs significantly better than phasecut (green and blue curves). Of course phasecut does not get the knowledge of the data distribution used to generate the regressor.
Appendix B Proofs of results in Section 2
which in particular implies that is known to lie in , the subspace generated by . But the restriction is a linear operator, which can be inverted in as long as \lambda_{-}({\left.\kern-1.2pt{\mathcal{F}}_{s(x)}\vphantom{\big{|}}\right|_{V_{S}}})\geq A_{0}>0.
Let us now show that is also necessary. Let us suppose that for some , is such that \lambda_{-}({\left.\kern-1.2pt{\mathcal{F}}_{S}\vphantom{\big{|}}\right|_{V_{S}}})=0. It results that there exists such that but . Since is a cone, we can find and small enough such that . It results that which implies that cannot be injective.
Finally, let us prove (9). If are such that , then
If , we have that if and if , . It results that
B.2 Proof of Proposition 2.4
The upper Lipschitz bound is obtained by observing that, in dimension ,
which implies, by denoting , that . Since , it results from Proposition 2.1 that
B.3 Proof of Corollary 2.5
Given , let denote the groups , such that . It results that
Finally, the upper Lipschitz bound is obtained by noting that
and using the same argument as in (B.2) .
B.4 Proof of Proposition 2.6
by Proposition 2.1 and by definition (LABEL:mpool_bobo).
We shall concentrate in each restriction independently. Since {\left.\kern-1.2pt{\mathcal{F}}_{s(x^{\prime})}\vphantom{\big{|}}\right|_{\Omega}}(x^{\prime})\in{\left.\kern-1.2pt{\mathcal{F}}_{s(x^{\prime})}\vphantom{\big{|}}\right|_{\Omega}}({\mathcal{C}}_{s(x^{\prime})}), it results that
it results, assuming without loss of generality that all pools have equal size ( ,
Equivalently, since {\left.\kern-1.2pt{\mathcal{F}}_{s(x)}\vphantom{\big{|}}\right|_{\Omega}}(x)\in{\left.\kern-1.2pt{\mathcal{F}}_{s(x)}\vphantom{\big{|}}\right|_{\Omega}}({\mathcal{C}}_{s(x)}) we also have
By aggregating the bound for and we obtain (28) .
These results easily extend to the so-called Maxout operator [Goodfellow et al., 2013], defined as . By redefining the switches of as
the following corollary computes a Lower Lipschitz bound of :
The Maxout operator satisfies (19) with defined using the switches (27).
It results that , with
Each pool can be rewritten as , where is the Hadamard matrix whose rows contain the vectors. One can verify that , which implies that for any , \lambda_{-}({\left.\kern-1.2pt\widetilde{{\mathcal{F}}}\vphantom{\big{|}}\right|_{\Omega}})=2^{L/2}\lambda_{-}({\left.\kern-1.2pt{{\mathcal{F}}}\vphantom{\big{|}}\right|_{\Omega}}). It results that
where and
with and are defined on the frame .
B.5 Proof of Corollaries 2.7 and B.1
The result follows immediately from Proposition 2.6, by replacing the phaseless invertibility condition of Propostion 2.1 by the one in Proposition 2.2. .
B.6 Proof of Proposition 2.8
Proposition 2.8 also extends to the maxout case. We restate it here with the extra result:
is injective (modulo ) if for , and if for .
The Maxout operator is injective if .
Let us now prove the case . We start drawing a random basis for each of the pools . From proposition 2.4, it follows that we have to check that if , the quantity
with probability . If , it follows that either has the property that it intersects at least pools, either intersects pools. Say it is . Now, for each pool with nonzero intersection, say , we have that
for some belonging to the initial random basis of . It results that
where is a subset of columns of the original frame , which means
Appendix C Notes on changes from cycle 1
The mathematical results have been essentially rewritten, for clarity as well as to sharpen the bounds. The proofs are now in the supplementary material, as requested by the reviewers. We have used the extra space to expand the indroduction, conclusion, and intro to the experiments, in part to to explain the connections between the theoretical and experimental parts of the paper, as requested by the reviewers. We also added results on the invertibility of random modules.
We have edited the text in the experiments section and in the captions of the figures to clarify them. Each curve is described in the caption and the text; the graphs are also now specifically referenced in the analysis bullets in section 3.3.
The introduction and conclusion more explicitly address take messages. Note that the take home message is not of the form “this is how to design a network”, but rather, “these conditions allow (stable) inversion”. We are sympathetic to the reviewers desire for a take home message giving insight into the actual design of networks for practical applications. That is, of course, the ultimate goal of a mathematical analysis of a learning algorithm. However, if the standard for theoretical papers analyzing deep models is that they lead immediately to design suggestions with associated performance increases on benchmarks, it is unlikely that there will ever be a mature enough theory to give honest design suggestions.
Finally, we reprint larger versions of the figures below.