Calibrated Transport Tests for Interacting Particle Samplers

Particle samplers such as consensus-based sampling move a swarm of particles with a stochastic differential equation in which every particle feels the whole swarm, and stop when the swarm "looks like" the target distribution. Today nobody can say, with a calibrated error rate, whether a finished swarm actually matches a reference posterior. The tools that would do it are optimal-transport two-sample tests. These compare two point clouds by the cost of moving one onto the other, and they come with exact limiting null distributions. But those tools assume the samples are independent. Swarm particles are not independent. They are coupled through the shared consensus term, and the coupling enters at exactly the scale the tests are sensitive to.

We propose to derive, prove, and implement the correct null distribution for a Sinkhorn-divergence test applied to a single interacting swarm. The key insight is that the mathematics needed is a well-posedness question. The pairwise correlations between particles and the finite-swarm bias are each of order $1/N$. A Sinkhorn divergence under the null shrinks like $1/N$ too. So the swarm's interaction changes the limit law instead of washing out. Characterizing it requires existence, uniqueness, and stability of a linearized mean-field equation in the same function space where the Sinkhorn divergence is twice differentiable. The result would let practitioners separate two failure modes using one swarm and no extra forward-model calls. One is "the swarm is too small." The other is "the algorithm's infinite-swarm limit is the wrong distribution."

Core Claim

Limit theorems for entropic optimal transport maps and Sinkhorn divergence shows something about the Sinkhorn divergence $\bar S_\varepsilon$. This is an entropically smoothed transport cost with self-terms subtracted, so that it vanishes when the two distributions are equal. When the two distributions are equal and samples are i.i.d., its first derivative vanishes and $n\bar S_\varepsilon$ converges to a non-Gaussian quadratic functional. The proof uses a second-order expansion in Hölder spaces. On the dynamics side, On the Mean‐Field Limit of Consensus‐Based Methods proves well-posedness of the $N$-particle consensus SDE and of its McKean–Vlasov limit. A McKean–Vlasov limit is the single-particle SDE whose drift depends on its own law. The paper also proves qualitative convergence of the empirical swarm measure $\mu_N$ to the limiting density $\rho_t$. It explicitly leaves rates and fluctuations open.

Our claim connects the two results. Fix a reference sample $\pi_m$ of size $m$ from the target $\pi$, with $m/(N+m)\to\lambda$. Under the null hypothesis $\rho_T=\pi$, we claim

$$\frac{Nm}{N+m}\,\bar S_\varepsilon(\mu_N(T),\pi_m)\;\Rightarrow\;\tfrac12\,D^2\bar S_\varepsilon\big[\sqrt{1-\lambda}\,(\mathbb G_T+b_T)-\sqrt{\lambda}\,\mathbb G'\big].$$

The symbols are as follows. $D^2\bar S_\varepsilon$ is the second Hadamard derivative computed in the cited paper. $\mathbb G'$ is the usual i.i.d. Gaussian fluctuation field of the reference sample. $\mathbb G_T$ is the Gaussian limit of $\sqrt N(\mu_N(T)-\rho_T)$. Its covariance equals the i.i.d. covariance plus an interaction term produced by propagating fluctuations through the linearized mean-field dynamics. $b_T$ is the deterministic $1/N$ bias of the finite-swarm law, rescaled. Classical fluctuation theorems for mean-field particle systems do exist outside this research file. What is new here has three parts: the result is stated in the Hölder dual where the Sinkhorn expansion lives, it covers consensus dynamics with full covariance diffusion, and it comes with a plug-in estimator of $\mathbb G_T$ and $b_T$ that reuses the swarm's own objective evaluations.

Research Program

The theoretical work has three steps. Each is a well-posedness statement.

The first step is quantitative stability. We need to turn Koss et al.'s qualitative convergence into an $O(N^{-1/2})$ coupling bound for consensus-based sampling. We work under their Lipschitz and lower-boundedness assumptions and use their uniform-in-time moment estimates. The consensus weights $e^{-\beta f}$ make the drift only locally Lipschitz in the measure argument. The moment bounds are what make a localization argument go through.

The second step is the linearized fluctuation equation. This is the backward Kolmogorov-type equation obtained by differentiating the McKean–Vlasov dynamics with respect to the measure. We prove it is well-posed with data in the Hölder class $C^s$ used by Goldfeld et al. That is exactly the condition under which the fluctuation field is tight in the dual of $C^s$, so the second-order delta method applies. This is also where the method can fail: if the linearized equation loses regularity, the composition breaks. That is why the proof is in the program rather than taken on faith.

The third step is the bias expansion. We show the finite-$N$ law satisfies $\mathrm{Law}(X^1_T)=\rho_T+N^{-1}\beta_T+o(N^{-1})$ with $\beta_T$ characterized by the same linearized equation.

The method has one main ingredient: a "tangent swarm" estimator. Each particle carries a linearized process driven by the empirical derivative of the consensus drift with respect to the measure. For consensus-based sampling, that derivative depends on $f$ only through the weights already computed at every step. Simulating the tangent swarm therefore costs no new forward-model solves, only linear algebra on the $N\times N$ weight structure. From the tangent processes we estimate the covariance and bias. We then draw the null quantile by Monte Carlo from the quadratic form, with $D^2\bar S_\varepsilon$ estimated from the Sinkhorn kernel on the pooled samples as in the i.i.d. theory.

There is a natural extension, offered as a stretch goal and not a commitment. Wasserstein Mirror Gradient Flow as the limit of the Sinkhorn Algorithm builds a McKean–Vlasov "Sinkhorn diffusion" at the population level only. Our tangent-process machinery is the natural route to its first fluctuation theory.

Baselines

The naive reference point treats the swarm as $N$ i.i.d. draws. It applies the $m$-out-of-$n$ bootstrap null that Limit theorems for entropic optimal transport maps and Sinkhorn divergence proves consistent for independent samples. It is the most natural thing a practitioner would do, so it is the default we must beat. It runs on the identical swarm, reference sample, $\varepsilon$, and bootstrap count. A permutation test on the pooled samples is a second naive variant, run under the same conditions.

The strongest existing competitor is a replicate-swarm Monte Carlo null. We run $K$ independent swarms, compute the statistic for each, and take empirical quantiles. This is valid by construction whenever the swarm law is stable, so it is the gold standard for calibration. Its weakness is cost: $K$ times the forward-model budget. We compare at matched forward-evaluation budgets. The tangent method gets one swarm of size $N$. The replicate method gets $K$ swarms whose total evaluations equal ours, which forces each swarm to be smaller by a factor $K$. We also report the replicate method at unlimited budget, as an oracle.

A third competitor swaps the statistic. It uses the smooth Wasserstein bootstrap test of Smooth p-Wasserstein Distance: Structure, Empirical Approximation, and Statistical Applications under the i.i.d. assumption. This checks whether a different transport statistic sidesteps the problem. It should not, since that statistic is also a functional of the correlated empirical measure.

Two ablations isolate the key ingredient: a covariance-only correction with $b_T=0$, and a bias-only correction with i.i.d. covariance.

Beating the baselines means the following. Across the null settings, the tangent method's type-I error at nominal 5% should lie within Monte Carlo error of 5%. The i.i.d. bootstraps should deviate. At matched budget, the tangent method should have power at least that of the replicate method. We searched for prior calibration figures and found no reported result on Lacuna for the type-I error or power of any transport test applied to consensus-based swarms. The only reported null-scaling evidence is qualitative: P-P plots at $n=2500$ and $5000$ on the uniform distribution on $(0,1/2)^2$, in the Goldfeld et al. paper.

Why not just…?

Why not just treat the particles as independent? Each pair of particles is only $O(1/N)$-correlated. But the statistic sums $N^2$ pairwise terms and is scaled by $N$, so the correlations contribute an $O(1)$ shift to its null law. That is the whole reason for the proposal. The decisive check is the type-I error table across $N$. If the i.i.d. bootstrap stays calibrated on Gaussian targets, our premise is wrong in practice, and we would report that.

Why not just run independent replicate swarms? This is a real threat, because it is simple and assumption-free. Its weakness is budget. In the 32-dimensional Darcy problem used by A localized consensus-based sampling algorithm, every particle step is a PDE solve. Replicates either multiply cost or shrink each swarm, which inflates the very finite-$N$ bias being tested. The matched-budget comparison settles it. If replicates match our power at equal cost, the tangent estimator is not worth its complexity, and we would say so.

Why not just use an MMD-type test, which is easy to compute? A maximum mean discrepancy test (a kernel two-sample test) is also a quadratic functional of the empirical measure. It inherits the same miscalibration. The fluctuation correction is statistic-agnostic, so we include a corrected MMD variant. If corrected MMD does as well as corrected Sinkhorn, the contribution is the correction, not the transport geometry. Transport would then matter only where its geometric sensitivity buys power against mode-dropping alternatives.

Proposed Experiments

The first null setting uses Gaussian targets in dimensions 2 to 20. For these targets, Consensus‐based sampling shows the mean-field stationary law is the target, so $H_0$ holds exactly in the limit. We run $N\in\{100,\dots,5000\}$ and compute rejection rates over many seeds. We also run i.i.d. samples on the uniform distribution on $(0,1/2)^2$, to confirm that our implementation reproduces the Goldfeld et al. $n^{-1}$ scaling when the interaction is switched off.

The alternative settings are the 1D and 10D multimodal targets on which A localized consensus-based sampling algorithm reports that standard consensus sampling collapses to a single Gaussian. There the test should reject with power approaching one as $N$ grows. The localized sampler, which reportedly captures the peaks, should reject far less often. This is the clean demonstration that the test separates algorithmic bias from swarm-size error.

The applied setting is the 32-dimensional Darcy permeability problem. We use long-run MCMC as the reference sample and test both samplers at matched forward-solve budgets. Neither cited paper reports numerical posterior-accuracy figures for this problem. Our rejection rates and Sinkhorn-divergence values would be the first quantitative comparison.

We would count the proposal successful if three things hold: calibration within Monte Carlo error on every null setting, i.i.d. baselines visibly off nominal for $N$ in the hundreds, and power at matched budget no worse than replicates. We would count it a failure if either ablation alone achieves calibration, since that would mean the full linearized dynamics are unnecessary.