Kernel Trace Distance: Quantum Statistical Metric between Measures through RKHS Density Operators

Arturo Castellanos, Anna Korba, Pavlo Mozharovskyi, Hicham Janati · DOI

Introduction

Measuring the distance between probability distributions is a foundational task in machine learning, essential for training Generative Adversarial Networks (GANs), performing two-sample tests, and conducting complex simulations. Historically, practitioners have faced a trade-off: the Maximum Mean Discrepancy (MMD) offers speed and dimension-independent convergence but can lack discriminative power; conversely, the Wasserstein distance provides high discriminative "sharpness" but suffers from the "curse of dimensionality" and high computational costs.

This paper introduces the Kernel Trace Distance ($d_{KT}$), a novel metric that bridges this gap. By leveraging concepts from quantum information theory, $d_{KT}$ combines the robustness and statistical efficiency of kernel methods with the sensitivity typically associated with optimal transport.

Methodology: From Mean Embeddings to Density Operators

The core innovation of $d_{KT}$ lies in treating probability distributions as quantum states within a Reproducing Kernel Hilbert Space (RKHS).

RKHS Density Operators

Standard kernel methods like MMD rely on mean embeddings—mapping a distribution to a single vector in the RKHS. In contrast, the authors map distributions to "density operators" (analogous to covariance operators). While MMD is equivalent to the Schatten 2-norm (Hilbert-Schmidt norm) of the difference between these operators, $d_{KT}$ utilizes the Schatten 1-norm (the sum of singular values).

Practical Computation

Computing norms in infinite-dimensional spaces is non-trivial. The authors provide an algorithm based on a "difference kernel matrix," allowing $d_{KT}$ to be calculated via the eigendecomposition of an $r \times r$ matrix (where $r$ is the number of unique samples). This makes the metric computationally feasible for practical applications.

Statistical Properties and Advantages

Robustness to Bandwidth

A significant weakness of MMD is its sensitivity to kernel hyperparameters, such as the bandwidth $\sigma$ in Gaussian kernels. If $\sigma$ is not perfectly tuned, MMD often fails to distinguish between distinct distributions. $d_{KT}$ demonstrates superior stability; as bandwidth grows, $d_{KT}$ maintains its ability to distinguish distributions while the MMD signal vanishes.

Sensitivity of $d_{KT}$ vs $MMD_k$ across kernel bandwidths.

Dimension Independence

Unlike Wasserstein distances, which require a sample size that grows exponentially with dimensionality, $d_{KT}$ achieves a convergence rate of approximately $O(n^{-1/2})$ under certain eigenvalue decay assumptions. This dimension-independent convergence makes it highly suitable for high-dimensional data.

Experimental Evaluation

The authors evaluated $d_{KT}$ across several synthetic and complex tasks:

  • Approximate Bayesian Computation (ABC): Testing robustness against 10% data contamination in normal distributions.
  • Particle Flow: Visualizing the "morphing" of one distribution into another (e.g., matching a spiral shape) under the gradient of the metric.
  • Shape Transfer: Capturing intricate geometric structures in 2D point clouds.

Key Results

In ABC experiments, $d_{KT}$ achieved a Mean Squared Error (MSE) of 0.03, significantly outperforming standard MMD (MSE of 1.29). While MMD was often "too lenient," accepting contaminated samples, $d_{KT}$ successfully identified true parameters and rejected outliers. Furthermore, in particle flow tasks, $d_{KT}$ avoided the "repulsion" effects common in MMD, where particles spread out excessively, leading to a much cleaner match with target geometries.

Conclusion and Future Work

Kernel Trace Distance ($d_{KT}$) represents a powerful "quantum-inspired" upgrade to traditional statistical metrics. While it currently requires $O(r^3)$ complexity due to Singular Value Decomposition (SVD), future work aims to utilize the Nyström method for better scaling. By providing a more discriminative yet statistically efficient alternative to MMD, $d_{KT}$ opens new avenues for robust inference and generative modeling.

Summary updated

BibTeX
@misc{castellanos2025kernel,
  author = {Arturo Castellanos and Anna Korba and Pavlo Mozharovskyi and Hicham Janati},
  title = {{Kernel Trace Distance: Quantum Statistical Metric between Measures through RKHS Density Operators}},
  year = {2025},
  eprint = {2507.06055},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.06055},
}
Figure