SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Here, we leveraged the assumption that the likelihood  $p(\mathbf{x}_{1:M}|\boldsymbol{\xi})$  is fixed for all joint distributions, and thus, the joint distributions can be split into the likelihood  $p(\mathbf{x}_{1:N}^{\star}|\boldsymbol{\xi})$  and their associated prior/proposal distributions. The gradient of the Lagrangian vanishes for the optimal parameter distribution
$$
\left. \frac {\partial \mathcal {L}}{\partial \pi} \right| _ {\pi = \pi_ {t}} = - \log p \left(\mathbf {x} _ {1: N} ^ {\star} | \boldsymbol {\xi}\right) + \left[ \log \frac {\pi_ {t} (\boldsymbol {\xi})}{p (\boldsymbol {\xi})} + 1 \right] + \eta \left[ \log \frac {\pi_ {t} (\boldsymbol {\xi})}{\pi_ {t - 1} (\boldsymbol {\xi})} + 1 \right] + \lambda = 0. \tag {15}
$$
Reformulation yields
$$
\begin{array}{l} \pi_ {t} (\boldsymbol {\xi}) = p ^ {\frac {1}{1 + \eta}} (\boldsymbol {\xi}) \pi_ {t - 1} ^ {\frac {\eta}{1 + \eta}} (\boldsymbol {\xi}) \exp \left(\frac {\log p \left(\mathbf {x} _ {1 : N} ^ {\star} \mid \boldsymbol {\xi}\right)}{1 + \eta} - \frac {1 + \eta + \lambda}{1 + \eta}\right) \tag {16} \\ = Q ^ {- 1} (\eta) \left(\frac {p (\pmb {\xi})}{\pi_ {t - 1} (\pmb {\xi})}\right) ^ {\frac {1}{1 + \eta}} \exp \left(\frac {\log p (\mathbf {x} _ {1 : N} ^ {\star} | \pmb {\xi})}{1 + \eta}\right) \pi_ {t - 1} (\pmb {\xi}). \\ \end{array}
$$
The normalization constant  $Q(\eta) = \exp((1 + \eta + \lambda) / (1 + \eta))$  follows by marginalization of (16)
$$
Q (\eta) = \underset {\pi_ {t - 1} (\boldsymbol {\xi})} {\mathbb {E}} \left[ \left(\frac {p (\boldsymbol {\xi})}{\pi_ {t - 1} (\boldsymbol {\xi})}\right) ^ {\frac {1}{1 + \eta}} \exp \left(\frac {\log p (\mathbf {x} _ {1 : N} ^ {\star} | \boldsymbol {\xi})}{1 + \eta}\right) \right].
$$
We further obtain the dual of the Lagrangian by reinserting (16) into the Lagrangian (14)
$$
g (\eta) = - \eta \varepsilon - (1 + \eta) \log (Q (\eta)). \tag {17}
$$
A.2 Weighted maximum likelihood optimization (m-projection)
The m-projection of the optimal posterior onto the approximation family results in a weighted maximum likelihood formulation
$$
\begin{array}{l} \min  _ {\phi} \operatorname {K L} \left(\pi_ {t} (\boldsymbol {\xi}) \mid \mid q _ {\phi} (\boldsymbol {\xi})\right) (18) \\ = \max  _ {\phi} \int \log q _ {\phi} (\boldsymbol {\xi}) \pi_ {t} (\boldsymbol {\xi}) d \boldsymbol {\xi} \\ = \max  _ {\phi} \int \frac {1}{Q} \left(\frac {p (\boldsymbol {\xi})}{\pi_ {t - 1} (\boldsymbol {\xi})}\right) ^ {\frac {1}{1 + \eta_ {t}}} \tilde {p} (\mathbf {x} _ {1: N} ^ {\star} | \boldsymbol {\xi}) ^ {\frac {1}{1 + \eta_ {t}}} \pi_ {t - 1} (\boldsymbol {\xi}) \log q _ {\phi} (\boldsymbol {\xi}) d \boldsymbol {\xi} \\ = \max  _ {\phi} \mathbb {E} _ {\pi_ {t - 1} (\boldsymbol {\xi})} \left[ \underbrace {\left(\frac {p (\boldsymbol {\xi})}{p _ {t - 1} (\boldsymbol {\xi})}\right) ^ {\frac {1}{1 + \eta_ {t}}}} _ {w} \tilde {p} \left(\mathbf {x} _ {1: N} ^ {\star} | \boldsymbol {\xi}\right) ^ {\frac {1}{1 + \eta_ {t}}} \log q _ {\phi} (\boldsymbol {\xi}) \right]. (19) \\ \end{array}
$$
The weighting term  $w$  is independent of  $\phi$ , and as such, the formulation facilitates optimizing neural density estimators with gradient descent. This optimization resolves to weighted maximum likelihood where the weights are obtained from the pseudo-likelihood (8) and the importance weights. The weighted maximum likelihood formulation can be optimized in closed form for linear Gaussian models [43, 13], with Expectation-Maximization (EM) using Gaussian Mixture Models (GMMs) [11] or with gradient descent as done in this paper.
A.3 Optimizing with the i-projection
We can reformulate the minimization problem for the i-projection in the following way
$$
\begin{array}{l} \min  _ {\phi} \operatorname {K L} \left(q _ {\phi} (\boldsymbol {\xi}) \mid \mid \pi_ {t} (\boldsymbol {\xi})\right) (20) \\ = \min  _ {\phi} \mathbb {E} _ {q _ {\phi} (\boldsymbol {\xi})} \left[ \log \frac {q _ {\phi} (\boldsymbol {\xi})}{Q _ {\phi} ^ {- 1} \left(\frac {p (\boldsymbol {\xi})}{p _ {t - 1} (\boldsymbol {\xi})}\right) ^ {1 / (1 + \eta_ {t})} \tilde {p} \left(\mathbf {x} _ {1 : N} ^ {\star} \mid \boldsymbol {\xi}\right) ^ {\frac {1}{1 + \eta_ {t}}} \pi_ {t - 1} (\boldsymbol {\xi})} \right] (21) \\ = \min  _ {\boldsymbol {\phi}} \operatorname {K L} \left(q _ {\boldsymbol {\phi}} (\boldsymbol {\xi}) | | \pi_ {t - 1} (\boldsymbol {\xi})\right) - \underset {\pi_ {t - 1} (\boldsymbol {\xi})} {\mathbb {E}} \left[ \frac {q _ {\boldsymbol {\phi}} (\boldsymbol {\xi})}{\pi_ {t - 1} (\boldsymbol {\xi})} \log \left(\frac {\left(\frac {p (\boldsymbol {\xi})}{p _ {t - 1} (\boldsymbol {\xi})}\right) ^ {1 / (1 + \eta)} \tilde {p} \left(\mathbf {x} _ {1 : N} ^ {\star} | \boldsymbol {\xi}\right) ^ {\frac {1}{1 + \eta_ {t}}}}{Q _ {\boldsymbol {\phi}}}\right) \right]. \\ \end{array}
$$
The equation above alleviates the issue of back-propagating through the simulator by using importance sampling. The optimization problem is fitting the posterior estimator  $q$  to the proposal  $p(\pmb{\xi})$  while having a regularization term that forces the distribution to fit the reference data. The temperature parameter  $\eta$  can thus be interpreted as weighting the regularization term. Small values of  $\eta$  put more emphasis on the regularization term, while large values concentrate on containing the information of the proposal. For linear Gaussian models, a closed-form expression for the KL term in (21) exists. Therefore, it can be directly optimized using any non-linear optimization method.
Table A.1: Kernels used for the ABC and PLI variants during the experiments in Section 4. An IPM denoted by  $D$  plays the role of a distance measure between the reference data  $\mathbf{x}_{1:N}^{\star}$  and simulated samples  $\mathbf{x}_{1:M}$ . Parameter  $\beta_{t}$  controls the kernel bandwidth (see Section 3.1). Effective Sample Size (ESS) is defined as the inverse of the normalized weight's variance.
Kβt(D(x1:M, x1:N))	Algorithm	βt estimation	Update
1{D(x1:M, x1:N)≤βt}	SMC ABC	ESS	βt* = arg minβt ESS(wt,βt) - αESS(wt-1,βt-1)
PMC ABC	α-Quantile	βt* = QD(x1:M, x1:N)(α)
exp(-D(x1:M, x1:N)/2βt)	PLI	Trust-region	βt* = β(1 + arg maxηt g(ηt)), see (10)
A.4 Analysis of the partition function
We shed some light on the intractable log-partition function  $Z(\pmb{\xi})$  introduced in the pseudolikelihood (8). The partition function  $Z(\pmb{\xi})$  of (8) is an integral over sample space of  $\mathbf{x} \in \mathcal{X}$
$$
Z (\boldsymbol {\xi}) = \int_ {\mathcal {X}} \exp \left(- \frac {D \left(\mathbf {x} _ {1 : N} ^ {\star} , \mathbf {x} _ {1 : M}\right)}{\beta}\right) d \mathbf {x} _ {1: N} ^ {\star}. \tag {22}
$$
To approximate the intractable quantity, we approximate the integral through Monte Carlo simulations with a uniform distribution  $\mathcal{U}$
$$
Z (\pmb {\xi}) \approx \frac {V}{N} \sum_ {i = 1} ^ {N} \exp \left(- \frac {D ((\mathbf {x} _ {1 : N} ^ {\star}) _ {i} , \mathbf {x} _ {1 : M})}{\beta}\right); \quad (\mathbf {x} _ {1: N} ^ {\star}) _ {i} \sim \mathcal {U} (\cdot ; \bar {\mathbf {x}} - 5 \sqrt {\beta}, \bar {\mathbf {x}} + 5 \sqrt {\beta}). \tag {23}
$$
Figure A.1: Spearman correlation coefficient  $r(w, \hat{w}) \in [-1, 1]$  between the partition corrected weights  $\hat{w}_i$  and the uncorrected weights  $w_i$ . High values of  $r$  correspond to a high correlation of the weight rankings, thus meaning that the weights preserve relative ordering.
Figure A.2: Training plots comparing PLI trained with and without the partition function  $Z(\pmb{\xi})$  on  $N = 100$  samples. Top row: MMD between posterior samples and model samples. Bottom row: Wasserstein distance between posterior samples and model samples. On all tasks but SLCP, the inclusion of the partition function does not change the posterior inference.
As we cannot sample over the whole space  $\mathcal{X}$ , we choose to sample over the  $5\sigma$  interval of the exponential kernel, where  $\bar{\mathbf{x}}$  represents the mean of 100 prior simulations. We use 10000 samples from  $\mathcal{U}$  to approximate the partition function and evaluate the  $Z(\pmb{\xi})$  based on 100 samples from the target posterior  $\pi_t(\pmb{\xi})$ .
We evaluate the influence of the partition function  $Z(\pmb{\xi})$  on the performance of our PLI algorithm by comparing the weights  $\hat{w}_i$  and  $w_i$  as defined in (11) with and without  $Z(\pmb{\xi})$ , respectively. Despite the
weights being numerically different, we hypothesize that they do not change the relative ordering of the samples and, therefore, do not affect the Weighted Maximum Likelihood (WML) update (11) significantly. Therefore, we employ the Spearman correlation coefficient, a nonparametric measure of rank correlation, to capture such dependencies, which we report in Figure A.1. Contrary to our hypothesis, the weights with and without normalization are not perfectly rank-correlated in four out of five experiments when there is more than one observed data point. Potentially, this could lead to a different WML update, but when we evaluate the whole PLI algorithm with and without the partition function  $Z(\xi)$ , we find that its influence is marginal for both MMD-PLI and W-PLI in Figure A.2. Only on the SLCP task, an improvement of W-PLI can be seen when using the partition function, whereas MMD-PLI performs even better without it.
We have motivated PLI from a VI perspective. As mentioned in the related work section (see Sec. 5), this is similar to the General Variational Inference (GVI) approach [29], which also defines the posterior as a solution to an optimization problem, namely
$$
\pi (\boldsymbol {\xi}) = \underset {\pi} {\operatorname {a r g m i n}} \beta N \underset {\pi (\boldsymbol {\xi})} {\mathbb {E}} \left[ \mathcal {L} _ {N} (\boldsymbol {\xi}) \right] + \mathrm {K L} \left(\pi (\boldsymbol {\xi}) \mid | p (\boldsymbol {\xi})\right). \tag {24}
$$
When the loss is defined as the log-likelihood,  $\mathcal{L}_N(\pmb {\xi}) = \log p(\mathbf{x}_{1:N}^{\star}|\pmb {\xi})$  with  $\beta = 1 / N$ , the PLI objective (6) is recovered. However, when we substitute the pseudo-likelihood (8) into the GVI objective, we obtain an additional term in the loss which is given as an expectation over the log-partition function  $\mathbb{E}_{\pi}[-\log Z(\pmb {\xi})]$ . Therefore, PLI can be seen as GVI with an additional loss term, or GVI can be equated with PLI using unnormalized pseudo-likelihood.
B Algorithmic details: sequential Monte Carlo ABC
The foundations of SMC-ABC have been laid by Del Moral et al. [14], who introduced SMC samplers. These samplers describe an approximate inference routine in which the posterior is approximated through a sequence of intermediate target posteriors. In the context of ABC, the sequence of intermediate posteriors is defined by an adaptive bandwidth  $\beta_{t}$  of the approximate posterior  $p_{\beta_t}(\boldsymbol {\xi}|\mathbf{x}_{1:N}^\star)$  (4). Additionally, the sample efficiency of ABC is improved by replacing the prior as the sampling distribution with a proposal distribution  $\pi_t(\pmb {\xi})$ . The proposal distribution is represented by a set of particles  $\pi_t(\pmb {\xi}) = 1 / M\sum_{i = 1}^{M}\delta_{\pmb{\xi}_t^{(i)}}(\pmb {\xi})$  and through importance sampling an approximation of the target posterior  $p_{\beta_t}(\pmb {\xi}|\mathbf{x}_{1:N}^\star)$  can be obtained, (see (5)),
$$
p _ {\beta_ {t}} (\boldsymbol {\xi} | \mathbf {x} _ {1: N} ^ {\star}) \approx q _ {t} (\boldsymbol {\xi}) = \sum_ {i = 1} ^ {M} W _ {t} ^ {(i)} \delta_ {\boldsymbol {\xi} _ {t} ^ {(i)}} (\boldsymbol {\xi}); \quad W _ {t} ^ {(i)} = \frac {p _ {\beta_ {t}} \left(\boldsymbol {\xi} _ {t} ^ {(i)} \mid \mathbf {x} _ {1 : N} ^ {\star}\right)}{\pi_ {t} \left(\boldsymbol {\xi} ^ {(i)}\right)}, \tag {25}
$$
where  $W_{t}^{(i)}$  denote the importance weights. The proposal distribution  $\pi_t(\pmb{\xi})$  should ideally stay close to the target posterior  $p_{\beta_t}(\pmb{\xi}|\mathbf{x}_{1:N}^{\star})$  to improve the sample efficiency. Therefore, the proposal distribution is updated based on a Markov kernel  $K_{t + 1}(\pmb{\xi}_t,\pmb{\xi}_{t + 1})$  which is the transition probability from  $\pmb{\xi}_t$  to  $\pmb{\xi}_{t + 1}$ . The update of the proposal distribution is typically numerically intractable as it requires marginalization, i.e., integration over  $\pmb{\xi}_t$  for each inference step  $0:t$
$$
\pi_ {t + 1} \left(\boldsymbol {\xi} _ {t + 1}\right) = \int K _ {t + 1} \left(\boldsymbol {\xi} _ {t}, \boldsymbol {\xi} _ {t + 1}\right) \pi_ {t} \left(\boldsymbol {\xi} _ {t}\right) \mathrm {d} \boldsymbol {\xi} _ {t}. \tag {26}
$$
To alleviate the computational burden, Del Moral et al. [14] show that the joint representation of the proposal distribution  $\pi_t(\pmb{\xi}_{0:t})$  can be efficiently calculated as it only requires solving the product over  $t$  transitions
$$
\pi_ {t} \left(\boldsymbol {\xi} _ {0: t}\right) = \pi_ {0} \left(\boldsymbol {\xi} _ {0}\right) \prod_ {\tau = 0} ^ {t} K _ {t + 1} \left(\boldsymbol {\xi} _ {t}, \boldsymbol {\xi} _ {t + 1}\right). \tag {27}
$$
We define the joint proposal distribution as the empirical distribution  $\pi_t(\pmb{\xi}_{0:t}) = M^{-1}\sum_{i=1}^{M}\delta_{\pmb{\xi}_{0:t}^{(i)}}(\pmb{\xi}_{0:t})$  defined by a set of joint particles  $\pmb{\xi}_{0:t}^{(i)}$ . Thus, the joint posterior approxi-
mation of  $p_{\beta_t}(\pmb{\xi}_{0:t}|\mathbf{x}_{1:N}^\star)$  based on the importance weights reads as
$$
q _ {t} \left(\boldsymbol {\xi} _ {0: t}\right) = \sum_ {i = 1} ^ {M} w _ {t} ^ {(i)} \delta_ {\boldsymbol {\xi} _ {0: t} ^ {(i)}} \left(\boldsymbol {\xi} _ {0: t}\right); \quad w _ {t} ^ {(i)} = \frac {p _ {\beta_ {t}} \left(\boldsymbol {\xi} _ {0 : t} ^ {(i)} \mid \mathbf {x} _ {1 : N} ^ {\star}\right)}{\pi_ {t} \left(\boldsymbol {\xi} _ {0 : t} ^ {(i)}\right)} \tag {28}
$$
$$
\Rightarrow \quad q _ {t} (\boldsymbol {\xi} _ {t}) = \sum_ {i = 1} ^ {M} w _ {t} ^ {(i)} \delta_ {\boldsymbol {\xi} _ {t} ^ {(i)}} (\boldsymbol {\xi} _ {t}); \quad w _ {t} ^ {(i)} = \frac {p _ {\beta_ {t}} \left(\boldsymbol {\xi} _ {0 : t} ^ {(i)} \mid \mathbf {x} _ {1 : N} ^ {\star}\right)}{\pi_ {t} \left(\boldsymbol {\xi} _ {0 : t} ^ {(i)}\right)}. \tag {29}
$$
The marginal target posterior approximation  $q_{t}(\pmb{\xi}_{t})$  can be directly recovered from the joint approximation  $q_{t}(\pmb{\xi}_{0:t})$ . Furthermore, both distributions share their weights which means that it is only required to estimate the weights  $w_{t}$  in order to approximate the target posteriors  $p_{\beta_t}(\pmb{\xi}_t|\mathbf{x}_{1:N}^\star)$ . In general, the probability of the target joint posterior  $p_{\beta_t}(\pmb{\xi}_{0:t}^{(i)}|\pmb{\xi})$  is intractable. Therefore, the authors introduce an auxiliary backward Markov kernel  $L_{t}(\pmb{\xi}_{t + 1},\pmb{\xi}_{t})$  to simplify the computation
$$
p _ {\beta_ {t}} \left(\boldsymbol {\xi} _ {0: t} \mid \mathbf {x} _ {1: N} ^ {\star}\right) = p _ {\beta_ {t}} \left(\boldsymbol {\xi} _ {t} \mid \mathbf {x} _ {1: N} ^ {\star}\right) \prod_ {\tau = 0} ^ {t - 1} L _ {\tau} \left(\boldsymbol {\xi} _ {\tau + 1}, \boldsymbol {\xi} _ {\tau}\right). \tag {30}
$$
Assuming that a posterior approximation of the target posterior  $p_{\beta_t}(\pmb{\xi}_t|\mathbf{x}_{1:N}^\star)$  is available through the set of weighted particles  $\{(w_{t}^{(i)},\pmb{\xi}_{t}^{(i)})\}$  and the particles of the proposal distribution  $\pi_t(\pmb {\xi}) = M^{-1}\sum_{i = 1}^M\delta_{\pmb{\xi}_t^{(i)}}(\pmb {\xi})$  are updated based on a kernel transition  $\pmb{\xi}_{t + 1}^{(i)}\sim K_{t + 1}(\pmb{\xi}_t^{(i)},\pmb{\xi}_{t + 1}^{(i)})$ , then the importance weights  $w_{t + 1}$  are updated based on the following recursion
$$
\begin{array}{l} w _ {t + 1} = \frac {p _ {\beta_ {t + 1}} \left(\boldsymbol {\xi} _ {0 : t + 1}\right)}{\pi_ {t + 1} \left(\boldsymbol {\xi} _ {0 : t + 1}\right)} = \frac {p _ {\beta_ {t + 1}} \left(\boldsymbol {\xi} _ {t + 1}\right) \prod_ {\tau = 0} ^ {t} L _ {t} \left(\boldsymbol {\xi} _ {\tau + 1} , \boldsymbol {\xi} _ {\tau}\right)}{\pi_ {0} \left(\boldsymbol {\xi} _ {0}\right) \prod_ {\tau = 0} ^ {t} K _ {t} \left(\boldsymbol {\xi} _ {\tau} , \boldsymbol {\xi} _ {\tau + 1}\right)} (31) \\ = \underbrace {\frac {p _ {\beta_ {t + 1}} (\boldsymbol {\xi} _ {t + 1}) L _ {t} (\boldsymbol {\xi} _ {t + 1} , \boldsymbol {\xi} _ {t})}{p _ {\beta_ {t}} (\boldsymbol {\xi} _ {t}) K _ {t + 1} (\boldsymbol {\xi} _ {t} , \boldsymbol {\xi} _ {t + 1})}} _ {\hat {w} _ {t + 1}} \underbrace {\frac {p _ {\beta_ {t}} (\boldsymbol {\xi} _ {t}) \prod_ {\tau = 0} ^ {t - 1} L _ {t} (\boldsymbol {\xi} _ {\tau + 1} , \boldsymbol {\xi} _ {\tau})}{\pi_ {0} (\boldsymbol {\xi} _ {0}) \prod_ {\tau = 0} ^ {t - 1} K _ {t} (\boldsymbol {\xi} _ {\tau} , \boldsymbol {\xi} _ {\tau + 1})}} _ {w _ {t}}. (32) \\ \end{array}
$$
Thus, the sequential update is performed by updating the current weights  $w_{t}$  with the marginal weights  $\hat{w}_{t + 1}$ . Up to now, the choice of the backward kernel has been neglected. As it is an auxiliary quantity, several approximations can be made to model the backward kernel. Del Moral et al. [14] refer to the optimal backward kernel as the Markov kernel that minimizes the variance of the particles
$$
L _ {t} ^ {\mathrm {o p t}} (\boldsymbol {\xi} _ {t + 1}, \boldsymbol {\xi} _ {t}) = \frac {\pi (\boldsymbol {\xi} _ {t}) K _ {t + 1} (\boldsymbol {\xi} _ {t} , \boldsymbol {\xi} _ {t + 1})}{\pi_ {t + 1} (\boldsymbol {\xi} _ {t + 1})}.
$$
They further show that the optimal backward kernel recovers the marginal weights from (25)
$$
w _ {t + 1} ^ {\text {o p t}} := \frac {p _ {\beta_ {t + 1}} (\boldsymbol {\xi} | \mathbf {x} _ {1 : N} ^ {\star})}{\pi_ {t + 1} (\boldsymbol {\xi})} = W _ {t + 1}. \tag {33}
$$
In general, the optimal backward kernel is numerically intractable and has led to several other approximations summarized in Table B.2. Depending on choice of approximation, a number of different SMC-ABC methods have evolved, namely the classical SMC-ABC approach by Del Moral et al. [15], Population Monte Carlo (PMC)-ABC [51, 2, 31], and Metropolis-Hastings ABC [30]. Please refer to those references as well as Algorithms 2 and 3 for implementation details of these approaches.
Algorithm 2 Sequential Monte Carlo ABC [15]
1: input: reference data  $\mathbf{x}_{1:N}^{\star}$ , prior  $p(\boldsymbol{\xi})$ , stochastic simulator  $p(\mathbf{x}|\boldsymbol{\xi})$ , IPM  $D(\cdot, \cdot)$ , max. iteration count  $T$ , forward kernel  $K(\boldsymbol{\xi}_t, \boldsymbol{\xi}_{t+1})$ , resampling threshold  $V$ ,  $\alpha$
2: initialize particles  $\pmb{\xi}_0^{(k)}\sim p(\cdot)$
3: initialize particle weights  $w_0^{(k)} = 1 / K$
4: for  $t$  in  $1:T$  do
5: for each  $\pmb{\xi}_{t - 1}^{(k)}$  do
6: simulate  $\mathbf{x}_{1:M}^{(k)} = \{\mathbf{x}_m^{(k)}\sim p(\mathbf{x}|\pmb{\xi}_{t - 1}^{(k)})\}$
7: compute IPM  $s_{t - 1}^{(k)} = D(\mathbf{x}_{1:N}^{\star},\mathbf{x}_{1:M}^{\star})$
8: end for
9: update the bandwidth  $\beta_{t}$  by solving
$$
\begin{array}{l} \operatorname {E S S} \left(\left\{w _ {t} ^ {(k)} \right\}, \beta_ {t}\right) = \alpha \cdot \operatorname {E S S} \left(\left\{w _ {t - 1} ^ {(k)} \right\}, \beta_ {t -} \right. \\ w_{t}^{(k)}\propto w_{t - 1}^{(k)}\frac{\mathbb{1}_{\{s_{t - 1}^{(k)}\leq\beta_{t}\}}}{\mathbb{1}_{\{s_{t - 1}^{(k)}\leq\beta_{t - 1}\}}} \\ \end{array}
$$
10: if ESS  $(\{w_{t}^{(k)}\}, \beta_{t}) < V$  then
11: resample K particles  $\pmb{\xi}_{t}^{(k)}$  from  $\{\pmb{\xi}_{t - 1}^{(k)}\}$
12: set weights  $w_{t}^{(k)} = 1 / K$
13: end if
14: sample  $K$  particles  $\pmb{\xi}_t^{(k)}\sim K(\pmb{\xi}_{t - 1}^{(k)},\pmb{\xi}_t^{(k)})$
15: end for
16: output: posterior particles  $\pmb{\xi}_{T}^{(k)}$
Algorithm 3 PMC-ABC [31]
1: input: reference data  $\mathbf{x}_{1:N}^{\star}$ , prior  $p(\boldsymbol {\xi})$ , stochastic simulator  $p(\mathbf{x}|\boldsymbol {\xi})$ , IPM  $D(\cdot ,\cdot)$ , max. iteration count  $T$ , forward kernel  $K_{t + 1}(\pmb {\xi}_t,\pmb {\xi}_{t + 1})$ ,  $\alpha$  -Quantile  $\alpha$
2: initialize particles  $\pmb{\xi}_0^{(k)}\sim p(\cdot)$
3: initialize particle weights  $w_0^{(k)} = 1 / K$
4: store number of best particles  $K_{\alpha} = \alpha K$
5: for  $t$  in  $1:T$  do
6: elect  $K_{\alpha}$  best particles  $\hat{\xi}_{t - 1}^{(k)}$
7: sample  $K - K_{\alpha}$  proposal particles  $\tilde{\pmb{\xi}}_t^{(l)}\sim$ $K_{t}(\hat{\pmb{\xi}}_{t - 1}^{(k)},\tilde{\pmb{\xi}}_{t}^{(l)})$
8: for each  $\tilde{\pmb{\xi}}_t^{(l)}$  do
9: simulate  $\mathbf{x}_{1:M}^{(l)} = \{\mathbf{x}_m^{(l)}\sim p(\mathbf{x}|\tilde{\boldsymbol{\xi}}_t^{(l)})\}$
0: compute IPM  $s_t^{(l)} = D(\mathbf{x}_{1:N}^\star, \mathbf{x}_{1:M}^{(l)})$
1: end for
2: update bandwidth based on the empirical  $\alpha$ -Quantile  $\beta_{t} = \mathcal{Q}_{\{s_{t - 1}^{(k)}, s_{t}^{(l)}\}}(\alpha)$
3: update weights
$$
w _ {t} ^ {(k)} = \frac {p (\tilde {\boldsymbol {\xi}} _ {t} ^ {(k)})}{\sum_ {i = 1} ^ {K _ {\alpha}} \frac {w _ {t - 1} ^ {(i)}}{\sum_ {j = 1} ^ {K _ {\alpha}} w _ {t - 1} ^ {(j)}} K _ {t} (\boldsymbol {\xi} _ {t - 1} ^ {(i)} , \tilde {\boldsymbol {\xi}} _ {t} ^ {(k)})}
$$
14: set  $K$  new particles  $\pmb{\xi}_t^k = \{\hat{\pmb{\xi}}_{t - 1}^{(k)},\tilde{\pmb{\xi}}_t^{(k)}\}$
15: update forward kernel  $K_{t + 1}(\pmb{\xi}_t, \pmb{\xi}_{t + 1})$
16: end for
17: output: posterior particles  $\pmb{\xi}_{T}^{(k)}$
Here we detail the experimental configurations to reproduce the results covered in Figure 3 and C.1. A small grid search has been carried out over the learning rate, the trust-region parameter  $\varepsilon$ , the batch size, and the number of training samples on the SLCP and Furuta task for  $N = 50$ . The best-fitting hyperparameters over the two tasks are reported in Table C.3 and used throughout the experiments. The remaining parameters are taken from [32] to make the results comparable.
We complement Figure 3 with Figure C.1 to compare the results in the observation space and include the Furuta pendulum.
Table B.2: Approximations of the optimal backward kernel  $L_{t}^{\mathrm{opt}}(\pmb{\xi}_{t+1}, \pmb{\xi}_{t})$  lead to different SMC-ABC approaches.
Algorithm	Assumption	\(\tilde{L}_{t}\)	\(\hat{w}_{t+1}\)
Optimal	-	\(\frac{\pi_{t}(\boldsymbol{\xi}_{t})K_{t+1}(\boldsymbol{\xi}_{t},\boldsymbol{\xi}_{t+1})}{\pi_{t+1}(\boldsymbol{\xi}_{t+1})}\)	-
PMC-ABC	\(\pi \approx p_{\beta_{t}}\)	\(\frac{p_{\beta_{t}}(\boldsymbol{\xi}_{t}|x_{1:N}^{*})K_{t+1}(\boldsymbol{\xi}_{t},\boldsymbol{\xi}_{t+1})}{\int p_{\beta_{t}}(\boldsymbol{\xi}_{t}|x_{1:N}^{*})K_{t+1}(\boldsymbol{\xi}_{t},\boldsymbol{\xi}_{t+1})d\boldsymbol{\xi}_{t}}\)	\(\frac{p_{\beta_{t+1}}(\boldsymbol{\xi}_{t+1}|x_{1:N}^{*})}{\int p_{\beta_{t}}(\boldsymbol{\xi}_{t}|x_{1:N}^{*})K_{t+1}(\boldsymbol{\xi}_{t},\boldsymbol{\xi}_{t+1})d\boldsymbol{\xi}_{t}}\)
SMC-ABC	\(p_{\beta_{t+1}} \approx p_{\beta_{t}}\)	\(\frac{p_{\beta_{t}}(\boldsymbol{\xi}_{t}|x_{1:N}^{*})K_{t+1}(\boldsymbol{\xi}_{t},\boldsymbol{\xi}_{t+1})}{p_{\beta_{t}}(\boldsymbol{\xi}_{t+1}|x_{1:N}^{*})}\)	\(\frac{p_{\beta_{t+1}}(\boldsymbol{\xi}_{t}|x_{1:N}^{*})}{p_{\beta_{t}}(\boldsymbol{\xi}_{t}|x_{1:N}^{*})}\)
MH-ABC	\(L_{t}(\boldsymbol{\xi}_{t+1},\boldsymbol{\xi}_{t}) = K_{t+1}(\boldsymbol{\xi}_{t+1},\boldsymbol{\xi}_{t})\)	\(\frac{p_{\beta_{t+1}}(\boldsymbol{\xi}_{t+1}|x_{1:N}^{*})K_{t+1}(\boldsymbol{\xi}_{t+1},\boldsymbol{\xi}_{t})}{p_{\beta_{t}}(\boldsymbol{\xi}_{t}|x_{1:N}^{*})K_{t+1}(\boldsymbol{\xi}_{t},\boldsymbol{\xi}_{t+1})}\)
Figure C.1: Evaluation of the posterior performance on three different tasks (displayed along the columns). A node represents the mean and standard deviation of 10 experiments with different random seeds, each carried out using  $N$  data points for conditioning. The samples from the approximate posterior  $\xi \sim q(\pmb{\xi}|\mathbf{x}_{1:N}^{\star})$  are compared against the reference posterior samples with the Wasserstein distance and the MMD when available. Additionally, the log probability of the ground-truth parameter  $\pmb{\xi}^{gt}$  is evaluated and posterior predictive checks are carried out on all tasks. The ground-truth parameters are described in Appendix C. Lower values are better for all metrics.
C.1 Approximation of the integral probability metrics