Tutorials › Quantitative Systems Pharmacology (QSP) › Rejection ABC and Its Approximate Posterior

Bayesian Calibration and Uncertainty Quantification · Tutorial 654 of 799

Rejection ABC and Its Approximate Posterior

Learn how rejection ABC turns prior draws and mechanistic simulations into samples from a tolerance-dependent approximate posterior.

Advanced 10 min read

What You'll Learn

  • Derive the rejection ABC posterior as the prior distribution conditional on a simulator output falling within a specified distance of the observed summary.
  • Distinguish the ABC acceptance probability from the likelihood and from the overall prior-predictive acceptance rate.
  • Work through a mechanistic simulation example and interpret the accepted parameter draws.
  • Explain why a finite accepted sample only approximates the ABC target distribution.
  • Identify how a non-sufficient summary can produce a different posterior from conditioning on the full data.
  • Recognize computational and inferential limitations of rejection ABC.

From Prior Draws to an Approximate Posterior

When a QSP model can simulate outcomes but its likelihood is unavailable or impractical to evaluate, rejection approximate Bayesian computation (ABC) offers a direct route to parameter inference. It proposes parameters from the prior, simulates data under each proposal, and retains proposals whose simulated summaries are sufficiently close to the observed summary. The resulting accepted parameters are not generally draws from the exact posterior: they follow a precisely defined, tolerance-dependent approximate posterior.

The introductory material on likelihood-free calibration explains why simulation can be useful when a likelihood is intractable. Here the focus is the mathematical target of rejection ABC: what distribution the acceptance rule produces, how the threshold enters that distribution, and what the accepted draws can and cannot establish.

Definition: Let \(\theta\) be a model parameter with prior density \(\pi(\theta)\), let \(Y\) denote data simulated from the model at \(\theta\), and let \(y_{\mathrm{obs}}\) be the observed data. Choose a summary function \(S\), write \(s_{\mathrm{obs}}=S(y_{\mathrm{obs}})\), and define a distance \(d\) between summaries. Rejection ABC with tolerance \(\epsilon\geq 0\) accepts a prior draw \(\theta\) when its simulated data satisfy \(d(S(Y),s_{\mathrm{obs}})\leq\epsilon\).

The rule requires a prior from which proposals can be drawn, a simulator that produces data under a proposed parameter, and a specified summary and distance. The simulator must represent the assumed sampling or process variation: if it is deterministic, repeated simulations at the same parameter return the same output, unless additional randomness is explicitly included. The distance and tolerance define which simulated outcomes count as sufficiently close. The acceptance rule alone does not guarantee that closeness of summaries means closeness of all aspects of the data.

Deriving the Rejection ABC Posterior

Let \(A_\epsilon\) be the event that a simulated summary is within tolerance of the observed summary. Conditional on \(\theta\), define its probability as \(L_\epsilon(\theta)=P(d(S(Y),s_{\mathrm{obs}})\leq\epsilon\mid\theta)\). This is an acceptance probability under the simulator, not generally the likelihood of the observed data.

$$ L_\epsilon(\theta) = \int \mathbf{1}\{d(S(y),s_{\mathrm{obs}})\leq\epsilon\}\,p(y\mid\theta)\,dy $$

Here \(p(y\mid\theta)\) denotes the data-generating distribution, and the indicator equals 1 when its condition holds and 0 otherwise. For discrete outcomes, the integral is interpreted as a sum. By the product rule, the joint distribution of \(\theta\) and acceptance is proportional to \(\pi(\theta)L_\epsilon(\theta)\). Normalizing over \(\theta\) gives the distribution of parameters among accepted proposals.

$$ \pi_\epsilon(\theta\mid s_{\mathrm{obs}}) = \frac{\pi(\theta)L_\epsilon(\theta)} {\int \pi(u)L_\epsilon(u)\,du} $$
Theorem: If parameters are proposed from \(\pi(\theta)\), simulations are generated from the model at each proposal, and proposals are retained exactly when \(d(S(Y),s_{\mathrm{obs}})\leq\epsilon\), then the parameter values among infinitely many accepted proposals have distribution \(\pi_\epsilon(\theta\mid s_{\mathrm{obs}})\). A finite collection of accepted values is a Monte Carlo approximation to that distribution.

The denominator is the prior-predictive probability of acceptance, \(P(A_\epsilon)=\int\pi(\theta)L_\epsilon(\theta)\,d\theta\). It controls computational cost: if it is small, many simulations may be needed to obtain accepted draws. It is not the normalizing constant of the exact full-data posterior unless the acceptance event corresponds to conditioning on sufficient information about the data.

1
Draw a parameter.
Generate \(\theta^{(i)}\) from the prior \(\pi(\theta)\).
2
Simulate data.
Generate \(Y^{(i)}\) from the model at \(\theta^{(i)}\), including the specified observation or process variation.
3
Apply the acceptance rule.
Compute \(d(S(Y^{(i)}),s_{\mathrm{obs}})\) and retain \(\theta^{(i)}\) if the distance is no greater than \(\epsilon\).
4
Summarize accepted draws.
Use the retained values to approximate the ABC posterior, while recognizing that simulation error remains for a finite accepted sample.

Worked Example: A Two-Regime Mechanistic Summary

Consider a hypothetical QSP model with two possible pathway regimes, \(\theta=0\) and \(\theta=1\), each assigned prior probability 0.5. The summary \(S(Y)\) is a simulated day-14 biomarker response, expressed in percentage-point change from baseline. Suppose the simulation distributions are \(S(Y)\mid\theta=0\sim N(0,1)\) and \(S(Y)\mid\theta=1\sim N(1,1)\), where the second argument is the variance. The observed summary is \(s_{\mathrm{obs}}=0\), and the rule accepts when \(|S(Y)|\leq0.5\) percentage points.

For \(\theta=0\), the standardized acceptance limits are \(-0.5\) and \(0.5\). Using unrounded standard normal probabilities gives \(L_{0.5}(0)=\Phi(0.5)-\Phi(-0.5)=0.3829249\). For \(\theta=1\), the corresponding standardized limits are \(-1.5\) and \(-0.5\), so \(L_{0.5}(1)=\Phi(-0.5)-\Phi(-1.5)=0.2417303\).

$$ \begin{aligned} L_{0.5}(0)&=\Phi(0.5)-\Phi(-0.5)=0.3829249,\\ L_{0.5}(1)&=\Phi(-0.5)-\Phi(-1.5)=0.2417303,\\ P(A_{0.5})&=0.5(0.3829249)+0.5(0.2417303)=0.3123276. \end{aligned} $$

The ABC posterior probability for \(\theta=0\) is its prior probability times its acceptance probability, divided by the overall acceptance probability: \(0.5(0.3829249)/0.3123276\approx0.6130\). For \(\theta=1\), the corresponding calculation is \(0.5(0.2417303)/0.3123276\approx0.3870\). Thus, among accepted proposals, the approximate posterior assigns about 61.30% probability to regime 0 and 38.70% to regime 1. These are probabilities conditional on acceptance under this rule; they are not probabilities that either regime is “true.” The prior-predictive acceptance rate is about 31.23%, so roughly 3.20 prior simulations are expected per accepted draw under these assumptions.

What a Finite Rejection Run Produces

The theorem describes the distribution of accepted parameters, not a guarantee that a short run will reproduce its probabilities exactly. In practice, each accepted proposal is one draw from the ABC target, and the empirical proportions among a finite set of accepted draws fluctuate around that target. Rejection ABC does not reweight accepted proposals: a proposal is either retained or discarded.

Worked Example: Reading a Small Rejection Run

Use the two-regime model above and set the tolerance to 0.5 percentage points. In a hypothetical run, eight proposals are made under each regime. The table records the absolute difference between each simulated summary and the observed summary; each row is one simulation.

RegimeDistances for the eight proposalsAccepted
\(\theta=0\)0.10, 0.24, 0.39, 0.48, 0.55, 0.62, 0.74, 0.914
\(\theta=1\)0.07, 0.21, 0.36, 0.51, 0.58, 0.65, 0.83, 0.943

The cutoff is inclusive: a distance at most 0.5 is accepted. Therefore, the first four proposals under regime 0 and the first three under regime 1 are retained. There are seven accepted proposals in total, and the empirical fraction assigned to regime 0 is \(4/7\approx0.5714\); the fraction assigned to regime 1 is \(3/7\approx0.4286\). The run's observed acceptance rate is \(7/16=0.4375\).

These finite-run fractions differ from the theoretical ABC probabilities of approximately 0.6130 and 0.3870 in the previous calculation. That difference is ordinary Monte Carlo variation, not evidence that the acceptance rule has changed. With only seven accepted values, the proportions are noisy; a much larger run would generally provide a more stable approximation. The run's acceptance rate also need not equal the theoretical prior-predictive rate in a small sample.

Mechanistic Simulations and the Meaning of the Summary

In a mechanistic application, a simulator may solve a system of ODEs and then add modeled observation variability to generate a replicate dataset. The summary can be a feature of that dataset, such as a response at a specified time. Rejection then selects parameters whose simulated feature lies near the observed feature under the chosen distance. The following example treats the simulator and summary as fixed parts of the analysis; it does not imply that a single summary captures every relevant aspect of a trajectory.

Worked Example: Accepting Parameters From Simulated Biomarker AUC

Suppose a hypothetical ODE model has a drug-clearance parameter \(\theta\), measured in per day, and produces a simulated biomarker area under the curve (AUC), measured in percentage-point days. For this example, the summary is the simulated AUC, the distance is absolute difference in AUC, and the observed AUC is 4.0 percentage-point days. A prior simulation produces the following parameter-output pairs, with tolerance \(\epsilon=0.4\) percentage-point days.

Proposed \(\theta\) (per day)Simulated AUC (percentage-point days)Distance from 4.0Decision
0.105.1\(|5.1-4.0|=1.1\)Reject
0.204.3\(|4.3-4.0|=0.3\)Accept
0.303.8\(|3.8-4.0|=0.2\)Accept
0.404.4\(|4.4-4.0|=0.4\)Accept
0.503.5\(|3.5-4.0|=0.5\)Reject

Three of the five proposals satisfy the rule \(d\leq0.4\), including the proposal exactly on the boundary. The accepted parameter values in this small run are 0.20, 0.30, and 0.40 per day; their empirical mean is \((0.20+0.30+0.40)/3=0.300\) per day. That mean describes these three accepted proposals only. A larger rejection run would be needed to characterize the ABC posterior reliably, and the distribution is conditional on this particular AUC summary and tolerance.

ABC Summaries Are Not Automatically the Full Data

As the tolerance shrinks, the acceptance event focuses increasingly closely on the observed summary. Under suitable regularity conditions and a continuous summary with density \(f_S(s_{\mathrm{obs}}\mid\theta)\), the small-tolerance target approaches a distribution proportional to \(\pi(\theta)f_S(s_{\mathrm{obs}}\mid\theta)\). It is the posterior based on the summary. It equals the full-data posterior only when the summary retains the relevant information about \(\theta\), as a sufficient statistic would, or under other conditions that make the summary-based and full-data posteriors coincide. For discrete summaries, taking \(\epsilon=0\) can mean conditioning on the event \(S(Y)=s_{\mathrm{obs}}\), which may have positive probability.

Worked Example: A Summary Can Change the Posterior

Consider a hypothetical two-time-point binary biomarker response \(Y=(Y_1,Y_2)\), where 1 denotes a response and 0 denotes no response. Under regime A, the two responses are independent with probability 0.9 at each time. Under regime B, they are independent with response probabilities 0.9 at the first time and 0.1 at the second. Give the regimes equal prior probability, observe \(Y=(1,0)\), and use the count summary \(S(Y)=Y_1+Y_2\).

The full-data likelihood of this observation under A is \(0.9(1-0.9)=0.09\). Under B it is \(0.9(1-0.1)=0.81\). With equal prior probabilities, the full-data posterior probability of B is \(0.81/(0.09+0.81)=0.9000\).

The observed summary is \(S=1\). Under A, the probability of exactly one response is \(0.9(0.1)+0.1(0.9)=0.18\), accounting for either time point being the response. Under B, that probability is \(0.9(0.9)+0.1(0.1)=0.82\). Thus, conditioning on the summary alone gives a posterior probability of B equal to \(0.82/(0.18+0.82)=0.8200\). The summary-based result differs from the full-data result because the count does not retain which time point had the response. Even a zero-tolerance match to this summary would not recover the full-data posterior in this example.

Assumptions, Diagnostics, and Alternatives

Rejection ABC is straightforward, but its interpretation depends on a set of explicit choices and checks:

  • Prior and simulator: proposals must come from the stated prior, and simulated data must follow the intended model at the proposed parameter. Coding errors, incorrect initial conditions, or omitted observation noise change the target.
  • Acceptance event: the summary, distance, and tolerance must be defined before interpreting accepted values. The ABC posterior is conditional on these choices.
  • Finite computation: few accepted draws lead to unstable posterior summaries. Record the number proposed, the number accepted, and Monte Carlo variability in estimates based on the accepted draws.
  • Fit beyond the acceptance criterion: closeness on the selected summary does not establish that the full simulated trajectory or other observed features are reproduced. Check simulated data against relevant observed features not used in the acceptance rule where possible.

A very low acceptance rate is a practical warning that the prior simulations rarely enter the acceptance region; it makes the method expensive and can leave too few accepted draws for useful summaries. A high rate is not, by itself, evidence of good calibration: a broad tolerance can retain many parameters whose simulated summaries are not close in a substantively meaningful sense. Conversely, apparent concentration among accepted values should not be mistaken for a precise posterior if it is based on very few acceptances.

Compared with evaluating an available likelihood and sampling the resulting posterior with methods such as Metropolis-Hastings, rejection ABC avoids evaluating the likelihood but pays for that convenience with simulation cost and approximation. If the likelihood is tractable and the full data model is appropriate, likelihood-based inference targets the full-data posterior directly. Rejection ABC instead targets the distribution conditional on its acceptance event. The central limitations are therefore computational inefficiency when acceptance is rare, sensitivity to the summary and distance, dependence on the tolerance, and possible loss of information relative to the full data.

Common pitfall: “The accepted parameters are exact draws from the posterior because every accepted simulation was close to the observation.” The correction is that accepted proposals follow \(\pi_\epsilon(\theta\mid s_{\mathrm{obs}})\), a posterior conditional on the chosen summary-distance event. It coincides with the full-data posterior only under additional conditions, and a finite accepted sample only estimates this ABC target.
Key takeaway: Rejection ABC samples the prior conditional on a simulated summary falling within a specified distance of the observed summary. The tolerance defines an approximate target, while the summary determines what information that target uses.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. In rejection ABC, what does \(L_\epsilon(\theta)\) represent, and how is it different from the prior-predictive acceptance probability?
  2. A simulation has distance exactly equal to \(\epsilon\). Is it accepted under the rule in this tutorial?
  3. In the AUC example, which of the five proposals are accepted, and what is the empirical mean of their parameter values?
  4. Why can reducing the tolerance to zero still fail to produce the full-data posterior?
  5. Name one diagnostic warning of an inefficient rejection run and one check that assesses fit beyond the acceptance criterion.

Solutions. (1) \(L_\epsilon(\theta)\) is the probability of acceptance conditional on a fixed parameter \(\theta\). The prior-predictive acceptance probability averages it over the prior: \(\int \pi(\theta)L_\epsilon(\theta)\,d\theta\). (2) Yes. The rule accepts when the distance is less than or equal to \(\epsilon\). (3) The accepted values are 0.20, 0.30, and 0.40 per day; their mean is \(0.90/3=0.300\) per day. (4) Zero tolerance can condition on a summary rather than the full data. If the summary discards information about the parameter, its posterior can differ from the full-data posterior. (5) A very low acceptance rate signals high simulation cost and potentially too few accepted draws. One can compare simulated trajectories or other observed features not used in the acceptance rule with their observed counterparts.

Clinical Biostats