---
title: 'permABC: Permutation-Based ABC for Hierarchical Models'
url: https://www.emergentmind.com/topics/permabc
type: topic
---

# permABC: Permutation-Based ABC for Hierarchical Models

Searching arXiv for permABC and core ABC background papers to ground the article.
permABC is a permutation-based extension of Approximate Bayesian Computation (ABC) for likelihood-free inference in hierarchical models with many grouped observations and both global and local parameters, especially when the groups are exchangeable compartments whose labels are statistically arbitrary [2507.06037]. It was introduced to address a specific failure mode of standard ABC: in high-dimensional hierarchical settings, a simulated dataset may match the observed compartments well only after relabeling, yet ordinary componentwise comparison rejects it because it enforces a fixed ordering. permABC replaces fixed-order matching by an optimal assignment step, embeds that idea in ABC-SMC, and adds two sequential accelerators—Over Sampling and Under Matching—to improve feasibility in regimes with many compartments or strong contamination [2507.06037].

## 1. Position within the ABC literature

ABC is a family of Bayesian methods for settings in which the posterior target is conceptually well defined but the likelihood \(f(y\mid \theta)\) is unavailable in closed form, too costly to evaluate, or otherwise intractable, while forward simulation from the model remains feasible [1101.0955]. In the standard rejection formulation, one simulates \(\theta \sim \pi(\cdot)\), then pseudo-data \(z \sim f(\cdot\mid \theta)\), and accepts if simulated and observed data are sufficiently close under a discrepancy applied either to raw data or to summary statistics:
\[
d\{\eta(y),\eta(z)\}\le \varepsilon.
\]
This yields the usual ABC pseudo-posterior
\[
\begin{split}
\pi_{\varepsilon}\{ \theta \mid \eta(y)\} &\propto \int_{D^K} \pi_{\varepsilon}\{\theta, z \mid \eta(y)\} \, dz \\
&\propto \pi(\theta) \int_{A_{y,\varepsilon}} f(z \mid \theta) \, dz,
\end{split}
\]
where \(A_{y,\varepsilon}=\{z:d(\eta(y),\eta(z))\le \varepsilon\}\) [2507.06037].

The broader ABC literature had already developed rejection ABC, ABC-MCMC, ABC-PMC, and ABC-SMC, while emphasizing calibration difficulties involving summary statistics, discrepancy functions, and tolerance schedules [1101.0955]. Application-focused work had also shown that adaptive SMC-ABC could be effective in complex stochastic simulators, for example in astronomical inference on galaxy morphology, where a self-generating target sequence and self-refining MCMC kernel made likelihood-free inference practical despite an intractable data likelihood [1202.1426]. However, these earlier papers did not define permABC. The specific contribution of permABC is to exploit exchangeability of grouped observations through permutation-based matching inside the ABC acceptance step rather than through only summary-statistic design or ordinary SMC adaptation [2507.06037].

A central motivation is dimensional scalability. Standard ABC already suffers from a severe acceptance bottleneck when many dimensions must match simultaneously, and this becomes especially acute in hierarchical models with a shared global parameter and many compartment-specific local parameters [1101.0955]. permABC was proposed precisely for that setting [2507.06037].

## 2. Hierarchical exchangeability and the matching problem

The permABC framework considers a hierarchical model with \(K\) compartments. In compartment \(k=1,\dots,K\), the observed subdataset is
\[
y_k=(y_k^1,\dots,y_k^n)\in D,
\]
and the full dataset is
\[
y=(y_1,\dots,y_K)\in D^K.
\]
Parameters are partitioned into a global parameter \(\beta\) with prior \(\pi_\beta\) and local parameters \(\mu_k\), giving
\[
\theta=(\beta,\mu_1,\dots,\mu_K)
\]
[2507.06037].

The key modeling assumption is conditional exchangeability of the compartment-level pairs \((\mu_k,y_k)_{k=1}^K\). A typical case is
\[
\mu_1,\dots,\mu_K \overset{\text{i.i.d.}}{\sim} \pi_\mu,
\]
and conditional on \((\beta,\mu_k)\), each compartment is simulated independently from a common compartment-level likelihood \(g\), so that
\[
f(y\mid \theta)=\prod_{k=1}^K g(y_k\mid \beta,\mu_k).
\]
For a permutation \(\sigma\in \mathcal S_K\),
\[
\theta_\sigma=(\beta,\mu_{\sigma(1)},\dots,\mu_{\sigma(K)}), \qquad y_\sigma=(y_{\sigma(1)},\dots,y_{\sigma(K)}),
\]
and exchangeability implies
\[
f(y\mid \theta)=f(y_\sigma\mid \theta_\sigma).
\]
This is the structural premise on which permABC rests [2507.06037].

In the examples emphasized by the method, the comparison often uses full data rather than summaries, i.e. \(\eta=\mathrm{Id}\), with discrepancy
\[
d(y, z)^2 = \sum_{k=1}^K w_k^2 \| y_k - z_k \|_2^2,
\]
where the weights \(w_k\) may be chosen manually or adaptively to prevent domination by a single compartment [2507.06037].

The methodological problem is that standard ABC compares \(z=(z_1,\dots,z_K)\) and \(y=(y_1,\dots,y_K)\) coordinatewise in their original order. When simulated local labels are arbitrary, this comparison is statistically unnatural. A simulated dataset may be a good fit only after relabeling compartments. In one-dimensional settings, sorting can sometimes recover the relevant comparison because
\[
d\{\mathrm{sort}(y),\mathrm{sort}(z)\} = \min_{\sigma\in\mathcal S_K} d(y,z_\sigma),
\]
but that device does not generalize to multivariate compartments \(y_k\in \mathbb R^n\), \(n>1\) [2507.06037]. permABC addresses the relabeling problem directly through optimal matching.

## 3. Permutation-matched acceptance and pseudo-posterior

The central acceptance criterion of permABC is
\[
\min_{\sigma \in \mathcal{S}_K} d(y, z_{\sigma}) \leq \varepsilon.
\]
A simulation is accepted if some permutation of the simulated compartments lies within tolerance of the observed dataset [2507.06037]. Computationally, the required optimization is a linear assignment or bipartite matching problem that can be solved by a modified Jonker–Volgenant algorithm in
\[
\mathcal O(K^3)
\]
time, replacing a \(K!\) search over all permutations by polynomial-time matching [2507.06037].

If one accepts whenever some permutation matches, the induced pseudo-posterior is
\[
\begin{split}
\tilde \pi_{\varepsilon} ( \theta \mid y)
& \propto \int_{D^K} \tilde \pi_{\varepsilon} ( \theta, z \mid y) \, dz \\
& \propto \pi(\theta) \int_{\tilde A_{y,\varepsilon}} f(z \mid \theta) \, dz,
\end{split}
\]
with
\[
\tilde{A}_{y,\varepsilon} = \left\{z \in D^K \,\middle|\, \min_{\sigma \in \mathcal{S}_K} d(y, z_{\sigma}) \leq \varepsilon \right\} = \bigcup_{\sigma \in \mathcal{S}_K} B_{\varepsilon}(y_{\sigma}).
\]
This target is permutation-invariant in the local parameters and is useful when local parameters are nuisances, but by itself it does not identify which local parameter corresponds to which observed compartment [2507.06037].

permABC therefore adds a projection step. For each accepted simulation, it computes
\[
\sigma^* = \argmin_{\sigma \in \mathcal{S}_K} d(y, z_{\sigma})
\]
and returns the reordered pair
\[
T:(\theta,z)\mapsto (\theta_{\sigma^*}, z_{\sigma^*}).
\]
The projected pseudo-posterior is
\[
\pi^{*}_{\varepsilon}(\cdot, \cdot \mid y) :=  T_{\#}\tilde{\pi}_{\varepsilon}(\cdot,\cdot\mid y),
\]
with marginal
\[
\pi_{\varepsilon}^*( \theta \mid y) \propto \pi(\theta) \int_{A_{y,\varepsilon}^*} f(z \mid \theta) \, dz,
\]
where
\[
A_{y,\varepsilon}^* = B_{\varepsilon}(y) \cap D_{y}^{*K},
\]
and
\[
D_{y}^{*K} = \left\{ z \in D^K \mid d(y, z) = \min_{\sigma \in \mathcal{S}_K} d(y, z_{\sigma}) \right\}.
\]
This is a defining distinction from approaches that use only permutation-invariant summaries: permABC aligns the local parameters themselves and returns a labeled posterior sample [2507.06037].

permABC is not, for arbitrary \(\varepsilon\), identical to ordinary ABC. Standard ABC would accept all permutations satisfying the tolerance criterion, whereas permABC retains only the optimal one. The paper gives a sufficient condition under which the two coincide. Define
\[
\varepsilon^* := \min_{\sigma \neq \mathrm{Id}} \frac{1}{2} d(y, y_\sigma).
\]
Then for every \(\varepsilon<\varepsilon^*\), at most one permutation can satisfy the ABC condition, and therefore
\[
\pi^*_{\varepsilon}( \cdot \mid y) = \pi_{\varepsilon}( \cdot \mid y).
\]
The method therefore preserves the small-\(\varepsilon\) consistency regime of ordinary ABC while modifying the pseudo-posterior at moderate tolerances [2507.06037]. A more exact but more expensive stratified permABC variant was also proposed to recover the classical ABC pseudo-posterior exactly for larger \(\varepsilon\) by estimating the number of acceptable permutations [2507.06037].

## 4. Sequential algorithms: permABC-SMC, Over Sampling, and Under Matching

permABC was developed not only as a rejection sampler but also as a sequential method built on ABC-SMC. In the SMC formulation, one uses a decreasing tolerance schedule
\[
\varepsilon_0=\infty > \varepsilon_1 > \cdots > \varepsilon_T=\varepsilon
\]
and sequential proposal distributions \(q_t\). The defining substitution is that ordinary ABC discrepancy is replaced by the permuted discrepancy
\[
\min_{\sigma\in\mathcal S_K} d(y,z_\sigma).
\]
At the final stage, particles are projected by their optimal permutations to obtain samples from \(\pi^*_\varepsilon(\cdot\mid y)\) [2507.06037].

The paper emphasizes a Del Moral, Doucet, and Jasra style ABC-SMC scheme with \(M=1\) pseudo-dataset per parameter proposal. In that regime, accepted particles effectively carry binary survival weights, so the effective sample size can coincide with the number of surviving particles and fail to reveal degeneracy. For that reason the method recommends monitoring the unique particle rate in addition to ESS [2507.06037].

The sequential framework is extended in two complementary directions.

| Variant | Mechanism | Intended role |
|---|---|---|
| permABC-SMC | Full matching under optimal permutation | Default sequential method |
| Over Sampling | Simulate \(M>K\) compartments, keep best matching subset | Improve early-stage acceptance |
| Under Matching | Require only \(L<K\) compartments to match | Early-stage relaxation and robustness |

### Over Sampling

Over Sampling, denoted permABC-OS, simulates more compartments than are observed:
\[
\theta=(\beta,\mu_1,\dots,\mu_M), \qquad z=(z_1,\dots,z_M)\in D^M, \qquad M>K.
\]
Acceptance is based on the existence of a size-\(K\) subset of simulated compartments that matches the observed data:
\[
\min_{\sigma \in \mathcal{A}_K^M} d(y, z_{\sigma}) \leq \varepsilon,
\]
where \(\mathcal A_K^M\) is the set of injections from \(\{1,\dots,K\}\) to \(\{1,\dots,M\}\). This is a rectangular assignment problem solvable in
\[
\mathcal O(K^2 M)
\]
time [2507.06037].

The corresponding acceptance region is
\[
\tilde A_{\varepsilon, y}^{M} = \left\{ z \in D^M \mid \min_{\sigma \in \mathcal A_K^M} d(y, z_\sigma) \leq \varepsilon \right\},
\]
with pseudo-posterior
\[
\tilde{\pi}_\varepsilon^M(\theta, z \mid y) \propto \pi(\theta) f(z \mid \theta) \, \mathbb{I}_{\tilde A_{\varepsilon, y}^{M}}(z).
\]
After acceptance, the optimal partial permutation is applied and the \(K\) matched compartments are brought to the front, defining \(\pi_{\varepsilon}^{*M}\) [2507.06037].

The intended effect is to make early SMC stages easier: as \(M\) grows, the algorithm can search among more simulated compartments for a good subset. The paper notes a specific distributional consequence: large \(M\) tends to keep the global parameter marginal closer to prior, while matched local parameters become highly concentrated around good local fits [2507.06037]. The sequential schedule is
\[
M_0 > M_1 > \cdots > M_T = K,
\]
with a recommended decay
\[
M_{t+1} = \lfloor K + (M_t - K) \gamma \rfloor \wedge (M_t -1),
\]
and \(\gamma=0.9\) suggested. A practical calibration chooses \(\varepsilon\) as a high empirical quantile of initial matching distances, for example using \(p=0.95\) [2507.06037].

### Under Matching

Under Matching, denoted permABC-UM, moves in the opposite direction. It simulates the usual \(K\) compartments but requires only \(L<K\) matches at intermediate stages:
\[
\min_{\sigma \in \mathcal{A}_L^{K}, \tilde{\sigma} \in \mathcal{A}_L^{K}} d(y_{\tilde \sigma}, z_{\sigma}) \leq \varepsilon.
\]
Here \(\sigma\) selects \(L\) simulated compartments and \(\tilde\sigma\) selects \(L\) observed compartments, with restricted distance
\[
d(y_{\tilde \sigma}, z_{\sigma})^2 = \sum_{k=1}^L w_{\tilde \sigma(k)}^2 \| y_{\tilde \sigma(k)} - z_{\sigma(k)} \|_2^2.
\]
The optimization can be reduced to a square assignment on a \((2K-L)\times(2K-L)\) matrix with complexity
\[
\mathcal O\{(2K-L)^3\}
\]
by augmenting the cost matrix with dummy rows and columns of zero cost [2507.06037].

The acceptance region is
\[
\tilde A_{\varepsilon, y}^{L} = \left\{ z \in D^K \mid \min_{\sigma, \tilde{\sigma} \in \mathcal A_L^K} d(y_{\tilde \sigma}, z_\sigma) \leq \varepsilon \right\},
\]
with pseudo-posterior
\[
\tilde{\pi}_\varepsilon^L(\theta, z \mid y) \propto \pi(\theta) f(z \mid \theta) \, \mathbb{I}_{\tilde A_{\varepsilon, y}^{L}}(z).
\]
The schedule is
\[
L_0 < L_1 < \cdots < L_T = K,
\]
with heuristic update
\[
L_{t+1} = \lfloor L_t + (K - L_t)(1-\gamma) \rfloor \vee (L_t + 1),
\]
for \(\gamma=0.8\) or \(0.9\) [2507.06037].

The stated motivation is robustness and combinatorial relief in early stages. It can tolerate outliers or mild model misspecification, but the transition to full matching can become severe, and population collapse at the final step is a recognized limitation [2507.06037].

## 5. Computation, proposal adaptation, and implementation

The basic rejection version of permABC differs formally from vanilla rejection ABC in only one step: after simulating \(z\sim f(\cdot\mid\theta)\), it solves
\[
\sigma^*=\argmin_{\sigma\in\mathcal S_K} d(y,z_\sigma),
\]
and accepts if
\[
d(y,z_{\sigma^*})\le \varepsilon,
\]
storing \(\theta_{\sigma^*}\) [2507.06037]. Practically, however, that assignment step is the entire method.

Within SMC, proposal adaptation requires special care because local labels can switch across particles. Standard ABC-SMC often uses a diagonal Gaussian random walk
\[
q_t(\cdot \mid \theta) = \mathcal{N}\bigl(\theta,\operatorname{diag}(\tau_t^2)\bigr),
\qquad
\tau_t^2 = 2 \cdot \operatorname{var}\bigl\{(\theta^{t-1,i})_i\bigr\}.
\]
In permABC, raw componentwise empirical variances are not meaningful unless particles are aligned. The method therefore first aligns each particle using its optimal permutation \(\sigma_i^*\), then computes
\[
\tau_t^2 = 2 \cdot \operatorname{var}\bigl\{(\theta_{\sigma_i^*}^{t-1,i})_i\bigr\},
\]
and defines the proposal kernel
\[
q_t(\cdot \mid \theta,\sigma) = \mathcal{N}\bigl[\theta,\operatorname{diag}\{\sigma^{-1}(\tau_t^2)\}\bigr].
\]
For Over Sampling and Under Matching, when only some compartments are matched, unmatched components receive default variance
\[
\tau_0^2 := \max_{k \in \mathcal{I}} \tau_t^2[k],
\]
where \(\mathcal I\) indexes matched components [2507.06037].

The appendix also introduces a blockwise Metropolis-within-Gibbs kernel. A global move updates the shared parameter using the full dataset and a recomputed optimal assignment, while a local move updates local parameters in random blocks but still evaluates acceptance through the global permuted discrepancy. This is specifically contrasted with ABC-Gibbs, which may mix poorly under strong dependence because it conditions on other blocks rather than scoring the full configuration globally [2507.06037].

Several practical tuning recommendations are explicit. For Over Sampling, the tolerance may be selected as a high empirical quantile of initial matching distances with \(p=0.95\); duplication of particles across \(M_t\) transitions can mitigate extinction, with \(R=5\) or \(10\) suggested; and monitoring should include unique particle rate in addition to ESS [2507.06037]. The method is implemented in a public Python package, **permabc** [2507.06037].

A common misconception is that permABC is merely a permutation-invariant summary-statistic trick. The construction of the projected pseudo-posterior shows otherwise: the method uses optimal relabeling to recover aligned local parameters, not only an invariant global discrepancy [2507.06037]. A plausible implication is that permABC occupies an intermediate position between purely invariant ABC summaries and full latent-label inference: it exploits symmetry but still returns a labeled local posterior.

## 6. Empirical results, applications, and limitations

The main empirical evidence is organized around both synthetic experiments and a real-world epidemiological application [2507.06037].

In a toy \(K=2\) uniform example, the method exhibits the two regimes predicted by theory. For \(\varepsilon > \varepsilon^*\), permABC and standard ABC target different pseudo-posteriors; for \(\varepsilon \le \varepsilon^*\), they coincide. Even in that small example, permABC reached the same approximation quality with about half the simulations [2507.06037].

In a high-dimensional Gaussian hierarchical model,
\[
\beta \sim \mathrm{IG}(a,b), \qquad \mu_k \sim \mathcal N(0,s^2), \qquad y_{i,k}\overset{\text{i.i.d.}}{\sim}\mathcal N(\mu_k,\beta),
\]
performance was measured by the tolerance \(\varepsilon\) achieved for a fixed computational budget, normalized by the number of simulations required to obtain \(1000\) unique particles. Under that criterion, permutation-based methods reached substantially smaller \(\varepsilon\) than vanilla ABC, ABC-SMC, and ABC-PMC, and the advantage increased with \(K\) [2507.06037].

In an overparameterized Gaussian model with posterior ridge structure,
\[
\beta \sim \mathcal N(0,10^2),\qquad \mu_k \sim \mathcal N(0,10^2),\qquad y_{i,k}\sim \mathcal N(\mu_k+\beta,1),
\]
permABC-SMC captured the full posterior geometry more effectively than ABC-Gibbs, which became trapped and produced a truncated approximation [2507.06037]. This result directly supports the claim that global permutation-based matching is more robust than coordinatewise likelihood-free updating when global and local parameters are strongly coupled.

In a \(K=20\) contaminated Gaussian example with four local means in the tails of the prior, Over Sampling reached lower \(\varepsilon\) with fewer iterations than standard permABC-SMC, although each iteration was more expensive; Under Matching worked well at intermediate \(\varepsilon\) and provided robustness to contamination, but usually struggled to reach very small tolerances because the final full-matching step degenerated [2507.06037]. The paper therefore suggests hybrid strategies in practice.

The principal real-world case study is a hierarchical SIR analysis of daily hospitalization trajectories across \(94\) French departments during the first wave of COVID-19 [2507.06037]. The dynamical system is
\[
\begin{split}
\frac{dS}{dt} &= -\delta \frac{SI}{N},\qquad
\frac{dI}{dt} &= \delta \frac{SI}{N} - \nu I,\qquad
\frac{dR}{dt} &= \nu I,
\end{split}
\]
with
\[
R_0=\delta/\nu.
\]
The model uses a global \(R_0\) shared across departments and local parameters
\[
\mu_k = (I_k(0), R_k(0), \delta_k),
\]
yielding a \(283\)-dimensional parameter space:
\[
3\times 94 + 1 = 283.
\]
The reported findings are that using all \(94\) departmental trajectories with permABC-SMC gives a much sharper posterior for the global \(R_0\) than fitting a model to aggregated national data, while also recovering local heterogeneity across departments [2507.06037].

The limitations are explicit. permABC relies crucially on exchangeability; if compartment labels are scientifically meaningful rather than interchangeable, permutation matching can induce bias or wash out structure [2507.06037]. The method targets a different pseudo-posterior from standard ABC at moderate or large \(\varepsilon\), even though the two coincide in the sufficiently small-tolerance regime [2507.06037]. Assignment cost remains nontrivial at \(\mathcal O(K^3)\), Over Sampling can suffer particle extinction across \(M_t\) transitions, Under Matching can degenerate when \(L_t\to K\), and improved inference machinery cannot correct a misspecified simulator [2507.06037].

Within the ABC literature more broadly, these caveats align with longstanding warnings that approximation quality depends jointly on tolerance, discrepancy design, and the structural faithfulness of the simulator itself [1101.0955]. A plausible implication is that permABC should be understood not as a universal replacement for ABC, but as a specialized likelihood-free method for hierarchical simulators in which exchangeability is real, grouped labels are arbitrary, and fixed-order comparison is the dominant computational bottleneck.

Source: https://www.emergentmind.com/topics/permabc