NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Unraveling the Hessian: A Key to Smooth Convergence in Loss Function Landscapes

Nikita Kiselev, Andrey V. GrabovoyarXiv 2024

Abstract

The loss landscape of neural networks is a critical aspect of their training, and understanding its properties is essential for improving their performance. In this paper, we investigate how the loss surface changes when the sample size increases, a previously unexplored issue. We theoretically analyze the convergence of the loss landscape in a fully connected neural network and derive upper bounds for the difference in loss function values when adding a new object to the sample. Our empirical study confirms these results on various datasets, demonstrating the convergence of the loss function surface for image classification tasks. Our findings provide insights into the local geometry of neural loss landscapes and have implications for the development of sample size determination techniques.

Introduction

In deep learning, the "loss landscape"—the high-dimensional surface of hills and valleys that an optimizer navigates—is fundamental to understanding model behavior. While the geometry of this landscape, particularly its "flatness," is known to be tied to generalization, most research treats the training dataset as a static entity. This paper addresses a significant gap: how does the landscape itself evolve as the sample size increases? Specifically, if we add one more image to a large dataset, does the landscape shift significantly, or does it stabilize?

Theoretical Framework: The $1/k$ Law

To understand landscape evolution, we analyze the loss function through the lens of the Hessian matrix (the matrix of second-order derivatives), which describes local curvature.

Second-Order Approximation

Using a Taylor expansion near a local minimum $\theta^*$, we can decompose the difference between the loss with $k$ samples ($L_k$) and $k+1$ samples ($L_{k+1}$). This difference is driven by two components: the change in the loss value at the optimum and the change in the local curvature (Hessian).

Conceptual overview of the loss landscape and the impact of adding a single object.

Hessian Decomposition and Bounding

We focus on the "Gauss-Newton" term of the Hessian, which captures the most significant directions of curvature in classification tasks. The core theoretical contribution is a formal proof (Theorem 1) establishing an upper bound on the spectral norm of the Hessian for a fully connected neural network (FCNN). This bound depends on the network's depth ($L$), width ($h$), and weight magnitudes.

By combining these bounds, we derive a convergence rate showing that the difference in the loss landscape vanishes at a rate of $1/k$ as the sample size $k$ approaches infinity. This suggests that the "marginal change" to the landscape's geometry diminishes predictably as more data is added.

Empirical Validation

We validated our theoretical findings using standard image classification benchmarks: MNIST, FashionMNIST, CIFAR-10, and CIFAR-100. We tested both direct image classification (FCNN on raw pixels) and image feature extraction (FCNN head on Vision Transformer features).

Empirical convergence of the loss difference on MNIST, showing the effects of network width (h) and depth (L).

Across all datasets, the absolute loss difference $|L_{k+1}(\hat{\theta}) - L_k(\hat{\theta})|$ followed a clear decaying curve, perfectly matching the predicted $1/k$ behavior. This convergence behavior was remarkably consistent across different datasets and whether the model was trained on raw pixels or high-level features.

Architectural Impact: Width vs. Depth

Our results reveal how network architecture influences landscape stability:

  • Adding Layers (Depth): Increasing $L$ leads to a greater difference in loss functions, resulting in slower convergence.
  • Increasing Hidden Size (Width): Interestingly, while theoretical "worst-case" bounds might suggest otherwise, empirical results show that increasing $h$ leads to a smaller difference in loss functions. This suggests that wider networks produce more stable landscapes in practice.

Conclusion and Future Work

This work establishes that neural loss landscapes stabilize at a sublinear rate of $1/k$. This convergence is a fundamental property of the optimization objective and architecture. Future research will extend this analysis to Convolutional Neural Networks (CNNs) and Transformers. Additionally, this framework provides a mathematical foundation for "sample size determination"—identifying the point at which adding more data no longer meaningfully changes the loss landscape, potentially optimizing data collection efforts.

Summary updated

BibTeX
@misc{kiselev2024unraveling,
  author = {Nikita Kiselev and Andrey V. Grabovoy},
  title = {{Unraveling the Hessian: A Key to Smooth Convergence in Loss Function Landscapes}},
  year = {2024},
  eprint = {2409.11995},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.11995},
}
Figure