REVIEW 3 major objections 4 minor 36 references
Investigating generalization capabilities of neural networks by means of loss landscapes and Hessian analysis
T0 review · 3 major / 4 minor · reviewed 2026-08-11 · deepseek-v4-flash
Pith's one-line read This paper claims that a ratio of Hessian eigenvalues, KH05, increases when a trained network's accuracy drops on new data, making it a cheap estimate of generalization ability.
desk verdict Plausible and honest, but the headline criterion is not yet pinned down: the trend evidence is better than Table 4, while Table 4 itself is weakened by the paper's own stability numbers. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The central object is the Hessian eigenvalue spectral density, estimated stochastically via the Stochastic Lanczos algorithm, and the derived criterion KHn = (sum of negative eigenvalues times their spectral weights, each raised to the power n) divided by (sum of positive eigenvalues times their weights, each raised to the same power). The paper uses n=0.5 as its main metric because it consistently decreases when a model is well-trained and consistently increases when the model faces out-of-distribution data, whereas KH1 and the simple eigenvalue ratio re fail in some cases. The machinery also includes Hessian eigenvectors as deterministic direction axes for loss-landscape plotting, which mitigates the 'value explosion' artifacts that occur when random axes are used with batch-normalized networks.
What would settle it
Compute KH05 for a fixed trained model on its training distribution and on a shifted distribution, repeating the Hessian spectral density estimation over many seeds and many input batches; if the distributions of the two KH05 values overlap substantially, the criterion cannot robustly detect the accuracy drop that the paper claims to track.
Extended reading notes
Core claim
The central discovery is that the Hessian eigenvalue spectral density of neural networks has a typical structure—symmetric at random initialization, becoming positive-dominated as training proceeds—and that a weighted ratio of negative to positive eigenvalues, KHn, defined with weights from the spectral density and a power n, responds to distribution shift in a way that single eigenvalues and simple ratios do not. In particular, the paper shows for LeNet trained on MNIST/SVHN, ResNet20 trained on Cifar10/Cinic10, and ImageNet-pretrained models tested on a small internet-collected dataset, that KH05 increases when the evaluation dataset is changed, and that the increase is larger when the accuracy drop is larger. The paper therefore proposes KH05 as an estimate of generalization ability that can be computed from a handful of batches, and argues that for very large datasets this is far cheaper than full accuracy evaluation.
Load-bearing premise
The paper assumes that KH05 values computed from a very small number of batches, often a single batch of 64 images, are stable and representative enough to detect generalization differences, even though its own stability tests show substantial variation with random seed and batch choice.
Editorial extensions
If this is right
- KH05 can be computed from one or a few batches of data, so for very large datasets it offers a generalization estimate at a fraction of the cost of full accuracy evaluation.
- The monotone response of KH05 to distribution shift gives a quantitative signal that a model's deployment data differs from its training data, before labels are available.
- Because KH05 rises when accuracy drops, it can be used to compare candidate models or checkpoints without needing a labeled test set.
- The documented failure modes of random-axis loss landscapes for batch-normalized networks imply that published landscape plots for such networks may be misleading unless Hessian axes or train-mode evaluation is used.
Reading between the lines
- The paper's evidence is correlational across a small set of architectures; a stronger test would be to deliberately control the generalization gap, for example by ablating training data or adding label noise, and verify that KH05 tracks the gap monotonically rather than just the dataset identity.
- Because the paper reports seed and batch variation of KH05 of order 0.05 to 0.07 after averaging, the differences reported across datasets should be interpreted as meaningful only if the same averaging protocol is applied; reproducing that protocol would make the claim directly testable.
- The same weighted-ratio idea could be applied to other spectral descriptors, such as the trace or the density near zero, possibly yielding criteria that are even more stable across architectures and datasets.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper presents a PyTorch library, Loss Landscape Analysis (LLA), for visualizing loss landscapes and analyzing Hessian spectral densities (HESD) of neural networks. It documents that standard loss-landscape normalization methods can fail for networks with batch normalization, proposes Hessian eigenvectors as deterministic plotting axes, and introduces two HESD-based criteria, KHn and re. The central claim is that the criterion KH05 (KHn with n=0.5) increases when a trained model's generalization accuracy drops on a different dataset, making it a computationally efficient proxy for generalization. Evidence includes cross-dataset experiments with LeNet on MNIST/SVHN, ResNet20 on Cifar10/Cinic10, and ImageNet-pretrained models tested on a single 64-image internet batch (NI).
Significance. If the central claim were established, KH05 would be a practically valuable, cheap-to-compute generalization indicator for large models and datasets, and the library itself is a useful contribution to loss-landscape tooling. The paper also identifies a real methodological issue with batch-normalization layers in loss-landscape plotting. However, the quantitative support for the headline claim is currently thin: the criterion is computed on very small batches without error bars, the exponent n=0.5 is chosen post hoc, and the claimed 'correlation' is actually only a directional consistency observed on a handful of model/dataset pairs. The paper's strengths are its accessible presentation of Hessian-spectrum visualization and the explicit discussion of computational cost and stability in Section 3.4.
major comments (3)
- [Section 4.4, Table 4] The key evidence for the central claim is Table 4, but each KH05 value is computed from a single random batch of 64 images (stated in Section 4.4), with no error bars or repeated runs. Section 3.4 documents that for LeNet a single batch gives KH05 ranging from 0.10 to 0.24 around a mean of 0.16, that seed variation alone is 0.13-0.20, and that even averaging 4 batches leaves a variation of about 0.05; it also states that similar results were observed for ResNet on ImageNet. The Table 4 differences (e.g., ResNet50 0.48 vs 0.65, AlexNet 0.65 vs 0.80) are of the same order as this documented one-batch noise. Without repeated measurements with multiple batches and seeds, the reported increases in KH05 when accuracy drops cannot be distinguished from measurement noise. The authors should report means and standard deviations over repeated evaluations and, ideally, a statistical test or confidence intervals for the comparison.
- [Section 3.3, Eq. (3), Table 2] The exponent n=0.5 appears to be selected post hoc: the paper states that KH1 fails to capture changes for most models and that KH05 consistently decreases for pre-trained weights, and this observation is used in the same section to argue for the criterion. Since the same data are used both to choose n and to support the method, the claim that KH05 is a valid generalization criterion is vulnerable to selection bias. The authors should either derive the exponent from first principles or demonstrate on a held-out set of models and datasets, not used in the choice of n, that KH05 reliably tracks changes in generalization accuracy.
- [Abstract, Sections 4.2-4.4] The abstract and Section 4.2 say that changes in criteria 'correlate' with changes in accuracy, but the paper's own results show the relationship is only directional and does not hold as a correlation in absolute values. Section 3.3 reports no direct correlation between KH05 and accuracy, and Section 4.3 gives average KH05 values of 0.25 and 0.45 for two experiments with the same 43% generalization accuracy. The authors should either provide a quantitative correlation measure (e.g., across many model/dataset pairs) or clearly restrict the claim to sign consistency of changes, and adjust the abstract accordingly.
minor comments (4)
- [Section 4.3] The sentence 'However, there criterion is smaller for generalization than re for training' appears to contain a typo and is hard to parse; it should read 'the criterion' and clarify the comparison.
- [Section 3.3, Eq. (3)] The notation wneg,i and wpos,j is described only as 'weights corresponding to negative and positive eigenvalues used to form HESD'; the authors should define precisely whether these are the HESD density estimates from the stochastic Lanczos method and how they are normalized.
- [Section 4.4, Table 4] The table does not report the number of Lanczos steps or n_hes used for the HESD evaluation, nor whether the same random batch was used for both accuracy and criterion calculation; such settings are needed for reproducibility.
- [Section 4.4, NI dataset] The NI dataset is a single manually labeled batch of 64 internet images; the paper should mention the potential label noise and limited diversity of this set as a caveat for the 'in the Wild' generalization conclusions.
Circularity Check
No load-bearing circularity: KH05 is an empirical Hessian heuristic; the n=0.5 choice is post-hoc model selection, not a fitted prediction, and the generalization evidence is on new datasets.
full rationale
The paper's central claim is that the Hessian spectral-density ratio KH05 tends to increase when a model's accuracy drops on a different dataset. This is an empirical correlation, not a derivation. KH05 is defined in Eq. (3) independently of accuracy, and the generalization results (Section 4, Figures 11 and 13, Table 4) are computed on dataset shifts and a newly collected 64-image batch, not on the data used to motivate the criterion. The choice of exponent n=0.5 in Section 3.3 was made after observing that KH1 did not behave as desired in Table 2; this is post-hoc model selection / researcher degrees of freedom, but the selected criterion is not fitted to the generalization outcome and no equation reduces to another. The paper's own Section 3.4 documents substantial seed and batch variability in KH05; that is a reliability and statistical-significance concern, not circularity. The only self-citation is the author's LLA software library [6], used as the implementation tool, and it is not load-bearing for the empirical claim. No uniqueness theorem or prior result by the same author is invoked to forbid alternatives. Therefore no circular step can be exhibited per the required standard.
Assumptions & free parameters
free parameters (1)
- exponent n in KHn =
0.5
assumptions (4)
- domain assumption Stochastic Lanczos HESD approximation reliably approximates the true Hessian spectral density
- domain assumption Loss landscape plotted along one or two random or Hessian directions is representative of model behavior
- domain assumption Using BN in train mode when plotting landscapes gives results meaningful for inference analysis
- ad hoc to paper Typical HESD structures are universal due to block structure and cross-entropy loss
Cite this review
Pith. "Pith review of Investigating generalization capabilities of neural networks by means of loss landscapes and Hessian analysis." pith.science (2026). https://pith.science/paper/2PKVW5PS
@misc{pith2026241210146,
author = {Pith},
title = {Pith review of: Investigating generalization capabilities of neural networks by means of loss landscapes and Hessian analysis},
year = {2026},
howpublished = {\url{https://pith.science/paper/2PKVW5PS}},
note = {Machine review of arXiv:2412.10146}
}
read the original abstract
This paper studies generalization capabilities of neural networks (NNs) using new and improved PyTorch library Loss Landscape Analysis (LLA). LLA facilitates visualization and analysis of loss landscapes along with the properties of NN Hessian. Different approaches to NN loss landscape plotting are discussed with particular focus on normalization techniques showing that conventional methods cannot always ensure correct visualization when batch normalization layers are present in NN architecture. The use of Hessian axes is shown to be able to mitigate this effect, and methods for choosing Hessian axes are proposed. In addition, spectra of Hessian eigendecomposition are studied and it is shown that typical spectra exist for a wide range of NNs. This allows to propose quantitative criteria for Hessian analysis that can be applied to evaluate NN performance and assess its generalization capabilities. Generalization experiments are conducted using ImageNet-1K pre-trained models along with several models trained as part of this study. The experiment include training models on one dataset and testing on another one to maximize experiment similarity to model performance in the Wild. It is shown that when datasets change, the changes in criteria correlate with the changes in accuracy, making the proposed criteria a computationally efficient estimate of generalization ability, which is especially useful for extremely large datasets.
Figures
Figures from the paper (10 more)
Reference graph
Works this paper leans on
-
[1]
Exploring generalization in deep learning,
B. Neyshabur, S. Bhojanapalli, D. McAllester, and N. Srebro, “Exploring generalization in deep learning,” 2017. [Online]. Available: https://arxiv.org/abs/1706.08947
arXiv 2017
-
[2]
Sensitivity and generalization in neural networks: an empirical study,
R. Novak, Y. Bahri, D. A. Abolafia, J. Pennington, and J. Sohl-Dickstein, “Sensitivity and generalization in neural networks: an empirical study,” 2018. [Online]. Available: https://arxiv.org/abs/1802.08760
arXiv 2018
-
[3]
Visualizing the loss landscape of neural nets,
H. Li, Z. Xu, G. Taylor, C. Studer, and T. Goldstein, “Visualizing the loss landscape of neural nets,” 2018. [Online]. Available: https://arxiv.org/abs/1712.09913
arXiv 2018
-
[4]
An empirical analysis of the optimization of deep network loss surfaces,
D. J. Im, M. Tao, and K. Branson, “An empirical analysis of the optimization of deep network loss surfaces,” 2017. [Online]. Available: https://arxiv.org/abs/1612.04010
arXiv 2017
- [5]
-
[6]
“Loss landscape analysis,” https://github.com/GabdullinN/loss-landscape-analysis, ac- cessed: 2024-12-16
work page 2024
-
[7]
“loss-landscapes,” https://github.com/marcellodebernardi/loss-landscapes, accessed: 2024-11-10
work page 2024
-
[8]
The hessian perspective into the nature of convolutional neural networks,
S. P. Singh, T. Hofmann, and B. Schölkopf, “The hessian perspective into the nature of convolutional neural networks,” 2023. [Online]. Available: https: //arxiv.org/abs/2305.09088 16
arXiv 2023
Show all 36 references
-
[9]
Robust fine-tuning of deep neural networks with hessian-based generalization guarantees,
H. Ju, D. Li, and H. R. Zhang, “Robust fine-tuning of deep neural networks with hessian-based generalization guarantees,” 2023. [Online]. Available: https: //arxiv.org/abs/2206.02659
2023 arXiv
-
[10]
A review of supervised machine learning al- gorithms,
A. Singh, N. Thakur, and A. Sharma, “A review of supervised machine learning al- gorithms,” in 2016 3rd International Conference on Computing for Sustainable Global Development (INDIACom), 2016, pp. 1310–1315
2016
-
[11]
Deep residual learning for image recognition,
K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,”
-
[12]
An image is worth 16x16 words: Transformers for image recognition at scale,
A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby, “An image is worth 16x16 words: Transformers for image recognition at scale,” 2021. [Online]. Available: https://arxi...
2021 arXiv
-
[13]
Emergent properties of the local geometry of neural loss landscapes,
S. Fort and S. Ganguli, “Emergent properties of the local geometry of neural loss landscapes,” 2019. [Online]. Available: https://arxiv.org/abs/1910.05929
2019 arXiv
-
[14]
Visualizing high-dimensional loss landscapes with hessian directions,
L. Böttcher and G. Wheeler, “Visualizing high-dimensional loss landscapes with hessian directions,” Journal of Statistical Mechanics: Theory and Experiment, vol. 2024, no. 2, p. 023401, feb 2024. [Online]. Available: https://dx.doi.org/10.1088/1742-5468/ad13fc
2024 doi
-
[15]
Adam: A method for stochastic optimization,
D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” 2017. [Online]. Available: https://arxiv.org/abs/1412.6980
2017 arXiv
-
[16]
Visualizing the loss landscape of neural nets,
“Visualizing the loss landscape of neural nets,” https://github.com/tomgoldstein/ loss-landscape, accessed: 2024-11-10
2024
-
[17]
Batch normalization: Accelerating deep network training by reducing internal covariate shift,
S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” 2015. [Online]. Available: https: //arxiv.org/abs/1502.03167
2015 arXiv
-
[18]
Batchnorm2d in pytorch,
“Batchnorm2d in pytorch,” https://pytorch.org/docs/stable/generated/torch.nn. BatchNorm2d.html, accessed: 2024-11-10
2024
-
[19]
Models and pre-trained weights in pytorch,
“Models and pre-trained weights in pytorch,” https://pytorch.org/vision/stable/models. html#models-and-pre-trained-weights, accessed: 2024-10-20
2024
-
[20]
Imagenet classification with deep con- volutional neural networks,
A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep con- volutional neural networks,” in Advances in Neural Information Processing Systems, F. Pereira, C. Burges, L. Bottou, and K. Weinberger, Eds., vol. 25. Curran Associates, Inc., 2012
2012
-
[21]
Squeezenet: Alexnet-level accuracy with 50x fewer parameters and <0.5mb model size,
F. N. Iandola, S. Han, M. W. Moskewicz, K. Ashraf, W. J. Dally, and K. Keutzer, “Squeezenet: Alexnet-level accuracy with 50x fewer parameters and <0.5mb model size,” 2016. [Online]. Available: https://arxiv.org/abs/1602.07360
2016 arXiv
-
[22]
Gradient-based learning applied to document recognition,
Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,”Proceedings of the IEEE, vol. 86, no. 11, pp. 2278–2324, 1998. 17
1998
-
[23]
Randomized algorithms for estimating the trace of an implicit symmetric positive semi-definite matrix,
H. Avron and S. Toledo, “Randomized algorithms for estimating the trace of an implicit symmetric positive semi-definite matrix,”J. ACM, vol. 58, no. 2, Apr. 2011. [Online]. Available: https://doi.org/10.1145/1944345.1944349
2011
-
[24]
Randomized algorithms for matrices and data,
M. W. Mahoney, “Randomized algorithms for matrices and data,” Foundations and Trends in Machine Learning, vol. 3, no. 2, pp. 123–224, 2011. [Online]. Available: http://dx.doi.org/10.1561/2200000035
2011 doi
-
[25]
Fast estimation of tr(f(a)) via stochastic lanczos quadrature,
S. Ubaru, J. Chen, and Y. Saad, “Fast estimation of tr(f(a)) via stochastic lanczos quadrature,” SIAM Journal on Matrix Analysis and Applications, vol. 38, no. 4, pp. 1075–1099, 2017. [Online]. Available: https://doi.org/10.1137/16M1104974
2017 doi
-
[26]
Pyhessian: Neural networks through the lens of the hessian,
Z. Yao, A. Gholami, K. Keutzer, and M. Mahoney, “Pyhessian: Neural networks through the lens of the hessian,” 2020. [Online]. Available: https://arxiv.org/abs/1912.07145
2020 arXiv
-
[27]
Pyhessian,
“Pyhessian,” https://github.com/amirgholami/PyHessian, accessed: 2024-08-10
2024
-
[28]
Whytransformersneedadam: A hessian perspective,
Y.Zhang, C.Chen, T.Ding, Z.Li, R.Sun, andZ.-Q.Luo, “Whytransformersneedadam: A hessian perspective,” 2024. [Online]. Available: https://arxiv.org/abs/2402.16788
2024 arXiv
-
[29]
Pytorch image models,
“Pytorch image models,” https://github.com/huggingface/pytorch-image-models/tree/ main, accessed: 2024-10-20
2024
-
[30]
How to train your vit? data, augmentation, and regularization in vision transformers,
A. Steiner, A. Kolesnikov, X. Zhai, R. Wightman, J. Uszkoreit, and L. Beyer, “How to train your vit? data, augmentation, and regularization in vision transformers,” 2022. [Online]. Available: https://arxiv.org/abs/2106.10270
2022 arXiv
-
[31]
Imagenet: A large-scale hierarchical image database,
J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei, “Imagenet: A large-scale hierarchical image database,” in2009 IEEE Conference on Computer Vision and Pattern Recognition, 2009, pp. 248–255
2009
-
[32]
Mnist handwritten digit database,
Y. LeCun, C. Cortes, and C. Burges, “Mnist handwritten digit database,”ATT Labs [Online]. Available: http://yann.lecun.com/exdb/mnist, vol. 2, 2010
2010
-
[33]
The street view house numbers (svhn) dataset,
“The street view house numbers (svhn) dataset,” http://ufldl.stanford.edu/ housenumbers/, accessed: 2024-11-10
2024
-
[34]
Learning multiple layers of features from tiny images,
A. Krizhevsky and G. Hinton, “Learning multiple layers of features from tiny images,” University of Toronto, Toronto, Ontario, Tech. Rep. 0, 2009. [Online]. Available: https://www.cs.toronto.edu/~kriz/learning-features-2009-TR.pdf
2009
-
[35]
Cinic-10 is not imagenet or cifar-10,
L. N. Darlow, E. J. Crowley, A. Antoniou, and A. J. Storkey, “Cinic-10 is not imagenet or cifar-10,” 2018. [Online]. Available: https://arxiv.org/abs/1810.03505 18 A Appendix A Figure A.1: Random axes weight-normalized loss landscapes of LeNet (top-left) trained and tested on ...
2018 arXiv
-
[2015]
Available: https://arxiv.org/abs/1512.03385
[Online]. Available: https://arxiv.org/abs/1512.03385
Reviewed August 11, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.