Neural Markov Jump Processes

Patrick Seifner, Ramsés J. Sánchez · DOI

Abstract

Markov Jump Processes (MJPs) provide a robust mathematical framework for systems characterized by discrete state transitions occurring in continuous time. However, inferring these processes from noisy, irregularly sampled data remains a significant challenge. We present NeuralMJP, a novel variational inference framework that leverages Neural Ordinary Differential Equations (NeuralODEs) to model the continuous-time posterior of MJPs. By combining an ODE-RNN encoder with a generative prior and a time-dependent posterior, NeuralMJP enables scalable parameter estimation and state prediction without the need for fixed lag times. Our evaluation across synthetic physics models, experimental ion channel data, and molecular dynamics simulations demonstrates that NeuralMJP outperforms classical variational baselines in parameter recovery and state identification.

Introduction

Markov Jump Processes are essential for modeling systems that "hop" between discrete states—from molecules switching configurations to predator-prey populations fluctuating. Despite their utility, MJPs are notoriously difficult to work with when researchers only have access to noisy, discrete-time snapshots. Traditional methods like Markov Chain Monte Carlo (MCMC) are accurate but fail to scale to large datasets. Conversely, Expectation-Maximization (EM) methods scale better but often provide only "point estimates" rather than full probability distributions, and they struggle with high-dimensional data.

NeuralMJP addresses these limitations by providing a scalable, neural-based variational inference method. It is designed to handle noisy, irregularly sampled data while capturing the underlying continuous-time dynamics of the system.

Methodology

NeuralMJP integrates several modern deep learning techniques to bridge the gap between discrete jumps and continuous-time modeling:

  1. The Encoder (ODE-RNN): To process discrete-time observations, the model employs an ODE-RNN that runs backward in time. This creates a latent representation ($h_T$) that summarizes the entire history of the observed signal, effectively handling irregular sampling intervals.
  2. The Posterior (NeuralODE): The framework approximates the true posterior using an inhomogeneous MJP. The time-evolution of this process is governed by a "master equation" (a set of differential equations), which is solved forward in time using a NeuralODE solver. This allows the model to maintain a continuous-time representation of state probabilities.
  3. The Generative Prior: Rather than learning a single transition rate matrix directly—which can be numerically unstable—the authors use a generative neural network. This network maps Gaussian noise to valid transition rate matrices, stabilizing training and allowing the model to learn a distribution over possible models.
  4. Two-Step Optimization: To prevent "mode collapse," where the model might ignore certain states, a two-step training scheme is employed: first training the encoder-decoder pair, then updating the prior parameters to match the learned posterior.

Experimental Evaluation

The model was evaluated on four distinct datasets representing different physical and biological challenges:

  • Discrete Flashing Ratchet (DFR): A synthetic six-state physics model used to test the model's ability to handle both irregular and regular observation grids.
  • Switching Ion Channel Data: Real-world experimental data of a potassium channel switching between three permeability states (Top, Middle, Bottom).
  • Lotka-Volterra (Birth-Death): A classic ecological model of coupled predator-prey populations, representing interacting MJPs.
  • Alanine Dipeptide (ADP): A high-dimensional molecular dynamics simulation used as a benchmark for finding metastable states of a molecule.

Key Insights and Results

Eliminating Lag Times

In fields like molecular dynamics, researchers typically must choose an arbitrary "lag time" to discretize continuous data into a Markov model. NeuralMJP operates in continuous time, removing this hyperparameter and allowing the model to resolve dynamics that occur at multiple time scales simultaneously.

Parameter Recovery and Noise Handling

On the Lotka-Volterra and DFR datasets, NeuralMJP recovered ground-truth parameters (such as birth and death rates) significantly more accurately than classical variational baselines. In ion channel experiments, the model successfully filtered out high-frequency noise to identify the three underlying states, matching the performance of specialized switching diffusion models.

Molecular Discovery

For Alanine Dipeptide, NeuralMJP automatically identified the six well-known metastable states of the molecule from raw atomic coordinates. The resulting "Ramachandran plot" aligned with established chemical theory, demonstrating the model's capability in high-dimensional state discovery.

Predictive Power

Beyond fitting existing data, the model can forecast future jumps by simulating the learned prior process forward in time, providing a generative tool for longitudinal study.

Limitations and Future Work

While powerful, NeuralMJP has some limitations. The authors noted a slight bias where the model prefers fitting faster time scales over slower ones, likely a side effect of the Kullback-Leibler (KL) divergence used in the loss function. Additionally, training can be computationally expensive due to the reliance on NeuralODE solvers, with some models requiring over 40 hours of training on a GTX 1080 Ti. Future work may involve refining the quadrature methods used to calculate the variational bound to reduce bias and improve computational efficiency.

Summary updated

BibTeX
@inproceedings{seifner2023neural,
  author = {Patrick Seifner and Ramsés J. Sánchez},
  title = {{Neural Markov Jump Processes}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=ZtvnhohkVk},
}
Figure