Abstract
Wasserstein Generative Adversarial Networks (WGANs) are popular generative models built on the theory of Optimal Transport (OT) and the Kantorovich duality. Despite the success of WGANs, it is still unclear how well the underlying OT dual solvers approximate the OT cost (Wasserstein-1 distance, $\mathbb{W}_{1}$) and the OT gradient needed to update the generator. In this paper, we address these questions. We construct 1-Lipschitz functions and use them to build ray monotone transport plans. This strategy yields pairs of continuous benchmark distributions with the analytically known OT plan, OT cost and OT gradient in high-dimensional spaces such as spaces of images. We thoroughly evaluate popular WGAN dual form solvers (gradient penalty, spectral normalization, entropic regularization, etc.) using these benchmark pairs. Even though these solvers perform well in WGANs, none of them faithfully compute $\mathbb{W}_{1}$ in high dimensions. Nevertheless, many provide a meaningful approximation of the OT gradient. These observations suggest that these solvers should not be treated as good estimators of $\mathbb{W}_{1}$, but to some extent they indeed can be used in variational problems requiring the minimization of $\mathbb{W}_{1}$.
Introduction
Generative Adversarial Networks (GANs) have long faced challenges regarding training stability and mode collapse. The introduction of Wasserstein GANs (WGANs) marked a significant breakthrough by replacing the standard GAN loss with the Wasserstein-1 distance ($W_1$). This metric provides smoother gradients even when the real and generated data distributions have non-overlapping supports, facilitating more stable training.
In practice, WGANs utilize a "critic" network to solve the Kantorovich dual problem, aiming to find a 1-Lipschitz function that maximizes the difference in expected values between the two distributions. Various techniques, such as Gradient Penalty (GP) and Spectral Normalization (SN), have been developed to enforce this Lipschitz constraint. However, a fundamental question has remained unanswered: how accurately do these neural solvers actually estimate the true $W_1$ distance and its gradient in high-dimensional spaces?
Methodology: Constructing Analytical Benchmarks
The primary obstacle in evaluating WGAN solvers is the lack of ground-truth $W_1$ values for continuous, high-dimensional distributions. To overcome this, the authors propose a "reverse engineering" strategy to create benchmarks with analytically known properties.
The core of this approach involves MinFunnels, a class of 1-Lipschitz functions defined as the minimum of several distance-based "funnels." By analyzing the geometry of these functions, the authors identify transport rays—the paths along which mass must move to minimize transport cost. By starting with a source distribution $\mathbb{P}$ and a MinFunnel potential $u$, they can analytically construct a target distribution $\mathbb{Q}$ such that the exact $W_1$ cost, the optimal transport map, and the OT gradient are all mathematically known.
Experimental Setup and Datasets
The authors evaluated a wide range of popular WGAN solvers, including Weight Clipping (WC), Gradient Penalty (GP), Spectral Normalization (SN), and Maximin methods (MM). These were tested across several benchmark pairs:
- High-Dimensional Synthetic Data: Dimensions ranging from $D=2$ to $D=128$, with varying complexity based on the number of funnels.
- Image-Based Benchmarks: Synthetic image distributions derived from CIFAR-10 (32x32) and CelebA (64x64). These distributions leverage pre-trained generators to ensure they reside on realistic image manifolds while maintaining analytically known OT properties.
Results: The Gradient vs. Value Paradox
The study reveals a striking discrepancy between the estimation of the $W_1$ value and its gradient.
1. Failure in Distance Estimation
None of the popular neural solvers were found to be reliable estimators of the actual $W_1$ distance in high dimensions. As dimensionality ($D$) and distribution complexity increase, the accuracy of distance estimation drops sharply. Solvers frequently over- or underestimate the true cost by orders of magnitude.
2. Success in Gradient Approximation
Despite failing to calculate the distance value, many solvers—particularly Gradient Penalty (GP) and certain Maximin variants—demonstrated excellent performance in estimating the OT gradient. In image-sized dimensions, these solvers achieved cosine similarities greater than 0.9 with the true ground-truth gradient.
3. Solver-Specific Observations
- Spectral Normalization (SN): Surprisingly, SN often underperformed compared to GP in recovering correct gradient directions in high-dimensional spaces.
- Weight Clipping (WC): This original WGAN method was found to produce "jagged" and unnatural potential surfaces, confirming its pathological nature, although it still provided a marginally useful gradient.
Conclusion
The success of WGANs in practice, despite their failure as "distance calculators," can be attributed to their ability to accurately capture the direction of optimal transport. In deep learning, the gradient direction is often more critical for optimization than the exact value of the loss function.
These findings suggest that current neural OT solvers should be viewed as gradient approximators rather than distance estimators. This insight opens the door for developing new solvers specifically optimized for gradient accuracy, potentially leading to even more robust generative models.
Summary updated