Title: Reparameterization invariance in approximate Bayesian inference
Venue: NeurIPS 2024
Accepted: yes
Keywords: Approximate Bayesian inference

Laplace approximations

Differential geometry

Reparametrization invariance
Abstract: Current approximate posteriors in Bayesian neural networks (BNNs) exhibit a crucial limitation: they fail to maintain invariance under reparameterization, i.e. BNNs assign different posterior densities to different parametrizations of identical functions. This creates a fundamental flaw in the application of Bayesian principles as it breaks the correspondence between uncertainty over the parameters with uncertainty over the parametrized function. In this paper, we investigate this issue in the context of the increasingly popular linearized Laplace approximation. Specifically, it has been observed that linearized predictives alleviate the common underfitting problems of the Laplace approximation. We develop a new geometric view of reparametrizations from which we explain the success of linearization. Moreover, we demonstrate that these reparameterization invariance properties can be extended to the original neural network predictive using a Riemannian diffusion process giving a straightforward algorithm for approximate posterior sampling, which empirically improves posterior fit.

Reparameterization invariance in approximate Bayesian inference

Abstract

Current approximate posteriors in Bayesian neural networks (BNNs) exhibit a crucial limitation: they fail to maintain invariance under reparameterization, i.e. BNNs assign different posterior densities to different parametrizations of identical functions. This creates a fundamental flaw in the application of Bayesian principles as it breaks the correspondence between uncertainty over the parameters with uncertainty over the parametrized function. In this paper, we investigate this issue in the context of the increasingly popular linearized Laplace approximation. Specifically, it has been observed that linearized predictives alleviate the common underfitting problems of the Laplace approximation. We develop a new geometric view of reparametrizations from which we explain the success of linearization. Moreover, we demonstrate that these reparameterization invariance properties can be extended to the original neural network predictive using a Riemannian diffusion process giving a straightforward algorithm for approximate posterior sampling, which empirically improves posterior fit.

1 Introduction

Bayesian deep learning has not seen the same degree of success as deep learning in general. Theoretically, Bayesian posteriors should be superior to point estimates (Devroye et al., 1996), but the practical benefits of having the posterior are all too often not significant enough to justify their additional computational burden. This has raised the question if we even should attempt to estimate full posteriors of all network parameters (Sharma et al., 2023).

As an example, consider the Laplace approximation (MacKay, 1992), which places a Gaussian in weight space through a second-order Taylor expansion of the log-posterior. When applied to neural networks, this is known to significantly underfit and assign significant probability mass to functions that fail to fit the training data (Lawrence, 2001; Immer et al., 2021a). Fig. 2 (top-left) exemplifies this failure mode for a small regression problem. Interestingly, this behavior is rarely observed outside neural network models, and the failure appears linked to Bayesian deep learning.

Recently, the linearized Laplace approximation ( LLA ) has been shown to significantly improve on Laplace's approximation through an additional linearization of the neural network (Immer et al., 2021b; Khan et al., 2019). We are unaware of any theoretical justification for this rather counterintuitive result: why would an additional degree of approximation improve improve improve improve improve improve improve improve improve the posterior fit?

Carl Henrik Ek

Søren Hauberg

We will show that the failures of Bayesian deep learning can partly be explained by insufficient handling of reparameterizations of network weights, while the LLA achieves infinitesimal invariance to reparameterizations. To motivate, consider the simple network (Fig. 1)

This can be reparametrized to form the same function realization from different weights as f ( x ) = w 1 / α ReLU( αw 2 x ) for any α > 0 . That is, the weight-pairs ( w 1 , w 2 ) and ( w 1 / α , αw 2 ) correspond to the same function even if the weights are different (Fig. 1, center).

Thus the approximate posterior cannot reflect the fundamental property of the true posterior, that it should assign a single unique density to a function regardless of its parametrization.

In this paper , we analyze the reparameterization group driving deep learning and show that it is a pseudo-Riemannian manifold, with the generalized Gauss-Newton ( GGN ) matrix as its pseudo-metric. We prove that the commonly observed underfitting of the Laplace approximation (Fig. 2, top left) is caused by high in-distribution uncertainty in directions of reparametrizations (Fig. 2, top center).

We develop a reparametrization invariant diffusion posterior that proveably does not underfit despite using the neural network predictive (Fig. 2, center row). Figure 1 (right) visualizes how this posterior adapts to the geometry of

reparametrizations, thereby not underfitting. The diffusion can be simulated with a multi-step EulerMaruyama scheme from which the linearized Laplace approximation (LLA) is a single-step. This link implies that the LLA infinitesimally is invariant to reparameterizations, due to the otherwise counterintuitive linearization (Fig. 1, left). Experimentally, our diffusion consistently improves posterior fit, suggesting that reparameterizations should be given more attention in Bayesian deep learning.

2 Background: Laplace approximations

Let f w : R I → R O denote a neural network with weights w , and define a likelihood p ( y | f w ( x )) and a prior p ( w ) . Laplace's approximation (MacKay, 1992) performs a second-order Taylor expansion of the log-posterior around a mode ˆ w . This results in a Gaussian approximate posterior N ( w | ˆ w , -H -1 ˆ w ) , where H w is the Hessian matrix. The linearized Laplace approximation (Immer et al., 2021b; Khan et al., 2019) further linearize f w at a chosen weight ˆ w , i.e. f w ( x ) ≈ f ˆ w lin ( w , x )) = f ˆ w ( x ) + J ˆ w ( x )( w -ˆ w ) , where J ˆ w ( x ) = ∂ w f w ( x ) | w =ˆ w ∈ R O × D is the Jacobian of f w . Here D = dim( w ) denotes the number of parameters in the network. Applying the usual Laplace approximation to the linearized model yields an approximate posterior (Immer et al., 2021b),

where H ( x ) = -∂ 2 f ˆ w ( x ) log p ( y | f ˆ w ( x )) ∈ R O × O is the Hessian of the log-likelihood and we have assumed a weight prior N ( 0 , α -1 I ) . Note that it is trivial to extend to other prior covariances. This particular covariance is known as the generalized Gauss-Newton (GGN) Hessian approximation, which is commonly used in Laplace approximations (Daxberger et al., 2021b).

To reduce the notational load we stack the per-datum Jacobians into J ˆ w = [ J ˆ w ( x 1 ); . . . ; J ˆ w ( x N )] ∈ R NO × D and similarly for the Hessians, and write the GGN matrix as GGN ˆ w = J ⊤ ˆ w HJ ˆ w . For Gaussian likelihoods, the Hessian is an identity matrix and can be disregarded, and for other likelihoods simple expressions are generally available (Immer et al., 2021b).

Sampled and linearized Laplace. The Laplace approximation gives a Gaussian distribution q ( w |D ) over the weight space with mean ˆ w and covariance Σ . A predictive distribution is obtained by integrating the approximate posterior against the model likelihood,

We refer to this predictive method as sampled Laplace . Recent works have suggested linearizing the neural network in the likelihood model to obtain the predictive distribution (Immer et al., 2021b),

This is referred to as linearised Laplace . Immer et al. (2021b) argues that the common choice of approximating the posterior precision with the GGN implicitly linearizes the neural network and hence the predictive distribution should be modified for consistency.

Sampled Laplace is known to severely underfit , whereas the linearized Laplace approximation does not (Immer et al. 2021b; Fig. 2). It is an open problem why the crude linearization is beneficial (Papamarkou et al., 2024). This paper shows that the benefit is linked to the lack of reparameterization invariance .

The lack of reparameterization invariance leads to an additional problem for Laplace approximations. The precision of the approximate posterior is given either by the Hessian or the GGN. As shown by Dinh et al. (2017), the Hessian of the loss is not invariant to reparameterizations of the neural network, and the same holds for the GGN. Depending on which parametrization of the posterior mode is chosen by the optimizer, we, thus, get different covariances for the approximate posterior. Empirically, this can render Laplace's approximation unstable (Warburg et al., 2023). Figure 1 (center) illustrates the phenomena.

3 Reparameterizations of linear functions

Deep learning models excel when they are highly overparametrized , i.e. when they have significantly more parameters than observations ( D ≫ NO ). This introduces many degrees of freedom to the model, which will be reflected in the Bayesian posterior. However, as we have argued, traditional approximate Bayesian inference does not correctly capture this and assigns different probability measures to identical functions. Next, we characterize these degrees of freedom to design suitable approximate posteriors. To develop the theory, we first consider the linear setting and then extend it to the general case.

The reparameterizations of linear functions can be characterized exactly. Consider f ( w ) = Aw + b and a possible reparameterization, g : R D → R D , of this function such that f ( g ( w )) = f ( w ) . It is then evident that A ( g ( w ) -w ) = 0 . This implies that for any reparameterization of a linear function, we have g ( w ) -w ∈ ker( A ) , where ker( A ) denotes the kernel (nullspace) of A . Hence, the linear function cannot be reparametrized if we restrict ourselves to the non-kernel subspace of the input space or if A has a trivial kernel.

A linearized neural network f w ′ lin : w , x ↦→ f w ′ ( x ) + J w ′ ( x )( w -w ′ ) is a linear function in the parameters, where we have linearized around w ′ . The above analysis then implies that the kernel of the stacked Jacobian J w ′ characterizes the reparameterizations of the linearized network.

We can also characterize the reparameterizations through the GGN and the corresponding neural tangent kernel (NTK; Jacot et al. 2018),

By construction, these have the same non-zero eigenvalues, and thereby also have identical ranks. We, thus, see that the kernel of the Jacobian coincides with that of the GGN, i.e. ker( J w ) = ker( GGN w ) .

Two orthogonal subspaces. For any selfadjoint operator (such as positive semi-definite matrices like the GGN), the image and the kernel orthogonally span the whole space, i.e.

where the kernel is the hyperplane of vectors that are mapped to zero and the image is the hyperplane of vectors spanned by the operator (Fig. 3). For a linearized neural network, im( GGN w ) spans the effective parameters P ⊂ R D , i.e. the maximal set of parameters that generate different linear functions R I → R O when evaluated on the training set.

1

2

3

1

2

3

A Laplace covariance decomposes into the same subspaces. Recall that the posterior precision is Σ -1 = GGN ˆ w + α I . Let the eigendecomposition of GGN ˆ w be U T ΛU , and assume that U 1 and U 2 are the eigenvectors corresponding to the non-zero eigenvalues ˜ Λ , and the zero eigenvalues respectively. These form a basis in the kernel and image subspace as discussed above. Then the covariance is,

Consequently, we can decompose any sample from the Gaussian N ( ˆ w , Σ) into a kernel and an image contribution, w = ˆ w + w ker + w im , where w ker is the component of the sample that is in the kernel of GGN ˆ w and w im is in the image. Note that all probability mass in ker( GGN ˆ w ) is due to the prior, i.e. we place prior probability on functional reparameterizations even if we can never observe data in support of such.

Underfitting in sampled Laplace can now be understood. For the linearized approximation, it holds for training data x ∈ X that,

Hence, the linearized predictive only samples in the image subspace consisting of unique functions. This is not true for the sampled Laplace approximation, which also samples in the kernel subspace. Since sampled Laplace does not linearize the neural network, the kernel does not correspond to reparameterizations. It hence adds 'incorrect' degrees of freedom to the posterior as artifacts of the Gaussian approximation.

Empirically, sampled Laplace is only observed to underfit in overparametrized models. Fig. 4 illustrates this by increasing the amount of training data to decrease the kernel rank, i.e. reduce the reparametrization issue. We find that as the issue is lessened, sampled Laplace reduces its underfitting.

4 Reparameterizations of neural networks

We have seen that the parameters of linear models can be decomposed into two linear subspaces corresponding to reparameterizations and functional changes. We next analyze nonlinear models.

Intuitively , reparameterizations of a nonlinear neural network form continuous trajectories in the parameter space (c.f. Fig. 1). We define that all points along such a trajectory are identical, which changes the weight space geometry to be a manifold. Likewise, the parameter changes corresponding to actual function changes reside on a nonlinear manifold. This is sketched in Fig. 3. Interestingly, the GGN turns out to induce a natural (local) inner product on these nonlinear manifolds, which allows us to both understand and generalize the linearized Laplace approximation.

4.1 The effective-parameters quotient space

For a nonlinear neural network f : R D × R I → R O , the surfaces in weight space along which the function does not change are generally not linear. Here, we formalize these reparameterization invariant surfaces and show that they are a partition of the weight space.

Definition 4.1. Given a datapoint x ∈ R I , for any w ∈ R D we define the x -reparameterizations as the set R f x ( w ) = { w ′ such that f ( w ′ , x ) = f ( w , x ) } . Consistently, given a collection of points X ⊆ R I , we call the intersection R f X ( w ) = ⋂ x ∈X R f x ( w ) X -reparameterizations .

Trivially, w ∈ R f X ( w ) for any choice of X . We next define the subset of X -reparameterizations which can be obtained via a smooth deformation from w .

Definition 4.2. We say that a piecewise differentiable function γ : [0 , 1] → R D is a homotopy of ( w , ˆ w ) if γ (0) = w and γ (1) = w ′ . The set of X -smooth-reparameterizations is defined as,

A homotopy γ is, thus, a smooth path along which all neural networks have identical predictions on X . We consider two networks, w and w ′ , similar if they can be connected by such a homotopy. Formally, we define the relation ∼ over R D as w ∼ w ′ if w ′ ∈ ¯ R f X ( w ) .

We next use this relation to form a new view on the weight space R D in which similar weights are seen as one point. This can be realized using quotient spaces (Lee, 2012). These are well-studied spaces that are constructed by considering a collection of points in one space as a single point in a new space. In our case, we have the following result.

Lemma 4.3. ∼ is an equivalence relation, i.e. it is transitive, symmetric and reflexive. We can form the quotient space P = R D / ∼ of effective parameters. We denote [ w ] ∈ P the equivalence class of an element w ∈ R D .

This quotient structure gives a rich mathematical foundation to construct reparameterization invariant neural networks. Within the quotient, two effective parameters [ w 1 ] , [ w 2 ] ∈ P are the same point if and only if w 1 ∼ w 2 . This means that all parameters w ∈ [ w 1 ] gives the same function over X .

4.2 The effective-parameters manifold

Geometry is the mathematical language of invariances. To this end would like to endow the weight space with a geometric structure such that two weights, w 1 and w 2 , corresponding to the same function, have a distance of zero, i.e.

Since the weights generate the same function, we define a metric that measures differences in function values on the training data. Consider weights w and an infinitesimal displacement ϵ , we then define,

where the last step follows from a first-order Taylor expansion of f around w . This is a standard pullback metric ( f ∗ H ) w = GGN w commonly used in Riemannian geometry. This implies that the GGN matrix infinitesimally defines an inner product, i.e. it is a Riemannian metric . By integrating over paths, the distance extend to any pair of points and satisfies Eq. 8 (Lee, 2012).

̸

Watch out! It's a pseudo-metric. We have already seen that in overparametrized models, the GGN is rank-deficient, which implies that it is not positive definite. Consequently, it is not a Riemannian metric but rather a pseudo -Riemannian metric. A pseudo-metric can be a counterintuitive object: two points w 1 and w 2 at distance zero may have different pseudo-metrics ( f ∗ H ) w 1 = ( f ∗ H ) w 2 . This is reflected in the Laplace approximation. The covariance prescribed by the Laplace approximation is Σ ˆ w = ( ∇ 2 w L ( ˆ w ) + α I ) -1 , where L ( w ) is shorthand for the training log-likelihood. The Hessian is exactly the pullback pseudo-metric ∇ 2 w L ( ˆ w ) = ( f ∗ H ) ˆ w , which is not invariant to reparameterizations of the neural network. Specifically, for a reparameterization function g that is also a diffeomorphism, the change of variable rules states that,

̸

This means that, while each parameter w has its well-defined covariance Σ w , each equivalence class does not have a unique one, since ˆ w and g ( ˆ w ) belong to the same equivalence class and Σ ˆ w = Σ g ( ˆ w ) .

Non-Gaussian likelihoods. The Euclidean distance measure in Eq. 9 corresponds to choosing a Gaussian likelihood. The distance definition readily extends to other likelihoods and the corresponding metric takes the form of the generalized Gauss-Newton matrix J ⊤ w HJ w , where H denotes the Hessian of the log-likelihood. For both Gaussian and Bernoulli likelihoods, this Hessian is positive definite, but e.g. the cross entropy has a rank-deficient Hessian and, thus, induces a pseudo-metric.

An impractical solution. The unfortunate behavior of approximate posteriors assigning different probabilities to the same function could be rectified by marginalizing over the set of reparameterizations of w , i.e. ∫ w ′ ∈R ( w ) q ( w ′ |D )d w ′ . While this construction solves the highlighted problem, its complexity makes it impractical and we are unaware of any works along these lines.

When restricted to a smaller class of reparameterization (the ones homotopic to the identity), the integral can be thought of as 'collapsing' each reparameterization equivalence class to a single point in P = R D / ∼ formalized in Lemma 4.3. Nontrivially, the pullback metric implicitly performs a similar operation, as shown later in Theorem 4.5. This connection motivates the dive into Riemannian geometry: we get a tractable approach to engaging with neural network reparameterizations .

4.3 Topological equivalence of the two views

So far we described two a priori very different objects: the quotient space P = R D / ∼ and the pseudo-Riemannian manifold ( R D , GGN w ) . We referred to both of them as effective parameters and this is no coincidence as there is a natural relationship between the points at distance zero according to the pseudo-metric and the equivalence classes.

Proposition 4.4. For any w , w ∈ R D

Even better, these two spaces share the same topological structure. To state this we need a notion of distance on the quotient space and the most natural choice is to inherit the Euclidean distance ∥ · ∥ from R D . This distance is defined as

where the infimum is taken over all finite sequences p 1 , . . . , p n and q 1 , . . . , q n such that [ w ] = [ p 1 ] , [ p i +1 ] = [ q i ] and [ q n ] = [ w ′ ] .

This distance d P induces a topology on the quotient space P which is equivalent to the topology induced by the pullback distance d f ∗ H on the pseudo-Riemannian manifold. Formally

Theorem 4.5. For any w 0 , w 1 ∈ R D , for any ϵ > 0 there exists δ > 0 such that

This result connects an abstract quotient space P with the pseudo-Riemannian metric GGN w . The quotient captures useful intuitions but is difficult to leverage computationally. In contrast, the pseudometric has some counterintuitive aspects but we can identify the underlying Riemannian structure which leads to tractable algorithms (Sec. 5).

A tale of two manifolds. For any given parameter w ∈ R D and training set X , we show that there exist two Riemannian manifolds ( P w , m ) and ( P ⊥ w , m ⊥ ) embedded in R D , illustrated in Fig. 3. They capture the functional change and reparameterization properties respectively, but, differently from the previously studied ( R D , GGN w ) , they are Riemannian manifolds without degenerate directions in their metrics. Formally,

Theorem 4.6. For any parameter w suppose the set of parameters that generate the same predictions is denoted by P ⊥ w = { w ′ ∈ R D such that f ( w ′ , x ) = f ( w , x ) for all x ∈ X} . Then this set is a smooth manifold embedded in R D . Furthermore, the set of parameters that locally generates unique predictions, P w is also a submanifold embedded in R D .

They are the direct generalization to the nonlinear case of the two spaces involved in Eq. 6, where P w plays the role of the image and P ⊥ w plays the role of the kernel . When f is linear, they are identical.

In general, P w and P ⊥ w intersect only in w , and the two respective tangent spaces in w span all directions. They can be thought of as two collections of parameters, and the associated functions have different properties: (1) P ⊥ w is entirely contained in the same equivalence class P ⊥ w ⊆ [ w ] , thus all the parametrized functions are identical on the train set; in contrast, (2) P w never intersects the same equivalence class more than one time, at least locally, thus the parametrized functions always changes when moving in any direction. Thus P w resembles the effective parameter manifold P , but with the difference of being an actual Riemannian manifold. These two manifolds exist under the assumption that Jacobian is full rank (see proof in appendix C).

The two metrics m and m ⊥ are not uniquely defined. A natural choice for m is to restrict GGN w to the tangent space of P w corresponding to the non-zero eigenvectors, i.e. m = GGN + w . While, for m ⊥ we can inherit the Euclidean metric, i.e. m ⊥ = α I for α > 0 .

5 Exploring manifolds with random walks

SDEs on manifolds. Given a Riemannian manifold (M , G ) , the simplest choice of distribution that respects the Riemannian metric G is a Riemannian diffusion (or Brownian motion, c.f. Hsu (2002)) stopped at time t . This follows the stochastic differential equation (Girolami & Calderhead, 2011),

Practically speaking this simple process can be simulated using an Euler-Maruyama (Maruyama, 1955) scheme. The Christoffel symbols, Γ i ( θ ) , are commonly disregarded as they have a high computational cost, and Li et al. (2015) showed that the resulting error is bounded.

Using the Euler-Maruyama integrator with step size h t , setting τ = 1 corresponding to standard Bayesian inference and disregarding the term involving the Christoffel symbols Γ , we obtain the simple update rule w t +1 = w t + √ 2 h t G ( w t ) -1 2 ϵ , where ϵ ∼ N ( 0 , I ) . This applies to any Riemannian manifold. However, the effective-parameter ( R D , GGN w ) is only pseudo-Riemannian, we explore three Riemannian alternatives: ( R D , GGN w + α I ) , ( P ⊥ w , α I ) and ( P w , GGN + ω )

Diffusion on ( R D , GGN w + α I ) . The Laplace approximation can also be written as a diffusion on a manifold. As we saw in Sec. 2, the Laplace approximation can be written as w |D ∼ N ( ˆ w , Σ) with Σ -1 = GGN ˆ w + α I . This can also be written as a sample at t = 1 of a Riemannian diffusion on a manifold with a constant metric, ( R D , G ) , where G = GGN ˆ w + α I . The SDE d w = G -1 2 d W have a marginal distribution at t = 1 that exactly match the standard Laplace approximation. Note that this formulation does not rely on the approximation of the SDE that disregards the term involving the Christoffel symbols Γ as these are zero for constant metrics. Hence, the above is exactly a Riemannian diffusion on the manifold with a constant metric given by the GGN at the MAP parameter. Note that this is only a valid diffusion for α > 0 in which case it is not reparametrization invariant.

Kernel-manifold diffusion. The kernel-manifold ( P ⊥ w , α I ) consists of parameters that generate the same function over the training set. The effect of diffusion on this manifold and using the neural network predictive is similar to sampling from the kernel subspace while using the linearized predictive. On the training set the predictive variance is 0 because it only samples reparametrizations of the MAP predictions. On out-of-distribution data, the variance is greater than 0 if at least one of

the reparameterizations on the training set is not a global reparameterization. This leads to a clear separation in the predictive variance of in-distribution and out-of-distribution data (Fig. 2) and further implies that this diffusion distribution never underfits. Stated formally,

Theorem 5.1. Var w ∼P ⊥ ˆ w [ f ( w , x )] = 0 for train data x ∈ X . For a test point x t ̸∈ X , if there exists a reparameterization w ′ ∈ ¯ R f X ( ˆ w ) such that w ′ ̸∈ ¯ R f X∪{ x t } ( ˆ w ) , then Var w ∼P ⊥ ˆ w [ f ( w , x t )] > 0 .

Non-kernel-parameter manifold diffusion. The non-kernel-parameter manifold ( P w , GGN + ω ) consists of parameters that generate unique functions over the training set. Diffusion on this manifold samples functions that are necessarily different from the MAP predictions on the training set. However, the predictive variance in the training set is bounded such that the functional diversity in the predictive samples reflects the intrinsic variance of the training data (Fig. 2).

This is the only considered diffusion that acts on a Riemannian manifold while being reparametrization invariant, i.e. ¯ R f X ( w ) = { w } . We call this Laplace diffusion and study it empirically in Sec. 7.

6 Related work

Bayesian deep learning techniques are still in their infancy and generally involve poorly understood approximations. The arguably most popular tool for uncertainty quantification is ensembles (Lakshminarayanan et al., 2017; Hansen & Salamon, 1990). Several approaches make Gaussian approximations to the true posterior, including 'Bayes by backprop' (Blundell et al., 2015), stochastic weight averaging (SWAG) (Maddox et al., 2019) and the Laplace approximation (MacKay, 1992; Daxberger et al., 2022; Antorán et al., 2023; Deng et al., 2022; Miani et al., 2022).

The high dimensionality of the weight space gives rise to significant computational challenges when constructing Bayesian approximations. This has motivated various low-rank approximations (review in Daxberger et al., 2021a), e.g. last layer approximations (Kristiadi et al., 2020), subnetwork inference (Daxberger et al., 2021c), subspace inference (Izmailov et al., 2020) or even PCA in weight space (Maddox et al., 2019). Such approaches lessen the computational load, while often improving predictive performance. Our analysis sheds light on why crude approximations perform favorably: smaller models are less affected by reparameterization issues . Our diffusion process, thus, provides an alternative, and less heuristic, path forward.

MacKay (1998) noted the importance of the choice of basis in Laplace approximations; our pseudoRiemannian view can be seen as having a continuously changing basis. Kristiadi et al. (2023) studied how a metric transforms under a bijective differentiable change of variables. They enforce geometric

In-distribution m etrics

consistency, highlighting, e.g., the non-invariance of the GGN to a change of variables. Petzka et al. (2019); Jang et al. (2022) point to the same inconsistency with an emphasis on flatness measures.

Kim et al. (2022) and Antorán et al. (2022) study global (rather than data-dependant) reparametrizations associated with specialized architectures. While analytic expressions can be obtained, the results do not apply to general networks. While not expressed in terms of reparametrizations, Izmailov et al. (2021) show that linearly dependent datasets give rise to a hyperplane in the kernel manifold. Kim et al. (2024) also study the kernel of the GGN in the context of influence functions. These works characterize subsets of the reparametrization group. We provide the first architecture-agnostic characterization of all continuous reparametrizations.

In a closely related work, Bergamin et al. (2024) introduced a Riemannian Laplace approximation (Hauberg, 2018) that improves posterior fit over a range of tasks. Furthering this line of research, Yu et al. (2023) explored the use of the Fisher information metric within this framework. While sharing the language of Riemannian geometry, our work focuses on analyzing the effectiveness of linearized Laplace within the context of neural network reparametrization, instead of primarily aiming to achieve better posterior approximations. This allows us to gain deeper insights into the underlying mechanisms that contribute to the success of this approximation technique.

7 Experiments

We benchmark Laplace diffusion with neural network predictive against linearized and sampled Laplace to validate the developed theory. Implementation details are in Appendix E.1. We will show that the diffusion posterior slightly outperforms linearized Laplace in terms of both in-distribution fit and out-of-distribution detection. For completeness, we include comparisons to other baselines such as SWAG, diagonal Laplace, and last-layer Laplace in Appendix E.3. Laplace diffusion is competitive with the best-performing Bayesian methods despite using the neural network predictive (i.e. no linearization). This contrasts sampled Laplace which severely underfits. This is evidence that the developed theory explains the key challenges of Bayesian deep learning.

Experimental details (appendix E.3). We train a 44,000-parameter LeNet(LeCun et al., 1989) on MNIST and FMNIST as well as a 270,000-parameter ResNet(He et al., 2016) on CIFAR-10(Krizhevsky et al., 2009). We sample from the Laplace approximation of the posterior and our Laplace diffusion. For the samples from the Laplace approximation, we consider both the linearized predictive and the neural network predictive, while for diffusion samples, we only consider the neural network predictive. These baselines were chosen to be as similar as possible to our approach to ease the comparison. We use the same prior precision for all methods to ensure a fair comparison.

In-distribution performance (Table 1). We measure the in-distribution performance of different posteriors on a held-out test set. We report means ± standard deviations of several metrics: Confidence, Accuracy, Negative Log-Likelihood, Brier Score (Brier, 1950), Expected Calibration Error (Naeini et al., 2015) and Mean Calibration Error. We observe that Laplace diffusion has the best calibration and fit. We also confirm the underfitting of Sampled Laplace across cases. For CIFAR-10 we had to use a large prior precision to get meaningful samples from sampled Laplace, which explains the less severe underfitting. High prior precision is known to help with underfitting in sampled Laplace, but it also shrinks predictive uncertainty to almost zero.

Robustness to dataset shift (Fig. 5, appendix E.3.2). We use ROTATED-MNIST, ROTATEDFMNIST, and ROTATED-CIFAR to asses model-calibration and model fit under distribution shift. Fig. 5 plots negative log-likelihood (NLL) and expected calibration error (ECE) against the degrees of rotation. Laplace diffusion improves on other Laplace approximations.

Out-of-distribution detection (Table 2). On out-of-distribution data from other benchmarks, we see that Laplace diffusion outperforms the other Laplace approximations.

8 Conclusion

While approximate Bayesian inference excels in many areas, it continues to face challenges in deep learning. Techniques that work well in shallow models struggle with deep ones even if they remain computationally tractable. This suggests that overparametrization plays a negative role in Bayesian models. Our theoretical analysis shows how overparametrization creates a growing reparameterization issue that conflicts with standard Euclidean approximate posteriors, such as the ever-present Gaussian. For small models this issue is negligible, but as models grow, so does the reparameterization issue.

Our geometric analysis also suggests a solution: we should consider approximate posteriors that respect the group structure of the reparameterizations. We observe that the generalized Gauss-Newton (GGN) matrix commonly used in Laplace approximations induces a pseudo-Riemannian structure on the parameter space that respects the topology of the reparameterization group. This implies that we can use pseudo-Riemannian probability distributions as approximate posteriors, and we experimented with the obvious choice of a geometric diffusion process. We also showed that the state-of-the-art linearized Laplace approximation can be viewed as a naïve (or simple) numerical approximation to our proposed diffusion. This helps explain the success of the linearized approximation.

Our proposed approximate posterior does have issues. While sampling has the same complexity as standard Laplace approximations, it increases runtime by a constant factor. Common Laplace approximations do not sample according to the GGN but rather approximate this matrix with a diagonal or block-diagonal matrix. Mathematically, such approximations break the motivational reparameterization invariance, so it is unclear if such approaches should be applied in our framework. Our work, thus, raises the need for new computational pipelines for engaging with the GGN matrix.

Acknowledgments and Disclosure of Funding

This work was supported by a research grant (42062) from VILLUM FONDEN. This project received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreements 757360 and 101123955). The work was partly funded by the Novo Nordisk Foundation through the Center for Basic Machine Learning Research in Life Science (NNF20OC0062606). In addition to the ERC (above), PH, MP and LT thank the International Max Planck Research School for Intelligent Systems (IMPRS-IS) for support, and gratefully acknowledge financial support by the DFG Cluster of Excellence 'Machine Learning - New Perspectives for Science', EXC 2064/1, project number 390727645; the German Federal Ministry of Education and Research (BMBF) through the Tübingen AI Center (FKZ: 01IS18039A); and funds from the Ministry of Science, Research and Arts of the State of Baden-Württemberg. The authors are also grateful to Magnus Waldemar Hoff Harder for alerting us to imprecisions in an early draft of this manuscript.

References

Allen-Zhu, Z., Li, Y., and Song, Z. A convergence theory for deep learning via over-parameterization. In International conference on machine learning , pp. 242-252. PMLR, 2019.

Antorán, J., Janz, D., Allingham, J. U., Daxberger, E., Barbano, R. R., Nalisnick, E., and HernándezLobato, J. M. Adapting the linearised laplace model evidence for modern deep learning. In International Conference on Machine Learning , pp. 796-821. PMLR, 2022.

Antorán, J., Padhy, S., Barbano, R., Nalisnick, E., Janz, D., and Hernández-Lobato, J. M. Samplingbased inference for large linear models, with application to linearised laplace, 2023.

Bergamin, F., Moreno-Muñoz, P., Hauberg, S., and Arvanitidis, G. Riemannian laplace approximations for bayesian neural networks. Advances in Neural Information Processing Systems , 36, 2024.

Blundell, C., Cornebise, J., Kavukcuoglu, K., and Wierstra, D. Weight uncertainty in neural network. In International conference on machine learning , pp. 1613-1622. PMLR, 2015.

Bombari, S., Amani, M. H., and Mondelli, M. Memorization and optimization in deep neural networks with minimum over-parameterization. In Advances in Neural Information Processing Systems (NeurIPS) , 2022.

Brier, G. W. Verification of forecasts expressed in terms of probability. Monthly Weather Review , 78(1):1 - 3, 1950. doi: 10.1175/1520-0493(1950)078<0001:VOFEIT>2.0. CO;2. URL https://journals.ametsoc.org/view/journals/mwre/78/1/1520-0493_ 1950_078_0001_vofeit_2_0_co_2.xml .

Daxberger, E., Kristiadi, A., Immer, A., Eschenhagen, R., Bauer, M., and Hennig, P. Laplace redux - effortless Bayesian deep learning. In Ranzato, M., Beygelzimer, A., Dauphin, Y., Liang, P., and Vaughan, J. W. (eds.), Advances in Neural Information Processing Systems , volume 34, pp. 20089-20103. Curran Associates, Inc., 2021a.

Daxberger, E., Kristiadi, A., Immer, A., Eschenhagen, R., Bauer, M., and Hennig, P. Laplace redux-effortless Bayesian deep learning. In NeurIPS , 2021b.

Daxberger, E., Nalisnick, E., Allingham, J. U., Antorán, J., and Hernández-Lobato, J. M. Bayesian deep learning via subnetwork inference. In International Conference on Machine Learning , pp. 2510-2521. PMLR, 2021c.

Daxberger, E., Kristiadi, A., Immer, A., Eschenhagen, R., Bauer, M., and Hennig, P. Laplace redux effortless bayesian deep learning, 2022.

Deng, Z., Zhou, F., and Zhu, J. Accelerated linearized laplace approximation for bayesian deep learning, 2022.

Devroye, L., Györfi, L., and Lugosi, G. A probabilistic theory of pattern recognition . Springer Science & Business Media, 1996.

Dinh, L., Pascanu, R., Bengio, S., and Bengio, Y. Sharp minima can generalize for deep nets. In International Conference on Machine Learning , pp. 1019-1028. PMLR, 2017.

Du, S., Lee, J., Li, H., Wang, L., and Zhai, X. Gradient descent finds global minima of deep neural networks. In International conference on machine learning , pp. 1675-1685. PMLR, 2019.

George, T., Laurent, C., Bouthillier, X., Ballas, N., and Vincent, P. Fast approximate natural gradient descent in a kronecker factored eigenbasis. Advances in Neural Information Processing Systems , 31, 2018.

Girolami, M. and Calderhead, B. Riemann manifold langevin and hamiltonian monte carlo methods. Journal of the Royal Statistical Society Series B: Statistical Methodology , 73(2):123-214, 2011.

Hansen, L. K. and Salamon, P. Neural network ensembles. IEEE transactions on pattern analysis and machine intelligence , 12(10):993-1001, 1990.

Hauberg, S. Directional statistics with the spherical normal distribution. In Proceedings of FUSION 2018 , 2018.

He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition , pp. 770-778, 2016.

Hsu, E. P. Stochastic analysis on manifolds . American Mathematical Soc., 2002.

Immer, A., Bauer, M., Fortuin, V., Rätsch, G., and Emtiyaz, K. M. Scalable marginal likelihood estimation for model selection in deep learning. In International Conference on Machine Learning (ICML) , pp. 4563-4573, 2021a.

Immer, A., Korzepa, M., and Bauer, M. Improving predictions of Bayesian neural nets via local linearization. In International Conference on Artificial Intelligence and Statistics (AISTATS) , pp. 703-711, 2021b.

Izmailov, P., Maddox, W. J., Kirichenko, P., Garipov, T., Vetrov, D., and Wilson, A. G. Subspace inference for bayesian deep learning. In Uncertainty in Artificial Intelligence , pp. 1169-1179. PMLR, 2020.

Izmailov, P., Nicholson, P., Lotfi, S., and Wilson, A. G. Dangers of bayesian model averaging under covariate shift. Advances in Neural Information Processing Systems , 34:3309-3322, 2021.

Jacot, A., Gabriel, F., and Hongler, C. Neural tangent kernel: Convergence and generalization in neural networks. In Advances in neural information processing systems , 2018.

Jang, C., Lee, S., Park, F., and Noh, Y.-K. A reparametrization-invariant sharpness measure based on information geometry. Advances in neural information processing systems , 35:27893-27905, 2022.

Khan, M. E. E., Immer, A., Abedi, E., and Korzepa, M. Approximate inference turns deep networks into Gaussian processes. Advances in Neural Information Processing Systems (NeurIPS) , 32, 2019.

Kim, S., Park, S., Kim, K.-S., and Yang, E. Scale-invariant bayesian neural networks with connectivity tangent kernel. In The Eleventh International Conference on Learning Representations , 2022.

Kim, S., Kim, K., and Yang, E. Gex: A flexible method for approximating influence via geometric ensemble. Advances in Neural Information Processing Systems , 36, 2024.

Kristiadi, A., Hein, M., and Hennig, P. Being Bayesian, even just a bit, fixes overconfidence in ReLU networks. In III, H. D. and Singh, A. (eds.), Proceedings of the 37th International Conference on Machine Learning , volume 119 of Proceedings of Machine Learning Research , pp. 5436-5446. PMLR, 13-18 Jul 2020.

Kristiadi, A., Dangel, F., and Hennig, P. The geometry of neural nets' parameter spaces under reparametrization. arXiv preprint arXiv:2302.07384 , 2023.

Krizhevsky, A., Hinton, G., et al. Learning multiple layers of features from tiny images. 2009.

Lakshminarayanan, B., Pritzel, A., and Blundell, C. Simple and scalable predictive uncertainty estimation using deep ensembles. Advances in neural information processing systems , 30, 2017.

Lanczos, C. An iteration method for the solution of the eigenvalue problem of linear differential and integral operators. Journal of Research of the National Bureau of Standards , 45(4), October 1950. doi: 10.6028/jres.045.026. URL https://hal.science/hal-01712947 .

Lawrence, N. D. Variational inference in probabilistic models . PhD thesis, Citeseer, 2001.

LeCun, Y., Boser, B., Denker, J. S., Henderson, D., Howard, R. E., Hubbard, W., and Jackel, L. D. Backpropagation applied to handwritten zip code recognition. Neural computation , 1(4):541-551, 1989.

Lee, J. M. Smooth manifolds . Springer, 2012.

Li, C., Chen, C., Carlson, D., and Carin, L. Preconditioned stochastic gradient langevin dynamics for deep neural networks, 2015.

Li, Z., Wang, T., and Arora, S. What happens after sgd reaches zero loss?-a mathematical framework. arXiv preprint arXiv:2110.06914 , 2021.

Lippe, P. UvA Deep Learning Tutorials. https://uvadlc-notebooks.readthedocs.io/en/ latest/ , 2022.

Liu, C., Zhu, L., and Belkin, M. On the linearity of large non-linear models: when and why the tangent kernel is constant. Advances in Neural Information Processing Systems , 33:15954-15964, 2020.

MacKay, D. J. Choice of basis for laplace approximation. Machine learning , 33:77-86, 1998.

MacKay, D. J. C. A practical Bayesian framework for backpropagation networks. Neural Computation , 4(3):448-472, 1992.

Maddox, W. J., Izmailov, P., Garipov, T., Vetrov, D. P., and Wilson, A. G. A simple baseline for bayesian uncertainty in deep learning. Advances in neural information processing systems , 32, 2019.

Maruyama, G. Continuous markov processes and stochastic equations. Rendiconti del Circolo Matematico di Palermo , 4:48-90, 1955.

Miani, M., Warburg, F., Moreno-Muñoz, P., Detlefsen, N. S., and Hauberg, S. Laplacian autoencoders for learning stochastic representations. In Advances in Neural Information Processing Systems (NeurIPS) , 2022.

Naeini, M. P., Cooper, G., and Hauskrecht, M. Obtaining well calibrated probabilities using bayesian binning. In Proceedings of the AAAI conference on artificial intelligence , volume 29, 2015.

Nguyen, Q., Mondelli, M., and Montufar, G. F. Tight bounds on the smallest eigenvalue of the neural tangent kernel for deep relu networks. In International Conference on Machine Learning , pp. 8119-8129. PMLR, 2021.

Oymak, S. and Soltanolkotabi, M. Overparameterized nonlinear learning: Gradient descent takes the shortest path? In International Conference on Machine Learning , pp. 4951-4960. PMLR, 2019.

Oymak, S. and Soltanolkotabi, M. Toward moderate overparameterization: Global convergence guarantees for training shallow neural networks. IEEE Journal on Selected Areas in Information Theory , 1(1):84-105, 2020.

Papamarkou, T., Skoularidou, M., Palla, K., Aitchison, L., Arbel, J., Dunson, D., Filippone, M., Fortuin, V., Hennig, P., Hubin, A., et al. Position paper: Bayesian deep learning in the age of large-scale ai. arXiv preprint arXiv:2402.00809 , 2024.

Petzka, H., Adilova, L., Kamp, M., and Sminchisescu, C. A reparameterization-invariant flatness measure for deep neural networks. arXiv preprint arXiv:1912.00058 , 2019.

Ritter, H., Botev, A., and Barber, D. A scalable laplace approximation for neural networks. In 6th international conference on learning representations, ICLR 2018-conference track proceedings , volume 6. International Conference on Representation Learning, 2018.

Sharma, M., Farquhar, S., Nalisnick, E., and Rainforth, T. Do Bayesian Neural Networks Need To Be Fully Stochastic? In International Conference on Artificial Intelligence and Statistics (AISTATS, notable paper award) , 2023.

Warburg, F., Miani, M., Brack, S., and Hauberg, S. Bayesian metric learning for uncertainty quantification in image retrieval. In Neural Information Processing Systems (NeurIPS) , 2023.

Yu, H., Hartmann, M., Williams, B., Girolami, M., and Klami, A. Riemannian laplace approximation with the fisher metric, 2023.

A Recap

Notation. Consider a function f : R D × R I → R O with Jacobian J w ( x ) = ∂ w f w ( x ) | w = w ∈ R O × D with respect to w evaluated in x and w . For a given log-likelihood we define the Hessian w.r.t. to the output H w ( x ) = -∂ 2 f w ( x ) log p ( y | f w ( x )) ∈ R O × O and we assume it not to be dependent on y (which is true, for example, for exponential families).

Consider being given a dataset of finite size N , here we do not care about labels and we only refer to the collections of the datapoints X = { x 1 , . . . , x N } ⊂ R I .

Consider the stacking of the per-datum Jacobians J w = [ J w ( x 1 ); . . . ; J w ( x N )] ∈ R NO × D , where we dropped the dependence on X . Similarly consider H w = diag ( H w ( x 1 ); . . . ; H w ( x N )) ∈ R NO × NO the block diagonal stacking of the Hessians.

Consider the Generalized Gauss-Newton (GGN) and the Neural Tangent Kernel (NTK) matrices

Recall also that the pullback pseudo-metric is ( f ∗ H ) w = GGN w .

Assumptions. We assume uniform upper and lower bound on the eigenvalues of the NTK matrix, that is

where uniform means uniform over parameters, i.e. the bounds l, L holds for every w . Moreover we assume that the Jacobian function w ↦→ J w ( x ) is Lipschitz for every x ∈ X .

How unreasonable are the assumptions? The assumption of an upper bound L is equivalent to assuming that w ↦→ f ( w , x ) is Lipschitz for each datapoint x ∈ X . This is true with all standard activation functions if we restrict the parameter space to a ball of fixed radius.

The assumption of a lower bound l is strongly supported by the literature on NTK, thanks to its direct implications on memorization capacity and generalization. The general trend is that the more overparametrized the network is, the stronger such lower bounds are. In the hardest setting of minimum overparametrization, Bombari et al. (2022) proved a bound that holds with high probability for fully connected MLPs at initialization. Similar results hold with bigger overparametrizations Nguyen et al. (2021); Allen-Zhu et al. (2019); Du et al. (2019). Building on top of that, other lines of work Liu et al. (2020); Oymak & Soltanolkotabi (2019, 2020) proved that the NTK does not change too much during training thanks to the PL inequality framework, and in particular the proximity of the neural network dynamics to the one described by NTK, is supported by spectral bounds on the Hessian of the landscape.

Lastly, the Lipschitzness assumption on the Jacobian is potentially the most unrealistic, although it would hold, for example, if the derivatives of activations are Lipschitz and the parameters are restricted to a finite radius ball. Nonetheless, we emphasize that this assumption is only used to control that the kernel of the GGN does not 'rotate too fast', which is a much weaker assumption, but also much more cluttered to state formally.

B Proof for equivalence of the two settings

This section contains the proof of Proposition 4.4 and Theorem 4.5 involving the pseudo-Riemannian manifold ( R D , f ∗ H ) and the quotient group ( P , d P ) with Euclidean-induced metric.

To ease the readability, we recall the two involved notions of distance and their respective definition:

d f ∗ H ( w 0 , w 1 ) the geodesic distance for any two parameters w 0 , w 1 ∈ R D

d P ([ w 0 , w 1 ]) the quotient Euclidean distance for any two equivalence classes [ w 0 ] , [ w 1 ] ∈ P

where the infimum is taken over smoothly differentiable curves γ : [0 , 1] → R D such that γ (0) = w 0 and γ (1) = w 1 .

where the infimum is taken over all finite sequences { p i } i =1 ...n , { q i } i =1 ...n ⊂ R D such that [ w 0 ] = [ p 1 ] , [ p i +1 ] = [ q i ] and [ q n ] = [ w 1 ] .

Let us state a theorem that encapsulate together both the 0-distance part in Proposition 4.4 and the ϵ -δ part in Theorem 4.5 in a more unified way.

Theorem B.1. For any w 0 , w 1 ∈ R D it holds

and also that, for any ϵ > 0 there exists δ > 0 such that

We prove the 3 points separately, in Appendix B.1, Appendix B.2 and Appendix B.3 respectively.

B.1 Proof of Eq. 21

The proof logic is

and we prove the two steps in the two following Propositions, respectively.

Proposition B.2. For any w 0 , w 1 ∈ R D it holds

Proof. By definition [ w 0 ] = [ w 1 ] if and only if there exists a piecewise differentiable γ : [0 , 1] → R D such that γ (0) = w 0 , γ (1) = w 1 and f ( w 0 , x ) = f ( γ ( t ) , x ) for any t ∈ [0 , 1] and x ∈ X . Then ⇐ = Consider a γ from the definition of the equivalence relation ∼ and define the points w t = γ ( t ) for ease of notation. Then for any t ∈ [0 , 1]

For any x ∈ X it holds that f ( w t , x ) = f ( w t ′ , x ) ∀ t, t ′ ∈ [0 , 1] , which implies that f ( w t + ϵ , x ) -f ( w t , x ) = 0 ∀ t ∈ [0 , 1] ∀ ϵ ∈ [0 , 1 -t ] . Thus,

This holds to any x ∈ X , so the same holds for the per-datum stacked jacobians J w t · γ ′ ( t ) = 0 . Thus,

and we can measure the length of γ in the pullback metric as

which gives an upper bound on the geodesic distance

thus, d f ∗ H ( w 0 , w 1 ) = 0 and this implication is proven.

̸

= ⇒ d f ∗ H ( w 0 , w 1 ) = 0 implies that there exists a 0-length differentiable γ : [0 , 1] → R D such that γ (0) = w 0 , γ (1) = w 1 . Without loss of generality, we can assume γ to be non-stationary, i.e. γ ′ ( t ) = 0 . Here 0-length means

which implies that ∥ γ ′ ( t ) ∥ f ∗ H γ ( t ) = 0 for any t ∈ [0 , 1] except a zero-measure set which we can neglect later. Then

by positive definitess of H w t , assumed as hypothesis. We highlight that the leftmost 0 in the previous equation is a scalar, while the rightmost 0 is a vector in R NO as obtained by the matrix-vector product of J w t ∈ R NO × D with γ ′ ( t ) ∈ R D . Looking at the equation J w t · γ ′ ( t ) = 0 componentwise implies that

where [ v ] o refers to the o th component of a vector v . Thus, for T ∈ [0 , 1] , by Fundamental Theorem of Calculus we have

Then f ( w T , x ) = f ( w 0 , x ) ∀ x ∈ X and ∀ T ∈ [0 , 1] . So we proved that γ is an homotopy of ( w , w ′ ) such that γ ( t ) ∈ R f X ( w ) ∀ t ∈ [0 , 1] . Thus,

and this completes the proof.

Proposition B.3. For any w 0 , w 1 ∈ R D it holds

Proof. = ⇒ This arrow is trivially true by considering the two sequences in the definition of the quotient distance to be of length one and such that p 1 = w 0 and q 1 = w 1 .

⇐ = d P ([ w 0 , w 1 ]) = 0 implies that, by definition of inf , there exists a sequence ϵ m → 0 such that ∀ m ∈ N there exists two finite sequences of points p ( m ) 1 , . . . , p ( m ) n ∈ R D and q ( m ) 1 , . . . , q ( m ) n ∈ R D such that

where [ w 0 ] = [ p ( m ) 1 ] , [ p ( m ) i +1 ] = [ q ( m ) i ] and [ q ( m ) n ] = [ w 1 ] . Note that the sequence length n depend on m . Lipschitzness of f in parameters, assumed by hypothesis, means that may

thus,

Also, by definition of the equivalence class, it holds ∀ x ∈ X that

Thus, by the triangular inequality, the last four equations imply

and this holds for any m ∈ N . Taking the limit m →∞ , ϵ m → 0 implies ∥ f ( w 0 , x ) -f ( w 1 , x ) ∥ ≤ 0 . Thus, f ( w 0 , x ) = f ( w 1 , x ) ∀ x ∈ X , and, thus, [ w 0 ] = [ w 1 ] , which completes the proof.

B.2 Proof of Eq. 22

In order to prove Eq. 22, we first prove a weaker statement

Proposition B.4. For any w 0 , w 1 ∈ R D and for any δ > 0 it holds that

Proof. Let γ : [0 , 1] → R D be defined as γ ( t ) = (1 -t ) w 0 + t w 1 , then

and thus,

Definition B.5. Let γ 1 , . . . , γ n : [0 , 1] → R D a sequence of piecewise differentiable paths such that

Consider the piecewise differentiable path that is the concatenation of the paths one after the other, ˆ γ = CAT ( γ 1 , . . . , γ n ) defined as

It is straightforward to see that LEN (ˆ γ ) = ∑ n i =1 LEN ( γ i ) .

The choice of ϵ, δ that prove Eq. 22 trivially follows from the following

Proposition B.6. With the assumption of eigenvalue upper bound L , for any w 0 , w 1 ∈ R D for any δ > 0 it holds that

Proof. d P ([ w 0 , w 1 ]) < δ implies that, by the definition of inf , there exists two sequences { p i } i =1 ...n , { q i } i =1 ...n ⊂ R D such that [ w 0 ] = [ p 1 ] , [ p i +1 ] = [ q i ] , [ q n ] = [ w 1 ] and such that

Now the idea is to define n +1 paths on the equivalence classes and n paths connecting them, then the stacking of the 2 n +1 will give an upper bound on the geodesic distance.

Let us first define the paths γ 2 i for i = 0 , . . . , n by making use of Proposition B.2

[ w 0 ] = [ p 1 ] imply that there exists γ 0 : [0 , 1] → R D be such that γ 0 (0) = w 0 , γ 0 (1) = p 1 and such that LEN f ∗ H ( γ 0 ) < Lδ / n +1

[ q n ] = [ w 1 ] imply that there exists γ 2 n : [0 , 1] → R D be such that γ 2 n (0) = q n , γ 2 n (1) = w 1 and such that LEN f ∗ H ( γ 2 n ) < Lδ / n +1

for all i = 1 , . . . , n -1 , [ p i +1 ] = [ q i ] imply that there exists γ 2 i : [0 , 1] → R D be such that γ 2 i (0) = p i +1 , γ 2 i (1) = q i and such that LEN f ∗ H ( γ 2 i ) < Lδ / n +1

And then for all i = 1 , . . . , n , Proposition B.4 and ∑ n i =1 ∥ p i -q i ∥ < 2 δ imply γ 2 i -1 : [0 , 1] → R D be such that γ 2 i -1 (0) = p i , γ 2 i -1 (1) = q i and such that ∑ n i =1 LEN f ∗ H ( γ 2 i -1 ) < 2 Lδ .

Then concatenating these 2 n +1 paths, we have

B.3 Proof of Eq. 23

Proposition B.7. The pullback metric does not 'rotate' too much when moving from w to w + ϵ , formally

Proof. Follows from the K -Lischitz assumption on w ↦→ J w

The choice of ϵ, δ that prove Eq. 23 trivially follows from the following

Proposition B.8. With the assumption of eigenvalue upper bound L , for any w 0 , w 1 ∈ R D for any δ > 0 it holds that

Proof. d f ∗ H ( w 0 , w 1 ) < δ implies that there exist a path γ : [0 , 1] → R D with

Consider also the Euclidean length LEN E ( γ ) which does not depend on δ . Then, for any δ there exist n ( δ ) ∈ N such that, considering the uniform partition of [0 , 1] , t i = i / n ( δ ) for i = 0 , . . . , n ( δ ) it holds the discrete approximation of the integral

where p i is defined for every i ∈ { 0 , . . . , n ( δ ) -1 } as follow. Consider the projection P i K on the kernel of f ∗ H γ ( t i ) , and the projection P I i on the image of f ∗ H γ ( t i ) , such that the two projections are orthogonal and P i K + P I i = I . Define the point p i ∈ R D as p i = P i K ( γ ( t i +1 ) -γ ( t i )) + γ ( t i ) , which implies that ∥ p i -γ ( t i ) ∥ f ∗ H γ ( t i ) = 0 . By definition of the projections, it also hold that p i = γ ( t i +1 ) -P I i ( γ ( t i +1 ) -γ ( t i )) , which implies that γ ( t i +1 ) -p i = P I i ( γ ( t i +1 ) -γ ( t i )) is

aligned with the non-zero eigenvalues of f ∗ H γ ( t i ) , this means that we can resort to the lower bound l on the non-zero eigenvalues and Proposition B.7 to see that

K

where, recalling that ∥ γ ( t i +1 ) -γ ( t i ) ∥ = 1 / n ( δ ) by construction, there always exist an n ( δ ) big enough such that ˜ K ≥ 1 / 2 , which we can assume without loss of generality. Rearranging the terms, we have

Finally, we can define the points q i = γ ( t i +1 ) and we have the two sequences p 0 , . . . , p n ( δ ) -1 and q 0 , . . . , q n ( δ ) -1 whose satisfies the costrains [ w 0 ] = [ p 0 ] , [ p i +1 ] = [ q i ] and [ q n ( δ ) -1 ] = [ w 1 ] . We highlight that the dependence on δ of the length of the sequence is not problematic, as it is sufficient that n ( δ ) is finite for every fixed δ , which it is. Thus,

which concludes the proof.

C Proof of existence of the two Riemannian manifolds

This section contains the proof for the existence of the two Riemannian manifolds ( P ¯ w , m ) and ( P ⊥ ¯ w , m ⊥ ) embedded in R D . In the rest of the section, we consider a fixed ¯ w ∈ R D .

Fix a training set X = { x 1 , . . . , x N } ⊂ R I of size N and consider the stacked partial evaluation of the network defined as

And define ¯ y = F ( ¯ w ) ∈ R NO . The differential ∇ w F ∣ ∣ ¯ w = J ¯ w ∈ R NO × D equals the stacking of the per-datum Jacobians, and we assume it to be full rank thanks to the uniform lower bound on the eigenvalues of the NTK matrix. Full-rankness in the overparametrized setting D > NO implies the surjectivity of the differential operator.

We reorder the w i so that the first NO columns are independent. Then the NO × NO matrix

is non-singular. We consider the map

We obtain

and this is non-singular. By the inverse function theorem, α is a local diffeomorphism. So there is an open W ⊆ R D containing ¯ w such that α | W : W → α ( W ) is smooth with smooth inverse.

Finally, define

and similarly

We claim that the two restrictions of α are slice charts of P ⊥ ¯ w and P ¯ w , respectively. Since it is a smooth diffeomorphism, it is certainly a chart. Moreover, by construction, the points in P ⊥ ¯ w are exaclty those whose image under F is ¯ y , thus, P ⊥ ¯ w ⊆ [ ¯ w ] . On the other hand, the points w ∈ P ¯ w parametrize functions that take the values F ( w ) = p in a local neighbourhood of ¯ y . Thus, locally it never intersects the same equivalence class more than one time.

D Proof of Theorem 5.1

By definition of the kernel manifold, we have that if w ∈ P ⊥ w ′ then we have that w ∈ [ w ′ ] . Hence for all w ∈ P ⊥ w ′ and for all x ∈ X

For the second statement notice that Var w ∼P ⊥ w ′ [ f ( w , x test ] = 0 if and only if f ( w , x test ) = c for all w ∼ P ⊥ w ′ and for some constant c .

̸

Suppose ˆ w ∈ ¯ R f X and ˆ w ̸∈ ¯ R f X∪{ x test } , then f ( ˆ w , x test ) = f ( w ′ , x test ) , which means that f ( w , x test ) is not constant. Hence we have that Var w ∼P ⊥ w ′ [ f ( w , x test ] > 0

E Further results and experimental setup

E.1 Implementation details of the Laplace approximation

Sampling from Laplace's approximation requires computing the inverse square root of a matrix of size D × D , where D is the number of parameters. For most models this problem is intractable. The standard approach to this problem is to consider sparse approximations to the Hessian of the loss function such as KFAC, Last-Layer, and Diagonal approximations. However, these approximations introduce additional complexity making the task of validating our theoretical analysis much harder. In light of these considerations, we choose to sample from Laplace's approximation in a way that is closest to the theoretical ideal, at the cost of performing expensive computations.

In small experiments with the toy regression problem, we instantiate the exact GGN and compute vector products with its inverse-square root. For experiments with LeNet and ResNet, we rely on the empirical observation that the spectrum of the GGN is dominated by its leading eigenvalues (Figure 6)

This makes low-rank approximations of the GGN particularly attractive. We choose the Lanczos algorithm (Lanczos, 1950) with full reorthogonalization and run it for a very high number of iterations, to ensure numerical stability and very low reconstruction error to form our low-rank approximations of the GGN. Additionally, Lanczos only requires implicit access to the matrix so we avoid the memory cost and GGN vector products for neural networks can

0

50

100

150

200

250

300

350

Index

0

1000

2000

3000

4000

Eigenvalues

be performed efficiently using Jacobian-Vector products and Vector-Jacobian products. If we do

Algorithm 1 Laplace diffusion

1: Input: Observed data D , trained MAP point w ′ , number of steps T , number of samples S , rank k . 2: Initialize samples w 0 1 . . . w 0 S as the MAP estimate w ′ 3: for j in 1 , . . . S do 4: for t in 1 , . . . T do 5: Sample ϵ ∼ N (0 , I k ) 6: Compute the topk eigenvalues( Λ t j ) and eigenvectors( U t j ) of GGN w t j 7: w t j ← w t j + 1 √ N U t j (Λ t j + α I ) -1 2 ϵ 8: end for 9: end for 10: Return posterior samples w T 1 . . . w T S .

a sufficiently large number of iterations we obtain the non-zero eigenvalues ˜ Λ , and corresponding eigenvectors U 1 . For obtaining samples from the diffusion we can use Algorithm 1 with the eigenvalues and eigenvectors computed using the Lanczos algorithm.

Given the non-zero eigenvalues ˜ Λ , and corresponding eigenvectors U 1 we can also form inverse vector products with the square root of GGN + αI . It should be evident from the discussion in section 3 about decomposing the covariance that this vector product with a vector v is given by:

This allows us to form inverse-square root vector products with the GGN + αI given the non-zero eigenspectrum. We run the sampling algorithm on H100 GPUs to run the high-order Lanczos decomposition. This approach of sampling from Laplace's approximation has O ( pk 2 ) time complexity, and O ( pk ) memory cost, where k is the number of Lanczos iterations and p is the number of parameters.

E.2 Experimental details and further results for toy experiments

E.2.1 Toy regression in Figure 2

In this experiment, we fit a small MLP, with 2 hidden layers of width 10 on the sine curve. Due to the small size of the GGN it is possible to instantiate and do all the computations explicitly. We sample from the exact Laplace's approximation, the non-kernel and kernel subspace of the GGN, and use the neural network and the linearized predictive functions for the top row and the bottom row respectively. For the middle, we simulate a diffusion on the kernel manifold for the center plot, a diffusion in the non-kernel manifold for the right plot and we do alternating steps in the two manifolds for the left plot which gives us the full distribution.

We also do a similar experiment to show that the same phenomenon also holds for classification. We use a small convolutional neural network, with 2 convolutional layers with kernel of size 3, to classify a 2-class mixture of Gaussians and look at uncertainties of sampled Laplace, linearized Laplace, and Laplace's diffusion. We decompose these uncertainties into their kernel and non-kernel components respectively. We see the same effect for classification as we did in regression in Figure 7

The main takeaway of these experiments is that sampled Laplace underfits in-distribution and this effect is related to the kernel component of the distribution.

E.2.2 Effect of kernel rank on in-distribution fit in figure 4

For this experiment, we train a small convolutional neural network, with two convolutional layers and a kernel of size 3, on MNIST. In this case, the GGN can be instantiated explicitly. We recall that the

5

0

5

Sampled Full Distribution

Sampled Kernel Distribution

Sampled Non-Kernel Distribution

5

0

5

Linearized Laplace uncertainty

5

0

5

Laplace Diffusion uncertainty

Diffusion Non-Kernel uncertainty

0.42

0.48

0.54

0.60

0.66

0.72

0.78

0.84

0.90

0.00

0.15

0.30

0.45

0.60

0.75

0.90

1.05

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

6

4

2

0

2

4

6

6

4

2

0

2

4

6

6

4

2

0

2

4

6

GGN is a sum of J w ′ ( x n ) ⊤ H ( x n ) J w ′ ( x n ) over the dataset where x n are the individual data points. We recall that the rank of the GGN is bounded by NO where N is the number of data points and O is the output dimensions. This suggests considering partial sums by subsampling the data points gives us a GGN with a lower rank. Equivalently, this is GGN with a higher dimensional kernel, and hence the usual covariance from Laplace's approximation ( GGN + αI ) -1 has a higher contribution from the kernel subspace.

We consider multiple such subsamples and plot the training accuracy for samples from Laplace's approximation against the kernel subspace dimension. Here we see a clear trend that the underfitting in sampled Laplace decreases as the rank of GGN increases, or the contribution from the kernel component decreases. This serves to further support our suggested hypothesis that the underfitting in sampled Laplace is caused by its kernel component and is hence deeply related to reparameterizations.

E.3 Additional benchmarks and results for image classification

Training details: We use a standard LeNet for the MNIST and FashionMNIST experiments and a smaller version of ResNet (Lippe, 2022), with 272,378 parameters consisting of 3 times a group of 3 ResNet blocks. We use those instead of the standard ResNets due to constraints on the computational budget for the CIFAR-10 experiments. We train LeNet with Adam optimizer and a learning rate of 10 -3 . For the ReNet we use SGD with a learning rate of 0 . 1 with momentum and weight decay.

Hyperparameters: We benchmark Laplace diffusion against SWAG, diagonal Laplace, last-layer Laplace, and MAP in addition to linearised Laplace and sampled Laplace.

For choosing the prior precision for diagonal Laplace and last-Layer Laplace for each benchmark we do a grid search over the set { 0 . 1 , 1 . 0 , 5 . 0 , 10 . 0 , 50 . 0 , 100 . 0 } . For Laplace diffusion, sampled Laplace, and Linearised to ensure that the comparison can validate the theory it is preferable to have the same prior precision for all of these methods. So we only do the grid search to tune the prior precision for sampled Laplace and use this for all three methods. We keep the hyperparameters for these three methods as similar as possible to have the most informative comparisons.

For Laplace diffusion on MNIST and FMNIST, we simulate the diffusion with a step size of 0 . 05 , with 2000 Lanczos iterations and we predict using 20 MCsamples. For sampled Laplace and Linearised Laplace, we also use 2000 Lanczos iterations and we predict using 20 MCsamples. For the CIFAR-10 experiments, we simulate the diffusion with a step size of 0 . 2 , with 5000 Lanczos iterations and we predict using 20 MCsamples. For sampled Laplace andlLinearised Laplace use the same number of Lanczos iterations and MC samples.

For SWAG we use a learning rate of 10 -2 with momentum of 0 . 9 and weight decay of 3 e -4 and the low-rank covariance structure in all experiments. For the MNIST and FMNIST experiments we collect 20 models and for the CIFAR-10 experiments we collect 3 models to sample from the posterior.

Last-layer Laplace is the recommended method by Daxberger et al. (2021c) so it should approximate the best performance one can get using various possible configurations. For the CIFAR-10 experi-

ments, the last layer of ResNet is too large to instantiate the full GGN matrix. So we instead use the last 1000 parameters of the model to construct the covariance matrix of the posterior.

Diagonal Laplace requires high prior precision to ensure it does not severely underfit in-distribution (similar to sampled Laplace). It often becomes almost deterministic. So we exclude it from the CIFAR results. This has also been observed by Deng et al. (2022) and Ritter et al. (2018).

All additional information about the experimental setup can be found in the submitted code.

E.3.1 In-distribution fit and calibration

We extend Table 1 to benchmark Laplace's diffusion against various other Bayesian methods. Here we see that despite using the neural network predictive it is competitive with the best-performing Bayesian methods whereas Sampled Laplace performs significantly worse.

FMNIST

CIFAR-10

E.3.2 Robustness to dataset shift

In these experiments (Fig. 8), to measure in-distribution fit and calibration, we report accuracy, negative log-likelihood (NLL), and expected calibration error (ECE)-all evaluated on the standard test sets. We measure the robustness of dataset shift of various baselines by plotting the negative log-likelihood and the expected calibration error against shift intensity. The desired behavior is good in-distribution fit, as close as possible to MAP, and stable calibration errors and NLL under distribution shifts. We see that the Laplace's diffusion is competitive against other Bayesian methods.

E.3.3 Out-of-distribution detection

We extend 2 to benchmark Laplace's diffusion against various other Bayesian methods for Out-ofDistribution Detection. Once again, we observe that, despite using the neural network predictive,

NLL

ECE

Acc.

0.0

0.5

1.0

1.5

2.0

2.5

3.0

3.5

In-distribution metrics

Laplace's Diffusion

Sampled Laplace

SWAG

Last-Layer Laplace

MAP

0

25

50

75

100

125

150

175

Shift intensity

0

2

4

6

8

10

12

Negative log-likelihood

Laplace's Diffusion posteriors

Sampled Laplace posteriors

Linearised Laplace posteriors

SWAG

Last-Layer Laplace posteriors

MAP

0

25

50

75

100

125

150

175

Shift intensity

0.2

0.3

0.4

0.5

0.6

0.7

Expected Calibration Error

Laplace's Diffusion posteriors

Sampled Laplace posteriors

Linearised Diffusion posteriors

SWAG

Last-Layer Laplace posteriors

MAP

NLL

ECE

Acc.

0

1

2

3

4

In-distribution metrics

Laplace's Diffusion

Sampled Laplace

SWAG

Last-Layer Laplace

MAP

0

25

50

75

100

125

150

175

Shift intensity

0

2

4

6

8

Negative log-likelihood

Laplace's Diffusion posteriors

Sampled Laplace posteriors

Linearised Laplace posteriors

SWAG

Last-Layer Laplace posteriors

MAP

0

25

50

75

100

125

150

175

Shift intensity

0.1

0.2

0.3

0.4

0.5

0.6

0.7

Expected Calibration Error

Laplace's Diffusion posteriors

Sampled Laplace posteriors

Linearised Diffusion posteriors

SWAG

Last-Layer Laplace posteriors

MAP

NLL

ECE

Acc.

0.0

0.2

0.4

0.6

0.8

1.0

In-distribution metrics

Laplace's Diffusion

Sampled Laplace

SWAG

Last-Layer Laplace

MAP

0

25

50

75

100

125

150

175

Shift intensity

0

1

2

3

4

5

6

7

Negative log-likelihood

Laplace's Diffusion posteriors

Sampled Laplace posteriors

Linearised Laplace posteriors

SWAG

Last-Layer Laplace posteriors

MAP

0

25

50

75

100

125

150

175

Shift intensity

0.2

0.3

0.4

0.5

0.6

Expected Calibration Error

Laplace's Diffusion posteriors

Sampled Laplace posteriors

Linearised Diffusion posteriors

SWAG

Last-Layer Laplace posteriors

MAP

it is competitive with the best-performing Bayesian methods in terms of having a higher AUROC, whereas Sampled Laplace performs significantly worse.

MNIST

FMNIST

CIFAR-10

E.4 Short discussion on benchmarks

Sparse Approximations of GGN. Our theoretical analysis is mainly concerned with the ideal versions of Laplace's approximations, where we consider the full GGN in the covariance without any approximations. However, it can also shed some light on other Bayesian methods.

It is common to use sparse approximations of the GGN when doing Laplace's approximations. Interestingly we observe that Laplace's approximations with sparse GGN such as diagonal Laplace, Last Layer, etc do not benefit from linearization to the same degree (Fig. 9).

1.0

0.5

0.0

0.5

1.0

1.5

2.0

3

2

1

0

1

2

3

Sampled Laplace Uncertainty

Laplace Mean predictions

Predictions

Targets

1.0

0.5

0.0

0.5

1.0

1.5

2.0

2

1

0

1

2

Linearised Laplace Uncertainty

Laplace Mean Linearised predictions

Predictions

Targets

1.0

0.5

0.0

0.5

1.0

1.5

2.0

1.0

0.5

0.0

0.5

1.0

1.5

Diagonal Laplace Uncertainty

Diagonal Laplace Mean predictions

Predictions

Targets

1.0

0.5

0.0

0.5

1.0

1.5

2.0

1.5

1.0

0.5

0.0

0.5

1.0

1.5

Linearised Diagonal Laplace Uncertainty

Diagonal Laplace Mean Linearised predictions

Predictions

Targets

This is perfectly consistent with our analysis as we show that the benefit of linearization primarily comes from the Jacobian term in the linearized predictive and the GGN sharing a kernel. Diagonal and other sparse approximations do not share the spectral properties with the Jacobian in the linearized predictive. George et al. (2018) note the potential advantages of having the spectrum of the approximate curvature more aligned with the true curvature. This suggests future directions to improve various approximations to the GGN by accounting for reparameterizations.

SWAG. Another baseline that can be explained using our method is the SWAG. It has been shown that in (Li et al., 2021) SGD steps close to the optimum can be decomposed into a normal space component and a tangent space component. In our terminology, this can be thought of as a diffusion step in the Kernel manifold and a diffusion step in the Non-kernel manifold. Hence it can be shown that SWAG roughly approximates a diffusion-based posterior. Hence our analysis can provide some theoretical grounding for heuristic methods like SWAG.

NeurIPS Paper Checklist

1. Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Answer: [Yes]

Justification: The theoretical findings are states in abstract and introduction as clear as possible withouth first introducing all the notation of the paper. The experimental results match the claim and confirm the theoretical findings.

Guidelines:

The answer NA means that the abstract and introduction do not include the claims made in the paper.

The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.

The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.

It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.

2. Limitations

Question: Does the paper discuss the limitations of the work performed by the authors?

Answer: [Yes]

Justification: The conclusion raises several points of concern.

Guidelines:

The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.

The authors are encouraged to create a separate "Limitations" section in their paper.

The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.

The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.

The authors should reflect on the factors that influence the performance of the approach. For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.

The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.

If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.

While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.

3. Theory Assumptions and Proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Answer: [Yes]

Justification: all theoretical statements are given a detailed derivation in the appendix.

Guidelines:

The answer NA means that the paper does not include theoretical results.

All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced.

All assumptions should be clearly stated or referenced in the statement of any theorems.

The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.

Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.

Theorems and Lemmas that the proof relies upon should be properly referenced.

4. Experimental Result Reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: We provide a detailed appendix describing the experimental setup. We will further release all code to reproduce the paper.

Guidelines:

The answer NA means that the paper does not include experiments.

If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.

If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.

Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.

While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example

(a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm.

(b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully.

(c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).

(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.

5. Open access to data and code

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?

Answer: [Yes]

Justification: We rely on established benchmark data. All code will be released under an open source software licence upon paper acceptance.

Guidelines:

The answer NA means that paper does not include experiments requiring code.

Please see the NeurIPS code and data submission guidelines ( https://nips.cc/ public/guides/CodeSubmissionPolicy ) for more details.

While we encourage the release of code and data, we understand that this might not be possible, so 'No' is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).

The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines ( https: //nips.cc/public/guides/CodeSubmissionPolicy ) for more details.

The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.

The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.

At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).

Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.

6. Experimental Setting/Details

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Answer: [Yes]

Justification: We specify the details about the experimental setup in the appendix. Furthermore, we also provide the code as supplemental material which contains the full details of the experiments.

Guidelines:

The answer NA means that the paper does not include experiments.

The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.

The full details can be provided either with the code, in appendix, or as supplemental material.

7. Experiment Statistical Significance

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

Answer: [Yes]

Justification: We provide errors and/or standard deviations for presented results.

Guidelines:

The answer NA means that the paper does not include experiments.

The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.

The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).

The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)

The assumptions made should be given (e.g., Normally distributed errors).

It should be clear whether the error bar is the standard deviation or the standard error of the mean.

It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified.

For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates).

If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.

8. Experiments Compute Resources

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Answer: [Yes]

Justification: these details are presented in the appendix.

Guidelines:

The answer NA means that the paper does not include experiments.

The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.

The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.

The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper).

9. Code Of Ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Answer: [Yes]

Justification: The work is predominantly theoretical and does not raise ethical concerns.

Guidelines:

The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.

If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics.

The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).

10. Broader Impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Answer: [No]

Justification: The paper is predominantly theoretical. However, uncertainty quantification is a potential remedy for several issues with currently deployed machine learning models, so there is a potential for positive societal impact.

Guidelines:

The answer NA means that there is no societal impact of the work performed.

If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact.

Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.

The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.

The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.

If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).

11. Safeguards

Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?

Answer: [NA]

Justification: we do not deem this to be relevant.

Guidelines:

The answer NA means that the paper poses no such risks.

Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.

Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.

We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.

12. Licenses for existing assets

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Answer: [Yes]

Justification: we only consider well-established benchmark data, which we cite appropriately.

Guidelines:

The answer NA means that the paper does not use existing assets.

The authors should cite the original paper that produced the code package or dataset.

The authors should state which version of the asset is used and, if possible, include a URL.

The name of the license (e.g., CC-BY 4.0) should be included for each asset.

For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.

If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset.

For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.

If this information is not available online, the authors are encouraged to reach out to the asset's creators.

13. New Assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [Yes]

Justification: we will release open source code for reproducing experiments upon paper acceptance. This is well documented.

Guidelines:

The answer NA means that the paper does not release new assets.

Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.

The paper should discuss whether and how consent was obtained from people whose asset is used.

At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.

14. Crowdsourcing and Research with Human Subjects

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Answer: [NA]

Justification: this paper does not involve crowdsourcing or other forms of research involving human subjects.

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper.

According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.

15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

Answer: [NA]

Justification: this paper does not involve crowdsourcing or other forms of research involving human subjects.

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.

We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.

For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper studies the effects of the invariance of Bayesian neural networks under reparametrization on their approximate posterior inference. The primary effect is the ambiguity on the uncertainty of the inferred function as it can be represented by multiple reparameterizations, each of which may be assigned a different uncertainty estimate. The paper takes Laplace approximation as a case and studies its properties when used for Bayesian neural net inference using linear algebraic and differential geometric tools. The paper derives an algorithm from its key theoretical outcomes and shows it to outperform its counterparts in various downstream uncertainty quantification tasks.\n\nSTRENGTHS:\n* This is a very high-calibre paper, a complete piece of work, that studies an original and significant problem with impressive theoretical rigor. \n\n* The presentation is extremely clear. Figures 1 and 2 are truly helpful to the reader to grasp the visual intuition behind the studied problem and the proposed solution.\n\n* The compilation of theoretical tools such as the a parameter manifold on the Generalized Gauss-Newton (GGN) approximation and a diffusion defined on it are original, advanced, and elegant.\n\n* The reported numerical results are both comprehensive and strongly in favor of the central claims.\n\nWEAKNESSES:\n* Overall this is excellent piece of work with a mature write-up. Just its presentation may be improved tiny bit. For instance, certain terms are used very early on in the paper such as the introduction and Figure 1 in their meanings a bit unusual for the broad ML research readership, such as a \"kernel\" and \"diffusion\". While their allocation in the particular context is appropriate, reading experience may be improved if their meanings are made more explicit, at least verbally, in their first use.\n\nQUESTIONS:\n* How does the argumentation in the first paragraph of Section 3 come together with the main message of the paper? Is the problem not instead that the posterior assigns separate masses to different weights that represent the same functional form? How exactly does this produce a pathology in the posterior besides the need to detect multiple equivalent representations and add their masses? Why do we actually need to design the related degrees of freedom? Overall I buy the argument and see the problem, but my point is that probably this bridge paragraph may be misleading the reader.\n\n * What does f_lin^w precisely mean in Eq 4? Is it the first-order Taylor approximation of f?\n\nLIMITATIONS:\nThe paper briefly discusses its limitations in the final paragraph of the Conclusion section. The potential negative societal impacts of the studied work are not discussed probably because they are thought to be inapplicable.", "TITLE": "Official Review", "RECOMMENDATION": 8, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2024-07-03"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper addresses the problem of maintaining invariance under reparameterization of Bayesian Neural Networks (BNNs). This issue undermines the reliability of BNNs since different parameterizations of identical functions produce different posterior densities. Through theoretical analysis and empirical validation, the authors demonstrate the effectiveness of their approach by extending a geometric view (in Linearized Laplace) and using a Riemannian diffusion process to achieve reparameterization invariance.\n\nSTRENGTHS:\n* Proposed Riemannian diffusion process incorporates the properties of the linearized Laplace approximation into the original neural network prediction, resulting in a better posterior fit.\n* The method leverages advanced mathematical tools from differential geometry, offering a sophisticated approach to maintaining reparameterization invariance.\n* In both in-distribution and out-of-distribution scenarios, the proposed method consistently outperforms other approaches.\n* The paper is well-organized and well-written, with each section building logically on its predecessor.\n\nWEAKNESSES:\n* Although the proposed method is theoretically sound, its computational complexity is higher than simpler approximations. This could limit its practicality for very large-scale neural networks.\n* Similar to previous works in Linearized Laplace, the need for new computational pipelines to handle the GGN matrix and its induced structure is acknowledged but not fully addressed in the paper.\n* Although the experiments are comprehensive, they demonstrate results on standard datasets and relatively small to medium-sized neural networks.Testing the method on more diverse datasets and larger-scale models would strengthen the empirical validation.\n\nQUESTIONS:\n* Although mentioned in related work, I feel that this paper needs comparative experiments with methods such as Riemannian Laplace and (Bergman et al., 2024) and Connectivity Laplace (Kim et al., 2023).\n* As mentioned in Weakness section, I would recommend the author to evaluate the Riemannian Diffusion in other domain dataset & architectures (e.g., Transformers).\n\nLIMITATIONS:\nLimitations are mentioned in \"Weakness\" and \"Questions\".", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-11"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe authors provide theoretical analysis of the underfitting problem of Laplace approximation. Specifically, they show that the underfitting of Laplace approximation is due to the approximate posterior covariance is not invariant under reparameterization. Moreover, they propose a reparametrization invariant diffusion posterior to address undefitting. The method are evaluated over standard image classification benchmarks. The quality of the uncertainty for both in-distribution and out-of-distribution tasks are considered.\n\nSTRENGTHS:\n1. The paper provides, to my knowledge, the first theoretical justification of why Laplace approximation sufferes from underfitting: the approximate posterior covariance is not reparameterization invariance.\n2. Given the theoretical analysis, the idea of reparametrization invariant posterior is natural and proves to be effective empirically.\n3. The paper is easy to follow and well organized.\n\nWEAKNESSES:\n1. The proposed method, as mentioned by the authors as well, sufferes from more expensive computation. It would be good to report the time metric for readers to properly assess the practicability of the method.\n2. The datasets considered are a bit outdated and the networks considred seem to be quite small, such that overall the performance is on the lower end (e.g. <90% acc. for CIFAR10). Recent BDL papers typically consider larger datasets (such as ImageNet) and deeper networks (e.g. [1]). Furthermore, last-layer Laplace seems to be competitive with or even outperform the proposed method in some experiments.\n3. The method is tailored to improving Laplace approximation, and there is no discussion related to any other approximate inference techiques (e.g. variational inference).\n\nReferences\n[1] Antoran et al. Sampling-based inference for large linear models with application to linearised Laplace. ICLR 2023.\n\nQUESTIONS:\nSee weakness.\n\nLIMITATIONS:\nThe authors do not address potential negative social impact since the paper is predominantly theoretical.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-14"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis work questions why the linearized Laplace approximation can be effective for uncertainty estimation, whereas the vanilla Laplace approximation can lead to poor performance, such as underfitting. This work argues that this degradation is attributed to the fact that the random function derived from each parameterization of a DNN may not form an invariant function space. \n\nSpecifically, since the null space $ \\text{ker} (\\text{GGN}_{w}) $ is not empty for over-parameterized NNs, sampling the random function containing elements of null space could result in an inconsistent random function. This can lead to under-fitting issues as observed in Laplace approximation. \n\nTherefore, the authors believe that sampling the random function on $ \\text{im} (\\text{GGN}_{w}) $, i.e., the linearized Laplace, could be more effective than the Laplace method. \n\nFurthermore, for a given weight $w$, they explore how to sample the same function with  $ f(w) $, i.e., $ f(g(w)) = f(w) $, by sampling the weight on a specific manifold $ g(w) $. To this end, they employ the concept of quotient space to elaborately define the manifold and diffusion to sample $ w $ from the manifold $ g(w) $.\n\nSTRENGTHS:\n* This work reasonably reveals why the linearized Laplace approximation can be more effective than the standard Laplace approximation. This explanation appears to be novel.\n\n* This work attempts to justify the above reasoning using a mathematical elaboration framework.\n\nWEAKNESSES:\n* The lack of explanation of background knowledge, such as quotient space and Riemannian manifold, makes the paper difficult to understand.\n\n* Although it appears effective compared to Laplace and Linearized Laplace, the performance improvement seems marginal when compared to other baselines such as SWAG and Last-layer Laplace.\n\nQUESTIONS:\n* To confirm my understanding, does the Laplace diffusion denote that for a given $w$, the sample functions $ { w_t }$ are obtained by the update rule using $\\text{GGN}^{+}$ as described in the SDE on the manifold?\n\n* Does $\\text{GGN}^{+}$ mean the positive definite matrix of $\\text{GGN}$, which is obtained by applying SVD on $\\text{GGN}$ and then using the eigenvectors with positive eigenvalues?\n\n* Is the Laplace diffusion the post-hoc method, meaning that $w$ is first obtained by MAP inference, i.e., $w_{\\text{MAP}} = R^{f}_{\\mathcal{X}}(w)$, and then $w_t$ is obtained by Laplace diffusion with $\\text{GGN}^{+}$?\n\n* Compared to the performance of SWAG described in attached appendix, the performance of the Laplace diffusion does not seem significantly improved. \nIn this context, for a given $w$, is it important to sample the weight parameter according to the invariant Riemannian manifold? \n\n* Rather, as considering that SWAG focuses on finding good neighborhood of $w$ in training procedure and obtains comparable performance, isn't it more important to focus on how to find good $w$ (for example, $ w_{\\text{swa}} $ ) and explore the subspace of $w$? I am just curious about your opinion on this.\n\nLIMITATIONS:\nSee above weaknesses and limitations.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-14"}