Manuscript Offprint
arXiv:2611.12031Scale-Invariant Empirical-Bayes Laplace Approximation for ReLU Networks
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
ReLU networks are well-known to have continuous scale symmetries; infinitely many reparameterized weight vectors that represent the same function. Dinh et al. [2017] have shown that, by reparameterizing, the geometry of the loss landscape (e.g., curvature) of these networks can be changed arbitrarily without affecting the underlying function. Thus, any quantity that depends on the network's geometry should be defined with care. In this paper, we show that the Empirical Bayes (EB) Laplace's approximation is not well-defined for ReLU networks, mainly due to Hessian dependence in computing the marginal likelihood, which is not invariant under ReLU scale symmetries. Thus, we can get different prior precisions, posterior covariances, and predictive uncertainties for a network having identical predictions under ReLU scaling. We define family of prior precision fields indexed by and introduce -canonicalization, which first converts the network to its canonical representation by balancing the ratio of incoming to outgoing weights, and then fits the Empirical Bayes (EB) Laplace to the canonical representation. This procedure is equivalent to transporting the isotropic Gaussian prior from the canonical representation to the original coordinates, by producing a ReLU-scale-compatible precision field. This makes the marginal likelihood invariant under ReLU scaling, while allowing to be selected by maximizing the marginal likelihood. The resulting EB Laplace approximation is well-defined on ReLU scale-equivalence classes and yields consistent prior precision selection and predictive uncertainties across functionally identical parameterizations.
1 Introduction
The Laplace's approximation is a simple post-hoc method for approximate Bayesian inference in deep neural networks. It fits a local Gaussian posterior whose mean is a maximum-a-posteriori (MAP) solution, and covariance is determined by curvature and prior precision [MacKay, 1992, Ritter et al., 2018, Daxberger et al., 2021]. The prior precision is often selected using marginal likelihood, which can be estimated solely from training data and without any validation data. This is also known as empirical Bayes (EB) or type-II maximum likelihood learning. Recent progress in structured curvature approximations, linearized prediction, and software support [Ritter et al., 2018, Daxberger et al., 2021, Immer et al., 2021a] has made the EB Laplace approximation an attractive method for post-hoc uncertainty estimation and Bayesian model selection.
In this paper, we study the transformation properties of marginal likelihood under ReLU scale symmetries. For ReLU networks, the marginal likelihood is not well-defined on the learned predictor. Due to the positive homogeneity property of ReLU, multiplying the incoming and outgoing weights of a hidden unit by and , respectively, makes the network function unchanged. These transformations generate ReLU scale orbits; continuous families of parameter vectors having the same
40th Conference on Neural Information Processing Systems (NeurIPS 2026).
function [Neyshabur et al., 2015a,b, Dinh et al., 2017]. Along such an orbit, the marginal likelihood is not invariant mainly due to the log-determinant of the curvature and the norm of the chosen orbit which do not transform compatibly. Consequently, standard EB Laplace can give different marginal likelihoods, prior precisions, and linearized predictive uncertainties to the parameterizations that represent exactly the same predictor.
We fix this problem by introducing -canonicalization where controls the choice of canonical representation. Our procedure first converts the network (MAP solution) to its canonical representation by balancing the ratio of incoming and outgoing weights of the hidden units of the network, then fitting the EB Laplace on the canonical representation. This generalizes the balanced and one-sided normalizations studied in scale-symmetric networks [Stock et al., 2019, Saul, 2023]. This procedure is equivalent to transporting the isotropic Gaussian prior from the canonical representation to the original coordinates, by producing a ReLU-scale-compatible precision field. We show that, for every , the resulting generalized marginal likelihood is invariant on the ReLU scale orbit. Thus, it makes the EB Laplace approximation explicitly depend on the learned function and not on arbitrary parametrization of the function that is obtained due to training artifacts. is selected jointly with prior precision using generalized marginal likelihood.
Empirically, we further show that the standard EB Laplace varies substantially across functionally identical ReLU rescaling, while -canonicalized EB Laplace becomes invariant. We also find that -canonicalized EB Laplace gives better uncertainty estimates than standard Laplace, although our main guarantees are for the invariance.
Laplace Approximation. The Laplace approximation replaces the intractable posterior by a Gaussian centered at . Given a likelihood-curvature approximation and a prior precision , the approximate posterior is , . The exact Hessian is often not tractable, and also not guaranteed to be positive definite for neural networks. Common choices for curvature approximations are the generalized Gauss–Newton (GGN) matrix and the empirical Fisher matrix [MacKay, 1992, Ritter et al., 2018, Daxberger et al., 2021]. The GGN and Fisher are positive semi-definite by construction and are often preferred in practice. We will assume the GGN approximation of curvature throughout the paper.
Prior Precision and Empirical-Bayes Selection. The prior precision controls the scale of the Gaussian posterior and affects the uncertainty estimates. It can be selected using a validation set. However a common empirical-Bayes alternative is to select by maximizing the approximate marginal likelihood on the training data. Up to constants independent of , the log marginal likelihood is
Note that for deep neural networks, the marginal likelihood cannot be computed exactly. Eq. 1 is only an approximation, widely used in Bayesian deep learning [MacKay, 1992, Immer et al., 2021a,b, Antoran et al., 2022a]. The prior precision is then given by
Linearized Predictive Distribution. For a test input , let denote the Jacobian of with respect to , evaluated at . The Jacobian-linearized distribution over network outputs is Gaussian with mean , and covariance .
3 Parameter-Space Symmetries in Neural Networks
A parameter-space symmetry of a neural network is a transformation of the network parameter that leaves the network function unchanged. Such symmetries matter for post-hoc Bayesian inference because a quantity that changes under an exact function-preserving transformation is a property of the parameter representative, not of the learned function of the neural network.
Definition 3.1. A map is a parameter-space symmetry of if
Given a set of symmetries , a scalar-valued function is invariant under if for all . A matrix-valued function is equivariant under if it transforms predictably under each , meaning there exists a known map such that . Invariance is the special case where is the identity.
Neural networks have several exact parameter-space symmetries [Zhao et al., 2026]. For example, permutation symmetry, i.e., relabeling the hidden units of a layer and applying the corresponding permutation to adjacent weight matrices leaves the function unchanged [Hecht-Nielsen, 1990, Entezari et al., 2022, Ainsworth et al., 2023]. In this work, we focus only on continuous symmetry specific to ReLU networks.
3.1 ReLU Scale Orbits
ReLU networks have continuous exact symmetries arising due to their homogeneity property. For any , . Thus, the scale of a hidden unit can be redistributed between its incoming and outgoing weights without changing the network function. Consider a feedforward ReLU network with weight matrix and bias vector at layer . For a hidden unit and a scalar , the rescaling
leaves the network function unchanged. Composing this over all hidden units creates a group of exact function-preserving transformations. Let be the flattened parameter and collects one positive scalar per hidden unit. Then, the corresponding transformation is . Here, is a diagonal matrix corresponding to . The ReLU scale orbit of is the equivalence class . Every element of represents exactly the same function.
3.2 Transformation Laws under ReLU Rescaling
Let be a ReLU rescaling. By symmetry, . Since , and using the chain rule, the Jacobian transforms as follows.
The generalized Gauss–Newton (GGN) curvature matrix can be written as . And this transforms by congruence,
This congruence law also holds for standard KFAC curvature blocks under ReLU rescaling. We give the layerwise Kronecker-factor derivation in Appendix D.
4 Orbit Dependence of Standard Empirical-Bayes Laplace
Definition 4.1 (Orbit consistency). An empirical-Bayes Laplace procedure is orbit-consistent if, for every ReLU rescaling , the marginal likelihood, selected prior precision, and covariance of the predictive distribution are the same on the ReLU-scale orbit.
Standard EB Laplace approximation is not orbit-consistent. Let be a ReLU rescaling. A sufficient condition for to be orbit-consistent is that all four terms in (1) are invariant under this rescaling. The likelihood term satisfies this since the network function is unchanged,
. However, the prior quadratic term satisfies in general. And the log-determinant term is also not invariant. Although the curvature transforms by congruence (5), the isotropic component does not transform with it, so is not a congruence transform of . Thus, is not constant on , and the prior precision is selected by maximizing marginal likelihood. As we show below, the selected prior precision can also vary along the orbit. A detailed derivation of proposition 4.2 is provided in Appendix A.
Proposition 4.2 (Orbit dependence of standard EB-Laplace). Consider the scalar ReLU regression model with , Gaussian observation noise of variance , and inputs . The rescaling for preserves the realized predictor. Let , , and . The unique positive stationary point of in is
Since is non-constant on the scale orbit, varies with . Hence standard empirical-Bayes Laplace assigns different marginal likelihoods, selected prior precisions, and linearized predictive uncertainties to parameter vectors representing exactly the same function.
5 Scale-Consistent Laplace
The orbit-dependence of standard empirical-Bayes Laplace comes from a mismatch between curvature and the isotropic prior. Under a ReLU rescaling , Jacobian-based curvature transforms by congruence (5), whereas the standard prior precision is fixed in the original coordinates. In this section we identify the transformation law required for prior precision to be compatible with ReLU scale orbits, and prove the resulting invariance of marginal likelihood, selected prior precision and covariance of linearized prediction distribution.
5.1 Scale-Compatible Precision Fields
A scalar precision cannot make transform like curvature under arbitrary hidden-unit rescalings. We therefore allow the prior precision to depend on the MAP solution.
Definition 5.1 (Scale-compatible precision field). A map is scale-compatible if, for every ReLU rescaling ,
Given such a field, define the generalized Laplace evidence
When , this reduces to the standard isotropic objective in (1).
Theorem 5.2 (Evidence invariance). Let be a ReLU rescaling. Suppose that the curvature satisfies (5) and that is scale-compatible. Then .
Proof of the theorem 5.2 is given in Appendix B. If is a family of scale-compatible precision fields, then for every . Therefore, the set of hyperparameters that are obtained by maximizing the marginal likelihood will also be constant on ReLU scale orbit.
5.2 Posterior Equivariance and Predictive Invariance
Scale compatibility also gives the correct transformation rule for the posterior covariance and the covariance of the predictive distribution under the Laplace approximation. Let posterior covariance be , and . Then . Thus, the posterior covariance is equivariant under scale-compatible precision field. This is the expected behavior under transformation. The induced Jacobian-linearized predictive covariance, however, is invariant.
Theorem 5.3 (Linearized predictive invariance). Let . Suppose that the curvature satisfies (5) and that is scale-compatible. Then, for every test input ,
Proof. The mean is invariant because v and w represent the same network function. For the covariance, using the transformation rule for Jacobian from Eq. 4,
5.3 Transported Prior from a Canonical Section
We have now seen that, to make the EB Laplace scale-consistent, the precision field should be scale-compatible. Here we show how to construct such a precision field. Let's assume that selects a canonical representative from a ReLU scale orbit and satisfies the following property
The above property Eq. 11 is also called a section property and is called canonical section. We assume that ReLU scale orbit is non-degenerate and the scale displacement between w and is well defined. Since w and lie on the same orbit, there exists a positive diagonal matrix such that . This matrix records the scale displacement from the canonical representative to the original representative. Using an isotropic Gaussian prior with precision at the canonical representative,
Using , the canonical quadratic penalty becomes
Thus, quadratic penalty of an isotropic Gaussian prior in canonical coordinates is equivalent to that induced by a representative-dependent (transported), diagonal precision in the original coordinates.
Proposition 5.4 (Scale compatibility of the transported prior). Suppose satisfies the section property (11). Then, for every , the transported precision field defined by (13) is scale-compatible.
Corollary 5.5 (Orbit-consistent transported Laplace). Suppose satisfies the section property (11). Then, for every fixed and , the generalized evidence and the Jacobian-linearized predictive distribution induced by are invariant under ReLU rescaling. Moreover, the evidence-maximizing set of prior precisions is the same for all representatives of a ReLU scale orbit.
The proof of the Proposition 5.4 is given in Appendix C. Combining Proposition 5.4 with Theorems 5.2 and 5.3 gives the section-level results. The transported-prior framework reduces the remaining problem to constructing a section satisfying Eq. (11). Next we give such a construction via -canonicalization.
6 -Canonicalization
Any canonical section satisfying (11) makes empirical-Bayes Laplace orbit-consistent. Here, we introduce a practical algorithm for selecting a canonical section. The construction is based on a family of gauge conditions that balance incoming and outgoing weight norms of the hidden units. First, we state the assumptions required for this construction and then give the iterative procedure for selecting the canonical representation.
6.1 Canonical Gauge Condition
A canonical section should not depend on the arbitrary representative returned by MAP training. ReLU scale orbits provide a natural way to define such a section. For each hidden unit, the scale symmetry redistributes the magnitude between the incoming and outgoing weights. Fixing the relative placement of this magnitude gives a gauge condition on the orbit. The parameter controls where the canonical representative lies between incoming-normalized, balanced, and outgoing-normalized representatives. This construction is closely related to equi-normalization and weight-balancing
Algorithm 1 -Canonicalization
Require: parameters , gauge index , tolerance
Ensure: representative
1: repeat
2: for each hidden unit in sweep order do
3: compute and
4:
5:
6:
7:
8: end for
9: until
10: return
methods for scale-symmetric networks [Stock et al., 2019, Saul, 2023]. Without loss of generality we assume a feedforward ReLU network without any normalization layers. Let us define the magnitude of incoming weight of hidden unit by
and the magnitude of outgoing weight by
Under the elementary rescaling (3) of the same unit by , with all other unit scales held fixed, these magnitudes transform as , . Thus the elementary rescaling changes the ratio between incoming and outgoing magnitudes while preserving their product. Across a multilayer network, the gauge equations are coupled because rescaling the current hidden units changes the adjacent hidden unit's incoming and outgoing weight magnitudes. For , the -canonical gauge condition is given by
For , the condition becomes , giving an incoming-normalized representative. For , it becomes , giving an outgoing-normalized representative. For , it becomes , giving a balanced or minimum norm representative.
Assumption 6.1 (Canonical section). For each and each non-degenerate parameter vector, there exists a deterministic representative satisfying the gauge condition (16). The resulting map is a section of the ReLU scale quotient
Assumption 6.1 requires the existence of a canonical representative. In our implementation, we compute by the iterative algorithm 1.
6.2 Iterative Construction
To compute the canonical representative, we repeatedly apply elementary rescalings. Holding all other unit scales fixed, the rescaling factor that enforces (16) for unit is
Applying (3) with this factor sets the local residual to zero for that unit. Since the residuals are coupled across layers for interior values of , we sweep over hidden units and repeat until the maximum update size is below a tolerance. We do not provide a proof of convergence for the -canonicalization algorithm. It is left for future work. For , the convergence proof is given by [Saul, 2023]. In the experiments, convergence is assessed by the maximum gauge residual and by verifying that canonicalization preserves the network outputs to numerical precision. We find the algorithm always converges within at most 200 sweeps. We use a first-to-last sweep order for and a last-to-first sweep order for . The algorithm converges in a single sweep for and .
6.3 Selecting
The parameter specifies where the isotropic prior is placed on the incoming and outgoing scale axis. It is therefore a prior-shape hyperparameter. Different values of correspond to different orbit-consistent priors. Since indexes a prior family, it can be selected by the same marginal likelihood criterion used to select the prior precision. For a finite candidate set , we choose
By Corollary 5.5, under Assumption 6.1, the generalized evidence is invariant on [w] for every fixed . Hence the maximizing set of values is the same for every representative of the ReLU scale orbit. The choice is geometrically natural and corresponds to the minimum norm canonical representation. However, it need not be optimal under the marginal likelihood. The evidence can prefer a prior placed closer to the incoming-normalized or outgoing-normalized representative. We therefore treat as a hyperparameter and select it from a grid search in the experiments.
7 Experiments
We evaluate -canonicalization on both small and large network architectures, including ResNets. First, we perform an orbit-stress test on a Fashion-MNIST ReLU MLP to test whether the evidence, selected precision, and predictive uncertainty remain invariant across functionally identical ReLU rescaling. Next, we use a CIFAR-10 ReLU ConvNet with KFAC-Laplace to examine how -canonicalization affects predictive uncertainty in a convolution model. Although our theoretical guarantee is about invariance, in the next experiment we test whether -canonicalization can improve uncertainty estimates when the MAP representative is poorly scaled.
Orbit-stress test. We first test orbit consistency by applying post-hoc Laplace to different parameterizations of the same trained ReLU predictor. We train a two-hidden-layer ReLU MLP on Fashion-MNIST and generate function-preserving ReLU rescalings of the MAP solution by sampling unit-wise and applying the elementary rescaling in Eq. 3. All representatives preserve the original logits to numerical precision. We then fit full-network diagonal-GGN EB-Laplace to each representative, either in raw coordinates or after -canonicalization. Complete experimental details are given in Appendix E.
Table 1: Orbit stress test on a single trained ReLU predictor. We draw function-preserving ReLU rescalings with and fit diagonal-GGN EB-Laplace to each representative. Values are mean standard deviation across orbit samples.
| Method | log | NLL | ECE | Acc. | log | max | |
|---|---|---|---|---|---|---|---|
| Standard EB | 2.690.36 | 0.39060.0045 | 0.06820.0059 | 0.87180.0008 | -8.800.89 | 27691016 | 2.62 |
| 5.070 | 0.36460 | 0.03870 | 0.87250 | -4.720 | 156 | 8.35 | |
| 5.180 | 0.36440 | 0.03890 | 0.87260 | -4.700 | 140 | 1.07 | |
| 5.290 | 0.36720 | 0.04280 | 0.87240 | -4.950 | 134 | 8.35 | |
| 5.350 | 0.37230 | 0.04950 | 0.87210 | -5.420 | 139 | 7.75 | |
| 5.320 | 0.37760 | 0.05620 | 0.87230 | -5.940 | 156 | 7.75 |
Tables 1 and 2 show that standard EB-Laplace is strongly orbit-dependent. Functionally identical representatives give different selected precisions, marginal likelihoods, and predictive probabilities.
In contrast, for every , canonicalized Laplace removes this variation to numerical precision. The evidence selects , while the balanced representative gives the smallest parameter norm. However, it is not selected. It shows that generalized marginal likelihood is choosing a prior shape and not just minimizing the canonical parameter norm. Random function-preserving rescalings of the same MAP solution substantially change standard EB-Laplace, confirming that explicit canonicaliza-
Table 2: Spread statistics of Orbit stress test.
| Orbit statistic | Standard EB | -canonicalized EB |
|---|---|---|
| std(log ) | 0.356 | 0 |
| range(log ) | 1.421 | 0 |
| Spread factor of | 4.14 | 1.00 |
| range(log ) | 3.47 nats | < 2 nats |
| std(NLL) | 0.0045 | 0 |
| std(ECE) | 0.0059 | 0 |
| max | 2.62 | |
| max | 7.63 | |
| Corr(log , ) | -0.971 | — |
tion is needed for orbit-consistency rather than relying on the scale representative returned by training.
CIFAR-10 ConvNet with KFAC-Laplace. We also evaluate -canonicalization with all-layer KFAC-Laplace on a plain ReLU ConvNet trained on CIFAR-10. KFAC curvature satisfies the same congruence transformation law under ReLU rescaling, as shown in Appendix D, so the scale-compatibility argument applies beyond diagonal curvature. Table 3 shows the results. Over three independently trained MAP seeds, standard KFAC-Laplace is strongly underconfident. Accuracy is unchanged, but the mean predictive confidence is only 0.526 for an accuracy of 0.774. Canonicalizing before fitting KFAC-Laplace, with selected by marginal likelihood within the canonicalized grid, selects in all three runs and substantially improves predictive quality. NLL decreases from 0.877 to 0.734 and ECE from 0.248 to 0.130, with essentially unchanged accuracy. Full experimental details and additional metrics are given in Appendix E.2.
Table 3: CIFAR-10 ConvNet with all-layer KFAC-Laplace. Mean std over three MAP seeds.
| Method | Acc. | NLL | ECE | Conf. |
|---|---|---|---|---|
| Standard KFAC-LA | ||||
| -canon KFAC-LA |
CIFAR-100 ResNet with last-layer Laplace. ResNet networks do not have full ReLU-scale symmetry due to batch normalization layers. Thus, -canonicalization is not directly applicable. However, if we consider only the last-layer Laplace approximation, we can apply -canonicalization to get the canonical representation. Table 4 shows the results for this. For these networks, the trained representative is already close to the canonical representative, so canonicalization does not improve the predictive performance. However, the marginal likelihood and prior precision still change substantially under rescaling, and canonicalization removes this variation to zero. While normalization layers help stabilize the scale in these networks during training, relying on them is not ideal. Relying on BatchNorm or specific weight decay values to accidentally balance the network is a fragile strategy. If a practitioner changes the optimizer, drops weight decay, or uses a novel architecture without standard normalization, standard EB-Laplace can fail silently, producing miscalibrated uncertainties. Canonicalization explicitly removes this fragility and guarantees that the Laplace fit is robust regardless of the training dynamics. These results further demonstrate that canonicalization does not modify the predictions of an already well-balanced ResNet. Canonicalization yields behavior close to standard EB Laplace when the model is already well-scaled, and corrects the calibration issues in poorly scaled networks, as shown by the CIFAR-10 experiments 3.
Table 4: Orbit-stress tests on CIFAR-100 with ResNet-18, ResNet-50, and ResNet-101 using last-layer EB-Laplace. For each MAP, we generate function-preserving channel rescalings with independent . Values are mean standard deviation across orbit samples.
| Model | Method | Acc. | NLL | ECE | Conf. | ||
|---|---|---|---|---|---|---|---|
| ResNet-18 | MAP | - | - | 0.7873 | 0.8773 | 0.0977 | 0.8849 |
| Standard EB (orig.) | 3.92 | -10.011 | 0.7794 | 0.7906 | 0.0314 | 0.7480 | |
| Standard EB | |||||||
| ResNet-50 | MAP | - | - | 0.7917 | 0.8801 | 0.1088 | 0.9004 |
| Standard EB (orig.) | 4.18 | -12.421 | 0.7870 | 0.7592 | 0.0341 | 0.8128 | |
| Standard EB | |||||||
| ResNet-101 | MAP | - | - | 0.8105 | 0.8285 | 0.1018 | 0.9122 |
| Standard EB (orig.) | 4.17 | -11.020 | 0.8082 | 0.7065 | 0.0195 | 0.8152 | |
| Standard EB | |||||||
Table 5: Standard EB model selection on CIFAR-10. Evidence values are mean ± standard deviation over 20 rescalings. Selection rates are computed over all 400 pairs.
| σ | Standard EB evidence (10³ nats) | Width 128 selected (%) | |||
|---|---|---|---|---|---|
| Width 64 | Width 128 | Gap | Both at σ | Width 128 at 0.25 | |
| 0.25 | -110.6 ± 0.8 | -121.7 ± 0.7 | 11.1 | 0.0 | 0.0 |
| 0.50 | -119.3 ± 2.9 | -136.4 ± 2.7 | 17.1 | 0.0 | 19.8 |
| 1.00 | -160.6 ± 11.9 | -214.3 ± 16.9 | 53.7 | 0.2 | 100.0 |
Effect on model selection. We compare two MLPs trained on CIFAR-10, with widths 64 and 128. Marginal likelihood computed using canonical representation favors the width-64 model by nats. For each ReLU rescaling strength (scale ), we create 20 versions of each model without changing its network predictions and refit standard EB-Laplace, and compare all 400 pairs. As Table 5 shows, the mean evidence gap changes from to nats. Using the same rescaling strength for both models rarely changes their ranking, because the wider model loses more evidence in this example. However, when the width-128 model is kept at , increasing the rescaling strength of the width-64 model reverses the canonical ranking in 19.8% of comparisons at and 100% at . Thus, standard EB can change its model selection even though neither network's predictions change. Canonicalization keeps the evidence gap and model ranking fixed across these rescalings.
8 Related Work
Laplace approximation and empirical-Bayes prior selection. The Laplace approximation is a classical tool for Bayesian model comparison, with early evidence-based treatments established in the literature [MacKay, 1992]. Subsequent work makes it practical in neural networks through structured curvature approximations and scalable software [Ritter et al., 2018, Daxberger et al., 2021]. Empirical-Bayes selection of prior precision by marginal-likelihood maximisation has also been previously developed [Immer et al., 2021a] and extended to linearized settings [Antoran et al., 2022a]. Our work does not propose a new curvature approximation or scalable implementation. It identifies a structural defect in the standard empirical-Bayes objective. It depends on the arbitrary parameter representative. We construct a corrected version that is well-defined on ReLU scale-equivalence classes.
Classical Laplace theory and Singular models. Standard Laplace and Bayesian information criterion (BIC) asymptotics assume local identifiability and nonsingular quadratic expansion around an isolated mode [Tierney and Kadane, 1986, Kass et al., 1990]. ReLU networks violate these likelihood-level assumptions because of scale symmetry. Moreover, for deep neural networks, the Hessian need not be positive definite. A Gaussian prior can make the posterior curvature positive definite, allowing a finite local Laplace approximation to be computed. However, the usual regular-model asymptotic interpretation of such approximation is no longer valid. MacKay [1998] has shown that the accuracy of a Laplace approximation can depend on the chosen parameter basis. For non-identifiable models, the regular BIC expansion is invalid. The asymptotic expansion of the log marginal likelihood instead involves the log canonical threshold and its multiplicity, which replace the regular complexity term and may introduce an additional contribution [Watanabe, 2009]. Criteria such as wBIC [Watanabe, 2013] and sBIC [Drton and Plummer, 2017] are designed to account for this singular asymptotic behavior. We study a separate finite-sample defect of the empirical-Bayes Laplace surrogate used in practice. Our method does not correct the full singular asymptotics of neural-network marginal likelihoods. Rather, it makes that surrogate well-defined on ReLU scale orbit.
Scale symmetries and canonical representatives. Positive homogeneity of ReLU activations generates continuous families of parameter vectors representing the same function. These symmetries have been studied extensively in the context of norm-based capacity control and path-normalized optimization [Neyshabur et al., 2015a,b]. Furthermore, it has been shown that ReLU reparameterizations change sharpness measures without changing the represented function [Dinh et al., 2017], establishing that coordinate-dependent quantities are not intrinsic properties of the learned predictor. Our paper applies the same principle to empirical-Bayes Laplace. The evidence and selected prior precision should not depend on an arbitrary representative. To construct a canonical representative, we build on iterative balancing procedures that minimize the weight norm over a scale orbit [Stock et al., 2019, Saul, 2023]. Our -canonicalization generalizes these procedures. Rather than using balancing to improve optimization, our method uses it to define where an isotropic Gaussian prior is placed on each orbit, turning balancing into a mechanism for scale-consistent empirical-Bayes inference.
Reparameterization invariance in approximate Bayesian inference. The most directly related work studies reparameterization invariance in approximate Bayesian inference, showing that linearized Laplace behaves differently from sampled Laplace in directions that do not change the function [Roy et al., 2024]. A related argument suggests that Hessian-based quantities become inconsistent under reparameterization when the relevant metric structure is ignored [Kristiadi et al., 2023]. This issue has been addressed by proposing a Riemannian Laplace approximation that adapts the posterior geometry to the local shape of the log-posterior [Bergamin et al., 2023]. Our contribution is narrower and more specific than these geometric approaches. We focus exclusively on the exact continuous scale symmetry of ReLU networks and derive the precise transformation law the empirical-Bayes prior precision must satisfy for both the evidence and the linearized predictive distribution to be invariant on scale orbits. Antoran et al. [2022b] study Laplace inference in networks with normalisation layers and show that BatchNorm and related layers break the posterior-volume interpretation of the standard evidence, proposing a neural -prior to address heterogeneous Jacobian scales. Our work addresses a different invariance failure in plain ReLU networks, where the empirical-Bayes evidence and selected prior precision depend on the arbitrary representative of a ReLU scale orbit.
Weight-space symmetries in Bayesian neural networks. Discrete weight-space symmetries, such as hidden-unit permutations, have received attention in Bayesian neural networks. Previous studies analyze how permutation symmetries affect posteriors and propose constructions that respect permutation invariance [Rossi et al., 2023, Gelberg et al., 2024]. Other works explore both permutation and scale symmetries in weight-space posteriors [Laurent et al., 2024]. Our work is complementary. We address the continuous ReLU scale symmetry rather than discrete permutation symmetry, and focus specifically on the empirical-Bayes evidence objective and prior precision selection rather than on the posterior geometry itself.
9 Limitations and future work
-canonicalization is only applicable to neural networks having activation functions with positive homogeneity property such as ReLU, leaky ReLU, PReLU, etc. Moreover, normalization layers such as batch normalization or layer normalization break the scale symmetry. Thus, -canonicalization will not work on the network having normalization layers. Extending our method to work on normalized networks would require deriving the appropriate symmetry group, canonical section, and transported prior for that architecture. We apply -canonicalization post-hoc after the network has been trained. It would be interesting to see how training dynamics change if we apply -canonicalization during training. We leave such investigations to future work.
10 Conclusion
Standard EB Laplace approximation for ReLU networks is not invariant under ReLU scale symmetry. It gives different marginal likelihoods, prior precisions, and predictive distributions for function-preserving ReLU rescalings. We introduce -canonicalized EB Laplace approximation that fixes the ReLU scale dependence issue of standard EB Laplace. It selects a canonical representation and places an isotropic Gaussian prior on that, which is equivalent to transporting the isotropic Gaussian prior from the canonical representation to the original coordinates by producing a precision field. This precision field transforms compatibly with curvature, which makes the generalized marginal likelihood, prior precision, and predictive distribution invariant under ReLU rescaling. Moreover, Invariance of the marginal likelihood makes model selection via EB Laplace well-defined. Although our guarantee is for invariance, if the MAP solution has poor scale, -canonicalization can also give improved uncertainty estimates, as shown in our experiments.
Acknowledgments and Disclosure of Funding
SP acknowledges support from Visvesvaraya PhD fellowship. PR acknowledges support from Google Research and Satya & Rao Remala Foundation.
References
Laurent Dinh, Razvan Pascanu, Samy Bengio, and Yoshua Bengio. Sharp minima can generalize for deep nets. In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 1019–1028. PMLR, 06–11 Aug 2017. URL https://proceedings.mlr.press/v70/dinh17b.html.
David J. C. MacKay. Bayesian interpolation. Neural Computation, 4(3):415–447, 05 1992. ISSN 0899-7667. doi: 10.1162/neco.1992.4.3.415. URL https://doi.org/10.1162/neco.1992.4.3.415.
Hippolyt Ritter, Aleksandar Botev, and David Barber. A scalable laplace approximation for neural networks. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id=Skdvd2xAZ.
Erik Daxberger, Agustinus Kristiadi, Alexander Immer, Runa Eschenhagen, Matthias Bauer, and Philipp Hennig. Laplace redux - effortless bayesian deep learning. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, 2021. URL https://openreview.net/forum?id=gDcaUj4Myhn.
Alexander Immer, Matthias Bauer, Vincent Fortuin, Gunnar Rätsch, and Mohammad Emtiyaz Khan. Scalable marginal likelihood estimation for model selection in deep learning. In ICML, pages 4563–4573, 2021a. URL http://proceedings.mlr.press/v139/immer21a.html.
Behnam Neyshabur, Ryota Tomioka, and Nathan Srebro. Norm-based capacity control in neural networks. In Peter Grünwald, Elad Hazan, and Satyen Kale, editors, Proceedings of The 28th Conference on Learning Theory, volume 40 of Proceedings of Machine Learning Research, pages 1376–1401, Paris, France, 03–06 Jul 2015a. PMLR. URL https://proceedings.mlr.press/v40/Neyshabur15.html.
Behnam Neyshabur, Ruslan Salakhutdinov, and Nathan Srebro. Path-sgd: Path-normalized optimization in deep neural networks. In NIPS, pages 2422–2430, 2015b. URL http://papers.nips.cc/paper/5797-path-sgd-path-normalized-optimization-in-deep-neural-networks.
Pierre Stock, Benjamin Graham, Rémi Gribonval, and Hervé Jégou. Equi-normalization of neural networks. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=r1gEqiC9FX.
Lawrence K. Saul. Weight-balancing fixes and flows for deep learning. Transactions on Machine Learning Research, 2023. ISSN 2835-8856. URL https://openreview.net/forum?id=uaHyXxyp2r.
Alexander Immer, Maciej Korzepa, and Matthias Bauer. Improving predictions of bayesian neural nets via local linearization. In Arindam Banerjee and Kenji Fukumizu, editors, Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, volume 130 of Proceedings of Machine Learning Research, pages 703–711. PMLR, 13–15 Apr 2021b. URL https://proceedings.mlr.press/v130/immer21a.html.
Javier Antoran, David Janz, James U Allingham, Erik Daxberger, Riccardo Rb Barbano, Eric Nalisnick, and Jose Miguel Hernandez-Lobato. Adapting the linearised Laplace model evidence for modern deep learning. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato, editors, Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pages 796–821. PMLR, 17–23 Jul 2022a. URL https://proceedings.mlr.press/v162/antoran22a.html.
Bo Zhao, Robin Walters, and Rose Yu. Symmetry in neural network parameter spaces. Transactions on Machine Learning Research, 2026. ISSN 2835-8856. URL https://openreview.net/forum?id=jLpWq5QY6I.
Robert Hecht-Nielsen. On the algebraic structure of feedforward network weight spaces. In Rolf ECKMILLER, editor, Advanced Neural Computers, pages 129–135. North-Holland, Amsterdam, 1990. ISBN 978-0-444-88400-8. doi: https://doi.org/10.1016/B978-0-444-88400-8.50019-4. URL https://www.sciencedirect.com/science/article/pii/B9780444884008500194.
Rahim Entezari, Hanie Sedghi, Olga Saukh, and Behnam Neyshabur. The role of permutation invariance in linear mode connectivity of neural networks. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=dNigytemkL.
Samuel Ainsworth, Jonathan Hayase, and Siddhartha Srinivasa. Git re-basin: Merging models modulo permutation symmetries. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=CQsmMYmlP5T.
Luke Tierney and Joseph B. Kadane. Accurate approximations for posterior moments and marginal densities. Journal of the American Statistical Association, 81(393):82–86, 1986. doi: 10.1080/01621459.1986.10478240. URL https://www.tandfonline.com/doi/abs/10.1080/01621459.1986.10478240.
Robert E. Kass, Luke Tierney, and Joseph B. Kadane. The validity of posterior expansions based on laplace's method. In S. Geisser, J. S. Hodges, S. J. Press, and A. Zellner, editors, Bayesian and Likelihood Methods in Statistics and Econometrics: Essays in Honor of George A. Barnard, pages 473–488. North-Holland, Amsterdam, 1990.
David J. C. MacKay. Choice of basis for laplace approximation. Machine Learning, 33(1):77–86, 1998. doi: 10.1023/A:1007558615313. URL https://doi.org.
Sumio Watanabe. Algebraic Geometry and Statistical Learning Theory. Cambridge University Press, USA, 2009. ISBN 0521864674.
Sumio Watanabe. A widely applicable bayesian information criterion. Journal of Machine Learning Research, 14(27):867–897, 2013. URL http://jmlr.org/papers/v14/watanabe13a.html.
Mathias Drton and Martyn Plummer. A bayesian information criterion for singular models. Journal of the Royal Statistical Society Series B: Statistical Methodology, 79(2):323–380, 03 2017. ISSN 1369-7412. doi: 10.1111/rssb.12187. URL https://doi.org/10.1111/rssb.12187.
Hrittik Roy, Marco Miani, Carl Henrik Ek, Philipp Hennig, Marvin Pörtner, Lukas Tatzel, and Søren Hauberg. Reparameterization invariance in approximate bayesian inference. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=204Y0rDHny.
Agustinus Kristiadi, Felix Dangel, and Philipp Hennig. The geometry of neural nets' parameter spaces under reparametrization. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=vtLNwa6uX0.
Federico Bergamin, Pablo Moreno-Muñoz, Søren Hauberg, and Georgios Arvanitidis. Riemannian laplace approximations for bayesian neural networks. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=bHS7qjL0Ay.
Javier Antoran, James Urquhart Allingham, David Janz, Erik Daxberger, Eric Nalisnick, and José Miguel Hernández-Lobato. Linearised laplace inference in networks with normalisation layers and the neural g-prior. In Fourth Symposium on Advances in Approximate Bayesian Inference, 2022b. URL https://openreview.net/forum?id=uUH8x-h9zdB.
Simone Rossi, Ankit Singh, and Thomas Hannagan. On permutation symmetries in bayesian neural network posteriors: a variational perspective. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=kj33zJ9Vue.
Yoav Gelberg, Tycho F. A. van der Ouderaa, Mark van der Wilk, and Yarin Gal. Variational inference failures under model symmetries: Permutation invariant posteriors for bayesian neural networks. In Sharvarree Vadgama, Erik Bekkers, Alison Pouplin, Sekou-Oumar Kaba, Robin Walters, Hannah Lawrence, Tegan Emerson, Henry Kvinge, Jakub Tomczak, and Stephanie Jegelka, editors, Proceedings of the Geometry-grounded Representation Learning and Generative Modeling Workshop (GRaM), volume 251 of Proceedings of Machine Learning Research, pages 233–248. PMLR, 29 Jul 2024. URL https://proceedings.mlr.press/v251/gelberg24a.html.
Olivier Laurent, Emanuel Aldea, and Gianni Franchi. A symmetry-aware exploration of bayesian neural network posteriors. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=F0SBQuXgAq.
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms, 2017. URL https://arxiv.org/abs/1708.07747.
Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. On calibration of modern neural networks. In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 1321–1330. PMLR, 06–11 Aug 2017. URL https://proceedings.mlr.press/v70/guo17a.html.
A Proof of Proposition 4.2(Scalar Orbit Dependence)
Model. Consider with , Gaussian observation noise of variance , and inputs . Since , , so . The rescaling preserves the realized predictor on the dataset for every .
Curvature. The Jacobian at for a single input is . For Gaussian regression with noise variance , the GGN matrix is
This matrix has rank one with nonzero eigenvalue , where and .
Evidence along the orbit. Along the scale orbit, the likelihood is constant and . The eigenvalues of are and , so . Up to constants independent of and , the standard empirical-Bayes objective reduces to
Empirical-Bayes optimum. Differentiating (21) with respect to and setting the derivative to zero gives
Combining fractions,
Since , this simplifies to , or equivalently
The unique positive root is
Non-invariance. The function is strictly convex in , minimized at , and unbounded as or . Since is a strictly decreasing function of (its derivative with respect to is negative for all ), is non-constant along the orbit. Hence standard empirical-Bayes Laplace assigns different marginal likelihoods, selected prior precisions, and linearized predictive uncertainties to parameter vectors representing exactly the same predictor.
B Proof of theorem 5.2 (Evidence invariance)
Proof. The likelihood term is invariant because v and w represent the same predictor. For the posterior precision,
Hence
Similarly,
The two log-determinant changes therefore cancel in (9). Finally,
C Proof of Proposition 5.4 (Scale Compatibility of the Transported Prior)
Proof. Let . By the section property, . Using the construction in Section (5.3),
Therefore
Since these matrices are diagonal,
D KFAC Congruence under ReLU Rescaling
We verify that standard KFAC curvature blocks obey the same congruence law as Jacobian-based curvature under the ReLU rescalings of Section 3.1. Consider an affine layer
Let
collect the positive hidden-unit scaling factors at layer , with because input and output units are not rescaled. The ReLU parameter rescaling acts layerwise as
This is the layerwise matrix form of the elementary hidden-unit rescaling in Eq. 3. With column-major vectorization,
so is the corresponding parameter-space block of the global rescaling matrix .
The parameter rescaling induces the activation transformation
where the second identity follows from positive homogeneity, . For the loss derivative
the chain rule gives
With column-major vectorization, the KFAC approximation to the weight block is
The transformations above imply
Therefore, by the mixed-product property of the Kronecker product,
This is the layerwise form of the global congruence law
The KFAC factorization is compatible with the rescaling because the factorized expectation commutes with the induced activation and derivative transformations:
Biases are handled by augmenting the activation vector,
The appended constant coordinate is left unscaled because it is not a hidden unit in the ReLU scale group, while the bias column itself scales with . Equivalently, for the augmented weight matrix ,
The same congruence argument then applies to the augmented weight-bias block.
For convolutional layers in the standard unfolded-patch KFAC formulation, the proof carries over after replacing by the unfolded input patches and applying the corresponding channel scaling to each spatial patch coordinate.
E Experimental Details
Our experiments are fully reproducible. All the experiments are conducted on a single NVIDIA A30 24GB GPU. Code is available in the supplementary material.
E.1 Orbit Stress Test
Dataset and model We use Fashion-MNIST Xiao et al. [2017], with 60,000 training images and 10,000 test images across 10 classes. Images are normalized using the training-set mean 0.2860 and standard deviation 0.3530, and are flattened to vectors of dimension 784. The model is a two-hidden-layer ReLU MLP with hidden dimensions [64, 64] and a linear output layer. It has no normalization layers.
MAP training The MAP solution is obtained by minimizing cross-entropy with weight decay using Adam with learning rate , batch size 256, for 10 epochs. The resulting MAP model achieves 87.67% test accuracy.
Laplace approximation We use laplace-torch Daxberger et al. [2021]. All Laplace fits use all parameters, diagonal GGN curvature, and a scalar prior precision . The prior precision is initialized at 1.0 and optimized by 100 Adam steps with learning rate 0.1 on the Laplace marginal likelihood. For prediction, we use the Jacobian-linearized predictive distribution with the probit link approximation. Model computations use ffloat32; -canonicalization is performed in ffloat64 and cast back to ffloat32 before fitting Laplace.
Orbit generation Starting from the MAP solution , we generate function-preserving representatives. For each representative, we sample independent hidden-unit log-scales
and apply the elementary ReLU rescaling in Eq. 3 to every hidden unit. For every generated representative , we verify
Thus all reported variation across orbit samples is due to the parameterization supplied to the Laplace approximation, not to any change in the predictor.
-canonicalization For each representative and each , we apply Algorithm 1 with tolerance and a maximum budget of 200 sweeps. For interior values, all runs converged in fewer than 50 sweeps under the stopping criterion . The endpoints are computed by a single directional pass: forward incoming-normalization for and backward outgoing-normalization for . The canonicalization cost is much smaller than the cost of fitting the Laplace approximation.
Table 6: Standard deviations under rescaling and retraining. Rescaling preserves the network function while retraining produces different learned functions. Predictive metrics use standard EB-Laplace.
| Quantity | Rescaling | Retraining |
|---|---|---|
| Log prior precision log | 0.356 | 0.016 |
| Log evidence log | 8900 | 884 |
| NLL | 0.0045 | 0.0088 |
| ECE | 0.0059 | 0.0046 |
| Accuracy | 0.0008 | 0.0040 |
| Squared parameter norm | 1016.0 | 4.7 |
Metrics We report the following quantities. NLL is the mean negative log-likelihood of the Laplace predictive distribution on the test set. ECE is the expected calibration error with 20 equal-width confidence bins Guo et al. [2017]. The quantity is the Laplace marginal likelihood at the selected . The norm is the squared Euclidean norm of the parameter vector supplied to Laplace; for standard EB this is the raw (possibly rescaled) representative, and for -canonicalized EB it is the canonical representative. The statistic is the maximum absolute difference in predicted class probability between any two orbit samples, computed over all pairs, all test inputs, and all classes. The spread factor is .
E.2 CIFAR-10 ConvNet with KFAC-Laplace
Model and training. We use a plain ReLU ConvNet without normalization layers. The channel widths are (64, 128, 256, 256). The network consists of four convolutional blocks followed by global average pooling and a linear classifier. Each convolutional block contains a convolution followed by a ReLU nonlinearity; spatial downsampling is performed by avg pooling. The model is trained on CIFAR-10 using Adam with learning rate and weight decay for 50 epochs. We use a cosine learning-rate schedule.
Laplace approximation. We fit all-layer empirical-Bayes Laplace with KFAC curvature using laplace-torch. The prior precision is optimized by marginal likelihood using method="marglik". Predictions use the Jacobian-linearized predictive distribution with the probit link approximation. For the canonicalized variant, we first apply -canonicalization to the trained MAP solution and then fit the same KFAC-Laplace approximation. We evaluate and select by marginal likelihood within the canonicalized family. In all three seeds, the selected value is .
F Within-orbit vs. between-solution variation
We compare variation between 20 function-preserving rescalings of one trained network (), and 20 independently trained networks with the same architecture and training procedure. We fit standard EB-Laplace to every rescaled or independently trained network. Table 6 shows that the standard deviation of is approximately 22 times larger under rescaling than retraining. For , it is approximately 10 times larger. Predictive metrics also vary under rescaling, although retraining produces larger variation in NLL and accuracy. Variation across training runs can reflect different learned functions. In contrast, variation under function-preserving rescaling arises entirely from the parameter scales supplied to the Laplace fit. These results show that arbitrary scale choices can affect the selected prior precision and evidence more than independent retraining.