Distribution Regression with Sliced Wasserstein Kernels

Dimitri Meunier, Massimiliano Pontil, Carlo Ciliberto

Abstract

This paper introduces a novel approach to distribution regression—learning functions that take probability distributions as inputs—by using kernels based on the Sliced Wasserstein (SW) distance. We provide the first theoretical guarantees, including universal consistency and excess risk bounds, for these Optimal Transport-based kernels. Our results demonstrate that SW kernels significantly outperform standard methods, such as Maximum Mean Discrepancy (MMD), on tasks where the underlying geometry of the data is critical for predictive accuracy.

Introduction

In many modern machine learning applications, data points are not simple vectors but collections of samples representing underlying probability distributions. Examples include bags of medical test results or sets of pixel coordinates in an image. Distribution regression aims to map these complex inputs to real-valued outputs.

Historically, the Maximum Mean Discrepancy (MMD) has been the standard tool for this task due to its mathematical convenience. However, MMD often fails to capture the intrinsic geometry of the distribution space; for instance, it may treat two slightly shifted distributions as entirely distinct. While Optimal Transport (OT) metrics like the Wasserstein distance are more geometrically sensitive, they are computationally expensive and difficult to integrate into valid kernel methods. This work addresses these challenges by utilizing Sliced Wasserstein kernels to create a framework that is both theoretically sound and computationally practical.

Methodology

The core of our approach is the use of Sliced Wasserstein (SW) kernels. The SW distance simplifies high-dimensional Optimal Transport by projecting distributions onto random one-dimensional lines, where the Wasserstein distance is trivial to compute, and then averaging these results.

Theoretical Contributions

  1. Distance Substitution Kernels: We demonstrate how to validly plug the SW distance into Gaussian-like kernel functions: $K(P, Q) = e^{-\gamma d(P, Q)}$.
  2. Hilbertian Properties: We prove that the square root of the $SW_1$ distance and the $SW_2$ distance are "Hilbertian," ensuring they can define valid Reproducing Kernel Hilbert Spaces (RKHS).
  3. Universality: We establish that these kernels are universal, meaning models employing them can approximate any continuous function over distributions to arbitrary precision.
  4. Excess Risk Bounds: We derive bounds showing that the estimator's error converges to zero as the number of distributions ($T$) and samples per distribution ($n$) increase.

Experimental Setup

We evaluated the SW kernels against MMD and standard RBF kernels across several benchmarks:

  • Synthetic Gaussian Mixture Models (GMMs): A regression task where the model must predict the number of modes (components) in a distribution, testing its ability to distinguish complex spatial structures.
  • Image Datasets (MNIST & Fashion-MNIST): Images are treated as 2D probability distributions of pixel intensities rather than flat vectors. This allows the model to remain aware of spatial relationships.
  • Geometric Robustness: We tested the models on perturbed versions of MNIST and Fashion-MNIST, applying random rotations and translations to evaluate how well the kernels handle geometric shifts.
Visualizing the synthetic task: Gaussian Mixture Models with varying numbers of components used to test the kernels' ability to distinguish distribution shapes.

Key Results and Discussion

Superiority in Synthetic Tasks

On the GMM mode-counting task, SW kernels consistently achieved lower Root Mean Square Error (RMSE) than MMD-based kernels. As shown in the experimental data, the $SW_2$ and $SW_1$ kernels maintain a performance edge across various dimensions ($r$) and component counts ($C$).

RMSE results for the GMM mode-counting task. SW kernels consistently outperform MMD across different sample sizes (n) and distribution counts (T).

Robustness to Geometric Transformations

The advantage of the SW framework is most evident in tasks involving rotation. On rotated MNIST, while standard RBF accuracy dropped to approximately 47% and MMD to 34%, the $SW_2$ kernel maintained a high accuracy of 82%. This confirms that the Wasserstein geometry is a more natural metric for functions that are smooth with respect to spatial transformations.

The Geometry-Sample Complexity Trade-off

While MMD theoretically converges faster than SW as the number of samples ($n$) increases, SW kernels perform better in practice when the target function aligns with Wasserstein geometry. The "slicing" mechanism provides a closed-form, differentiable, and efficient way to leverage these geometric insights without the prohibitive cost of standard OT.

Conclusion and Future Work

This work establishes Sliced Wasserstein kernels as a robust and theoretically grounded alternative for distribution regression. Future research will focus on accounting for the error introduced by the Monte Carlo sampling of projection directions ($M$) and exploring the relationship between SW kernels and other OT-based embeddings like Linear Optimal Transport. Additionally, we aim to further optimize the computational scaling for massive datasets.

Summary updated

BibTeX
@inproceedings{meunier2022distribution,
  author = {Dimitri Meunier and Massimiliano Pontil and Carlo Ciliberto},
  title = {{Distribution Regression with Sliced Wasserstein Kernels}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=dxPhSmDPMky},
}
Figure