Multilevel Approximate Bayesian Computation

Statistics
Introduced by
Extension of ABC (Beaumont et al., 2002) to multilevel/hierarchical settings; developed across multiple authors in the 2010s
Year
2000s–2010s
Type
Simulation-based Bayesian inference
Family
Bayesian / computational

What does it do?

Multilevel Approximate Bayesian Computation (multilevel ABC) extends simulation-based Bayesian inference to hierarchically structured data, in which observations are nested within groups.

When the likelihood is intractable, it replaces likelihood evaluation with forward simulation at each level of the hierarchy and keeps parameter draws whose simulated summary statistics fall close to the observed ones. The output is an approximate joint posterior over group-level hyperparameters and unit-level parameters.

The intuition behind the method

Ordinary ABC sidesteps an unavailable likelihood by simulating fake datasets and comparing them to real data via summary statistics. Multilevel ABC applies this idea to two-or-more-level data: parameters vary both at the group level (hyperparameters governing the whole population) and at the unit level (individual parameters within each group). Rather than evaluating how likely the data are under any given set of parameters, the algorithm simulates data from the full hierarchical generative model and keeps only those parameter combinations whose simulated summaries match what was actually observed, within a tolerance threshold.

History

Approximate Bayesian computation was developed largely in population genetics. Beaumont, Zhang, and Balding (2002) brought a local-linear regression version of the method to that setting, extending earlier ideas from the same field. Extensions of ABC to hierarchical and multilevel models followed. A dated first proposal of the multilevel form is not established here, so no origin date is given for it. Sequential Monte Carlo schemes (SMC-ABC) and regression-adjustment methods address the efficiency and approximation error of the basic rejection scheme.

When to use it

Choose multilevel ABC when the data have a hierarchical structure (for example, individuals nested within groups, repeated measures, or schools within districts), the likelihood cannot be evaluated or is too expensive to evaluate, and the model can be simulated forward at every level. Typical cases are agent-based models, complex population dynamics and mechanistic biological models. Do not use it when a tractable likelihood exists and standard hierarchical MCMC or variational inference is feasible: ABC adds approximation error through the epsilon threshold and the choice of summary statistics, and rejection-based versions can require very many simulations. ABC is also not a general remedy for poor MCMC mixing, because a multimodal or irregular posterior can make the acceptance step inefficient. If group effects are small, a single-level ABC analysis may be adequate. A useful check is whether the estimated between-group variation is material relative to within-group variation, and whether group-specific summaries differ noticeably from pooled ones. Confirm that the simulation budget allows the epsilon you need before committing to the method.

Limitations and considerations

  • Approximation quality depends on the choice of summary statistics. In a hierarchical model, summaries must capture both within-group and between-group variation; poor summaries bias the estimated hyperparameters.
  • The epsilon tolerance introduces a systematic approximation. The posterior is exact only as epsilon tends to zero and the summaries are sufficient, and in practice neither condition holds exactly.
  • Simulation cost is high: because most proposed draws are rejected, a large number of model runs is needed for a usable sample, and the cost grows as epsilon shrinks.
  • Dimensionality is a constraint: each unit-level parameter adds to the parameter space, and a larger number of groups adds unit-level parameters in this way. Acceptance rates typically fall as the dimension of the parameter and summary space grows; this is a general property of rejection ABC rather than a measured result for this method.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Applies where the likelihood of the hierarchical model cannot be evaluated, since only forward simulation at each level is required.
  • The joint posterior over group-level hyperparameters and unit-level parameters comes from the same simulation run, so uncertainty at both levels is reported together.
  • Rejection-based draws are independent of one another and can be run in parallel; sequential variants such as SMC-ABC give up some of this for lower rejection rates when epsilon is small.
  • Regression adjustment, as in the local-linear approach of Beaumont et al. (2002), fits a regression of simulated parameter values on the summary statistics and uses it to adjust accepted draws; this adjustment can reduce the influence of the tolerance epsilon on the posterior.

Applications

  • Population genetics and phylogenetics with nested population structures.
  • Epidemiological models where individual- and group-level transmission parameters are both unknown.
  • Ecological models with hierarchical species and habitat effects and intractable stochastic dynamics.
  • Agent-based social science models where the likelihood of aggregate outcomes cannot be written in closed form.
  • Systems biology models with nested experimental designs and complex mechanistic dynamics.

How it works

How it works

1

Specify the full hierarchical generative model: hyperparameters phi govern the distribution of unit-level parameters theta, which in turn generate the observed data y. Priors are placed on both phi and theta. The joint posterior over all parameters is the target.

Formula
p(\theta, \phi \mid y) \propto p(y \mid \theta)\,p(\theta \mid \phi)\,p(\phi)
2

Draw candidate hyperparameters phi* from their prior, then draw unit-level parameters theta* from p(theta | phi*). Using theta*, simulate a synthetic dataset y* from the data-generating model. This forward simulation step replaces the intractable likelihood computation.

Formula
y^* \sim p(\cdot \mid \theta^*),\; \theta^* \sim p(\cdot \mid \phi^*)
3

Reduce both the observed data and the simulated data to low-dimensional summary statistics S(y). Good summaries retain maximal information about the parameters of interest; in practice, domain-specific statistics or learned neural summary statistics are used.

Formula
s^* = S(y^*),\; s_{\text{obs}} = S(y_{\text{obs}})
4

Accept the parameter draw (theta*, phi*) if the discrepancy rho between simulated and observed summaries falls below a tolerance epsilon. The choice of epsilon trades accuracy for computational cost: smaller epsilon gives a closer approximation to the true posterior but requires more simulation attempts.

Formula
\text{Accept } (\theta^*, \phi^*) \text{ if } \rho(s^*, s_{\text{obs}}) \leq \epsilon
5

Accepted draws form a sample from an approximation to the true posterior. The approximation is exact only in the limit of epsilon approaching zero with sufficient summary statistics; in practice a small nonzero epsilon is used, so the approximation error must be assessed. Regression-adjustment or sequential (SMC-ABC) schemes can refine the approximation further.

Formula
\hat{p}_{\epsilon}(\theta, \phi \mid y) \approx p(\theta, \phi \mid y)

Common pitfalls

  • Choosing summary statistics that discard information about key parameters, leading to flat or misleading posteriors.
  • Setting epsilon too large for computational convenience, producing posteriors that are far from the truth.
  • Ignoring the multilevel structure and pooling data across groups, which masks group-level variation.
  • Failing to validate the ABC approximation with posterior predictive checks or with comparison against a tractable toy case where the exact posterior is known.
  • Treating accepted draws as exact posterior samples without acknowledging the epsilon approximation in reported results.

Frequently asked questions

What makes ABC 'approximate'?

ABC replaces the exact likelihood with a comparison of summary statistics within a tolerance epsilon. The resulting posterior is an approximation that equals the true posterior only when epsilon is zero and the summaries are sufficient. In practice both conditions are violated, so posterior estimates carry an additional bias beyond ordinary Monte Carlo error.

How is multilevel ABC different from standard hierarchical MCMC?

Hierarchical MCMC requires an evaluable likelihood at each step; it is exact (up to MCMC error) when it converges. Multilevel ABC replaces likelihood evaluation with forward simulation, making it applicable when the likelihood is intractable, but at the cost of the epsilon approximation and many more simulations.

How do I choose summary statistics for hierarchical data?

Include statistics that capture variation both within and between groups, for example group means, within-group variances and cross-level correlations. Learned summary statistics, such as those produced by a neural network trained on simulations, are an alternative when a manual choice is difficult, but they need their own validation.

Can I combine multilevel ABC with sequential Monte Carlo?

Yes. SMC-ABC propagates a population of particles through a sequence of decreasing tolerances. This is particularly useful in multilevel settings because it avoids the high rejection rates of naive ABC rejection sampling when epsilon is small.

When should I prefer multilevel variational inference instead?

If the likelihood is tractable but posteriors are complex, multilevel variational inference, where it is applicable, may require less computation than ABC, which depends on large numbers of forward simulations; its approximation error must be checked separately. Choose ABC only when the likelihood genuinely cannot be evaluated, and otherwise prefer variational inference or MCMC.

Related methods

Sources

  1. Beaumont, M. A., Zhang, W., & Balding, D. J. (2002). Approximate Bayesian computation in population genetics. Genetics, 162(4), 2025–2035.

    Open DOI reference
  2. Jasra, A., Singh, S. S., Martin, J. S., & McCoy, E. (2012). Filtering via approximate Bayesian computation. Statistics and Computing, 22(6), 1223–1237.

    Open publication reference