Measuring the distance between probability distributions is a cornerstone of modern machine learning, powering everything from generative models to domain adaptation. While the Wasserstein distance (or Earth Mover's Distance) is theoretically elegant, its cubic computational complexity makes it a nightmare for high-dimensional data. The Sliced Wasserstein (SW) distance offered a clever workaround by averaging distances between one-dimensional projections, but it has a major flaw: it relies on independent random projections that are often redundant or uninformative.
In their recent paper, researchers from the University of Texas at Austin introduce Markovian Sliced Wasserstein (MSW) distances, a new family of metrics that replaces independent random projections with a sequential, Markovian structure.
TL;DR
The paper introduces Markovian Sliced Wasserstein (MSW) distances, which improve upon standard Sliced Wasserstein by selecting projecting directions sequentially via a first-order Markov chain. This approach reduces projection redundancy and improves discriminative power, leading to superior performance in gradient flows, color transfer, and generative modeling while maintaining strong theoretical guarantees.
What Problem Does This Paper Address?
The standard Sliced Wasserstein (SW) distance is computationally efficient because it reduces a complex high-dimensional optimal transport problem into many simple 1D problems. However, because it samples projection directions independently and uniformly, it often requires a massive number of projections to accurately capture the difference between two distributions. Many of these random directions are "wasted" because they don't help discriminate between the two specific distributions being compared.
Previous attempts to fix this, like Max-SW, try to find the single "best" projection direction. While powerful, Max-SW is hard to optimize, often fails to be a true mathematical metric in practice, and can be unstable. The authors set out to find a middle ground: a method that is more informative than random sampling but more robust and theoretically sound than pure optimization.
Methods
The core innovation is the Markovian Sliced Wasserstein (MSW) distance. Instead of picking $L$ independent directions, MSW picks a sequence of directions $\theta_1, \theta_2, \dots, \theta_T$ where each direction depends only on the previous one (a first-order Markov chain).
The authors propose three main flavors of MSW based on how the next direction is chosen:
- oMSW (Orthogonal-based): Each new direction is sampled uniformly from the space orthogonal to the previous one. This forces the model to explore different "angles" of the data.
- iMSW (Input-awared): This is a deterministic transition where the next direction is a gradient-step away from the current one, specifically moving toward a direction that maximizes the projected distance between the two input distributions.
- viMSW (Probabilistic Input-awared): This uses a von Mises-Fisher (vMF) distribution to sample the next direction. It acts as a "soft" version of iMSW, balancing the search for the best discriminative direction with random exploration.
To further boost efficiency, they adapt burning and thinning techniques from MCMC literature. "Burning" discards the initial, less-informative projections in the chain, while "thinning" picks every $N$-th projection to reduce correlation and memory usage.
Datasets
The authors evaluated MSW across several tasks using standard benchmarks:
- Gradient Flows: Moving a point cloud to match an S-shape distribution.
- Color Transfer: Transferring color palettes between high-resolution images (e.g., turning a landscape into the style of Van Gogh's Starry Night).
- Deep Generative Modeling: Training GAN-like models on CIFAR10 (32x32 images) and CelebA (64x64 face images).
Key Insights and Ideas
- Sequentiality is Key: By making projections dependent, the model can "learn" where to look next. The input-aware variants effectively perform a local search for the most informative projections during the distance calculation itself.
- Metricity Preserved: Unlike Max-SW, which often loses its properties as a valid distance metric due to optimization failures, MSW is mathematically proven to be a valid metric and preserves weak convergence, provided the Markov chain has sufficient support on the unit sphere.
- Efficiency through Dependency: Because each projection is more "useful," MSW can achieve better results with far fewer total projections than standard SW, leading to significant savings in memory and time for certain applications.
Key Results
MSW variants consistently outperformed standard SW and Max-SW across all tested applications.
- Gradient Flows: iMSW and viMSW converged much faster to the target distribution. As seen in Figure 1, viMSW reached a lower Wasserstein-2 ($W_2$) distance at step 200 than standard SW reached at step 300.
- Color Transfer: The input-aware MSW variants produced visually superior results with significantly lower $W_2$ scores compared to baselines, as illustrated in Figure 2.
- Generative Modeling: On CIFAR10 and CelebA, viMSW achieved the best FID (Fréchet Inception Distance) scores, indicating higher image quality and diversity. Figure 3 shows that MSW variants converge faster during training than standard SW.
Limitations and Future Work
While MSW is powerful, the authors note a few areas for improvement:
- Stationarity: It is currently unclear if the Markov chains used in some variants (like oMSW) reach a stationary distribution, which could have implications for very long chains.
- Computational Trade-offs: While MSW requires fewer projections, the input-aware transitions require calculating gradients, which adds a per-projection cost. In deep learning, this is often negligible compared to network updates, but it may matter in other contexts.
- Hyperparameters: The performance can be sensitive to the number of steps ($T$), burning ($M$), and thinning ($N$), requiring some tuning for new datasets.
Future work could explore more advanced optimization techniques for the transition function, such as adding momentum or adaptive stepsizes to the projection updates.
Summary updated