Abstract
Given samples from two joint distributions, we consider the problem of Optimal Transportation (OT) between them when conditioned on a common variable. We focus on the general setting where the conditioned variable may be continuous, and the marginals of this variable in the two joint distributions may not be the same. In such settings, standard OT variants cannot be employed, and novel estimation techniques are necessary. Since the main challenge is that the conditional distributions are not explicitly available, the key idea in our OT formulation is to employ kernelized-least-squares terms computed over the joint samples, which implicitly match the transport plan's marginals with the empirical conditionals. Under mild conditions, we prove that our estimated transport plans, as a function of the conditioned variable, are asymptotically optimal. For finite samples, we show that the deviation in terms of our regularized objective is bounded by $O(1/m^{1/4})$, where $m$ is the number of samples. We also discuss how the conditional transport plan could be modelled using explicit probabilistic models as well as using implicit generative ones. We empirically verify the consistency of our estimator on synthetic datasets, where the optimal plan is analytically known. When employed in applications like prompt learning for few-shot classification and conditional-generation in the context of predicting cell responses to treatment, our methodology improves upon state-of-the-art methods.
Introduction
Optimal Transport (OT) is a powerful mathematical tool for measuring the distance between probability distributions. However, many machine learning problems require comparing conditional distributions—for example, comparing a model's predicted label distribution to the true distribution, or predicting how a cell will respond to a drug based on its initial state.
The challenge arises when the conditioned variable (the "input") is continuous. In these cases, you rarely observe the same input twice, meaning you don't have a full distribution of outputs for a single input; you only have individual $(x, y)$ pairs. Furthermore, the distribution of inputs might differ between the two datasets you are comparing (covariate shift). Existing OT methods either fail in this "single-sample" regime, require discrete inputs, or rely on unstable adversarial training that lacks theoretical convergence guarantees.
Methodology
The authors propose a "Consistent Optimal Transport" (COT) estimator. The core innovation is how they enforce the marginal constraints of the transport plan without having explicit access to the conditional densities. Instead of trying to estimate the conditional density directly, they use Maximum Mean Discrepancy (MMD). They show that penalizing the distance between the transport plan’s marginals and the empirical joint samples in a Reproducing Kernel Hilbert Space (RKHS) implicitly matches the conditionals.
As summarized in the table above, COT is uniquely positioned as a consistent estimator that allows for implicit modeling and flexible ground costs while handling single samples per conditioned variable. The methodology also employs Factorized Modeling, breaking the conditional transport plan into simpler factors: $\pi_{Y|X}$ (the source conditional) and $\pi_{Y'|Y,X}$ (the transition from source to target).
Empirical Evaluation
The methodology was validated across several domains, including synthetic data for analytical verification, single-cell RNA sequencing (Givinostat cancer drug dataset), and few-shot classification benchmarks (EuroSAT, MNIST, CIFAR-10).
In synthetic tests, the COT estimator reached the true Wasserstein distance significantly faster and with lower variance than previous state-of-the-art methods. The authors provide a theoretical finite-sample error bound of $O(1/m^{1/4})$, which is empirically supported by the convergence behavior observed in their experiments.
Key Results and Insights
- Handling Covariate Shift: The method naturally handles cases where the distribution of $X$ is different in the two datasets, a major hurdle for standard OT.
- Biological Accuracy: In cell population tasks, COT consistently outperformed baselines like CellOT and CondOT in terms of $l_2$ distance and MMD between predicted and ground-truth distributions.
- Few-Shot Gains: On the EuroSAT dataset, COT improved classification accuracy in the challenging 1-shot setting to 61.20%, compared to 54.05% for the previous leading method, PLOT.
Conclusion
COT provides a robust framework for transporting mass between conditional distributions by matching embeddings in a high-dimensional feature space (RKHS). While kernel-based methods can be computationally intensive for very large batches, the theoretical consistency and empirical performance in complex tasks like prompt learning and biological response prediction mark a significant advancement. Future research may explore the computation of conditional barycenters to align multiple source distributions simultaneously.
Summary updated