Gaussian Process Regression in Logarithmic Time

Adrien Corenflos, Zheng Zhao, Simo Särkkä

Abstract

Gaussian Process (GP) regression is a cornerstone of probabilistic machine learning, yet its cubic scaling $O(N^3)$ with respect to the number of data points $N$ often renders it impractical for large-scale time-series. While state-space reformulations (SSGPs) reduce this complexity to $O(N)$ through sequential Kalman filtering, they fail to fully exploit the massive parallelism of modern GPUs. This paper presents Parallel State-Space Gaussian Processes (PSSGP), a method that achieves $O(\log N)$ time complexity by treating the Kalman filter as an associative operator. By leveraging parallel associative scans, PSSGP enables significant speedups and high-resolution predictions on large datasets.

Introduction

Gaussian Processes are prized for their ability to provide well-calibrated uncertainty estimates in regression tasks. However, the "naive" implementation requires inverting a covariance matrix, a process that scales cubically. Previous research addressed this by mapping GPs into a state-space framework, allowing for linear-time inference via Kalman filtering and smoothing.

Despite this improvement, $O(N)$ complexity remains a sequential bottleneck: time step $t$ must be processed before $t+1$. In the era of massively parallel hardware, the "span"—the longest chain of sequential dependencies—is the critical factor for performance. The authors propose breaking this sequential chain to reach $O(\log N)$ complexity, effectively parallelizing the temporal dimension of GP regression.

Methodology

The PSSGP approach integrates three core technical innovations:

  1. State-Space Reformulation: The GP is represented as a continuous-time stochastic differential equation (SDE). This transition allows the regression problem to be solved using the machinery of Kalman filters and smoothers.
  2. Parallel Associative Scan: The pivotal insight is that the Kalman filter update can be formulated as an associative operator. Much like a prefix-sum algorithm can compute the sum of a list in $O(\log N)$ time using a binary tree structure, the filtering steps can be combined in parallel across chunks of time.
  3. Numerical Stability and Flexibility: To handle real-world data, the authors extended the parallel scan to accommodate missing measurements (crucial for interpolation/prediction) and applied matrix balancing to transition matrices to prevent gradient instability during hyperparameter optimization.

Experimental Results

The researchers evaluated PSSGP against standard GP and sequential SSGP implementations across simulated data, sunspot activity records, and atmospheric CO2 concentrations.

Execution time comparison between standard GP, sequential SSGP, and the proposed PSSGP.

As illustrated in the scaling benchmarks, PSSGP's execution time remains remarkably flat as the number of data points increases, contrasting sharply with the linear growth of SSGP and the cubic growth of standard GP. On the Sunspot dataset ($N=3200$), PSSGP achieved a 10x speedup over standard GP and was 43x faster than the sequential state-space version.

Relative execution times for varying dataset sizes (N), with PSSGP as the baseline (1.0).

Furthermore, PSSGP demonstrated exceptional performance in high-resolution prediction. Interpolating 96,000 points on the Sunspot dataset took a mere 0.14 seconds, outperforming the sequential version by a factor of 30.

Discussion and Future Work

While PSSGP offers transformative speedups for large $N$, it faces a "dimensionality trap." The method scales efficiently with the number of time steps but poorly with the state dimensionality ($n_x$). For high-order periodic kernels, the computational overhead of large matrix multiplications within the parallel scan can diminish its advantages.

Future research directions include extending this parallel framework to non-linear state-space models (e.g., Parallel Extended or Unscented Kalman Filters) and exploring its application within Deep Gaussian Processes. Currently, the benefits are most pronounced on GPU hardware, where the algorithmic reduction in span can be fully realized.

Summary updated

BibTeX
@inproceedings{corenflos2022gaussian,
  author = {Adrien Corenflos and Zheng Zhao and Simo Särkkä},
  title = {{Gaussian Process Regression in Logarithmic Time}},
  booktitle = {FUSION},
  year = {2022},
  url = {https://openreview.net/forum?id=ErwypSMvfRV},
}
Figure