SlowGuess/NeurIPS_2023_OCR huggingface dataset:
From the strong law of large numbers, almost surely  $n^{-1}W_{n}\to \int \frac{p}{q}\mathrm{d}q = 1$ . Thus it suffices to show that the final term in Equation (12) converges almost surely to 0. To achieve this, we can check the conditions of Proposition 10 are satisfied.
Since  $q$  and  $h(\cdot) = \mathcal{S}_{p,q}k(x,\cdot)$  satisfy the conditions of Proposition 1, the condition  $\int k_q(x,\cdot)\mathrm{d}q = 0$  is satisfied. Let  $\phi (z) = (1 + \| z\| ^2)^{-\beta}$  so that  $k(x,y) = \phi (x - y)$  is the inverse multi-quadric kernel. Note that  $\phi (0) = 1$  and  $\Delta \phi (0) = -d$ . Then, from Proposition 9, we have that  $k_{q}(x,x) = -\Delta \phi (0) + \phi (0)\| \nabla \log q\|^{2} = d + \| \nabla \log q\|^{2}$ . Then
$$
\int \exp \left\{\gamma k _ {q} (x, x) \right\} \mathrm {d} q (x) = \exp \left\{\gamma d \right\} \int \exp \left\{\gamma \| \nabla \log q \| ^ {2} \right\} \mathrm {d} q <   \infty ,
$$
which establishes that the conditions of Proposition 10 are satisfied and completes the proof.
B Stein Variational Inference Without Second-Order Gradient
This section contains sufficient conditions for unbiased stochastic gradient estimators to exist in the context of Stein Variational Inference; see Section 4.2 of the main text. The main result that we prove is as follows:
Proposition 11 (Stochastic Gradients). Let  $p, q, R \in \mathcal{P}(\mathbb{R}^d)$  and  $T^\theta : \mathbb{R}^d \to \mathbb{R}^d$  for each  $\theta \in \mathbb{R}^p$ . Let  $\theta \mapsto \nabla_\theta T^\theta(x)$  be bounded. Assume that for each  $\vartheta \in \mathbb{R}^p$  there is an open neighbourhood  $N_\vartheta \subset \mathbb{R}^p$  such that
$$
\begin{array}{l} \int \sup  _ {\theta \in N _ {\vartheta}} \left(\frac {q (T ^ {\theta} (x))}{p (T ^ {\theta} (x))}\right) ^ {2} \mathrm {d} R (x) <   \infty , \\ \int \sup  _ {\theta \in N _ {\vartheta}} \frac {q (T ^ {\theta} (x))}{p (T ^ {\theta} (x))} \| \nabla \log r (T ^ {\theta} (x)) \| d R (x) <   \infty , \\ \int \sup  _ {\theta \in N _ {\vartheta}} \frac {q (T ^ {\theta} (x))}{p (T ^ {\theta} (x))} \| \nabla^ {2} \log r (T ^ {\theta} (x)) \| d R (x) <   \infty , \\ \end{array}
$$
for each of  $r \in \{p, q\}$ . Let  $k$  be the inverse multi-quadratic kernel in Equation (2) and let  $u(x, y)$  denote the integrand in Equation (6). Then
$$
\nabla_ {\theta} \mathrm {D} _ {p, q} (\pi_ {\theta}) ^ {2} = \mathbb {E} \left[ \frac {1}{n (n - 1)} \sum_ {i \neq j} \nabla_ {\theta} u (T ^ {\theta} (x _ {i}), T ^ {\theta} (x _ {j})) \right]
$$
where the expectation is taken with respect to independent samples  $x_{1},\ldots ,x_{n}\sim R$
The role of Proposition 11 is to demonstrate how an unbiased gradient estimator may be constructed, whose computation requires first-order derivatives of  $p$  only, and whose cost is  $O(n^2)$ . Although the assumption that  $\theta \mapsto \nabla_{\theta}T^{\theta}(x)$  is bounded seems strong, it can typically be satisfied by reparametrisation of  $\theta \in \mathbb{R}^p$ .
To prove Proposition 11, we exploit the following general result due to Fisher et al. [2021]:
Proposition 12. Let  $R \in \mathcal{P}(\mathbb{R}^p)$ . Let  $\Theta \subseteq \mathbb{R}^p$  be an open set and let  $u: \mathbb{R}^d \times \mathbb{R}^d \to \mathbb{R}$ ,  $T^\theta: \mathbb{R}^d \to \mathbb{R}^d$ ,  $\theta \in \Theta$ , be functions such that, for all  $\vartheta \in \Theta$ ,
(A1)  $\iint |u(T^{\vartheta}(x),T^{\vartheta}(y))|\mathrm{d}R(x)\mathrm{d}R(y) < \infty$
(A2) there exists an open neighbourhood  $N_{\vartheta} \subset \Theta$  of  $\vartheta$  such that
$$
\iint_ {\theta \in N _ {\vartheta}} \| \nabla_ {\theta} u (T ^ {\theta} (x), T ^ {\theta} (y)) \| d R (x) d R (y) <   \infty .
$$
Then  $F(\theta) \coloneqq \iint u(T^{\theta}(x), T^{\theta}(y)) \, \mathrm{d}R(x) \, \mathrm{d}R(y)$  is well-defined for all  $\theta \in \Theta$  and
$$
\nabla_ {\theta} F (\theta) = \mathbb {E} \left[ \frac {1}{n (n - 1)} \sum_ {i \neq j} \nabla_ {\theta} u (T ^ {\theta} (x _ {i}), T ^ {\theta} (x _ {j})) \right],
$$
Proof. This is Proposition 1 in Fisher et al. [2021].
Proof of Proposition 11. In what follows we aim to verify the conditions of Proposition 12 hold for the choice  $u(x,y) = k_q(x,y)$ , where  $k_{q}$  was defined in Equation (5).
(A1): From the first line in the proof of Proposition 4, the functions  $\mathcal{S}_{p,q}k(x,\cdot)$ ,  $x\in \mathbb{R}^d$ , are in  $\mathcal{H}(k)^d$ . Since  $(x,y)\mapsto u(x,y) = \langle \mathcal{S}_{p,q}k(x,\cdot),\mathcal{S}_{p,q}k(y,\cdot)\rangle_{\mathcal{H}(k)^d}$  is positive semi-definite, from Cauchy-Schwarz,  $|u(x,y)|\leq \sqrt{u(x,x)}\sqrt{u(y,y)}$ . Thus
$$
\begin{array}{l} \int | u (T ^ {\theta} (x), T ^ {\theta} (y)) | \mathrm {d} R (x) \mathrm {d} R (y) = \int | u (x, y) | \mathrm {d} T _ {\#} ^ {\theta} R (x) \mathrm {d} T _ {\#} ^ {\theta} R (y) \\ \leq \left(\int \sqrt {u (x , x)} \mathrm {d} T _ {\#} ^ {\theta} R (x)\right) ^ {2}. \\ \end{array}
$$
Since  $k(x,y) = \phi (x - y)$ , we have from Proposition 9 that
$$
u (x, x) = \left(\frac {q (x)}{p (x)}\right) ^ {2} \left[ - \Delta \phi (0) + \phi (0) \| \nabla \log q (x) \| ^ {2} \right]
$$
$$
\int \sqrt {u (x , x)} \mathrm {d} T _ {\#} ^ {\theta} R (x) \leq \sqrt {\int \left(\frac {q}{p}\right) ^ {2} \mathrm {d} T _ {\#} ^ {\theta} R} \sqrt {\int | - \Delta \phi (0) + \phi (0) \| \nabla \log q \| ^ {2} | \mathrm {d} T _ {\#} ^ {\theta} R}
$$
which is finite by assumption.
(A2): Fix  $x, y \in \mathbb{R}^d$  and let  $R_x(\theta) \coloneqq q(T^\theta(x)) / p(T^\theta(y))$ . From repeated application of the product rule of differentiation, we have that
$$
\nabla_ {\theta} u (T ^ {\theta} (x), T ^ {\theta} (y)) = \underbrace {k _ {q} (T ^ {\theta} (x) , T ^ {\theta} (y)) \nabla_ {\theta} [ R _ {x} (\theta) R _ {y} (\theta) ]} _ {(*)} + \underbrace {R _ {x} (\theta) R _ {y} (\theta) \nabla_ {\theta} k _ {q} (T ^ {\theta} (x) , T ^ {\theta} (y))} _ {(**)}.
$$
Let  $b_{p}(x) \coloneqq \nabla \log p(x), \quad b_{q}(x) \coloneqq \nabla \log q(x), \quad b(x) \coloneqq b_{q}(x) - b_{p}(x), \quad \text{and} \quad [\nabla_{\theta}T^{\theta}(x)]_{i,j} = (\partial/\partial\theta_{i})T_{j}^{\theta}(x)$ . In what follows, we employ a matrix norm on  $\mathbb{R}^{d\times d}$  which is consistent with the Euclidean norm on  $\mathbb{R}^d$ , meaning that  $\| \nabla_{\theta}T^{\theta}(x)b(T^{\theta}(x))\| \leq \| \nabla_{\theta}T^{\theta}(x)\| \| b(T^{\theta}(x))\|$  for each  $\theta \in \Theta$  and  $x \in \mathbb{R}^d$ . Considering the first term (*) , further applications of the chain rule yield that
$$
\nabla_ {\theta} \left[ R _ {x} (\theta) R _ {y} (\theta) \right] = R _ {x} (\theta) R _ {y} (\theta) \left[ \nabla_ {\theta} T ^ {\theta} (x) b (T ^ {\theta} (x)) + \nabla_ {\theta} T ^ {\theta} (y) b (T ^ {\theta} (y)) \right]
$$
and from the triangle inequality we obtain a bound
$$
\left\| \nabla_ {\theta} \left[ R _ {x} (\theta) R _ {y} (\theta) \right] \right\| \leq R _ {x} (\theta) R _ {y} (\theta) \left[ \| \nabla_ {\theta} T ^ {\theta} (x) \| \| b (T ^ {\theta} (x)) \| + \| \nabla_ {\theta} T ^ {\theta} (y) \| \| b (T ^ {\theta} (y)) \| \right].
$$
Let  $\lesssim$  denote inequality up to an implicit multiplicative constant. Since we assumed that  $\| \nabla_{\theta}T^{\theta}(x)\|$  is bounded, and the inverse multi-quadric kernel  $k$  is bounded, we obtain that
$$
| (*) | \lesssim R _ {x} (\theta) R _ {y} (\theta) \left[ \| b (T ^ {\theta} (x)) \| + \| b (T ^ {\theta} (y)) \| \right].
$$
Similarly, from Equation (5), and using also the fact that the inverse multi-quadric kernel  $k$  has derivatives or all orders [Lemma 4 of Fisher et al., 2021], we obtain a bound
$$
\begin{array}{l} \left\| \nabla_ {\theta} k _ {q} \left(T ^ {\theta} (x), T ^ {\theta} (y)\right) \right\| \lesssim \left[ 1 + \left\| b _ {q} \left(T ^ {\theta} (x)\right) \right\| + \left\| \nabla b _ {q} \left(T ^ {\theta} (x)\right) \right\| \right] \left[ 1 + \left\| b _ {q} \left(T ^ {\theta} (y)\right) \right\| \right] \\ + \left[ 1 + \| b _ {q} (T ^ {\theta} (y)) \| + \| \nabla b _ {q} (T ^ {\theta} (y)) \| \right] \left[ 1 + \| b _ {q} (T ^ {\theta} (x)) \| \right] \\ \end{array}
$$
which we multiply by  $R_{x}(\theta)R_{y}(\theta)$  to obtain a bound on  $(\ast \ast)$ . Thus we have an overall bound
$$
\begin{array}{l} \left\| \nabla_ {\theta} u (T ^ {\theta} (x), T ^ {\theta} (y)) \right\| \lesssim R _ {x} (\theta) R _ {y} (\theta) \left\{\left[ 1 + \| b _ {q} (T ^ {\theta} (x)) \| + \| \nabla b _ {q} (T ^ {\theta} (x)) \| \right] \left[ 1 + \| b _ {q} (T ^ {\theta} (y)) \| \right] \right. \\ \left. + \left[ 1 + \| b _ {q} (T ^ {\theta} (y)) \| + \| \nabla b _ {q} (T ^ {\theta} (y)) \| \right] \left[ 1 + \| b _ {q} (T ^ {\theta} (x)) \| \right] \right\}. \\ \end{array}
$$
Substituting this bound into  $\iint \sup_{\theta \in N_{\vartheta}}\| \nabla_{\theta}u(T^{\theta}(x),T^{\theta}(y))\| \mathrm{d}R(x)\mathrm{d}R(y)$ , and factoring terms into products of single integrals, we obtain an explicit bound on this double integral in terms of the following quantities (where  $r\in \{p,q\}$ ):
$$
\int_ {\theta \in N _ {\vartheta}} \sup  _ {R (x) \in \mathcal {R} (x)} R _ {x} (\theta) \mathrm {d} R (x)
$$
$$
\int_ {\theta \in N _ {\vartheta}} \sup  _ {R (x) \in T ^ {\theta} (x)} R _ {x} (\theta) \| b _ {r} (T ^ {\theta} (x)) \| d R (x)
$$
$$
\int_ {\theta \in N _ {\vartheta}} \sup  _ {R (x) \in \mathbb {N} _ {\vartheta}} R _ {x} (\theta) \| \nabla b _ {r} (T ^ {\theta} (x)) \| d R (x)
$$
which we have assumed exist.
Thus the conditions of Proposition 12 hold, and the result immediately follows.
These appendices contain the additional empirical results referred to in Section 3, together with full details required to reproduce the experiments described in Section 4 of the main text.
C.1 Detection of Convergence and Non-Convergence
This appendix contains full details for the convergence plots of Figure 1. In Figure 1, we considered the target distribution
$$
p (x) = \sum_ {i = 1} ^ {3} w _ {i} \mathcal {N} (x; \mu_ {i}, \sigma_ {i} ^ {2}),
$$
where  $\mathcal{N}(x;\mu,\sigma^2)$  is the univariate Gaussian density with mean  $\mu$  and variance  $\sigma^2$ . The parameter choices used were  $(w_1,w_2,w_3) = (0.375,0.5625,0.0625), (\mu_1,\mu_2,\mu_3) = (-0.4,0.3,0.06)$  and  $(\sigma_1^2,\sigma_2^2,\sigma_3^2) = (0.2,0.2,0.9)$ .
The approximating sequences considered were location-scale sequences of the form  $L_{\#}^{n}u$ , where  $L^{n}(x) = a_{n} + b_{n}x$  for some  $(a_{n})_{n\in \mathbb{N}}$  and  $(b_{n})_{n\in \mathbb{N}}$  and  $u\in \mathcal{P}(\mathbb{R})$ . For the converging sequences, we set  $u = p$  and for the non-converging sequences, we set  $u = \mathcal{N}(0,0.5)$ . We considered three different choices of  $(a_{n})_{n\in \mathbb{N}}$  and  $(b_{n})_{n\in \mathbb{N}}$ , one for each colour. The sequences  $(a_{n})_{n\in \mathbb{N}}$  and  $(b_{n})_{n\in \mathbb{N}}$  used are shown in Figure S1. The specification of our choices of  $q$  is the following:
- Prior: We took  $q \sim \mathcal{N}(0, 0.75^2)$ .
- Laplace: The Laplace approximation computed was  $q \sim \mathcal{N}(0.3, 0.2041^2)$ .
(b)
Figure S1: The sequences  $a_{n}$  and  $b_{n}$  used in the location-scale sequences. (a) The sequences  $a_{n}$  and  $b_{n}$  used in the location-scale sequences in Figure 1. (b) The sequences  $a_{n}$  and  $b_{n}$  used in the location-scale sequences in Figure 2. In each case, the colour used of each curve indicates which of the sequences  $(\pi)_{n\in \mathbb{N}}$  they correspond to.
- GMM: The Gaussian mixture model was computed using 100 samples from the target  $p$ . The number of components used was 2, since this value minimised the Bayes information criterion [Schwarz, 1978].
- KDE: The kernel density estimate was computed using 100 samples from the target  $p$ . We utilised a Gaussian kernel  $k(x,y) = \exp(- (x - y)^2 / \ell^2)$  with the lengthscale or bandwidth parameter  $\ell$  determined by Silverman's rule of thumb [Silverman, 1986].
The values of GF-KSD reported in Figure 1 were computed using a quasi Monte Carlo approximation to the integral (6), utilising a length 300 low-discrepancy sequence. The low discrepancy sequences were obtained by first specifying a uniform grid over  $[0,1]$  and then performing the inverse CDF transform for each member of the sequence  $\pi_{n}$ .
C.2 Avoidance of Failure Modes
This appendix contains full details of the experiment reported in Section 3.3 and an explanation of the failure mode reported in Figure 2a. The sequences considered are displayed in Figure S2. Each sequence was a location-scale sequences of the form  $L_{\#}^{n}u$ , where  $L^{n}(x) = a_{n} + b_{n}x$  for some  $(a_{n})_{n\in \mathbb{N}}$  and  $(b_{n})_{n\in \mathbb{N}}$  and  $u\in \mathcal{P}(\mathbb{R})$ . For the converging sequences, we set  $u = p$ . The specification of the settings of each failure mode are as follows:
- Failure mode (a) [Figure 2a]: We took  $p$  as the target used in Figure 1 and detailed in Appendix C.1 and took  $q \sim \mathcal{N}(0,1.5^2)$ . The  $a_n$  and  $b_n$  sequences used are displayed in Figure S1a. The values of GF-KSD reported were computed using a quasi Monte Carlo approximation, using a length 300 low discrepancy sequence. The low discrepancy sequences were obtained by first specifying a uniform grid over [0, 1] and then performing the inverse CDF transform for each member of the sequence  $\pi_n$ .
- Failure mode (b) [Figure 2b]: We took  $p \sim \mathcal{N}(0,1)$  and  $q \sim \mathcal{N}(-0.7,0.1^2)$ . The  $a_{n}$  and  $b_{n}$  sequences used are displayed in Figure S1b. The values of GF-KSD reported were computed using a quasi Monte Carlo approximation, using a length 300 low discrepancy sequence. The low discrepancy sequences were obtained by first specifying a uniform grid over [0,1] and then performing the inverse CDF transform for each member of the sequence  $\pi_{n}$ .
- Failure Mode (c) [Figure 2c]: In each dimension  $d$  considered, we took  $p \sim \mathcal{N}(0, I)$  and  $q \sim \mathcal{N}(0, 1.1I)$ . The  $a_{n}$  and  $b_{n}$  sequences $^5$  used are displayed in Figure S1b. The values of GF-KSD reported were computed using a quasi Monte Carlo approximation, using a length 1,024 Sobol sequence in each dimension  $d$ .
5Note that for  $d > 1$  , we still considered location-scale sequences of the form  $L^{n}(x) = a_{n} + b_{n}x$
Figure S2: Test sequences  $(\pi_n)_{n\in \mathbb{N}}$  used in Figure 2. The colour and style of each sequence indicates which of the curves in Figure 2 is being considered. In the second row from the top, the sequence used when  $d = 1$  in Figure 2c is shown in the final column.
- Failure mode (d) [Figure 2d]: We took  $p = q$ , with  $p(x) = 0.5\mathcal{N}(x; -1,0.1^2) + 0.5\mathcal{N}(x;1,0.1^2)$ , where  $\mathcal{N}(x;\mu,\sigma^2)$  is the univariate Gaussian density with mean  $\mu$  and variance  $\sigma^2$ . The  $a_n$  and  $b_n$  sequences used are displayed in Figure S1b. For the non-converging sequences we took  $u = \mathcal{N}(1,0.1^2)$  and used the  $a_n$  and  $b_n$  sequences specified in Figure S1b. The values of GF-KSD reported were computed using a quasi Monte Carlo approximation, using a length 300 low discrepancy sequence. The low discrepancy sequences were obtained by first specifying a uniform grid over [0,1] and then performing the inverse CDF transform for each member of the sequence  $\pi_n$ .
In Figure S3, we provide an account of the degradation of convergence detection between  $q =$  Prior considered in Figure 1 and  $q = \mathcal{N}(0,1.5^2)$  of Failure mode (a). In Figure S3a, it can be seen that the value of the integrals  $\int (q / p)^2 \, \mathrm{d}\pi_n$  are finite for each element of the pink sequence  $\pi_n$ . However, in Figure S3b, it can be seen that the values of the integrals  $\int (q / p)^2 \, \mathrm{d}\pi_n$  are infinite for the last members of the sequence  $\pi_n$ , thus violating a condition of Theorem 1.
C.3 Gradient-Free Stein Importance Sampling
This appendix contains full details for the experiment reported in Section 4.1. We considered the following Lotka-Volterra dynamical system:
$$
\dot {u} (t) = \alpha^ {\prime} u (t) - \beta^ {\prime} u (t) v (t), \qquad \dot {v} (t) = - \gamma^ {\prime} v (t) + \delta^ {\prime} u (t) v (t), \qquad (u (0), v (0)) = (u _ {0} ^ {\prime}, v _ {0} ^ {\prime}).
$$
(c)
Figure S3: Explanation of Failure Mode (a). (a) Values of  $(q / p)^{2}\pi_{n}$  for  $q =$  Prior and for the converging pink sequence displayed in Figure 1. (b) Values of  $(q / p)^{2}\pi_{n}$  for  $q = \mathcal{N}(0,1.5^{2})$  and for the converging pink sequence displayed in the first column and first row of Figure S2. (c) Values of  $q^{2} / p$  for different choices of  $q$ .
Using 21 observations  $u_{1}, \ldots, u_{21}$  and  $v_{1}, \ldots, v_{21}$  over times  $t_{1} < \ldots < t_{21}$ , we considered the probability model
$$
u _ {i} \sim \operatorname {L o g - n o r m a l} (\log u (t _ {i}), \left(\sigma_ {1} ^ {\prime}\right) ^ {2}), \quad v _ {i} \sim \operatorname {L o g - n o r m a l} (\log v (t _ {i}), \left(\sigma_ {2} ^ {\prime}\right) ^ {2}).
$$
In order to satisfy positivity constraints, we performed inference on the logarithm of the parameters  $(\alpha, \beta, \gamma, \delta, u_0, v_0, \sigma_1, \sigma_2) = (\log \alpha', \log \beta', \log \gamma', \log \delta', \log u_0', \log v_0', \log \sigma_1', \log \sigma_2')$ . We took the following independent priors on the constrained parameters:
$$
\alpha^ {\prime} \sim \operatorname {L o g - n o r m a l} (\log (0. 7), 0. 6 ^ {2}), \beta^ {\prime} \sim \operatorname {L o g - n o r m a l} (\log (0. 0 2), 0. 3 ^ {2}),
$$
$$
\gamma^ {\prime} \sim \operatorname {L o g - n o r m a l} (\log (0. 7), 0. 6 ^ {2}), \delta^ {\prime} \sim \operatorname {L o g - n o r m a l} (\log (0. 0 2), 0. 3 ^ {2}),
$$
$$
u _ {0} ^ {\prime} \sim \operatorname {L o g - n o r m a l} (\log (1 0), 1), v _ {0} ^ {\prime} \sim \operatorname {L o g - n o r m a l} (\log (1 0), 1),
$$
$$
\sigma_ {1} ^ {\prime} \sim \operatorname {L o g - n o r m a l} (\log (0. 2 5), 0. 0 2 ^ {2}), \sigma_ {2} ^ {\prime} \sim \operatorname {L o g - n o r m a l} (\log (0. 2 5), 0. 0 2 ^ {2}).
$$
In order to obtain independent samples from the posterior for comparison, we utilised Stan [Stan Development Team, 2022] to obtain 8,000 posterior samples using four Markov chain Monte Carlo chains. Each chain was initialised at the prior mode. The data analysed are due to Hewitt [1921] and can be seen, along with a posterior predictive check, in Figure S4.
The Laplace approximation was obtained by the use of 48 iterations of the L-BFGS optimisation algorithm [Liu and Nocedal, 1989] initialised at the prior mode. The Hessian approximation was obtained using Stan's default numeric differentiation of the gradient.
Finally, the quadratic programme defining the optimal weights of gradient-free Stein importance sampling (refer to Theorem 3) was solved using the splitting conic solver of O'Donoghue et al. [2016].
C.4 Stein Variational Inference Without Second-Order Gradient
This appendix contains full details for the experiment reported in Section 4.2. We considered the following bivariate densities
$$
p _ {1} (x, y) := \mathcal {N} (x; 0, \eta_ {1} ^ {2}) \mathcal {N} (y; \sin (a x), \eta_ {2} ^ {2}),
$$
$$
p _ {2} (x, y) := \mathcal {N} (x; 0, \sigma_ {1} ^ {2}) \mathcal {N} (y; b x ^ {2}, \sigma_ {2} ^ {2}),
$$
where  $\mathcal{N}(x;\mu ,\sigma^2)$  is the univariate Gaussian density with mean  $\mu$  and variance  $\sigma^2$ . The parameter choices for the sinusoidal experiment  $p_1$  were  $\eta_1^2 = 1.3^2$ ,  $\eta_2^2 = 0.09^2$  and  $a = 1.2$ . The parameter choices for the banana experiment  $p_2$  were  $\sigma_1^2 = 1$ ,  $\sigma_2^2 = 0.2^2$  and  $b = 0.5$ .
The development of a robust stochastic optimisation routine for measure transport with GF-KSD is beyond the scope of this work, and in what follows we simply report one strategy that was successfully used in the setting of the application reported in the main text. This strategy was based on
Figure S4: Posterior predictive check for the Lotka-Volterra model. The shaded blue region indicates the  $50\%$  interquartile range of the posterior samples.
Figure S5: Tempering sequence  $(\epsilon_{m})_{m\in \mathbb{N}}$  used in each of the variational inference experiments.
tempering of  $p$ , the distributional target, to reduce a possibly rather challenging variational optimisation problem into a sequence of easier problems to be solved. Specifically, we considered tempered distributions  $p_m \in \mathcal{P}(\mathbb{R}^d)$  with log density
$$
\log p _ {m} (x) = \epsilon_ {m} \log p _ {0} (x) + (1 - \epsilon_ {m}) \log p (x),
$$
where  $(\epsilon_{m})_{m\in \mathbb{N}}\in [0,1]^{\mathbb{N}}$  is the tempering sequence and  $p_0\in \mathcal{P}(\mathbb{R}^d)$  is fixed. In this case  $p_0$  was taken to be  $\mathcal{N}(0,2I)$  in both the banana and sinusoidal experiment. Then, at iteration  $m$  of stochastic optimisation, we considered the variational objective function
$$
\pi \mapsto \log D _ {p _ {m}, q} (\pi)
$$
where  $q = \pi_{\theta_m}$ , as explained in the main text. Tempering has been applied in the context of normalising flows in Prangle and Viscardi [2023]. The tempering sequence used  $(\epsilon_{m})_{m\in \mathbb{N}}$  for each of the experiments is displayed in Figure S5.
For each experiment, the stochastic optimisation routine used was Adam [Kingma and Ba, 2015] with learning rate 0.001. Due to issues involving exploding gradients due to the  $q / p$  term in GF-KSD, we utilised gradient clipping in each of the variational inference experiments, with the maximum 2-norm value taken to be 30. In both the banana and sinusoidal experiment, the parametric class of transport maps  $T^{\theta}$  was the inverse autoregressive flow of Kingma et al. [2016]. In the banana experiment, the dimensionality of the hidden units in the underlying autoregressive neural network was taken as 20. In the sinusoidal experiment, the dimensionality of the hidden units in the underlying autoregressive neural network was taken as 30. For the comparison with standard kernel Stein discrepancy, the same parametric class  $T^{\theta}$  and the same initialisations of  $\theta$  were used.
(b)
Figure S6: The  $\pi_0$  and tempering sequences used in the additional convergence detection experiments. The colour of each curve indicates which of the sequences in Figure S7 and Figure S8 they correspond with. (a) The  $\pi_0$  choices of each tempered sequence of distributions. (b) The tempering sequences  $(\epsilon_m)_{m\in \mathbb{N}}$  considered.
C.5 Additional Experiments
Appendix C.5.1 explores the impact of  $p$  on the conclusions drawn in the main text. Appendix C.5.2 investigates the sensitivity of the proposed discrepancy to the choice of the parameters  $\sigma$  and  $\beta$  that appear in the kernel. Appendix C.5.3 compares the performance of GF-KSD importance sampling, KSD importance sampling and self-normalised importance sampling.
C.5.1 Exploring the Effect of  $p$
In this section we investigate the robustness of the convergence detection described in Figure 1 subject to different choices of the target  $p$ . We consider two further choices of  $p$ :
$$
p _ {1} (x) = \sum_ {i = 1} ^ {4} c _ {i} \mathcal {N} (x; \mu_ {i}, \sigma_ {i} ^ {2}),
$$
$$
p _ {2} (x) = \sum_ {i = 1} ^ {4} d _ {i} \text {S t u d e n t - T} (x; \nu , m _ {i}, s _ {i}),
$$
where  $\mathcal{N}(x;\mu ,\sigma^2)$  is the univariate Gaussian density with mean  $\mu$  and variance  $\sigma^2$  and Student- $\mathrm{T}(x;\nu ,m,s)$  is the univariate Student-T density with degrees of freedom  $\nu$ , location parameter  $m$  and scale parameter  $s$ . The parameter choices for  $p_1$  were
$$
\left(c _ {1}, c _ {2}, c _ {3}, c _ {4}\right) = \left(0. 3 1 2 5, 0. 3 1 2 5, 0. 3 1 2 5, 0. 0 6 2 5\right),
$$
$$
\left(\mu_ {1}, \mu_ {2}, \mu_ {3}, \mu_ {4}\right) = (- 0. 3, 0, 0. 3, 0),
$$
$$
\left(\sigma_ {1} ^ {2}, \sigma_ {2} ^ {2}, \sigma_ {3} ^ {2}, \sigma_ {4} ^ {2}\right) = \left(0. 1 ^ {2}, 0. 0 5 ^ {2}, 0. 1 ^ {2}, 1\right).
$$
The parameter choices for  $p_2$  were  $\nu = 10$  and
$$
\left(d _ {1}, d _ {2}, d _ {3}, d _ {4}\right) = (0. 1, 0. 2, 0. 3, 0. 4),
$$
$$
(m _ {1}, m _ {2}, m _ {3}, m _ {4}) = (- 0. 4, - 0. 2, 0, 0. 3),
$$