arXiv:2611.07671cs.LGNov 2026

Manuscript Offprint

arXiv:2611.07671

Calibrated Target Noise Recovers Curvature from the Gradients

Arash Jamshidi, Katsiaryna Haitsiukevich, Aristides Gionis, Kai Puolamäki

Recovers Curvature from the Gradients

Arash Jamshidi Department of Computer Science University of Helsinki Helsinki, Finland arash.jamshidi@helsinki.fi

Katsiaryna Haitsiukevich Department of Computer Science University of Helsinki Helsinki, Finland katsiaryna.haitsiukevich@helsinki.fi

Aristides Gionis Division of Theoretical Computer Science KTH Royal Institute of Technology Digital Futures Stockholm, Sweden argioni@kth.se

Kai Puolamäki Department of Computer Science Institute for Atmospheric and Earth System Research University of Helsinki Helsinki, Finland kai.puolamaki@helsinki.fi

Abstract

Estimating curvature information from gradients alone is a fundamental problem in machine learning. The challenge becomes particularly acute in settings where only aggregate mini-batch gradients are available, yet curvature information is still required for applications such as preconditioning in optimisation, sampling, and early stopping. Perhaps surprisingly, we show that a simple target-perturbation scheme suffices to recover such curvature information from gradients alone. Our method injects zero-mean noise into the targets, with variance calibrated to the local output curvature. The covariance of the resulting noisy batch gradients then recovers practical curvature matrices, without requiring per-sample gradients, second-order derivatives, or other internal network quantities. For a broad class of non-linear models, our scheme recovers the Generalised Gauss–Newton (GGN) matrix; for feed-forward ReLU networks, it additionally recovers the diagonal blocks of the population Hessian. We demonstrate that the resulting estimator is simple, lightweight, provably optimal, and easy to integrate into existing training pipelines. Experiments demonstrate accurate curvature recovery, faster optimisation when the estimator is used for preconditioning, and the utility of the estimated GGN for early stopping.

1 Introduction

Modern machine-learning models are usually trained with first-order optimisation methods, yet much of their behaviour is governed by second-order structure. Curvature determines how quickly gradient-based methods can move in different directions, which directions are ill-conditioned, and how sensitive the loss is to perturbations of the parameters. As a result, curvature information is useful for preconditioning, adaptive optimisation, uncertainty estimation, sampling, and early stopping [Martens, 2010, Mahsereci et al., 2017]. If reliable curvature estimates were cheaply available, they could be used to make training more stable, more interpretable, and often faster.

The difficulty is that curvature is expensive to obtain in modern models. Exact Hessians are typically too large to form or store, and even practical surrogates such as the Generalised Gauss–Newton (GGN) matrix often require per-sample gradients, Jacobians, or access to intermediate model quantities

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

[Martens and Grosse, 2015, Botev et al., 2017]. These requirements can be impractical in large-scale training pipelines, distributed systems, federated learning, privacy-constrained settings, or software frameworks that provide only aggregate mini-batch gradients. In such settings, the usual alternative is to ignore curvature, rely on diagonal adaptive methods, or use approximations that require more than aggregate backwards-pass information, such as per-sample gradients, Jacobians, or second-order derivatives.

This paper asks whether useful curvature information can be recovered from what is already available in such settings: aggregate mini-batch gradients. At first glance, this seems difficult, since averaging gradients over a batch destroys the per-sample structure on which curvature estimators usually rely. Moreover, the covariance of ordinary gradients does not, in general, coincide with the curvature matrix of interest. Thus, simply collecting clean gradients is not enough: the gradients must be probed in a way that makes their fluctuations carry the right geometric information.

A closely related line of work shows that noise injection can reveal hidden information in gradients. In particular, Jamshidi et al. [2026] shows that adding target noise allows the covariance of noisy gradients to recover curvature information in linear regression. However, their construction is specific to the linear-regression setting, where the Hessian coincides with the unweighted data covariance. In general, non-linear models, the relevant curvature is parameter-dependent, so target noise must be calibrated to the local geometry of the loss.

We propose the Calibrated Noisy Gradient Covariance (CNGC) matrix, a simple curvature estimator based on target perturbations. The idea is to add zero-mean noise to the targets, with variance calibrated to the local curvature of the loss, and then estimate curvature from the covariance of the resulting noisy mini-batch gradients. This construction turns standard gradient evaluations into curvature probes, while avoiding explicit second-order derivatives, per-sample gradients, and Jacobian computations.

CNGC recovers the Generalised Gauss–Newton matrix in expectation for general non-linear models, and for feed-forward ReLU networks, it also captures diagonal Hessian blocks. The method is lightweight, compatible with standard mini-batch training, and can be used either as a diagnostic estimator of curvature or as a preconditioner inside an optimiser.

Contributions. First, we introduce CNGC as a gradient-only method for estimating curvature from calibrated target noise. Second, we show that its noisy-gradient covariance recovers the GGN matrix, and for ReLU networks also recovers diagonal Hessian blocks. Third, we analyse centred and swamping variants of the estimator and characterise their bias. Fourth, we show that scaled Rademacher noise is an optimal perturbation choice for reducing the estimator's noise-induced risk. Finally, we empirically demonstrate that CNGC accurately recovers curvature and performs favourably compared to the baselines. Additionally, we provide two versions of preconditioners based on CNGC, which improve optimisation convergence. We also show that the proposed estimator can be applied for early stopping. Our code is available at https://github.com/edahelsinki/cngc.