How the Hessian-Spectrum of Neural Networks Depends on Data

Jasraj Singh, Enea Monzio Compagnoni, Antonio Orvieto
7/15/2026
cs.LG

No confident code implementation found for this paper.

Abstract

The Hessian matrix is an important quantity of interest when it comes to studying the loss landscape and optimization dynamics in deep learning, as well as designing measures of generalization, second-order learning algorithms, etc. Prior works have focused on empirical results or pursued a theoretical treatment under overly simplified settings. In this work, we derive the eigenvalues of the Hessian of linear networks with arbitrary widths and depths, and datasets with an arbitrary number of samples, features, and labels. Importantly, for classification tasks with MSE loss, we identify that the sharpness of the solution is directly related to the maximum proportion of samples belonging to any class. We empirically validate our predictions and systematically analyze the effects of shedding the impractical assumptions one at a time, as well as incorporating nonlinearities. We observe that our predictions are considerably robust in most cases, allowing us to extend our conclusions to more practical learning setups.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{singh2026hessianspectrum,
  title  = {How the Hessian-Spectrum of Neural Networks Depends on Data},
  author = {Jasraj Singh and Enea Monzio Compagnoni and Antonio Orvieto},
  year   = {2026},
  eprint = {2607.13631},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.13631v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.13631.svg)](https://codeofpaper.com/paper/2607.13631)

Discussion