Abstract
Monge map refers to the optimal transport map between two probability distributions and provides a principled approach to transform one distribution to another. Neural network based optimal transport map solver has gained great attention in recent years. Along this line, we present a scalable algorithm for computing the neural Monge map between two probability distributions. Our algorithm is based on a weak form of the optimal transport problem, thus it only requires samples from the marginals instead of their analytic expressions, and can accommodate optimal transport between two distributions with different dimensions. Our algorithm is suitable for general cost functions, compared with other existing methods for estimating Monge maps using samples, which are usually for quadratic costs. The performance of our algorithms is demonstrated through a series of experiments with both synthetic and realistic data, including text-to-image generation and image inpainting tasks.
Introduction: The Challenge of the Monge Problem
Optimal Transport (OT) is a powerful mathematical framework for moving mass from one distribution to another with minimum effort. At its heart lies the Monge problem: finding a deterministic map $T$ that transforms distribution $\rho_a$ into $\rho_b$ while minimizing a specific cost. While theoretically elegant, solving this in high-dimensional spaces with millions of samples has historically been a computational nightmare.
Traditional solvers, like the Sinkhorn algorithm, work well for small-to-medium datasets but struggle to scale to the massive sample sizes common in modern machine learning. Furthermore, these discrete methods do not produce a continuous function; they cannot easily map a new, unseen sample without re-running the whole optimization. While neural OT solvers have emerged recently, many are restricted to quadratic costs (the $L^2$ distance) or require the distributions to exist in the same dimensional space.
Methodology: Scalable Neural Monge Maps
The researchers present a scalable, neural-network-based algorithm to estimate these "Monge maps." Their approach moves beyond the standard quadratic cost constraints of previous solvers, offering a flexible tool for complex tasks.
The authors reformulate the Monge problem into a saddle point (minimax) problem using Lagrange multipliers. Instead of enforcing the pushforward constraint directly, they introduce a dual variable $f$ (a "potential" function) that acts as a Lagrange multiplier. Both the transport map $T$ and the dual variable $f$ are represented as neural networks ($T_\theta$ and $f_\eta$).
The objective is to solve $\max_\eta \min_\theta \mathcal{L}(T_\theta, f_\eta)$. This structure mirrors a Generative Adversarial Network (GAN) training loop: the map $T$ tries to minimize the transport cost and satisfy the target distribution, while the dual variable $f$ acts as a "critic" ensuring the distributions match. A major theoretical contribution is the use of "duality gaps" to provide a posterior error estimate, allowing the researchers to bound the $L^2$ error between their learned map and the true optimal Monge map.
Key Insights and Versatility
- Beyond the $L^2$ Cost: Most neural OT work assumes a quadratic cost. This paper shows that by choosing specific costs—like negative cosine similarity for text-to-image tasks—the Monge map can be tailored to semantic alignment rather than just physical distance.
- Dimension Agnostic: The framework allows $T: \mathbb{R}^n \to \mathbb{R}^m$ where $n \neq m$. This is particularly useful for mapping low-dimensional latent codes to high-dimensional data manifolds.
- Unpaired Learning: The algorithm learns to map text to images or corrupted images to clean ones without ever seeing a "paired" example during training. It relies entirely on the underlying geometry of the distributions.
Experimental Results
The authors validated their approach across several high-dimensional benchmarks, including CC-3M for text-to-image generation and CelebA for image inpainting.
Text-to-Image Generation
On the CC-3M dataset, the model generated reasonable images from text prompts using unpaired data. By training an OT map between CLIP text embeddings and CLIP image embeddings, the system could synthesize images that maintained high semantic relevance.
Image Inpainting and Class Preservation
In CelebA inpainting, the method produced higher-quality, more realistic facial reconstructions compared to discrete OT methods. Increasing the cost coefficient $\alpha$ (enforcing consistency in unmasked areas) significantly improved results, dropping the FID score from 18.79 to 3.71. Furthermore, in class-preserving tasks (e.g., mapping MNIST digits to KMNIST), the method achieved nearly 100% accuracy in preserving the digit's identity, significantly outperforming previous state-of-the-art neural OT solvers.
Conclusion
This work provides a scalable and flexible framework for estimating Monge maps. By supporting general cost functions and unequal dimensions, it opens new doors for unpaired cross-modal generation and high-fidelity image restoration. Future work will explore specializing the method for structured data like graphs and point clouds, as well as investigating stochastic maps to better approximate the Kantorovich transport plan.
Summary updated