Bayesian Basis Function Approximation for Scalable Gaussian Process Priors in Deep Generative Models

Mehmet Yiğit Balık, Maksim Sinelnikov, Priscilla Ong, Harri LähdesmäkiICML 2025

TL;DR

This paper introduces DGBFGP (Deep Generative Basis Function Gaussian Processes), a deep generative model that scales Gaussian Process (GP) priors to massive datasets. By replacing traditional kernel-based methods with a linear-time basis function approximation and ditching the standard "inducing points" approach in favor of a global parameterization, the authors eliminate the VAE "amortization gap." The resulting framework handles both continuous and discrete data with unprecedented speed, accuracy, and interpretability.

The Problem: The "Cubic Curse" and the Discrete Dilemma

Variational Autoencoders (VAEs) are the workhorses of generative modeling, but they typically assume data points are independent and identically distributed (iid). In the real world—such as with patient health records or economic trends—data is highly correlated over time and across subjects.

To capture these correlations, researchers often embed Gaussian Process (GP) priors within VAEs. However, GPs suffer from a "cubic curse": their computational cost grows at $\mathcal{O}(N^3)$, making them unusable for large datasets. While "inducing points" (a common approximation technique) bring this down to $\mathcal{O}(NM^2)$, they struggle with discrete variables like gender or patient ID because gradient-based optimization fails on non-continuous inputs. Furthermore, standard VAEs suffer from an amortization gap, where the neural network encoder fails to perfectly map inputs to the optimal latent space, limiting the model's overall accuracy.

Methods: Deep Generative Basis Function Gaussian Processes

To resolve these bottlenecks, the authors propose DGBFGP. Instead of calculating a massive covariance matrix (the kernel), they approximate the GP using a finite set of basis functions.

Overview of the DGBFGP framework, contrasting exact additive GPs with the proposed basis function approximation.

Key technical innovations include:

  1. Hilbert Space Approximation: For continuous variables (like time), the model uses a Fourier-based linear approximation. This turns the GP into a simple linear regression in a high-dimensional feature space, reducing computational complexity to linear time $\mathcal{O}(N)$.
  2. Mixed-Domain Additive Structure: The latent representation is modeled as a sum of distinct effects (e.g., $z = \text{Subject Effect} + \text{Time Effect} + \text{Group Effect}$). By performing an eigendecomposition of the categorical kernel matrix once upfront, the model handles exact GP modeling of discrete traits without relying on gradient-friendly hacks.
  3. Global Parameterization: Unlike standard VAEs that use an encoder to guess latent variables for every new point, DGBFGP learns global weights for the basis functions. This bypasses the encoder during inference for known subjects, effectively closing the amortization gap.
  4. Interpretability via Sobol Indices: Because the model is additive, the authors use Sobol indices to quantify exactly how much each covariate (e.g., age vs. disease status) contributes to the variance in the latent space.

Key Insights and Results

The model was evaluated on four distinct benchmarks: Rotated MNIST, Health MNIST (simulating longitudinal healthcare data), the Physionet Challenge 2012 (ICU patient records), and SPRITES (animated characters with complex categorical attributes).

  • Linear is the New Cubic: Shifting from kernels to basis functions achieves $\mathcal{O}(N)$ scaling, making GP-VAEs viable for previously untouchable datasets. In the Physionet experiment, DGBFGP was 6.5x faster per epoch than LVAE and significantly faster than SVGP-VAE (13.1s vs 80.7s).
  • Superior Accuracy: By closing the amortization gap, DGBFGP achieves higher predictive accuracy. On the Rotated MNIST interpolation task, DGBFGP achieved a Mean Squared Error (MSE) of 0.009, nearly half that of the next best model, L-NODE (0.017).
  • Latent Transparency: Usually, the latent space of a VAE is a "black box." DGBFGP changes this. Using Sobol indices, researchers can see exactly which features drive the latent representations.
Latent space interpretability via Sobol indices and MSE performance comparison against baseline models.
  • Better Generation: On the SPRITES dataset, DGBFGP was the only model able to accurately generate character images for "unseen" combinations of attributes (e.g., a specific hairstyle with a specific action it hadn't seen together in training).

Limitations and Future Work

While highly effective, the model's accuracy depends on the number of basis functions ($M$). While $M=10$ was sufficient for many tasks, extremely complex or non-smooth functions might require many more, increasing the memory footprint. Additionally, the current implementation relies on stationary kernels. Finally, because the model uses global parameters for subject IDs, it requires a small amount of fine-tuning (or a "semi-amortized" version) to generalize to completely unseen subjects.

Summary updated

BibTeX
@inproceedings{balk2025bayesian,
  author = {Mehmet Yiğit Balık and Maksim Sinelnikov and Priscilla Ong and Harri Lähdesmäki},
  title = {{Bayesian Basis Function Approximation for Scalable Gaussian Process Priors in Deep Generative Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=dewZTXKwli},
}
Figure