TL;DR
Optimal Transport (OT) is a powerful tool for comparing data distributions, but it famously suffers from the "curse of dimensionality." The Kernel Max-Sliced (KMS) Wasserstein distance solves this by finding an optimal nonlinear 1D projection of the data before calculating the distance. This paper provides the missing theoretical foundation for KMS Wasserstein, proving it has dimension-free sample complexity, showing its exact computation is NP-hard, and introducing a highly efficient, theoretically backed Semidefinite Relaxation (SDR) algorithm to compute it in practice.
The Curse of Dimensionality in Optimal Transport
If you want to measure the distance between two probability distributions—say, real images vs. AI-generated images—the Wasserstein distance (from Optimal Transport) is a go-to metric. However, estimating it from data samples requires an exponentially large number of samples as the data's dimensionality increases. This is known as the curse of dimensionality.
To bypass this, researchers developed "Sliced" and "Max-Sliced" Wasserstein distances, which project high-dimensional data down to 1D lines before comparing them. But linear projections often fail to capture complex, nonlinear data structures (imagine data shaped like two concentric circles).
Enter the Kernel Max-Sliced (KMS) Wasserstein distance, which uses the kernel trick to find the optimal nonlinear 1D projection. While empirically successful, KMS Wasserstein lacked solid theoretical guarantees. We didn't know its exact statistical convergence rate, and existing algorithms to compute it relied on unstable, highly non-convex gradient descent heuristics. This paper bridges that gap by providing rigorous statistical bounds and a reliable, polynomial-time computational framework.
Theoretical and Computational Methods
The authors tackle both the statistical and computational sides of KMS Wasserstein:
- Statistical Guarantees: Using functional Hoeffding bounds and the properties of Reproducing Kernel Hilbert Spaces (RKHS), they mathematically bound the error of the empirical KMS Wasserstein distance.
- NP-Hardness Proof: They prove that exactly computing the KMS 2-Wasserstein distance is NP-hard by reducing it to a known NP-hard problem (fair-PCA with rank-1 data).
- Semidefinite Relaxation (SDR): Because the exact problem is NP-hard (due to a strict rank-1 constraint), they propose an SDR that drops this constraint, turning it into a solvable convex optimization problem.
- Inexact Mirror Ascent Algorithm: Standard solvers (like Interior Point Methods) for SDRs are painfully slow—scaling at $O(n^{6.5})$. The authors design a custom first-order algorithm using stochastic gradients and Katyusha momentum that solves the SDR in much faster $O(n^2)$ time.
- Rank Reduction: Since the SDR relaxes the rank-1 constraint, the authors also provide a greedy algorithm to "round" the resulting higher-rank matrix back down to a low-rank solution, complete with theoretical bounds on the maximum rank.
Datasets Evaluated
The authors evaluated their method on a mix of synthetic and real-world datasets:
- Synthetic: 2D concentric circles (toy example), high-dimensional Gaussian covariance shift, and Gaussian mixture distribution shifts.
- Real-world Images: MNIST and CIFAR-10, specifically modified to test for distribution abundance changes.
- Time-Series: MSRC-12 Kinect gesture dataset, used to test how fast the metric can detect a change in human activity (e.g., switching from throwing to lifting).
Key Insights and Results
- Dodging the Curse of Dimensionality: The authors prove that the sample complexity of the KMS $p$-Wasserstein distance is $O(n^{-1/(2p)})$. Crucially, this rate is dimension-free—it depends only on the number of samples $n$, not the number of features $d$.
- A Different Flavor of NP-Hardness: For standard Max-Sliced Wasserstein, computational hardness comes from both the data dimension $d$ and the sample size $n$. Because KMS uses the kernel trick to project into an infinite-dimensional space, its NP-hardness is surprisingly driven only by the sample size $n$.
- Convex Relaxation Beats Local Heuristics: Previous methods for computing KMS used Block Coordinate Descent (BCD), which gets stuck in local optima and is highly sensitive to initialization. The proposed SDR approach provides a global optimum to the relaxed problem, resulting in much more stable and reliable distance estimations.
- Speed and Scalability: The proposed
SDR-Efficientalgorithm dramatically outperforms standard off-the-shelf SDR solvers. Where standard solvers timed out (taking >1 hour) for sample sizes over a few hundred, the new algorithm solved them in seconds to minutes. - Superior Two-Sample Testing: In high-dimensional hypothesis testing (detecting if two datasets come from the same distribution), KMS Wasserstein consistently achieved higher testing power than baselines like Maximum Mean Discrepancy (MMD), Sinkhorn divergence, and standard Sliced Wasserstein.
- Faster Change Detection: On the MSRC-12 Kinect dataset, the KMS metric detected human activity transitions with an average delay of just 11.4 frames, significantly beating MMD (50.6 frames) and Sinkhorn divergence (16.5 frames).
- Generative Modeling: When used as a loss function to train a generative model on MNIST, KMS Wasserstein produced better fake images, achieving a Fréchet Inception Distance (FID) score of 105.98, compared to 113.92 for Sliced Wasserstein.
Limitations and Future Work
- Hidden Dimensionality Costs in Testing: While the statistical estimation rate is dimension-free, the authors note that in practical two-sample testing, the true discrepancy between distributions often shrinks as dimensions increase. Therefore, you may still need larger sample sizes in higher dimensions to maintain the same statistical testing power.
- Quadratic Scaling: The proposed algorithm is a massive improvement over $O(n^{6.5})$, but its complexity is still roughly $O(n^2)$. For truly massive datasets (millions of samples), computing the pairwise kernel matrix and running the inner optimal transport solver will still be a computational bottleneck. Future work could explore linear-time approximations or Nyström-style kernel approximations to scale this up further.
Summary updated