Why not to use the Gaussian kernel

Toni Karvonen, Chris J. OatesarXiv 2026

TL;DR

The Gaussian kernel (or squared exponential) is the default choice in most Gaussian process software, but this paper argues it should be avoided entirely. Because it assumes extreme, unrealistic smoothness (analyticity), it suffers from catastrophic overconfidence in uncertainty quantification and severe numerical ill-conditioning. Instead, practitioners should default to finitely smooth alternatives like the Matérn kernel.

What Problem Does This Paper Address?

Gaussian process (GP) regression relies heavily on a choice of a kernel function to define similarity between points. For decades, the Gaussian kernel (also known as the radial basis function or squared exponential kernel) has been the default choice in popular machine learning libraries like scikit-learn and GPy.

The authors address a fundamental flaw stemming from this choice: the Gaussian kernel is "analytic," meaning it is infinitely smooth and its global behavior is completely determined by its local properties. This mathematical property leads to two severe practical failures:

  1. Overconfident uncertainty quantification: It drastically underestimates prediction uncertainty outside the immediate vicinity of training data.
  2. Numerical ill-conditioning: It produces kernel matrices that are so numerically unstable that they cannot be inverted stably without arbitrary "tricks" like adding a nugget term.

Methods

The authors build a rigorous mathematical case against the Gaussian kernel using the framework of Reproducing Kernel Hilbert Spaces (RKHS) and spectral analysis. They derive explicit bounds on the conditional variance using classical polynomial interpolation error estimates.

By examining the spectral density (the Fourier transform of the kernel), they show that any stationary kernel whose spectral density decays exponentially or faster inherits these same pathological flaws. To bridge the gap between smooth and well-behaved kernels, they introduce Gevrey kernels to the GP literature—kernels that are infinitely differentiable but non-analytic, avoiding the brittle behavior of the Gaussian.

Datasets

Not discussed in the paper. The paper relies entirely on theoretical proofs and synthetic, low-dimensional mathematical illustrations rather than empirical datasets.

Key Insights and Ideas

  • Local Info is Global Info: Because the Gaussian kernel is analytic, a GP using it assumes that knowing a function's behavior in a tiny neighborhood perfectly determines it everywhere. This causes the predictive variance to collapse to zero even in large, unobserved regions of the domain.
  • The Smoothness Trap: We often think "smoother is better," but infinite smoothness (analyticity) is a curse here. Finitely smooth kernels (like Matérn-3/2 or Matérn-5/2) behave much more naturally because their variance increases rapidly as you move away from data.
  • Nuggets are a Band-Aid, Not a Cure: Software packages routinely add a small "nugget" term (noise variance) to make Gaussian kernel matrices invertible. The authors argue it is counterproductive to choose a model that is fundamentally unstable and then force a modification just to make it run.
  • Gevrey Kernels as an Alternative: If you absolutely need infinite differentiability, you don't have to use an analytic kernel. Gevrey kernels decay sub-exponentially in the spectral domain, meaning they are infinitely smooth but do not suffer from global variance collapse.

Key Results

  • Factorial Variance Decay: Theorems 3.1 and 3.2 prove that for the Gaussian kernel, the conditional variance decays at a factorial rate across the entire domain, regardless of where the input points are placed (as long as they contain a grid-like structure).
  • Super-Exponential Ill-Conditioning: The condition number of the Gaussian kernel matrix blows up super-exponentially. As shown in Figure 3, double-precision arithmetic fails to resolve the matrix inversion with as few as $n = 8$ points.
Condition number blow-up
  • Visualizing the Collapse: Figure 2 clearly illustrates how the conditional variance for the Gaussian kernel remains near zero in regions completely devoid of data, whereas Matérn kernels show the expected healthy growth in uncertainty.
Conditional variance comparison

Limitations and Future Work

The authors acknowledge that their critique is focused strictly on Gaussian processes and spatial statistics. In other paradigms, such as Support Vector Machines (SVMs), the Gaussian kernel can be rate-adaptive and highly effective.

A practical limitation is that Gevrey kernels are mathematically complex and rarely available in closed form for dimensions $d > 1$, requiring the use of product kernels.

Future research directions include optimizing the exponential terms in their bounds using advanced tools from harmonic analysis and exploring the implications of these findings for deep kernel learning architectures (e.g., suggesting that it may be best to avoid analytic activation functions like the swish function).

Summary updated

BibTeX
@misc{karvonen2026why,
  author = {Toni Karvonen and Chris J. Oates},
  title = {{Why not to use the Gaussian kernel}},
  year = {2026},
  eprint = {2608.26974},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.26974},
}
Figure