The loss surface of deep and wide neural networks

Quynh Nguyen, Matthias Hein

Abstract: While the optimization problem behind deep neural networks is highly non-convex, it is frequently observed in practice that training deep networks seems possible without getting stuck in suboptimal points. It has been argued that this is the case as all local minima are close to being globally optimal. We show that this is (almost) true, in fact almost all local minima are globally optimal, for a fully connected network with squared loss and analytic activation function given that the number of hidden units of one layer of the network is larger than the number of training points and the network structure from this layer on is pyramidal.

TL;DR

Deep neural networks are notoriously difficult to optimize because their loss surfaces are highly non-convex. This paper provides a theoretical breakthrough by proving that for a broad class of deep, fully connected networks, almost all local minima are actually global minima, provided the network has at least one layer wider than the number of training points and follows a "pyramidal" structure thereafter.

Problem Statement

In theory, training a deep neural network is an NP-hard problem because the "loss surface"—the mathematical landscape defined by the network's weights and its error—is filled with peaks, valleys, and potentially millions of suboptimal local minima. These are traps where the gradient is zero but the error remains high.

Comparison of various loss functions, highlighting the standard squared loss (Least Squares) analyzed in this work.

However, in practice, simple algorithms like Stochastic Gradient Descent (SGD) almost always find a solution with near-zero training error. This gap between theory and practice is a central mystery in deep learning. The authors tackle this by asking: Under what conditions does the non-convexity of the loss surface stop being a problem?

Methodology

The authors use a rigorous mathematical approach to analyze the geometry of the loss surface. Their primary tools include:

  • Backpropagation Identities: Deriving specific matrix forms for the gradients of the loss function across different layers.
  • Real Analytic Functions: Assuming activation functions (like Sigmoid, Tanh, or Softplus) are "real analytic." This ensures functions are well-behaved and don't stay "flat" in any region unless they are flat everywhere.
  • Implicit Function Theorem & Morse Theory: Used to show that "bad" local minima are extremely rare (specifically, they form a set of measure zero) under the right architectural conditions.
  • Linear Separability Analysis: Exploring how "widening" a layer allows the network to transform data into a linearly separable state, simplifying the optimization landscape for subsequent layers.

Key Insights

  • The "Wide" Requirement: If a single hidden layer $k$ has more neurons than there are training samples ($n_k \ge N-1$), the network gains enough degrees of freedom to "untangle" the data.
  • Pyramidal Structure: For the global optimality guarantee to hold, the network must be "pyramidal" from the wide layer onwards—meaning each subsequent layer must be smaller than or equal to the one before it.
  • Smoothness Matters: While ReLU is popular, it isn't "analytic" due to its sharp kink. The authors show their results apply to smooth approximations like Softplus, suggesting ReLU networks might inherit this underlying geometric structure.
  • Rank is Key: Suboptimal critical points only exist if weight matrices lose "rank" (become redundant). Since the space of low-rank matrices is tiny, they are almost certain to be avoided.

Results

  • Theorem 3.8 (The Main Result): For a deep network with squared loss and analytic activations, every "non-degenerate" critical point is a global minimum, provided the network has one sufficiently wide layer and a pyramidal structure thereafter.
  • Global Optimality of Wide Nets: The paper generalizes earlier work that only applied to single-hidden-layer networks, extending the proof to networks of arbitrary depth.
  • Linear Separability: They prove that if features at any layer become linearly separable, any critical point where subsequent weights are full-rank is guaranteed to be a global minimum.

Limitations and Future Work

  • The "Width" Gap: In practice, $N$ can be millions, while layers are thousands of neurons wide. The condition $n_k \ge N$ is rarely met in early layers of massive models.
  • Analytic vs. ReLU: The proof technically requires smooth, analytic activation functions. A direct proof for standard ReLU remains an open challenge.
  • Architectural Scope: The focus is on fully connected layers. Extending these guarantees to CNNs or RNNs is a key direction for future research.
  • Regularization: Techniques like Dropout or Weight Decay modify the loss surface; their interaction with the "wide layer" guarantee is not yet fully understood.

Summary updated

BibTeX
@inproceedings{nguyen2017loss,
  author = {Quynh Nguyen and Matthias Hein},
  title = {{The loss surface of deep and wide neural networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2017},
  url = {https://openreview.net/forum?id=S1Z242bOZB},
}
Figure