                                       Do BNNs Actually Behave Like Bayesian Models?



Theorem 6.1 (Martingale Convergence,

                                        Doob

                                               (1949)). If           updating behavior in the predictive model even if our in-

θ̄N is a martingale, with E θ̄N | Y1:N −1 = θ̄N −1 , then             ference is poorly representing the true parameter posterior.

under certain measurability and identifiability conditions,           However, in our tests below we find BNNs breaking this pro-

θ̄N → Θ almost surely.                                                ductive coherence, such that they do not properly maintain

In other words, when this martingale property holds, rather           information in the data between iterations.

than viewing belief updates solely as refining our knowledge          We use the CIFAR-10 dataset for this experiment, and con-

about Θ, we can interpret them as the resolution of uncer-            sider taking two random subsets of 4080 images each: a

tainty about future observations. Each new data point YN              labeled split (x, y), and an unlabeled split x∗ . We first use

refines our predictive uncertainty, and as we sequentially            the labeled split to train an initial BNN posterior approxima-

impute the unseen Y1:∞ , the remaining uncertainty in Θ               tion π ′ (θ) = π(x,y) (θ). For the unlabeled split x∗ , we use

vanishes and our sequence of posterior means θ̄N converges            the intermediary π ′ -predictive to sample labelings through

to a draw from the prior.                                             θ ∼ π ′ (·) followed by Y ∗ | θ ∼ p(· | θ; x∗ ). We then train

Under this approach, Bayesian inference is nothing more               a new posterior approximation π ′′ (θ) = π(x,y)∪(x∗ ,Y ∗ ) (θ).

than a predictive task, where our goal is to generate different       This label-retrain step is repeated over N trials, allowing us

possible imputations of the unobserved data. Uncertainty              to compute an empirical martingale posterior distribution

is then indexed over these hypothetical completions of the                                               N

                                                                            d (x∗ ,Y ∗ ) π(x,y) (θ) = 1

                                                                               (N )                     X

dataset. Specifically, suppose we have initial belief π(θ),                 MP                              π(x,y)∪(x∗ ,ŷj∗ ) (θ)

                                                                                                      N j=1

a belief updating scheme π(θ) 7→ πy (θ) that incorporates

observed data y into beliefs π, and a parameterized predic-           that averages over the N different predictive imputations of

tive model p(y | θ). Let Y ∗ be a random   sample drawn from          the unknown labels y ∗ . We then compare the BMA from

the marginal predictive p(y ∗ ) = p(y ∗ | θ)π(dθ). Then

                                     R

                                                                      the initial approximate posterior Eθ∼π(x,y) (·) [fθ (xtest )]

we define the martingale posterior distribution (Fong et al.,         and the BMA from the empirical martingale posterior

2023) for this sample as the expected belief update across            Eθ∼MPd (x∗ ,Y ∗ ) π(x,y) (·) [fθ (xtest )]. Propositions 5.1 and 6.1

all possible predictive imputations:

                                                                      imply that under Bayesian inference and N → ∞ these two

                                     Z                                model averages should match.

       MPY ∗ π(θ) = E [πY ∗ (θ)] = πy∗ (θ)p(dy ∗ ).

                                                                      With the goal of analyzing function-space predictive co-

                                                                      herency, we apply this uncertainty diagnostic to MFVI and

It can be estimated with the (consistent) empirical martin-

                                                                      Stochastic Gradient Langevin Dynamics (SGLD) (Welling

gale posterior distribution:

                                                                      & Teh (2011), Section B.5). We treat these algorithms as

                                   N

                                                                      end-to-end belief updating schemes, replicating the setup

                   c Y ∗ π(θ) = 1

                      (N )        X

                   MP                πy∗ (θ)                          and their hyperparameters from Izmailov et al. (2021b).

                                N j=1 j

                                                                      Figure 7 shows the result of our martingale posterior ex-

          i.i.d.

where yj∗ ∼ p(y ∗ ) averaging across N trials.                        periment on CIFAR-10, comparing the performance of the

                                                                      initial posterior distribution π ′ to that of the martingale pos-

As exact Bayesian updates do satisfy the martingale prop-

                                                                      terior. Specifically, we examine Bayesian model average

erty, we can now introduce another key property of Bayesian

                                                                      (BMA) metrics of accuracy, log-likelihood, and expected

inference relating to its predictive belief updating:

                                                                      calibration error as projected summaries of posterior predic-

Proposition 6.1 (Predictive Coherence of Bayesian Infer-              tive performance (see Section A).

ence, based on Fong et al. (2023)). When the belief updating

scheme is exact Bayesian inference, the martingale posterior          Under true Bayesian inference the martingale posterior

recovers the initial beliefs.                                         should recover π ′ , and thus their BMA predictions are ex-

                                                                      pected to match. However, Figure 7 shows that the martin-

Proof. In the case, for example, when prior and likelihood            gale posterior metrics deviate significantly from those of π ′ ,

densities exist and 0 < p(y ∗ ) < ∞ for p-almost every y ∗ ,          with deviations exceeding bootstrapped confidence intervals.

                                 Z                                    This divergence indicates that the posteriors obtained from

 MPY ∗ π(θ) = E[π(θ | Y ∗ )] = π(θ | y ∗ )p(dy ∗ ) =                  MFVI and SGLD fail to fully capture the correct Bayesian

                                                                      belief updating. Notably, the deviation manifests in im-

     π(θ)p(y ∗ | θ)

  Z                                 Z

                    p(dy ∗

                           ) = π(θ)   p(dy ∗ | θ) = π(θ).             proved predictive performance, especially in the case of

         p(y ∗ )                                                      MFVI. This suggests that the martingale posterior approach

                                                                      of generating ensembles by simulating pseudo-data and re-

At least in principle, it is possible for this predictive co-         training may be generally beneficial compared to just using

herence to be satisfied even if our approximate inference             the BMA in BNN setups, if the additional computation cost

scheme is itself inaccurate. Thus one might see “Bayesian”            of doing so can be justified.



                                                                  8

