Reparameterization invariance in approximate Bayesian inference

Authors: hrittik  roy
marco  miani
carl henrik ek
philipp  hennig
marvin  pförtner
lukas  tatzel
søren  hauberg
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-15 16:58:38

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.

Main paper: 
 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 improve improve improve improve improve improve improve improve the posterior fit?Figure 1 : The weight space of a neural network (Eq. 1) overparametrizes the associated function space. This induces families (orange) of weights corresponding to the same functions. Model linearization (left) linearizes these families. In nonlinear models, Gaussian weight distributions (center) do not adapt to the families, while our geometric diffusion (right) captures the associated invariance with a metric (gray ellipses).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 )EQUATIONThis can be reparametrized to form the same function realization from different weights as f (x) = w1 /α ReLU (α w 2 x) for any α > 0. That is, the weight-pairs (w 1 , w 2 ) and ( w1 /α, α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.Figure 2 : The function space is decomposed into directions of reparameterizations (kernel) and functional change (non-kernel). We improve the posterior fit by concentrating probability mass on directions of functional change.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 Euler-Maruyama 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 ŵ. This results in a Gaussian approximate posterior N (w| ŵ, -H -1 ŵ ), 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 ŵ, i.e. f w (x) ≈ f ŵ lin (w, x)) = f ŵ(x) + J ŵ(x)(w -ŵ), where J ŵ(x) = ∂ w f w (x)| 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) ,EQUATIONwhere H(x) = -∂ 2 f ŵ (x) log p(y|f ŵ(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 ŵ = [J ŵ(x 1 ); . . . ; J ŵ(x N )] ∈ R N O×D and similarly for the Hessians, and write the GGN matrix as GGN ŵ = J ⊤ ŵHJ ŵ. 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 ŵ and covariance Σ. A predictive distribution is obtained by integrating the approximate posterior against the model likelihood,p(y * |x * , D) = E w∼q [p(y * |f (w, x * ))] ≈ 1 S S i=1p(y * |f (w i , x * )), w i ∼ q.(3)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) ,p(y * |x * , D) = E w∼q [p(y * |f ŵ lin (w, x * ))] ≈ 1 S S i=1p(y * |f ŵ lin (w i , x * )), w i ∼ q.(4) 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.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. 
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. 
reparameterizations of linear functions: 
 Deep learning models excel when they are highly overparametrized, i.e. when they have significantly more parameters than observations (D ≫ N O). 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) ,EQUATIONBy 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 ). For linear models (left) these are linear subspaces given by the kernel and the image, respectively. For nonlinear models, these are the nonlinear manifolds P ⊥ wi and P wi , respectively.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.EQUATIONwhere 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.A Laplace covariance decomposes into the same subspaces. Recall that the posterior precision isΣ -1 = GGN ŵ + αI.Let the eigendecomposition of GGN ŵ 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,Σ = U 1 U 2 T Λ 0 0 0 U 1 U 2 + αI -1 = U T 1 ( Λ + αI k ) -1 U 1 + α -1 U T 2 U 2 . (7)Consequently, we can decompose any sample from the Gaussian N ( ŵ, Σ) into a kernel and an image contribution, w = ŵ + w ker + w im , where w ker is the component of the sample that is in the kernel of GGN ŵ and w im is in the image. Note that all probability mass in ker(GGN ŵ) 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.Figure 4 : Underfitting of sampled Laplace is less pronounced when the rank of the GGN is higher for a fixed number of parameters. This is consistent with our hypothesis as a high GGN rank implies a lower dimensional kernel. For experimental details, see appendix E.2.Underfitting in sampled Laplace can now be understood. For the linearized approximation, it holds for training data x ∈ X that, f ŵ lin ( ŵ+w ker +w im , x) = f ŵ lin ( ŵ+w im , x). 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.Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?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. • Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted. 
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.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-reparameterizationsas 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, ŵ) if γ(0) = w and γ(1) = w ′ . The set of X -smooth-reparameterizations is defined as, Rf X (w) = w ′ such that ∃γ a homotopy of (w, w ′ ) γ(t) ∈ R f X (w) ∀t ∈ [0, 1].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 ′ ∈ Rf 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 .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.EQUATION)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,EQUATIONwhere 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) w1 ̸ = (f * H) w2 . This is reflected in the Laplace approximation. The covariance prescribed by the Laplace approximation is Σ ŵ = (∇ 2 w L( ŵ) + αI) -1 , where L(w) is shorthand for the training log-likelihood. The Hessian is exactly the pullback pseudo-metric ∇ 2 w L( ŵ) = (f * H) ŵ, 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,EQUATIONThis means that, while each parameter w has its well-defined covariance Σ w , each equivalence class does not have a unique one, since ŵ and g( ŵ) belong to the same equivalence class and Σ ŵ ̸ = Σ g( ŵ) .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)dw ′ . 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.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 0 , w 1 ∈ R D it holdsEQUATIONEven 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 asd P ([w], [w ′ ]) = inf {∥p 1 -q 1 ∥ + . . . + ∥p n -q n ∥}, 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 thatEQUATION)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 byP ⊥ 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. 
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) ,EQUATION)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 rulew t+1 = w t + √ 2h 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 ( ŵ, Σ) with Σ -1 = GGN ŵ + α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 ŵ + αI. The SDE dw = G -1 2 dW 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 ⊥ ŵ [f (w, x)] = 0 for train data x ∈ X . For a test point x t ̸ ∈ X , if there exists a reparameterization w ′ ∈ Rf X ( ŵ) such that w ′ ̸ ∈ Rf X ∪{xt} ( ŵ), then Var w∼P ⊥ ŵ [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. Rf X (w) = {w}. We call this Laplace diffusion and study it empirically in Sec. 7. 
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 pseudo-Riemannian view can be seen as having a continuously changing basis. 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. 
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, ROTATED-FMNIST, 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.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. 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). 
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. 
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. 
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. 
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. 
 
 Appendix: 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 fw(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 N O×D , where we dropped the dependence on X . Similarly consider H w = diag(H w (x 1 ); . . . ; H w (x N )) ∈ R N O×N O the block diagonal stacking of the Hessians. Consider the Generalized Gauss-Newton (GGN) and the Neural Tangent Kernel (NTK) matricesEQUATION)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 isEQUATIONwhere 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) 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.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 classesEQUATIONwhere the infimum is taken over smoothly differentiable curves γ : [0, 1] → R D such that γ(0) = w 0 and γ(1) = w 1 .EQUATIONwhere 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 holdsEQUATIONand also that, for any ϵ > 0 there exists δ > 0 such thatEQUATIONWe prove the 3 points separately, in Appendix B.1, Appendix B.2 and Appendix B.3 respectively.The proof logic isEQUATION)and we prove the two steps in the two following Propositions, respectively.Proposition B.2. For any w 0 , w 1 ∈ R D it holdsEQUATIONProof. 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]EQUATIONEQUATION)This holds to any x ∈ X , so the same holds for the per-datum stacked jacobiansEQUATIONand we can measure the length of γ in the pullback metric asEQUATIONwhich gives an upper bound on the geodesic distanceEQUATIONthus, 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 meansEQUATIONwhich implies that ∥γ ′ (t)∥ f * H γ(t) = 0 for any t ∈ [0, 1] except a zero-measure set which we can neglect later. ThenEQUATIONby positive definitess of H wt , 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 N O as obtained by the matrix-vector product ofEQUATIONwhere [v] o refers to the oth component of a vector v. Thus, for T ∈ [0, 1], by Fundamental Theorem of Calculus we haveEQUATIONand this completes the proof.Proposition B.3. For any w 0 , w 1 ∈ R D it holdsEQUATION)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 pEQUATIONwhere[w 0 ] = [p (m) 1 ], [p (m) i+1 ] = [q (m) i] and [q(m) n ] = [w 1 ].Note that the sequence length n may depend on m. Lipschitzness of f in parameters, assumed by hypothesis, means thatEQUATION, n i=1 ∥p (m) i -q (m) i ∥ = ϵ m =⇒ n i=1 ∥f (p (m) i , x) -f (q (m) i , x)∥ < 2Lϵ m ∀x ∈ X . (39)Also, by definition of the equivalence class, it holds ∀x ∈ X thatEQUATION• [w 0 ] = [p 1 ] imply that there exists γ 0 : [0, → R D such that γ (0) = w , γ 0 = p 1 such that LEN * H (γ ) Lδ /n+1• [q n ] = [w 1 ] imply that there exists γ 2n : [0, 1] → R D be such that γ 2n (0) = q n , γ 2n (1) = w 1 and such that LEN f * H (γ 2n ) < Lδ /n+1• for all i = 1, . . . , n -1, [p i+1 ] = [q i ] imply that there exists γ 2i : [0, 1] → R D be such that γ 2i (0) = p i+1 , γ 2i (1) = q i and such that LEN f * H (γ 2i ) < Lδ /n+1And then for all i = 1, . . . , n, Proposition B.4 andn i=1 ∥p i -q i ∥ < 2δ imply γ 2i-1 : [0, 1] → R D be such that γ 2i-1 (0) = p i , γ 2i-1 (1) = q i and such that n i=1 LEN f * H (γ 2i-1 ) < 2Lδ.Then concatenating these 2n + 1 paths, we haveEQUATION)B.3 Proof of Eq. 23Proposition B.7. The pullback metric does not "rotate" too much when moving from w to w + ϵ,EQUATIONProof. Follows from the K-Lischitz assumption on w → J wThe 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 thatEQUATION)Proof. d f * H (w 0 , w 1 ) < δ implies that there exist a path γ :EQUATION)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 integralEQUATIONwhere p i is defined for every i ∈ {0, . . . , n(δ) -1} as follow. Consider the projection P K i on the kernel of f * H γ(ti) , and the projection P I i on the image of f * H γ(ti) , such that the two projections are orthogonal andP K i + P I i = I. Define the point p i ∈ R D as p i = P K i (γ(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 thatp 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 )) isaligned with the non-zero eigenvalues of f * H γ(ti) , this means that we can resort to lower bound l the non-zero eigenvalues Proposition B.7 to thatEQUATIONwhere, 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 haveEQUATIONFinally, 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,EQUATIONwhich concludes the proof.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 asEQUATIONAnd define ȳ = F( w) ∈ R N O . The differential ∇ w F w = J w ∈ R N O×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 > N O implies the surjectivity of the differential operator.EQUATIONWe reorder the w i so that the first N O columns are independent. Then theEQUATIONis non-singular. We consider the mapEQUATIONWe obtainEQUATION)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, defineP ⊥ w =    α -1 (ȳ 1 , . . , ȳNO N , p 1 . . . p D-N O for p ∈ D-N O   ⊆ R ,and similarlyEQUATION)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 ȳ, 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 ȳ. Thus, locally it never intersects the same equivalence class more than one time. 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 be performed efficiently using Jacobian-Vector products and Vector-Jacobian products. 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:EQUATIONThis 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.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.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 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 N O 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.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 MC samples. For sampled Laplace and Linearised Laplace, we also use 2000 Lanczos iterations and we predict using 20 MC samples. 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 MC samples. 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 3e -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.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. Conf. (↑) NLL (↓) Acc. (↑) Brier (↓) ECE (↓) MCE (↓) Laplace's diffusion 0.948±0.004 0.403±0.007 0.889±0.005 0.180±0.009 0.264±0.048 0.879±0.038 Sampled Laplace 0.843±0.004 0.997±0.222 0.717±0.049 0.422±0.081 0.221±0.047 0.804±0.080 Linearised Laplace 0.951±0.007 0.614±0.020 0.863±0.001 0.222±0.002 0.337±0.022 0.789±0.035 SWAG 0.942±0.003 0.393±0.004 0.884±0.002 0.176±0.001 0.234±0.014 0.912±0.016 Last-Layer Laplace 0.953±0.004 0.343±0.033 0.899±0.001 0.155±0.007 0.260±0.000 0.884±0.029 MAP 0.960±0.003 0.333±0.030 0.913±0.007 0.143±0.009 0.282±0.002 0.932±0.006In 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.We extend 2 to benchmark Laplace's diffusion against various other Bayesian methods for Out-of-Distribution Detection. Once again, we observe that, despite using the neural network predictive, it is competitive with the best-performing Bayesian methods in terms of having a higher AUROC, whereas Sampled Laplace performs significantly worse. 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 ). 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† Equal contribution authors listed in random order.Code: https://github.com/h-roy/geometric-laplace. 


Decision: This work studies the reparameterization invariance of Laplace approximations in Bayesian neural networks. The study begins by noting that the linearized Laplace suffers less from underfitting than the sample Laplace approach. This observation leads to the hypothesis that the discrepancy arises from a failure to properly account for reparameterization invariance in the nonlinear setting. The authors provide a rigorous theoretical analysis to support this claim and propose a modification to the sample Laplace method to address the issue. The empirical results strongly support the theoretical findings. All reviewers agree that this work presents an original perspective, addresses a significant problem, and offers a complete theory backed by convincing empirical evidence. Therefore, I recommend acceptance.

The authors are encouraged to include a detailed introduction to background concepts, such as quotient spaces and Riemannian manifolds, in the final version.

Reviews: review: paper_summary: paper_summary: This 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. 

Specifically, 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. 

Therefore, 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. 

Furthermore, 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) $.
strength_weakness: strength_weakness: * The lack of explanation of background knowledge, such as quotient space and Riemannian manifold, makes the paper difficult to understand.

* 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.
questions: questions: * 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?

* 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?

* 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}^{+}$?

* Compared to the performance of SWAG described in attached appendix, the performance of the Laplace diffusion does not seem significantly improved. 
In this context, for a given $w$, is it important to sample the weight parameter according to the invariant Riemannian manifold? 

* 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.
limitations: limitations: See above weaknesses and limitations.
paper_summary: paper_summary: The 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.
strength_weakness: strength_weakness: 1. 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.
2. 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.
3. The method is tailored to improving Laplace approximation, and there is no discussion related to any other approximate inference techiques (e.g. variational inference).

References
[1] Antoran et al. Sampling-based inference for large linear models with application to linearised Laplace. ICLR 2023.
questions: questions: See weakness.
limitations: limitations: The authors do not address potential negative social impact since the paper is predominantly theoretical.
paper_summary: paper_summary: The 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.
strength_weakness: strength_weakness: * 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.
* 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.
* 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.
questions: questions: * 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).
* As mentioned in Weakness section, I would recommend the author to evaluate the Riemannian Diffusion in other domain dataset & architectures (e.g., Transformers).
limitations: limitations: Limitations are mentioned in "Weakness" and "Questions".
paper_summary: paper_summary: The 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.
strength_weakness: strength_weakness: * 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.
questions: questions: * 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.

 * What does f_lin^w precisely mean in Eq 4? Is it the first-order Taylor approximation of f?
limitations: limitations: The 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.

Comments: title: Keep score
comment: > During the rebuttal period, I was able to resolve my concerns and gain a deeper understanding of the importance of the reparametrization invariance that this work aims to highlight.

Thanks for the support. We very much agree that reparametrization invariance is important. When models grow in size (e.g. increasing depth), we spend a greater proportion of the parameters on reparametrizations. Ten years ago, models were sufficiently small that reparametrizations could practically be ignored, but today they are causing sufficiently many problems that we are forced to better understand them. We believe that reparametrizations are the reason why Bayesian approximations do not work well with contemporary models, even if they work for small models. This is why it's essential that we form an understanding of reparametrizations.
> The authors claim I misunderstood the paper, but I don't believe that's true. Linearized Laplace outperforms (sampled) Laplace, and there are already other theoretical approaches to the problem. (See Theorem 4.1 in [1])

This paper (already referenced by us) does not compare Linearized and Sampled Laplace. Further, note that they make no theoretical links between linearization and reparametrization invariance and they study the Hessian instead of the GGN. 

> In addition, since the experiment I requested is applied to a very simple transformer, I don't think it is impossible.

It is unclear to us what the exact experiment you suggest. Previously we interpreted your review to mean a standard transformer in an NLP task. We reemphasize that this is not a usual benchmark for evaluating Bayesian methods especially Laplace Approximations where standard regression and image classification tasks are far more popular. Hence it is not obvious what priors are appropriate, what dataset should be used, and what metrics should be reported. These are important questions and we do not aim to settle them here; Tristan et al. discuss some of the pitfalls and difficulties of such experiments.

If the reviewer means a Vision Transformer (smaller version with only a few million parameters) on the standard image classification task, this is very much within reach. In fact, we even have code to run such experiments. However, doing so would require us to make some large approximations (limited Lanczos iterations and diffusion steps). The resulting experiment would, thus, not serve for theory validation, but we are happy to add them nonetheless if you see value therein.

Cinquin, Tristan, et al. "Pathologies in priors and inference for Bayesian transformers." arXiv preprint arXiv:2110.04020 (2021). (edited)
Thank you for your responses to my questions. During the rebuttal period, I was able to resolve my concerns and gain a deeper understanding of the importance of the reparametrization invariance that this work aims to highlight. I am inclined to accept this work and will therefore maintain my score.
Thanks for the detailed response from the authors.

The authors claim I misunderstood the paper, but I don't believe that's true. Linearized Laplace outperforms (sampled) Laplace, and there are already other theoretical approaches to the problem. (See Theorem 4.1 in [1])

In addition, since the experiment I requested is applied to a very simple transformer, I don't think it is impossible.

As a result, I will maintain the current score.



[1] Kim, SungYub, Kyungsu Kim, and Eunho Yang. "GEX: A flexible method for approximating influence via Geometric Ensemble." Advances in Neural Information Processing Systems 36 (2023).
Thank you for your detailed rebuttal, which addresses most of my concerns, and I decide to raise my score to 7.
Thanks for the clarification. Rephrasing the sentence in the suggested way will indeed do the trick. While I do agree with the other reviewers that the method has an computational overhead and experiments may be improved, I still think that the technical contribution is solid and valuable and the other issues are rather secondary. Hence, I tend to keep my score for now.