We develop a class of general diffusion-based stochastic particle optimisation methods for loss functions with intractable gradients. Specifically, we consider problems in which the loss gradient is an integral with respect to a parameter-dependent distribution, a structure that includes training generative models, fine-tuning, and learning latent-variable models. We introduce mean-field dynamics and its interacting-particle approximations, which contain several existing algorithms as special cases and provide a route to constructing new methods. Under well-posedness and joint contractivity assumptions, we prove exponential convergence and show that the continuous-time particle system admits a non-asymptotic error bound. We illustrate our framework by developing higher-order Langevin and momentum optimisers and evaluating them on maximum marginal-likelihood estimation and energy-based-model training.
1 Introduction
Many problems in statistics and machine learning can be formulated as the optimisation of a loss ℓ:Θ→R whose gradient takes the form of an expectation with respect to an intractable parameter-dependent distribution πθ, i.e. ∇θℓ(θ)=Eπθ[F(θ,X)]. This structure arises in problems such as maximum-likelihood training of energy-based models (EBMs)(Hinton, 2002; Nijkamp et al., 2019; Song and Kingma, 2021; Oliva et al., 2025), latent EBMs(Pang et al., 2020; Marks et al., 2026), maximum marginal likelihood estimation (MMLE)(Atchadé et al., 2017; De Bortoli et al., 2021; Kuntz et al., 2023; Lim et al., 2024; Akyildiz et al., 2025), fine tuning (Marion et al., 2025), and Bayesian experimental design (Iollo et al., 2025).
These problems are usually solved via generic first-order optimisation schemes where each iteration involves running Markov chain Monte Carlo (MCMC)to sample from πθ, resulting in a nested optimisation-sampling scheme (Younes, 1999; Andrieu and Vihola, 2014; Atchadé et al., 2017; De Bortoli et al., 2021). However, this is computationally expensive with delicate convergence properties dependent on various factors such as Markov-chain bias, mixing, and step-size selections. A number of algorithms have been developed in recent literature to avoid separately equilibrating an inner Markov chain, see, e.g. Kuntz et al. (2023); Lim et al. (2024); Akyildiz et al. (2025) for MMLEin latent variable models, and Marion et al. (2025) for fine tuning of generative models. These methods construct joint sampling-optimisation procedures, typically with Langevin processes and gradient descent based optimisers. However, they are often tied to particular dynamical choices of optimisers and diffusions, which may even be replaced by alternatives in implementation. In fact, practical applications of such methods often use modern optimisers such as Adam (Kingma and Ba, 2015), see, e.g., Kuntz et al. (2023); Marks et al. (2026) or preconditioned Langevin dynamics, see, e.g., Glyn-Davies et al. (2025); Wang et al. (2026); Marks et al. (2026). This raises the question of how to define principled, general purpose stochastic optimisation methods for loss functions with intractable gradients.
In this work, we develop general diffusion-based particle optimisation methods. Specifically:
(C1) We develop a general diffusion-based framework for stochastic optimisation of loss functions, accounting for general optimisation and sampling dynamics. This unifies and generalises several existing methods for general optimisation problems whose gradients involve parameter-dependent expectations and leads to the design of a novel class of algorithms.
(C2) Under this general formulation, we establish exponential contraction of the mean-field system under a joint strong-monotonicity condition and a finite-N error bound for a particle approximation.
(C3) Using the general framework, we develop two novel algorithms, (i) a higher-order Langevin dynamics based MMLEalgorithm, and (ii) a momentum-based algorithm for training EBMs. We show that these algorithms outperform existing methods in their respective applications. We also discuss how to develop novel algorithms for other applications, by instantiating the general framework with appropriate choices of optimisers and diffusions.
The rest of the paper is organised as follows. In Section 2, we provide background on the optimisation problems we consider, and the sampling dynamics we use, together with a discussion of related work. In Section 3, we introduce our general mean-field system for stochastic optimisation. We then provide theoretical results on the convergence of the mean-field system and finite-particle error bounds in Section 4. Finally, we show the design of novel algorithms in Section 5 accompanied with numerical results and experiments.
1.1 Notation
We denote by P2(Rd) the set of probability measures on Rd with finite second moments. We write δx for the Dirac delta measure at x. For a function f:Rd→R, we write ∇f for the gradient of f, and ∇2f for the Hessian of f. For a vector v∈Rd, we write ∥v∥ for the Euclidean norm of v. For a random vector X, ∥X∥L2:=(E∥X∥2)1/2. For a matrix A∈Rd×d, we write ∥A∥ for the spectral norm of A. For two measures μ,ν∈P(Rd), we write W2(μ,ν) for the 2-Wasserstein distance between μ and ν:
W2(μ,ν)=(γ∈Γ(μ,ν)inf∫∥x−y∥2γ(dx,dy))1/2,
where Γ(μ,ν) is the set of couplings of μ and ν. For a function f:Rd→R, we write ∥f∥∞=supx∈Rd∣f(x)∣ for the supremum norm of f. Lp(μ) denotes the space of functions where the integral ∫∣f(x)∣pμ(dx) is finite.
We will denote various spaces belonging to optimiser, sampler, and auxiliary states using the letters X,V,Θ,M. In all these cases, we assume that these spaces are Euclidean, i.e., X=Rdx, V=Rdv, Θ=Rdθ, M=Rdm. Therefore, their tangent spaces are also Euclidean spaces of the same dimensions. We will keep this setting for clarity and simplicity, and our results can be extended to more general spaces.
2 Background
2.1 Stochastic Optimisation with Intractable Gradients
We are interested in the optimisation of an objective function ℓ:Θ→R over a set of parameters θ∈Θ where the gradient is of the form
∇θℓ(θ)=∫XF(θ,x)πθ(dx),
where F:Θ×X→Θ is a measurable function, F(θ,⋅)∈L1(πθ) for all θ∈Θ, and πθ is a parameter-dependent distribution on a space X. We assume that the distribution πθ admits a density with respect to the Lebesgue measure on X:
πθ(x)=e−E(θ,x)/Cθ,Cθ=∫Xe−E(θ,x)dx,
where 0<Cθ<∞ is the unknown normalisation constant and the potential E:Θ×X→R is known pointwise. This setting encompasses a wide range of applications seen in the literature and we summarise some in the next section.
2.2 Related Work
We compare related methodologies which also solve the stochastic optimisation problem, relating to objectives of the form in (1). Classical approaches use the stochastic approximation (SA)framework of Robbins and Monro (1951) with Markovian noise, where for each outer optimisation step on the parameters, an inner loop MCMCsampler is used to approximate samples from πθ and the resulting Monte Carlo (MC)average is used for a first-order update (Younes, 1999; Andrieu and Vihola, 2014; Atchadé et al., 2017). This includes Stochastic Optimization via Unadjusted Langevin (SOUL)and its more general kernel counterparts (SOUK), where a number of Langevin or more general Markov-kernel steps are used per parameter update (De Bortoli et al., 2021). In EBMtraining, Contrastive Divergence (CD-k)runs k short MCMCtransitions, typically initialised from data, to approximate the negative-phase expectation (Hinton, 2002); Persistent Contrastive Divergence (PCD)instead keeps a persistent particle cloud and usually applies one or a few transitions per parameter step, reducing the nested-loop cost at the price of non-equilibrium bias (Tieleman, 2008; Oliva et al., 2025). This is seen in other more modern single-loop approaches. Implicit Diffusion (ImpDiff)couples the parameter dynamics with one sampler update step per optimisation step, so that particles and parameters evolve jointly (Marion et al., 2025). When the inner approximation is based on Sequential Monte Carlo (SMC), Cuin et al. (2026) maintain weighted particles.
The problem of MMLEfor a latent variable model pθ(x,y) fits in the setting of (1) after applying Fisher’s identity to obtain an expectation under the posterior pθ(⋅∣y). The classical Expectation-Maximisation (EM)algorithm alternates an E-step, which forms or approximates the posterior expectation, with an M-step in θ (Dempster et al., 1977). When the E-step is intractable, this leads to Monte Carlo, stochastic approximation, online, variational, and biased-MCMCvariants of EM(Wei and Tanner, 1990; Delyon et al., 1999; Cappé and Moulines, 2009; Fort and Moulines, 2003; Gruffaz et al., 2024; Cuin et al., 2025). Another approach introduces a particle approximation for the optimisation and avoids separately equilibrating an inner Markov chain. Particle Gradient Descent (PGD)performs a coupled continuous-time descent of the EMfree energy introduced by Neal and Hinton (1998) over parameters and a variational posterior approximation, using Langevin dynamics on the particles for current posterior approximations (Kuntz et al., 2023). Momentum Particle Gradient Descent (MPGD)adds momentum to both the parameter and particle dynamics, yielding an underdamped extension of this coupled system (Lim et al., 2024). The Interacting Particle Langevin Algorithm (IPLA)injects noise into the parameter dynamics and interprets the full parameter-particle system as an interacting Langevin diffusion (Akyildiz et al., 2025), with kinetic variants such as kinetic interacting particle Langevin Monte Carlo (KIPLMC)extending this perspective to underdamped dynamics (Oliva and Akyildiz, 2026) and adaptations to latent energy-based models (Marks et al., 2026). Whilst these works are mostly developed for MMLEor closely related latent-variable problems, they illustrate the same continuous-time particle optimisation principle, replacing a costly inner MCMCloop with a persistent interacting particle system.
Our contribution abstracts and generalises this perspective. Rather than fixing a particular optimiser, sampler, or problem, we formulate a continuous-time mean-field optimisation-sampling system for general objectives with gradients of the form (1). This includes existing particle methods such as PGDand MPGDas special cases, while also allowing more general optimiser dynamics and sampler diffusions.
3 Particle-based Stochastic Optimisation
3.1 A general mean-field dynamics for stochastic optimisation
We first describe a fully general framework for stochastic optimisation of loss functions with intractable gradients. Recall that we consider the problem of minimising a loss function ℓ:Θ→R where the gradient takes the form as in (1).
In order to define general mean-field dynamics, we will consider a general optimiser state ϑt∈Θ×M. This notation allows the optimiser state to include auxiliary variables, such as momenta – i.e. it may contain only θt, or (θt,mt), or Adam-style auxiliary variables. Let Ψt:(Θ×M)×Θ→Θ×M be a function that gives the update direction for the optimiser state ϑt when it is supplied with a gradient estimate. Let Πθ(ϑt)=θt extract the parameter component. Similarly to the optimiser state, we will consider a general sampler state Zt∈X×V with dynamics that depend on the projected parameter state θt=Πθ(ϑt). Let Πx(Zt)=Xt extract the x-component of the sampler state. We will assume that the dynamics of Zt are such that, for frozen θ, the marginal distribution of Xt converges to πθ.
Let B be a finite-dimensional noise space and let Bt be a Brownian motion on B. We write L(B,X×V) for the space of linear maps from B to X×V. We then consider the following coupled mean-field system
where the drift bθ:X×V→X×V and diffusion coefficient σθ:X×V→L(B,X×V) are chosen such that the system (4) has invariant distribution νθ with X-marginal πθ and νt=Law(Zt) with the function Gνt(ϑt) defined as
Gνt(ϑt):=∫X×VF(Πθ(ϑt),Πx(z))νt(dz).
Next, we unpack the implications and possibilities provided by the generality of (3)–(4). A general Ψt allows many optimisers whose optima are fixed points of the optimiser dynamics, including gradient descent and continuous-time analogues of RMSProp, ADAM, and related adaptive methods (Da Silva and Gazeau, 2020; Barakat and Bianchi, 2021; Heredia, 2024). Similarly, in (4), one may choose a frozen sampler on the augmented space X×V whose invariant law νθ has X-marginal πθ. From Ma et al. (2015), we describe one sufficient Euclidean construction. Recall X=Rdx, V=Rdv, write z=(x,v), and consider functions H:Θ×X×V→R and g:X×V→R such that
H(θ,z)=E(θ,x)+g(x,v).
where E is such that πθ(dx)=Cθ−1exp(−E(θ,x))dx. Assume also Cg:=∫Vexp(−g(x,v))dv<∞ and independent of x. Then the measure νθ∝exp(−H(θ,x,v)) on X×V has X-marginal πθ. Next, consider the diffusion in (4) with drift and diffusion coefficients
where Dθ(z)∈R(dx+dv)×(dx+dv) is symmetric positive semidefinite, Qθ(z)∈R(dx+dv)×(dx+dv) is skew-symmetric, and both are continuously differentiable in z. The correction term is defined coordinatewise by
where i=1,…,dx+dv. All derivatives here are with respect to the sampler variable z, with θ fixed. Assume additionally that e−H(θ,⋅) is integrable, that the coefficients and H are sufficiently regular for the stationary Fokker–Planck equation, and that the relevant boundary/no-flux or decay conditions justify integration by parts. Here, the generalised Langevin dynamics with drift and diffusion given in (5) have stationary distribution νθ∝e−H(θ,z) provided that the following identity is satisfied (Ma et al., 2015; Yao et al., 2025)
i,j=1∑dx+dv∂zi∂zj∂2(Qθ,ij(z)e−H(θ,z))=0.
Under these conditions, the displayed identity holds automatically because Qθ is sufficiently smooth and skew-symmetric and mixed derivatives commute, thus νθ is invariant for the frozen sampler, and the preceding marginal condition gives (Πx)#νθ=πθ. This construction can be generalised to arbitrary manifolds using the construction provided in Barp et al. (2021).
Next, we provide a basic result that demonstrates the importance of our framework for a wide class of optimisers and samplers. We start with a well-posedness assumption for the mean-field system (3)–(4).
A1.
For every ϑ0∈Θ×M and every random variable Z0, independent of the driving Brownian motion, with law ν0∈P2(X×V), the mean-field system (3)–(4) admits a pathwise unique strong solution on every finite time interval. Moreover, νt:=Law(Zt)∈P2(X×V) for all finite t≥0. Furthermore, assume one of
(i) For any ϑ∈Θ×M,z∈X×V, the diffusion coefficient σΠθ(ϑ)(z) is constant.
(ii) For any ϑ∈Θ×M,z∈X×V, the following linear growth condition on the drift and diffusion ∥bΠθ(ϑ)(z)∥+∥σΠθ(ϑ)(z)∥≤K(1+∥θ∥+∥z∥).
Standard Lipschitz and linear-growth assumptions on the combined drift and diffusion coefficients provide sufficient conditions for Assumption A1.
A2.
There exists an optimiser state ϑ⋆∈Θ×M, with Πθ(ϑ⋆)=θ⋆, such that
∇θℓ(θ⋆)=0andΨt(ϑ⋆,0)=0for all t≥0.
Moreover, the frozen sampler at θ⋆ has an invariant measure νθ⋆∈P2(X×V) whose X-marginal is πθ⋆, i.e.
(Πx)#νθ⋆=πθ⋆.
This assumption simply states that the optimiser map Ψt has a fixed point at ϑ⋆ which is generally satisfied by well-defined optimisation methods. Next we show that the mean-field system (3)–(4) has a stationary law at the optimiser–sampler pair (ϑ⋆,νθ⋆).
Theorem 1.
Let Assumption A1 and Assumption A2 hold. Let
μ⋆:=δϑ⋆⊗νθ⋆.
Then μ⋆ is a stationary law for the coupled mean-field system (3)–(4): if the system is initialized from μ⋆, its law remains μ⋆ for all t≥0.
See Appendix A.1 for the proof. If Ψt≡Ψ is time-independent, then the coupled mean-field dynamics are time-homogeneous. In this case μ⋆ is an invariant measure in the usual semigroup sense. This formulation covers various algorithms in the literature as special cases and brings great flexibility to the design of diffusion-based stochastic optimisers. We highlight some concrete examples from the literature below.
3.1.1 Existing literature as special cases
PGD. Consider the maximum marginal likelihood estimation (MMLE)problem given a model pθ(x,y) with fixed data y. As a minimisation, the loss function is ℓ(θ)=−logpθ(y) and the gradient takes the form (1) with F(θ,x)=−∇θlogpθ(x,y) and πθ(x)=pθ(x∣y). Kuntz et al. (2023) proposed Particle Gradient Descent (PGD)to solve this problem, where the mean-field limit can be written as
This is a special case of (3)–(4) with Ψt(ϑt,Gνt)=−Gνt, ϑt=θt, Zt=Xt, Dθ(x)=Idx, Qθ(x)=0, and g(x,v)=0, so that the drift and diffusion coefficients are bθ(x)=∇xlogpθ(x,y), and σθ(x)=2Idx. The sampler is an overdamped Langevin diffusion targeting πθ(x)=pθ(x∣y). From Theorem 1, we see δθ⋆⊗πθ⋆ is an invariant measure for any stationary point θ⋆ of ℓ; hence for any minimiser, since ℓ∈C1 on Θ.
Implicit diffusion. This is also the mean-field limit of the implicit diffusion framework (Marion et al., 2025, Section 4.1) which reads as
for the optimisation of loss functions where ∇ℓ(θ)=Eπθ[F(θ,x)]. For any deterministic schedule t↦εt satisfying the regularity needed for well-posedness, this is a special case of (3)–(4) with Ψt(θ,Gνt)=−εtGνt, Zt=Xt, bθ=−∇xE(θ,⋅), and σθ=2Idx. The choice εt≡1 gives the time-homogeneous optimiser used in the PGDexample.
MPGD. Accelerated methods were also proposed for the problem of MMLEwhich introduce auxiliary momentum variables to extend PGD, which we term MPGD(Lim et al., 2024). This is again a special case of our framework with the loss choices identical to the previous case and with the auxiliary variables m∈M=Rdθ and v∈V=Rdv such that the optimiser state becomes ϑt=(θt,mt) and the sampler state is Zt=(Xt,Vt). When Ψt is the time-homogeneous heavy-ball ODE, take dv=dx, g(x,v):=2Mx1∥v∥2,
so the sampler is precisely the mass-Mx underdamped Langevin diffusion used by MPGD(Lim et al., 2024). Theorem 1 therefore shows that
δθ⋆⊗δ0⊗πθ⋆⊗N(0,MxIdx)
is stationary whenever ∇θℓ(θ⋆)=0.
3.2 Space and time discretisations
To obtain an SDE that is amenable to numerical implementation, we approximate the mean-field law by an empirical measure of N particles driven by mutually independent Brownian motions. Under i.i.d. initialisation, the particles interact through their common optimiser state and are therefore exchangeable rather than independent. Their empirical gradient GνtN(ϑtN) is used as an approximation of the corresponding mean-field gradient. This gives the following finite-dimensional interacting SDE
where {Bti}i=1N are mutually independent Brownian motions on B and the empirical measure νtN is defined as νtN=(1/N)∑i=1NδZti and
GνtN(ϑtN):=N1i=1∑NF(Πθ(ϑtN),Πx(Zti)).
Certain choices of Ψt and the drift and diffusion coefficients in (9), together with suitable time-discretisation (e.g. Euler-Maruyama) schemes, give rise to practical algorithms. We leave the design of such algorithms to Section 5 where we develop applications. We next consider theoretical analysis of the general mean-field system and its interacting-particle approximation.
4 Analysis
We now study stability and finite-particle error for the general mean-field system (3)–(4). In order to do this, given two solutions (ϑt,νt),(ϑ~t,ν~t), we define the distance metric (Caprio et al., 2025)
and introduce the main assumptions required for our convergence results.
A3.
Suppose that there exist symmetric positive definite matrices Dϑ and Dz, and a constant ρ>0, such that, for every t≥0, every ϑ,ϑ~∈Θ×M, every ν,ν~∈P2(X×V), and every coupling Λ∈Γ(ν,ν~), the following inequality holds:
A3 is the contractivity condition for the coupled optimiser–sampler system in the twisted metrics ∥⋅∥Dϑ2 and ∥⋅∥Dz2. When Dϑ=Idθ+dm and Dz=Idx+dv, it reduces to the usual joint dissipativity condition in the product Euclidean metric.
Remark 1.
A3 is a genuinely joint contractivity condition: dissipativity of the exact-gradient optimiser and of each frozen sampler does not by itself suffice; Appendix B.1 provides an explicit counterexample. Appendix B.2 gives a componentwise small-gain criterion that combines separate dissipativity and Lipschitz bounds for the optimiser response, gradient observation, sampler drift, and diffusion through a positive-definite cross-coupling matrix. Appendix B.3 instead gives a structured criterion based on strong monotonicity of a projected field Φ=(F,∇xE), or joint strong convexity of an underlying potential when this field is conservative, together with sufficient dissipation of the auxiliary variables. Finally, Appendix B.3.1 gives a concrete hypocoercive construction for a heavy-ball optimiser coupled to an underdamped sampler.
Theorem 2.
Suppose A1 and A3 hold with positive definite matrices Dϑ,Dz and constant ρ>0. Let (ϑt,νt) and (ϑ~t,ν~t) be any two solutions of (3)–(4) with initial sampler laws in P2(X×V). Define
If, in addition, A2 holds, define μt:=δϑt⊗νt and μ⋆:=δϑ⋆⊗νθ⋆. Then, for every initial product law μ0=δϑ0⊗ν0, with ν0∈P2(X×V),
W2(μt,μ⋆)≤κe−ρtW2(μ0,μ⋆).
Consequently, μ⋆ is the unique finite-second-moment stationary law among laws of the form δϑ⊗ν. For time-dependent Ψt, stationary means that initializing from the law leaves the law unchanged for every t≥0.
The proof can be found in Appendix A.2. We now consider bounding the error between the particle approximation and the mean-field system. For this, we follow Caprio et al. (2025) and introduce an auxiliary N-copy mean field system. Let ϑˉ0 be deterministic, and let Zˉ01,…,Zˉ0N be i.i.d. with common law νˉ0∈P2(X×V), independently of the mutually independent Brownian motions (Bt1,…,BtN)t≥0. Defining the system
then ϑˉt is deterministic and Zˉt1,…,ZˉtN are i.i.d. with common law νˉt. We define the empirical measure νˉt[N] of the N-copy system as νˉt[N]=(1/N)∑i=1NδZˉti. We now state further assumptions that are required for our parameter error bound.
A4.
Assume that Ψt is uniformly Lipschitz in its gradient argument: for all t≥0, all ϑ∈Θ×M, g,g~∈Rdθ,
∥Ψt(ϑ,g)−Ψt(ϑ,g~)∥≤LΨ∥g−g~∥.
A5.
Assume the mean-field copy system defined in (11)–(12) has uniformly bounded variance of the stochastic gradient:
A5 is a uniform variance bound for the stochastic-gradient integrand. It follows, for example, if F(θ,⋅) is globally Lipschitz with a Lipschitz constant uniform in θ and supt≥0E∥Πx(Zˉt)∥2<∞. More generally, a linear-growth bound uniform along the optimiser path, together with the corresponding uniform second-moment bounds, is sufficient.
Theorem 3 (Finite-particle interaction error).
Suppose A1, A3–A5 hold. Let (ϑtN,Zt1,…,ZtN) solve the particle system (8)–(9) with the same Brownian motions and the synchronous initial conditions ϑ0N=ϑˉ0 and Z0i=Zˉ0i. Let (ϑˉt,Zˉt1,…,ZˉtN) solve the N-copy mean-field system (11)–(12). Then, for every t≥0,
The proof is given in Appendix A.3 and proceeds as a generalisation of Lemma 13 in Caprio et al. (2025). Using Theorems 2 and 3, we may provide a full parameter error bound of the particle system (8)–(9).
Theorem 4 (Parameter error bound of particle system).
Suppose A1–A5 hold. Assume ϑ0N is deterministic and Z01,…,Z0N are i.i.d. with common law ν0, independently of the mutually independent Brownian motions. Then the L2 parameter error satisfies
∥θtN−θ⋆∥L2≤κe−ρtd0+ρLΨNκVF(1−e−ρt),
with d0:=d((ϑ0N,ν0),(ϑ⋆,νθ⋆)), the initial distance from the stationary mean-field solution. Consequently,
N→∞limt→∞limsup∥θtN−θ⋆∥L2=0.
The proof is given in Appendix A.4 and follows from Theorems 2–3. Theorem 4 concerns the continuous-time particle system. To describe at a high level how time discretisation would enter the bound, let h>0, let tk:=kh, and denote by θkN,h the parameter iterate produced by a numerical discretisation of the particle dynamics. Supposing the discretisation can be coupled to the continuous-time system so that, for some error function εdisc such that ∥θkN,h−θtkN∥L2≤εdisc(h,tk,N), where εdisc(h,tk,N)→0 as h→0 – for example, on each finite horizon T, one may have suptk≤Tεdisc(h,tk,N)≤CThα for some α>0. The triangle inequality then gives the end-to-end estimate
∥θkN,h−θ⋆∥L2≤∥θtkN−θ⋆∥L2+εdisc(h,tk,N),
where the first term is bounded by Theorem 4. Establishing such sampler- and optimiser-specific discretisation rates, especially uniformly over an infinite time horizon, requires a separate stability and numerical-analysis argument. We leave this to future work, since the primary aim of the paper is to demonstrate the framework and establish its theoretical foundations.
Figure 1: Ground truth (left), blurred image (middle-left), and comparisons to single particle reconstructions produced by methods MYPGD(middle-right) and HOL-MYPGD(right) for setup A.
5 New Algorithms and Numerics
In this section, we provide two examples to demonstrate the generality of our framework. We first tackle a MMLEproblem by developing a higher-order proximal Langevin method, building on the proximal interacting particle Langevin methods of Encinar et al. (2025). Next, we provide a momentum optimiser generalising MPGD(Lim et al., 2024) for general purpose optimisation and apply this method to EBMtraining.
5.1 MMLE with Higher-Order Langevin Dynamics
5.2 A Momentum Particle Optimiser
6 Conclusion
We introduced a general diffusion-based framework for stochastic optimisation when the loss gradient is an expectation under a parameter-dependent distribution. The framework couples an optimiser with a continuously evolving sampler and accommodates a wide range of dynamics within a common mean-field formulation. Under well-posedness, existence of the stationary pair, and twisted joint strong monotonicity, the mean-field system contracts exponentially to that stationary solution. For the interacting particle system, we obtained an explicit N−1/2 interaction-error bound and a parameter convergence bound.
The experiments illustrate the practical flexibility of the framework. In Bayesian image deblurring, the higher-order Langevin variant improves the reported MSE and SSIM and produces sharper reconstructions than the proximal overdamped baseline. In the two-dimensional energy-based-model experiments, the momentum method reaches lower Fisher divergence more rapidly under the matched (gradient-evaluation) budget, while retaining comparable visual sample quality.
6.1 Limitations and Future Work
The theory relies on global contractivity and uniform-moment assumptions, which can be restrictive for the non-convex objectives encountered in practice. Moreover, the guarantees concern the continuous-time systems: establishing finite-step error and stability for the proposed splitting schemes requires a separate discretisation analysis. The time-dependent contraction result is conditional on verifying its monotonicity rate for each schedule. Future work should therefore develop local or non-convex guarantees, analyse discretisation and adaptive preconditioning.
Acknowledgements
JJZ acknowledges support from EPRSC studentship grant EP/W524323/1. We acknowledge computational resources and support provided by the Department of Mathematics and the Imperial College Research Computing Service, DOI: 10.14469/hpc/2232.
References
Ö. D. Akyildiz, F. R. Crucinio, M. Girolami, T. Johnston, and S. Sabanis Interacting particle Langevin algorithm for maximum marginal likelihood estimation. ESAIM: Probability and Statistics. Cited by: §B.3, §1, §1, §2.2.
C. Andrieu and M. Vihola Markovian stochastic approximation with expanding projections. Bernoulli 20 (2), pp. 545–585. Cited by: §1, §2.2.
Y. F. Atchadé, G. Fort, and E. Moulines On perturbed proximal gradient algorithms. Journal of Machine Learning Research 18 (10), pp. 1–33. Cited by: §1, §1, §2.2.
A. Barakat and P. Bianchi Convergence and dynamical behavior of the Adam algorithm for nonconvex stochastic optimization. SIAM Journal on Optimization 31 (1), pp. 244–274. External Links: Document Cited by: §3.1.
A. Barp, S. Takao, M. Betancourt, A. Arnaudon, and M. Girolami A unifying and canonical description of measure-preserving diffusions. arXiv preprint arXiv:2105.02845. Cited by: §3.1.
F. Bolley, A. Guillin, and F. Malrieu Trend to equilibrium and particle approximation for a weakly selfconsistent Vlasov-Fokker-Planck equation. ESAIM: M2AN 44 (5), pp. 867–884. External Links: Document, Link Cited by: §A.2.
O. Cappé and E. Moulines On-line expectation-maximization algorithm for latent data models. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 71 (3), pp. 593–613. External Links: Document Cited by: §2.2.
R. Caprio, J. Kuntz, S. Power, and A. M. Johansen Error bounds for particle gradient descent, and extensions of the log-Sobolev and Talagrand inequalities. Journal of Machine Learning Research 26 (103), pp. 1–38. Cited by: §A.3, §4, §4, §4.
J. Cuin, D. Carbone, and O. D. Akyildiz Learning latent variable models via Jarzynski-adjusted Langevin algorithm. Advances in Neural Information Processing Systems 38, pp. 106837–106876. Cited by: §2.2.
J. Cuin, D. Carbone, Y. Tang, and O. D. Akyildiz Efficient stochastic optimisation via sequential Monte Carlo. In Forty-third International Conference on Machine Learning, External Links: Link Cited by: §2.2.
A. B. Da Silva and M. Gazeau A general system of differential equations to model first-order adaptive algorithms. Journal of Machine Learning Research 21 (129), pp. 1–42. Cited by: §3.1.
V. De Bortoli, A. Durmus, M. Pereyra, and A. F. Vidal Efficient stochastic optimisation by unadjusted Langevin Monte Carlo. Statistics and Computing 31 (3), pp. 29. External Links: ISSN 1573-1375, Document Cited by: §1, §1, §2.2.
B. Delyon, M. Lavielle, and E. Moulines Convergence of a stochastic approximation version of the EM algorithm. The Annals of Statistics 27 (1), pp. 94–128. External Links: Document Cited by: §2.2.
A. P. Dempster, N. M. Laird, and D. B. Rubin Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society. Series B (Methodological) 39 (1), pp. 1–38. External Links: ISSN 00359246 Cited by: §2.2.
A. Durmus, E. Moulines, and M. Pereyra Efficient Bayesian computation by proximal Markov chain Monte Carlo: when Langevin meets Moreau. SIAM Journal on Imaging Sciences 11 (1), pp. 473–506. Cited by: §C.1, §C.1.
P. C. Encinar, F. R. Crucinio, and O. D. Akyildiz Proximal interacting particle Langevin algorithms. In Conference on Uncertainty in Artificial Intelligence, pp. 1220–1265. Cited by: §C.1.1, §C.1.1, §C.1.1, §C.1, §C.1, §5.
G. Fort and E. Moulines Convergence of the Monte Carlo expectation maximization for curved exponential families. The Annals of Statistics 31 (4), pp. 1220 – 1259. External Links: Document Cited by: §2.2.
A. Glyn-Davies, C. Duffin, I. Kazlauskaite, M. Girolami, and Ö. D. Akyildiz Statistical finite elements via interacting particle Langevin dynamics. SIAM/ASA Journal on Uncertainty Quantification 13 (3), pp. 1200–1227. Cited by: §1.
J. V. Goldman, T. Sell, and S. S. Singh Gradient-based Markov chain Monte Carlo for Bayesian inference with non-differentiable priors. Journal of the American Statistical Association 117 (540), pp. 2182–2193. Cited by: §C.1, §C.1.
S. Gruffaz, K. Kim, A. Durmus, and J. Gardner Stochastic approximation with biased MCMC for expectation maximization. In International Conference on Artificial Intelligence and Statistics, pp. 2332–2340. Cited by: §2.2.
C. Heredia Modeling AdaGrad, RMSProp, and Adam with integro-differential equations. arXiv preprint arXiv:2411.09734. Cited by: §3.1.
G. Hinton Training products of experts by minimizing contrastive divergence. Neural Computation 14, pp. 1771–1800. External Links: Document Cited by: §1, §2.2.
J. Iollo, C. Heinkelé, P. Alliez, and F. Forbes Bayesian experimental design via contrastive diffusions. In The Thirteenth International Conference on Learning Representations, External Links: Link Cited by: §1.
D. P. Kingma and J. Ba Adam: a method for stochastic optimization. In International Conference on Learning Representations (ICLR), Cited by: §1.
J. Kuntz, J. N. Lim, and A. M. Johansen Particle algorithms for maximum likelihood training of latent variable models. In Proceedings of The 26th International Conference on Artificial Intelligence and Statistics, pp. 5134–5180. Cited by: §B.3, §1, §1, §2.2, §3.1.1.
B. Leimkuhler and C. Matthews Robust and efficient configurational molecular sampling via Langevin dynamics. The Journal of Chemical Physics 138 (17), pp. 174102. External Links: ISSN 0021-9606, Document Cited by: §C.2.1.
J. N. Lim, J. Kuntz, S. Power, and A. M. Johansen Momentum particle maximum likelihood. In International Conference on Machine Learning, pp. 29816–29871. Cited by: §C.2.1, §1, §1, §2.2, §3.1.1, §3.1.1, §5.
Y. Ma, N. Chatterji, X. Cheng, N. Flammarion, P. Bartlett, and M. I. Jordan Is there an analog of Nesterov acceleration for gradient-based MCMC?. Bernoulli 27 (3), pp. 1942–1992. Cited by: §C.2.1.
Y. Ma, T. Chen, and E. Fox A complete recipe for stochastic gradient MCMC. Advances in Neural Information Processing Systems 28. Cited by: §3.1, §3.1.
P. Marion, A. Korba, P. Bartlett, M. Blondel, V. De Bortoli, A. Doucet, F. Llinares-López, C. Paquette, and Q. Berthet Implicit diffusion: efficient optimization through stochastic sampling. In International Conference on Artificial Intelligence and Statistics, pp. 1999–2007. Cited by: §1, §1, §2.2, §3.1.1.
J. Marks, T. Y. J. Wang, and O. D. Akyildiz Learning latent energy-based models via interacting particle Langevin dynamics. In Proceedings of the Forty-Second Conference on Uncertainty in Artificial Intelligence, Cited by: §1, §1, §2.2.
W. Mou, Y. Ma, M. J. Wainwright, P. L. Bartlett, and M. I. Jordan High-order Langevin diffusion yields an accelerated MCMC algorithm. Journal of Machine Learning Research 22 (42), pp. 1–41. External Links: Link Cited by: §C.1.1, §C.1.2, §C.1.2.
R. M. Neal and G. E. Hinton A view of the EM algorithm that justifies incremental, sparse, and other variants. In Learning in graphical models, pp. 355–368. Cited by: §2.2.
E. Nijkamp, M. Hill, S. Zhu, and Y. N. Wu Learning non-convergent non-persistent short-run MCMC toward energy-based model. Advances in Neural Information Processing Systems 32. Cited by: §1.
P. F. V. Oliva, O. D. Akyildiz, and A. Duncan Uniform-in-time convergence bounds for persistent contrastive divergence algorithms. arXiv preprint arXiv:2510.01944. Cited by: §1, §2.2.
P. F. V. Oliva and O. D. Akyildiz Kinetic interacting particle Langevin Monte Carlo. Statistics and Computing 36 (5), pp. 221. Cited by: §2.2.
B. Pang, T. Han, E. Nijkamp, S. Zhu, and Y. N. Wu Learning latent space energy-based prior model. Advances in Neural Information Processing Systems 33, pp. 21994–22008. Cited by: §1.
A. Pascucci Probability theory II: stochastic calculus. Springer. Cited by: §A.2.
H. Robbins and S. Monro A stochastic approximation method. The Annals of Mathematical Statistics 22 (3), pp. 400 – 407. External Links: Document Cited by: §2.2.
M. Scheutzow A stochastic Gronwall lemma. Infinite Dimensional Analysis, Quantum Probability and Related Topics 16 (02), pp. 1350019. External Links: Document, https://doi.org/10.1142/S0219025713500197 Cited by: §A.3.
Y. Song and D. P. Kingma How to train your energy-based models. arXiv preprint arXiv:2101.03288. Cited by: §1.
T. Tieleman Training restricted Boltzmann machines using approximations to the likelihood gradient. In Proceedings of the 25th international conference on Machine learning, pp. 1064–1071. Cited by: §2.2.
T. Y. J. Wang, J. Kuntz, and O. D. Akyildiz Training latent diffusion models with interacting particle algorithms. In The 29th International Conference on Artificial Intelligence and Statistics (AISTATS), Cited by: §1.
G. C. G. Wei and M. A. Tanner A Monte Carlo implementation of the EM algorithm and the poor man’s data augmentation algorithms. Journal of the American Statistical Association 85 (411), pp. 699–704. External Links: Document Cited by: §2.2.
N. Yao, P. Ali, X. Tao, and L. Zhu Accelerating Langevin Monte Carlo sampling: a large deviations analysis. arXiv preprint arXiv:2503.19066. Cited by: §3.1.
L. Younes On the convergence of Markovian stochastic algorithms with rapidly decreasing ergodicity rates. Stochastics and Stochastics Reports 65 (3-4), pp. 177–228. Cited by: §1, §2.2.
Appendix
We present proofs for the theorems stated in the main text as well as supplementary material pertaining to experiments and implementation details. The appendix is organised as follows:
Appendix A Proofs of main results
A.1 Proof of Theorem 1
Set ϑ0=ϑ⋆ and Z0∼νθ⋆. We construct a solution to (3)–(4) with initial law δϑ⋆⊗νθ⋆ and show that this law is preserved.
Set ϑt≡ϑ⋆. Since Πθ(ϑ⋆)=θ⋆, let Zt solve the frozen sampler equation
dZt=bθ⋆(Zt)dt+σθ⋆(Zt)dBt,Z0∼νθ⋆.
By invariance of νθ⋆, Law(Zt)=νθ⋆ for every t≥0. Hence
where we used (Πx)#νθ⋆=πθ⋆. Assumption Assumption A2 gives Ψt(ϑ⋆,0)=0, and therefore dϑt=0. Thus (ϑt,Zt) solves the coupled system and has law δϑ⋆⊗νθ⋆ for all t≥0. By pathwise uniqueness in Assumption A1, this constructed solution is the unique solution with the prescribed initial data. This proves that μ⋆ is invariant.
A.2 Proof of Theorem 2
The proof follows a synchronous coupling argument with twisted metrics Dϑ,Dz, similar in style to Proposition 8 in Bolley et al. (2010).
Let (ϑt,νt) and (ϑ~t,ν~t) be two solutions. Choose an optimal coupling Λ0∈Γ(ν0,ν~0), take (Z0,Z~0)∼Λ0, and drive the two sampler equations with the same Brownian motion:
If we assume under A1 that the diffusion coefficient is constant, Mt=0 and we can proceed to take expectations. Otherwise for any t>0 we pick a T>t and show M is a true martingale on [0,T] and hence has zero expectation under the linear growth assumption. We proceed by bounding the expected square root of the quadratic variation under the linear-growth assumption in A1. Indeed, the quadratic variation at time T is given
Now for finite T, we may define rT:=supt≤Tmax{∥θt∥,∥θ~t∥}<∞ since θt,θ~t are deterministic, continuous and bounded on [0,T]. Then on [0,T] we have the modified linear-growth assumption,
The modified linear-growth assumption (13) also implies the expectations of the suprema of ∥Zs∥2 and ∥Z~s∥2 are bounded (see for example Theorem 14.5.2 in Pascucci (2024)). This gives the desired bound E⟨M⟩T<∞ and so, by the Burkholder–Davis–Gundy inequality, Mt is a true martingale on [0,T]. We can now take expectations then differentiate with respect to t and obtain
Now assume in addition that A2 holds. By Theorem 1, (ϑ⋆,νθ⋆) is a stationary solution. Moreover, for deterministic optimiser states,
W22(δϑ⊗ν,δϑ~⊗ν~)=∥ϑ−ϑ~∥2+W22(ν,ν~).
Applying the preceding contraction with (ϑ~t,ν~t)=(ϑ⋆,νθ⋆) proves
W2(μt,μ⋆)≤κe−ρtW2(μ0,μ⋆).
Finally, let δϑ⊗ν be any other stationary law of the stated product form with finite second moment. Applying this estimate between that stationary law and μ⋆ gives, for every t≥0,
W2(δϑ⊗ν,μ⋆)≤κe−ρtW2(δϑ⊗ν,μ⋆).
Letting t→∞ shows that the left-hand side is zero. Hence δϑ⊗ν=μ⋆, proving uniqueness within the class asserted in the theorem.
A.3 Proof of Theorem 3
We follow the synchronous coupling route using an N-copy mean-field system as in Caprio et al. (2025). Introducing the notation
Note that since solutions exist, the process MtN is a local martingale. Now add and subtract DϑΨt(ϑˉt,Gνˉt[N](ϑˉt)). Since Assumption Assumption A3 holds for every choice of states, measures and couplings, we may apply it to the empirical coupling
where λϑ+ is the largest eigenvalue of Dϑ. Since ϑˉ0 is deterministic, ϑˉt is deterministic. Moreover, because the sampler initial states are i.i.d. and independent of the mutually independent Brownian motions and each copy shares a deterministic optimiser path, the random vectors
so that E[gt2]≤VF/N for every t≥0 by the last display. Combining the almost-sure inequality for dξtN with the Cauchy–Schwarz bound above gives, almost surely,
dξtN≤(−2ρξtN+2cξtNgt)dt+dMtN.
Since t↦e2ρt is deterministic and of finite variation, Itö’s product rule and ξ0N=0 (synchronous initialisation) give, almost surely for all t≥0,
e2ρtξtN≤2c∫0te2ρsξsNgsds+∫0te2ρsdMsN.
Since no moment bounds for the particle system are assumed, the local martingale MN need not be a true martingale, and we use the standard localisation argument for continuous local martingales, followed by Fatou’s lemma to remove the stopping times; see for example Scheutzow (2013). For n≥1, define the stopping times
τn:=inf{s≥0:ξsN≥nor⟨MN⟩s≥n},inf∅:=∞.
Since ξN and ⟨MN⟩ are continuous, adapted and finite-valued, and ξ0N=0, we have τn↑∞ almost surely as n→∞, and ξs∧τnN≤n for all s≥0. Moreover, for fixed t≥0, the stopped integral ∫0t∧τne2ρsdMsN has quadratic variation at most e4ρtn; hence it is a square-integrable martingale with zero mean. Evaluating the previous inequality at t∧τn, taking expectations and using Tonelli’s theorem (the integrand is non-negative) gives
Hence ϕn is continuous (by dominated convergence), satisfies 0≤ϕn(r)≤e2ρrn, and, with a(s):=2cVF/Neρs,
ϕn(r)≤∫0ra(s)ϕn(s)dsfor all r≥0.
We now use the following square-root form of Grönwall’s lemma, a special case of the Bihari–LaSalle inequality: if ϕ:[0,t]→[0,∞) is bounded and measurable, a≥0 is integrable on [0,t], and ϕ(r)≤∫0ra(s)ϕ(s)ds for all r∈[0,t], then ϕ(t)≤21∫0ta(s)ds. Indeed, Φ(r):=∫0ra(s)ϕ(s)ds is absolutely continuous and ϕ≤Φ; for every δ>0, the function r↦Φ(r)+δ is absolutely continuous with
drdΦ(r)+δ=2Φ(r)+δa(r)ϕ(r)≤2a(r)for almost every r∈[0,t],
so that ϕ(t)≤Φ(t)+δ≤δ+21∫0ta(s)ds, and we let δ↓0. Applying this lemma to ϕn yields
ϕn(t)≤cNVF∫0teρsds=ρcNVF(eρt−1).
Since τn↑∞ almost surely, e2ρ(t∧τn)ξt∧τnN→e2ρtξtN almost surely, and Fatou’s lemma gives
Construct the N-copy mean-field system and the interacting particle system with the coupling from Theorem 3: set ϑˉ0=ϑ0N, let the mean-field sampler copies have common initial law ν0, and use the same initial sampler states and Brownian motions in each particle–mean-field pair. Since every mean-field sampler copy has law νˉt, the common optimiser path ϑˉt is the optimiser path of the one-copy mean-field system started from (ϑ0N,ν0).
Write θˉt:=Πθ(ϑˉt), which is deterministic. Minkowski’s inequality in L2(P) and the fact that Πθ is a Euclidean coordinate projection give
where ϑˉ0=ϑ0N. Combining the last three displays yields
∥θtN−θ⋆∥L2≤κe−ρtd0+ρLΨNκVF(1−e−ρt),
which is the claimed parameter-error estimate.
Appendix B Discussions on verifiable assumptions
This appendix explains the role and verification of A3. We first show why separate stability of the optimiser and frozen sampler is not sufficient. We then give two complementary sufficient-condition routes: a general small-gain criterion based on separate dissipativity and Lipschitz bounds, and a structured criterion for projected fields with auxiliary variables. The latter is illustrated by a concrete heavy-ball/underdamped construction.
B.1 Why joint cross-coupling control is necessary
Separate dissipativity of the exact-gradient optimiser and of each frozen sampler does not imply stability of the coupled dynamics. Consider the two-dimensional non-augmented system Zt=Xt. Let a>0, ω∈R, and
Two eigenvalues have positive real part, so generic first moments grow exponentially. Thus A3 must control the optimiser–sampler cross-coupling; separate componentwise stability alone cannot provide the required contraction.
B.2 A general separated sufficient condition
We first give a general small-gain route to A3. Fix symmetric positive-definite matrices
For the optimiser term, add and subtract Ψt(ϑ~,Gν(ϑ~)). U1 bounds the same-measure term by −ρΨa2. For the remaining term, Cauchy–Schwarz in the Dϑ-metric gives
Including the factor 1/2 in (10), its left-hand side is therefore at most
−(ab)⊤H(ab).
The three inequalities in (14) are precisely the positive-diagonal and positive-determinant conditions for H. It is therefore positive definite. Since its smallest eigenvalue is ρ=λmin(H)>0, the preceding display is at most −ρ(a2+b2), which is A3. Under (15), each diagonal entry is strictly larger than the absolute value of the off-diagonal entry, so strict diagonal dominance gives the simpler sufficient condition. ∎
B.3 A sufficient condition based on the projected field
For systems with position-like and auxiliary variables, the following route uses strong monotonicity of the projected (θ,x)-field and separate dissipation of the auxiliary coordinates.
U4.
Assume
Θ=Rdθ,M=Rdm,X=Rdx,V=Rdv.
Write ϑ=(θ,m), z=(x,v), and let Πθ(ϑ)=θ, Πx(z)=x. Assume that the potential-dependent force in the sampler is the score ∇xlogπθ(x)=−∇xE(θ,x). Define the projected dissipative field by using the negative of this score in its x-component:
Φ(θ,x):=(F(θ,x)∇xE(θ,x)).
Assume there exists ρΦ>0 such that, for every θ,θ~∈Rdθ and every x,x~∈Rdx,
U4 controls the joint projected field in (θ,x), whereas U5 requires the auxiliary coordinates (m,v) to dissipate strongly enough to absorb the cross terms generated by the twisted metrics. In the conservative case Φ=∇(θ,x)φ, joint ρΦ-strong convexity of φ implies the required strong monotonicity. For MMLE, this applies when F=∇θE, so that φ=E is the negative joint log-density up to an additive constant independent of (θ,x); see Kuntz et al. (2023); Akyildiz et al. (2025).
Corollary A.2 (Projected-field sufficient condition for A3).
Suppose U4 and U5 hold, and suppose that σθ(z) is independent of (θ,z). If
Substitution into the preceding display gives exactly (10). ∎
B.3.1 Application to momentum-enriched dynamics
Proposition A.1 (A hypocoercive verification of A3).
Suppose U4 holds and that Φ is LΦ-Lipschitz. Take dm=dθ and dv=dx, and consider the unit-mass heavy-ball optimiser and underdamped sampler with a common friction coefficient γ>0:
Because ∇xE is the second component of the LΦ-Lipschitz field Φ,
∥ΔHx∥2≤LΦ2(∥θ−θ~∥2+∥x−x~∥2).
After integration, (17) holds with
Dv=εβIdx,Ax=(1−ε)γ2βLΦ2.
Finally,
Aθ+Ax=(1−ε)γ22βLΦ2<βρΦ.
Corollary A.2 therefore verifies A3 in the displayed hypocoercive metrics. ∎
Appendix C Experimental Setting
C.1 MMLE with Higher-Order Langevin Dynamics
Here we discuss the Bayesian image-deblurring experiments introduced in Section 5.1. Given a blurred and noisy observation y=Bx+ε, obtained through an ill-conditioned blurring operator B and ε∼N(0,σ2Idx), the goal is to recover clean latent images x. We equip this ill-conditioned inverse problem with a total-variation prior, with strength governed by an unknown scalar parameter θ. The hyper-parameter θ typically requires manual tuning but instead we estimate an optimal value by framing this as a high-dimensional MMLEproblem. With the total-variation prior, we have a non-differentiable posterior over the latent image which closely follows the setup in Section 5.3 of Encinar et al. (2025) and the image reconstruction problems in Durmus et al. (2018); Goldman et al. (2022).
Let x⋆∈Rdx denote the ground-truth image, with dimension dx=nw×nh. We consider the blurring operator B∈Rdx×dx following Encinar et al. (2025). In particular, B is a uniform local averaging operator taking the value of an interior pixel xij⋆ and replacing with the uniform average of a P×P neighbourhood of pixels, with truncation and renormalisation at the image boundaries. We equip the latent image x⋆ with the anisotropic total-variation log-prior,
Positive one-homogeneity of the total-variation function and a change of variables u=eθx give the normalisation constant C(θ)∝e−dxθ which we assume to be finite for modelling purposes. The parameter eθ>0 controls the strength of this prior, which typically requires manual tuning (Durmus et al., 2018; Goldman et al., 2022). Note we exponentiate θ to ensure positivity. Here, TV(x):=∥∇dx∥1 is the anisotropic total-variation, with ∇d the two-dimensional discrete gradient operator, which is non-differentiable, and ∥⋅∥1 is the ℓ1 norm. The full posterior is therefore of the form,
where y is considered as fixed data. We may derive the gradient of the negative log-marginal likelihood using Fisher’s identity,
∇θℓ(θ)=−Ex∼πθ[∇θlogpθ(x,y)].
Since the log-likelihood
logp(y∣x)=−2σ21∥y−Bx∥22+constant
is independent of θ, we have
∇θlogpθ(x,y)=dx−eθTV(x),
and hence
∇θℓ(θ)=Ex∼πθ[eθTV(x)]−dx.
Thus the objective function is expressed as in (1) by an expectation over πθ with F(θ,x)=eθTV(x)−dx.
C.1.1 Proximal Dynamics
Sampling from πθ for a fixed θ is challenging as the total-variation, TV(x), is non-differentiable. However, following Encinar et al. (2025), particle algorithms applicable to the MMLEproblem may be extended to non-differentiable pθ(x,y). In particular, letting
E(θ,x):=2σ21∥y−Bx∥2+eθTV(x)−dxθ
such that πθ(x)∝exp(−E(θ,x)), we decompose E(θ,x)=g1(θ,x)+g2(θ,x) with g1,g2 convex lower-bounded functions, g1 differentiable and g2 proper and lower semi-continuous. We now replace g2 with the λ-Moreau-Yosida (MY)approximation denoted by g2λ and defined,
where proxg2λ(x) is the λ-proximity mapping or proximal operator function of g2 for any λ>0. We denote the full MYapproximation with Eλ(θ,x)=g1(θ,x)+g2λ(θ,x), which is always differentiable and converges pointwise to E(θ,x) in the limit λ→0. The gradient is given for all x∈Rd by
∇xEλ(θ,x)=∇xg1(x)+λ1(x−proxg2λ(θ,x)),
where we treat θ as fixed in the minimisation over Rdx. Since E(θ,x) is continuously differentiable with respect to θ, we may take ∇θE gradients directly. In our setting we have g1=∥y−Bx∥22/2σ2−dxθ and g2=eθTV(x). Now g1 is differentiable, while g2 is proper and lower semi-continuous, allowing us to write the explicit gradients,
which we substitute with the gradient expressions (18)–(19). We discretise the system with a Lie-Trotter splitting of the parameter and sampling dynamics, running a forward Euler step for a parameter update followed by an Euler-Maruyama step for a sampling update. This is our MYPGDbaseline as introduced in Encinar et al. (2025). Similarly, we obtain the proximal version of HOL-MYPGD,
where α,γ>0, and Brownian motions {Bi}i=1N are independent. We discretise the higher-order Langevin parts using the splitting scheme introduced in Mou et al. (2021) and discuss a full splitting scheme discretisation in the following section. We note that we apply the MYapproximation only to the sampling dynamics, while the parameter update uses the original gradient ∇θE(θ,x). This yields the hybrid dynamics used by Encinar et al. (2025). For any finite λ, the parameter update is evaluated using particles approximating the smoothed law πθλ∝e−Eλ(θ,⋅), and thus incurs a small smoothing bias.
C.1.2 HOL-MYPGD Discretisation
We consider a Lie-Trotter splitting between the parameter updates and the sampling updates like with the MYPGDimplementation. In particular, at each iteration we sequentially step parameters using a forward Euler scheme followed by a sampling step following the discretisation scheme in Mou et al. (2021). This scheme splits the higher-order Langevin dynamics into an exactly solvable linear evolution followed by a quadrature approximation of an integrated non-linear gradient term ∇xEλ. Introducing the time discretisation 0=t0<t1<⋯<tK=T with tk=kh and step-size h=T/K we denote by (X^ni,U^ni,V^ni) the discrete time approximations of (Xtni,Utni,Vtni). Then we have the Gaussian update rule,
with ξni=(ξni,1,ξni,2,ξni,3)∼N(0,Σ). The vector ΔEλ(θ,x,u) is chosen to be an approximation of the integral ∫0h∇xEλ(θ,x+ut)dt. We note that in Mou et al. (2021), a Lagrange interpolation is used for a high order approximation with high-order mixing guarantees; however we choose to take the simple endpoint approximation, ΔEλ(θ,x,u)=h∇xEλ(θ,x) for a fair comparison against MYPGD. We refer the reader to Section 3 of Mou et al. (2021) for a more detailed review and derivation of the scheme. The constants μ12–μ33 are defined explicitly as follows,
We present two distinct blurring setups A and B with different blur and noise severity. Setup A is a severe blurring with patch size P=10 and added noise σ=1.0, whereas setup B is a less severe blurring with patch size P=8 and σ=0.8. We apply the problem to a variety of black and white images of varying sizes, which we scale to approximately the same dimension dx.
Across all setups we set N=20 particles with independent initial states
X0i∼i.i.dN(501dx,302Idx),i=1,…,N,
where each component is drawn from a Gaussian distribution with mean 50 and standard deviation 30 and set θ0=−15. We set the Moreau-envelope parameter λ=0.4 and run K=6000 iterations with a shared step-size h=0.04, noting that in implementation we normalise θ per pixel by the dimension dx and use the following gradient,
∇θℓ(θ)=Ex∼πθ[dxeθTV(x)−1].
We evaluate the proximal map using a Douglas-Rachford TV method from the proxTV package in Python. All models were trained and evaluated on a high-performance computing cluster provided by the institution. Training was done on a NVIDIA RTX 6000 Ada Generation GPU with 18176 cores and 48GB of on-GPU memory. Images are taken from the Berkeley Segmentation and USC-SIPI image datasets.
We report the evolution of the θ estimate, mean squared error (MSE), structural similarity index (SSIM)between the averaged particle cloud and ground-truth images. To tune the hyper-parameters α,γ for the HOL-MYPGDmethod, we perform a grid search to achieve the best SSIMafter K iterations for setups A and B for an example test image. We report for setup A the best parameters α=4.0,γ=0.6 and for setup B we take α=4.2,γ=0.7. We note that the hyper-parameters are not tuned for each image, but rather for a single image in each setup. In addition, we observed little run-to-run variability when changing seeds which we attribute to the particle averaging. We also note that the graphs in Figures , A.2, A.4, and A.6 are evaluated on the averaged particle cloud, whilst Figures 1, A.1, A.3, and A.5 are produced by a single particle.
Figure A.1: Setup B deblurring image comparison 1.
Figure A.2: Setup B deblurring convergence comparison 1.
Figure A.3: Setup B deblurring image comparison 2.
Figure A.4: Setup B deblurring convergence comparison 2.
Figure A.5: Setup B deblurring image comparison 3.
Figure A.6: Setup B deblurring convergence comparison 3.
C.2 Momentum Mean-Field Particle Optimiser
Here, we discuss the momentum mean-field particle optimiser (M-MFPO)algorithm in Section 5.2, motivate a discretisation and present details on the EBMtraining experiment.
C.2.1 M-MFPO Discretisation
We begin by constructing a discretisation to provide a concrete algorithm for our framework. A naive Euler-Maruyama discretisation of underdamped Langevin diffusion (ULD)can have poor stability and obscure the practical benefits of momentum; related limitations have been studied for underdamped samplers (Ma et al., 2021). Indeed, preliminary experimental testing of the Euler-Maruyama discretisation yielded poor stability requiring small step-sizes and hence slow convergence. Instead we propose a splitting scheme inspired by the OBABO scheme of Leimkuhler and Matthews (2013) for the discretisation of the underdamped Langevin dynamics. We consider the following splitting of the particle dynamics () generator into,
Here, L is linear and O is an Ornstein-Uhlenbeck part, for which we know the solution exactly. The remaining parts A1, A2, B1 and B2 are deterministic and may be approximated with a forward Euler step. The frictionless exact-gradient parameter dynamics described by
dθt=mtdt,dmt=−∇θℓ(θt)dt
are Hamiltonian with
Hθ(θ,m)=21∥m∥2+ℓ(θ),
In the mean-field and particle systems, with corresponding A1 and B1 parts, the objective gradient is approximated and is not generally ∇θℓ(θ) away from sampler equilibrium. For frozen θ, the sampler dynamics, given by the A2 and B2 parts, is Hamiltonian for each (Xi,Vi) and a full Hamiltonian is given by
We note that the continuous time results in this paper do not establish any discretisation related guarantees, which we leave for future work.
We now construct a Strang-splitting scheme by combining the exact solutions of the L and O parts with a forward Euler step for the remaining parts. We introduce the time discretisation 0=t0<t1<⋯<tK=T with tk=kh and step-size h=T/K. Defining η=exp(−2γh) and Fˉ(θ,X[N]):=N1∑i=1NF(θ,Xi) for clarity, we opt for the following order of updates,
where updates are read in order from left to right, top to bottom. We denote θ^n,m^n,X^ni,V^ni the approximations of θtn,mtn,Xtni,Vtni respectively and ξnXi,1,ξnXi,2 are independent standard Gaussian random variables. The order of updates is not unique and we may swap the orders of any update within each row without changing the scheme. The linear L flow is split symmetrically alongside the O flow.
We note that (20) features alternating updates between the parameter and particles. Ignoring parameter updates, the sequential particle updates are exactly the OBABO scheme for the underdamped Langevin dynamics with frozen parameters; similarly, ignoring particle updates, the sequential parameter updates are exactly a Strang splitting scheme of the Heavy Ball dynamics with frozen particles. We note that discretisation may be viewed this way in special regimes when θ is close to a fixed point of the optimiser and Xi are close to equilibrium. However in general the coupling between the A,B parameter and particle dynamics cannot be reduced to a single Hamiltonian system and separated discretisation steps are needed. We show that both the continuous-time system generated by the A and B parts and the discrete-time system generated by the B1,A,B2 parts of the discretisation have volume preserving flows, which motivates our choice of discretisation scheme.
Lemma A.1 (Volume preservation of schemes).
Consider the ODE obtained by taking the A, B parts of (). Assuming the associated flow is globally defined and the vector field in C1 is continuously differentiable, then the flow is volume preserving. In particular, let φt denote the flow generated by the ODE, then
detDφt(z)=1,
where D denotes the total derivative and for any z:=(θ,m,X,V) and t>0.
Moreover, let Φh be the one-step map described by the B,A sections of the discretisation (20). Then Φh is also volume preserving. In particular,
detDΦh(z)=1,
for any z:=(θ,m,X,V) and h the step-size.
Proof.
Using Liouville’s formula, it is a classical result that the ODE, x˙=f(x), is volume preserving if and only if div(f)≡0. For our system (), the A,B sub-system is given by,
From this it is clear the divergence of the vector-field is zero as each derivative is zero and the system is volume preserving. We now show the discretisation of the A,B subsystem in (20) is also volume preserving. Given a one-step scheme, Φh:Rdθ+dm×(Rdx+dv)N→Rdθ+dm×(Rdx+dv)N approximating the true flow φh of (21) over a time interval of length h, assume that Φh is a C1-diffeomorphism. It is volume preserving if and only if
∣detDΦh(θ,m,X,V)∣=1
for every (θ,m,X,V). For the splitting maps considered below, the determinant is in fact equal to one. We show this by splitting the main flow into the composition of multiple sub-flows. From the chain rule, it is enough to check that each sub-flow is volume preserving. Taking Φh to be the one-step map associated with the B,A,B section of (20), we consider the composition,
Taking derivatives we see that DΦh(1) and DΦh(2) are both unit triangular matrices (up to row and column exchanges) and hence, detDΦh(1)=detDΦh(2)=1 so each component of the composition is volume preserving and hence the A,B subsystem discretisation is also volume preserving. ∎
With a typical ULDin which the A,B parts describe a Hamiltonian system, whose generated flow is symplectic and hence integrators are designed to also be symplectic. In our case, the A,B parts no longer form a single Hamiltonian system, but the generated flow is still volume preserving and finding a discretisation scheme that is also volume preserving helps respect the underlying structure of the ODE.
Other orderings of parameter and particle updates are also valid. For instance, one could alternate between a full step of the parameters and a full step of the particles. The reason we decide the interweaving updates in (20) is one of computational efficiency. The computational bottleneck in these schemes is usually the expensive computations and evaluations of the gradients of the energy and objective functions, with the cost of such gradient evaluations also scaling with the size of the model. We observe in (20) and other second order schemes that gradient evaluations are required twice in one iteration: once before the A step and once after. However this issue may be circumvented by saving the second gradient evaluation at the end of one iteration and re-using it for the first gradient evaluation at the start of the next iteration, essentially only requiring one gradient evaluation per iteration. Note that this is true provided the A1,A2 updates are sequential between the two sets of B1,B2 updates. This would not be possible if we were to naively update particles and parameters in series. We would also like to mention that our scheme admits other formulations such as using the BAOAB scheme with the same benefits as our proposed OBABO-like scheme and may also be written in the same way.
Whilst other practical integrators for ULDare known and widely used, such as the (Euler) Exponential Integrator used in the MPGDdiscretisation (Lim et al., 2024), we found empirically that the OBABO-like splitting scheme is the most stable and performative whilst admitting larger step-sizes. The BAB sequence helps preserves the geometry and structure of the continuous-time dynamics and widely used to discretise Hamiltonian systems, in which we express a resemblance to. In the Hamiltonian setting the B1A1B1 system with fixed particles or the B2A2B2 system with fixed parameters is also more commonly known as the leap-frog algorithm and a key component of Hamiltonian Monte Carlo (HMC). Even at the level of the full coupled system, the second-order full-system dynamics admits a natural decomposition into interpretable subcomponents that can be updated separately, which motivates the use of a splitting scheme. In particular the splitting of the OBABO scheme preserves this operator structure, respecting the position-momentum decomposition present.
C.2.2 Hyperparameter Tuning
The choices of friction γ and step size h are central to the stability and convergence of the algorithm; principled tuning remains open. Because the parameter and particle updates play different roles, an implementation may use separate values (γθ,hθ) and (γX,hX) for the two subsystems.
In (20), friction enters the split flows through the momentum coefficient γh. For fixed h>0, the deterministic interwoven leapfrog scheme is obtained in the limit γ↓0. Conversely, as γh→∞, one has η→0: the particle momenta are replaced by independent standard Gaussian draws, whereas the parameter momentum is set to zero because the L flow has no noise. In this limit,
Thus the position and parameter updates reduce respectively to an Euler–Maruyama step for overdamped Langevin dynamics and a gradient-descent step, both with step size h2/2.