We will now analyse the special case when the true distribution is regular for the statistical model. This covers the classical Bayesian statistics. We analyse the regular posterior distribution, and observe the universal structure that is the asymptotic behavior of this distribution. The theorem is akin to central limit theorem, called the Bayesian central limit theorem / Bernstein–von Mises theorem. We also look at the expansions of the observables in this special case. We finally introduce point estimators, and with this, we cover the conventional asymptotic theory and the basic Bayesian treatment.
This part is more intensive than the previous parts, we are reaching the deep parts of the subject slowly. It is recommended to read the writeup on primer probability and Laplace method before moving ahead.
Observe below that we have already forgone realizability, a major assumption that need not hold in the singular models of our interest (such as the neural networks we use in practice).
Our first goal is to estimate the partition function, which is a Laplace integral. We will first start with a simpler example, and we will build and motivate our solution from this method. Once the method is understood, it is all about the control.
Theorem: Let h∈C3[α,β] have a unique minimum w0 in the interior. Let H=h′′(w0)>0. Let φ∈C1, φ(w0)>0. Then
Now we do a Taylor expansion of the exponent of the exponential, as Laplace method dictates. Recall that according to the method, we must split the integral into two parts. The first part will be over the set where most of the mass is concentrated (it is clear that this is some neighborhood of w0) and we must show that the second integral is negligible compared to the first one, typically by looking at the fraction. The control is in choosing the right neighborhood. Also recall that we estimate the neighborhood integral by sandwiching. Let us do this now.
This is the Taylor expansion with the Lagrange remainder. Δ=w−w0, and c∈[α,β], which is the parameter space for this case.
The idea is here that we really want to be integrating only the first two terms, as we can handle that. So we want the third one to be negligible. Thus we want to naturally choose a neighborhood around w0 of radius δn (dependent on n because we want to zero in on where the mass of the function is as n increases, so we must decrease the neighborhood accordingly), A={w:0≤∣∣w−w0∣∣<δn}, and in this set, ∣∣Δ∣∣≤δn, hence we get the first control that we want: nδn3→0.
Let us estimate the integral on this set. First of all, observe that the third Taylor term, which we now call Rn(w), satisfies ∣Rn(w)∣≤Mδn3 (Observe that A is compact and the third derivative of h is continuous) On this note, we call the first term and the second term A1 and A2 respectively.
Let us calculate the integral and be over with it. Actually, to compute the integral, we would actually have to complete the square and then use the Gaussian integral formula, but we are in good luck since A1=0, since w0 is the minimum. But still keep the method in mind, it will come in useful later.
Thus, we can do a simple change of variable to get
The idea is that even though we know that the second order term is positive (assumption), the third order term can be negative, and hence it is not straightforward to lower bound this. However, if we can upper bound the norm of the third order term, we can do this. The idea is that it is less than any given factor of the second order term (say half).
Claim: For all w with ∣Δ∣=∣w−w0∣≤η, for a suitable η>0 chosen below,
where the last inequality needs 6Mη≤4H. This gives our reverse engineering choice of η=2M3H, in which case the claim is true. Hence on B1, h(w)−h(w0)≥21HΔ2−41HΔ2=41HΔ2≥41Hδn2.
What happens on B2 with this choice of η?
Observe that B2 is a compact set, hence since h(w) is a continuous function and w0 is the unique minimum, for all w∈B2, h(w)−h(w0)≥mη>0 where the minimum is achieved. Note that mη depends only on η, not on n, while 41h′′(w0)δn2→0. Hence for a large enough n, mη≥41h′′(w0)δn2, and we have
This condition does not contradict the previous conditions. In fact, from all the conditions, and letting δn=n−a (power scaling, natural), we get a∈(31,21). I will keep the choice a=52. This allows all the control conditions to work, and the same control is used in the multidimensional case as well. It is important to note it now, as I will simply use this control right from the start and it will all magically work out, but the point is that the interval is forced and all the choices there will work, and it is not really magical.
We will now estimate the asymptotics of the normalized partition function. We will be considering the regular case with compact parameter space W in a Euclidean space Rd.
The issue is that we cannot directly Taylor expand this. h(w)−h(w0)≥0, but it need not be true Kn(w)−Kn(w0)≥0. Hence, something else needs to be done. We need to decompose our function into a distance-like function and a fluctuation around that and hope it behaves nicely. But why should we expect that? The fluctuation can have a very weird distribution after all. The central limit theorem comes to the rescue in controlling that, it says that the fluctuation is bounded in large samples. This is the universality principle to the rescue, which says that you should expect the fluctuation of f(X1,...,Xn) to be bounded if the variables are weakly dependent and f sufficiently smooth.
This centres the expectation (it is now 0) and by the multidimensional central limit theorem, this converges in distribution to the Gaussian distribution, hence it is Op(1),
We divide our partition function into an integral around a neighborhood (we call that the essential part) and the complement of that (called the non essential part). We will see that decomposition into this process works in trying to estimate the essential part, and in figuring out the non essential part, we will need to modify it more. There, we will perform a simple instance of Hironaka Resolution Theorem. It is important to grasp that idea and why it comes in the first place. We will see what that is about when we get there.
We will Taylor expand both terms with Lagrange remainder. I am going to remove terms directly which are 0, you can check that. Call the Hessian of K at w0 as J.
Since an→0, {Xn}=Op(1), we have {anXn}=op(1).
Hence A4 is op(1), and similarly, A5 is similar: in A5 the point c is random and depends on w, so the pointwise central limit theorem is not enough. We assume the uniform bound supw∈W∥∇3ξn(w)∥=Op(1). Then ∣A5∣≤M5nδn3supw∈W∥∇3ξn(w)∥=op(1), since nδn3→0.
We will sandwich and estimate the same way we did for the one dimensional Laplace integral. Assume all sufficient smoothness for the bounds. Let ∣Rn∣≤ρn where ρn→0 in probability. Then we have
The idea is to complete the square, write the sum of quadratic + linear as a quadratic + constant. And we know how to handle the quadratic for the exponential, and the constant gets handled trivially.
where u=n(w−w0) and ζn=−J−1/2bn and bn=∇ξn(w0).
We first do the change of coordinates from w to w−w0 which does not change the integral as it is just a translation, then from w−w0 to n(w−w0) which gives the factor (n1)d (this is just the determinant of the transition from the latter to the former).
Now the final transition from u to v=J1/2u−ζn gives the factor det(J)−1/2
where Dn is some ellipsoid. But this is contained in a ball centred around −ζn, and it also contains a ball around −ζn, and both of them tend to the entire Rd as n→∞, in probability. Thus we can adjust the lower bound and the upper bound to have the same integral over Rd instead, which is just (2π)d. Taking n→∞, we get that the lower bound and the upper bound are the same, and the integral in between is
Now we need to lower bound nKn(w). Well, we can bound nK(w), but how do we go about nξn(w)? We cannot actually do this, since this fluctuation is Op(n). We will need to do some sort of normalization here.
Let us first deal with nK(w) though. We will do it the same way we did the one-dimensional case. The only thing that changes is that this is multidimensional, so the min of the second order term is 21λmin(J)δn2, so we get the lower bound this time as nK(w)≥41λminnδn2. Feel free to do the argument again formally here as an exercise.
Let us deal with the fluctuation. As discovered, we will need to normalize this, where the normalization factor has to be of order n with respect to K(w).
When we move to the more general case, we will keep this assumption, and I am not sure why we should assume this to be true. But it will still be a great improvement from assuming regularity.
There are two issues with the definition above though:
In a more general model, W0 is not one point, it is a real analytic set. Hence f(x,w) cannot be treated locally. More precisely, what this means is that the Taylor expansion we have been doing does not work directly, since now the Hessian is degenerate (not positive definite) (this is a heuristic argument). So this definition of the process does not really work anymore. Keep this in mind, we will deal with this formally later.
The second is the fact that the process is not defined at W0 as the denominator is 0. It may not even be possible to continuously extend our process to W0.
The second issue holds even for our regular model. What is the “resolution” here? The solution is to perform a diffeomorphism of the space, and then extend the function to w0 there. This is the main idea one should keep in mind. We describe the solution formally now.
Define a diffeomorphism from Rd\0 to (0,∞)×Sd−1 that takes w−w0→rθ where r=∣∣w−w0∣∣ and θ=∣∣w−w0∣∣w−w0.
The numerator becomes rbn⋅θ+O(r2) and K=rθtJθ/2(1+O(r)). One can check that the limit now exists.
This is the simplest instance of the Resolution, and the more general case is handled by Hironaka’s Resolution Theorem, which deals with both the issues mentioned above.
By using the inequality ∣ab∣≤2a2+b2, we get (take a=nK,b=γn)
where Γn2=supw∈W∣∣γn(w)∣∣2. Observe that even if Xn=Op(1), supXn need not be Op(1). Hence, this is an added assumption that Γn=Op(1). Also, the existence of Γn comes from the fact that γn(w) is a continuous function (we have extended it continuously) on a compact space.
This finally enables us to sandwich the non essential part of the partition function.
Using the lower bound nKn(w)≥21nK(w)−21Γn2, together with nK(w)≥41λminnδn2 on B, we get
Since Γn=Op(1), the factor eΓn2/2 is Op(1), and it does not affect the conclusions below.
This directly gives the following two results, the second one being what we need to show:
The sine regression model y=w1+sin(w2x)+N(0,1): the true model w0=(0.3,1.2) (teal), two other candidate models (purple), and a sample of 60 points (orange).
Free energy computed by numerical integration (solid) against the prediction 2dlogn+C−21∥ζn∥2 from the expansion above (dotted), for three growing samples. The lower panel shows the gap between the two, which goes to 0. (“Theorem 4” in the plot title refers to the free energy expansion above.)
Do note one thing: We cannot make a statement about the expectations yet, we need to show uniform integrability for that (recall from the probability primer: convergence in distribution/probability + uniform integrability implies convergence in expectation)
From now on, g is a function of the normalized coordinate v=J1/2n(w−w0)−ζn, so g(v) means g evaluated at v(w). Let us now estimate Zn(1)(g). Not a lot changes from the way we estimated Zn(1)(1). Do the same completing the square and change of variables to get some cn which has the Jacobian factors and the ζn term. But this time, we cannot directly take out the remainder term and the φ term, since g can also be negative.
Let G(v)=exp(−2∣∣v∣∣2). Our idea is that we hope for the leftover to be close to φ(w0)∫Rdg(v)G(v)dv, so we look at the difference as the error term and show that it goes to 0. We decompose the error terms into three parts:
Whenever gG is integrable (special case: g is a polynomial), it is easy to see that each of these terms are bounded by terms that go to 0 in probability.
When g is a continuous bounded function, Zn(2)(g)≤sup∣g∣Zn(2)(1) hence this is negligible, and we have the estimate we want. The other special case is for g polynomial, when the result still holds, since nkZn(2)→0 for every k.
Now note that this claim is true about every bounded continuous function g. This is just the definition of convergence in distribution though!
Hence the posterior law of v converges to N(0,Id) in probability (probability based on the sample, that is what the posterior depends on).
The exact posterior in the coordinates v=J1/2n(w−w0)−ζn (surface) against the Bernstein–von Mises prediction N(0,I2) (mesh), at n=15,50,1000. For small n the posterior still puts mass on other modes; by n=1000 it matches the standard bell.
Total-variation distance between the exact posterior and the Gaussian N(w0+J−1/2ζn/n,J−1/n), for three datasets. It shrinks roughly like n−1/2.
For a single fixed x the error coming from Ew[Δ] in the first term is only op(1/n). It becomes op(1/n) once we average over x, because EX[∇f(X,w0)]=∇K(w0)=0 and n1∑i=1n∇f(Xi,w0)=Op(1/n). Only these enter the losses.
The distribution of ζn. By the central limit theorem, bn=n1∑i=1n∇f(Xi,w0) converges in distribution to N(0,I) (the mean is 0 because ∇K(w0)=0). Hence ζn=−J−1/2bn converges in distribution to N(0,J−1/2IJ−1/2), and E∥ζn∥2→tr(IJ−1). In the realizable case I=J, so ∥ζn∥2 is asymptotically χd2.
Observe that we cannot just take expectations of these random variables to get the asymptotic behavior of the expectations. However, we can do if they also happen to be uniformly integrable (see the probability primer). But since that proof is neither very instructive nor repeated, we are just going to assume that. Hence, E[Ln(w0)]=L(w0):
Hence, cross-validation (and WAIC) is an asymptotically unbiased estimator of the generalization loss, while the training loss underestimates it by tr(IJ−1)/n on average.
Let us check if the theory actually works. We are dealing with the sine regression problem here. The figures are generated by Opus 5.5.
Realizable case (true noise σ=1, so tr(IJ−1)=d=2). Solid: computed exactly. Dotted: the predicted expansions above (“Theorem 6” in the legend), on the same sample. Each loss locks onto its prediction as n grows. Note that on each dataset generalization and cross-validation move in opposite directions: they carry +∥ζn∥2 and −∥ζn∥2 respectively.
We now check the non realizable case. The best parameter is still w0=(0.3,1.2), but now I=σ2J, so tr(IJ−1)=4.5=d.
Misspecified case (true noise σ=1.5, tr(IJ−1)=4.5). The predictions still hold. The training loss is now biased by tr(IJ−1)/n rather than d/n, so a fixed correction of d (as in AIC) would be wrong, while cross-validation and WAIC pick up the right amount from the data.
There are other statistical estimation methods when the true distribution is regular for the statistical model, that are not entirely Bayesian in nature.
wMLwMAPwPM=w∈Wargmaxi=1∏np(xi∣w)=w∈Wargmaxφ(w)i=1∏np(xi∣w)=Ew[w]Maximum LikelihoodMaximum A PosterioriPosterior Mean Estimator