Random Batch Method with Momentum Correction

Yanshun Zhao, Jingrun Chen, Zhiwen ZhangarXiv 2024 · DOI

Abstract

Simulating large-scale interacting particle systems (IPS) is computationally intensive, typically scaling quadratically ($O(N^2)$) with the number of particles. While the Random Batch Method (RBM) reduces this cost to $O(N)$ by utilizing mini-batching techniques from machine learning, it often fails to maintain stability when encountering singular or "spiky" interaction kernels. This paper introduces RBM-M, an evolution of the method that incorporates a momentum-like correction to stabilize simulations. By applying exponential weighted averaging to interaction forces, RBM-M maintains linear efficiency while significantly outperforming standard RBM in accuracy and robustness for non-smooth kernels.

Introduction

Interacting particle systems are fundamental to modeling phenomena in fluid dynamics, biology, and social networks. These systems are governed by Stochastic Differential Equations (SDEs) where the force on each particle depends on its interactions with all others. For $N$ particles, calculating these $N(N-1)/2$ pairs becomes a bottleneck for large-scale applications.

The Random Batch Method (RBM) addresses this by randomly partitioning particles into small batches, calculating interactions only within those batches. However, RBM's reliance on random sampling introduces significant noise, particularly when the interaction kernel—the function describing the force—is singular (e.g., the Biot-Savart law). In such cases, the high variance can lead to divergence or poor convergence.

The RBM-M Algorithm

The core innovation of this work is the Random Batch Method with Momentum Correction (RBM-M). Drawing inspiration from momentum-based optimizers in stochastic gradient descent (SGD), the authors propose an update rule that smooths the interaction term:

$$K_{cor}(X^i - X^j) = eta K_{t-1}(X^i - X^j) + (1 - eta) K_t(X^i - X^j)$$

In this formulation, $K_t$ represents the interaction force calculated in the current random batch, while $K_{t-1}$ is the force from the previous time step. The hyperparameter $eta$ (typically $< 0.1$) controls the system's "memory."

Visual representation of the momentum correction applied to the interaction force vector.

By maintaining a running average, the algorithm effectively filters out the high-frequency noise generated by the random batching process. This stabilization is critical for singular kernels where a single "unlucky" batch could otherwise result in an unphysically large force vector.

Numerical Experiments and Results

The authors evaluated RBM-M across several physical and mathematical models, including the Biot-Savart kernel for fluid vortex interactions and the Keller-Segel model for chemotaxis.

Key Findings:

  • Enhanced Accuracy: In tests involving high-singularity kernels, RBM-M reduced $L_2$ errors by over 50% compared to standard RBM. For instance, error rates dropped from $7.9 \times 10^{-2}$ to $4.6 \times 10^{-2}$ in specific high-singularity scenarios.
  • Computational Efficiency: The momentum correction adds negligible overhead, consisting only of a few additional arithmetic operations per step. Consequently, the method retains its $O(N)$ scaling.
  • Stability and Convergence: Numerical results confirmed that the error scales with $\sqrt{\tau}$ (where $\tau$ is the time step), aligning with the theoretical bounds established by the authors.

Discussion and Future Work

A unique insight of this research is the specific requirement for a small $\beta$. Unlike machine learning applications where momentum is often as high as 0.9, particle simulations require a lower value because particles are constantly in motion. If $\beta$ is too high, the "memory" of the force becomes stale, referring to positions the particles no longer occupy.

Future research directions include the development of adaptive mechanisms to tune $\beta$ dynamically based on the local steepness of the singularity. Additionally, the authors suggest that other advanced ML optimizers, such as Adam or RMSProp, might be adapted to further refine the stability of particle simulations in multi-physics environments.

Summary updated

BibTeX
@misc{zhao2024random,
  author = {Yanshun Zhao and Jingrun Chen and Zhiwen Zhang},
  title = {{Random Batch Method with Momentum Correction}},
  year = {2024},
  eprint = {2412.15581},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.15581},
}
Figure