Abstract
We introduce a simulation-based, amortized Bayesian inference scheme to infer the parameters of random walks. Our approach learns the posterior distribution of the walks' parameters with a likelihood-free method. In the first step a graph neural network is trained on simulated data to learn optimized low-dimensional summary statistics of the random walk. In the second step an invertible neural network generates the posterior distribution of the parameters from the learned summary statistics using variational inference. We apply our method to infer the parameters of the fractional Brownian motion model from single trajectories. The computational complexity of the amortized inference procedure scales linearly with trajectory length, and its precision scales similarly to the Cramér-Rao bound over a wide range of lengths. The approach is robust to positional noise, and generalizes to trajectories longer than those seen during training. Finally, we adapt this scheme to show that a finite decorrelation time in the environment can furthermore be inferred from individual trajectories.
Introduction
Estimating parameters for fractional Brownian motion (fBm) is a fundamental challenge in statistical physics and data science. fBm is widely used to model anomalous diffusion in biological systems, molecular dynamics, and financial markets. Unlike standard Brownian motion, fBm is non-Markovian; its displacements are correlated across time, giving the process a "memory" that complicates parameter estimation.
Traditional estimation methods face a stark trade-off. Likelihood-based methods are statistically optimal but computationally expensive, scaling quadratically ($O(N^2)$) with the number of points $N$, which limits their use for long trajectories. Conversely, feature-based methods using handcrafted statistics like mean squared displacement are fast but often biased and less precise. This work introduces a "third way": a simulation-based inference scheme that achieves linear computational complexity ($O(N)$) while maintaining near-optimal precision.
Methods: Amortized Variational Inference
The proposed framework, based on the BayesFlow architecture, utilizes two primary neural components to perform amortized variational inference.
The Summary Network
The trajectory is represented as a graph where nodes correspond to positions and edges represent temporal connections. A Graph Neural Network (GNN), specifically an updated "GRATIN" architecture, processes this graph. By employing a scale-free wiring scheme, the GNN captures long-range temporal correlations without the need for exhaustive pairwise comparisons. This design ensures that the computational complexity remains $O(N)$, allowing for efficient processing of large datasets.
The Invertible Network
The fixed-size summary vector produced by the GNN is passed to a conditional Invertible Neural Network (cINN). This network maps the summary statistics to the posterior distribution of physical parameters, such as the anomalous exponent $\alpha$. The invertibility of the network allows it to transform a simple latent Gaussian distribution into the complex, multi-dimensional posterior distribution of the parameters.
The "amortization" aspect is key: the heavy computational cost is shifted to a one-time simulation-based training phase. Once trained, the model can infer parameters for new experimental trajectories almost instantaneously.
Results
The performance of the GRATIN-based inference scheme was evaluated using numerically generated fBm trajectories with anomalous exponents $\alpha$ ranging from 0.1 to 1.9.
Precision and Scaling
A critical finding is that the Mean Square Error (MSE) of the predicted $\alpha$ scales as $1/N$, closely approaching the Cramér-Rao bound—the theoretical limit for any estimator's precision. This demonstrates that the learned summary statistics are nearly as informative as the full likelihood.
Scalability and Robustness
While exact likelihood methods become computationally prohibitive for $N > 10,000$, the proposed method scales linearly. It successfully processes trajectories up to $N=100,000$ by segmenting them and averaging summary statistics. Furthermore, the GNN-based approach proves robust to Gaussian positional noise and outperforms standard recurrent architectures like LSTMs, particularly in higher-dimensional trajectory spaces (e.g., 10D or 30D).
Inference of Decorrelation Time
The framework was also adapted to infer a finite decorrelation time $\tau_c$ from individual trajectories. This is a significant achievement, as identifying such timescales is typically difficult using standard autocorrelation-based methods. Latent space visualization via UMAP confirmed that the network naturally organizes trajectories by their physical parameters ($\alpha$ and $\tau_c$), learning meaningful features without explicit supervision.
Discussion
This work demonstrates that combining GNNs with invertible networks provides a powerful tool for analyzing non-Markovian stochastic processes. By baking physical symmetries like rotation invariance into the graph representation, the model learns more efficiently than generic sequence models.
Future research could address the non-convex optimization challenges inherent in minimizing KL divergence during training. Additionally, extending the framework to perform model selection—distinguishing between different types of random walks—would further enhance its utility in experimental physics and data science.
Summary updated