Charting the Topography of the Neural Network Landscape with Thermal-Like Noise

Yohai Bar-Sinai, Gal Brener, Noam Itzhak Levi, Tal Kachman, theo julesOpenReview 2023

Abstract

The training of neural networks is a complex, high-dimensional, non-convex and noisy optimization problem whose theoretical understanding is interesting both from an applicative perspective and for fundamental reasons. A core challenge is to understand the geometry and topography of the landscape that guides the optimization. In this work, we employ standard Statistical Mechanics methods, namely, phase-space exploration using Langevin dynamics, to study this landscape for an over-parameterized fully connected network performing a classification task on random data. Analyzing the fluctuation statistics, in analogy to thermal dynamics at a constant temperature, we infer a clear geometric description of the low-loss region. We find that it is a low-dimensional manifold whose dimension can be readily obtained from the fluctuations. Furthermore, this dimension is controlled by the number of data points that reside near the classification decision boundary. Importantly, we find that a quadratic approximation of the loss near the minimum is fundamentally inadequate due to the exponential nature of the decision boundary and the flatness of the low-loss region. This causes the dynamics to sample regions with higher curvature at higher temperatures, while producing quadratic-like statistics at any given temperature. We explain this behavior by a simplified loss model which is analytically tractable and reproduces the observed fluctuation statistics.

Introduction

Navigating the loss landscape of a neural network is the central task of optimization in deep learning. While these landscapes are known to be high-dimensional and non-convex, their local topography near minima remains poorly understood. A prevalent assumption in the field is that the landscape behaves like a quadratic bowl (a parabola) in the vicinity of a local minimum. This assumption underpins many theoretical frameworks and optimization strategies. However, this work challenges the quadratic paradigm, demonstrating that the low-loss region is better described as a low-dimensional manifold bounded by exponential "walls."

Methodology: Langevin Dynamics as a Geometric Probe

To probe the local geometry, the researchers utilized Langevin dynamics, a technique borrowed from statistical mechanics. By injecting controlled "thermal" noise into the network weights, the system is allowed to explore the landscape at a constant "temperature" $T$. The dynamics are governed by: $$d\theta_t = -\nabla_\theta \mathcal{L}(\theta_t) dt + \sqrt{2T} dW_t$$ By observing how the loss $\mathcal{L}$ fluctuates at different temperatures, the underlying geometry can be inferred. In a perfectly quadratic landscape, the Equipartition Theorem predicts that the mean loss should scale linearly with temperature ($\mu_\mathcal{L} \propto T$), and the curvature (stiffness) should remain constant.

The study employed a controlled synthetic setup:

  • Data: 300 points from a $d$-dimensional normal distribution.
  • Task: 3-class classification with random labels.
  • Model: An over-parameterized multi-layer perceptron (MLP) with 883 weights.

This setup ensures that the observed geometric properties are intrinsic to the network architecture and the cross-entropy loss function, rather than specific data patterns.

Figure 1: Langevin dynamics and fluctuation statistics. (a) Loss evolution during Adam and Langevin phases. (b) Scaled loss distributions. (c) Linear scaling of mean and standard deviation of loss with temperature. (d) Effective dimensionality alpha of the low-loss manifold.

Results: The Low-Dimensional Manifold and the Quadratic Illusion

Dimensionality and Sparsity

The analysis reveals that despite the high number of parameters, the low-loss region is a remarkably low-dimensional manifold, typically involving only 20–60 dimensions. Most directions in the weight space are "flat," meaning movements along them do not significantly change the loss. Crucially, the effective dimension of this manifold is determined by the number of data points near the classification decision boundary. Data points that are "perfectly classified" do not contribute to the local geometry; only the "difficult" points pin the landscape down.

The Scaling Laws: Linear vs. Inverse

At any single temperature, the loss fluctuations follow a Gamma distribution, mimicking the behavior of a quadratic well. As shown in Figure 1(c), both the mean loss ($\mu_\mathcal{L}$) and standard deviation ($\sigma_\mathcal{L}$) scale linearly with $T$. This "quadratic illusion" might lead one to conclude that the landscape is parabolic.

However, the temporal dynamics provide a "smoking gun" for a non-quadratic landscape. In a true quadratic bowl, the correlation time (the time it takes for the system to "forget" its state) should be independent of temperature. Instead, the researchers found that the correlation time $\tau_{1/2}$ scales as $1/T$.

Figure 2: Temporal dynamics and correlation scaling. (b) The correlation time tau_1/2 scales inversely with temperature (1/T), a clear departure from quadratic behavior. (c-d) Autocorrelation functions across several orders of magnitude of T.

Exponential Walls

This $1/T$ scaling is characteristic of a landscape shaped by exponential functions. The cross-entropy loss creates a flat valley surrounded by exponential "walls." As the "temperature" increases, the system explores higher up these walls, encountering steeper regions. This effectively increases the "stiffness" of the landscape at higher temperatures, explaining why the statistics appear quadratic at any fixed $T$ but fail to maintain constant curvature across temperatures.

Discussion and Future Work

This work provides a new geometric lens through which to view neural network optimization. The identification of a temperature-independent length scale $L$ in weight space suggests an intrinsic resolution at which network predictions change.

While these findings are robust for fully connected networks on random data, future research is needed to determine if these "exponential wall" dynamics persist in more complex architectures like CNNs or Transformers, or when trained on structured datasets. Additionally, connecting these local geometric insights to global properties and phenomena like the "Edge of Stability" remains a promising avenue for theoretical deep learning.

Summary updated

BibTeX
@misc{barsinai2023charting,
  author = {Yohai Bar-Sinai and Gal Brener and Noam Itzhak Levi and Tal Kachman and theo jules},
  title = {{Charting the Topography of the Neural Network Landscape with Thermal-Like Noise}},
  year = {2023},
  eprint = {2304.01335},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.01335},
  howpublished = {OpenReview},
}
Figure