Topology and Geometry of Half-Rectified Network Optimization

C. Daniel Freeman, Joan Bruna

Introduction

Optimization is a critical component in deep learning, governing its success in different areas of computer vision, speech processing and natural language processing. The prevalent optimization strategy is Stochastic Gradient Descent, invented by Robbins and Munro in the 50s. The empirical performance of SGD on these models is better than one could expect in generic, arbitrary non-convex loss surfaces, often aided by modifications yielding significant speedups Duchi et al. , (2011); Hinton et al. , (2012); Ioffe & Szegedy, (2015); Kingma & Ba, (2014). This raises a number of theoretical questions as to why neural network optimization does not suffer in practice from poor local minima.

The loss surface of deep neural networks has recently attracted interest in the optimization and machine learning communities as a paradigmatic example of a hard, high-dimensional, non-convex problem. Recent work has explored models from statistical physics such as spin glasses Choromanska et al. , (2015), in order to understand the macroscopic properties of the system, but at the expense of strongly simplifying the nonlinear nature of the model. Other authors have advocated that the real danger in high-dimensional setups are saddle points rather than poor local minima Dauphin et al. , (2014), although recent results rigorously establish that gradient descent does not get stuck on saddle points Lee et al. , (2016) but merely slowed down. Other notable recent contributions are Kawaguchi, (2016), which further develops the spin-glass connection from Choromanska et al. , (2015) and resolves the linear case by showing that no poor local minima exist; Sagun et al. , (2014) which also discusses the impact of stochastic vs plain gradient, Soudry & Carmon, (2016), that studies Empirical Risk Minimization for piecewise multilayer neural networks under overparametrization (which needs to grow with the amount of available data), and Goodfellow et al. , (2014), which provided insightful intuitions on the loss surface of large deep learning models and partly motivated our work. Additionally, the work Safran & Shamir, (2015) studies some topological properties of homogeneous nonlinear networks and shows how overparametrization acts upon these properties, and the pioneering Shamir, (2016) studied the distribution-specific hardness of optimizing non-convex objectives. Lastly, several papers submitted concurrently and independently of this one deserve note, particularly Swirszcz et al. , (2016) which analyzes the explicit criteria under which sigmoid-based neural networks become trapped by poor local minima, as well as Tian, (2017), which offers a complementary study of two layer ReLU based networks, and their learning dynamics.

In this work, we do not make any linearity assumption and study conditions on the data distribution and model architecture that prevent the existence of bad local minima. The loss surface F(θ)F(\theta) of a given model can be expressed in terms of its level sets Ωλ\Omega_{\lambda}, which contain for each energy level λ\lambda all parameters θ\theta yielding a loss smaller or equal than λ\lambda. A first question we address concerns the topology of these level sets, i.e. under which conditions they are connected. Connected level sets imply that one can always find a descent direction at each energy level, and therefore that no poor local minima can exist. In absence of nonlinearities, deep (linear) networks have connected level sets Kawaguchi, (2016). We first generalize this result to include ridge regression (in the two layer case) and provide an alternative, more direct proof of the general case. We then move to the half-rectified case and show that the topology is intrinsically different and clearly dependent on the interplay between data distribution and model architecture. Our main theoretical contribution is to prove that half-rectified single layer networks are asymptotically connected, and we provide explicit bounds that reveal the aforementioned interplay.

Beyond the question of whether the loss contains poor local minima or not, the immediate follow-up question that determines the convergence of algorithms in practice is the local conditioning of the loss surface. It is thus related not to the topology but to the shape or geometry of the level sets. As the energy level decays, one expects the level sets to exhibit more complex irregular structures, which correspond to regions where F(θ)F(\theta) has small curvature. In order to verify this intuition, we introduce an efficient algorithm to estimate the geometric regularity of these level sets by approximating geodesics of each level set starting at two random boundary points. Our algorithm uses dynamic programming and can be efficiently deployed to study mid-scale CNN architectures on MNIST, CIFAR-10 and RNN models on Penn Treebank next word prediction. Our empirical results show that these models have a nearly convex behavior up until their lowest test errors, with a single connected component that becomes more elongated as the energy decays. The rest of the paper is structured as follows. Section 2 presents our theoretical results on the topological connectedness of multilayer networks. Section 3 presents our path discovery algorithm and Section 4 covers the numerical experiments.

Topology of Level Sets

Let PP be a probability measure on a product space X×Y\mathcal{X}\times\mathcal{Y}, where we assume X\mathcal{X} and Y\mathcal{Y} are Euclidean vector spaces for simplicity. Let {(xi,yi)}i\{(x_{i},y_{i})\}_{i} be an iid sample of size LL drawn from PP defining the training set. We consider the classic empirical risk minimization of the form

We define the level set of F(θ)F(\theta) as

If ΩF(λ)\Omega_{F}(\lambda) is connected for all λ\lambda then every local minima of F(θ)F(\theta) is a global minima.

Strict local minima implies that ∇F(θ)=0\nabla F(\theta)=0 and HF(θ)⪰0HF(\theta)\succeq 0, but avoids degenerate cases where FF is constant along a manifold intersecting θ\theta. In that scenario, if Uθ\mathcal{U}_{\theta} denotes that manifold, our reasoning immediately implies that if ΩF(λ)\Omega_{F}(\lambda) are connected, then for all ϵ>0\epsilon>0 there exists θ′\theta^{\prime} with dist(θ′,Uθ)≤ϵ\text{dist}(\theta^{\prime},\mathcal{U}_{\theta})\leq\epsilon and F(θ′)<F(θ)F(\theta^{\prime})<F(\theta). In other words, some element at the boundary of Uθ\mathcal{U}_{\theta} must be a saddle point. A stronger property that eliminates the risk of gradient descent getting stuck at Uθ\mathcal{U}_{\theta} is that all elements at the boundary of Uθ\mathcal{U}_{\theta} are saddle points. This can be guaranteed if one can show that there exists a path connecting any θ\theta to the lowest energy level such that FF is strictly decreasing along it.

In particular, Uθ\mathcal{U}_{\theta} has a Lie Group structure. In the half-rectified nonlinear case, the general linear group is replaced by the Lie group of homogeneous invertible matrices Fk=diag(α1,…,αNk)F_{k}=\text{diag}(\alpha_{1},\dots,\alpha_{N_{k}}) with αj>0\alpha_{j}>0.

This proposition shows that a sufficient condition to prevent the existence of poor local minima is having connected level sets, but this condition is not necessary: one can have isolated local minima lying at the same energy level. This can be the case in systems that are defined up to a discrete symmetry group, such as multilayer neural networks. However, as we shall see next, this case puts the system in a brittle position, since one needs to be able to account for all the local minima (and there can be exponentially many of them as the parameter dimensionality increases) and verify that their energy is indeed equal.

2 The Linear Case

We first consider the particularly simple case where FF is a multilayer network defined by

and the ridge regression R(θ)=∥θ∥2\mathcal{R}(\theta)=\|\theta\|^{2}. This model defines a non-convex (and non-concave) loss Fe(θ)F_{e}(\theta). When κ=0\kappa=0, it has been shown in Saxe et al. , (2013) and Kawaguchi, (2016) that in this case, every local minima is a global minima. We provide here an alternative proof of that result that uses a somewhat simpler argument and allows for κ>0\kappa>0 in the case K=2K=2.

Let W1,W2,…,WKW_{1},W_{2},\dots,W_{K} be weight matrices of sizes nk×nk+1n_{k}\times n_{k+1}, k<Kk<K, and let Fe(θ)F_{e}(\theta), Fo(θ)F_{o}(\theta) denote the risk minimizations using Φ\Phi as in (4). Assume that nj>min⁡(n1,nK)n_{j}>\min(n_{1},n_{K}) for j=2…K−1j=2\dots K-1. Then ΩFe(λ)\Omega_{F_{e}}(\lambda) (and ΩFo\Omega_{F_{o}}) is connected for all λ\lambda and all KK when κ=0\kappa=0, and for κ>0\kappa>0 when K=2K=2; and therefore there are no poor local minima in these cases. Moreover, any θ\theta can be connected to the lowest energy level with a strictly decreasing path.

Let us highlight that this result is slightly complementary than that of Kawaguchi, (2016), Theorem 2.3. Whereas we require nj>min⁡(n1,nK)n_{j}>\min(n_{1},n_{K}) for j=2…K−1j=2\dots K-1 and our analysis does not inform about the order of the saddle points, we do not need full rank assumptions on ΣX\Sigma_{X} nor the weights WkW_{k}.

This result does also highlight a certain mismatch between the picture of having no poor local minima and generalization error. Incorporating regularization drastically changes the topology, and the fact that we are able to show connectedness only in the two-layer case with ridge regression is profound; we conjecture that extending it to deeper models requires a different regularization, perhaps using more general atomic norms Bach, (2013). But we now move our interest to the nonlinear case, which is more relevant to our purposes.

3 Half-Rectified Nonlinear Case

where ρ(z)=max⁡(0,z)\rho(z)=\max(0,z). The biases can be implemented by replacing the input vector xx with x‾=(x,1)\overline{x}=(x,1) and by rebranding each parameter matrix as

where bib_{i} contains the biases for each layer. For simplicity, we continue to use WiW_{i} and xx in the following.

By adjusting the mixture component π\pi we can clearly change the risk at θ\theta and θ′\theta^{\prime} and make them different, but we conjecture that this preserves the status of local minima of θ\theta and θ′\theta^{\prime}. Appendix E constructs a counter-example numerically.

This illustrates an intrinsic difficulty in the optimization landscape if one is after universal guarantees that do not depend upon the data distribution. This difficulty is non-existent in the linear case and not easy to exploit in mean-field approaches such as Choromanska et al. , (2015), and shows that in general we should not expect to obtain connected level sets. However, connectedness can be recovered if one is willing to accept a small increase of energy and make some assumptions on the complexity of the regression task. Our main result shows that the amount by which the energy is allowed to increase is upper bounded by a quantity that trades-off model overparametrization and smoothness in the data distribution.

3.2 Preliminaries

Before proving our main result, we need to introduce preliminary notation and results. We first describe the case with a single hidden layer of size mm.

to be the oracle risk using mm hidden units with norm ≤1\leq 1 and using sparse regression. It is a well known result by Hornik and Cybenko that a single hidden layer is a universal approximator under very mild assumptions, i.e. lim⁡m→∞e(m)=0\lim_{m\to\infty}e(m)=0. This result merely states that our statistical setup is consistent, and it should not be surprising to the reader familiar with classic approximation theory. A more interesting question is the rate at which e(m)e(m) decays, which depends on the smoothness of the joint density (X,Y)∼P(X,Y)\sim P relative to the nonlinear activation family we have chosen.

Let α=cos⁡−1(⟨w1,w2⟩)\alpha=\cos^{-1}(\langle w_{1},w_{2}\rangle) be the angle between unitary vectors w1w_{1} and w2w_{2} and let wm=w1+w2∥w1+w2∥w_{m}=\frac{w_{1}+w_{2}}{\|w_{1}+w_{2}\|} be their unitary bisector. Then

The term ∥ΣX∥\|\Sigma_{X}\| is overly pessimistic: we can replace it by the energy of XX projected into the subspace spanned by w1w_{1} and w2w_{2} (which is bounded by 2∥ΣX∥2\|\Sigma_{X}\|). When α\alpha is small, a Taylor expansion of the trigonometric terms reveals that

The local behavior of parameters w1,w2w_{1},w_{2} on our regression problem is thus equivalent to that of having a linear layer, provided w1w_{1} and w2w_{2} are sufficiently close to each other. This result can be seen as a spoiler of what is coming: increasing the hidden layer dimensionality mm will increase the chances to encounter pairs of vectors w1,w2w_{1},w_{2} with small angle; and with it some hope of approximating the previous linear behavior thanks to the small linearization error.

This quantity thus measures how easily one can compress the current hidden layer representation, by keeping only a subset of ll its units, but allowing these units to move by a small amount controlled by α\alpha. It is a form of nn-width similar to Kolmogorov width Donoho, (2006) and is also related to robust sparse coding from Tang et al. , (2013); Ekanadham et al. , (2011).

3.3 Main result

Our main result considers now a non-asymptotic scenario given by some fixed size mm of the hidden layer. Given two parameter values θA=(W1A,W2A)∈W\theta^{A}=(W_{1}^{A},W_{2}^{A})\in\mathcal{W} and θB=(W1B,W2B)\theta^{B}=(W_{1}^{B},W_{2}^{B}) with Fo(θ{A,B})≤λF_{o}(\theta^{\{A,B\}})\leq\lambda, we show that there exists a continuous path γ:→W\gamma:\to\mathcal{W} connecting θA\theta^{A} and θB\theta^{B} such that its oracle risk is uniformly bounded by max⁡(λ,ϵ)\max(\lambda,\epsilon), where ϵ\epsilon decreases with model overparametrization.

where C1C_{1} is an absolute constant depending only on κ\kappa and PP.

As mm increases, the energy gap ϵ\epsilon satisfies ϵ=O(m−1n)\epsilon=O(m^{-\frac{1}{n}}) and therefore the level sets become connected at all energy levels.

This is consistent with the overparametrization results from Safran & Shamir, (2015); Shamir, (2016) and the general common knowledge amongst deep learning practitioners. Our next sections explore this question, and refine it by considering not only topological properties but also some rough geometrical measure of the level sets.

Geometry of Level Sets

The intuition behind our main result is that, for smooth enough loss functions and for sufficient overparameterization, it should be “easy” to connect two equally powerful models—i.e., two models with FoθA,B≤λF_{o}{\theta^{A,B}}\leq\lambda. A sensible measure of this ease-of-connectedness is the normalized length of the geodesic connecting one model to the other: ∣γA,B(t)∣/∣θA−θB∣|\gamma_{A,B}(t)|/|\theta_{A}-\theta_{B}|. This length represents approximately how far of an excursion one must make in the space of models relative to the euclidean distance between a pair of models. Thus, convex models have a geodesic length of 11, because the geodesic is simply linear interpolation between models, while more non-convex models have geodesic lengths strictly larger than 11.

Because calculating the exact geodesic is difficult, we approximate the geodesic paths via a dynamic programming approach we call Dynamic String Sampling. We comment on alternative algorithms in Appendix A.

For a pair of models with network parameters θi\theta_{i}, θj\theta_{j}, each with Fe(θ)F_{e}(\theta) below a threshold L0L_{0}, we aim to efficienly generate paths in the space of weights where the empirical loss along the path remains below L0L_{0}. These paths are continuous curves belonging to ΩF(λ)\Omega_{F}(\lambda)–that is, the level sets of the loss function of interest.

The algorithm recursively builds a string of models in the space of weights which continuously connect θi\theta_{i} to θj\theta_{j}. Models are added and trained until the pairwise linearly interpolated loss, i.e. maxtFe(tθi + (1−t)θj)\rm{max}_{t}F_{e}(t\theta_{i}\ +\ (1-t)\theta_{j}) for t∈(0,1)t\in(0,1), is below the threshold, L0L_{0}, for every pair of neighboring models on the string. We provide a cartoon of the algorithm in Appendix C.

2 Failure Conditions and Practicalities

While the algorithm presented will faithfully certify two models are connected if the algorithm converges, it is worth emphasizing that the algorithm does not guarantee that two models are disconnected if the algorithm fails to converge. In general, the problem of determining if two models are connected can be made arbitrarily difficult by choice of a particularly pathological geometry for the loss function, so we are constrained to heuristic arguments for determining when to stop running the algorithm. Thankfully, in practice, loss function geometries for problems of interest are not intractably difficult to explore. We comment more on diagnosing disconnections more carefully in Appendix E.

Further, if the MaxError\rm{\mathbf{MaxError}} exceeds L0L_{0} for every new recursive branch as the algorithm progresses, the worst case runtime scales as O(exp(Depth))O(\rm{exp}(\rm{\mathbf{Depth}})). Empirically, we find that the number of new models added at each depth does grow, but eventually saturates, and falls for a wide variety of models and architectures, so that the typical runtime is closer to O(poly(Depth))O(\rm{poly}(\rm{\mathbf{Depth}}))—at least up until a critical value of L0L_{0}.

To aid convergence, either of the choices in line 77 of the algorithm works in practice—choosing t∗t^{*} at a local maximum can provide a modest increase in algorithm runtime, but can be unstable if the the calculated interpolated loss is particularly flat or noisy. t∗=.5t^{*}=.5 is more stable, but slower. Finally, we find that training Φ3\Phi_{3} to αL0\alpha L_{0} for α<1\alpha<1 in line 88 of the algorithm tends to aid convergence without noticeably impacting our numerics. We provide further implementation details in 4.

Numerical Experiments

For our numerical experiments, we calculated normalized geodesic lengths for a variety of regression and classification tasks. In practice, this involved training a pair of randomly initialized models to the desired test loss value/accuracy/perplexity, and then attempting to connect that pair of models via the Dynamic String Sampling algorithm. We also tabulated the average number of “beads”, or the number intermediate models needed by the algorithm to connect two initial models. For all of the below experiments, the reported losses and accuracies are on a restricted test set. For more complete architecture and implementation details, see our GitHub page.

The results are broadly organized by increasing model complexity and task difficulty, from easiest to hardest. Throughout, and remarkably, we were able to easily connect models for every dataset and architecture investigated except the one explicitly constructed counterexample discussed in Appendix E.1. Qualitatively, all of the models exhibit a transition from a highly convex regime at high loss to a non-convex regime at low loss, as demonstrated by the growth of the normalized length as well as the monotonic increase in the number of required “beads” to form a low-loss connection.

We studied a 1-4-4-1 fully connected multilayer perceptron style architecture with sigmoid nonlinearities and RMSProp/ADAM optimization. For ease-of-analysis, we restricted the training and test data to be strictly contained in the interval x∈x\in and f(x)∈f(x)\in. The number of required beads, and thus the runtime of the algorithm, grew approximately as a power-law, as demonstrated in Table 1 Fig. 1. We also provide a visualization of a representative connecting path between two models of equivalent power in Appendix D.

The cubic regression task exhibits an interesting feature around L0=.15L_{0}=.15 in Table 1 Fig. 2, where the normalized length spikes, but the number of required beads remains low. Up until this point, the cubic model is strongly convex, so this first spike seems to indicate the onset of non-convex behavior and a concomitant radical change in the geometry of the loss surface for lower loss.

2 Convolutional Neural Networks

To test the algorithm on larger architectures, we ran it on the MNIST hand written digit recognition task as well as the CIFAR10 image recognition task, indicated in Table 1, Figs. 3 and 4. Again, the data exhibits strong qualitative similarity with the previous models: normalized length remains low until a threshold loss value, after which it grows approximately as a power law. Interestingly, the MNIST dataset exhibits very low normalized length, even for models nearly at the state of the art in classification power, in agreement with the folk-understanding that MNIST is highly convex and/or “easy”. The CIFAR10 dataset, however, exhibits large non-convexity, even at the modest test accuracy of 80%.

3 Recurrent Neural Networks

To gauge the generalizability of our algorithm, we also applied it to an LSTM architecture for solving the next word prediction task on the PTB dataset, depicted in Table 1 Fig. 5. Noteably, even for a radically different architecture, loss function, and data set, the normalized lengths produced by the DSS algorithm recapitulate the same qualitative features seen in the above datasets—i.e., models can be easily connected at high perplexity, and the normalized length grows at lower and lower perplexity after a threshold value, indicating an onset of increased non-convexity of the loss surface.

Discussion

We have addressed the problem of characterizing the loss surface of neural networks from the perspective of gradient descent algorithms. We explored two angles – topological and geometrical aspects – that build on top of each other.

On the one hand, we have presented new theoretical results that quantify the amount of uphill climbing that is required in order to progress to lower energy configurations in single hidden-layer ReLU networks, and proved that this amount converges to zero with overparametrization under mild conditions. On the other hand, we have introduced a dynamic programming algorithm that efficiently approximates geodesics within each level set, providing a tool that not only verifies the connectedness of level sets, but also estimates the geometric regularity of these sets. Thanks to this information, we can quantify how ‘non-convex’ an optimization problem is, and verify that the optimization of quintessential deep learning tasks – CIFAR-10 and MNIST classification using CNNs, and next word prediction using LSTMs – behaves in a nearly convex fashion up until they reach high accuracy levels.

That said, there are some limitations to our framework. In particular, we do not address saddle-point issues that can greatly affect the actual convergence of gradient descent methods. There are also a number of open questions; amongst those, in the near future we shall concentrate on:

Extending Theorem 2.4 to the multilayer case. We believe this is within reach, since the main analytic tool we use is that small changes in the parameters result in small changes in the covariance structure of the features. That remains the case in the multilayer case.

Empirical versus Oracle Risk. A big limitation of our theory is that right now it does not inform us on the differences between optimizing the empirical risk versus the oracle risk. Understanding the impact of generalization error and stochastic gradient in the ability to do small uphill climbs is an open line of research.

Influence of symmetry groups. Under appropriate conditions, the presence of discrete symmetry groups does not prevent the loss from being connected, but at the expense of increasing the capacity. An important open question is whether one can improve the asymptotic properties by relaxing connectedness to being connected up to discrete symmetry.

Improving numerics with Hyperplane method. Our current numerical experiments employ a greedy (albeit faster) algorithm to discover connected components and estimate geodesics. We plan to perform experiments using the less greedy algorithm described in Appendix A.

We would like to thank Mark Tygert for pointing out the reference to the ϵ\epsilon-nets and Kolmogorov capacity, and Martin Arjovsky for spotting several bugs in early version of the results. We would also like to thank Maithra Raghu and Jascha Sohl-Dickstein for enlightening discussions, as well as Yasaman Bahri for helpful feedback on an early version of the manuscript. CDF was supported by the NSF Graduate Research Fellowship under Grant DGE-1106400.

References

Appendix A Constrained Dynamic String Sampling

While the algorithm presented in Sec. 3.1 is fast for sufficiently smooth families of loss surfaces with few saddle points, here we present a slightly modified version which, while slower, provides more control over the convergence of the string. We did not use the algorithm presented in this section for our numerical studies.

Instead of training intermediate models via full SGD to a desired accuracy as in step 88 of the algorithm, intermediate models are be subject to a constraint that ensures they are “close” to the neighboring models on the string. Specifically, intermediate models are constrained to the unique hyperplane in weightspace equidistant from its two neighbors. This can be further modified by additional regularization terms to control the “springy-ness” of the string. These heuristics could be chosen to try to more faithfully sample the geodesic between two models.

Because adapting DSS to use this constraint is straightforward, here we will describe an alternative “breadth-first” approach wherein models are trained in parallel until convergence. This alternative approach has the advantage that it will indicate a disconnection between two models “sooner” in training. The precise geometry of the loss surface will dictate which approach to use in practice.

Given two random models σi\sigma_{i} and σj\sigma_{j} where ∣σi−σj∣<L0|\sigma_{i}-\sigma_{j}|<L_{0}, we aim to follow the evolution of the family of models connecting σi\sigma_{i} to σj\sigma_{j}. Intuitively, almost every continuous path in the space of random models connecting σi\sigma_{i} to σj\sigma_{j} has, on average, the same (high) loss. For simplicity, we choose to initialize the string to the linear segment interpolating between these two models. If this entire segment is evolved via gradient descent, the segment will either evolve into a string which is entirely contained in a basin of the loss surface, or some number of points will become fixed at a higher loss. These fixed points are difficult to detect directly, but will be indirectly detected by the persistence of a large interpolated loss between two adjacent models on the string.

(0.) Initialize model string to have two models, σi\sigma_{i} and σj\sigma_{j}.

1. Begin training all models to the desired loss, keeping the instantaneous loss, L0(t)L_{0}(t), of all models being trained approximately constant.

2. If the pairwise interpolated loss between σn\sigma_{n} and σn+1\sigma_{n+1} exceeds L0(t)L_{0}(t), insert a new model at the maximum of the interpolated loss (or halfway) between these two models.

3. Repeat steps (1) and (2) until all models (and interpolated errors) are below a threshold loss L0(tfinal):=L0L_{0}(t_{\rm{final}}):=L_{0}, or until a chosen failure condition (see 3.2).

Appendix B Proofs

Suppose that θ1\theta_{1} is a local minima and θ2\theta_{2} is a global minima, but F(θ1)>F(θ2)F(\theta_{1})>F(\theta_{2}). If λ=F(θ1)\lambda=F(\theta_{1}), then clearly θ1\theta_{1} and θ2\theta_{2} both belong to ΩF(λ)\Omega_{F}(\lambda). Suppose now that ΩF(λ)\Omega_{F}(\lambda) is connected. Then we could find a smooth (i.e. continuous and differentiable) path γ(t)\gamma(t) with γ(0)=θ1\gamma(0)=\theta_{1}, γ(1)=θ2\gamma(1)=\theta_{2} and F(γ(t))≤λ=F(θ1)F(\gamma(t))\leq\lambda=F(\theta_{1}). But this contradicts the strict local minima status of θ1\theta_{1}, and therefore ΩF(λ)\Omega_{F}(\lambda) cannot be connected □\square.

B.2 Proof of Proposition 2.2

Let us first consider the case with κ=0\kappa=0. We proceed by induction over the number of layers KK. For K=1K=1, the loss F(θ)F(\theta) is convex. Let θA\theta^{A}, θB\theta^{B} be two arbitrary points in a level set Ωλ\Omega_{\lambda}. Thus F(θA)≤λF(\theta^{A})\leq\lambda and F(θB)≤λF(\theta^{B})\leq\lambda. By definition of convexity, a linear path is sufficient in that case to connect θA\theta^{A} and θB\theta^{B}:

Wk∗−1(0)=Wk∗−1AW_{k^{*}-1}(0)=W_{k^{*}-1}^{A}, Wk∗−1(1)=Wk∗−1BW_{k^{*}-1}(1)=W_{k^{*}-1}^{B},

Wk∗(0)=Wk∗AW_{k^{*}}(0)=W_{k^{*}}^{A}, Wk∗(1)=Wk∗BW_{k^{*}}(1)=W_{k^{*}}^{B},

Wk∗−1(t)W_{k^{*}-1}(t) has the property that Wk∗−1(0)=Wk∗−1AW_{k^{*}-1}(0)=W_{k^{*}-1}^{A}, Wk∗−1(1)=Wk∗−1BW_{k^{*}-1}(1)=W_{k^{*}-1}^{B}. Thanks to the fact that rank(Wk∗−1(t))=m\text{rank}(W_{k^{*}-1}(t))=m for all t∈(0,1)t\in(0,1), there exists Wk∗(t)W_{k^{*}}(t) such that

Finally, we need to show that the path Wk∗(t)W_{k^{*}}(t) is continuous and satisfies Wk∗(0)=Wk∗AW_{k^{*}}(0)=W_{k^{*}}^{A}, Wk∗(1)=Wk∗BW_{k^{*}}(1)=W_{k^{*}}^{B}. Since by construction the paths are continuous in t∈(0,1)t\in(0,1), it only remains to be shown that

Finally, if either rank(Wk∗−1A)<m\text{rank}(W_{k^{*}-1}^{A})<m or rank(Wk∗−1B)<m\text{rank}(W_{k^{*}-1}^{B})<m, we denote by PAP_{A} (resp PBP_{B}) the orthogonal complement of span(Wk∗−1A)\text{span}(W_{k^{*}-1}^{A}) (resp span(Wk∗−1B)\text{span}(W_{k^{*}-1}^{B})), and by QAQ_{A} (resp QBQ_{B}) the orthogonal complement of Null(Wk∗A)\text{Null}(W_{k^{*}}^{A}) (resp Null(Wk∗B)\text{Null}(W_{k^{*}}^{B})). Observe that if either QAQ_{A} intersects with PAP_{A} (resp QBQ_{B} intersects with PBP_{B}), we can shrink Wk∗AW_{k^{*}}^{A} in the intersection with no effect in the loss. We can thus assume without loss of generality that PA∩QA=∅P_{A}\cap Q_{A}=\emptyset. In that case, increasing the range of Wk∗−1AW_{k*-1}^{A} until it has rank mm has no effect in the loss either, since the new directions will fall in the kernel of Wk∗AW_{k^{*}}^{A}. Therefore, by applying the necessary corrections to Wk∗−1AW_{k*-1}^{A} and Wk∗AW_{k*}^{A} (resp Wk∗−1BW_{k*-1}^{B} and Wk∗BW_{k*}^{B}) we can reduce ourselves to the previous case.

Finally, let us prove that the result is also true when K=2K=2 and κ>0\kappa>0. We construct the path using the variational properties of atomic norms . When we pick the ridge regression regularization, the corresponding atomic norm is the nuclear norm:

One can verify that we can first consider a path (β1A(s),β2A(s))(\beta^{A}_{1}(s),\beta^{A}_{2}(s)) from (W1A,W2A)(W_{1}^{A},W_{2}^{A}) to (W1(0),W2(0)(W_{1}(0),W_{2}(0) such that

and similarly for (W1B,W2B)(W_{1}^{B},W_{2}^{B}) to (W1(1),W2(1)(W_{1}(1),W_{2}(1). The path (β{1,2}A(s),W{1,2}(t),β{1,2}B(s))(\beta_{\{1,2\}}^{A}(s),W_{\{1,2\}}(t),\beta_{\{1,2\}}^{B}(s)) satisfies (i-iii) by definition. We also verify that

Finally, we verify that the paths we have just created, when applied to θA\theta^{A} arbitrary and θB=θ∗\theta^{B}=\theta^{*} a global minimum, are strictly decreasing, again by induction. For K=1K=1, this is again an immediate consequence of convexity. For K>1K>1, our inductive construction guarantees that for any 0<t<10<t<1, the path θ(t)=(Wk(t))k≤K\theta(t)=(W_{k}(t))_{k\leq K} satisfies Fo(θ(t))<Fo(θA)F_{o}(\theta(t))<F_{o}(\theta^{A}). This concludes the proof □\square.

B.3 Proof of Proposition 2.3

where QQ is the orthogonal projection onto the space spanned by w1w_{1} and w2w_{2} and dPˉ(x)=dPˉ(x1,x2)d\bar{P}(x)=d\bar{P}(x_{1},x_{2}) is the marginal density on that subspace. Since this projection does not interfere with the rest of the proof, we abuse notation by dropping the QQ and still referring to dP(x)dP(x) as the probability density.

Now, let r=12∥w1+w2∥=1+cos⁡(α)2r=\frac{1}{2}\|w_{1}+w_{2}\|=\frac{1+\cos(\alpha)}{2} and d=w2−w12d=\frac{w_{2}-w_{1}}{2}. By construction we have

We conclude by bounding each error term E1E_{1} and E2E_{2} separately:

since every point in BB by definition has angle greater than π/2−α\pi/2-\alpha from wmw_{m}. Also,

by direct application of Cauchy-Schwartz. The proof is completed by plugging the bounds from (22) and (23) into (B.3) □\square.

B.4 Proof of Theorem 2.4

Consider a generic α\alpha and l≤ml\leq m. A path from θA\theta^{A} to θB\theta^{B} will be constructed by concatenating the following paths:

from θA\theta^{A} to θlA\theta_{lA}, the best linear predictor using the same first layer as θA\theta^{A},

from θlA\theta_{lA} to θsA\theta_{sA}, the best (m−l)(m-l)-term approximation using perturbed atoms from θA\theta^{A},

from θsA\theta_{sA} to θ∗\theta^{*} the oracle ll term approximation,

from θ∗\theta^{*} to θsB\theta_{sB}, the best (m−l)(m-l)-term approximation using perturbed atoms from θB\theta^{B},

from θsB\theta_{sB} to θlB\theta_{lB}, the best linear predictor using the same first layer as θB\theta^{B},

The proof will study the increase in the loss along each subpath and aggregate the resulting increase into a common bound.

Subpaths (1) and (6) only involve changing the parameters of the second layer while leaving the first-layer weights fixed, which define a convex loss. Therefore a linear path is sufficient to guarantee that the loss along that path will be upper bounded by λ\lambda on the first end and δW1A(m,0,m)\delta_{W_{1}^{A}}(m,0,m) on the other end.

and similarly for β‾2\overline{\beta}_{2}. By convexity, the augmented linear path η(t)=(1−t)β‾1+tβ‾2\eta(t)=(1-t)\overline{\beta}_{1}+t\overline{\beta}_{2} thus satisfies

Let us now approximate this augmented linear path with a path in terms of first and second layer weights. We consider

Indeed, from Proposition 2.3, and using the fact that

We have just constructed a path from θA\theta^{A} to θB\theta^{B}, in which all subpaths except (2) and (5) have energy maximized at the extrema due to convexity, given respectively by λ\lambda, δWA1(m,0,m)\delta_{W_{A}^{1}}(m,0,m), δWA1(m−l,α,m)\delta_{W_{A}^{1}}(m-l,\alpha,m), e(l)e(l), δWB1(m−l,α,m)\delta_{W_{B}^{1}}(m-l,\alpha,m), and δWB1(m,0,m)\delta_{W_{B}^{1}}(m,0,m). For the two subpaths (2) and (5), (26) shows that it is sufficient to add the corresponding upper bound to the linear subpath, which is of the form Cα+o(α2)C\alpha+o(\alpha^{2}) where CC is an explicit constant independent of θ\theta. Since ll and α\alpha are arbitrary, we are free to pick the infimum, which concludes the proof. □\square

B.5 Proof of Corollary 2.5

From [Lemma 5.2] we verify that the covering number N(Sn−1,ϵ)\mathcal{N}(S^{n-1},\epsilon) of the Euclidean unit sphere Sn−1S^{n-1} satisfies

which means that we can cover the unit sphere with an ϵ\epsilon-net of size N(Sn−1,ϵ)\mathcal{N}(S^{n-1},\epsilon).

Let 0<η<n−1(1+n−1)−10<\eta<n^{-1}(1+n^{-1})^{-1}, and let us pick, for each mm, ϵm=mη−1n\epsilon_{m}=m^{\frac{\eta-1}{n}}. Let us consider its corresponding ϵ\epsilon-net of size

Since we have mm vectors in the unit sphere, it results from the pigeonhole principle that at least one element of the net will be associated with at least vm=mum−1≃mηv_{m}=mu_{m}^{-1}\simeq m^{\eta} vectors; in other words, we are guaranteed to find amongst our weight vector WW a collection QmQ_{m} of vm≃mηv_{m}\simeq m^{\eta} vectors that are all at an angle at most 2ϵm2\epsilon_{m} apart. Let us now apply Theorem 2.4 by picking n=vmn=v_{m} and α=ϵm\alpha=\epsilon_{m}. We need to see that the terms involved in the bound all converge to as m→∞m\to\infty.

The contribution of the oracle error e(vm)−e(m)e(v_{m})-e(m) goes to zero as m→∞m\to\infty by the fact that lim⁡m→∞e(m)\lim_{m\to\infty}e(m) exists (it is a decreasing, positive sequence) and that vm→∞v_{m}\to\infty.

Let us now verify that δ(m−vm,ϵm,m)\delta(m-v_{m},\epsilon_{m},m) also converges to zero. We are going to prune the first layer by removing one by one the vectors in QmQ_{m}. Removing one of these vectors at a time incurs in an error of the order of ϵm\epsilon_{m}. Indeed, let wkw_{k} be one of such vectors and let β′\beta^{\prime} be the solution of

where W−kW_{-k} is a shorthand for the matrix containing the rest of the vectors that have not been discarded yet. Removing the vector wkw_{k} from the first layer increases the loss by a factor that is upper bounded by E(βp)−E(β)E(\beta_{p})-E(\beta), where

since now βp\beta_{p} is a feasible solution for the pruned first layer.

Let us finally bound E(βp)−E(β)E(\beta_{p})-E(\beta).

Since ∠(wk,wk−1)≤ϵm\angle(w_{k},w_{k-1})\leq\epsilon_{m}, it results from Proposition 2.3 that

It results that removing ∣Qm∣|Q_{m}| of such vectors incurs an increase of the loss at most ∣Qm∣ϵm≃mηmη−1n=mη+η−1n|Q_{m}|\epsilon_{m}\simeq m^{\eta}m^{\frac{\eta-1}{n}}=m^{\eta+\frac{\eta-1}{n}}. Since we picked η\eta such that η+η−1n<0\eta+\frac{\eta-1}{n}<0, this term converges to zero. The proof is finished. □\square

Appendix C Cartoon of Algorithm

Appendix D Visualization of Connection

Because the weight matrices are anywhere from high to extremely high dimensional, for the purposes of visualization we projected the models on the connecting path into a three dimensionsal subspace. Snapshots of the algorithm in progress for the quadratic regression task are indicated in Fig. 3. This was done by vectorizing all of the weight matrices for all the beads for a given connecting path, and then performing principal component analysis to find the three highest weight projections for the collection of models that define the endpoints of segments for a connecting path—i.e., the θi\theta_{i} discussed in the algorithm. We then projected the connecting string of models onto these three directions.

The color of the strings was chosen to be representative of the test loss under a log mapping, so that extremely high test loss mapped to red, whereas test loss near the threshold mapped to blue. An animation of the connecting path can be seen on our Github page.

Finally, projections onto pairs of principal components are indicated by the black curves.

Appendix E A Disconnection

In general, a persistent high interpolated loss between two neighboring beads on the string of models could arise from either a slowly converging, connected pair of models or from a truly disconnected pair of models. “Proving” a disconnection at the level of numerical experiments is intractable in general, but a collection of negative results—i.e., failures to converge—are highly suggestive of a true disconnection.