Differentiable Generalized Sliced Wasserstein Plans

Laetitia Chapel, Romain Tavenard, Samuel Vaiter · DOI

Introduction

Optimal Transport (OT) is a cornerstone of modern machine learning, providing a robust framework for comparing probability distributions and establishing transport plans. However, its cubic computational complexity ($O(n^3)$) often renders it impractical for large-scale applications. While Sliced Wasserstein (SW) methods offer a faster $O(n \log n)$ alternative by projecting data onto 1D lines, they typically lose the explicit transport plan. Recent attempts like min-SWGG recover plans using linear projections but struggle with complex geometries and high-dimensional search.

This paper introduces Differentiable Generalized Sliced Wasserstein Plans (DGSWP), a framework that leverages non-linear neural network projections and differentiable optimization to find high-quality transport plans efficiently.

Overcoming the Limitations of Linear Slicing

Standard slicing methods rely on linear projections, which often fail to capture the intricate structures of high-dimensional data. In complex datasets, a linear slice may cause distinct clusters to overlap in 1D, destroying the information necessary for an accurate transport plan. Furthermore, finding the optimal slice in high dimensions usually requires random search, which suffers from the curse of dimensionality.

DGSWP addresses these issues by:

  1. Using Neural Network Projections: Replacing linear slices with non-linear mappings allows the projection to "bend" around data manifolds, preserving structural information in 1D.
  2. Differentiable Optimization via Stein’s Lemma: To optimize the projection parameters, the authors overcome the non-differentiability of the sorting operation. By perturbing the parameters of the projection network and applying Stein’s Lemma, they create a smoothed, differentiable proxy for the objective function.
Comparison of transport plans: Exact OT (left), linear min-SWGG (center), and non-linear DGSWP (right) on the Two Moons dataset. DGSWP closely approximates the exact OT plan.

Stabilizing Optimization

A key technical contribution of DGSWP is the use of variance reduction. Monte Carlo estimates of the smoothed gradients can be noisy, leading to unstable training. The authors implement a control variate technique that significantly stabilizes the optimization process, ensuring consistent convergence to low-cost transport plans.

The impact of variance reduction on the optimization landscape. The green curve shows significantly smoother and lower cost convergence compared to the baseline.

Experimental Results and Impact

The effectiveness of DGSWP is demonstrated across several benchmarks:

  • 2D Toy Tasks: On the 8Gaussians to Two Moons task, DGSWP achieves a transport cost of 13.80, nearly matching the exact OT cost of 13.50 and far exceeding the linear min-SWGG baseline of 22.22.
  • High-Dimensional Scaling: In 500-dimensional experiments, DGSWP was the only slicing-based method to successfully converge, highlighting its robustness to dimensionality.
  • Generative Flow Matching: When integrated into Conditional Flow Matching (CFM) for CIFAR-10 image generation, DGSWP achieved a state-of-the-art FID of 3.62. By enabling the use of massive batch sizes for global transport alignment, DGSWP produces straighter trajectories, leading to higher quality samples with fewer inference steps.

Conclusion

DGSWP represents a significant step forward in making Optimal Transport scalable and expressive. By combining the speed of 1D slicing with the power of neural networks and smoothed optimization, it provides a practical tool for high-dimensional data alignment and generative modeling. Future work will focus on enforcing global injectivity in the projection networks to satisfy strict mathematical metric properties.

Summary updated

BibTeX
@inproceedings{chapel2025differentiable,
  author = {Laetitia Chapel and Romain Tavenard and Samuel Vaiter},
  title = {{Differentiable Generalized Sliced Wasserstein Plans}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=hKKbtN4cp9},
}
Figure