Variational Inference for Continuous-Time Switching Dynamical Systems

Lukas Köhs, Bastian Alt, Heinz Koeppl

Introduction

This paper introduces the first variational inference (VI) framework designed specifically for continuous-time switching dynamical systems. By approximating complex, intractable posterior distributions with a structured mixture of Gaussian Processes, the authors enable efficient latent state estimation and parameter learning for systems that switch between different continuous behaviors.

The Challenge of Hybrid Systems

Many real-world systems are inherently "hybrid." From ion channels in biology to regime-switching volatility in finance, these systems consist of discrete modes (e.g., a protein changing shape) that dictate continuous dynamics (e.g., the flow of electric current).

A continuous-time switching dynamical system featuring a discrete Markov Jump Process (blue) modulating a continuous diffusion process (green) with irregular observations (red crosses).

While discrete-time models like Switching Linear Dynamical Systems (SLDS) are popular, they struggle with irregularly sampled data and require a fixed time discretization that often fails to capture the underlying physics. Continuous-time analogs, known as Switching Stochastic Differential Equations (SSDEs), offer a more natural representation but are mathematically daunting. Performing "inference"—figuring out the hidden states and modes from noisy observations—requires solving high-dimensional Partial Differential Equations (PDEs) that are computationally impossible for all but the simplest toy problems.

Continuous-Time Variational Inference

To sidestep the "curse of dimensionality" inherent in exact solutions, the authors propose a novel continuous-time variational inference algorithm.

  1. The Model: The system is defined such that a Markov Jump Process (MJP) controls the discrete "mode," and each mode governs its own continuous diffusion process via a Stochastic Differential Equation (SDE).
  2. Variational Approximation: Instead of attempting to solve for the exact posterior, the authors approximate it using a structured mean-field ansatz. They assume the joint posterior can be factorized into a discrete mode distribution and a mode-conditioned continuous state distribution.
  3. Mixture of GPs: By constraining the continuous part of the approximation to follow a linear variational drift, the approximation effectively becomes a mixture of Gaussian Processes (GPs), which are significantly more tractable to compute.
  4. Optimization: The best approximation is found by minimizing the path-wise Kullback-Leibler (KL) divergence. This yields a set of "forward-backward" Ordinary Differential Equations (ODEs) for Lagrange multipliers, solved iteratively.
  5. Parameter Learning: A Variational Expectation Maximization (VEM) scheme is employed to estimate unknown system parameters, such as transition rates between modes or noise characteristics.

Experimental Validation & Key Insights

The framework was evaluated across several benchmarks, including synthetic 1D/2D data (like multi-well potentials to test meta-stable state identification), complex latent dynamics mimicking robotics movement primitives, and real-world biological data from viral ion channel recordings.

A key insight from these experiments is that meta-stability is an advantage. The approximation is most accurate when the system stays in a specific mode for a while before jumping. Because this "meta-stability" is common in physical and biological systems, the GP-mixture approximation proves highly effective in practice. Furthermore, the framework is unifying: removing the switching recovers standard GP approximations for SDEs, while removing the diffusion recovers standard inference for MJPs. Crucially, formulating the model in continuous time allows it to handle observations arriving at arbitrary, irregularly spaced time points without artificial data binning.

Key Results

Inference results showing the true vs. inferred discrete states (top/middle) and the reconstructed continuous state trajectory with uncertainty (bottom heatmap).
  • Trajectory Reconstruction: In synthetic tests, the algorithm faithfully reconstructed latent paths and identified mode transitions, even when the ground truth was highly non-linear.
  • Parameter Identification: The VEM scheme successfully recovered hidden system parameters, such as set points and transition rates, with high accuracy.
  • Biological Discovery: Applied to ion channel data, the model successfully filtered out amplifier noise and identified three distinct channel conformations, offering a physically plausible interpretation of the experimental recordings.
  • Efficiency: By utilizing ODE solvers instead of PDE solvers, the method scales linearly with the number of observations, making it highly practical for real-world time-series analysis.

Limitations and Future Work

While a significant step forward, the current ODE-based approach still faces scaling challenges when the number of discrete modes or the dimensionality of the continuous state becomes very large. Additionally, the current parameter learning (VEM) provides point estimates; future work could move toward a "fully Bayesian" framework that accounts for parameter uncertainty. Finally, in regions where the system switches modes very rapidly, the "mixture of GPs" assumption can lead to slight transition artifacts. Future iterations may require more flexible variational distributions to handle these high-ambiguity regions.

Summary updated

BibTeX
@inproceedings{kohs2021variational,
  author = {Lukas Köhs and Bastian Alt and Heinz Koeppl},
  title = {{Variational Inference for Continuous-Time Switching Dynamical Systems}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=ake1XpIrDKN},
}
Figure