Connectedness of loss landscapes via the lens of Morse theory

Danil Akhtiamov, Matt ThomsonNeurReps @ NeurIPS 2022

Abstract

Mode connectivity is a recently discovered property of neural networks stating that two weight configurations of small loss can usually be connected by a path of small loss. The mode connectivity property is interesting practically as it has applications to design of optimizers with better generalization properties and various other applied topics as well as theoretically as it suggests that loss landscapes of deep networks have very nice properties even though they are known to be highly non-convex. The goal of this work is to study connectedness of loss landscapes via the lens of Morse theory. A brief introduction to Morse theory is provided.

Introduction

A central paradox in deep learning is "mode connectivity": why can we easily find low-loss paths between different neural network solutions if the landscape is supposedly a rugged terrain of isolating local minima? According to Morse theory—a tool from differential topology—a local minimum should create a disconnected "valley." If standard optimizers were finding true local minima, these solutions should be isolated. This paper resolves this contradiction by demonstrating that optimizers like SGD and ADAM do not land in local minima, but rather in high-index saddle points.

Theoretical Framework: Morse Theory

The authors treat the loss function as a "Morse function" on the weight manifold. A critical concept in this framework is the index of a critical point, defined as the number of negative eigenvalues of the Hessian matrix.

  • Index 0: A local minimum (all directions lead "up").
  • Index > 0: A saddle point (some directions lead "up," others "down").

In a high-dimensional space, the index determines the connectivity of the sub-level sets of the loss function. While a local minimum (index 0) isolates a region, a saddle point provides "exit ramps" that allow different regions of the loss landscape to remain connected.

Methodology

The study analyzed several network architectures: a 2-layer Multi-Layer Perceptron (MLP), a 3-layer MLP, and a simple Convolutional Neural Network (CNN). These were trained on the MNIST and FashionMNIST (FMNIST) datasets.

After training to convergence using SGD or ADAM, the authors numerically computed the Hessian matrix at the final weight configurations. By performing eigenvalue decomposition on these Hessians, they determined the index of the points found by the optimizers. To ensure the results weren't trivial (i.e., the optimizer just finding the same point), Principal Component Analysis (PCA) was used to verify that different initializations led to distinct solutions in weight space.

Results: The Prevalence of Saddle Points

The most significant finding is that the points found by standard optimizers are deep saddle points with a high number of negative directions.

Hessian eigenvalue distribution for a CNN trained on MNIST, showing a significant number of negative eigenvalues.

For a CNN with 552 parameters trained on MNIST, the average index was approximately 232.9. This means nearly half of the dimensions at the "solution" point are actually directions of descent. Similarly, for the 2-layer MLP with 7,960 parameters, the index reached 1980.1 on MNIST.

Hessian eigenvalue distribution for a 2-layer MLP on MNIST. Note the concentration of eigenvalues near zero, with a substantial count of negative values defining the high index.

These high-index saddle points resolve the mode connectivity paradox. Because the optimizers converge to saddle points rather than genuine local minima, the isolation predicted for index-0 points does not apply. These points act as bridges, facilitating the observed connectivity in deep learning loss landscapes.

Discussion and Conclusion

The study reveals that the optimization process actively seeks out high-index regions; the index of trained weights is significantly higher than that of randomly initialized weights. This suggests a "thickening" hypothesis: even if true local minima exist, they may be connected by paths that pass through or near these high-index saddle points.

While these findings are robust across the tested small-scale architectures, future work is needed to determine if these properties persist in massive models like Transformers. Furthermore, exploring "Hessian-aware" optimizers that might find true minima could provide insights into improving model generalization. By viewing loss landscapes through Morse theory, we gain a topological understanding of why deep learning remains optimizable despite its apparent complexity.

Summary updated

BibTeX
@inproceedings{akhtiamov2022connectedness,
  author = {Danil Akhtiamov and Matt Thomson},
  title = {{Connectedness of loss landscapes via the lens of Morse theory}},
  booktitle = {NeurReps @ NeurIPS},
  year = {2022},
  url = {https://openreview.net/forum?id=2bdo0gIsk3S},
}
Figure