ArticleslgStudy

mathematics

Laplace's approximation

Laplace's approximation is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Laplace's approximation rather than just read about it. In short: Laplace's approximation or the quadratic approximation (QUAP) provides an analytical expression for a posterior probability distribution by fitting a Gaussian distribution with a mean equal to the MAP solution and precision equal to the observed Fisher information. The approximation is justified by the Bernstein–von Mises theorem, which states that, under regularity conditions, the error of the approximation tends t…

Laplace's approximation — main illustration
Laplace's approximation — illustration

Key takeaways

  • Laplace's approximation belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Laplace's approximation to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Laplace's approximation from memory before moving on to harder problems.

Reference excerpt

Laplace's approximation or the quadratic approximation (QUAP) provides an analytical expression for a posterior probability distribution by fitting a Gaussian distribution with a mean equal to the MAP solution and precision equal to the observed Fisher information. The approximation is justified by the Bernstein–von Mises theorem, which states that, under regularity conditions, the error of the approximation tends to 0 as the number of data points tends to infinity. For example, consider a regression or classification model with data set {xn,yn}n=1,…,N comprising inputs x and outputs y with (unknown) parameter vector θ of length D. The likelihood is denoted p(𝐲|𝐱,θ) and the parameter prior p(θ). Suppose one wants to approximate the joint density of outputs and parameters p(𝐲,θ|𝐱). Bayes' formula reads:

p(𝐲,θ|𝐱)=p(𝐲|𝐱,θ)p(θ|𝐱)=p(𝐲|𝐱)p(θ|𝐲,𝐱)≃q~(θ)=Zq(θ). The joint is equal to the product of the likelihood and the prior and by Bayes' rule, equal to the product of the marginal likelihood p(𝐲|𝐱) and posterior p(θ|𝐲,𝐱). Seen as a function of θ the joint is an un-normalised density. In Laplace's approximation, we approximate the joint by an un-normalised Gaussian q~(θ)=Zq(θ), where we use q to denote approximate density, q~ for un-normalised density and Z the normalisation constant of q~ (independent of θ). Since the marginal likelihood p(𝐲|𝐱) doesn't depend on the parameter θ and the posterior p(θ|𝐲,𝐱) normalises over θ we can immediately identify them with Z and q(θ) of our approximation, respectively. Laplace's approximation is

p(𝐲,θ|𝐱)≃p(𝐲,θ̂|𝐱)exp⁡(−12(θ−θ̂)⊤S−1(θ−θ̂))=q~(θ), where we have defined

θ̂=argmaxθlog⁡p(𝐲,θ|𝐱),S−1=−∇θ∇θlog⁡p(𝐲,θ|𝐱)|θ=θ̂, where θ̂ is the location of a mode of the joint target density, also known as the maximum a posteriori or MAP point and S−1 is the D×D positive definite matrix of second derivatives of the negative log joint target density at the mode θ=θ̂. Thus, the Gaussian approximation matches the value and the log-curvature of the un-normalised target density at the mode. The value of θ̂ is usually found using a gradient based method. In summary, we have

q(θ)=𝒩(θ|μ=θ̂,Σ=S),log⁡Z=log⁡p(𝐲,θ̂|𝐱)+12log⁡|S|+D2log⁡(2π), for the approximate posterior over θ and the approximate log marginal likelihood respectively. The main weaknesses of Laplace's approximation are that it is symmetric around the mode and that it is very local: the entire approximation is derived from properties at a single point of the target density. Laplace's method is widely used and was pioneered in the context of neural networks by David MacKay, and for Gaussian processes by Williams and Barber.

Integrated nested Laplace approximation Integrated nested Laplace approximation (INLA) is a method for approximate Bayesian inference based on Laplace's approximation. It is designed for a class of models called latent Gaussian models (LGMs), for which it can be a fast and accurate alternative for Markov chain Monte Carlo methods to compute posterior marginal distributions. Due to its relative speed even with large data sets for certain problems and models, INLA has been a popular inference method in applied statistics, in particular spatial statistics, ecology, seismology, and epidemiology. It is also possible to combine INLA with a finite element method solution of a stochastic partial differential equation to study e.g. spatial point processes and species distribution models. The INLA method is implemented in the R-INLA R package.

Latent Gaussian models Let 𝒚=(y1,…,yn) denote the response variable (that is, the observations) which belongs to an exponential family, with the mean μi (of yi) being linked to a linear predictor ηi via an appropriate link function. The linear predictor can take the form of a (Bayesian) additive model. All latent effects (the linear predictor, the intercept, coefficients of possible covariates, and so on) are collectively denoted by the vector 𝒙. The hyperparameters of the model are denoted by 𝜽. As per Bayesian statistics, 𝒙 and 𝜽 are random variables with prior distributions. The observations are assumed to be conditionally independent given 𝒙 and 𝜽: π(𝒚|𝒙,𝜽)=∏i∈ℐπ(yi|ηi,𝜽), where ℐ is the set of indices for observed elements of 𝒚 (some elements may be unobserved, and for these INLA computes a posterior predictive distribution). Note that the linear predictor 𝜼 is part of 𝒙. For the model to be a latent Gaussian model, it is assumed that 𝒙|𝜽 is a Gaussian Markov Random Field (GMRF) (that is, a multivariate Gaussian with additional conditional independence properties) with probability density π(𝒙|𝜽)∝|𝑸𝜽|1/2exp⁡(−12𝒙T𝑸𝜽𝒙), where 𝑸𝜽 is a 𝜽-dependent sparse precision matrix and |𝑸𝜽| is its determinant. The precision matrix is sparse due to the GMRF assumption. The prior distribution π(𝜽) for the hyperparameters need not be Gaussian. However, the number of hyperparameters, m=dim(𝜽), is assumed to be small (say, less than 15).

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Laplace's approximation

Start with the simplest possible case. Write down what Laplace's approximation claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Laplace's approximation before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Laplace's approximation ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Laplace's approximation

In research
Laplace's approximation appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Laplace's approximation in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Laplace's approximation is common in secondary-school and first-year university syllabi. It links to neighbouring topics Bayesian inference, Statistical approximations, so understanding it makes those chapters shorter.
In everyday life
Look for Laplace's approximation outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Laplace's approximation” →

How to study Laplace's approximation in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Laplace's approximation means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Laplace's approximation out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Laplace's approximation in simple terms?

Laplace's approximation or the quadratic approximation (QUAP) provides an analytical expression for a posterior probability distribution by fitting a Gaussian distribution with a mean equal to the MAP solution and precision equal to the observed Fisher information. The approximation is justified by…

Why does Laplace's approximation matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Laplace's approximation?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Laplace's approximation.

Tags

  • Bayesian inference
  • Statistical approximations

Keep exploring