Amortized Variational Deep Kernel Learning

Alan L. S. Matias, César Lincoln Mattos, João Paulo Pordeus Gomes, Diego MesquitaICML 2024

Introduction

Deep Kernel Learning (DKL) marries the robust uncertainty quantification of Gaussian Processes (GPs) with the representational power of Deep Neural Networks (DNNs). By using a DNN as a feature extractor before passing data into a GP kernel, DKL aims to scale Bayesian methods to high-dimensional data like images.

However, training DKL is notoriously challenging and often leads to severe overfitting. Because the DNN parameters are typically optimized via maximum marginal likelihood rather than treated as Bayesian, the optimizer can manipulate them to project all input points into a configuration that makes them appear highly correlated. This "hacks" the complexity penalty term of the marginal likelihood, leading to "non-local" kernels that create spurious correlations between unrelated parts of the input space.

As illustrated below, standard stochastic DKL (SVDKL) produces a messy, non-local covariance matrix, losing the smooth, localized structure characteristic of a standard GP.

Comparison of prior covariance matrices: SVGP (smooth), AVDKL (localized), and SVDKL (spurious non-local correlations).

To remedy this issue, this paper introduces Amortized Variational Deep Kernel Learning (AVDKL), a novel architecture that uses a parameter-sharing scheme to tie representation learning to amortized inducing points, forcing the model to balance data fit with complexity.

Methodology: AVDKL

AVDKL introduces key architectural changes to standard DKL to prevent the neural network from hacking the kernel:

  1. Amortized Inducing Points: Instead of learning a fixed set of global "inducing points" (the sparse landmarks GPs use to scale to large datasets), AVDKL uses an amortization network to predict input-dependent variational parameters.
  2. Parameter Sharing: Crucially, the feature extractor used for the kernel and the amortization network share the same parameters. This imposes an explicit dependency between the "model fit" part of the objective function (the Evidence Lower Bound, or ELBO) and the "capacity/complexity" part (the KL divergence).
  3. Saturation Module: To prevent the model from making wild predictions in regions devoid of data, a "saturation" layer (using Tanh or Sigmoid) is added to the amortization path. This ensures that for distant points, the model reverts to a sensible prior rather than extrapolating poorly.

The schematic differences between these architectures highlight how AVDKL couples the feature extractor ($g$) with the inducing variables ($u$).

Schematic dependencies of AVDKL vs SVDKL and IDSGP. Note the shared path from 'g' to the inducing variables 'u' in AVDKL.

By tying the inducing points to the local embeddings, the model is forced to maintain local smoothness. Any attempt by the neural network to "hack" the features to artificially inflate correlations is immediately penalized by the KL divergence term in the ELBO. This creates a natural regularization mechanism that prevents overfitting.

Experiments and Key Results

The authors evaluated AVDKL across three distinct domains: tabular data (UCI repository), graph data (citation networks like Cora, CiteSeer, PubMed), and image data (CIFAR10/100).

  • Tabular Superiority: AVDKL achieved the best (lowest) Mean Negative Log-Likelihood (MNLL) in 5 out of 6 tabular datasets, demonstrating particularly strong gains in regression tasks.
  • Image Classification Performance: On CIFAR100 using a ResNet-18 backbone, AVDKL reached 80.13% accuracy, outperforming both standard SVDKL (79.92%) and a standalone ResNet-18 (79.50%). It also significantly improved the MNLL (0.7755 vs. 0.8510 for SVDKL), indicating better predictive distributions.
  • Reliable Uncertainty: Across almost all tests, AVDKL showed a lower Expected Calibration Error (ECE). This means the model's confidence scores align closely with its actual accuracy, making it much more trustworthy for real-world deployment than standard DKL.
  • Training Stability: AVDKL demonstrated much more stable training curves compared to SVDKL, which often fluctuates or collapses as it attempts to over-correlate points.

Limitations and Future Work

While AVDKL successfully mitigates the spurious correlation problem in DKL, it introduces new dynamics. For instance, in graph node classification tasks, the authors noted a trade-off: increasing the number of inducing points improved the MNLL (better uncertainty quantification) but could slightly degrade raw accuracy. Finding the optimal balance remains an empirical challenge.

Furthermore, while AVDKL is more scalable than exact GPs, the addition of an amortization network adds computational overhead compared to a simple MLP or ResNet. However, the authors demonstrate it remains highly competitive in training time per epoch. Future directions include exploring more sophisticated saturation modules and extending this amortized, parameter-sharing approach to other kernel-based models.

Summary updated

BibTeX
@inproceedings{matias2024amortized,
  author = {Alan L. S. Matias and César Lincoln Mattos and João Paulo Pordeus Gomes and Diego Mesquita},
  title = {{Amortized Variational Deep Kernel Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=MSMKQuZhD5},
}
Figure