Bayesian quadrature is a method for approximating intractable integration problems. It falls within the class of probabilistic numerical methods. Bayesian quadrature views numerical integration as a Bayesian inference task, where function evaluations are used to estimate the integral of that function. For this reason, it is sometimes also referred to as "Bayesian probabilistic numerical integration" or "Bayesian numerical integration". The name "Bayesian cubature" is also sometimes used when the integrand is multi-dimensional. A potential advantage of this approach is that it provides probabilistic uncertainty quantification for the value of the integral.
Bayesian quadrature
Numerical integration Let f:𝒳→ℝ be a function defined on a domain 𝒳 (where typically 𝒳⊆ℝd). In numerical integration, function evaluations f(x1),…,f(xn) at distinct locations x1,…,xn in 𝒳 are used to estimate the integral of f against a measure ν: i.e. ν[f]:=∫𝒳f(x)ν(dx). Given weights w1,…,wn∈ℝ, a quadrature rule is an estimator of ν[f] of the form ν̂[f]:=∑i=1nwif(xi). Bayesian quadrature consists of specifying a prior distribution over f, conditioning this prior on f(x1),…,f(xn) to obtain a posterior distribution f, then computing the implied posterior distribution on ν[f]. The name "quadrature" comes from the fact that the posterior mean on ν[f] sometimes takes the form of a quadrature rule whose weights are determined by the choice of prior.
Bayesian quadrature with Gaussian processes The most common choice of prior distribution for f is a Gaussian process as this permits conjugate inference to obtain a closed-form posterior distribution on ν[f]. Suppose we have a Gaussian process with prior mean function m:𝒳→ℝ and covariance function (or kernel function) k:𝒳×𝒳→ℝ. Then, the posterior distribution on f is a Gaussian process with mean mn:𝒳→ℝ and kernel kn:𝒳×𝒳→ℝ given by: mn(x)=m(x)+k(x,X)k(X,X)−1f(X)andkn(x,y)=k(x,y)−k(x,X)k(X,X)−1k(X,y). where (k(X,X))ij=k(xi,xj), (f(X))i=f(xi), (k(⋅,X))i=k(⋅,xi) and (k(X,⋅))i=k(xi,⋅). Furthermore, the posterior distribution on ν[f] is a univariate Gaussian distribution with mean 𝔼[ν[f]] and variance 𝕍[ν[f]] given by 𝔼[ν[f]]=ν[m]+ν[k(⋅,X)]k(X,X)−1f(X)and𝕍[ν[f]]=νν[k]−ν[k(⋅,X)]k(X,X)−1ν[k(X,⋅)]. The function ν[k(⋅,x)]=∫𝒳k(y,x)ν(dy) is the kernel mean embedding of k and νν[k]=∫𝒳k(x,y)ν(dx)ν(dy) denotes the integral of k with respect to both inputs. In particular, note that the posterior mean is a quadrature rule with weights wi=(ν[k(⋅,X)]k(X,X)−1)i. and the posterior variance provides a quantification of the user's uncertainty over the value of ν[f]. In more challenging integration problems, where the prior distribution cannot be relied upon as a meaningful representation of epistemic uncertainty, it is necessary to use the data f(x1),…,f(xn) to set the kernel hyperparameters using, for example, maximum likelihood estimation. The estimation of kernel hyperparameters introduces adaptivity into Bayesian quadrature.
Example
Consider estimation of the integral ν[f]=∫01f(x)dx≈1.79 of the function f(x)=(1+x2)sin(5πx)+85 using a Bayesian quadrature rule based on a zero-mean Gaussian process prior with the Matérn covariance function of smoothness 3/2 and correlation length ρ=1/5. This covariance function is k(x,y)=(1+3|x−y|/ρ)exp(−3|x−y|/ρ). It is straightforward (though tedious) to compute that ν[k(⋅,x)]=∫01k(y,x)dy=4ρ3−13exp(3(x−1)ρ)(3+23ρ−3x)−13exp(−3xρ)(3x+23ρ) νν[k]=∫01∫01k(x,y)dxdy=2ρ3[23−3ρ+exp(−3ρ)(3+3ρ)]. Convergence of the Bayesian quadrature point estimate 𝔼[ν[f]] and concentration of the posterior mass, as quantified by 𝕍[ν[f]], around the true integral ν[f] as f is evaluated at more and more points is displayed in the accompanying animation.
Advantages and disadvantages Since Bayesian quadrature is an example of probabilistic numerics, it inherits certain advantages compared with traditional numerical integration methods:
It allows uncertainty to be quantified and propagated through all subsequent computations to explicitly model the impact of numerical error. It provides a principled way to incorporate prior knowledge by using a judicious choice of prior distributions for f, which may be more sophisticated compared to the standard Gaussian process just described. It permits more efficient use of information, e.g. jointly inferring multiple related quantities of interest or using active learning to reduce the required number of points. Despite these merits, Bayesian quadrature methods possess the following limitations:
Although the Bayesian paradigm allows a principled treatment of the quantification of uncertainty, posterior inference over ν[f] is not always tractable, thus requiring a second-level estimation. E.g. for Bayesian quadrature with Gaussian processes, the kernel mean embedding ν[k(⋅,x)] has no closed-form expression for a general kernel k and measure ν. The computational cost of Bayesian quadrature methods based on Gaussian processes is in general 𝒪(n3) due to the cost of inverting n×n matrices, which may defy their applications to large-scale problems.
Algorithmic design
Prior distributions The most commonly used prior for f is a Gaussian process prior. This is mainly due to the advantage provided by Gaussian conjugacy and the fact that Gaussian processes can encode a wide range of prior knowledge including smoothness, periodicity and sparsity through a careful choice of prior covariance. However, a number of other prior distributions have also been proposed. This includes multi-output Gaussian processes, which are particularly useful when tackling multiple related numerical integration tasks simultaneously or sequentially, and tree-based priors such as Bayesian additive regression trees, which are well suited for discontinuous f. Additionally, Dirichlet processes priors have also been proposed for the integration measure ν.
… excerpt ends here. Continue reading the full article.


![Bayesian quadrature: Illustration of Bayesian quadrature for estimating ν[f]=∫01f(x)dx where f(x)=(1+x2)sin(5πx)+8/5. The posterior distribution (blue) concentrates on the true integral when more data (the red points) is obtained of the integrand f.](https://thumb.wikimedia.org/wikipedia/commons/thumb/1/18/Bayesian_quadrature_animation.gif/500px-Bayesian_quadrature_animation.gif?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)