Amortization gap 2026-11-05
The amortization gap measures how much evidence lower bound is lost by using the distribution returned by amortized inference instead of the best distribution available for that observation in the same variational family. Hold the generative parameters fixed. Write for the evidence lower bound and suppose the optimum is attained. For the shared rule ,The remaining variational approximation gap is , so the total loss isThus a restrictive recognition network or incomplete training can leave an amortization gap even when the variational family can represent the exact posterior distribution.[ref]
Inference Suboptimality in Variational Autoencoders by Chris Cremer and others. Table1, summary of gap terms; introductory definition of the optimal approximation within its family
For an original example, stipulate for equally weighted observations and . The variational family represents both posterior distributions exactly when fitted separately, so . Restrict the shared rule to : it can adjust the intercept but its slope is fixed at one. The Kullback-Leibler divergence between these unit-variance normal distributions is . Averaging the amortization gap over the two observations givesThe best shared intercept still loses nat on average. A current rule with loses one nat: half a nat can be removed by training this rule better, while the remaining half requires changing its fixed-slope restriction. This separates the variational family's expressive power from the shared mapping's capacity and current training state.
In a numerical comparison, a locally improved per-observation distribution need not be the global optimum . Its improvement supplies a lower bound on the true amortization gap; failing to find an improvement does not establish a zero gap. Comparisons must keep both and fixed.
Combined score and pathwise gradient estimator Created 2026-10-25 Updated 2026-11-05
Under fixed-support regularity permitting differentiation under the integral sign, apply the product rule to . The first derivative term is and the second is . This proves the displayed identity. For an evidence lower bound, take , holding noise fixed in the inner derivatives. Parameter-independent continuous noise contributes a reparameterization gradient; untransformed discrete choices contribute a score-function gradient estimator. A mixed base law cannot be called parameter independent if its discrete factors retain variational parameters.[ref]
David Duvenaud 2026-11-05
David Duvenaud coauthored the 2018 study of inference suboptimality with Chris Cremer and Xuechen Li. Their analysis distinguishes distribution-family limitations from a shared inference rule's shortcomings.[ref]
Inference Suboptimality in Variational Autoencoders by Chris Cremer and others. Title-page byline; Table1 and §3.1
An original diagnostic example makes that distinction numerical. Fix the generative model and one observation. Suppose its exact log evidence is , the globally best evidence lower bound within a chosen family is , and a recognition network returns a distribution with bound . The variational approximation gap is nat; the amortization gap is nat. They sum to the total -nat inference deficit.
These stipulated exact values isolate the diagnostic, rather than reproducing experimental measurements. Improving only the shared rule could recover at most nat within that family. Comparing a different generative model would change the target posterior distribution and would no longer isolate the same gap. This is a contribution of the joint paper; its byline does not specify individual responsibility for each derivation.
EM likelihood monotonicity Created 2026-10-05 Updated 2026-10-14
For , the Jensen inequality givesThus any expectation-maximization algorithm M-step that increases cannot decrease the observed-data likelihood function.[ref]
For a short proof, assume common support and finite expressions, and keep the E-step conditional distribution fixed. The concavity of the logarithm and Jensen's inequality giveThis evidence lower bound equals . At , the ratio inside the expectation is the constant , so equality holds. During the M-step, the second term is constant; increasing raises a lower bound that touches the current log-likelihood. HenceIncreasing likelihood values alone do not establish convergence of the statistical parameters or attainment of a global maximum. In a differentiable finite mixture model, the gradient of equals the candidate-parameter gradient of evaluated at the current fit. Thus an interior fixed point of an exact M-step is a stationary point, which need not be a local maximum; the Identical-mean EM trap is an explicit counterexample. Small changes in log-likelihood can also occur before the means have settled, so inspecting both is useful.
Evidence lower bound Created 2026-09-24 Updated 2026-11-05
For likelihood , prior density , evidence , and approximation density , the evidence lower bound isWhenever the terms are well-defined, substituting into the Kullback-Leibler divergence gives . Nonnegativity of the divergence proves the lower bound; equality holds when almost everywhere. Variational inference maximizes this objective over a tractable family, trading an exact posterior for an optimization problem.
Kullback-Leibler divergence Created 2026-09-24 Updated 2026-10-14
The Kullback-Leibler divergence, also called relative entropy, compares two probability distributions in a specified order. In , observations follow and the comparison probability distribution is : the first argument supplies the averaging weights. For probability mass functions on a finite alphabet,Here is a random variable with probability distribution . For probability density functions relative to the same measure , replace the sum by . These formulas use natural logarithms unless stated otherwise. The expected value is under , even though appears in the denominator. [ref]
Take and on two outcomes. Direct calculation givesThe second outcome contributes negatively to the first sum: assigning it more probability than does makes its individual contribution negative. Nevertheless, relative entropy nonnegativity guarantees a nonnegative total. Reversing the arguments changes both the likelihood ratio and the averaging probabilities; taking an absolute value inside the logarithm would define a different quantity.
The units depend on the logarithm: natural logarithms give nats, whereas base-two logarithms give bits. Divide a value in nats by to obtain bits; the forward example is approximately bits. Changing the base rescales every Kullback-Leibler divergence by the same positive factor. Since the two calculated directions differ, Kullback-Leibler divergence is asymmetric and cannot be a metric. It also need not satisfy the triangle inequality. [ref]
https://web.stanford.edu/~kedart/ee376a_winter1617/Lecture_3.pdf. Tse, relative entropy, 2017, Section 3.3
The operational meaning is an expected penalty for using the wrong probability distribution. A prediction incurs log-loss when outcome occurs, the negative of the logarithmic scoring rule. Under , its expected value is the cross-entropy . Predicting with itself incurs information entropy , soThus Kullback-Leibler divergence is exactly excess expected log-loss, whenever these separate quantities are finite. [ref]
https://web.stanford.edu/class/ee276/files/previous_notes/lecture_2.pdf. Weissman, information measures, 2024, property 3
For lossless source coding, ideal codeword lengths similarly give excess expected length in bits per symbol. Actual prefix codes require integer codeword lengths; Shannon's source coding theorem explains how long blocks approach ideal per-symbol lengths. The interpretation concerns an average, not a fractional physical bit attached to every outcome. In our example, ideal coding with costs one bit per symbol, while bits; the difference is exactly the computed bits. [ref]
https://web.stanford.edu/~kedart/ee376a_winter1617/Lecture_3.pdf. Tse, information theory, 2017, Section 3.4
Zeros require explicit conventions. An outcome with contributes zero, including when ; the convention agrees with the relevant limit. If but , the Kullback-Leibler divergence is infinite: the predictor has declared impossible an outcome that can occur. On a finite alphabet, the probability support of must therefore be contained in the probability support of for a finite answer. For example, and give , but . For general probability measures, failure of absolute continuity of measures likewise gives infinity. Even does not guarantee a finite integral. [ref]
https://arxiv.org/pdf/1206.2459. van Erven and Harremoës, Rényi Divergence and Kullback-Leibler Divergence, 2014, Section II
To see how confidently wrong predictions are punished, hold the true Bernoulli distribution parameter at and vary the predicted parameter . Its binary relative entropy isIt vanishes at , equals approximately nats at , and equals nats at . Both endpoints give infinity because both outcomes remain possible under . Predicting almost no successes is especially costly because successes actually occur three quarters of the time. The reversed binary relative entropy stays finite at the endpoints: its averaging probability distribution concentrates on just one outcome, and assigns positive probability to both.
For model selection, minimizing expected log-loss ranks candidate statistical models by , since is common to them. The true probability distribution is usually unknown, so one estimates predictive performance using fresh observations or cross-validation. Fitting and assessing on the same data can reward overfitting; a small fitted Kullback-Leibler divergence alone does not establish useful prediction.
In variational inference, a tractable trial probability distribution commonly minimizes against a target posterior distribution . Maximizing the evidence lower bound accomplishes this without evaluating the target's normalization constant. The averaging now follows : placing trial probability where the posterior distribution assigns almost none is strongly penalized. The chosen direction and trial family therefore matter. [ref]
https://www.cs.columbia.edu/~blei/papers/BleiKucukelbirMcAuliffe2017.pdf. Blei, Kucukelbir and McAuliffe, Variational Inference: A Review for Statisticians, 2017, Section 2.2
These comparisons do not by themselves establish causal inference. Two statistical models can reproduce the same observed probability distribution while predicting different responses to an intervention. Choosing the smaller Kullback-Leibler divergence therefore needs additional assumptions or experimental evidence before supporting a causal claim. [ref]
https://ftp.cs.ucla.edu/pub/stat_ser/r350.pdf. Pearl, Causal inference in statistics: An overview, 2009, Section 2
The original reference is S. Kullback and R. A. Leibler's 1951 paper [ref]
https://doi.org/10.1214/aoms/1177729694. On Information and Sufficiency
, published in The Annals of Mathematical Statistics 22(1), pages 79–86. Its title connects this comparison with sufficient statistics: the historical setting was statistical information, before today's widespread applications in prediction and variational inference. Max Welling 2026-11-05
Max Welling coauthored Auto-Encoding Variational Bayes by Diederik P. Kingma and Max Welling with Durk Kingma. Their work combines a learned approximate posterior with a differentiable transformation of parameter-independent noise, permitting variational inference to use a reparameterization gradient. The original preprint was submitted in December 2013; its historical byline uses Diederik P. Kingma.[ref]
Auto-Encoding Variational Bayes by Diederik P. Kingma and Max Welling. Primary byline, §§2.3–2.4 and §3
An original scalar calculation illustrates the computational mechanism. Let , where has a standard normal distribution and . For the chosen objective ,Holding one noise draw fixed while differentiating its squared transformed value instead gives the stochastic estimates and . At chosen , and , these are both , while the exact expectation gradients are and . Averaging over the noise, rather than treating one draw as the expectation, recovers the exact gradients in this example.
This small calculation isolates the differentiable sampling step. A variational autoencoder also specifies a probabilistic model and an evidence lower bound; a differentiable random transformation alone does not supply those components. The contribution is joint work, not a claim that one coauthor alone originated every part of the method.
The printed minimization of the evidence lower bound has no solution. To distinguish that literal result from the usual variational inference optimum, put . The preceding Kullback-Leibler divergence satisfiesIts unique global minimum occurs at . Since , this is the unique global maximum of the evidence lower bound:The optimal common variance is the harmonic mean of the two posterior variances. However, as either or . ThereforeThe source PDF confirms the minimization wording; replacing it by maximization would give the finite value above, consistently with part (i).
Use the factorization inside the evidence lower bound:HenceThe marginal likelihood is independent of the variational parameter , so maximizing the evidence lower bound is equivalent to minimizing the Kullback-Leibler divergence. Nonnegativity of the Kullback-Leibler divergence also gives .
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 216 4 a Solution Created 2026-10-03 Updated 2026-10-06
Write . Mean-field variational inference minimizes the reverse Kullback-Leibler divergenceEach is a probability density function; without further parametric restrictions, the optimization is over all such product probability distributions. Equivalently it maximizes the evidence lower bound for any unnormalized posterior density . Its difference from is exactly the Kullback-Leibler divergence.
Fix and writeAssume and that the displayed expected values and objective decomposition are well defined. The optimal factor isIndeed, the part of the objective depending on isThe remaining term is fixed. Gibbs inequality gives nonnegativity of the Kullback-Leibler divergence, with equality precisely at almost everywhere. This proves global optimality of that coordinate update; it does not assert global optimality of a sequence of coordinate updates for the full nonconvex product-family problem.
The printed upper index in the list of remaining coordinates is inconsistent with the dimension ; the natural interpretation is . Also, if the exponential expression has zero or infinite normalizing constant, or the expected values are undefined, the usual coordinate formula needs additional support or integrability hypotheses. A restricted parametric factor family need not contain this unrestricted optimal factor.
Past exam of the mathematics course of the University of Cambridge 2026 iii Paper 219 4 b i Solution Created 2026-09-24 Updated 2026-09-25
For any approximating density ,The evidence lower bound is thereforeSince does not depend on , maximizing the ELBO is equivalent to minimizing the divergence from to the posterior.
Variational inference replaces exact Bayesian inference by an optimization problem over a tractable family . A guide program samples from this approximating family. Optimizing an evidence lower bound is equivalent to minimizing . Its appeal is that a fitted approximation can be cheap to sample and may scale well when an exact posterior distribution is inaccessible. A restricted family, such as mean-field variational inference, can miss dependence or entire modes; a local optimum can add further error. More optimization cannot remove approximation error caused by an inadequate family.
Monte Carlo method inference instead estimates posterior expectations using simulated values or weighted values. Examples include rejection sampling, importance sampling and Markov chain Monte Carlo. Under their respective support and convergence assumptions, increasing computation can yield consistent estimates without choosing a finite-dimensional posterior family. Their uncertainty includes simulation error; an inefficient proposal or slow mixing time can make that error large. Markov chain Monte Carlo additionally requires convergence and dependence diagnostics.
The central trade-off is optimization within an approximate family versus simulation under a target probability distribution. It is not an absolute distinction between deterministic and random computation: variational inference often uses Monte Carlo method estimates of its gradient, while Monte Carlo method inference may use fitted proposals. Neither method automatically guarantees accurate uncertainty estimates or superiority at a fixed computational budget.
Let , take supported where , and assume the following expectations exist. By the definition of Kullback-Leibler divergence and Bayes' theorem,Therefore the evidence lower bound isNonnegativity of Kullback-Leibler divergence proves . The marginal likelihood is constant with respect to the variational parameter , so maximizing minimizes the stated Kullback-Leibler divergence.
The practical advantage is that evaluating logarithms of joint probabilities and requires no evaluation of the usually intractable marginal likelihood. One can estimate and its gradient with Monte Carlo method. Equality with the log marginal likelihood occurs only when almost everywhere. Merely maximizing the evidence lower bound over a restricted family neither computes the exact posterior distribution nor proves that the maximum attains this equality.
Relative entropy and coordinate dependence 2026-10-14
Apply the same invertible differentiable transformation to two probability distributions with densities and . Both transformed densities acquire the same Jacobian determinant factor. Write their transformed densities as and . Their ratio is unchanged, and the integration measure transforms with the numerator density. Consequently their relative entropy is unchanged:The densities describe two alternative laws in the same coordinate, with a nonzero Jacobian determinant on their common domain, and the expression is assumed well defined. This explains why comparing two laws can survive a change of measurement units even though either law's differential entropy changes. Mutual information, formulated as relative entropy from a product of marginals, has the same invariance under invertible changes to either observed coordinate.
Differential entropy is also the entropy term in the evidence lower bound for continuous variational inference. Its coordinate dependence must be combined consistently with that of the model density; changing units does not justify changing only one term of the objective.
Variational approximation gap 2026-11-05
The variational approximation gap is the part of the evidence lower bound deficit that remains even after optimizing separately for an observation within a specified variational family. With the generative model fixed and finite , defineThe equality uses the usual evidence lower bound identity for variational inference. A supremum allows for a best value that is not attained. The amortization gap separately measures failure of the shared inference rule to reach this value.[ref]
Inference Suboptimality in Variational Autoencoders by Chris Cremer and others. Table1; §3.1, equation8, decomposition for the ordinary variational-autoencoder bound
An original example shows what independence can cost. Stipulate a centred two-dimensional multivariate normal distribution as the posterior distribution, with covariance matrixRestrict the variational family to centred independent normal distributions, with . This is a simple mean-field variational inference restriction. Writing , the Kullback-Leibler divergence between normal distributions becomesEach variance contributes a term , minimized at . ConsequentlyFor , the best independent variances are both , and the unavoidable deficit is about nat. Matching both marginal variances to one instead would give about nat. The reverse Kullback-Leibler divergence therefore chooses narrower independent marginals here, while still failing to represent the correlation.
Enlarging the family to include the full covariance matrix permits and reduces this example's gap to zero. More generally, inclusion cannot increase the optimum approximation gap at a fixed model. Merely training the same shared rule longer cannot remove a strictly positive family restriction. Numerical improvements are not proofs that the infimum has been reached.
Variational autoencoder 2026-11-05
A variational autoencoder is a generative model with a latent variable and a learned approximation to its posterior distribution given an observation . Write the model as . A recognition network, implemented as a neural network, produces the parameters of ; a generative decoder specifies . Using one recognition rule across observations is amortized inference, rather than solving a fresh independent optimization problem for every input.[ref]
Auto-Encoding Variational Bayes by Diederik P. Kingma and Max Welling. §2.1–2.3, generative and recognition models; Introduction, neural-network recognition model
Training maximizes an evidence lower bound, often writtenThe first term scores reconstruction under the declared likelihood; the second compares the inferred latent law with the prior. The identityproves that it is a lower bound, since Kullback-Leibler divergence is nonnegative. It becomes tight when the recognition law equals the model posterior, under the usual density/support conditions.[ref]
For a one-dimensional Gaussian example, let the prior be and the recognition law be . Substituting their log densities and using givesAt , , this is . The value is a penalty for this particular latent law, not the whole training loss. Gaussian reparameterization writes with fixed-law standard-normal noise so that gradients can pass through the sampled latent value. After training, generation instead draws from the prior and then the generative decoder; it need not start from an observed input.
Xuechen Li 2026-11-05
Xuechen Li coauthored Inference Suboptimality in Variational Autoencoders by Chris Cremer and others with Chris Cremer and David Duvenaud. Their numerical method refits variational parameters per observation and uses the Monte Carlo method with 100 samples to estimate the evidence lower bound during that optimization.[ref]
Inference Suboptimality in Variational Autoencoders by Chris Cremer and others. Title-page byline; §3.4, local optimization of the approximate distribution
An original sampling calculation explains why sample count matters. Suppose independent contributions to a bound estimate have standard deviation two nats. A sample mean from such contributions has standard error nats: at and at . Quadrupling the sample count halves this sampling error under the independence assumption. These are assumed variances, not measured performance figures from the paper.
Reducing this error helps compare trial distributions, but neither a stable noisy bound nor a numerical stopping rule certifies the globally best member of the family. The mathematical variational approximation gap and amortization gap use that optimum; a measured local improvement can underestimate the latter. This distinction connects the joint experimental method to uncertainty in the numerical diagnostic.

