SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Learning Rate Free Sampling in Constrained Domains
Louis Sharrock
Lancaster University, UK
1.sharrock@lancaster.ac.uk
Christopher Nemeth
c.nemeth@lancaster.ac.uk
We introduce a suite of new particle-based algorithms for sampling in constrained domains which are entirely learning rate free. Our approach leverages coin betting ideas from convex optimisation, and the viewpoint of constrained sampling as a mirrored optimisation problem on the space of probability measures. Based on this viewpoint, we also introduce a unifying framework for several existing constrained sampling algorithms, including mirrored Langevin dynamics and mirrored Stein variational gradient descent. We demonstrate the performance of our algorithms on a range of numerical examples, including sampling from targets on the simplex, sampling with fairness constraints, and constrained sampling problems in postselection inference. Our results indicate that our algorithms achieve competitive performance with existing constrained sampling methods, without the need to tune any hyperparameters.
The problem of sampling from unnormalised probability distributions is of central importance to computational statistics and machine learning. Standard approaches to this problem include Markov chain Monte Carlo (MCMC) [11, 76] and variational inference (VI) [41, 96]. More recently, there has been growing interest in particle-based variational inference (ParVI) methods, which deterministically evolve a collection of particles towards the target distribution and combine favourable aspects of both MCMC and VI. Perhaps the most well-known of these methods is Stein variational gradient descent (SVGD) [63], which iteratively updates particles according to a form of gradient descent on the Kullback-Leibler (KL) divergence. This approach has since given rise to several extensions [16, 27, 97, 105] and found success in a wide range of applications [27, 66, 74].
While such methods have enjoyed great success in sampling from unconstrained distributions, they typically break down when applied to constrained targets [see, e.g., 60, 82]. This is required for targets that are not integrable over the entire Euclidean space (e.g., the uniform distribution), when the target density is undefined outside a particular domain (e.g., the Dirichlet distribution), or when the target must satisfy certain additional constraints (e.g., fairness constraints in Bayesian inference [65]). Notable examples include latent Dirichlet allocation [9], ordinal data models [45], regularised regression [15], survival analysis [49], and post-selection inference [54, 88]. In recent years, there has been increased interest in this topic, with several new methodological and theoretical developments [1, 19, 43, 44, 60, 61, 82, 86, 103, 104].
One limitation shared by all of these methods is that their performance depends, often significantly, on a suitable choice of learning rate. In principle, convergence rates for existing constrained sampling schemes (e.g., [1, Theorem 1] or [86, Corollary 1]) allow one to compute the optimal learning rate for a given problem. In practice, however, this optimal learning rate is a function of the unknown target and thus cannot be computed. Motivated by this problem, in this paper we introduce a suite of new sampling algorithms for constrained domains which are entirely learning rate free.
Our contributions We first propose a unifying perspective of several existing constrained sampling algorithms, based on the viewpoint of sampling in constrained domains as a 'mirrored' optimisation problem on the space of probability measures. Based on this perspective, we derive a general class of solutions to the constrained sampling problem via the mirrored Wasserstein gradient flow (MWGF). The MWGF includes, as special cases, several existing constrained sampling methods, e.g., mirrored Langevin dynamics [43] and mirrored SVGD (MSVGD) [82]. Using this formulation, we also introduce mirrored versions of several other particle-based sampling algorithms which are suitable for sampling in constrained domains, and study their convergence properties in continuous time.
By leveraging this perspective, and extending the coin sampling methodology recently introduced in [81], we then obtain a suite of learning rate free algorithms suitable for constrained domains. In particular, we introduce mirrored coin sampling, which includes as a special case Coin MSVGD, as well as several other tuning-free constrained sampling algorithms. We also outline an alternative approach which does not rely on a mirror mapping, namely, coin mollified interaction energy descent (Coin MIED). This algorithm can be viewed as the natural coin sampling analogue of the method recently introduced in [60]. Finally, we demonstrate the performance of our methods on a wide range of examples, including sampling on the simplex, sampling with fairness constraints, and constrained sampling problems in post-selection inference. Our empirical results indicate that our methods achieve competitive performance with the optimal performance of existing approaches, with no need to tune a learning rate.
The Wasserstein Space. We will make use of the following notation. For any  $\mathcal{X} \subset \mathbb{R}^d$ , we write  $\mathcal{P}_2(\mathcal{X})$  for the set of probability measures  $\mu$  on  $\mathcal{X}$  with finite  $2^{\mathrm{nd}}$  moment:  $\int_{\mathcal{X}}||x||^2\mu (\mathrm{d}x) < \infty$ , where  $||\cdot ||$  denotes the Euclidean norm. For  $\mu \in \mathcal{P}_2(\mathcal{X})$ , we write  $L^2 (\mu)$  for the set of measurable  $f:\mathcal{X}\to \mathcal{X}$  with finite  $||f||_{L^2 (\mu)}^2 = \int_{\mathcal{X}}||f(x)||^2\mu (\mathrm{d}x)$ . For  $f,g\in L^{2}(\mu)$ , we also define  $\langle f,g\rangle_{L^2 (\mu)} = \int_{\mathcal{X}}f(x)^\top g(x)\mu (\mathrm{d}x)$ . Given  $\mu \in \mathcal{P}_2(\mathcal{X})$  and  $T\in L^{2}(\mu)$ , we write  $T_{\#}\mu$  for the pushforward of  $\mu$  under  $T$ , that is, the distribution of  $T(X)$  when  $X\sim \mu$ .
Given  $\mu, \nu \in \mathcal{P}_2(\mathcal{X})$ , the Wasserstein 2-distance between  $\mu$  and  $\nu$  is defined according to  $W_2^2(\mu, \nu) = \inf_{\gamma \in \Gamma(\mu, \nu)} \int_{\mathcal{X} \times \mathcal{X}} ||x - y||^2 \gamma(\mathrm{d}x, \mathrm{d}y)$ , where  $\Gamma(\mu, \nu)$  denotes the set of couplings between  $\mu$  and  $\nu$ . The Wasserstein distance  $W_2$  is indeed a distance over  $\mathcal{P}_2(\mathcal{X})$  [2, Chapter 7.1], with the metric space  $(\mathcal{P}_2(\mathcal{X}), W_2)$  known as the Wasserstein space. Given a functional  $\mathcal{F}: \mathcal{P}(\mathcal{X}) \to (-\infty, \infty]$ , we will write  $\nabla_{W_2} \mathcal{F}(\mu)$  for the Wasserstein gradient of  $\mathcal{F}$  at  $\mu$ , which exists under appropriate regularity conditions [2, Lemma 10.4.1]. We refer to App. A for further details on calculus in the Wasserstein space.
Wasserstein Gradient Flows. Suppose that  $\pi \in \mathcal{P}_2(\mathcal{X})$  and that  $\pi$  admits a density  $\pi \propto e^{-V}$  with respect to Lebesgue measure, where  $V: \mathcal{X} \to \mathbb{R}$  is a smooth potential function. The problem of sampling from  $\pi$  can be recast as an optimisation problem over  $\mathcal{P}_2(\mathcal{X})$  [e.g., 99]. In particular, one can view the target  $\pi$  as the solution of
$$
\pi = \underset {\mu \in \mathcal {P} _ {2} (\mathcal {X})} {\arg \min } \mathcal {F} (\mu) \tag {1}
$$
where  $\mathcal{F}:\mathcal{P}(\mathcal{X})\to (-\infty ,\infty ]$  is a functional uniquely minimised at  $\pi$ . In the unconstrained case,  $\mathcal{X} = \mathbb{R}^d$ , a now rather classical method for solving this problem is to identify a continuous process which pushes samples from an initial distribution  $\mu_0$  to the target  $\pi$ . This corresponds to finding a family of vector fields  $(v_{t})_{t\geq 0}$ , with  $v_{t}\in L^{2}(\mu_{t})$ , which transports  $\mu_t$  to  $\pi$  via the continuity equation
$$
\frac {\partial \mu_ {t}}{\partial t} + \nabla \cdot \left(v _ {t} \mu_ {t}\right) = 0. \tag {2}
$$
<sup>1</sup>In a slight abuse of notation, throughout this paper we will use the same letter to refer to a distribution and its density with respect to Lebesgue measure.
A standard choice is  $v_{t} = -\nabla_{W_{2}}\mathcal{F}(\mu_{t})$ , in which case the solution  $(\mu_t)_{t\geq 0}$  of (2) is referred to as the Wasserstein gradient flow (WGF) of  $\mathcal{F}$ . In fact, for different choices of  $(v_{t})_{t\geq 0}$ , one can obtain the continuous-time limit of several popular sampling algorithms [3, 20, 40, 46, 51, 63, 99]. Unfortunately, it is not straightforward to extend these approaches to the case in which  $\mathcal{X}\subset \mathbb{R}^d$  is a constrained domain. For example, the vector fields  $v_{t}$  may push the random variable  $x_{t}$  outside of its support  $\mathcal{X}$ , thus rendering all future updates undefined.
3 Mirrored Wasserstein Gradient Flows
We now outline one way to extend the WGF approach to the constrained case, based on the use of a mirror map. We will first require some basic definitions from convex optimisation [e.g., 77]. Let  $\mathcal{X}$  be a closed, convex domain in  $\mathbb{R}^d$ . Let  $\phi : \mathcal{X} \to \mathbb{R} \cup \{\infty\}$  be a proper, lower semicontinuous, strongly convex function of Legendre type [77]. This implies, in particular, that  $\nabla \phi(\mathcal{X}) = \mathbb{R}^d$  and  $\nabla \phi : \mathcal{X} \to \mathbb{R}^d$  is bijective [77, Theorem 26.5]. Moreover, its inverse  $(\nabla \phi)^{-1} : \mathbb{R}^d \to \mathcal{X}$  satisfies  $(\nabla \phi)^{-1} = \nabla \phi^*$ , where  $\phi^* : \mathbb{R}^d \to \mathbb{R}$  denotes the Fenchel conjugate of  $\phi$ , defined as  $\phi^*(y) = \sup_{x \in \mathcal{X}} \langle x, y \rangle - \phi(x)$ . We will refer to  $\nabla \phi : \mathcal{X} \to \mathbb{R}^d$  as the mirror map and  $\nabla \phi(\mathcal{X}) = \mathbb{R}^d$  as the dual space.
3.1 Constrained Sampling as Optimisation
Using the mirror map  $\nabla \phi : \mathcal{X} \to \mathbb{R}^d$ , we can now reformulate the constrained sampling problem as the solution of a 'mirrored' version of the optimisation problem in (1). Let us define  $\nu = (\nabla \phi)_{\#}\pi$ , with  $\pi = (\nabla \phi^{*})_{\#}\nu$ . We can then view the target  $\pi$  as the solution of
$$
\pi = \left(\nabla \phi^ {*}\right) _ {\#} \nu , \quad \nu = \underset {\eta \in \mathcal {P} _ {2} (\mathbb {R} ^ {d})} {\arg \min } \mathcal {F} (\eta), \tag {3}
$$
where now  $\mathcal{F}:\mathcal{P}_2(\mathbb{R}^d)\to (-\infty ,\infty ]$  is a functional uniquely minimised by  $\nu = (\nabla \phi)_{\#}\pi$ . The motivation for this formulation is clear. Rather than directly solving a constrained optimisation problem for the target  $\pi \in \mathcal{P}_2(\mathcal{X})$  as in (1), we could instead solve an unconstrained optimisation problem for the mirrored target  $\nu \in \mathcal{P}_2(\mathbb{R}^d)$ , and then recover the target via  $\pi = (\nabla \phi^{*})_{\#}\nu$ . This is a rather natural extension of the formulation of sampling as optimisation to the constrained setting.
3.2 Mirrored Wasserstein Gradient Flows
One way to solve the mirrored optimisation problem in (3) is to find a continuous process which transports samples from  $\eta_0\coloneqq (\nabla \phi)_{\#}\mu_0\in \mathcal{P}_2(\mathbb{R}^d)$  to the mirrored target  $\nu$ . According to the mirror map, this process will implicitly also push samples from  $\mu_0$  to the target  $\pi$ . More precisely, we would like to find  $(w_{t})_{t\geq 0}$ , where  $w_{t}:\mathbb{R}^{d}\to \mathbb{R}^{d}$ , which evolves  $\eta_t$  on  $\mathbb{R}^d$  and thus  $\mu_t$  on  $\mathcal{X}$ , through
$$
\frac {\partial \eta_ {t}}{\partial t} + \nabla \cdot \left(w _ {t} \eta_ {t}\right) = 0, \quad \mu_ {t} = \left(\nabla \phi^ {*}\right) _ {\#} \eta_ {t} \tag {4}
$$
where  $(w_{t})_{t\geq 0}$  should ensure convergence of  $\eta_t$  to  $\nu$ . In the case that  $w_{t} = -\nabla_{W_{2}}\mathcal{F}(\eta_{t})$ , we will refer to (4) as the mirrored Wasserstein gradient flow (MWGF) of  $\mathcal{F}$ . The idea of (4) is to simulate the WGF in the (unconstrained) dual space and then map back to the primal (constrained) space using a carefully chosen mirror map. This approach bypasses the inherent difficulties associated with simulating a gradient flow on the constrained space itself.
While a similar approach has previously been used to derive certain mirrored sampling schemes [43, 82, 86], these works focus on specific choices of  $\mathcal{F}$  and  $(w_{t})_{t\geq 0}$ , while we consider the general case. Our general perspective provides a unifying framework for these approaches, whilst also allowing us to obtain new constrained sampling algorithms and to study their convergence properties (see App. B). We now consider one such approach in detail.
3.2.1 Mirrored Stein Variational Gradient Descent
MSVGD [82] is a mirrored version of the popular SVGD algorithm. In [82], MSVGD is derived using a mirrored Stein operator in a manner analogous to the original SVGD derivation [63]. Here, we take an alternative perspective, which originates in the MWGF. This formulation is more closely aligned with other more recent papers analysing the non-asymptotic convergence of SVGD [51, 78, 85, 86].
Algorithm 1 MSVGD
input: target density  $\pi$ , kernel  $k$ , mirror function  $\phi$ , particles  $(x_0^i)_{i=1}^N \sim \mu_0$ , step size  $\gamma$ .
initialise:  $y_0^i = \nabla \phi (x_0^i)$  for  $i\in [N]$
for  $t = 0,\dots ,T - 1$  do
For  $i\in [N],y_{t + 1}^{i} = y_{t}^{i} - \gamma P_{\hat{\eta}_{t},k_{\phi}}\nabla \log \left(\frac{\hat{\eta}_{t}}{\nu}\right)(y_{t}^{i})$  , where  $\hat{\eta}_t = \frac{1}{N}\sum_{j = 1}^N\delta_{y_t^j}$
For  $i\in [N],x_{t + 1}^{i} = \nabla \phi^{*}(y_{t + 1}^{i})$
return  $(x_{T}^{i})_{i = 1}^{N}$
We will require the following additional notation. Let  $k: \mathcal{X} \times \mathcal{X} \to \mathbb{R}$  denote a positive semi-definite kernel and  $\mathcal{H}_k$  the corresponding reproducing kernel Hilbert space (RKHS) of real-valued functions  $f: \mathcal{X} \to \mathbb{R}$ , with inner product  $\langle \cdot, \cdot \rangle_{\mathcal{H}_k}$  and norm  $||\cdot||_{\mathcal{H}_k}$ . Let  $\mathcal{H} := \mathcal{H}_k^d$  denote the Cartesian product RKHS, consisting of elements  $f = (f_1, \ldots, f_d)$  for  $f_i \in \mathcal{H}_k$ . We write  $S_{\mu,k}: L^2(\mu) \to \mathcal{H}$  for the operator  $S_{\mu,k}f = \int k(x,\cdot)f(x)\mathrm{d}\mu(x)$ . We assume  $\int k(x,x)\mathrm{d}\mu(x) < \infty$  for  $\mu \in \mathcal{P}_2(\mathcal{X})$ , in which case  $\mathcal{H} \subset L^2(\mu)$  for all  $\mu \in \mathcal{P}_2(\mathcal{X})$  [52, Sec. 3.1]. We also define the identity embedding  $i: \mathcal{H} \to L^2(\mu)$  with adjoint  $i^* = S_{\mu,k}$ . Finally, we define  $P_{\mu,k}: L^2(\mu) \to L^2(\mu)$  as  $P_{\mu,k} = iS_{\mu,k}$ .
We are now ready to introduce our perspective on MSVGD. We begin by introducing the continuous-time MSVGD dynamics, which are defined by the continuity equation
$$
\frac {\partial \eta_ {t}}{\partial t} - \nabla \cdot \left(P _ {\eta_ {t}, k _ {\phi}} \nabla \log \left(\frac {\eta_ {t}}{\nu}\right) \eta_ {t}\right) = 0, \quad \mu_ {t} = \left(\nabla \phi^ {*}\right) _ {\#} \eta_ {t}, \tag {5}
$$
where  $k_{\phi}(y,y^{\prime}) = k(\nabla \phi^{*}(y),\nabla \phi^{*}(y^{\prime}))$  for some base kernel  $k:\mathcal{X}\times \mathcal{X}\to \mathbb{R}$ . Clearly, this is a special case of the MWGF in (4), in which  $(w_{t})_{t\geq 0}$  are defined according to  $w_{t} = -P_{\eta_{t},k_{\phi}}\nabla_{W_{2}}\mathcal{F}(\eta_{t})$  with  $\mathcal{F}(\eta_t) = \mathrm{KL}(\eta_t||\nu)$ . In particular,  $w_{t}$  can be interpreted as the negative Wasserstein gradient of  $\mathrm{KL}(\eta_t||\nu)$ , the KL divergence of the  $\eta_t$  with respect to  $\nu$ , under the inner product of  $\mathcal{H}_{k_{\phi}}$ .
The key point here is that, given samples from  $\eta_t$ , estimating  $P_{\eta_t,k_\phi}\nabla \log \left(\frac{\eta_t}{\nu}\right)$  is straightforward. In particular, if  $\lim_{||y^{\prime}||\to \infty}k_{\phi}(y^{\prime},\cdot)\nu (y^{\prime}) = 0$ , then, integrating by parts,
$$
P _ {\eta_ {t}, k _ {\phi}} \nabla \log \left(\frac {\eta_ {t}}{\nu}\right) (y) = - \int_ {\mathbb {R} ^ {d}} \left[ k _ {\phi} \left(y ^ {\prime}, y\right) \nabla_ {y ^ {\prime}} \log \nu \left(y ^ {\prime}\right) + \nabla_ {y ^ {\prime}} k _ {\phi} \left(y ^ {\prime}, y\right) \right] \mathrm {d} \eta_ {t} \left(y ^ {\prime}\right). \tag {6}
$$
To obtain an implementable algorithm, we must discretise in time. By applying an explicit Euler discretisation to (5), we arrive at
$$
\eta_ {t + 1} = \left(\mathrm {i d} - \gamma P _ {\eta_ {t}, k _ {\phi}} \nabla \log \left(\frac {\eta_ {t}}{\nu}\right)\right) _ {\#} \eta_ {t}, \quad \mu_ {t + 1} = \left(\nabla \phi^ {*}\right) _ {\#} \eta_ {t + 1}, \tag {7}
$$
where  $\gamma > 0$  is a step size or learning rate, and id is the identity map. This is the population limit of the MSVGD algorithm in [82]. Now, suppose  $\mu_0 \in \mathcal{P}_2(\mathcal{X})$  admits a density with respect to the Lebesgue measure. In addition, suppose  $x_0 \sim \mu_0$  and  $y_0 = \nabla \phi(x_0)$ . Then, for  $t \in \mathbb{N}_0$ , if we define
$$
y _ {t + 1} = y _ {t} - \gamma P _ {\eta_ {t}, k _ {\phi}} \nabla \log \left(\frac {\eta_ {t}}{\nu}\right) (y _ {t}), \quad x _ {t + 1} = \nabla \phi^ {*} (y _ {t + 1}), \tag {8}
$$
then  $(\eta_{t})_{t\in \mathbb{N}_{0}}$  and  $(\mu_t)_{t\in \mathbb{N}_0}$  in (7) are precisely the densities of  $(y_{t})_{t\in \mathbb{N}_{0}}$  and  $(x_{t})_{t\in \mathbb{N}_{0}}$  in (8). In practice, these densities are unknown and must be estimated using samples. In particular, to approximate (8), we initialise a collection of particles  $x_0^i\stackrel {\mathrm{i.i.d.}}{\sim}\mu_0$  for  $i\in [N]$ , set  $y_0^i = \nabla \phi (x_0^i)$ , and then update
$$
y _ {t + 1} ^ {i} = y _ {t} ^ {i} - \gamma P _ {\hat {\eta} _ {t}, k _ {\phi}} \nabla \log \left(\frac {\hat {\eta} _ {t}}{\nu}\right) \left(y _ {t} ^ {i}\right), \quad x _ {t + 1} ^ {i} = \nabla \phi^ {*} \left(y _ {t + 1} ^ {i}\right) \tag {9}
$$
where  $\hat{\eta}_t = \frac{1}{N}\sum_{j=1}^N\delta_{y_t^j}$ . This is precisely the MSVGD algorithm introduced in [82] and since also studied in [86].
3.2.2 Other Algorithms
In App. B, we outline several algorithms which arise as special cases of the MWGF. These include existing algorithms, such as the mirrored Langevin dynamics (MLD) [43] and MSVGD [82], and two new algorithms, which correspond to mirrored versions of Laplacian adjusted Wasserstein gradient descent (LAWGD) [20] and kernel Stein discrepancy descent (KSDD) [51]. We also study the convergence properties of these algorithms in continuous time.
4 Mirrored Coin Sampling
By construction, any algorithm derived as a discretisation of the MWGF, including MSVGD, will depend on an appropriate choice of learning rate  $\gamma$ . In this section, we consider an alternative approach, leading to new algorithms which are entirely learning rate free. Our approach can be viewed as an extension of the coin sampling framework introduced in [81] to the constrained setting, based on the reformulation of the constrained sampling problem as a mirrored optimisation problem.
4.1 Coin Sampling
We begin by reviewing the general coin betting framework [22, 71, 72]. Consider a gambler with initial wealth  $w_0 = 1$  who makes bets on a series of adversarial coin flips  $c_t \in \{-1, 1\}$ , where  $+1$  denotes heads and  $-1$  denotes tails. We encode the gambler's bet by  $x_t \in \mathbb{R}$ . In particular,  $\mathrm{sign}(x_t) \in \{-1, 1\}$  denotes whether the bet is on heads or tails, and  $|x_t| \in \mathbb{R}$  denotes the size of the bet. Thus, in the  $t^{\text{th}}$  round, the gambler wins  $|x_t c_t|$  if  $\mathrm{sign}(c_t) = \mathrm{sign}(x_t)$  and loses  $|x_t c_t|$  otherwise. Finally, we write  $w_t$  for the wealth of the gambler at the end of the  $t^{\text{th}}$  round. The gambler's wealth thus accumulates as  $w_t = 1 + \sum_{s=1}^{t} c_s x_s$ . We assume that the gambler's bets satisfy  $x_t = \beta_t w_{t-1}$  for a betting fraction  $\beta_t \in [-1, 1]$ , which means the gambler does not borrow any money.
In [71], the authors show how this approach can be used to solve convex optimisation problems on  $\mathbb{R}^d$ , that is, problems of the form  $x^{*} = \arg \min_{x\in \mathbb{R}^{d}}f(x)$ , for convex  $f:\mathbb{R}^d\to \mathbb{R}$ . In particular, [71] consider a betting game with 'outcomes'  $c_{t} = -\nabla f(x_{t})$ , replacing scalar multiplications  $c_{t}x_{t}$  by scalar products  $\langle c_t,x_t\rangle$ . In this case, under certain assumptions, they show that  $f(\frac{1}{T}\sum_{t = 1}^{T}x_{t})\rightarrow f(x^{*})$  at a rate determined by the betting strategy. There are many suitable choices for the betting strategy. Perhaps the simplest of these is  $\beta_{t} = t^{-1}\sum_{s = 1}^{t - 1}c_{s}$ , known as the Krichevsky-Trohimov (KT) betting strategy [53, 71], which yields the sequence of bets  $x_{t} = \beta_{t}w_{t - 1} = t^{-1}\sum_{s = 1}^{t - 1}c_{s}(1 + \sum_{s = 1}^{t - 1}\langle c_{s},x_{s}\rangle)$ . Other choices, however, are also possible [22, 70, 72].
In [81], this approach was extended to solve optimisation problems on the space of probability measures. In this case, several further modifications are necessary. First, in each round, one now bets  $x_{t} - x_{0}$  rather than  $x_{t}$ , where  $x_{0} \sim \mu_{0}$  is distributed according to some  $\mu_0 \in \mathcal{P}_2(\mathbb{R}^d)$ . In this case, viewing  $x_{t}: \mathbb{R}^{d} \to \mathbb{R}^{d}$  as a function that maps  $x_{0} \mapsto x_{t}(x_{0})$ , one can define a sequence of distributions  $(\mu_t)_{t \in \mathbb{N}}$  as the push-forwards of  $\mu_0$  under the functions  $(x_{t})_{t \in \mathbb{N}}$ . In particular, this means that, if  $x_{0} \sim \mu_{0}$ , then  $x_{t} \sim \mu_{t}$ .
By using these modifications in the original coin betting framework, and choosing  $(c_{t})_{t\in \mathbb{N}}\coloneqq (c_{\mu_{t}}(x_{t}))_{t\in \mathbb{N}}$  appropriately, [81] show that it is now possible to solve problems of the form  $\mu^{*} = \arg \min_{\mu \in \mathcal{P}_{2}(\mathcal{X})}\mathcal{F}(\mu)$ . This approach is referred to as coin sampling. For example, by considering a betting game with  $c_{t} = -\nabla_{W_{2}}\mathcal{F}(\mu_{t})(x_{t})$ , [81] obtain a 'coin Wasserstein gradient descent' algorithm, which can be viewed as a learning-rate free analogue of Wasserstein gradient descent. Alternatively, setting  $c_{t} = -P_{\mu_{t},k}\nabla_{W_{2}}\mathcal{F}(\mu_{t})(x_{t})$ , one can obtain a learning-rate free analogue of the population limit of SVGD, in which the updates are given by
$$
x _ {t} = x _ {0} - \frac {\sum_ {s = 1} ^ {t - 1} \mathcal {P} _ {\mu_ {s} , k} \nabla_ {W _ {2}} \mathcal {F} (\mu_ {s}) (x _ {s})}{t} \left(1 - \sum_ {s = 1} ^ {t - 1} \langle \mathcal {P} _ {\mu_ {s}, k} \nabla_ {W _ {2}} \mathcal {F} (\mu_ {s}) (x _ {s}), x _ {s} - x _ {0} \rangle\right), \tag {10}
$$
where, as described above,  $\mu_t = (x_t)_{\#} \mu_0$ . In practice, the densities  $(\mu_t)_{t \in \mathbb{N}_0}$  and thus the outcomes  $(c_t)_{t \in \mathbb{N}}$  are almost always intractable, and will be approximated using a set of interacting particles.
4.2 Mirrored Coin Sampling
By leveraging the formulation of constrained sampling as a 'mirrored' optimisation problem over the space of probability measures, we can extend the coin sampling approach to constrained domains. In particular, as an alternative to discretising the MWGF to solve this optimisation problem (Sec. 3.2), we propose instead to use a mirrored version of coin sampling (Sec. 4.1). The idea is to use coin sampling to solve the optimisation problem in the dual space, and then map back to the primal space using the mirror map. In particular, this suggests the following scheme. Let  $x_0 \sim \mu_0 \in \mathcal{P}_2(\mathcal{X})$ , and  $y_0 = \nabla \phi(x_0) \in \mathbb{R}^d$ . Then, for  $t \in \mathbb{N}$ , update