Log-Linear-Time Gaussian Processes Using Binary Tree Kernels

Michael K. Cohen, Samuel Daulton, Michael A. Osborne

Gaussian Processes (GPs) are the "gold standard" for probabilistic regression, offering elegant uncertainty estimates and high-quality predictions. However, they have a notorious Achilles' heel: computational complexity. Standard GPs scale cubically ($O(n^3)$) with the number of data points, effectively hitting a wall once you move beyond a few thousand samples.

In their NeurIPS 2022 paper, Michael K. Cohen and colleagues introduce a clever workaround: the Binary Tree Kernel. By reimagining how we measure similarity between data points, they achieve log-linear time complexity, allowing GPs to handle millions of data points on a single GPU in seconds.

The Bottleneck in Traditional GPs

The fundamental bottleneck in GP regression is the inversion (or Cholesky decomposition) of the $n \times n$ kernel matrix. While "inducing point" methods (like SGPR or SVGP) reduce this cost by using a small set of $z$ representative points, they create a trade-off: to keep the math fast, you must limit the dimensionality of the model's Hilbert space to $z$. This often results in "blurry" or under-expressive models that miss fine-grained patterns in the data.

The challenge is to find a kernel that is highly expressive (high-dimensional) but possesses a mathematical structure that allows for ultra-fast inversion.

The Binary Tree Kernel

The authors' core innovation is the Binary Tree Kernel, which fundamentally changes how covariance is calculated.

Binary tree structure with data points at the leaves.

Here is how the method works:

  1. Binary Mapping: Every data point $x$ is converted into a binary string (e.g., through bit expansion of its coordinates). These strings represent paths down a binary tree.
  2. The Kernel Function: The similarity (covariance) between two points is defined by how many leading bits they share. In tree terms, the kernel depends only on the depth of their Deepest Common Ancestor (DCA). If two points diverge at the very first bit, their covariance is low; if they share a long prefix, it is high.
  3. Sparse Rank One Sum (SROS): The authors show that the resulting kernel matrix can be represented as a sum of sparse, rank-one matrices. This is a specific form of a hierarchical matrix.
  4. Fast Inversion: Because of this SROS structure, the authors developed an algorithm to approximately invert the matrix in $O(n)$ time using a recursive application of the Sherman-Morrison formula.

Crucially, they also optimize the bit order—deciding which features or bits should appear higher in the tree—to maximize the likelihood of the training data.

Key Insights and Ideas

  • Exponential Expressivity: Unlike inducing point methods where the rank is fixed to $z$, the binary tree kernel's Hilbert space dimensionality is $2^q$ (where $q$ is the tree depth). This means the model can represent much more complex functions without a corresponding explosion in compute time.
  • Logarithmic Speedup: The transition from quadratic/cubic time to log-linear time is an "exponential speedup" relative to the dimension of the Hilbert space.
  • Piecewise-Flat Posteriors: A unique property of this kernel is that the resulting posterior mean function is piecewise-flat.
Piecewise-flat posterior mean of the binary tree GP.

While this sounds like a limitation, the "pieces" can be so small that the function appears smooth at a macro level, similar to how a high-resolution digital image looks continuous despite being made of discrete pixels.

  • Structure over Distance: Traditional kernels (like RBF or Matérn) rely on Euclidean distance. The binary tree kernel relies on hierarchical structure, which can sometimes capture data relationships that distance-based kernels miss.

Key Results

The method was evaluated on a standard suite of 12 regression benchmarks from the UCI machine learning repository, ranging from small datasets to large ones like HouseElec (~1.3 million points).

  • Predictive Performance: On the UCI suite, the Binary Tree Ensemble (BTE) achieved the best Negative Log Likelihood (NLL) on 6 out of 12 datasets, often outperforming both sparse methods and the "exact" Matérn GP.
  • Speed: On the largest dataset (HouseElec, 1.3M points), the binary tree GP was the fastest method tested. It could sort the data and compute the NLL in roughly 2 seconds on a single GPU.
  • Scalability: While exact Matérn GPs struggled or required massive distributed resources for the largest tasks, the BT kernel scaled gracefully, maintaining linear memory usage.

Limitations and Future Work

Despite its speed, the method has a few notable limitations:

  • Optimization Hurdles: Because the posterior mean is piecewise-flat, its gradient is zero almost everywhere. This makes the kernel unsuitable for Bayesian Optimization, which relies on gradient-based acquisition function maximization.
  • Bit-Ordering Sensitivity: The model's performance depends heavily on how features are mapped to the tree. While the authors provide an optimization strategy, finding the "optimal" tree structure remains a complex task.
  • Smoothness: If a problem strictly requires a high-order differentiable (very smooth) solution, the piecewise-flat nature of the BT kernel might be a drawback compared to a Matérn kernel.

The authors suggest that future work could involve "softening" the tree boundaries to allow for smoother transitions and exploring different tree construction logic beyond simple bit-permutation.

Summary updated

BibTeX
@inproceedings{cohen2022log,
  author = {Michael K. Cohen and Samuel Daulton and Michael A. Osborne},
  title = {{Log-Linear-Time Gaussian Processes Using Binary Tree Kernels}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=ZXTMtSCrVE},
}
Figure