Analytic Insights into Structure and Rank of Neural Network Hessian Maps

Sidak Pal Singh, Gregor Bachmann, Thomas Hofmann

Abstract

Understanding the Hessian matrix is crucial for optimizing deep neural networks, yet its high dimensionality often renders direct analysis intractable. This paper provides exact formulas and tight upper bounds for the rank of the Hessian in deep linear networks, revealing that the effective dimensionality is proportional to the sum of layer widths rather than the total number of parameters. Empirical results on non-linear networks (ReLU, Tanh) confirm that these theoretical insights accurately predict the numerical rank and redundancy in modern architectures.

Introduction

In deep learning, the Hessian matrix—the matrix of second-order derivatives of the loss—is fundamental to understanding the optimization landscape. It dictates gradient dynamics, training speed, and generalization capabilities. However, for a model with $P$ parameters, the Hessian contains $P^2$ entries, making it computationally prohibitive for modern large-scale models. Most existing work relies on heuristics or low-rank approximations. This study addresses this gap by providing a rigorous theoretical analysis of the Hessian's rank and structural properties.

Methodology

The researchers utilize matrix differential calculus to decompose the Hessian of deep linear networks into two primary components: the Outer-Product Hessian ($H_o$), related to the Gauss-Newton approximation, and the Functional Hessian ($H_f$), which captures remaining second-order interactions. By identifying a specific "Z-like" matrix structure within backpropagation chains, the authors derive exact rank formulas. These formulas were then empirically validated on non-linear networks using ReLU and Tanh activations across standard benchmarks including MNIST, FashionMNIST, and CIFAR10.

Eigenvalue spectrum of the Hessian for ReLU and linear networks, illustrating significant rank deficiency.

Key Insights

The "Sum of Widths" Rule

A central finding is that the Hessian rank is proportional to the sum of layer widths ($M_l + M_{l+1} + \dots$), rather than the product of adjacent widths which defines the total parameter count. This implies that as networks grow wider, their redundancy increases quadratically. This relationship holds remarkably well across varying depths.

Hessian rank as a function of network depth, demonstrating the linear relationship with the sum of layer widths.

Layer Independence and Stability

The analysis reveals that different layers contribute nearly unique directions to the Hessian's range, behaving similarly to a block-diagonal matrix. Furthermore, the rank remains remarkably stable throughout the training process, suggesting that the intrinsic dimensionality of the optimization problem is fixed by the architecture rather than the learned weights.

Results and Implications

The derived formulas predict the numerical rank of non-linear models with high precision. In experiments, approximating the full Hessian using the predicted rank yielded a reconstruction error of only 0.002%. This quantification of redundancy explains the success of parameter pruning and low-rank optimization: most parameter directions reside in "flat" regions of the loss landscape with zero curvature, as evidenced by the high concentration of near-zero eigenvalues.

Conclusion

This work provides a theoretical foundation for understanding neural network redundancy. By proving that the Hessian rank is constrained by layer widths, it opens avenues for designing more efficient second-order optimization algorithms and more effective model compression techniques. Future work will aim to extend these findings to convolutional architectures and formalize the transition from linear to non-linear theory.

Summary updated

BibTeX
@inproceedings{singh2021analytic,
  author = {Sidak Pal Singh and Gregor Bachmann and Thomas Hofmann},
  title = {{Analytic Insights into Structure and Rank of Neural Network Hessian Maps}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=0Py9aQz1lS},
}
Figure