betaFeedback

WorksPhysics and Astronomy

Optimal sampling strategies in event-chain Monte Carlo

Abstract

Event-chain Monte Carlo (ECMC) has revolutionised computational sampling over recent years, providing a powerful alternative to the molecular-dynamics (MD) and Hamiltonian Monte Carlo (HMC) algorithms. Each method outperforms the ubiquitous random-walk Metropolis algorithm by advancing particles along deterministic trajectories, but ECMC achieves this without being constrained by Newtonian dynamics. Recent advances exploited this dynamical freedom to induce a collective particle dynamics that relax local density variations on fast timescales. In a foundational model of NN pairwise-interacting particles on the 1D torus, this led to an O(N3/4)O(N^{3/4}) improvement on the industry-leading computational efficiency of MD and HMC - but with an impractically small prefactor at low/high mean particle density for general attractive/repulsive interactions. Here we present a universal framework that generalises this high-efficiency sampling strategy to all translationally symmetric pairwise models on the torus - creating the potential to surpass MD and HMC as the state of the art. We also numerically elucidate the collective particle dynamics and discuss broad impact across the physical sciences and computational statistics.

Introduction

Deterministic sampling has revolutionised computational science over recent decades, with the molecular-dynamics (MD) [1] and Hamiltonian Monte Carlo (HMC) [2] algorithms making particular advances in the physical sciences and Bayesian inference. Both generate deterministic particle trajectories by simulating numerical approximations of Newtonian dynamics. The former has been applied to a diverse range of problems, from protein folding [3] to the sampling of quantum trajectories [4, 5], while the latter has been incorporated into multi-purpose software packages such as Stan, enabling high-efficiency sampling in computational statistics [6].

The power of these methods lies in their avoidance of diffusive exploration of the state space, in contrast with traditional random-walk Monte Carlo methods such as the Metropolis algorithm [7, 8]. For models of NN particles interacting via pairwise potentials with their nearest neighbours on the 1D torus, this results in the generation of independent samples every O(N9/4)O(N^{9/4}) operations, as opposed to O(N3)O(N^3) for Metropolis [9, 10, 11]. This huge scaling improvement is viewed as the benchmark in sampling efficiency, but recent years have led to a new class of deterministic sampling algorithms with the capacity for significant improvement [12, 13, 14, 15, 16]. These non-reversible Markov processes have been developed in parallel in statistical physics and computational statistics. The bouncy particle sampler [15] and zig-zag process [16] have transformed sampling methodology in Bayesian computation, while event-chain Monte Carlo (ECMC) [12, 13, 14] has taken centre stage in the physical sciences.

Rather than simulating Newtonian dynamics, ECMC is designed solely to sample from the Boltzmann distribution π∝exp⁡(−βU)\pi\propto\exp(-\beta U), with UU the differentiable (with respect to the particle positions) potential energy of the system. It operates by continuously advancing a single active particle at some fixed velocity vv until a random event occurs based on the current system configuration, following which a new active particle is selected and advances with velocity vv. Periodic uniform resampling of the active particle and velocity then ensures ergodicity, and variants on the algorithm allow vv to change at events. In addition, the joint distribution over the augmented state space is symmetric with respect to velocity vv. For models on the torus, one can therefore break velocity symmetry (defined in Appendix B) while maintaining ergodicity on the original state space. For example, one can restrict to v∈{v0ex,v0ey}v \in\{v_0\mathbf{e}_x,v_0\mathbf{e}_y\} on the 2D torus, rather than sampling vv from the symmetric set v0{±ex,±ey}v_0\{\pm\mathbf{e}_x,\pm\mathbf{e}_y\} (v0>0v_0>0 is some fixed speed). This prevents the diffusive behaviour of random-walk Metropolis, providing a powerful alternative approach to deterministic sampling. Indeed, ECMC has been used to great effect to characterise both the 2D melting transition [17] and broken symmetry at the Berezinskii-Kosterlitz-Thouless phase transition [18] – in analogy with the Swendsen-Wang algorithm augmenting the state space of the 2D Ising model to circumvent critical slowing down [19]. The process has been outlined in detail in Refs [20, 21].

Sampling the event times amounts to simulating arrival times from a nonhomogeneous Poisson process whose intensity is a function of the gradient of UU with respect to the particle positions (see Section II A) [13, 14, 21]. This is challenging for pairwise models with interacting particles, as each particle pair (i,j)(i,j) has its own term UijU_{ij} in the potential energy U=∑j,i>jUijU=\sum_{j,i>j}U_{ij}, making it impossible to invert the equation describing the next event/arrival time (the particles are indexed from i,j=1i,j=1 to NN). This can be circumvented by sampling one event time for each two-particle interaction (long-range interactions can be managed exactly in O(1)O(1) operations with the cell-veto method [22, 23]). The soonest of these defines the next event, and the corresponding vetoing particle becomes active [14]. This leverages the fact that the Boltzmann distribution can be written as a product over two-particle probability densities πij∝exp⁡(−βUij)\pi_{ij} \propto\exp(-\beta U_{ij}) – or factors – and redefines the stochastic process in terms of this two-particle factorisation scheme. This leads to a higher (and therefore less desirable) mean event rate than in the non-factorised case, but makes event-time sampling tractable in a much broader class of models. Similar factorisation schemes have been combined with subsampling to render the zig-zag process tractable for large data sets in Bayesian inference [16].

The unique potential of ECMC lies in its dynamics being deterministic (and non-diffusive) but not constrained by Newton’s equations. This freedom provides an array of different sampling strategies. One particular choice modifies standard two-particle factorisation to induce a collective particle dynamics that relaxes local density variations on fast timescales [24]. For the 1D models described above, this reduces the computational effort for generating independent samples (the reciprocal of sampling efficiency) from O(N5/2)O(N^{5/2}) for standard two-particle factorisation to O(N3/2)O(N^{3/2}). This is an O(N3/4)O(N^{3/4}) improvement on MD and HMC but comes at the cost of an impractically large prefactor (due to a high mean event rate) at high/low mean particle density for repulsive/attractive interactions. The huge potential of this approach cannot therefore be realised across a broad array of important applications.

Here we present a universal framework that generalises this high-efficiency sampling strategy to all translationally symmetric pairwise models on the torus. This represents a general analytic approach to the sampling strategy that was demonstrated numerically for the Lennard-Jones model [24] and results in an O(N3/2)O(N^{3/2}) computational effort (on the 1D torus) that is robust to mean particle density. We also demonstrate that the computational effort of non-factorised ECMC is O(N3)O(N^3), as it is unable to induce efficient collective particle dynamics. This explicitly demonstrates the surprising result that – in spite of its higher mean event rate – even standard two-particle factorisation is more efficient than the non-factorised process in the large-NN limit. This contrasts with the commonly held belief that standard two-particle factorisation is chosen purely for computational convenience and paves the way towards our general analytic sampling strategy becoming the preferred sampling technique for atomistic models in the physical sciences.

The paper is organised as follows. In Section II, we set out non-factorised ECMC, standard two-particle factorisation and the modified sampling strategy. We then present our novel sampling strategy in Section III. In Section IV, we elucidate the collective particle dynamics by analysing mixing. In Section V, we discuss the universality of our results and potential impact across the physical sciences and computational statistics. We assume throughout that particles exist on the 1D torus T\mathbb{T} of length LL and that U=∑j,i>jUijU=\sum_{j,i>j}U_{ij} with each UijU_{ij} a differentiable function of xijx_{ij} (meaning we do not require uniform resampling of the active particle or velocity). Here, xij∈Rx_{ij}\in\mathbb{R} is the 1D spring vector from particle jj to ii, which we require due to the topology of the torus.1 We define it as the total displacement of particle ii relative to particle jj since the start of the simulation, plus the initial minimal separation vector from particle jj to particle ii (periodic boundary conditions are accounted for by identifying N+1≡1N+1\equiv1). We then define the [N(N−1)/2][N(N-1)/2]-dimensional spring vector x~:=(x1,2,…,x1,N,x2,3,…,x2,N,…,xN−1,N)T\tilde{\mathbf{x}}:=(x_{1,2},\ldots,x_{1,N},x_{2,3},\ldots,x_{2,N},\ldots,x_{N-1,N})^{\mathsf{T}}, as well as the position xi∈Tx_i\in\mathbb{T} of each particle i∈{1,…,N}i\in\{1,\ldots,N\} (n.b. many models on T\mathbb{T} can be described solely by the positions but the springs vector is more general). We use ⟨⋅⟩\langle\cdot\rangle to denote thermal averages, i.e. expectations with respect to the target distribution π\pi.

Existing sampling strategies

Non-factorised ECMC

The most general form of non-factorised ECMC constructs the following continuous-time Markov process. Its state at time tt consists of the springs vector x~(t)\tilde{\mathbf{x}}(t), an index a(t)=1,2,…,Na(t)=1,2,\ldots,N denoting the current active particle and the velocity v(t)=±v0v(t)=\pm v_0 of the active particle. The system evolves with constant aa and vv until an event occurs. The corresponding event time tkt_k is the next event or arrival time of a nonhomogeneous Poisson process with intensity or event rate λ(t)=βmax⁡(0,v(t)∂aU(x~(t)))\lambda(t)=\beta\max(0,v(t)\partial_a U(\tilde{\mathbf{x}}(t))), where ∂aU\partial_a U denotes the partial derivative with respect to the position xax_a of particle aa. Particle j∈{1,…,N}j\in\{1,\ldots,N\} and velocity v=±v0v=\pm v_0 are then selected as the next active particle and velocity with probability ∝max⁡(0,−v∂jU(x~(tk)))\propto\max(0,-v\partial_j U(\tilde{\mathbf{x}}(t_k))) and the system evolves with this new aa and vv until the next event time tk+1>tkt_{k+1}>t_k. For clarity, the event times are denoted t1,t2,…t_1,t_2,\ldots with 0<t1<t2<⋯0<t_1<t_2<\cdots, and tkt_k is simulated by sampling Y∼U(0,1)Y\sim\mathcal{U}(0,1) and then inverting

−log⁡Y=β∫tk−1tkmax⁡(0,v(t)∂aU(x~(t))) dt(1)-\log Y=\beta\int_{t_{k-1}}^{t_k}\max(0,v(t)\partial_a U(\tilde{\mathbf{x}}(t)))\,\mathrm{d}t \tag*{(1)}

with t0=0t_0=0. We note that Ref. [13] presented a physically intuitive construction of the event rate λ(t)\lambda(t) by considering a sequence of lifted Metropolis moves in a fixed direction in the continuum-time limit.

The process of choosing the next active particle and velocity (following each event) defines the lifting scheme. The lifting scheme described above allows vv to flip at each event, but we choose an alternative scheme that fixes vv. This is the lifting scheme described in Section I and is valid as UU is a function of the springs vector x~\tilde{\mathbf{x}} (i.e. it is symmetric to global particle translations, defining translational symmetry) and the particles exist on the

torus (see Appendix B). Indeed, employing this lifting scheme without uniform resampling of vv would result in a nonergodic process on R\mathbb{R}, but breaking velocity symmetry in this way avoids diffusive behaviour and is therefore a common choice on the torus. We set v=v0v=v_0 throughout and do not employ uniform resampling of either vv or aa.

Standard-factorised ECMC

It is typically challenging to solve Eq. (1) in practice. Standard-factorised ECMC instead independently samples one event time takjt_{a}^{kj} for each particle j≠aj\ne a by inverting Eq. (1) with UU and tkt_k replaced with UajU_{aj} and tajkt_{aj}^{k}, respectively. The next event time tkt_k is then min⁡(tajk)\min(t_{aj}^{k}) and the vetoing particle w=arg⁡min⁡jtajkw=\arg\min_j t_{aj}^{k} is selected as the next active particle. This defines a new stochastic process with pairwise event rates λij=βv0max⁡(0,∂aUij(xij))\lambda_{ij}=\beta v_0\max(0,\partial_aU_{ij}(x_{ij})), with the tt dependence now implicit.

There are two significant consequences of this factorisation scheme. Firstly, the event rate tends to increase:

βv0max⁡(0,∑j≠a∂aUaj)≤∑j≠aβv0max⁡(0,∂aUaj),(2)\beta v_0\max\left(0,\sum_{j\ne a}\partial_aU_{aj}\right)\le\sum_{j\ne a}\beta v_0\max(0,\partial_aU_{aj}), \tag*{(2)}

i.e. λ≤∑j≠aλaj\lambda\le\sum_{j\ne a}\lambda_{aj}. The non-factorised dynamics therefore benefit from the cancellation of opposing forces acting on the active particle, resulting in a diminished net effective force and an increased distance travelled through the state space between events. Factorisation removes this cancellation mechanism, inflating the event rate.

The second significant consequence is modified lifting dynamics. In non-factorised ECMC, any non-active particle jj is selected as the next active particle with probability ∝max⁡(0,−∂jU(x~(tk)))\propto\max(0,-\partial_jU(\tilde{x}(t_k))) at event time tkt_k, making the particle positioned for the largest subsequent downhill movement most likely to be selected. Whilst one of the neighbouring particles will typically be selected, non-neighbouring particles will be chosen at some finite proportion of lifting events. This leads to a making non-local jumps on the space of possible active particles, with the proportion of non-local jumps increasing as some function of NN (we call this space the index space I\mathcal{I}, defined as the set {1,…,N}\{1,\ldots,N\} with toroidal topology, and fix the particle ordering {1,…,N}\{1,\ldots,N\} based on the modal state-space configuration at the start of the simulation (see Figure 1)). This hinders the ability of non-factorised ECMC to efficiently relax local density variations via collective motion. This is the origin of the O(N3)O(N^3) autocorrelation time demonstrated numerically in Section III B. In the standard-factorised case, the vetoing particle always becomes active following an event, making the dynamics on the index space strictly local for nearest-neighbour models. This is accompanied by standard-factorised ECMC generating independent samples every O(N5/2)O(N^{5/2}) operations [24]. More generally when choosing a sampling strategy, there can be a tradeoff between a low mean event rate (e.g. without factorisation) and improved lifting dynamics (e.g. with standard factorisation).

Figure 1. Schematic for both the index space I\mathcal{I} (defined in Section II B) and generalised harmonic chain (defined in Section III B). The left/right subfigure is an example configuration at/perturbed from the mode. The particle ordering {1,…,N}\{1,\ldots,N\} within I\mathcal{I} is fixed based on the modal state-space configuration at the start of the simulation, i.e. assuming starting at the mode (e.g. left). The state-space ordering at a later time may not therefore correspond to the index-space ordering (e.g. right). In the generalised harmonic chain, particle interactions are mediated by 1D spring vectors xij∈Rx_{ij}\in\mathbb{R} between neighbours (i,j)(i,j) on I\mathcal{I}, subject to the constraint ∑ixi+1,i=L\sum_i x_{i+1,i}=L. A countably infinite number of spring configurations correspond to any given particle configuration. The mode is given by xi+1,i=L/Nx_{i+1,i}=L/N for all ii (left) while spring vectors can be negative away from the mode (e.g. the orange spring in the right subfigure). Black circles represent particles. Each number is the index-space value of the corresponding particle. Curly lines represent springs, with colours denoting the same spring across subfigures. Spring shapes have been modified for illustrative purposes and do not reflect the magnitudes ∣xij∣|x_{ij}|.

Factor-field ECMC

The O(N5/2)O(N^{5/2}) computational effort can be improved further still as the next event is predominantly a forwards/backwards event (i.e. triggered by the forwards/backwards neighbour on the index space I\mathcal{I}) for repulsive/attractive interactions whose strength decays with minimal separation distance. This leads to the index of the currently active particle drifting forwards/backwards through I\mathcal{I}, which is undesirable when relaxing local density variations [24]. The concept of factor-fields [11, 24, 25] was introduced to generate the collective particle dynamics that relax local density variations on fast timescales. This is achieved by superdiffusive index-space dynamics, which characterise extended periods advancing in a single direction on I\mathcal{I}, each followed by a direction reversal [24]. This leads to slower exploration of I\mathcal{I} than achieved by the ballistic drift at b=0b=0, but selects the next active particle optimally for efficient exploration of the original state space. We elucidate this numerically in Section IV.

Algorithm 1 Sampling event $k$ with cell-horizon ECMC in the absence of singularities

Require: current springs vector $\tilde{x}=\tilde{x}(t_{k-1})$, current active particle $a=a(t_{k-1})$, cell horizon $x_h$, factor-field $b$, inverse temperature $\beta$, number of particles $N$, speed $v_0$
for $j \leftarrow 1$ to $N$ do
  $\tilde{\lambda}_{a j}^{\max}\leftarrow\max\{\tilde{\lambda}_{a j}(x,b):x_{a j}\leq x\leq x_{a j}+x_h\}$
  $\eta_{a j}^{k}\sim\operatorname{Exp}(\tilde{\lambda}_{a j}^{\max})$
end for
$\eta_k\leftarrow\min_j(\eta_{a j}^{k})$
$w\leftarrow\arg\min_j(\eta_{a j}^{k})$
if $\eta_k>x_h$ then
  $x_{a j}\leftarrow x_{a j}+x_h$ for all $j\ne a$ (i.e. $x_a\leftarrow x_a+x_h$)
  $t_k\leftarrow t_{k-1}+x_h/v_0$
else
  $x_{a j}\leftarrow x_{a j}+\eta_k$ for all $j\ne a$ (i.e. $x_a\leftarrow x_a+\eta_k$)
  $t_k\leftarrow t_{k-1}+\eta_k/v_0$
  $\Gamma\sim U(0,1)$
  if $\Gamma\leq\tilde{\lambda}_{a w}(x_{a w},b)/\tilde{\lambda}_{a w}^{\max}$ then
    $a\leftarrow w$
  end if
end if

For models of particles on the 1D torus of length LL, the concept is constructed mathematically by adding the non-physical factor-field potential Uff(b)=−b∑ixi+1,i=−bLU_{\mathrm{ff}}(b)=-b\sum_i x_{i+1,i}=-bL to the potential energy, where the factor-field b∈Rb\in\mathbb{R} is fixed throughout. Adding this constant leaves the target distribution unchanged, but, with bb optimally chosen (in the large-NN limit) to nullify the pressure P:=β−1∂log⁡Z/∂LP:=\beta^{-1}\partial\log Z/\partial L, sampling an additional event for each −bxi+1,i-bx_{i+1,i} induces equal numbers of forwards and backwards events on long timescales, resulting in zero drift on the index space (ZZ is the partition function and adding the factor-field potential UffU_{\mathrm{ff}} modifies the pressure: P↦P−bP\mapsto P-b). This leads to the O(N3/2)O(N^{3/2}) autocorrelation time of factor-field ECMC [24] and is analogous to introducing an auxiliary hyperparameter to minimise Bayesian model misspecification [21]. Extensions to the higher dimensional torus achieved similarly strong performance benefits [25]. We emphasise that UffU_{\mathrm{ff}} does not alter the dynamics of the Metropolis, MD or HMC algorithms [11].

The mean event rate at optimal bb is, however, even higher than the b=0b=0 case for general differentiable interaction potentials – a problem that worsens at high-/low mean particle density for repulsive/attractive models (due to a large optimal bb). More precisely, the mean event rate becomes linearly dependent on bb due to the independent sampling of the factor-field events (seen by extending the triangle inequality of Eq. (2)). This manifests itself in a large prefactor on the computational effort required to generate independent samples. This is the key metric of sampling performance because the autocorrelation time reflects the efficiency of the dynamics on the index space, whereas the computational effort also completely encompasses the mean distance that the active particle advances on the state space between events

(n.b. changes on the state space occur between events while changes on the index space occur at events). This results in an impractically large computational effort for models with a large optimal factor-field bb.

Cell-horizon ECMC

Framework

Introducing the factor-field results in the total potential U~=U+Uff\widetilde{U}=U+U_{\mathrm{ff}}. For index-neighbour models (models with interactions only between index-space neighbours), this leads to the active particle experiencing a total potential

Ua,a−1(xa,a−1)−bxa,a−1+Ua+1,a(xa+1,a)−bxa+1,a.(3)U_{a,a-1}(x_{a,a-1})-bx_{a,a-1}+U_{a+1,a}(x_{a+1,a})-bx_{a+1,a}. \tag*{(3)}

Previous non-numerical sampling strategies for implementing factor-fields for general index-neighbour models sample one event for each of the four terms in Eq. (3) [11]. This strategy of four-factor ECMC amounts to sampling two events per pairwise interaction (i.e. one event due to the original potential and one factor-field event) and leads to the impractically large computational effort described in Section II. To combat this, we propose cell-horizon ECMC (Alg. 1). This novel sampling strategy samples only a single event per pairwise interaction, leading to two main benefits compared with four-factor ECMC: i) the mean event rate for optimally chosen bb decreases relative to b=0b=0, and ii) inverting Eq. (1) (often challenging) is avoided entirely in the absence of singularities. Our approach therefore reduces the computational effort at optimal bb and is robust to mean particle density.

For index-neighbour models, the method writes the total potential as U~=∑i(Ui+1,i−bxi+1,i)\widetilde{U}=\sum_i(U_{i+1,i}-bx_{i+1,i}) and redefines the stochastic process in terms of the extended two-particle factorisation scheme with pairwise probability densities π~i+1,i∝exp⁡(−β(Ui+1,i−bxi+1,i))\widetilde{\pi}_{i+1,i}\propto\exp(-\beta(U_{i+1,i}-bx_{i+1,i})). This extends the pairwise event rate to

λ~ij(xij,b)={βv0max⁡(0,∂aUij(xij)−b)if (i,j)=(a,a−1),βv0max⁡(0,∂aUij(xij)+b)if (i,j)=(a+1,a),βv0max⁡(0,∂aUij(xij))otherwise,(4)\tilde{\lambda}_{ij}(x_{ij},b)= \begin{cases} \beta v_0\max(0,\partial_a U_{ij}(x_{ij})-b) & \text{if }(i,j)=(a,a-1),\\ \beta v_0\max(0,\partial_a U_{ij}(x_{ij})+b) & \text{if }(i,j)=(a+1,a),\\ \beta v_0\max(0,\partial_a U_{ij}(x_{ij})) & \text{otherwise}, \end{cases} \tag*{(4)}

where the third case generalises to non-index-neighbour models. This defines the factorisation scheme of cell-horizon ECMC. In the absence of singularities, each pairwise event time τajk\tau_{a j}^{k} is sampled from a homogeneous Poisson process with intensity λ~ajmax⁡=max⁡{λ~aj(x,b):xajk−1≤x≤xajk−1+xh}\tilde{\lambda}_{a j}^{\max}=\max\{\tilde{\lambda}_{a j}(x,b):x_{a j}^{k-1}\leq x\leq x_{a j}^{k-1}+x_h\}, where xh>0x_h>0 is the cell horizon and xijk−1=xij(tk−1)x_{i j}^{k-1}=x_{i j}(t_{k-1}) (singularities are addressed in Section III C). This generates corresponding event distances ηajk\eta_{a j}^{k} and the shortest of these defines the next event, with event distance ηk=min⁡(ηajk)\eta_k=\min(\eta_{a j}^{k}) and corresponding vetoing particle w=arg⁡min⁡j(ηajk)w=\arg\min_j(\eta_{a j}^{k}) (ηk\eta_k is the distance travelled between events k−1k-1 and kk). If ηk>xh\eta_k>x_h, the active particle moves a distance xhx_h to the edge of the cell and remains active (i.e. ηk\eta_k is set to xhx_h). Otherwise, the active particle moves a distance ηk\eta_k and the vetoing particle becomes active with probability λ~aw(xawk−1+ηk)/λ~awmax⁡\tilde{\lambda}_{aw}(x_{aw}^{k-1}+\eta_k)/\tilde{\lambda}_{aw}^{\max}, defining a confirmed event. This process of thinning ensures convergence on the target distribution. For consistency, we set tk=tk−1+ηk/v0t_k=t_{k-1}+\eta_k/v_0 in all three cases. We note that the update of xajx_{aj} for all j≠aj\ne a in Alg. 1 (and also Alg. 2 below) is expressed in terms of each xajx_{aj} for consistency with our formalism. As each spring vector xijx_{ij} changes only through the displacement of particle ii or jj, in practice only the position xax_a of the active particle is updated at each event time, i.e. each event requires only a single position update.

Selecting xhx_h to maximise the acceptance probability is required to optimise the computational effort. Small xhx_h leads to a large number of rejections due to hitting the cell horizon too frequently, whereas large xhx_h results in a large λ~max⁡\tilde{\lambda}^{\max} and a low thinning acceptance rate. The computational effort Ω\Omega is defined as the product of the mean event rate (the long-time limit of the number of confirmed events per unit time) and autocorrelation time divided by the acceptance rate, with the optimal bb value (denoted b∗b^*) defined as that which minimises this metric. This definition reflects the number of CPU operations required to generate independent samples, assuming the cell-veto method [22] is used for long-range interacting particles. In such cases, we recommend incorporating the cell-veto method into cell-horizon ECMC.

Generalised harmonic chain

We explore cell-horizon ECMC with the generalised harmonic-chain model on the 1D torus of length LL. Particles interact via springs that mediate polynomial potentials between neighbours on the index space. The total potential is a function of the springs vectors x~\tilde{\mathbf{x}}:

U~(x~,b)=kp∑i∣xi+1,i∣p−b∑ixi+1,i,(5)\widetilde{U}(\tilde{\mathbf{x}},b)=\frac{k}{p}\sum_i\lvert x_{i+1,i}\rvert^p-b\sum_i x_{i+1,i}, \tag*{(5)}

where k>0k>0 is the spring stiffness, p≥1p\ge1, and the springs are subject to the constraint ∑ixi+1,i=L\sum_i x_{i+1,i}=L. Figure 1 presents schematics of the model at the mode (left) and far from equilibrium (right) (the latter is an example containing a negative 1D spring vector xi+1,ix_{i+1,i}).

The p=2p=2 case uniquely incorporates the factor-field into the original potential via the translations xi+1,i↦xi+1,i−b/k ∀ix_{i+1,i}\mapsto x_{i+1,i}-b/k\ \forall i:

U~(x~,b)=k2∑i(xi+1,i−bk)2+const.(6)\widetilde{U}(\tilde{\mathbf{x}},b)=\frac{k}{2}\sum_i\left(x_{i+1,i}-\frac{b}{k}\right)^2+\mathrm{const.} \tag*{(6)}

This allowed previous work to implement factor-field ECMC by sampling a single event per pairwise interaction for the p=2p=2 case [24]. This is achieved by directly inverting Eq. (1) for each pairwise interaction (with U↦k(xi+1,i−b/k)2/2U\mapsto k(x_{i+1,i}-b/k)^2/2) and avoids the inflated mean event rate of the four-factor method. Cell-horizon ECMC provides the universal framework to generalise this benefit to all models. In particular, it re-expresses the total potential of the generalised harmonic chain as

U~(x~,b)=∑i(kp∣xi+1,i∣p−bxi+1,i),(7)\widetilde{U}(\tilde{\mathbf{x}},b)=\sum_i\left(\frac{k}{p}\lvert x_{i+1,i}\rvert^p-bx_{i+1,i}\right), \tag*{(7)}

which generalises the factorisation scheme defined by Eq. (4) to all p≥1p\ge1. Before demonstrating this approach for general p≥1p\ge1, we explore the p=2p=2 case as it provides analytic verification, including analytic predictions of b∗b^*.

For p=2p=2, both the mean event rate and the pressure can be used to predict b∗b^*. In Appendix C 2, we derive analytic expressions for the non-factorised mean event rate Λnf=βk/πv0\Lambda_{\mathrm{nf}}=\sqrt{\beta k/\pi}v_0 and cell-horizon mean event rate

Λch=βkv0[Δerf⁡(Δ2σx)+2πσxexp⁡(−Δ22σx2)](8)\Lambda_{\mathrm{ch}}=\beta k v_0\left[\Delta\operatorname{erf}\left(\frac{\Delta}{\sqrt{2}\sigma_x}\right)+\sqrt{\frac{2}{\pi}}\sigma_x\exp\left(-\frac{\Delta^2}{2\sigma_x^2}\right)\right] \tag*{(8)}

where Δ=b/k−L/N\Delta=b/k-L/N and σx2\sigma_x^2 is the variance of the spring lengths. Λch\Lambda_{\mathrm{ch}} is minimised at b=Lk/Nb=Lk/N (i.e. Δ=0\Delta=0) and Λch(b=Lk/N)>Λnf\Lambda_{\mathrm{ch}}(b=Lk/N)>\Lambda_{\mathrm{nf}} for all N>2N>2, with lim⁡N→∞Λch(Δ=0)/Λnf=2\lim_{N\to\infty}\Lambda_{\mathrm{ch}}(\Delta=0)/\Lambda_{\mathrm{nf}}=\sqrt{2}. Excellent agreement between these predictions and ECMC simulations is demonstrated in Figure 2(a) (which presents both as functions of bb and NN at fixed ρ\rho; the inset presents Λch(b=Lk/N)/Λnf\Lambda_{\mathrm{ch}}(b=Lk/N)/\Lambda_{\mathrm{nf}} at fixed ρ\rho to emphasise the inequality). In Appendix C 3, we derive the analytic expression

Figure 2. Comparative performance of cell-horizon ECMC against both non-factorised and standard-factorised ECMC. Metrics are measured for the p=2p=2 generalised harmonic chain with mean particle density ρ=βk/2\rho=\sqrt{\beta k/2} ((βk)−1/p(\beta k)^{-1/p} sets a lower length scale). (a) MC estimates and analytic predictions of the mean event rate of cell-horizon ECMC (Λch\Lambda_{\rm ch}) and non-factorised ECMC (Λnf\Lambda_{\rm nf}) as functions of bb and NN (n.b. bb does not modify non-factorised ECMC, as predicted). We observe excellent agreement between the estimates and predictions, with Λch\Lambda_{\rm ch} minimised at b=bP∗b=b_{\rm P}^{*}, as predicted. Inset: The ratio Λch(b=bP∗)/Λnf\Lambda_{\rm ch}(b=b_{\rm P}^{*})/\Lambda_{\rm nf} emphasises that non-factorised ECMC outperforms cell-horizon ECMC for all N>2N>2 by this metric. (b,c) MC estimates of the autocorrelation time τ\tau [(b)] and computational effort Ω\Omega [(c)] of both cell-horizon ECMC and non-factorised ECMC as functions of bb and NN (both metrics are defined in Section III and are normalised by their respective optimal cell-horizon values, τch(bP∗)\tau_{\rm ch}(b_{\rm P}^{*}) and Ωch(bP∗)\Omega_{\rm ch}(b_{\rm P}^{*})). Cell-horizon results are minimised at b=bP∗b=b_{\rm P}^{*}. (d) MC estimates of τ\tau and Ω\Omega for each method (at b=bP∗b=b_{\rm P}^{*} for cell-horizon ECMC; b=0b=0 is standard-factorised ECMC) against NN. Results are consistent with both metrics being O(N3)O(N^{3}), O(N5/2)O(N^{5/2}) and O(N3/2)O(N^{3/2}) for non-factorised, standard-factorised and optimal cell-horizon ECMC. Optimal cell-horizon ECMC significantly outperforms the other methods by both metrics (n.b. Ω\Omega is the key metric of sampling performance). Lines are a guide to the eye. Results were averaged across 10-12 independent simulations, each of between 10510^{5} and 2×1062\times10^{6} samples (see Appendix A for precise details).

βP=β(b−LkN)(9)\beta P=\beta\left(b-\frac{Lk}{N}\right) \tag*{(9)}

for the normalised pressure. Numerical results in Appendix D are consistent with the index-space velocity vidx=β(b−Lk/N)v0v_{\mathrm{idx}}=\beta(b-Lk/N)v_0 (vidxv_{\mathrm{idx}} is the long-time displacement on the index space per unit time). Selecting b=bP∗b=b_P^* (with bP∗b_P^* defined such that P(b=bP∗)=0P(b=b_P^*)=0) therefore leads to vidx=0v_{\mathrm{idx}}=0 or an equal number of forwards and backwards events on long time scales. The hypothesis that vidx=0v_{\mathrm{idx}}=0 optimises autocorrelation then predicts that the autocorrelation time τ\tau of the q=1q=1 structure factor S(q)=∣∑jexp⁡(iqxj)∣2/NS(q)=\left|\sum_j\exp(iq x_j)\right|^2/N is minimised at b=Lk/Nb=Lk/N, as supported by the results in Figure 2(b) (which present τ\tau as a function of bb and NN at fixed ρ\rho). Indeed, the analogous results for the computational effort presented in Figure 2(c) are minimised at b=Lk/Nb=Lk/N, reflecting the pressure and index-space velocity both correctly predicting b∗b^* for the p=2p=2 case. More generally, however, the two metrics do not predict the same b∗b^*. We discuss these subtleties in Section IIID and measure sampling performance relative to b=bP∗b=b_P^* throughout.

We now compare sampling performance between the non-factorised, standard-factorised (i.e. b=0b=0) and cell-horizon strategies. Figure 2(c) presents the computational effort as a function of bb and NN for the non-factorised and cell-horizon strategies at fixed mean particle density ρ\rho (the cell-horizon results encompass standard-factorised ECMC at b=0b=0). Whilst standard-factorised ECMC

Algorithm 2 Sampling event $k$ with cell-horizon ECMC for 1D models with positive singularities

Require: current springs vector $\tilde{\mathbf{x}}=\tilde{\mathbf{x}}(t_{k-1})$, current active particle $a=a(t_{k-1})$, cell horizon $x_h$, factor-field $b$, inverse temperature $\beta$, number of particles $N$, speed $v_0$

for $j\leftarrow 1$ to $N$ do
  if $j=a-1$ then
    $\tilde{\lambda}_{aj}^{\max}\leftarrow\tilde{\lambda}_{aj}(x_{aj}+x_{a+1,a},b)$
    $\eta_{aj}^{k}\leftarrow\operatorname{Exp}(\tilde{\lambda}_{aj}^{\max})$
  else
    Solve {xref}`Eq. (1)` for $\eta_{aj}^{k}$ with $U$ and $t_k$ replaced with $U_{aj}$ and $t_{aj}^{k}$, respectively.
  end if
end for
$\eta_k\leftarrow\min(\{\eta_{aj}^{k}\})$
$w\leftarrow\arg\min_j\{\eta_{aj}^{k}\}$
$x_{aj}\leftarrow x_{aj}+\eta_k$ for all $j\ne a$ (i.e. $x_a\leftarrow x_a+\eta_k$)
$t_k\leftarrow t_{k-1}+\eta_k/v_0$
$\Gamma\sim\mathcal{U}(0,1)$
if $w=a+1$ then
  $\tilde{\lambda}_{aw}^{\max}\leftarrow\tilde{\lambda}_{aw}(x_{aw})$
end if
if $w\ne a+1$ or $\Gamma\le\tilde{\lambda}_{aw}(x_{aw},b)/\tilde{\lambda}_{aw}^{\max}$ then
  $a\leftarrow w$
end if

exhibits a larger computational effort than the non-factorised process at the presented values of NN, cell-horizon ECMC is more efficient when bb is chosen optimally. In addition, Figure 2(d) presents the autocorrelation time and computational effort of the non-factorised, standard-factorised and optimal cell-horizon (i.e. b=b∗b=b^*) approaches as a function of NN at fixed ρ\rho. The results are consistent with the methods scaling as O(N3)O(N^3), O(N5/2)O(N^{5/2}) and O(N3/2)O(N^{3/2}), respectively. This additionally demonstrates that even standard-factorised ECMC is more efficient than the non-factorised approach in the large-NN limit, due to the latter inducing non-local jumps of aa on I\mathcal{I}. This is an example of factorisation not just being a tool for tractability, but also leading to higher sampling efficiency at large NN – and for all NN in the case of optimal cell-horizon ECMC.

The key contributions of the cell-horizon strategy are i) to circumvent the impractically large computational effort of four-factor ECMC at low/high mean particle density for attractive/repulsive interactions (i.e. where b∗b^* is large), and ii) to provide a general analytic method for the factorisation scheme defined by Eq. (4). Both are consistent with the results in Figure 3. Figure 3(a) presents the computational effort of the four-factor and cell-horizon approaches at b=b∗b=b^* as a function of mean particle density ρ\rho (at fixed NN) for both the p=2p=2 and p=4p=4 cases. For p=2p=2, the four-factor results scale as O(ρ−2)O(\rho^{-2}) whereas the cell-horizon results are insensitive to particle density. For p=4p=4, the results become O(ρ−4)O(\rho^{-4}) and O(ρ−1)O(\rho^{-1}), respectively. This reflects cell-horizon ECMC circumventing the impractically large computational effort of four-factor ECMC at large b∗b^* (at small ρ\rho in this case), curtailing its linear increase in mean event rate (with bb). The relative efficiency with respect to decreasing particle density increases with the power pp. In addition, Figure 3(b) presents the p=4p=4 autocorrelation time and computational effort as a function of NN and at fixed ρ\rho for the four-factor and cell-horizon strategies. Both sets of results are O(N3/2)O(N^{3/2}), with a significantly smaller prefactor on the cell-horizon results. Taken together, this is an example of cell-horizon ECMC providing a universal analytic framework for simulating the factorisation scheme defined by Eq. (4).

Figure 3. Comparative performance of cell-horizon ECMC against four-factor ECMC. (a) MC estimates of the computational effort Ω\Omega (defined in Section III) of both methods as a function of ρ\rho at fixed N=16N=16 and at optimal b=bP∗b=b_P^* for both the p=2p=2 and p=4p=4 generalised harmonic chain ((βk)−1/p( \beta k)^{-1/p} sets a lower length scale). For p=2p=2, results are consistent with Ω\Omega being insensitive to ρ\rho (cell-horizon ECMC) and O(ρ−2)O(\rho^{-2}) (four-factor ECMC). For p=4p=4, results are consistent with Ω\Omega being O(ρ−1)O(\rho^{-1}) (cell-horizon ECMC) and O(ρ−4)O(\rho^{-4}) (four-factor ECMC). This reflects cell-horizon ECMC circumventing the impractically large Ω\Omega of four-factor ECMC at large b∗b^* (at small ρ\rho in this case). Lines are a guide to the eye. (b) MC estimates of the autocorrelation time τ\tau (defined in Section III) and Ω\Omega of cell-horizon ECMC as a function of NN at fixed ρ=(βk)1/4/2\rho=(\beta k)^{1/4}/2 for the p=4p=4 generalised harmonic chain. Results are consistent with τ,Ω=O(N3/2)\tau,\Omega=O(N^{3/2}). Results were averaged across 10-12 independent simulations, each of between 10510^5 and 10610^6 samples (see Appendix A for precise details).

Soft disks

The total potential of the soft-disk model on the 1D torus of length LL is defined as

U~(x~,b)=ϵ∑j,i>j(σd(xi,j))κ−b∑ixi+1,i,(10)\widetilde{U}(\widetilde{\mathbf{x}},b)=\epsilon\sum_{j,i>j}\left(\frac{\sigma}{\mathfrak{d}(x_{i,j})}\right)^\kappa-b\sum_i x_{i+1,i}, \tag*{(10)}

where ϵ>0\epsilon>0 is an energy scale, σ>0\sigma>0 is the diameter of the disk in the large limit κ→∞\kappa\to\infty, ∑ixi+1,i=L\sum_i x_{i+1,i}=L and d(xi,j):=∣(xi,j+L/2) mod L−L/2∣\mathfrak{d}(x_{i,j}):=\lvert(x_{i,j}+L/2)\bmod L-L/2\rvert the minimal separation distance between the particles ii and jj. As the particles are indistinguishable and U~(x~,b=0)\widetilde{U}(\widetilde{\mathbf{x}},b=0) is a function only of the minimal distances, we apply the additional constraint xi+1,i>0x_{i+1,i}>0 for all ii to avoid a countably infinite number of configurations with equal U~(x~,b=0)\widetilde{U}(\widetilde{\mathbf{x}},b=0). The soft-disk potential features singularities at xij=0x_{ij}=0. This makes the bounding of the event rate required for Alg. 1 impossible, and the approach must be modified. Alg. 2 outlines the modified procedure. The singularities additionally fix the particle ordering on the state space under event-chain dynamics. The position of the forwards neighbour therefore defines the position of the cell horizon of the backwards neighbour. For all the other particles jj, we sample events by replacing (respectively) UU and tkt_k with UajU_{aj} and tajt_{aj} in (1). For the forwards neighbour, this has the effect of bounding the event rate βv0max⁡(0,∂aUa+1,a+b)\beta v_0\max(0,\partial_a U_{a+1,a}+b) (see (4) and note that b∗<0b^*<0 for this repulsive model) with the b=0b=0 event rate βv0max⁡(0,∂aUa+1,a)\beta v_0\max(0,\partial_a U_{a+1,a}). The prescription outlined in Section III A is then followed to define the next event distance ηk\eta_k and vetoing particle ww. If ww is the forwards or backwards neighbour, it is similarly confirmed as the new active particle by thinning. This generalises cell-horizon ECMC to models containing repulsive interactions, positive singularities and long-range interactions.

In Appendix C 3, we present the normalised pressure

βP=NL(1+βκ⟨U~(b=0)⟩−1N)+βb,(11)\beta P=\frac{N}{L}\left(1+\frac{\beta\kappa\langle\widetilde{U}(b=0)\rangle-1}{N}\right)+\beta b, \tag*{(11)}

showing that bP∗=(1−βκ⟨U~(b=0)⟩−N)/(βL)b_{\mathrm{P}}^*=(1-\beta\kappa\langle\widetilde{U}(b=0)\rangle-N)/(\beta L). Figure 4 presents the computational effort of cell-horizon ECMC applied to the κ=2\kappa=2 soft-disk model as a function of bb and NN at fixed ρ\rho. The inset demonstrates that the method successfully achieves the O(N3/2)O(N^{3/2}) scaling at b=b∗b=b^*, in contrast with the O(N5/2)O(N^{5/2}) scaling of the b=0b=0 case. The results presented in the main figure are consistent with b=bP∗b=b_{\mathrm{P}}^* minimising the computational effort in the large-NN limit. The results at small NN, however, demonstrate finite-size corrections to this prediction. Choosing b=bP∗b=b_{\mathrm{P}}^* can therefore only guarantee optimal autocorrelation in the large-NN limit.

Figure 4. MC estimates of the computational effort Ω\Omega (defined in Section III) of cell-horizon ECMC as a function of bb and NN for the κ=2\kappa=2 1D soft-disk model with mean particle density ρ=(3/4)/σ\rho=(3/4)/\sigma. Results are consistent with Ω\Omega being minimised at b=bP∗b=b_{\mathrm{P}}^* in the large-NN limit. Inset: Ω\Omega as a function of NN at fixed ρ=(3/4)/σ\rho=(3/4)/\sigma at b=0b=0 and b=b∗b=b^*. Results are consistent with Ω\Omega being O(N5/2)O(N^{5/2}) and O(N3/2)O(N^{3/2}) for the standard-factorised and optimal cell-horizon approaches. This reflects cell-horizon ECMC hugely outperforming other methods by the key metric of sampling performance (Ω\Omega), even in the presence of positive singularities and long-range interactions. Lines are a guide to the eye. Results were averaged across 10-12 independent simulations, each of between 10510^5 and 5×1065\times10^6 samples (see Appendix A for precise details).

Optimal bb

The p=2p=2 harmonic chain exhibits a special case where a single value of bb optimises both the mean event rate and autocorrelation. The mean event rate is governed by the dynamics of the active particle on the state space between events, whereas the autocorrelation is a product of the dynamics on the index space at events. In general, the value of bb that minimises the mean event rate does not necessarily induce zero drift on the index space (our numerical results support the latter being optimal for the autocorrelation at large NN). This leads to an additional value bK∗b_{\mathrm{K}}^* that minimises the mean event rate and is distinct from bP∗b_{\mathrm{P}}^* (numerical results in Appendix D are consistent with the general ansatz βP=vidx/v0\beta P=v_{\mathrm{idx}}/v_0, i.e. vidx=0v_{\mathrm{idx}}=0 at b=bP∗b=b_{\mathrm{P}}^* in general).

The generalised harmonic chain with p≠2p\ne2 provides an example of bK∗≠bP∗b_{\mathrm{K}}^*\ne b_{\mathrm{P}}^*. Choosing bb to translate the minima of Ua+1,a−bxa+1,aU_{a+1,a}-b x_{a+1,a} and Ua,a−1−bxa,a−1U_{a,a-1}-b x_{a,a-1} to the modal position of the active particle relative to xa±1x_{a\pm1} (which minimises the mean event rate) results in different gradient profiles in each case (see Figure 5). There will consequently be an index-space drift accompanied by a non-optimal τ\tau. Ultimately, the computational effort must be relied on as the general metric of sampling efficiency. For the p=4p=4 generalised harmonic chain, we have found that the computational effort and autocorrelation time are both minimised by choosing b=bP∗b=b_{\mathrm{P}}^* to induce zero index-space drift. Similarly, the computational effort and autocorrelation of the soft-disk model are minimised by the same bb value for any given model parameters (though this coincides with bP∗b_{\mathrm{P}}^* only in the large-NN limit). The computational effort is therefore dominated by the autocorrelation time and bP∗b_{\mathrm{P}}^* is the large-NN predictor of b∗b^*.

Figure 5. Schematics illustrating the effect of key choices of bb. For modal state-space configurations, the functions Ua,a−1−bxa,a−1U_{a,a-1}-b x_{a,a-1} (red) and Ua+1,a−bxa+1,aU_{a+1,a}-b x_{a+1,a} (blue) are presented at b=0b=0, b=bΛ∗b=b_{\Lambda}^{*} and b=bP∗b=b_{P}^{*} for both the generalised harmonic chain (GHC; p=2p=2 and p=4p=4) and 1D soft-disk model. Green curves represent Ua,a−1−bxa,a−1U_{a,a-1}-b x_{a,a-1} and Ua+1,a−bxa+1,aU_{a+1,a}-b x_{a+1,a} functions that coincide and yy-shifts have been applied for illustrative purposes. For the p=2p=2 GHC, bΛ∗=bP∗b_{\Lambda}^{*}=b_{P}^{*}. For all other models, the value of bb that minimises the mean event rate (bΛ∗b_{\Lambda}^{*}) does not coincide with that which induces optimal autocorrelation (bP∗b_{P}^{*}).

Mixing

The capacity of factor-fields to optimise autocorrelation was ascribed to superior lifting dynamics that promptly relax local density variations. To illustrate this, Figure 6 presents trace plots of both the particle positions and active-particle index aa of the p=2p=2 generalised harmonic chain at strong coupling (βκ/ρ2=4×106\beta\kappa/\rho^2=4\times10^6) and for N=8N=8 particles. We initialise from a single high-density cluster of particles (i.e. from a low-probability region) and simulate using both standard-factorised ECMC (i.e. b=0b=0) and optimal factor-field ECMC (i.e. b=bP∗b=b_{P}^{*}) and with aa initially set to NN (i.e. at the edge of the cluster).

Trace plots of the particle positions and active-particle index

Figure 6. Trace plots of the particle positions {xi}\{x_i\} (a,c) and active-particle index aa (b,d) of the p=2p = 2 generalised harmonic chain at strong coupling (βk/ρ2=4×106\beta k/\rho^2 = 4 \times10^6) and for N=8N = 8 particles – using standard-factorised ECMC, i.e. b=0b = 0 (a,b) and optimal cell-horizon ECMC, i.e. b=b∗b = b^* (c,d). Simulations start from a single high-density cluster of particles (i.e. from a low-probability region corresponding to ∂(xij)≪L/N\partial(x_{ij}) \ll L/N for all pairs (i,j)(i,j)) with aa set to NN (i.e. at the edge of the cluster). (a,b) For b=0b = 0, the backwards neighbour becomes active following each event, resulting in a drifting deterministically through I\mathcal{I}. After 4×1044 \times10^4 events, it still holds that ∂(xij)≪L/N\partial(x_{ij}) \ll L/N for all pairs (i,j)(i,j). (c,d) For b=b∗b = b^*, particle NN (which is initially active) advances on the state space until it reaches a distance L/NL/N from its backwards neighbour (i=N−1i = N - 1). aa then alternates between these two activated particles until particle N−1N - 1 reaches a distance L/NL/N (on the state space) from its backwards neighbour (i=N−2i = N - 2) which subsequently becomes active. aa then cycles back and forth through the set of three activated particles until particle N−3N - 3 becomes activated. This process repeats until xi+1,i≈L/Nx_{i+1,i} \approx L/N for all ii (achieved after 4×1044 \times10^4 events).

For b=0b=0, the backwards neighbour becomes active following each event. This results in aa drifting deterministically through II and leads to sub-optimal mixing on the original state space (Figure 6(a,Figure 6b)). In contrast, utilising the optimal factor-field bP∗=Lk/Nb_{P}^{*}=Lk/N (Figure 6(c,Figure 6d)) results in flexible index-space dynamics that lead to the most efficient dynamics on the original state space. The particle at the edge of the cluster (i=Ni=N) advances on the state space until it reaches a distance L/NL/N from its backwards neighbour (i=N−1i=N-1). aa then alternates between these two activated particles until particle N−1N-1 reaches a distance L/NL/N from its backwards neighbour (i=N−2i=N-2) which subsequently becomes active. aa then cycles back and forth through the set of three activated particles until particle N−3N-3 becomes activated. This repeats each time the number of activated particles NactivatedN_{\mathrm{activated}} increases.

Once N=NactivatedN=N_{\mathrm{activated}}, xi+1,i≈L/Nx_{i+1,i}\approx L/N for all ii and the local density variation has been relaxed, i.e. the efficient collective particle dynamics have relaxed the system. We tend to observe extended periods of aa advancing through the set of activated particles in a single direction, replicating the superdiffusive excursions described at equilibrium in Section III. This mixing scenario elucidates the efficient relaxation of less extreme density variations that arise frequently at equilibrium.

The results in Figure 6(d) demonstrate that the number of events required to activate the next non-activated particle scales with NactivatedN_{\mathrm{activated}}, leading to an O(N2)O(N^2) mixing time in terms of events. By contrast, NactivatedN_{\mathrm{activated}} reaches NN after O(N)O(N) events in the b=0b=0 case (see Figure 6(b)) but leaves the particles in a similar configuration on the original state space (see Figure 6(a)). This results in an O(N5/2)O(N^{5/2}) mixing time (see Appendix D) with a very large prefactor due to the high number of events per unit distance travelled, providing further evidence that less efficient exploration of the index space can lead to much more efficient exploration of the original state space.

Discussion

Previous non-numerical strategies for generalising factor-field ECMC have focussed on the four-factor approach [11]. This achieved the groundbreaking O(N3/4)\mathcal{O}(N^{3/4}) improvement on the computational effort of MD and HMC for translationally symmetric pairwise models (of nearest-neighbour interactions) on the 1D torus, but uses a factorisation scheme with mean event rate that is linear in the factor-field bb. This results in an impractically large prefactor on the computational effort at low/high mean particle density for attractive/repulsive interactions, due to a high optimal bb. Our approach, by contrast, provides an analytic framework for sampling events with respect to the optimal factorisation scheme defined by λ~ij\tilde{\lambda}_{ij} (see Eq. (4)). This circumvents the linear relationship between the mean event rate and bb, resulting in a universal sampling strategy with computational effort that is robust to mean particle density ρ\rho. For example, our method is insensitive to ρ\rho for the p=2p = 2 generalised harmonic chain – an attractive model – as opposed to the O(ρ−2)\mathcal{O}(\rho^{-2}) scaling of the four-factor strategy. This improvement increases for the more challenging p=4p = 4 case, with respective O(ρ−1)\mathcal{O}(\rho^{-1}) and O(ρ−4)\mathcal{O}(\rho^{-4}) scalings. We additionally present the surprising result that even standard two-particle factorisation produces an O(N1/2)\mathcal{O}(N^{1/2}) improvement on the computational effort of non-factorised ECMC – as

the latter induces non-local jumps of the active-particle index aa on the index space I\mathcal{I}, hindering its ability to relax local density variations via collective particle motion. By contrast, optimal factor-field ECMC induces an efficient collective particle dynamics that relax local density variations on fast timescales, which we demonstrated via simulations initialised far from equilibrium. The factorisation scheme defined by λ~ij\tilde{\lambda}_{ij} is therefore the optimal ECMC sampling strategy for translationally symmetric pairwise models on the torus, with the cell-horizon scheme providing a universal framework to achieve this in general (the concept of particle lanes extends to the higher dimensional torus [25]). We also introduced computational effort as a metric for sampling performance and elucidated the index-space velocity as a predictor for optimising this at large NN, numerically demonstrating its agreement with predictions made by the pressure.

The concept of index-neighbour models provides the natural route to expanding this framework to lattice spin models such as spin glasses and the 2DXY model. For the latter, it will be interesting to extend previous studies on the dynamics of the active-particle location [26] and develop theory on behaviour at criticality, with broad potential impact from continuous phase transitions to worldline quantum field theory [27] and lattice QCD [28]. Moreover, extensions to multiple species will provide a route to exploiting cell-horizon ECMC in the context of particle models of glasses, where the combination with teleportation portals [29] could prove powerful [30]. In the longer term, extensions to molecular rotations and many-body interactions [31] may accelerate simulations of complex molecular models, from atomistic water to peptides in solution. Incorporating enhanced sampling functionality (e.g. tempering) could then address challenging multimodal problems such as peptide folding and the sampling of competing crystalline phases formed by off-lattice particle models. It will also be natural to exploit cell-horizon ECMC to extend recent work on the dynamics of standard-factorised ECMC across phase-separated boundaries [32], building further impact at phase transitions.

Outside the physical sciences, similar factorisation schemes have been combined with control variates and subsampling to leverage significant performance improvements when applying the zigzag process to large data sets in Bayesian inference [16]. Exploiting possible connections between control variates and factor-fields may provide advances in both fields, e.g. nullifying the pressure is analogous to minimising Bayesian model misspecification [21]. In addition, future work generalising ECMC with broken velocity symmetry to non-toroidal compact state spaces may provide the framework for broadening cell-horizon ECMC to the Strauss process, stochastic SIR model and other models in computational statistics. Finally, these results are an example of less efficient exploration of the auxiliary (index) space leading to much faster mixing on the original state space. It may be illuminating to characterise this in terms of large-deviations theory.

Acknowledgments

We are grateful to W. Krauth and S. Livingstone for helpful discussions. J. G. is supported by an EPSRC studentship funded by the Centre for Doctoral Training in Modelling of Heterogeneous Systems EP/S022848/1. M. F. F. is supported by EPSRC grant UKRI4536. Simulations were performed using the Scientific Computing Research Technology Platform at the University of Warwick.

Code and simulation data

Code will be made freely available on GitHub at https://github.com/michaelfaulkner/super-aLby following the review process (the README will outline how to reproduce all published data). All simulation data will be made available at a data repository. Simulations for Figure 2–Figure 4 and 7 started from ordered configurations. Those for Figure 6 and 8 started far from equilibrium. The trace plots in Figure 6 were reconstructed from a skeleton formed at events. All samples of the structure factor were formed by recording its configurational value with some frequency ∝1/N\propto1/N. We then corrected for the 1/N1/N factor after calculating the estimated autocorrelation time τ\tau of each sample (and similarly for the mixing times presented in Appendix D). This circumvents memory constraints when simulating large numbers of particles. Results were then averaged across 10–12 independent simulations, each of between 10510^{5} and 5×1065 \times10^{6} samples (the above README will provide the exact simulation details of each figure). τ\tau errors were estimated using standard error estimates across the independent simulations, with all non-visible error bars smaller than the marker size.

Breaking velocity symmetry

For models on the 1D torus T\mathbb{T}, ECMC augments the original state space RN(N−1)/2\mathbb{R}^{N(N-1)/2} (of the springs vector x~\tilde{\mathbf{x}}) with both the velocity space V={−v0,v0}\mathcal{V}=\{-v_0,v_0\} and index space I\mathcal{I}. This results in the joint distribution π(x~)μ(v)ν(a)\pi(\tilde{\mathbf{x}})\mu(v)\nu(a) over the augmented state space RN(N−1)/2×V×I\mathbb{R}^{N(N-1)/2}\times\mathcal{V}\times\mathcal{I}, where the velocity distribution μ(v)\mu(v) is uniformly distributed on V\mathcal{V} and the index distribution ν(a)\nu(a) is uniformly distributed on I\mathcal{I}. Breaking velocity symmetry is then defined as constructing a continuous-time Markov process that samples only half of V\mathcal{V}, i.e. one that fixes vv to either +v0+v_0 or −v0-v_0 throughout the process on the 1D torus (n.b. the definition also applies to the higher dimensional torus).

In the case of ECMC without velocity changes, the state of the Markov process reduces to (x~,a)∈RN(N−1)/2×I(\tilde{\mathbf{x}},a)\in\mathbb{R}^{N(N-1)/2}\times\mathcal{I}, with invariant probability measure written with a slight abuse of notation as π(x~,a):=π(x~)/N\pi(\tilde{\mathbf{x}},a):=\pi(\tilde{\mathbf{x}})/N. For a translationally symmetric model of particles on T\mathbb{T} (with springs vector on RN(N−1)/2\mathbb{R}^{N(N-1)/2}), here we present an informal argument that

πPh(x~,a)=π(x~,a)+O(h2)(12)\pi P^{h}(\tilde{\mathbf{x}},a)=\pi(\tilde{\mathbf{x}},a)+O(h^{2}) \tag*{(12)}

for small h>0h>0, i.e. that broken velocity symmetry preserves ergodicity on the original state space, and where PP denotes the transition semigroup of the symmetry-broken algorithm that sets v(t)=v0v(t)=v_0 for all tt. We shall present the proof for non-factorised ECMC though an almost identical argument can be used for the factorised approaches.

We denote by eae_a the unit vector in the atha^{\mathrm{th}} particle direction such that x~+hv0ea\tilde{\mathbf{x}}+hv_0e_a adds hv0hv_0 to xa−1,ax_{a-1,a} and subtracts hv0hv_0 from xa+1,ax_{a+1,a} (recall that x~=(x1,2,…,x1,N,x2,3,…,x2,N,…,xN−1,N)T\tilde{\mathbf{x}}=(x_{1,2},\ldots,x_{1,N},x_{2,3},\ldots,x_{2,N},\ldots,x_{N-1,N})^{T}). Using exp⁡(−βv0max⁡{∂aU(x~),0}h)=\exp(-\beta v_0\max\{\partial_a U(\tilde{\mathbf{x}}),0\}h)= 1−hβv0max⁡{∂aU(x~),0}+O(h2)1-h\beta v_0\max\{\partial_a U(\tilde{x}),0\}+O(h^2), the left-hand side of Eq. (12) can be written as

πPh(x~,a)=π(x~−hv0ea,a)(1−hβv0max⁡{∂aU(x~),0})+∑a′π(x~,a′)hβv0max⁡{∂a′U(x~),0}max⁡{−∂aU(x~),0}∑a′′max⁡{−∂a′′U(x~),0}+O(h2)\pi P^h(\tilde{x},a)=\pi(\tilde{x}-hv_0e_a,a)(1-h\beta v_0\max\{\partial_aU(\tilde{x}),0\})+\sum_{a'}\pi(\tilde{x},a')h\beta v_0\max\{\partial_{a'}U(\tilde{x}),0\}\frac{\max\{-\partial_aU(\tilde{x}),0\}}{\sum_{a''}\max\{-\partial_{a''}U(\tilde{x}),0\}}+O(h^2)

Now noting that

π(x~−hv0ea,a)=π(x~,a)(1+hβv0∂aU(x~))+O(h2)\pi(\tilde{x}-hv_0e_a,a)=\pi(\tilde{x},a)(1+h\beta v_0\partial_aU(\tilde{x}))+O(h^2)

and using π(x~,a)=π(x~)/N\pi(\tilde{x},a)=\pi(\tilde{x})/N for all aa, we find that

πPh(x~,a)=1Nπ(x~)[1+hβv0(∂aU(x~)−max⁡{∂aU(x~),0}+∑a′max⁡{∂a′U(x~),0}max⁡{−∂aU(x~),0}∑a′′max⁡{−∂a′′U(x~),0})]+O(h2).\pi P^h(\tilde{x},a)=\frac{1}{N}\pi(\tilde{x})\left[1+h\beta v_0\left(\partial_aU(\tilde{x})-\max\{\partial_aU(\tilde{x}),0\}+\sum_{a'}\max\{\partial_{a'}U(\tilde{x}),0\}\frac{\max\{-\partial_aU(\tilde{x}),0\}}{\sum_{a''}\max\{-\partial_{a''}U(\tilde{x}),0\}}\right)\right]+O(h^2).

Ignoring terms of O(h2)O(h^2), stationarity then requires that

∂aU(x~)−max⁡{∂aU(x~),0}+∑a′max⁡{∂a′U(x~),0}max⁡{−∂aU(x~),0}∑a′′max⁡{−∂a′′U(x~),0}=0,(13)\partial_aU(\tilde{x})-\max\{\partial_aU(\tilde{x}),0\}+\sum_{a'}\max\{\partial_{a'}U(\tilde{x}),0\}\frac{\max\{-\partial_aU(\tilde{x}),0\}}{\sum_{a''}\max\{-\partial_{a''}U(\tilde{x}),0\}}=0, \tag*{(13)}

where we have used πPh(x~,a)=π(x~,a)\pi P^h(\tilde{x},a)=\pi(\tilde{x},a) at stationarity and π(x~,a)=π(x~)/N\pi(\tilde{x},a)=\pi(\tilde{x})/N for all aa. Now we use the fact that U(x~)=∑j,i>jUij(xij)U(\tilde{x})=\sum_{j,i>j}U_{ij}(x_{ij}) which implies that

∑j∂jU(x~)=0.\sum_j\partial_jU(\tilde{x})=0.

Then also using

max⁡{∂a′′U(x~),0}−max⁡{−∂a′′U(x~),0}=∂a′′U(x~),\max\{\partial_{a''}U(\tilde{x}),0\}-\max\{-\partial_{a''}U(\tilde{x}),0\}=\partial_{a''}U(\tilde{x}),

we find that

∑a′′max⁡{∂a′′U(x~),0}=∑a′′(∂a′′U(x~)+max⁡{−∂a′′U(x~),0})=0+∑a′′max⁡{−∂a′′U(x~),0}.\sum_{a''}\max\{\partial_{a''}U(\tilde{x}),0\}=\sum_{a''}\left(\partial_{a''}U(\tilde{x})+\max\{-\partial_{a''}U(\tilde{x}),0\}\right)=0+\sum_{a''}\max\{-\partial_{a''}U(\tilde{x}),0\}.

Thus

∑a′′max⁡{∂a′′U(x~),0}=∑a′′max⁡{−∂a′′U(x~),0}\sum_{a''}\max\{\partial_{a''}U(\tilde{x}),0\}=\sum_{a''}\max\{-\partial_{a''}U(\tilde{x}),0\}

and therefore the left-hand side of Eq. (13) reduces to

∂aU(x~)−max⁡{∂aU(x~),0}+max⁡{−∂aU(x~),0}=0,\partial_aU(\tilde{x})-\max\{\partial_aU(\tilde{x}),0\}+\max\{-\partial_aU(\tilde{x}),0\}=0,

as required.

Generalised harmonic chain

Spring-vector distribution (p=2p=2 case)

Let {yi+1,i}∈R\{y_{i+1,i}\}\in\mathbb{R} be a set of iid unconstrained 1D spring vectors (each with distribution ∝exp⁡(−βkyi+1,i2/2)\propto\exp(-\beta k y_{i+1,i}^2/2)) and write ∑iyi+1,i=S\sum_i y_{i+1,i}=S, where SS is a random variable with ⟨S⟩=0\langle S\rangle=0. Clearly, ⟨yi+1,i⟩=0\langle y_{i+1,i}\rangle=0 and the variance σy2=(βk)−1\sigma_y^2=(\beta k)^{-1} by the equipartition theorem. We then express the constrained spring vectors {xi+1,i}\{x_{i+1,i}\} (of the p=2p=2 generalised harmonic chain on the 1D torus of length LL) as:

xi+1,i=yi+1,i−1N∑jyj+1,j+LN(14)x_{i+1,i}=y_{i+1,i}-\frac{1}{N}\sum_j y_{j+1,j}+\frac{L}{N} \tag*{(14)}

This enforces the condition ∑ixi+1,i=L\sum_i x_{i+1,i}=L but with ⟨xi+1,i⟩=L/N\langle x_{i+1,i}\rangle=L/N. Writing the right-hand side as

yi+1,i−1N∑jyj+1,j+LN=(1−1N)yi+1,i−1N∑j≠iyj+1,j+LN(15)y_{i+1,i}-\frac{1}{N}\sum_j y_{j+1,j}+\frac{L}{N}=\left(1-\frac{1}{N}\right)y_{i+1,i}-\frac{1}{N}\sum_{j\ne i}y_{j+1,j}+\frac{L}{N} \tag*{(15)}

allows us to determine the variance

σx2=Var⁡(xi+1,i)=(1−1N)2Var⁡(yi+1,i)+1N2Var⁡(∑j≠iyj+1,j)(16)\sigma_x^2 = \operatorname{Var}(x_{i+1,i}) = \left(1-\frac{1}{N}\right)^2 \operatorname{Var}(y_{i+1,i}) + \frac{1}{N^2}\operatorname{Var}\left(\sum_{j\ne i} y_{j+1,j}\right) \tag*{(16)}

since Cov⁡(yi+1,i,yj+1,j)=0\operatorname{Cov}(y_{i+1,i},y_{j+1,j})=0 for all i≠ji\ne j. It then follows that

σx2=(1−1N)21βk+1N2(N−1)1βk=1βk(1−1N).(17)\sigma_x^2 = \left(1-\frac{1}{N}\right)^2 \frac{1}{\beta k} + \frac{1}{N^2}(N-1)\frac{1}{\beta k} = \frac{1}{\beta k}\left(1-\frac{1}{N}\right). \tag*{(17)}

The constrained spring vectors are therefore distributed as xi+1,i∼N(L/N,(βk)−1(1−N−1))x_{i+1,i}\sim\mathcal{N}\left(L/N,(\beta k)^{-1}(1-N^{-1})\right) for all ii.

Mean event rate (p=2 case)

Non-factorised ECMC

The gradient of the total potential U~\widetilde{U} (the p=2p=2 case of Eq. (7)) with respect to the position xix_i of particle ii is

∂U~∂xi=k(xi,i−1−xi+1,i).(18)\frac{\partial\widetilde{U}}{\partial x_i}=k(x_{i,i-1}-x_{i+1,i}). \tag*{(18)}

Writing zi:=k(xi,i−1−xi+1,i)z_i:=k(x_{i,i-1}-x_{i+1,i}) defines a random variable with mean ⟨zi⟩=0\langle z_i\rangle=0 and variance

σz2=Var⁡(zi)=k2[Var⁡(xi,i−1)+Var⁡(xi+1,i)−2Cov⁡(xi,i−1,xi+1,i)]=2k2(σx2−Cov⁡(xi−1,i,xi+1,i))(19)\sigma_z^2=\operatorname{Var}(z_i)=k^2[\operatorname{Var}(x_{i,i-1})+\operatorname{Var}(x_{i+1,i})-2\operatorname{Cov}(x_{i,i-1},x_{i+1,i})]=2k^2(\sigma_x^2-\operatorname{Cov}(x_{i-1,i},x_{i+1,i})) \tag*{(19)}

for each ii. Defining the spring-vector fluctuations δxi+1,i:=xi+1,i−⟨xi+1,i⟩\delta x_{i+1,i}:=x_{i+1,i}-\langle x_{i+1,i}\rangle then gives ∑iδxi+1,i=0\sum_i\delta x_{i+1,i}=0 and therefore

0=⟨(∑iδxi+1,i)2⟩=∑i⟨δxi+1,i2⟩+∑j,i≠j⟨δxi+1,iδxj+1,j⟩=Nσx2+N(N−1)Cov⁡(xi+1,i,xj+1,j).(20)0=\left\langle\left(\sum_i\delta x_{i+1,i}\right)^2\right\rangle=\sum_i\langle\delta x_{i+1,i}^2\rangle+\sum_{j,i\ne j}\langle\delta x_{i+1,i}\delta x_{j+1,j}\rangle=N\sigma_x^2+N(N-1)\operatorname{Cov}(x_{i+1,i},x_{j+1,j}). \tag*{(20)}

It follows that Cov⁡(xi+1,i,xj+1,j)=−σx2/(N−1)\operatorname{Cov}(x_{i+1,i},x_{j+1,j})=-\sigma_x^2/(N-1) and therefore

σz2=2k2(σx2+σx2N−1)=2k2βk(1−1N)(1+1N−1)=2kβ,(21)\sigma_z^2=2k^2\left(\sigma_x^2+\frac{\sigma_x^2}{N-1}\right)=\frac{2k^2}{\beta k}\left(1-\frac{1}{N}\right)\left(1+\frac{1}{N-1}\right)=\frac{2k}{\beta}, \tag*{(21)}

i.e. zi∼N(0,2k/β)z_i\sim\mathcal{N}(0,2k/\beta). The mean event rate of non-factorised ECMC is therefore

Λnf=⟨λ⟩=β⟨max⁡(0,vzi)⟩=β2⟨∣vzi∣⟩=β∣v∣2∫−∞∞∣z∣12πσz2exp⁡(−z22σz2) dz=βv0∫0∞z2πσz2exp⁡(−z22σz2) dz=βv02πσz2σz2=βv0σz2π=βv02π2kβ=βkπv0.(22)\begin{aligned} \Lambda_{\mathrm{nf}}=\langle\lambda\rangle=\beta\langle\max(0,vz_i)\rangle=\frac{\beta}{2}\langle|v z_i|\rangle=\frac{\beta|v|}{2}\int_{-\infty}^{\infty}|z|\frac{1}{\sqrt{2\pi\sigma_z^2}}\exp\left(-\frac{z^2}{2\sigma_z^2}\right)\,dz=\beta v_0\int_0^\infty\frac{z}{\sqrt{2\pi\sigma_z^2}}\exp\left(-\frac{z^2}{2\sigma_z^2}\right)\,dz \\ &=\frac{\beta v_0}{\sqrt{2\pi\sigma_z^2}}\sigma_z^2=\frac{\beta v_0\sigma_z}{\sqrt{2\pi}}=\frac{\beta v_0}{\sqrt{2\pi}}\sqrt{\frac{2k}{\beta}}=\sqrt{\frac{\beta k}{\pi}}v_0. \tag*{(22)} \end{aligned}

where we have used max⁡(0,x)=(x+∣x∣)/2\max(0,x)=(x+|x|)/2.

Cell-horizon ECMC

The cell-horizon gradients related to particle ii are

∂U~i,i−1∂xi=kxi,i−1−band∂U~i+1,i∂xi=b−kxi+1,i.(23)\frac{\partial\widetilde{U}_{i,i-1}}{\partial x_i}=kx_{i,i-1}-b\quad\text{and}\quad\frac{\partial\widetilde{U}_{i+1,i}}{\partial x_i}=b-kx_{i+1,i}. \tag*{(23)}

Recalling that xi+1,i∼N(L/N,(βk)−1(1−N−1))x_{i+1,i}\sim\mathcal{N}(L/N,(\beta k)^{-1}(1-N^{-1})) for each ii (see Section C1), the mean event rate of cell-horizon ECMC is therefore

Λch=⟨λ~i,i−1⟩+⟨λ~i+1,i⟩=βk[⟨max⁡(0,v(xi,i−1−bk))⟩+⟨max⁡(0,v(bk−xi+1,i))⟩]=βk∣v∣2[⟨∣xi,i−1−bk∣⟩+⟨∣xi+1,i−bk∣⟩]=βkv0⟨∣xi+1,i−bk∣⟩=βkv0∫−∞∞∣x−bk∣12πσx2exp⁡(−(x−μ)22σx2) dx,(24)\begin{aligned} \Lambda_{\mathrm{ch}}=\langle\widetilde{\lambda}_{i,i-1}\rangle+\langle\widetilde{\lambda}_{i+1,i}\rangle=\beta k\left[\left\langle\max\left(0,v\left(x_{i,i-1}-\frac{b}{k}\right)\right)\right\rangle+\left\langle\max\left(0,v\left(\frac{b}{k}-x_{i+1,i}\right)\right)\right\rangle\right] \\ &=\frac{\beta k|v|}{2}\left[\left\langle\left|x_{i,i-1}-\frac{b}{k}\right|\right\rangle+\left\langle\left|x_{i+1,i}-\frac{b}{k}\right|\right\rangle\right]=\beta k v_0\left\langle\left|x_{i+1,i}-\frac{b}{k}\right|\right\rangle\\ &=\beta k v_0\int_{-\infty}^{\infty}\left|x-\frac{b}{k}\right|\frac{1}{\sqrt{2\pi\sigma_x^2}}\exp\left(-\frac{(x-\mu)^2}{2\sigma_x^2}\right)\,dx, \tag*{(24)} \end{aligned}

where μ=⟨xi+1,i⟩\mu= \langle x_{i+1,i}\rangle and we have again used max⁡(0,x)=(x+∣x∣)/2\max(0,x) = (x + \lvert x\rvert)/2. Now let u=x−μu = x - \mu and Δ=b/k−μ\Delta= b/k - \mu:

Λch=βkv0∫−∞∞∣u−Δ∣12πσx2exp⁡(−u22σx2) du=βkv0[∫−∞Δ(Δ−u)12πσx2exp⁡(−u22σx2) du+∫Δ∞(u−Δ)12πσx2exp⁡(−u22σx2) du]=βkv0[Δerf⁡(Δ2σx)+2πσxexp⁡(−Δ22σx2)].(25)\begin{aligned} \Lambda_{\mathrm{ch}} &= \beta k v_0 \int_{-\infty}^{\infty} \lvert u-\Delta\rvert\frac{1}{\sqrt{2\pi\sigma_x^2}}\exp\left(-\frac{u^2}{2\sigma_x^2}\right)\,\mathrm{d}u \\ &= \beta k v_0 \left[\int_{-\infty}^{\Delta}(\Delta-u)\frac{1}{\sqrt{2\pi\sigma_x^2}}\exp\left(-\frac{u^2}{2\sigma_x^2}\right)\,\mathrm{d}u+\int_{\Delta}^{\infty}(u-\Delta)\frac{1}{\sqrt{2\pi\sigma_x^2}}\exp\left(-\frac{u^2}{2\sigma_x^2}\right)\,\mathrm{d}u\right] \\ &= \beta k v_0\left[\Delta\operatorname{erf}\left(\frac{\Delta}{\sqrt{2}\sigma_x}\right)+\sqrt{\frac{2}{\pi}}\sigma_x\exp\left(-\frac{\Delta^2}{2\sigma_x^2}\right)\right]. \tag*{(25)} \end{aligned}

We can now determine the optimal Δ\Delta by minimising Λch\Lambda_{\mathrm{ch}}:

dΛchdΔ=βkv0[erf⁡(Δ2σx)+Δ2σx2πexp⁡(−Δ22σx2)−2πΔσxexp⁡(−Δ22σx2)]=βkv0erf⁡(Δ2σx),(26)\frac{\mathrm{d}\Lambda_{\mathrm{ch}}}{\mathrm{d}\Delta} = \beta k v_0\left[\operatorname{erf}\left(\frac{\Delta}{\sqrt{2}\sigma_x}\right)+\frac{\Delta}{\sqrt{2}\sigma_x}\sqrt{\frac{2}{\pi}}\exp\left(-\frac{\Delta^2}{2\sigma_x^2}\right)-\sqrt{\frac{2}{\pi}}\frac{\Delta}{\sigma_x}\exp\left(-\frac{\Delta^2}{2\sigma_x^2}\right)\right] = \beta k v_0\operatorname{erf}\left(\frac{\Delta}{\sqrt{2}\sigma_x}\right), \tag*{(26)}

which implies that dΛch/dΔ=0\mathrm{d}\Lambda_{\mathrm{ch}}/\mathrm{d}\Delta= 0 when Δ=0\Delta= 0, i.e. bΛ∗=Lk/Nb_\Lambda^* = Lk/N. The mean event rate at b=bΛ∗b=b_\Lambda^* is therefore

Λch(Δ=0)=βkv02πσx=2βkπ(1−1N)v0(27)\Lambda_{\mathrm{ch}}(\Delta=0)=\beta k v_0\sqrt{\frac{2}{\pi}}\sigma_x=\sqrt{\frac{2\beta k}{\pi}\left(1-\frac{1}{N}\right)}v_0 \tag*{(27)}

and it follows that

Λch(Δ=0)Λnf=2(1−1N),(28)\frac{\Lambda_{\mathrm{ch}}(\Delta=0)}{\Lambda_{\mathrm{nf}}}=\sqrt{2\left(1-\frac{1}{N}\right)}, \tag*{(28)}

i.e. Λch(Δ=0)>Λnf\Lambda_{\mathrm{ch}}(\Delta=0)>\Lambda_{\mathrm{nf}} for all N>2N>2. Moreover, the thermodynamic limit of Eq. (27) is

lim⁡N→∞Λch(Δ=0)=2βkπv0(29)\lim_{N\to\infty}\Lambda_{\mathrm{ch}}(\Delta=0)=\sqrt{\frac{2\beta k}{\pi}}v_0 \tag*{(29)}

and

lim⁡N→∞Λch(Δ=0)Λnf=2.(30)\lim_{N\to\infty}\frac{\Lambda_{\mathrm{ch}}(\Delta=0)}{\Lambda_{\mathrm{nf}}}=\sqrt{2}. \tag*{(30)}

Pressure

The partition function of the generalised harmonic chain (with total potential U~\tilde{U} defined in Eq. (5)) is

Z=1N!∏i=1N[∫dxi+1,i]δ(∑ixi+1,i−L)exp⁡(−βkp∑i∣xi+1,i∣p+βbL),(31)Z=\frac{1}{N!}\prod_{i=1}^{N}\left[\int\mathrm{d}x_{i+1,i}\right]\delta\left(\sum_i x_{i+1,i}-L\right)\exp\left(-\frac{\beta k}{p}\sum_i\lvert x_{i+1,i}\rvert^p+\beta bL\right), \tag*{(31)}

where the Dirac measure enforces the constraint ∑ixi+1,i=L\sum_i x_{i+1,i}=L. Defining yi:=xi+1,i/Ly_i:=x_{i+1,i}/L then gives

Z=LN−11N!∏i=1N[∫dyi]δ(∑iyi−1)exp⁡(−βkLpp∑i∣yi∣p+βbL),(32)Z=L^{N-1}\frac{1}{N!}\prod_{i=1}^{N}\left[\int\mathrm{d}y_i\right]\delta\left(\sum_i y_i-1\right)\exp\left(-\frac{\beta kL^p}{p}\sum_i\lvert y_i\rvert^p+\beta bL\right), \tag*{(32)}

where the LN−1L^{N-1} factor is the Jacobian when accounting for the Dirac measure. The normalised pressure is then

βP=∂log⁡Z∂L=N−1L+1Z[LN−11N!∏i=1N[∫dyi]δ(∑iyi−1)(−βkLp−1∑i∣yi∣p+βb)exp⁡(−βkLpp∑i∣yi∣p+βbL)]=N−1L+1Z[1N!∏i=1N[∫dxi+1,i]δ(∑ixi+1,i−L)(−βkL∑i∣xi+1,i∣p+βb)exp⁡(−βkp∑i∣xi+1,i∣p+βbL)]=N−1L−βpL⟨kp∑i∣xi+1,i∣p⟩+βb(33)\begin{aligned} \beta P &= \frac{\partial\log Z}{\partial L} \\ &= \frac{N-1}{L}+\frac{1}{Z}\left[L^{N-1}\frac{1}{N!}\prod_{i=1}^{N}\left[\int\mathrm{d}y_i\right]\delta\left(\sum_i y_i-1\right)\left(-\beta kL^{p-1}\sum_i\lvert y_i\rvert^p+\beta b\right)\exp\left(-\frac{\beta kL^p}{p}\sum_i\lvert y_i\rvert^p+\beta bL\right)\right] \\ &= \frac{N-1}{L}+\frac{1}{Z}\left[\frac{1}{N!}\prod_{i=1}^{N}\left[\int\mathrm{d}x_{i+1,i}\right]\delta\left(\sum_i x_{i+1,i}-L\right)\left(-\frac{\beta k}{L}\sum_i\lvert x_{i+1,i}\rvert^p+\beta b\right)\exp\left(-\frac{\beta k}{p}\sum_i\lvert x_{i+1,i}\rvert^p+\beta bL\right)\right] \\ &= \frac{N-1}{L}-\frac{\beta p}{L}\left\langle\frac{k}{p}\sum_i\lvert x_{i+1,i}\rvert^p\right\rangle+\beta b \tag*{(33)} \end{aligned}
=N−1L−βpL⟨U~(b=0)⟩+βb.(34)= \frac{N-1}{L}-\frac{\beta p}{L}\left\langle\tilde{U}(b=0)\right\rangle+\beta b. \tag*{(34)}

This can be alternatively derived by writing the partition function in terms of an (N−1)(N-1)-dimensional integral:

Z=1N!∏i=1N−1[∫dxi+1,i]exp⁡(−βkp[∑i=1N−1∣xi+1,i∣p+∣L−∑i=1N−1xi+1,i∣p]+βbL).(35)Z=\frac{1}{N!}\prod_{i=1}^{N-1}\left[\int dx_{i+1,i}\right]\exp\left(-\frac{\beta k}{p}\left[\sum_{i=1}^{N-1}|x_{i+1,i}|^p+\left|L-\sum_{i=1}^{N-1}x_{i+1,i}\right|^p\right]+\beta bL\right). \tag*{(35)}

The change of variables then results in the same LN−1L^{N-1} Jacobian. We note that the pressure of the soft-disk model (Eq. (11)) can be analogously derived, resulting in the −βp⟨U~(b=0)⟩/L-\beta p\langle\widetilde{U}(b=0)\rangle/L term in Eq. (34) becoming βκ⟨U~(b=0)⟩/L\beta\kappa\langle\widetilde{U}(b=0)\rangle/L, with U~\widetilde{U} defined for the soft-disk model in Eq. (10).

For the p=2p=2 case of the generalised harmonic chain, we use ⟨xi+1,i2⟩=Var⁡(xi+1,i)+⟨xi+1,i⟩2=(βk)−1(1−1/N)+(L/N)2\langle x_{i+1,i}^2\rangle=\operatorname{Var}(x_{i+1,i})+\langle x_{i+1,i}\rangle^2=(\beta k)^{-1}(1-1/N)+(L/N)^2 (by Eq. (17)) to simplify Eq. (33) to Eq. (9):

βP=N−1L−βkL⟨∑ixi+1,i2⟩+βb=N−1L−NLβk⟨xi+1,i2⟩+βb=N−1L−NL(1−1N)βkLN+βb=β(b−LkN).(36)\begin{aligned} \beta P&=\frac{N-1}{L}-\frac{\beta k}{L}\left\langle\sum_i x_{i+1,i}^2\right\rangle+\beta b\\ &=\frac{N-1}{L}-\frac{N}{L}\beta k\langle x_{i+1,i}^2\rangle+\beta b\\ &=\frac{N-1}{L}-\frac{N}{L}\left(1-\frac{1}{N}\right)\frac{\beta kL}{N}+\beta b\\ &=\beta\left(b-\frac{Lk}{N}\right). \tag*{(36)} \end{aligned}

Additional numerical results

Here we present additional numerical results to support the ansatz βP=vidx/v0\beta P=v_{\mathrm{idx}}/v_0 and the mixing times of Section IV. Figure 7 presents estimates of both βP\beta P and vidx/v0v_{\mathrm{idx}}/v_0 for all models presented in the paper. Results demonstrate excellent agreement between the two quantities. Figure 8 presents estimates of the mixing times τmix\tau_{\mathrm{mix}} of both standard-factorised ECMC and optimal cell-horizon ECMC. Mixing times are averaged over 12 independent simulations. The mixing-time estimate of any given simulation is defined as the time at which the instantaneous variance var⁡(w):=∑iwi2/N−(∑iwi/N)2\operatorname{var}(\mathbf{w}) := \sum_i w_i^2/N - (\sum_i w_i/N)^2 of the half-system distances wi:=xi+N/2−xiw_i := x_{i+N/2} - x_i reaches its equilibrium value from the far-from-equilibrium initial configurations described in Section IV (xi+N/2x_{i+N/2} accounts for the toroidal topology of the index space I\mathcal{I}). This is the method presented in Ref. [24]. Results are consistent with standard-factorised ECMC and optimal cell-horizon ECMC achieving O(N5/2)\mathcal{O}(N^{5/2}) and O(N2)\mathcal{O}(N^2) mixing times for the p=2p=2 generalised harmonic chain.

Figure 7. MC estimates of both βP\beta P (lines; defined in Section II C) and vidx/v0v_{\mathrm{idx}}/v_0 (circles; defined in Section III B) vs bb for the generalised harmonic chain (GHC) and 1D soft-disk model (SD) with a variety of model exponents and inverse temperatures. Results are consistent with the ansatz βP=vidx/v0\beta P=v_{\mathrm{idx}}/v_0. Lines are a guide to the eye between pressure estimates computed at the same bb values as the vidxv_{\mathrm{idx}} estimates. The length scale r0=(βk)−1/pr_0=(\beta k)^{-1/p} and σ\sigma for the GHC and SD model, respectively. Results were averaged across 10 independent simulations, each of between 4.5×1054.5\times10^5 and 7×1057\times10^5 samples (see Appendix A for precise details).

Figure 8. Estimates of the mixing times τmix\tau_{\mathrm{mix}} of standard-factorised ECMC (blue) and optimal cell-horizon ECMC (green) vs NN for the p=2p=2 generalised harmonic chain. Mixing times are averaged across 12 independent simulations. The mixing-time estimate of any given simulation is defined as the time at which the instantaneous variance var⁡(w)\operatorname{var}(\mathrm{w}) (defined in Appendix § 0.3.4) reaches its equilibrium value after starting far from equilibrium. Results are consistent with standard-factorised ECMC and optimal cell-horizon ECMC achieving O(N5/2)O(N^{5/2}) and O(N2)O(N^2) mixing times. Dotted lines are straight lines with gradient N5/2N^{5/2} (blue) and N2N^2 (green).

References

References

  1. [1]Alder, B. J. and Wainwright, T. E., “Phase Transition for a Hard Sphere System,” J. Chem. Phys., vol. 27, p. 1208, 1957.DOI
  2. [2]Duane, A. D. Kennedy, B. J. Pendleton, and D. Roweth, “Hybrid Monte Carlo,” Phys. Lett. B, vol. 195, p. 216, 1987.DOI
  3. [3]D. E. Shaw, P. Maragakis, K. Lindorff-Larsen, S. Piana, R. O. Dror, M. P. Eastwood, J. A. Bank, J. M. Jumper, J. K. Salmon, Y. Shan, and W. Wriggers, “Atomic-level characterization of the structural dynamics of proteins,” Science, vol. 330, p. 341, 2010.
  4. [4]R. Car and M. Parrinello, “Unified Approach for Molecular Dynamics and Density-Functional Theory,” Phys. Rev. Lett., vol. 55, p. 2471, 1985.pubmed.ncbi.nlm.nih.gov/10032153
  5. [5]D. Marx and M. Parrinello, “Ab initio path integral molecular dynamics: Basic ideas,” J. Chem. Phys., vol. 104, p. 4077, 1996.
  6. [6]B. Carpenter, A. Gelman, M. D. Hoffman, D. Lee, B. Goodrich, M. Betancourt, M. Brubaker, J. Guo, P. Li, and A. Riddell, “Stan: A Probabilistic Programming Language,” J. Stat. Softw., vol. 76, p. 1, 2017.DOI
  7. [7]N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller, “Equation of state calculations by fast computing machines,” J. Chem. Phys., vol. 21, p. 1087, 1953.
  8. [8]W. K. Hastings, “Monte Carlo sampling methods using Markov chains and their applications,” Biometrika, vol. 57, p. 97, 1970.
  9. [9]R. M. Neal, “MCMC using Hamiltonian dynamics,” in Handbook of Markov Chain Monte Carlo (S. Brooks, A. Gelman, G. Jones, and X.-L. Meng, eds.), 2011.DOI
  10. [10]A. Beskos, N. Pillai, G. O. Roberts, J.-M. Sanz-Serna, and A. Stuart, “Optimal tuning of the hybrid Monte Carlo algorithm,” Bernoulli, vol. 19, p. 1501, 2013.arxiv.org/abs/1001.4460
  11. [11]W. Krauth, “Hamiltonian Monte Carlo vs. event-chain Monte Carlo: an appraisal of sampling strategies beyond the diffusive regime,” arXiv preprint arXiv:2411.11690, 2024.arxiv.org/abs/2411.11690
  12. [12]E. P. Bernard, W. Krauth, and D. B. Wilson, “Event-chain Monte Carlo algorithms for hard-sphere systems,” Phys. Rev. E, vol. 80, p. 056704, 2009.DOI
  13. [13]E. A. J. F. Peters and G. de With, “Rejection-free Monte Carlo sampling for general potentials,” Phys. Rev. E, vol. 85, p. 026703, 2012.pubmed.ncbi.nlm.nih.gov/22463353
  14. [14]M. Michel, S. C. Kapfer, and W. Krauth, “Generalized event-chain Monte Carlo: Constructing rejection-free global-balance algorithms from infinitesimal steps,” J. Chem. Phys., vol. 140, p. 054116, 2014.DOI
  15. [15]A. Bouchard-Côté, S. J. Vollmer, and A. Doucet, “The Bouncy Particle Sampler: A non-reversible rejection-free Markov chain Monte Carlo method,” J. Amer. Statist. Assoc., vol. 113, p. 855, 2018.
  16. [16]J. Bierkens, P. Fearnhead, and G. O. Roberts, “The Zig-Zag process and super-efficient sampling for Bayesian analysis of big data,” Ann. Stat., vol. 47, p. 1288, 2019.
  17. [17]E. P. Bernard and W. Krauth, “Two-step melting in two dimensions: First-order liquid-hexatic transition,” Phys. Rev. Lett., vol. 107, p. 155704, 2011.DOI
  18. [18]M. F. Faulkner, “Symmetry breaking at a topological phase transition,” Phys. Rev. B, vol. 109, p. 085405, 2024.DOI
  19. [19]R. H. Swendsen and J.-S. Wang, “Nonuniversal critical dynamics in Monte Carlo simulations,” Phys. Rev. Lett., vol. 58, p. 86, 1987.pubmed.ncbi.nlm.nih.gov/10034599
  20. [20]A. Monemvassitis, A. Guillin, and M. Michel, “PDMP Characterisation of Event-Chain Monte Carlo Algorithms for Particle Systems,” J. Stat. Phys., vol. 190, p. 66, 2023.DOI
  21. [21]M. F. Faulkner and S. Livingstone, “Sampling algorithms in statistical physics: a guide for statistics and machine learning,” Statist. Sci., vol. 39, p. 137, 2024.
  22. [22]S. C. Kapfer and W. Krauth, “Cell-veto Monte Carlo algorithm for long-range systems,” Phys. Rev. E, vol. 94, p. 031302, 2016.DOI
  23. [23]M. F. Faulkner, L. Qin, A. C. Maggs, and W. Krauth, “All-atom computations with irreversible Markov chains,” J. Chem. Phys., vol. 149, p. 064113, 2018.DOI
  24. [24]Z. Lei, W. Krauth, and A. C. Maggs, “Event-chain Monte Carlo with factor fields,” Phys. Rev. E, vol. 99, p. 043301, 2019.DOI
  25. [25]A. C. Maggs and W. Krauth, “Large-scale dynamics of event-chain Monte Carlo,” Phys. Rev. E, vol. 105, p. 015309, 2022.DOI
  26. [26]K. Kimura and S. Higuchi, “Anomalous diffusion analysis of the lifting events in the event-chain Monte Carlo for the classical XY models,” EPL (Europhys. Lett.), vol. 120, p. 30003, 2017.DOI
  27. [27]J. P. Edwards, U. Gerber, C. Schubert, M. A. Trejo, T. Tsiftsi, and A. Weber, “Applications of the worldline Monte Carlo formalism in quantum mechanics,” Annals Phys., vol. 411, p. 167966, 2019.DOI
  28. [28]A. Bazavov, D. Toussaint, C. Bernard, J. Laiho, C. DeTar, L. Levkova, M. B. Oktay, S. Gottlieb, U. M. Heller, J. E. Hetrick, P. B. Mackenzie, R. Sugar, and R. S. V. de Water, “Nonperturbative QCD simulations with 2+1 flavors of improved staggered quarks,” Rev. Mod. Phys., vol. 82, p. 1349, 2010.DOI
  29. [29]J. Bierkens, S. Grazzi, G. O. Roberts, and M. Schauer, “Methods and applications of PDMP samplers with boundary conditions,” arXiv preprint arXiv:2303.08023, 2023.arxiv.org/abs/2303.08023
  30. [30]L. Lenton and M. F. Faulkner, “Advanced Monte Carlo for binary hard-sphere glasses,” (In preparation), 2026.
  31. [31]J. Harland, M. Michel, T. A. Kampmann, and J. Kierfeld, “Event-chain Monte Carlo algorithms for three- and many-particle interactions,” EPL (Europhys. Lett.), vol. 117, p. 30001, 2017.DOI
  32. [32]G. Tartero, S. Shiratani, and W. Krauth, “Lifting the fog – a case for non-reversible “lifted” Markov chains,” arXiv preprint arXiv:2603.16855, 2026.arxiv.org/abs/2603.16855

Paper details

vlnc:W_4xujh3ky
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents