Consistent Optimal Transport with Empirical Conditional Measures

Piyushi Manupriya, Rachit Keerti Das, Sayantan Biswas, Saketha Nath Jagarlapudi

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(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) provides a robust framework for measuring distances between probability distributions. However, real-world applications often require comparing distributions conditioned on a specific variable, such as patient outcomes given a treatment dosage. Standard OT methods struggle in these scenarios due to three primary challenges: the lack of explicit conditional formulas (relying instead on joint samples), the difficulty of handling continuous conditioning variables where only single samples might exist for specific values, and potential mismatches in the marginal distributions of the conditioning variable between the two groups.

Methodology

The proposed framework, Conditional Optimal Transport (COT), addresses these challenges by relaxing strict OT constraints into a kernelized-least-squares problem. A key innovation is the use of Maximum Mean Discrepancy (MMD) regularization. Instead of forcing an exact match with conditionals, MMD acts as a penalty term that aligns the transport plan’s marginals with the empirical conditionals in the data.

Comparison of COT with existing conditional OT methods.

As shown in the comparison above, COT is the first method to provide a consistent estimator while maintaining flexibility with ground costs and implicit modeling. The method employs factorized modeling, breaking down the complex transport plan into simpler components: the source distribution and the transformation from source to target. Crucially, the authors provide a theoretical guarantee of consistency, proving that the estimated transport plan converges to the true optimal at a rate of $O(m^{-1/4})$.

Experimental Results

The consistency and efficacy of COT were evaluated across synthetic and real-world datasets. Synthetic tests confirmed that the algorithm converges to known analytical solutions as sample sizes increase.

Empirical verification of consistency: Wasserstein distance decreases as the number of samples $m$ increases, outperforming the baseline.

In practical applications, COT demonstrated significant improvements:

  • Drug Response Prediction: On the Givinostat single-cell genomics dataset, COT achieved lower $l_2$ distance and superior distributional matching compared to baselines like CellOT and CondOT.
  • Few-Shot Classification: In prompt learning for the EuroSAT dataset, COT improved 1-shot accuracy from 54.05% to 61.20%, outperforming the previous state-of-the-art method, PLOT.
  • Efficiency: The loss function remains computationally efficient on GPUs, maintaining stable training times across varying minibatch sizes.

Conclusion

COT introduces a mathematically grounded and flexible framework for conditional optimal transport. By bypassing explicit density estimation through RKHS embeddings, it offers a stable and consistent estimator. Future work may extend this to conditional barycenters and address the $O(m^2)$ scaling of the MMD term for even larger datasets.

Summary updated

BibTeX
@inproceedings{manupriya2024consistent,
  author = {Piyushi Manupriya and Rachit Keerti Das and Sayantan Biswas and Saketha Nath Jagarlapudi},
  title = {{Consistent Optimal Transport with Empirical Conditional Measures}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
  url = {https://openreview.net/forum?id=dd3xDabl1i},
}
Figure