cs.LGMay 25, 2026

Stochastic Estimation of the Layer-wise Hessian Trace for Monitoring Neural-network Training

Authors: Maxim BolshimAlexander Kugaevskikh

Organizations: ITMO University, Saint Petersburg, Russia · ITMO University, St. Petersburg, Russia

Abstract

The loss and the norm of its gradient separate the healthy and the pathological regimes of neural-network training only weakly, whilst the curvature of the empirical risk differs qualitatively between them but is inaccessible explicitly at parameter counts P106108P\sim 10^{6}-10^{8}. We present a stochastic estimator of the trace of the diagonal blocks of the Hessian matrix of the empirical risk of a neural network. The procedure combines the Hutchinson stochastic trace estimator with a single Hessian-vector product over the whole parameter vector and recovers unbiased estimates of every per-layer trace in one backward pass through the computational graph. We show that correctness under weight sharing requires the layer-wise Hessian to be assembled before the second differentiation: unrolling shared weights into independent coordinates introduces a systematic bias whose sign and magnitude are governed by the cross-instance blocks of the unrolled Hessian. A closed-form expression for the variance of the estimator at a fixed Hessian is derived, together with a decomposition of the total variance under the mini-batch sampling distribution. This decomposition yields a critical probe count KK^{\star} that balances the two sources of randomness and supports the practical recommendation K[5,10]K\in[5,10] in the on-line monitoring regime. The estimator is applied to the detection of the label-memorisation regime of ResNet-18, ResNet-34, and VGG-11 on CIFAR-10 and CIFAR-100, where a calibrated cumulative-sum decision rule attains an empirical detection power of 179/180179/180 at a false-alarm rate of 16/12016/120.

Explore similar work

CardsList
  1. How the Hessian-Spectrum of Neural Networks Depends on Data

    Jul 15, 2026Jasraj Singh, Enea Monzio Compagnoni, Antonio OrvietoCondition NumberTwo-Layer Neural Networks