Scalable AI Uncertainty Quantification via Generalized Laplace Active Subspaces
Authors: Wouter N. Edeling, Peter V. Coveney
Organizations: Scientific Computing Group, CWI, Science park 123, Amsterdam, 1098XG, the Netherlands. · Faculty of Electrical Engineering, Mathematics and Computer Science, University of Twente, Hallenweg 15, Enschede, 7500AE, the Netherlands. · Centre for Computational Science, University College London, 20 Gordon Street, London, WC1H 0AJ, UK. · Advanced Research Computing Centre, University College London, Gordon Street, London, WC1E 6BT, UK.
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.
Figures & tables
Figure 1: The matrix-vector product Gv∈RD with D=2701 , computed using the matrix-free method outlined in Section 4.1.5 , and by explicitly forming matrix G via ( 28 ). The absolute error ∣Gv−(Gv)explicit∣ is plotted on the right vertical axis.
Figure 2: The d leading eigenvalues λj and leading eigenvector p1 of G , computed using the matrix-free method outlined in Section 4.1.5 , and by explicitly forming matrix G via ( 28 ). The absolute errors are plotted on the right vertical axis.
Figure 3: 90% confidence intervals for the, a) generalized Bayesian scaling, and b) standard Bayesian scaling. Both CIs were generated by drawing 1000 posterior samples, and propagating these through the network.
Figure 4: The results for the standard Bayesian scaling β=Nσ−2 with N=1000 and d=43 . The CIs were generated by drawing 1000 posterior samples, and propagating these through the network.
Figure 5: The results for the standard Bayesian scaling β=Nσ−2 combined with the linearized Laplace predictive posterior distribution, computed using f(x;θ0)±2σf .
Figure 6: The coverage of the calibration procedure as outlined in Section 4.1.7 , versus the active subspace dimension d , for both the standard Bayesian scaling β=Nσ−2 and the generalized scaling β=σ−2 .
Figure 7: The parity plot of the mean compressive strength of concrete, with 90% CIs. We show the standard and generalized scaling results, both computed with sampled Laplace.
Figure 8: The cumulative (normalized) activity scores for our concrete compression strength feed-forward neural network with approximately D=106 weights.
Figure 9: The inner products ⟨p1,p1ref⟩ as a function of Nsub∈{500,1000,1500,2000,2500,3000} , replicated 25 times per Nsub . The reference vectors p1ref were computed using Nsub=10.000 SMILES strings.
baseline
Laplace (std. scaling)
Laplace (gen. scaling)
d=1
8692
8709
6863
d=2
8692
8753
5279
d=3
8692
8732
4435
Table 1: Number of valid SMILES strings (out of 10k).
Figure 10: Kernel density estimates of the sequence length for the standard and generalized scaling with d∈{1,2,3} . The maximum allowed sequence length is 256.
Quantity
Description
Molecular weight
Molecular size based on atomic masses, large values indicate large molecules.
SA score
Synthetic Accessibility score, higher values indicate more difficult synthesis.
SlogP
Estimate of how fat-soluble a molecule is.
Table 2: Molecular quantities of interest used to compare generated SMILES distributions within REINVENT.
Figure 11: Kernel density estimates of the QoIs for the standard and generalized scaling with d∈{1,2,3} .
Figure 12: The cumulative (normalized) activity scores for the REINVENT LSTM with approximately 1.6M weights. Computed using d=2 .
Figure 13: The contraction ratio ( 10 ) and posterior variances ( 22 ) for the generalized (left column) and standard (right column) Bayesian scaling, for both N=50 and N=1000 . These results were computed using the analytic regression function ( 7 ).
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Index
Token
Description
Index
Token
Description
0
$
Stop/end token
17
Br
Bromine atom
1
^
Start token
18
C
Aliphatic carbon atom
2
#
Triple bond
19
Cl
Chlorine atom
3
%10
Two-digit ring closure
20
F
Fluorine atom
4
(
Branch opening
21
N
Aliphatic nitrogen atom
5
)
Branch closing
22
O
Oxygen atom
Appendix
Table 3: Vocabulary used by the autoregressive SMILES generator. The vocabulary contains start and stop tokens, bond symbols, branch symbols, ring-closure indices, atom tokens, and charged or aromatic atom tokens.
School of Mathematics and Physics, University of Queensland, Australia · ARC Training Centre for Information Resilience (CIRES), Brisbane, Australia · Department of Electrical and Electronic Engineering, University of Melbourne, Australia +1