Hierarchical Bayesian Quadrature

Tim Weiland, Toni Karvonen, Philipp HennigarXiv 2026

TL;DR

Hierarchical Bayesian Quadrature (HBQ) solves a long-standing limitation in Bayesian numerical integration: handling nonstationary functions where smoothness and variability change drastically across the domain. By adaptively partitioning the integration space into a tree of local, stationary Gaussian Processes and recombining them through a novel hierarchical conditioning scheme, HBQ dramatically reduces integration error on complex, multi-scale problems without requiring expensive Markov Chain Monte Carlo (MCMC) sampling.

What Problem Does This Paper Address?

Numerical integration—calculating the area under a curve or a multi-dimensional surface—is a cornerstone of scientific computing, used everywhere from engineering simulations to computing "model evidence" in machine learning. When the underlying function is an expensive black box, standard practice often turns to Bayesian Quadrature (BQ). BQ treats integration as a statistical inference problem, using a Gaussian Process (GP) surrogate to model the function and provide both an estimate and a calibrated measure of uncertainty.

However, standard BQ relies on stationary kernels, meaning it assumes the function's smoothness and volatility are uniform across the entire domain. When faced with nonstationary functions—such as an epidemiological model that features a sharp, curved ridge surrounded by vast flat regions—standard BQ struggles. It is forced to compromise, either over-smoothing the sharp features or wasting precious sample evaluations on flat areas. While nonstationary kernels exist, they lack closed-form solutions, destroying BQ's main computational appeal.

Methods

The authors introduce Hierarchical Bayesian Quadrature (HBQ), a method that elegantly handles nonstationarity while keeping all computations strictly in closed form.

  • Adaptive Tree Partitioning: HBQ recursively splits the integration domain into axis-aligned hyperrectangles (boxes), creating a binary tree structure. Each leaf node represents a local subdomain fitted with its own stationary GP, allowing different regions to have completely distinct lengthscales and smoothness parameters.
  • BIC-Gated Splitting: To prevent the tree from over-partitioning and creating too many tiny boxes, HBQ uses the Bayesian Information Criterion (BIC) as a model selection gate. A split is only accepted if the improvement in the local marginal likelihood outweighs the complexity penalty of adding a new local model.
  • Tree Conditioning: A common flaw in tree-based GP methods is that predictions become discontinuous at the boundaries between subdomains. HBQ elegantly resolves this by retaining the parent GP prior at branch nodes. It treats the child integral estimates as noisy observations and conditions the parent GP on them bottom-up, naturally reintroducing cross-subdomain correlations.
Figure 2: HBQ decomposes the domain into subdomains via a tree of axis-aligned splits. Each leaf fits a local stationary GP with its own lengthscale, adapting to local integrand complexity. Shaded regions show posterior uncertainty.
  • Active Refinement: At each step, the algorithm calculates which leaf node has the highest expected variance reduction per evaluation and either splits it (if the BIC allows) or adds a batch of new sample points.

Datasets

The authors evaluated HBQ across a variety of synthetic and realistic integration challenges:

  • Genz Test Suite: A classic set of parameterized benchmark functions (including Oscillatory, Product Peak, Corner Peak, Gaussian Peak, and Continuous) evaluated in 2D and 3D.
  • SIR Epidemiological Model: A practical problem computing the model evidence (normalizing constant) for a Susceptible-Infected-Recovered differential equation model, characterized by a sharp, curved ridge in parameter space.
  • Piecewise GP Synthetic Data: A 1D function explicitly constructed from three distinct GP segments (rough edges flanking a smooth center) to test if HBQ can accurately recover hidden nonstationary structures.
  • Reaction-Diffusion PDE: A 1D physical simulation with a multi-scale character, featuring both smooth regions and highly localized, spiky features.

Key Insights and Ideas

  • Local Stationarity Beats Global Nonstationarity: Instead of designing complex, mathematically intractable nonstationary kernels, it is far more efficient to use a collection of simple, local stationary kernels structured in a tree.
  • Hierarchical Recombination Restores Continuity: Treating child integrals as noisy observations of a retained parent GP prior allows the model to account for cross-boundary correlations without heavy computational overhead.
  • No Penalty for Simplicity: Thanks to the BIC gating mechanism, HBQ automatically reduces to standard BQ when the integrand is stationary. It doesn't over-partition simple functions, ensuring you only pay for complexity when it is actually present.

Key Results

  • SIR Model Evidence: HBQ achieves sub-1% relative error with just 100 function evaluations, whereas standard BQ, Monte Carlo (MC), and Quasi-Monte Carlo (QMC) remain well above 1% error. As shown below, HBQ successfully concentrates its evaluation budget directly on the high-complexity ridge.
Adaptive budget allocation for model evidence computation on the SIR model.
  • Genz Benchmarks: On the highly nonstationary Corner Peak function, HBQ achieves up to a 6× reduction in error compared to standard BQ. On the remaining four stationary families, its performance perfectly matches standard BQ, proving the safety of the adaptive mechanism.
  • Reaction-Diffusion PDE: HBQ pulls away sharply from other methods as the sample budget grows, achieving a 35× lower median error than standard BQ at 512 evaluations.
  • Structure Recovery: In synthetic tests, HBQ recovered the exact number of nonstationary segments in 100% of trials and selected the correct kernel smoothness in 96% of trials, leading to 3.3× tighter (yet well-calibrated) uncertainty estimates.

Limitations and Future Work

  • Axis-Aligned Constraints: To keep the integral calculations in closed form, the subdomains must be axis-aligned hyperrectangles, and the kernels must be tensor products. This prevents the tree from adapting perfectly to diagonal features.
  • Curse of Dimensionality: The method requires at least $5^d$ evaluation points per leaf to reliably estimate hyperparameters. This makes scaling to high-dimensional spaces ($d > 4$) computationally intractable.
  • Partial Convergence Analysis: The current convergence analysis assumes a fixed final tree structure; a full proof that accounts for the online, adaptive tree construction process remains open for future work.

Summary updated

BibTeX
@misc{weiland2026hierarchical,
  author = {Tim Weiland and Toni Karvonen and Philipp Hennig},
  title = {{Hierarchical Bayesian Quadrature}},
  year = {2026},
  eprint = {2607.10793},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.10793},
}
Figure