Markovian Gaussian Process Variational Autoencoders

Harrison Zhu, Carles Balsells Rodas, Yingzhen Li

Introduction

Modeling high-dimensional time series, such as video or climate data, is a core challenge in machine learning. Existing approaches generally fall into two camps: discrete-time models (like RNNs and VRNNs) and continuous-time models (like GPVAEs).

While discrete-time models are computationally efficient, they struggle with irregularly sampled data and often fail to capture long-term global properties like periodicity. Continuous-time models use Gaussian Processes (GPs) as priors, naturally handling irregular sampling and allowing for inductive biases (like smoothness or cycles) via kernel design. However, standard GPs suffer from a cubic computational cost ($O(T^3)$) relative to the number of time steps $T$, making them unusable for long sequences.

The Markovian Gaussian Process Variational Autoencoder (MGPVAE) bridges the gap between flexible GP priors and efficient state-space models. By leveraging the Markovian property of certain GP kernels, MGPVAE achieves linear-time complexity ($O(T)$) for training and inference, enabling high-dimensional, irregularly-sampled time series modeling that was previously computationally prohibitive.

Methodology: Bridging GPs and State-Space Models

The "secret sauce" of this paper is the Markovian GP. Many popular GP kernels, such as the Matérn family, can be rewritten as a linear Stochastic Differential Equation (SDE). This SDE has an equivalent discrete-time linear state-space representation.

MGPVAE Architecture

Key components of the MGPVAE framework include:

  • State-Space Prior: Instead of a standard GP, the latent variables are governed by a linear state-space model derived from the GP kernel.
  • Amortized Inference with Gaussian Sites: Because the decoder is a non-linear neural network, the posterior isn't naturally Gaussian. The authors use an encoder to produce "Gaussian sites"—essentially pseudo-observations in the latent space.
  • Kalman Filtering & Smoothing: Once the problem is framed as a linear state-space model with Gaussian sites, classical Kalman filtering and Rauch-Tung-Striebel (RTS) smoothing can be used to compute the posterior in $O(T)$ time.
  • Spatiotemporal Extension: The model is extended to handle data with both time and space dimensions by using separable kernels (a spatial kernel multiplied by a temporal Markovian kernel).

Experimental Evaluation

The authors evaluated MGPVAE on three distinct tasks to test its scalability, predictive power, and ability to handle complex dynamics:

  1. Rotating MNIST: Sequences of 100 frames where digits rotate, testing the model's ability to handle periodic dynamics and impute missing or corrupted frames.
  2. Mujoco Hopper: Physical simulation data (14 dimensions) with complex non-linear dynamics.
  3. ERA5 Climate Data: High-dimensional spatiotemporal data including temperature and surface pressure, serving as a real-world test for geographic scalability.

Key Insights and Results

  • Inductive Bias Matters: By choosing specific kernels (like Matérn-3/2), the model "knows" the data should be smooth. This allows it to outperform RNN-based models (VRNN, KVAE) which have to learn these properties from scratch.
  • Linear Scalability: Unlike previous GPVAE methods that rely on sparse approximations (inducing points), MGPVAE is exact with respect to the Markovian GP and scales linearly. This allows it to handle sequences of $T=1000$ easily, where others might run out of memory or become too slow.
  • Handling Irregularity: Because the underlying model is an SDE, the time gap between observations ($\Delta t$) is just a parameter in the transition matrix. This makes missing data imputation a natural part of the filtering process rather than a special case.
Reconstruction Comparison on Rotating MNIST

On the Rotating MNIST dataset, MGPVAE significantly outperformed VRNN and KVAE in both Negative Log-Likelihood (NLL) and RMSE, especially for missing frame imputation. Visually, MGPVAE produces much sharper and more accurate reconstructions. In the Mujoco experiments, MGPVAE achieved better predictive performance than Sparse GPVAEs (SVGPVAE) while being significantly faster and more memory-efficient. Furthermore, on the ERA5 climate dataset, MGPVAE-8 (8 latent channels) achieved a much lower NLPD (-0.3070) compared to Sparse Variational GP baselines, which struggled with the high dimensionality.

Limitations and Future Work

While powerful, the method requires kernels that admit a Markovian representation. This includes the popular Matérn family but excludes the commonly used Squared Exponential (RBF) kernel, though RBF can be approximated by high-order Markov processes.

Additionally, the model relies on a Gaussian-site approximation for the likelihood. While effective in these experiments, this might be a bottleneck for extremely non-Gaussian data (e.g., discrete counts or heavy-tailed distributions). Future directions include exploring parallel filtering techniques to further speed up computation on modern hardware and applying the model to broader forecasting tasks.

Summary updated

BibTeX
@inproceedings{zhu2023markovian,
  author = {Harrison Zhu and Carles Balsells Rodas and Yingzhen Li},
  title = {{Markovian Gaussian Process Variational Autoencoders}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=Z8QlQ207V6},
}
Figure