NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Kernel Quantile Embeddings and Associated Probability Metrics

Masha Naslidnyk, Siu Lun Chau, Francois-Xavier Briol, Krikamol Muandet

Abstract

This paper introduces Kernel Quantile Embeddings (KQEs), a novel framework for representing probability distributions in Reproducing Kernel Hilbert Spaces (RKHS) using quantiles rather than means. By shifting the focus from mean-based representations to directional quantiles, the authors derive a new family of probability metrics known as Kernel Quantile Discrepancies (KQDs). These metrics offer a "near-linear" computational complexity of $O(n \log^2 n)$, making them significantly more efficient than the standard quadratic-time Maximum Mean Discrepancy (MMD). Furthermore, KQEs are shown to be more expressive, capable of distinguishing distributions that share identical moments, and provide a theoretical bridge to Sliced Wasserstein distances.

1. Introduction

Comparing probability distributions is a fundamental task in machine learning, essential for applications ranging from generative modeling to distribution shift detection and two-sample hypothesis testing. For over a decade, the Kernel Mean Embedding (KME) and its associated metric, the Maximum Mean Discrepancy (MMD), have served as the standard approach. MMD operates by mapping data into a high-dimensional RKHS and comparing the means of these feature maps.

Despite its elegance, MMD faces two primary challenges. First, the "mean" is a limited statistic; two distinct distributions can share the same mean in the RKHS, rendering them indistinguishable unless a specific characteristic kernel is employed. Second, the standard MMD estimator scales quadratically ($O(n^2)$) with the number of samples, which is computationally prohibitive for large-scale modern datasets. This research proposes Kernel Quantile Embeddings (KQEs) as a robust, expressive, and computationally efficient alternative.

2. Kernel Quantile Embeddings (KQEs)

2.1 The Core Framework

Rather than averaging feature maps to find a central point, KQEs utilize "directional quantiles" within the RKHS. The method involves projecting high-dimensional feature maps onto various directions in the Hilbert space and computing the quantiles of these projections. By aggregating these quantile differences across a set of directions, the authors define the Kernel Quantile Discrepancy (KQD).

2.2 Gaussian e-KQD and Efficiency

To make this framework practical for infinite-dimensional spaces, the authors introduce the Gaussian e-KQD. This algorithm samples directions from a Gaussian measure on the RKHS. By leveraging order statistics (sorting) and Monte Carlo sampling, the computational complexity is reduced to $O(n \log^2 n)$. This near-linear scaling allows KQDs to handle large datasets where standard MMD would fail, while remaining competitive with existing fast MMD approximations.

2.3 Theoretical Connections

A significant theoretical contribution of this work is the link between KQDs and Sliced Wasserstein (SW) distances. The authors prove that KQDs generalize SW distances; specifically, when a linear kernel is used, the e-KQD recovers the expected Sliced Wasserstein distance. This provides a unified perspective on kernel-based and optimal transport-based metrics.

3. Theoretical Advantages: Quantile-Characteristic Kernels

The paper establishes that the conditions required for a kernel to be "quantile-characteristic"—meaning the embedding uniquely identifies the distribution—are weaker than the conditions required for a kernel to be "mean-characteristic." This theoretical result implies that KQEs can distinguish between complex distributions that share the same moments, which would otherwise be invisible to MMD-based tests.

4. Experimental Evaluation

4.1 Synthetic Moment Matching

To test the expressiveness of KQEs, the authors compared Gaussian and Laplace distributions designed to have identical first and second moments. In this scenario, MMD-based methods (using polynomial kernels) performed no better than random guessing (rejection rate ~0.05). In contrast, KQD-based methods achieved a rejection rate of 1.0 as the sample size increased, successfully identifying the structural differences in the distributions' tails.

4.2 High-Dimensional Real-World Data

The framework was further validated on high-dimensional datasets:

  • Galaxy MNIST: 12,288-dimensional images of galaxies.
  • CIFAR-10 vs. CIFAR-10.1: A benchmark for distribution shift detection in 3,072-dimensional image data.

In the "Power-decay" experiments, e-KQD maintained high detection power as dimensionality increased, significantly outperforming "MMD-Multi" (a common fast MMD approximation) under the same computational budget. On the CIFAR-10 benchmarks, e-KQD performed nearly as well as the full quadratic-time MMD but at a fraction of the temporal cost.

5. Conclusion and Future Work

Kernel Quantile Embeddings represent a significant step forward in distribution comparison. By moving beyond the mean, KQEs provide a metric that is both more robust to outliers and more sensitive to the underlying shape of the data. The near-linear computational complexity makes it a viable tool for large-scale machine learning applications.

Future research directions include the development of automated kernel selection methods specifically optimized for quantiles and the exploration of Conditional Quantile Embeddings. The latter could have profound implications for causal inference and reinforcement learning, where understanding the full conditional distribution is often more critical than predicting the conditional mean.

Summary updated

BibTeX
@inproceedings{naslidnyk2025kernel,
  author = {Masha Naslidnyk and Siu Lun Chau and Francois-Xavier Briol and Krikamol Muandet},
  title = {{Kernel Quantile Embeddings and Associated Probability Metrics}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=9LqXn0Izwk},
}
Figure