Supervised Optimal Transport

Zixuan Cang, Qing Nie, Yanxiang Zhao

Abstract

Optimal Transport (OT), a theory for optimal allocation of resources, is widely used in various fields such as astrophysics, machine learning, and imaging science. However, many applications impose elementwise constraints on the transport plan which traditional optimal transport cannot enforce. Here we introduce Supervised Optimal Transport (sOT) that formulates a constrained optimal transport problem where couplings between certain elements are prohibited according to specific applications. sOT is proved to be equivalent to an $l^1$ penalized optimization problem, from which efficient algorithms are designed to solve its entropy regularized formulation. We demonstrate the capability of sOT by comparing it to other variants and extensions of traditional OT in color transfer problem. We also study the barycenter problem in sOT formulation, where we discover and prove a unique reverse and portion selection (control) mechanism. Supervised optimal transport is broadly applicable to applications in which constrained transport plan is involved and the original unit should be preserved by avoiding normalization.

Introduction

Optimal Transport (OT) has become the mathematical "gold standard" for calculating the most efficient way to transform one distribution into another. Its applications span from training generative adversarial networks (GANs) to complex image processing tasks. However, a significant limitation of standard OT is its "everything-to-everything" assumption: it assumes that mass can potentially move from any source point to any target point, provided the cost is paid. In many real-world scenarios—ranging from logistics during a disaster to biological cell differentiation—certain paths are physically or logically prohibited.

In the paper "Supervised Optimal Transport," researchers Zixuan Cang, Qing Nie, and Yanxiang Zhao introduce sOT, a framework that allows for "supervision" of the transport plan. By enforcing hard constraints on which couplings are allowed, sOT provides a more realistic model for constrained systems while maintaining the mathematical rigor of the OT framework.

Methodology: Supervision via Constraints

The fundamental innovation of sOT is the introduction of a cost matrix $C$ that includes $\infty$ entries for prohibited couplings. This effectively "blocks" specific transport paths.

The $l^1$ Penalty Equivalence

One of the primary theoretical contributions of this work is the proof that the sOT problem—which involves optimizing both the transport plan and the total mass transported—is mathematically equivalent to a single-stage $l^1$ penalized optimization problem. This equivalence is crucial because it transforms a constrained optimization problem into a more tractable form, allowing for the use of efficient numerical solvers. This $l^1$ formulation naturally handles unnormalized data, preserving the original units of mass which are often lost in standard OT normalization.

Algorithmic Implementation: Dykstra’s Algorithm

While the Sinkhorn algorithm is the workhorse of modern OT, it struggles with the hard constraints and unnormalized marginals inherent in sOT. To address this, the authors adapt Dykstra’s algorithm. By implementing it in the log-domain, they ensure numerical stability even when the regularization parameter $\epsilon$ is small, preventing the overflow and underflow issues that typically plague constrained OT solvers.

The Barycenter Problem and Selection Mechanisms

The authors extend sOT to the barycenter problem, which seeks a "middle ground" distribution among multiple sources. Their analysis revealed a unique "reverse and portion selection" mechanism. In traditional OT, the barycenter is a weighted average; however, in sOT, tight constraints force the barycenter to behave counterintuitively.

Geometric representation of selection mechanisms and constraints in supervised optimal transport.

As the weight for one source distribution increases, the barycenter may actually begin to resemble a different source more closely to satisfy the "blocked" path constraints. This "reverse selection" was formally proven by the authors, providing a new geometric understanding of how constraints shape optimal distributions.

Key Results and Applications

Superior Color Transfer

The practical utility of sOT was demonstrated through color transfer tasks. When transferring the palette of a target image to a source image, standard methods like Earth Mover’s Distance (EMD) or Unbalanced OT often produce artifacts by forcing unnatural color mappings. sOT, by contrast, uses a distance threshold ($C_{cut}$) to prohibit these unnatural couplings. If no suitable color match exists within the allowed threshold, sOT simply leaves those pixels in their original state, resulting in significantly more realistic and visually pleasing images.

Efficiency and Control

The adapted Dykstra algorithm demonstrated a linear rate of convergence, proving its suitability for high-resolution imaging and large-scale logistics problems. Furthermore, the $C_{cut}$ parameter provides users with a precise "knob" to tune the balance between global optimality and local feasibility.

Conclusion and Future Directions

Supervised Optimal Transport addresses two major gaps in the field: the need for elementwise constraints and the preservation of unnormalized mass units. While the current framework requires careful tuning of the penalty parameter $\gamma$, it opens new doors for applications where physical constraints are paramount.

Future research directions include extending the framework to Supervised Gromov-Wasserstein OT to align datasets in different metric spaces and applying the model to geological phenomena, such as modeling the movement of tectonic plates where mass flow is strictly constrained by physical boundaries.

Summary updated

Abstract

Optimal transport, a theory for optimal allocation of resources, is widely used in various fields such as astrophysics, machine learning, and imaging science. However, many applications impose elementwise constraints on the transport plan which traditional optimal transport cannot enforce. Here we introduce supervised optimal transport (sOT), which formulates a constrained optimal transport problem where couplings between certain elements are prohibited according to specific applications. sOT is proved to be equivalent to an penalized optimization problem, from which efficient algorithms are designed to solve its entropy regularized formulation. We demonstrate the capability of sOT by comparing it to other variants and extensions of traditional optimal transport in the color transfer problem. We also study the barycenter problem in sOT formulation, where we discover and prove a unique reverse and portion selection (control) mechanism. Supervised optimal transport is broadly applicable to applications in which a constrained transport plan is involved and the original unit should be preserved by avoiding normalization.
BibTeX
@inproceedings{cang2022supervised,
  author = {Zixuan Cang and Qing Nie and Yanxiang Zhao},
  title = {{Supervised Optimal Transport}},
  booktitle = {SIAM},
  year = {2022},
  doi = {10.1137/22m1469171},
}
Figure