# Overview

The paper Loss Surfaces of Multilayer Networks by Choromanska et al. is situated in the context of determining critical points (i.e. minima, maxima, or saddle points) of loss surfaces of deep multilayer network models, such as feedforward perceptrons.

The authors present a model of multilayer rectified linear units (ReLUs), and show that it may be expressed as a polynomial function of the parameter matrices in the network, with a polynomial degree equal to the number of layers. The ReLu units produce a piecewise, continuous polynomial, with monomials that are nonzero or zero at the boundaries between pieces. With this model, they study the distribution of critical points of the loss polynomial, providing an analysis with results from random matrix theory applied to spherical spin glasses.

The 3 key findings of this work are the following:

• For large-size networks, most local minima are equivalent and yield similar performance on a test set.
• The probability of finding a bad local minimum (i.e. one with a large value in terms of the loss function) may be large for small-size networks, but decreases quickly with network size.
• Obtaining the global minimum of the loss function using a training dataset is not useful in practice.

Many theoretical results are reported, which will not be exhaustively covered here. However, a high-level overview of proof techniques will be given, followed by a summary of the experimental results.

# Prior Work

Earlier work has shown, for high-dimensional random Gaussian error functions, that critical points with error much higher than the global minimum are very likely to be saddle points (e.g. <ref>Bray, A. J., & Dean, D. S. (2007). Statistics of critical points of Gaussian fields on large-dimensional spaces. Physical review letters, 98(15), 150201.</ref>). Furthermore, all local minima are likely to be very close in functional value to the global minimum. Dauphin et al. <ref> Dauphin, Y. N., Pascanu, R., Gulcehre, C., Cho, K., Ganguli, S., & Bengio, Y. (2014). Identifying and attacking the saddle point problem in high-dimensional non-convex optimization. In Advances in Neural Information Processing Systems (pp. 2933-2941). </ref> empirically show that the cost functions of neural networks behave similarly to Gaussian error functions in high-dimensional spaces, but no theoretical justification is provided. This is one of the main contributions of this paper.

In <ref>Auffinger, A., & Arous, G. B. (2013). Complexity of random smooth functions on the high-dimensional sphere. The Annals of Probability, 41(6), 4214-4247.</ref>, an asymptotic evaluation of the complexity of the spherical spin-glass model from condensed matter physics is provided. The authors found that the critical values with low Hamiltonian values have a layered structure that behaves like a Gaussian process. This work shows, under the assumptions listed in the overview, that the objective function used by a neural network is analogous to the Hamiltonian of the spin-glass problem. This means that they exhibit similar behaviour. This is not the first attempt at connecting the spin-glass problem with neural networks but none had attempted to optimize the neural network objective using the theory developed for the spin-glass problem. Thus, this paper is also novel in that respect.

# Theoretical Analysis

Consider a simple fully-connected feed-forward deep network $\mathcal{N}$ with a single output for a binary classification task. The authors use the convention that $(H-1)$ denotes the number of hidden layers in the network (the input layer is the $0^{\text{th}}$ layer and the output layer is the $H^{\text{th}}$ layer). The input $X$ is a vector with $d$ elements, assumed to be random. The variable $n_i$ denotes the number of units in the $i^{\text{th}}$ layer (due to the network restrictions, $n_0 = d$ and $n_H = 1$). Finally, $W_i$ s the matrix of weights between $(i - 1)^{\text{th}}$ and $i^{th}$ layers of the network and $\sigma = \max(0,x)$ is the activation function. For a random input $X$, the random network output $Y$ is $Y = q\sigma(W_H^{\top}\sigma(W_{H-1}^{\top}\dots\sigma(W_1^{\top}X)))\dots),$ where $q$ is a normalization factor.

The key assumption in the theoretical work is the following: for ReLu activation functions $\sigma(x)$ for a random variable $x$, the output can be seen as being equal to $\delta \cdot x$, where $x$ is a (not necessarily random) nonzero variable and $\delta$ is a new random variable that is identically equal to either 0 or 1. With this in mind, the output of the network can be re-expressed as: $Y = q\sum_{i=1}^{n_0}X_{i}\sum_{j = 1}^\gamma A_{i,j}\prod_{k = 1}^{H}w_{i,j}^{(k)},$

where $A_{i,j}$ is a random variable equal to 0 or 1, denoting a path $(i,j)$ to be active ($A_{i,j} = 1$) or not ($A_{i,j} = 0$). In this expression, the first summation over $i$ is over the elements of the network input vector, and the second summation over $j$ is over all paths from $X_i$ to the output. The upper index on this second summation is $\gamma = n_1n_2\dots n_H$ for all possible paths. The term $w_{i,j}^{(k)}$ refers to the value of the parameter matrix in the layer that corresponds to the hidden vector element that produced the path (i.e. the $k^{\text{th}}$ segment of path indexed with $(i,j)$); hence why there are $H w_{i,j}^{(k)}$ terms per path.

From this equation, it can be seen that the output of the ReLu network is polynomial in the weight matrix parameters, and the treatment of $A_{i,j}$ as a random indicator variable allows connections to be made with spin glass models.

The remainder of the theoretical analysis proceeds as follows:

• The input vector $X$ and all $\{A_{i,j}\}$ are assumed to be random variables, where $A_{i,j}$ is a Bernoulli random variable and all input elements of $X$ are independent.

• One further critical assumption is the spherical constraint; all parameter weights $w_i$ (elements of the parameter matrices) satisfy a spherical bound:

$1/\Lambda \sum_i^\Lambda w_i^2 = C$

for some $C \gt 0$ where $\Lambda$ is the number of parameters.

• These assumptions allow the network output to be modeled as a spherical spin glass model, which is a physical model for magnetic dipoles in ferromagnetic materials (a dipole has a magnetization state that is a binary random variable)

• Using this assumption, the work by Auffinger et al. (2010) in the field of random matrices and spin glasses is then used to relate the energy states of system Hamiltonians of spin glass models to the critical points of the neural network loss function.

• The analysis shows that the critical points of the loss function correspond to different energy bands in the spin glass model; as in a physical system, higher energy states are less probable; while the number of states is infinite, the probability of the system appearing in that state vanishes.

• The energy barrier $E_{\infty}$ stems from this analysis, and is given by

$E_{\infty} = E_{\infty}(H) = 2\sqrt{\frac{H-1}{H}}.$ Auffinger et al. show that critical values of the loss function must relate energies below $-\Lambda E_{\infty}$ if their critical band index (i.e. energy index) is finite.

# Experiments

The numerical experiments conducted were to verify the theoretical claims of the distribution of critical points around the energy bound $E_{\infty}$, as well as to correlate the testing and training loss for different numbers of parameters $(\Lambda)$ in the models.

## MNIST Experiments

ReLu neural networks with a single layer and increasing $\Lambda \in \{25,50,100,250,500 \}$ were training for multiclass classification on a scaled-down version of the MNIST digit dataset, where each image was downsampled to $10 \times 10$ pixels. For each value of $\Lambda$, 200 epochs of SGD with a decaying learning rate were used to optimize the parameters in the network. The optimization experiments were performed 1000 times with different initial values for the weight parameters drawn uniformly randomly from $[-1,1]$.

# Results

To evaluate the distribution of the energy states that each critical point (i.e. solution) of the loss function, the eigenvalues of the Hamiltonian matrix of the loss function was computed for the parameters after the optimization procdure completed. The distribution of the (normalized) index of the energy states is shown below in Fig 1. It can be seen that for all models with different numbers of parameters, the energy states occupied are the low energy bands.

File:index dist.png
Fig 1. Distribution of normalized indices of energy states as computed from the system Hamiltonian at the final values of the parameters after the SGD optimization procedure completed.

The final values of the loss function in these experiments are also shown in the histograms in Fig 2. Interestingly, the variance in the loss decreases with increasing numbers of parameters, despite the fact that the spread in the energy state (Fig. 1) increases. This shows that despite the fact that local minima are more prevalent for models with many parameters, there is no appreciable difference in the loss function at these minima: the minima are essentially all equally good in terms of minimizing the objective cost.

File:loss distribution.png
Empirical distribution of the values of the loss function over the course of 1000 experiments with different numbers of parameters (Lambda). Each experimental run used a different random initialization of the parameter weights.

Finally, a scatter plot of the training vs testing error for each model is shown in Fig. 3. It can be seen that the correlation between the two errors decreases as the number of parameters increases, suggesting that obtaining a global minimum would not necessarily produce better testing results (and hence still would have a sizeable generalization error).

File:train test corr.png
Fig 3. Scatter plots showing the the correlation between training and testing error for the MNIST dataset experiments. For few parameters in the network, there is a very strong correlation between the two errors. However, for networks with many more parameters, the correlations decrease in strength, suggesting that obtaining the optimal loss (critical point) in the training phase does not improve the generalization error.

# Discussion

## Power of Deep Neural Nets from the No Free Lunch Point View

A far out view for the explanation of why Deep Neural Networks has lower probability of bad local minimas is Woodward's <ref>Woodward, John R. "GA or GP? that is not the question." Evolutionary Computation, 2003. CEC'03. The 2003 Congress on. Vol. 2. IEEE, 2003.</ref> paper on why the No Free Lunch Theorem (NFLT) doesn't hold. First the NFLT is a theorem that basically states if one cannot incorporate domain specific knowledge into the search or optimization algorithm, one cannot guarantee the search/optimization algorithm can out perform (in terms of convergence speed) any other search/optimization algorithms, this implies there could be no universal search algorithm that is the best.

Woodward's argument is that whether you use Genetic Algorithm or Genetic Programming doesn't matter, what matters is the solution mapping. Consider the case the task of Symbolic Regression where we have 2 algorithms $P$ and $Q$, let $P_{s} = \{+ba, a, b, +aa, +bb, +ab\}$ and $Q_{s} = \{+ab, +ba, a, b, +aa, +bb\}$ be the time ordered explored solutions of $P$ and $Q$. If the problem we face requires a solution $+ab$ then both $P$ and $Q$ discovers the solution on their first try. However for any other solution algorithm $P$ will always outperform $Q$.

From the above we might be able to conclude that for deep neural networks the larger or deeper the network size, the more likely the network connections will be able to generate a function that minimizes the loss faster then smaller networks (since all networks were trained for 200 epochs, theoretically a single layer MLP should be able to approximate any function, but practically that could take forever), thus minimizing chances of bad local minimas (similar to how if you have a complex function you have a better chance of fitting data over a simpler function).

<references/>