Connecting Parameter Magnitudes and Hessian Eigenspaces at Scale using Sketched Methods
Andres Fernandez, Frank Schneider, Maren Mahsereci, Philipp Hennig
TL;DR
The paper addresses the link between early crystallization of magnitude-based parameter masks and the top-$k$ Hessian eigenspaces in deep networks. It introduces a Grassmannian-based framework to compare the spans of $k$-sparse masks and top-$k$ Hessian eigenvectors, with overlap chosen as the interpretable similarity measure. To enable large-scale analysis, the authors develop SEIGH, a matrix-free sketched-SVD method that computes Hessian eigendecompositions with $O(Dk)$ memory and can yield over $10^3$ eigenpairs for models with more than $10^7$ parameters. Empirical results show that the overlap between magnitude masks and top Hessian eigenspaces is consistently above random chance and grows with model size, suggesting that large parameters tend to align with directions of larger loss curvature. This framework provides a scalable way to analyze Hessians in DL and offers a new perspective on the structure of neural networks beyond pruning alone.
Abstract
Recently, it has been observed that when training a deep neural net with SGD, the majority of the loss landscape's curvature quickly concentrates in a tiny *top* eigenspace of the loss Hessian, which remains largely stable thereafter. Independently, it has been shown that successful magnitude pruning masks for deep neural nets emerge early in training and remain stable thereafter. In this work, we study these two phenomena jointly and show that they are connected: We develop a methodology to measure the similarity between arbitrary parameter masks and Hessian eigenspaces via Grassmannian metrics. We identify *overlap* as the most useful such metric due to its interpretability and stability. To compute *overlap*, we develop a matrix-free algorithm based on sketched SVDs that allows us to compute over 1000 Hessian eigenpairs for nets with over 10M parameters --an unprecedented scale by several orders of magnitude. Our experiments reveal an *overlap* between magnitude parameter masks and top Hessian eigenspaces consistently higher than chance-level, and that this effect gets accentuated for larger network sizes. This result indicates that *top Hessian eigenvectors tend to be concentrated around larger parameters*, or equivalently, that *larger parameters tend to align with directions of larger loss curvature*. Our work provides a methodology to approximate and analyze deep learning Hessians at scale, as well as a novel insight on the structure of their eigenspace.
