Differentiable Compositional Kernel Learning for Gaussian Processes

Shengyang Sun, Guodong Zhang, Chaoqi Wang, Wenyuan Zeng, Jiaman Li, Roger B. Grosse

TL;DR

The Neural Kernel Network (NKN) transforms the "dark art" of selecting Gaussian Process (GP) kernels into a differentiable optimization problem. By structuring a neural network such that every unit represents a valid kernel, the authors create a flexible, end-to-end trainable model that is orders of magnitude faster than discrete search methods while remaining universal for stationary kernels.

The Challenge of Kernel Selection

Gaussian Processes are beloved for their ability to provide explicit uncertainty estimates, but their performance lives or dies by the kernel function. The kernel defines the "shape" of the data—whether it’s smooth, periodic, or linear.

Traditionally, researchers either picked a simple kernel (like RBF) by hand or used "Automatic Statisticians" that performed a slow, greedy search over a grammar of kernel compositions (e.g., $Periodic \times Linear + RBF$). These discrete searches are computationally expensive, often taking hours for simple time series. The challenge was to find a way to explore this vast space of compositional kernels efficiently using gradient-based optimization.

Introducing the Neural Kernel Network (NKN)

The authors introduce the NKN to address this bottleneck. Unlike a standard neural network that processes data points, the NKN processes kernels.

NKN Architecture
  1. Primitive Layer: The input layer consists of basic kernel families (RBF, Periodic, Linear, Rational Quadratic). Each has its own trainable hyperparameters (like lengthscales).
  2. Compositional Layers: Subsequent layers alternate between:
  3. Linear Layers: Compute non-negative weighted sums of kernels (representing an "OR" operation).
  4. Product Layers: Compute products of kernels (representing an "AND" operation).
  5. Validity: Because the space of kernels is closed under addition and multiplication, every single unit in this network is guaranteed to be a mathematically valid kernel.
  6. Training: Because the entire structure is differentiable, the network weights and the kernel hyperparameters are optimized simultaneously by maximizing the Log Marginal Likelihood using standard gradient descent.

Key Insights and Performance

The NKN effectively "softens" the discrete grammar used by previous automatic systems. Instead of deciding whether to add or multiply, the network learns the weights of these operations. The authors prove that the NKN is a universal approximator for the class of stationary kernels. Furthermore, allowing hidden units to represent complex-valued kernels allows for much more compact representations of spectral mixture kernels.

Speed and Extrapolation

A major advantage of NKN is its efficiency and predictive power. On the Airline passenger volume dataset, the NKN reached a solution in just 201 seconds, compared to 6,147 seconds for the discrete search-based Automatic Statistician—a ~30x speedup.

NKN Time Series Extrapolation

While many models can interpolate (fill in gaps), NKN excels at extrapolation (predicting the future) because it can discover underlying structural patterns like "periodic growth."

Broad Applicability

The NKN was evaluated across a diverse range of tasks, consistently outperforming standard RBF and Spectral Mixture (SM) kernels:

  • UCI Regression Benchmarks: Achieved superior RMSE and log-likelihood across 8 standard datasets (e.g., Boston Housing, Concrete).
  • Texture Images: Successfully reconstructed missing patches of complex 2D patterns where simple RBF kernels produced only blurry blobs.
  • Bayesian Optimization: Exploited additive structures in high-dimensional synthetic benchmarks (like Styblinski-Tang), converging to global optima faster than standard GP models.

Limitations and Future Work

  • GP Scaling: While the NKN itself is fast, the underlying Gaussian Process still requires inverting a kernel matrix, which scales cubically ($O(N^3)$) with the number of data points. Combining NKN with sparse GP methods is necessary for larger datasets.
  • Architecture Search: While the weights are learned, the "depth" and "width" of the NKN (the number of linear/product layers) remain hyperparameters that need to be set by the user.
  • Deep Kernel Learning Integration: A promising future direction is combining NKN (which learns the kernel structure) with Deep Kernel Learning (which learns a non-linear mapping of the input data).

Summary updated

BibTeX
@inproceedings{sun2018differentiable,
  author = {Shengyang Sun and Guodong Zhang and Chaoqi Wang and Wenyuan Zeng and Jiaman Li and Roger B. Grosse},
  title = {{Differentiable Compositional Kernel Learning for Gaussian Processes}},
  booktitle = {International Conference on Machine Learning},
  year = {2018},
  url = {https://openreview.net/forum?id=S1-rG3bOZr},
}
Figure