State Space Expectation Propagation: Efficient Inference Schemes for Temporal Gaussian Processes

William J. Wilkinson, Paul E. Chang, Michael Riis Andersen, Arno Solin

TL;DR

This paper introduces a unifying framework that reformulates approximate Bayesian inference for Gaussian Processes (GPs) as a state-space smoothing problem. By treating temporal GPs as stochastic differential equations, the authors demonstrate that modern techniques like Expectation Propagation (EP) and Variational Inference (VI) can be implemented as efficient Kalman smoothing passes. This achieves linear-time scaling ($O(n)$) without sacrificing the accuracy of state-of-the-art batch methods.

The Bottleneck in Gaussian Processes

Gaussian Processes are powerful tools for probabilistic modeling, but they suffer from two major limitations:

  1. Computational Complexity: Standard GPs scale cubically ($O(n^3)$) with the number of data points, making them computationally prohibitive for long time series or large datasets.
  2. Non-Gaussian Likelihoods: When data is non-Gaussian (e.g., binary classification or count data), exact inference becomes intractable. This requires approximations that are often computationally expensive or difficult to implement for temporal data.

While "state-space" methods (like Kalman filters) have long provided a way to make temporal GPs scale linearly ($O(n)$), there has been a conceptual gap between classical signal processing (Extended/Unscented Kalman Filters) and modern machine learning (Expectation Propagation, Variational Inference). This paper bridges that gap.

State Space Expectation Propagation (SSEP)

The authors propose State Space Expectation Propagation (SSEP), a framework that represents the GP prior as a linear-time-invariant Stochastic Differential Equation (SDE). This continuous-time representation allows the use of discrete-time Kalman filtering and smoothing for inference.

Forward filtering and backward smoothing passes on a 2D classification task.

Key technical contributions include:

  • EP as a Smoother: EP updates are formulated as "site" updates that occur sequentially during the forward and backward passes of a Kalman smoother.
  • Unifying Classical and Modern Methods: The authors prove that classical methods like the Extended Kalman Filter (EKF) and Unscented Kalman Filter (UKF) are specific cases of this EP framework where the "moment matching" step is replaced by linearization.
  • Iterated Linearization (EEP): They introduce "Extended Expectation Propagation" (EEP), which uses Taylor series expansions (like an EKF) but incorporates the "cavity distribution" from EP to significantly improve stability and accuracy.
  • Spatio-Temporal Scaling: By using "inducing points" for the spatial dimension, the $O(n)$ temporal scaling is extended to multi-dimensional problems.
  • JAX Implementation: The methods are implemented using JAX, leveraging Just-In-Time (JIT) compilation and hardware acceleration to process tens of thousands of data points in seconds.

Evaluated Datasets

The framework's versatility is demonstrated across seven diverse benchmark tasks:

  • Motorcycle: A classic heteroscedastic noise benchmark (133 points).
  • Coal Mining: Poisson count data of disasters (333 points).
  • Banana: A 2D classification task (400 points).
  • Binary: A synthetic 1D classification task (10,000 points).
  • Audio: A complex product-of-GPs model for speech analysis (22,050 points).
  • Airline: A large-scale Poisson log-Gaussian Cox process (35,959 points).
  • Rainforest: A massive spatio-temporal Poisson model of tree locations (125,000 points).

Key Insights

  • The Power of the Cavity: In EP, the "cavity distribution" represents the posterior without the current data point's influence. The authors show that linearizing around the cavity mean—rather than the prior or the full posterior—leads to more robust and accurate updates.
  • Linearization is EP: An elegant theoretical result is the realization that the classical EKF is essentially an EP algorithm with a specific power ($\alpha=1$) and a first-order Taylor approximation.
  • Stability through Sequentiality: Unlike batch EP, which can be unstable, the state-space formulation allows for controlled, sequential updates. EEP proved to be the only method stable enough to handle the complex site cross-covariances required for the Audio and Rainforest tasks.
  • Efficiency via JAX: By avoiding "unrolling" loops and using XLA-optimized linear algebra, sequential inference can outpace sparse batch methods on modern hardware.

Results and Performance

  • State-of-the-Art Accuracy: The proposed sequential methods matched or exceeded the performance of "gold standard" batch EP and Variational GP baselines across all small-scale tasks.
  • Massive Scalability: On the Rainforest dataset (125k points), the EEP method successfully generated a high-resolution 2D intensity map that would be computationally prohibitive for standard GP methods.
  • Speed: For the Airline task (~36k points), the marginal likelihood could be evaluated in roughly 24 seconds, proving its practical utility for hyperparameter optimization in large-scale temporal models.
  • Robustness: EEP performed exceptionally well on the Audio task, where it was the only method capable of maintaining full site cross-covariance terms without crashing.

Limitations and Future Work

While highly efficient, the authors note that Taylor-series-based linearization (like EKS/EEP) performs poorly on tasks with highly non-linear noise, such as the heteroscedastic Motorcycle task. In these cases, cubature-based methods (like UKF or Gauss-Hermite EP) remain necessary. However, cubature methods struggle to scale to very high-dimensional "sites" (e.g., when many GPs interact at a single point).

Future directions include exploring more complex spatio-temporal kernels, further optimizing the JAX implementation for even larger datasets, and applying this framework to general non-linear state estimation problems outside of GPs.

Summary updated

BibTeX
@inproceedings{wilkinson2020state,
  author = {William J. Wilkinson and Paul E. Chang and Michael Riis Andersen and Arno Solin},
  title = {{State Space Expectation Propagation: Efficient Inference Schemes for Temporal Gaussian Processes}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
}
Figure