Foundation Inference Models for Markov Jump Processes

David Berghaus, Kostadin Cvejoski, Patrick Seifner, César Ojeda, Ramsés J. Sánchez · OpenReview

Abstract

Markov jump processes (MJPs) are continuous-time stochastic processes which describe dynamical systems evolving in discrete state spaces. These processes find wide application in the natural sciences and machine learning, but their inference is known to be far from trivial. In this work we introduce a methodology for zero-shot inference of Markov jump processes (MJPs), on bounded state spaces, from noisy and sparse observations, which consists of two components. First, a broad probability distribution over families of MJPs, as well as over possible observation times and noise mechanisms, with which we simulate a synthetic dataset of hidden MJPs and their noisy observation process. Second, a neural network model that processes subsets of the simulated observations, and that is trained to output the initial condition and rate matrix of the target MJP in a supervised way. We empirically demonstrate that one and the same (pretrained) model can infer, in a zero-shot fashion, hidden MJPs evolving in state spaces of different dimensionalities. Specifically, we infer MJPs which describe (i) discrete flashing ratchet systems, which are a type of Brownian motors, and the conformational dynamics in (ii) molecular simulations, (iii) experimental ion channel data and (iv) simple protein folding models. What is more, we show that our model performs on par with state-of-the-art models which are finetuned to the target datasets.

Introduction

Many natural and artificial systems, ranging from molecular conformational changes to economic fluctuations, are characterized by discrete transitions occurring at random intervals. These are formally described as Markov Jump Processes (MJPs). Inferring the underlying dynamics—specifically the rate matrix governing transition speeds and the initial state distribution—from noisy and sparse observations is a fundamental challenge. Traditional inference methods like Markov Chain Monte Carlo (MCMC) or Expectation-Maximization (EM) are computationally expensive, require expert tuning, and must be re-executed from scratch for every new dataset.

Methodology: The Foundation Inference Model (FIM)

The proposed Foundation Inference Model (FIM) shifts the paradigm from iterative fitting to amortized, zero-shot inference. The approach relies on two pillars: massive synthetic pretraining and a flexible neural architecture.

Synthetic Pretraining

The authors generated a dataset of 45,000 MJPs using a broad prior distribution over rate matrices, observation grids, and noise levels. This diversity ensures the model encounters a wide range of dynamical behaviors during training, allowing it to learn the underlying mathematical structure of MJPs without having the Master Equation hard-coded into its architecture.

Model Architecture

The FIM architecture is designed to handle variable-length sequences and multiple realizations of a process. It treats smaller systems as sub-blocks of a maximum supported state space (currently $C=6$).

The Foundation Inference Model (FIM) architecture, showing the path encoder and output heads for rate matrix and initial state prediction.

The model consists of:

  1. Path Encoder: A BiLSTM or Transformer that embeds individual time-series observations.
  2. Learnable Query Attention: An aggregation mechanism that pools embeddings from multiple paths into a global representation, allowing the model to handle a variable number of observations.
  3. Output Heads: Specialized layers that predict the rate matrix ($\hat{\mathbf{F}}$), its associated uncertainty ($\text{Var } \hat{\mathbf{F}}$), and the initial state distribution ($\hat{\pi}_0$).

To accommodate varying time scales, the model employs a rescaling trick, normalizing input times to a $[0, 1]$ interval and adjusting predicted rates accordingly.

Experimental Evaluation

The FIM was evaluated across diverse domains, demonstrating its ability to generalize without task-specific fine-tuning. A key strength is its robustness; the model remained accurate even when 10% of the state labels in the input data were intentionally corrupted.

  • Discrete Flashing Ratchet (DFR): In this physics-based model of Brownian motors, FIM accurately recovered parameters ($V=1.11$ vs $1.00$ ground truth) and estimated complex thermodynamic quantities like entropy production across unseen potential values.
  • Molecular Dynamics: For Alanine Dipeptide (ADP), the model correctly identified relaxation time scales, matching the performance of specialized tools like VampNets.
  • Biological Data: The model successfully processed experimental ion channel data (KcvMT35), inferring the underlying state transitions from noisy current measurements.
Experimental ion channel data showing noisy current measurements (blue) and the inferred hidden state transitions (black).

Discussion and Conclusion

The FIM demonstrates that inference for MJPs can be treated as a supervised learning problem. By learning from synthetic data, the model achieves zero-shot performance on real-world systems, matching state-of-the-art specialized models. While currently limited to state spaces of size $C \leq 6$, the framework is extensible. Future work will explore larger state spaces, birth-and-death processes, and more complex prior distributions to further broaden the model's applicability to "glassy" systems and other complex physical phenomena.

Summary updated

BibTeX
@inproceedings{berghaus2024foundation,
  author = {David Berghaus and Kostadin Cvejoski and Patrick Seifner and César Ojeda and Ramsés J. Sánchez},
  title = {{Foundation Inference Models for Markov Jump Processes}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=f4v7cmm5sC},
}
Figure