arXiv:2610.11738cs.AIOct 2026

Manuscript Offprint

arXiv:2610.11738

Scalable AI Uncertainty Quantification via Generalized Laplace Active Subspaces

Wouter N. Edeling, Peter V. Coveney

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Reliable uncertainty quantification (UQ) is essential for deploying neural networks in scientific and high-stakes applications, but full Bayesian inference over the network parameters is computationally infeasible. We propose a low-rank generalized Laplace approximation for neural-network UQ based on a small number of data-informed curvature directions. Starting from a generalized Bayesian posterior defined through an empirical loss, we construct a local Gaussian approximation around a pretrained set of weights in this active curvature subspace. The posterior variances in the retained subspace are available in closed form, and the prior variance is calibrated by an empirical Bayes procedure. The generalized Bayesian formulation allows us to compare two posterior scalings: the standard Bayesian scaling associated with the summed negative log likelihood, and a mean-loss scaling in which the empirical loss is normalized by the number of data. A central finding is that the standard scaling induces a data-size dependent contraction of the posterior variance in the leading active directions. In regression problems, this can force the low-rank framework to retain additional weak-curvature directions in order to achieve nominal coverage of calibration data. When posterior samples are propagated through the non-linear network, these additional directions can degrade the coherence of the predictive intervals.

and shift the posterior predictive mean away from the pretrained model. In contrast, the generalized mean-loss scaling yields a more stable, lower dimensional active subspace and produces calibrated, coherent predictive confidence intervals. These results indicate that generalized Laplace active subspaces provide a practical and scalable route to calibrated uncertainty quantification in neural networks. We demonstrate the method on two regression problems, and a classification case involving an autoregressive molecular language model.

Keywords: uncertainty quantification, neural networks, Laplace posterior, active subspaces

1 Introduction

One of the biggest open questions concerning artificial intelligence (AI) is the reliability and trustworthiness of the predictions which emanate from its output. After training, AI software operating in inference mode can spew out predictions concerning the behaviour of a new system in the same class as those it has been trained on in virtually instantaneous fashion. Such predictions can have enormous value in many real world scenarios. In some situations, qualitative classifications suffice while others require only a modicum of accuracy to be beneficial; still others require accurate and precise predictions or they are not actionable. This last scenario is the one which is most often necessary in scientific and engineering contexts.

To use the results of a calculation inside a scientific procedure, one generally needs to know that the predictions are reliable within defined and suitably limited bounds of uncertainty. Actionable predictions must therefore not only be timely; they need to be of a sufficient level of accuracy and/or precision to be used with confidence. The problem with AI methods in general is that what they output often appears plausible and may pass muster as such for some applications; but in more quantitative scientific and mathematical domains, plausibility is not sufficient: we need to be clear about the level of certainty of its predictions. The key assessments of validation, verification and uncertainty quantification are regularly visited on physics-based models, e.g. for weather and climate prediction [1, 2], turbulence modelling [3, 4], tsunami hazards [5, 6] or biological applications [7]. In these instances there is an exactly defined mathematical model based on clearly defined equations that typically include a variety of parameters, whereas such systematic analysis are significantly more challenging for AI systems.

One immediately noticeable difference between AI and physics-based codes resides in the number of parameters which arise in the two cases. Whereas physics-based codes typically contain around five parameters [3], possibly several hundreds [8] (extending to a few thousand in some large scale codes), each parameter has a well-defined physical meaning pertaining to the underlying model. In AI software there are many orders of magnitude more, none of which has a physical interpretation, as they are simply free parameters. The impressive fitting of input-output data can be readily performed with so many free parameters in play, particularly when one works with held-out data sets.

where all manner of optimisations can be conducted. The approach lends itself to the making of overconfident predictions, which can and often do unravel when the trained system is applied to data which it has not previously encountered. We are interested in the uncertainty of such predictions in terms of the uncertainty in the parameter values of the trained model; unlike a physics-based approach, lacking any physical meaning, these parameters cannot be meaningfully adjusted based on insights into the system which can be gleaned from mathematical models we have created.

The purpose of the present paper is to demonstrate that, despite the lack of clarity as to the meaning of the parameters in an AI system, it is possible to obtain predictive uncertainty estimates. A natural framework for quantifying parameter uncertainty is Bayesian inference [9]. In principle, one would place a prior distribution on the neural-network weights, update this prior by conditioning on data, and propagate the resulting posterior distribution through the network to obtain predictive uncertainty. In practice, since the parameter dimension is extremely large, standard sampling strategies are computationally infeasible. Scalable approximations are therefore unavoidable.

Scalable Bayesian neural-network posterior approximations include variational approaches such as Bayes by Backprop [10], which learns a parametric approximation to the posterior distribution over the network weights, typically using a Gaussian variational family. The resulting training objective is an evidence lower bound, consisting of an expected data-fit term and a Kullback-Leibler (KL) divergence to the prior. In practice, the balance between these two terms can be delicate, and may require specialized training strategies such as KL annealing or cyclical schedules [11].

By contrast, the Laplace approximation [12] is a post-hoc posterior approximation. It also models the parameter posterior by a Gaussian distribution, but this Gaussian is centred at a pre-trained set of weights, and its covariance is obtained from the local curvature of the log posterior density rather than by optimizing a variational distribution during training. While the posterior is now conceptually simple, the computational bottleneck shifts to the covariance matrix of the Laplace approximation, as it is too large to form explicitly for many networks. In this work we circumvent this bottleneck via a generalized-Bayes low-rank Laplace approximation. The posterior is restricted to a low-dimensional active subspace spanned by the dominant Gauss-Newton curvature directions of the empirical mean loss. These directions are computed using matrix-free curvature-vector products, so that the full covariance matrix is never formed. Although active subspaces are originally derived from the dominant directions of an uncentered covariance matrix of the gradient of a (physics-based) model [13], the overarching idea is similar, namely to find a linear projection to a low-dimensional subspace relevant for a quantity of interest. For the original active subspace approach this quantity was the model output subject to a prior distribution, in this work it is the posterior predictive uncertainty of a neural network. Within the subspace spanned by these dominant active directions, the posterior variances are available in closed form, while the prior variance is calibrated using a generalized-evidence criterion. The active subspace dimension is selected by empirical coverage on held-out calibration data, yielding predictive intervals that are both calibrated and sharp.

We derive our low-rank Laplace posterior within the framework of generalized Bayesian inference, where the data is connected to the parameters via a loss function, rather than a traditional likelihood function [14]. In particular we contrast summed with mean loss functions, where the latter is scaled by 1/N, N being the number of data records in the training set. The use of the summed loss equates to the standard Bayesian likelihood function. A central observation of the paper is that the scaling of the generalized posterior is not merely a technical detail. The standard Bayesian scaling leads to an increasingly concentrated posterior variance with the number of training data. To avoid such overconfident predictions, a low-rank approximation should then retain many weak-curvature directions with relatively high posterior variance. This increases the computational cost, and reduces the statistical coherence of the predictive output distribution. In other words, when samples from a local Gaussian weight posterior are propagated through the nonlinear network, these weak directions can shift the predictive mean or distort the resulting uncertainty intervals. Existing methods [15, 16] deal with this issue by replacing the full network with its linear expansion. By contrast, our generalized Bayesian mean-loss scaling avoids the purely data-size-driven contraction, results in a much lower-dimensional active subspace and can retain the full non-linear network. Numerical studies demonstrate that the proposed approach yields coherent predictive intervals with only a small number of active directions.

References (43)