Skip to content

Quadrature Methods ​

A crucial part of transport-map applications is selecting a suitable quadrature method. Quadrature is used in map optimization, in particular when evaluating the Kullback–Leibler divergence

Here, denotes the variable in the reference space with density , is the target density, and is the transport map parameterized by .

In practice we approximate the integral by a quadrature sum:

The quadrature points and weights must be chosen so the sum approximates expectations with respect to the reference measure .

Especially in Bayesian inference, where evaluating the target density can be expensive, using efficient quadrature methods is important to reduce the number of target evaluations [6].

Reference Density and Quadrature Choice ​

Since quadrature is performed in the reference space , the quadrature method must match said space and reference density. An overview is provided in the table below.

Quadrature ruleReferenceNotes
MonteCarloWeightsany (default: )Uses random sampling from the default reference
LatinHypercubeWeightsany (default: )Quasi-random sampling from the default reference
TensorProductWeightsanyQuadrature by full tensor-product of one-dimensional quadrature rule
GaussHermiteWeightsTensor-product Gauss-Hermite quadrature
GaussLegendreWeights  or Tensor-product Gauss-Legendre quadrature
SparseSmolyakWeightsany (default: )Sparse grid quadrature rule; fewer points than full tensor product

Sampling-based Quadrature ​

Monte Carlo ​

Monte Carlo estimates an expectation by sampling from the reference density (default Normal() for MonteCarloWeights(n, d)) and forming the sample average. It is simple and robust; weights are uniform. Convergence is stochastic () but independent of dimension.

julia
mc = MonteCarloWeights(500, 2)
Monte Carlo samplesMonte Carlo samples

Latin Hypercube Sampling ​

Latin Hypercube is a stratified sampling design that improves space-filling over plain Monte Carlo; weights remain uniform. It often reduces variance for low to moderate dimensions.

julia
lhs = LatinHypercubeWeights(500, 2)
Latin Hypercube samplesLatin Hypercube samples

Tensor-Product Quadrature ​

Tensor-product quadrature constructs multidimensional rules by combining one-dimensional quadrature rules across each coordinate. Given a 1D rule with points, the tensor product forms all   combinations of points in dimension . The number of points per dimension is given as    with the level .

General tensor-product quadrature is performed with TensorProductWeights:

julia
quad = TensorProductWeights(level, dim, knots)

Different knot choices are available: GaussHermiteKnots(), GaussLegendreKnots(), ClenshawCurtisKnots()

Tensor-product Gauss–Hermite ​

Gauss–Hermite quadrature is optimized for Gaussian reference measures on   and achieves spectral accuracy for smooth integrands.

julia
hermite = GaussHermiteWeights(3, 2)
# alias: TensorProductWeights(3, 2, GaussHermiteKnots())
Gauss-Hermite tensor product sampleGauss-Hermite tensor product sample

Tensor-product Gauss-Legendre ​

Gauss–Legendre quadrature is optimized for bounded uniform reference measures on   (or after rescaling).

julia
legendre = GaussLegendreWeights(3, 2)
# alias: TensorProductWeights(3, 2, GaussLegendreKnots())
Gauss-Legendre tensor product sampleGauss-Legendre tensor product sample
julia
legendre_scaled = GaussLegendreWeights(3, 2, [0, 1])
Gauss-Legendre tensor product scaled sampleGauss-Legendre tensor product scaled sample

Sparse-Grid Quadrature ​

Sparse-grid methods reduce the number of quadrature points compared to full tensor products while maintaining accuracy for smooth functions.

Sparse Smolyak grids use carefully chosen coefficients to cancel redundant high-dimensional interactions, reducing points from to approximately . Negative weights are expected and necessary for high-order correction terms.

Different knot choices (GaussHermiteKnots(), GaussLegendreKnots(), ClenshawCurtisKnots()) optimize sparse grids for different reference measures, similar to their tensor-product counterparts:

julia
sparse = SparseSmolyakWeights(3, 2) # knots = GaussHermiteKnots()
Sparse Smolyak sampleSparse Smolyak sample
julia
sparse_legendre = SparseSmolyakWeights(3, 2, GaussLegendreKnots())
Sparse Smolyak sampleSparse Smolyak sample
julia
sparse_cc = SparseSmolyakWeights(3, 2, ClenshawCurtisKnots())
Sparse Smolyak sampleSparse Smolyak sample

This page was generated using Literate.jl.