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

Sharp Minima Can Generalize For Deep Nets

Laurent Dinh, Razvan Pascanu, Samy Bengio, Yoshua Bengio

Introduction

Despite having enough parameters to easily memorize training data, deep neural networks generalize surprisingly well to unseen data. Explaining why this happens remains a major open question in machine learning.

A leading hypothesis suggests that Stochastic Gradient Descent (SGD) naturally gravitates toward "flat" minima in the loss landscape. The intuition is straightforward: flat minima are robust to slight perturbations in the weights or data, whereas "sharp" minima are brittle and prone to overfitting.

However, this theoretical paper challenges that prevailing narrative. The authors mathematically prove that for standard neural networks (such as those using ReLUs), any flat minimum can be transformed into an arbitrarily sharp one without changing the network's actual predictions. Consequently, "flatness" alone—without accounting for the model's specific parametrization—is a flawed metric for predicting generalization.

The Core Mechanism: ReLU Symmetry

This research relies on mathematical proofs and geometric analysis rather than empirical training runs. The authors focus on deep networks utilizing Rectified Linear Units (ReLUs).

ReLUs possess a mathematical property called non-negative homogeneity: $\max(0, \alpha x) = \alpha \max(0, x)$ for any $\alpha > 0$. Because of this property, the authors introduce an $\alpha$-scale transformation.

Imagine a simple two-layer network. You can multiply the weights of the first layer by $\alpha$ and the weights of the second layer by $1/\alpha$. The $\alpha$ factor mathematically cancels out, meaning the network outputs the exact same predictions for every possible input. These two sets of weights are considered "observationally equivalent," even though they occupy entirely different points in the parameter space.

Deconstructing Flatness Metrics

The authors apply this $\alpha$-scale transformation to three common mathematical definitions of flatness found in deep learning literature:

  1. Volume $\epsilon$-flatness: The size (volume) of the region around a minimum where the loss barely changes.
  2. Hessian-based measures: The curvature of the loss function, typically measured using the spectral norm or trace of the Hessian matrix.
  3. $\epsilon$-sharpness: The maximum loss within a bounded neighborhood of the minimum.
A 1D visualization of an $\epsilon$-flat region, representing the volume around a minimum where the loss remains below a certain threshold.

By analyzing these metrics through the lens of the $\alpha$-scale transformation, the paper reveals critical vulnerabilities in how we measure the loss landscape.

Key Insights: The Illusion of Sharpness

The geometric analysis yields several profound insights that upend the traditional understanding of loss landscapes:

  • All minima are infinitely flat (by volume): Because you can scale weights up and down infinitely while maintaining the exact same network output, every minimum in a ReLU network has an infinite volume of observationally equivalent parameters where the error remains constant. (Formalized in Theorem 2).
  • Sharpness is a dial you can turn: By applying the $\alpha$-scale transformation, you can take a minimum that generalizes perfectly well and mathematically transform its weights so that the curvature (Hessian) becomes arbitrarily steep. You have created a "sharp" minimum that generalizes exactly as well as the "flat" one. (Formalized in Theorem 4).
Observationally equivalent parameters exhibiting different sharpness. The green and red regions represent neighborhoods around two different parameter configurations that yield the exact same network function.
  • Reparametrization breaks the flatness hypothesis: Changing how a model is parameterized completely alters the geometry of the loss landscape. A flat minimum in one parameter space can be a sharp minimum in another, yet both represent the exact same underlying mathematical function. The paper successfully demonstrates that the $\epsilon$-sharpness metric can be manipulated to show high sharpness for a model that generalizes well, simply by exploiting the non-Euclidean geometry of the parameter space.

Conclusion and Future Directions

The core takeaway of this paper is that flatness is not a fundamental property of the function learned by the network; rather, it is a highly malleable property of the chosen coordinate system. You cannot claim "flat is better" without strictly defining the parameter space.

Limitations: The paper is purely theoretical. While it successfully tears down existing definitions of flatness, it does not propose a new, robust metric for predicting generalization. Furthermore, the core proofs rely heavily on the non-negative homogeneity of ReLUs (and similar activations like Leaky ReLUs). Networks using strictly bounded activations (like Sigmoid or Tanh) might require different geometric arguments.

Future Work: The authors suggest that any future attempts to link loss landscape geometry to generalization must strictly account for the symmetries and non-identifiability of the architecture. Researchers must define flatness in a way that avoids the degeneracies of the model's geometry, recognizing that the concept of a "flat landscape" cannot be divorced from the specific parametrization of the model or the input space.

Summary updated

BibTeX
@inproceedings{dinh2017sharp,
  author = {Laurent Dinh and Razvan Pascanu and Samy Bengio and Yoshua Bengio},
  title = {{Sharp Minima Can Generalize For Deep Nets}},
  booktitle = {International Conference on Machine Learning},
  year = {2017},
}
Figure