[Paper Review] Understanding Generalization through Visualizations
This paper uses visualizations and empirical experiments to explain why over-parameterized neural networks generalize well despite their capacity to fit random labels. By analyzing loss landscape geometry, it demonstrates that stochastic gradient descent (SGD) favors wide, flat minima with large volume basins—whose high-dimensional geometry makes them overwhelmingly likely to be found—thereby enabling robust generalization to unseen data.
The power of neural networks lies in their ability to generalize to unseen data, yet the underlying reasons for this phenomenon remain elusive. Numerous rigorous attempts have been made to explain generalization, but available bounds are still quite loose, and analysis does not always lead to true understanding. The goal of this work is to make generalization more intuitive. Using visualization methods, we discuss the mystery of generalization, the geometry of loss landscapes, and how the curse (or, rather, the blessing) of dimensionality causes optimizers to settle into minima that generalize well.
Motivation & Objective
- To develop an intuitive understanding of neural network generalization beyond theoretical bounds.
- To investigate why stochastic gradient descent (SGD) consistently finds minima that generalize well despite the existence of many poor, non-generalizing minima.
- To explore how high-dimensional parameter spaces bias optimizers toward flat, wide minima with large basins of attraction.
- To validate the hypothesis that generalization is linked to the volume of loss landscape basins using counterfactual experiments.
- To connect geometric intuition about flatness and basin volume to the practical success of deep learning models.
Proposed method
- Visualizing training trajectories of SGD on neural networks using t-SNE to embed parameter space iterates and compare them to nearby minima.
- Constructing 'bad' minima with poor generalization by poisoning the loss function with adversarial examples that misclassify test data.
- Measuring the volume of loss landscape basins using Monte Carlo sampling of random directions from a minimizer, estimating the n-dimensional volume via radial extent in 3,000 random directions.
- Defining basin volume as $ V = \omega_n \mathbb{E}_\phi[r^n(\phi)] $, where $ \omega_n $ is the volume of the unit n-ball and $ r(\phi) $ is the radius in direction $ \phi $.
- Comparing generalization performance (test accuracy) with basin volume across different poison factors to assess correlation.
- Creating counterfactual datasets (e.g., pinched rings) to test whether neural networks can learn sharp, narrow decision boundaries when required.
Experimental results
Research questions
- RQ1Why do over-parameterized neural networks generalize well despite being able to memorize random labels?
- RQ2How does the geometry of the loss landscape—specifically basin flatness and volume—relate to generalization performance?
- RQ3Why does SGD consistently avoid sharp, poor generalizing minima in high-dimensional spaces?
- RQ4Can we construct synthetic problems where neural networks fail to learn sharp decision boundaries, and what does this reveal about optimization bias?
- RQ5What is the role of high dimensionality in making wide, flat minima dominant and thus more likely to be found by SGD?
Key findings
- Neural networks trained on CIFAR-10 with ResNet-18 achieve 92% test accuracy, while a linear model with comparable parameters achieves only 49%, demonstrating that model capacity alone does not ensure generalization.
- Bad minima exist and can be constructed via loss poisoning; these achieve near-perfect training accuracy (100%) but test accuracy below 53%, close to random chance.
- The final SGD iterate achieves 98.5% test accuracy, showing that optimizers reliably avoid poor minima despite their presence.
- For SVHN, the volume of basins around good minima is at least 10,000 orders of magnitude larger than those around bad minima, making them vastly more likely to be found.
- As generalization gap increases, decision boundaries become more sensitive to perturbations, with training points lying on 'islands' or 'peninsulas' near the boundary.
- In counterfactual experiments, when the margin between classes is pinched, SGD fails to find a circular boundary and instead produces cherry-picked, unstable decision boundaries, showing a bias toward stable, wide minima.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.