Inverse Entropic Optimal Transport Solves Semi-supervised Learning via Data Likelihood Maximization

## Abstract

Abstract Learning conditional distributions π ∗ ( ⋅ | x ) \pi^{*}(\cdot|x) italic_π start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( ⋅ | italic_x ) is a central problem in machine learning, which is typically approached via supervised methods with paired data ( x , y ) ∼ π ∗ similar-to 𝑥 𝑦 superscript 𝜋 (x,y)\sim\pi^{*} ( italic_x , italic_y ) ∼ italic_π start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT . However, acquiring paired data samples is often challenging, especially in problems such as domain translation. This necessitates the development of semi-supervised models that utilize both limited paired data and additional unpaired i.i.d. samples x ∼ π x ∗ similar-to 𝑥 subscript superscript 𝜋 𝑥 x\sim\pi^{*}_{x} italic_x ∼ italic_π start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT and y ∼ π y ∗ similar-to 𝑦 subscript superscript 𝜋 𝑦 y\sim\pi^{*}_{y} italic_y ∼ italic_π start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT from the marginal distributions. The usage of such combined data is complex and often relies on heuristic approaches. To tackle this issue, we propose a new learning paradigm that integrates both paired and unpaired data seamlessly through the data likelihood maximization techniques. We demonstrate that our approach also connects intriguingly with inverse entropic optimal transport (OT). This finding allows us to apply recent advances in computational OT to establish a light learning algorithm to get π ∗ ( ⋅ | x ) \pi^{*}(\cdot|x) italic_π start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( ⋅ | italic_x ) . Furthermore, we demonstrate through empirical tests that our method effectively learns conditional distributions using paired and unpaired data simultaneously.

## 1 Introduction

Recovering conditional distributions $\pi^{*}(y|x)$ from data is one of the fundamental problems in machine learning, which appears both in predictive and generative modeling. In predictive modeling, the standard examples of such tasks are the classification, where $x\in\mathbb{R}^{D_{x}}$ is a feature vector and $y\in\{0,1,\dots,K\}$ is a class label, and regression, in which case $x$ is also a feature vector and $y\in\mathbb{R}^{D}$ is a real number. In generative modeling, both $x$ and $y$ are feature vectors in $\mathbb{R}^{D_{x}},\mathbb{R}^{D_{y}}$, respectively, representing complex objects, and the goal is to find a transformation between them.

In our paper, we focus on the case when $x$ and $y$ are multi-dimensional real-value vectors and the true joint data distribution $\pi^{*}(x,y)$ is a continuous data distribution on $\mathbb{R}^{D_{x}}\times\mathbb{R}^{D_{y}}$, i.e., we exclude the problems when, e.g., $y$ is a discrete object such as the class label. That is, the scope of our paper is the multi-dimensional probabilistic regression problems, which can be referred to as domain translation problems, as usually $x$ and $y$ are feature vectors representing data from different domains. In turn, the goal is to make a (probabilistic) prediction, where for a new object $x_{new}$ from the input domain, we aim to predict the corresponding data $y(x_{new})$ from the target domain, according to the conditional distribution $\pi^{*}(y|x)$.

It is very natural that to learn the conditional distributions $\pi^{*}(y|x)$ of data one requires input-target data pairs $(x,y)\sim\pi^{*}$, where $\pi^{*}$ is the true joint distribution of data. In this case, $\pi^{*}(y|x)$ can be modeled via standard supervised learning approaches starting from a simple regression and ending with conditional generative models (Mirza & Osindero, ; Winkler et al., ). However, acquiring paired data may be costly, while getting unpaired samples $x\sim\pi^{*}_{x}$ or $y\sim\pi^{*}_{y}$ from two domains may be much easier and cheaper. This fact inspired the development of unsupervised (or unpaired) learning methods, e.g., (Zhu et al., ; Wu et al., ) among many others, which aim to somehow reconstruct the dependencies $\pi^{*}(y|x)$ with access to unpaired data only.

While both paired (supervised) and unpaired (unsupervised) domain translation approaches are being extremely well developed nowadays, surprisingly, the semi-supervised setup when both paired and unpaired data is available is much less explored. This is due to the challenge of designing learning objective (loss) which can simultaneously take into account both paired and unpaired data. For example, one potential strategy here is to heuristically combine typical paired and unpaired losses. However, such a strategy leads to complex training objectives, see (Tripathy et al., , \wasyparagraph3.5), (Jin et al., , \wasyparagraph3.3), (Yang & Chen, , \wasyparagraphC), (Vasluianu et al., , \wasyparagraph3), (Panda et al., , Eq. 8), (Tang et al., , Eq. 8). Therefore, it is reasonable to raise a question: is it possible to design a simple loss to learn $\pi^{*}(y|x)$ which naturally takes into account both paired and unpaired data?

Contributions. In our paper, we positively answer the above-raised question. Namely,

- 1.
We introduce a novel loss function (optimization objective) designed to facilitate the learning of conditional distributions $\pi^{*}(\cdot|x)$ using both paired and unpaired training samples derived from $\pi^{*}$ (\wasyparagraph3.1). This loss function is based on the well-established principle of likelihood maximization. Our approach’s notable advantage lies in its capacity to support end-to-end learning, thereby seamlessly integrating both paired and unpaired data into the training process.
- 2.
We demonstrate the theoretical equivalence between our proposed loss function and the inverse entropic optimal transport problem (\wasyparagraph3.2). This finding enables to leverage established computational OT methods to address challenges encountered in semi-supervised learning.
- 3.
Building upon recent advancements in the field of computational optimal transport, we provide a light and end-to-end algorithm exploiting the Gaussian mixture parameterization specifically tailored to optimize our proposed likelihood-based loss function (in \wasyparagraph3.3).

Our empirical validation in \wasyparagraph5 shows the impact of both unpaired and paired data on overall performance. In particular, our findings reveal that conditional distributions $\pi^{*}(\cdot|x)$ can be effectively learned even with a modest quantity of paired data $(x,y)\sim\pi^{*}$, provided that a sufficient amount of auxiliary unpaired data $x\sim\pi^{*}_{x}$, $y\sim\pi^{*}_{y}$ is available.

Notations. Throughout the paper, ${\mathcal{X}}$ and ${\mathcal{Y}}$ represent Euclidean spaces, equipped with the standard norm $\|\cdot\|$, induced by the inner product $\langle\cdot,\cdot\rangle$, i.e., ${\mathcal{X}}\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}\mathbb{R}^{D_{
x}}$ and ${\mathcal{Y}}\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}\mathbb{R}^{D_{
y}}$. The set of absolutely continuous probability distributions on ${\mathcal{X}}$ is denoted by ${\mathcal{P}}_{\text{ac}}({\mathcal{X}})$. For simplicity, we use the same notation for both the distributions and their corresponding probability density functions. The joint probability distribution over ${\mathcal{X}}\times{\mathcal{Y}}$ is denoted by $\pi$ with corresponding marginals $\pi_{x}$ and $\pi_{y}$. The set of joint distributions with given marginals $\alpha$ and $\beta$ is represented by $\Pi(\alpha,\beta)$. We use $\pi(\cdot|x)$ for the conditional distribution, while $\pi(y|x)$ represents the conditional density at a specific point y. The differential entropy is given by $\mathrm{H}\left(\beta\right)=-\int_{{\mathcal{Y}}}\beta(y)\log{\beta(y)}\,dy$.

## 2 Background

First, we recall the formulation of the domain translation problem (\wasyparagraph2.1). We remind the difference between its paired, unpaired, and semi-supervised setups. Next, we recall the basic concepts of the inverse entropic optimal transport, which are relevant to our paper (\wasyparagraph2.2).

### 2.1 Domain Translation Problems

The goal of domain translation (DT) task is to transform data samples from the source domain to the target domain while maintaining the essential content or structure. This approach is widely used in applications like computer vision (Zhu et al., ; Lin et al., ; Peng et al., ), natural language processing (Jiang et al., ; Morishita et al., ), and audio processing (Du et al., ), etc. Domain translation task setups can be classified into supervised (or paired), unsupervised (or unpaired), and semi-supervised approaches based on the data used for training (see Figure 1).

Supervised (Paired) Domain Translation relies on matched examples from both the source and target domains, where each input corresponds to a specific output, enabling direct supervision during the learning process. Formally, this setup assumes access to a set of $P$ empirical pairs $XY_{\text{paired}}\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}\{(x_{1},y
_{1}),\dots,(x_{P},y_{P})\}\sim\pi^{*}$ from some unknown joint distribution. The goal here is to recover the conditional distributions $\pi^{*}(\cdot|x)$ to generate samples $y|x_{\text{new}}$ for new inputs $x_{\text{new}}$ that are not present in the training data. While this task is relatively straightforward to solve, obtaining such paired training datasets can be challenging, as it often involves significant time, cost, and effort.

Unsupervised (Unpaired) Domain Translation, in contrast, does not require direct correspondences between the source and target domains (Zhu et al., , Figure 2). Instead, it involves learning to translate between domains using unpaired data, which offers greater flexibility but demands advanced techniques to achieve accurate translation. Formally, we are given $Q$ unpaired empirical samples $X_{\text{unpaired}}\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}\{x_{1},
\dots,x_{Q}\}\sim\pi^{*}_{x}$ from the source distribution and $R$ unpaired samples $Y_{\text{unpaired}}\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}\{y_{1},
\dots,y_{R}\}\sim\pi^{*}_{y}$ from the target distribution. Our objective is to learn the conditional distributions $\pi^{*}(\cdot|x)$ of the unknown joint distribution $\pi^{*}$, whose marginals are $\pi^{*}_{x}$, $\pi^{*}_{y}$, respectively. Clearly, the primary challenge in unpaired setup is that the task is inherently ill-posed, leading to multiple potential solutions, many of which may be ambiguous or even not meaningful (Moriakov et al., ). Ensuring the translation’s accuracy and relevance requires careful consideration of constraints and regularization strategies to guide the learning process (Yuan et al., ). Overall, the unpaired setup is very important because of large amounts of unpaired data in the wild.

Figure: (a) Supervised (paired) domain translation setup.
Refer to caption: extracted/5899032/images/paired_learning.png

Semi-supervised domain translation combines both approaches by utilizing a mix of paired and unpaired data (Tripathy et al., ; Jiang et al., ). This setup aims to leverage the advantages of paired data to guide the translation process while also taking advantage of the larger volume of unpaired data to improve the model’s performance and generalization. Formally, one assumes access to both pairs $XY_{\text{paired}}\sim\pi^{*}$ and additional unpaired samples $X_{\text{unpaired}}\sim\pi^{*}_{x}$, $Y_{\text{unpaired}}\sim\pi^{*}_{y}$. Note that since paired samples can also be used in the unpaired manner, by convention, we assume that $P\leq Q,R$ and first $P$ unpaired samples are exactly the paired ones, i.e., $x^{\prime}_{r}=x_{r}$ and $y^{\prime}_{r}=y_{r}$ for $r\leq R$. In turn, the goal is still to learn $\pi^{*}(\cdot|x)$ using the available samples.

### 2.2 Optimal Transport (OT)

The foundations of optimal transport (OT) are detailed in the seminal book by (Villani et al., ). For a more comprehensive overview, we refer to (Santambrogio, ; Peyré et al., ).

Entropic OT (Cuturi, ; Genevay, ).
Consider source $\alpha\in{\mathcal{P}}_{\text{ac}}({\mathcal{X}})$ and target $\beta\in{\mathcal{P}}_{\text{ac}}({\mathcal{Y}})$ distributions. Let $c^{*}:{\mathcal{X}}\times{\mathcal{Y}}\to{\mathbb{R}}$ be a cost function. The entropic optimal transport problem between distributions $\alpha$ and $\beta$ is then defined as follows:

$$ $\text{OT}_{c^{*},\varepsilon}\left(\alpha,\beta\right)\mathrel{\overset{ \makebox[0.0pt]{\mbox{def}}}{=}}\min\limits_{\pi\in\Pi(\alpha,\beta)}\mathbb{E }_{x,y\sim\pi}[c^{*}(x,y)]-\varepsilon\mathbb{E}_{x\sim\alpha}\mathrm{H}\left( \pi(\cdot|x)\right),$ (1) $$

where $\varepsilon>0$ is the regularization parameter. Setting $\varepsilon=0$ recovers the classic OT formulation (Villani et al., ) originally proposed by (Kantorovich, ).
With mild assumptions, the transport plan $\pi^{*}\in\Pi(\alpha,\beta)$ that minimizes the objective (1) exists uniquely. It is called the entropic OT plan.

We note that in the literature, the entropy regularization term in (1) is usually $-\varepsilon\mathrm{H}\left(\pi\right)$ or $+\varepsilon\mathrm{KL}\left(\pi\|\alpha\times\beta\right)$. However, these forms are equivalent up to constants, see discussion in (Mokrov et al., , \wasyparagraph2) or (Gushchin et al., , \wasyparagraph1). In our paper, we work only with formulation (1), which is also known as the weak form of the entropic OT, see (Gozlan et al., ; Backhoff-Veraguas et al., ; Backhoff-Veraguas & Pammer, ).

Dual formulation. With mild assumptions on $c^{*},\alpha,\beta$, the following dual OT formulation holds:

$$ $\text{OT}_{c^{*},\varepsilon}\left(\alpha,\beta\right)=\sup_{f}\left\{\mathbb{ E}_{x\sim\alpha}f^{c^{*}}(x)+\mathbb{E}_{y\sim\beta}f(y),\right\}$ (2) $$

where $f$ ranges over a certain subset of continuous functions (dual potentials) with mild assumptions on their boundness, see (Backhoff-Veraguas & Pammer, , Eq. 3.3) for details. The term $f^{c^{*}}$ represents the so-called weak entropic $c^{*}$-transform of $f$, defined as:

$$ $f^{c^{*}}(x)\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}\min\limits_{ \beta\in{\mathcal{P}}({\mathcal{Y}})}\big{\{}\mathbb{E}_{y\sim\beta}[c^{*}(x,y )]-\varepsilon\mathrm{H}\left(\beta\right)-\mathbb{E}_{y\sim\beta}f(y)\big{\}}.$ (3) $$

It has closed-form (Mokrov et al., , Eq. 14), which is given by

$$ $f^{c^{*}}(x)=-\varepsilon\log\int_{\mathcal{Y}}\exp\left(\dfrac{f(y)-c^{*}(x,y )}{\varepsilon}\right)\mathrm{d}y.$ (4) $$

Inverse entropic OT. The forward OT problem (1) focuses on determining the OT plan $\pi^{*}$ given a predefined cost function $c^{*}$. In contrast, the inverse problem provides the learner with a joint distribution $\pi^{*}$ and requires finding a cost function $c^{*}$ such that $\pi^{*}$ becomes the OT plan between its marginals, $\pi^{*}_{x}$ and $\pi^{*}_{y}$. This setup leads to the formulation of the inverse entropic OT problem, which can be expressed as the following minimization problem:

$$ $c^{*}\in\operatorname*{arg\,min}_{c}\bigg{[}\underbrace{\bigg{(}\mathbb{E}_{x, y\sim\pi^{*}}[c(x,y)]-\varepsilon\mathbb{E}_{x\sim\pi^{*}_{x}}\mathrm{H}\left( \pi^{*}(\cdot|x)\right)\bigg{)}}_{\geq\text{OT}_{c,\varepsilon}\left(\pi^{*}_{ x},\pi^{*}_{y}\right)}-\text{OT}_{c,\varepsilon}\left(\pi^{*}_{x},\pi^{*}_{y} \right)\bigg{]},$ (5) $$

where $c$ skims through measurable functions $\mathcal{X}\times\mathcal{Y}\rightarrow\mathbb{R}$. The expression within the parentheses denotes the entropic transport cost of the plan $\pi^{*}$ in relation to the cost c between the marginals $\pi^{*}_{x}$ and $\pi^{*}_{y}$, thus ensuring that it is always greater than or equal to the optimal cost $\text{OT}_{c,\varepsilon}(\pi^{*}_{x},\pi^{*}_{y})$. Consequently, the minimum achievable value for the entire objective is zero, which occurs only when $\pi^{*}$ corresponds to the optimal transport plan for the selected cost $c^{*}$. Here, the term $-\varepsilon\mathbb{E}_{x\sim\pi^{*}_{x}}\mathrm{H}\left(\pi(\cdot|x)\right)$ can be omitted, as it does not depend on c. Additionally

- •
Unlike the forward OT problem (1), the entropic regularization parameter $\varepsilon>0$ here plays no significant role. Indeed, by substituting $c(x,y)=\frac{\varepsilon}{\varepsilon^{\prime}}c^{\prime}(x,y)$ and multiplying the entire objective (5) by $\frac{\varepsilon^{\prime}}{\varepsilon}$, one gets the inverse OT problem for $\varepsilon^{\prime}$. Hence, the problems associated with different $\varepsilon$ are equivalent up to the change of variables, which is not the case for the forward OT (1).
- •
The inverse problem admits several possible solutions $c^{*}$. For example, $c^{*}(x,y)=-\varepsilon\log\pi^{*}(x,y)$ provides the minimum, which can be verified through direct substitution. Similarly, cost functions of the form $c^{*}(x,y)=-\varepsilon\log\pi^{*}(x,y)+u(x)+v(y)$ are also feasible, as adding terms dependent only on $x$ or $y$ does not alter the OT plan. In particular, when $u(x)=\varepsilon\log\pi^{*}_{x}(x)$ and $v(y)=0$, one gets $c^{*}(x,y)=-\varepsilon\log\pi^{*}(y|x)$.

In practice, the joint distribution $\pi^{*}$ is typically available only through empirical samples, meaning that its density is often unknown. As a result, specific solutions such as $c^{*}(x,y)=-\varepsilon\log\pi^{*}(x,y)$ or $-\varepsilon\log\pi^{*}(y|x)$ cannot be directly utilized. Consequently, it becomes necessary to develop parametric estimators $\pi^{\theta}$ to approximate them using the available samples.

## 3 Semi-supervised Domain Translation via Inverse Entropic OT

In \wasyparagraph3.1, we develop our proposed loss function that seamlessly integrates both paired and unpaired data samples. In \wasyparagraph3.2, we demonstrate that derived loss is inherently linked to the inverse entropic optimal transport problem (5). In \wasyparagraph3.3, we introduce lightweight parametrization to overcome challenges associated with optimizing the loss function. All our proofs can be found in Appendix A.

### 3.1 Loss Derivation

Part I. Data likelihood maximization and its limitation. Our goal is to approximate the true distribution $\pi^{*}$ by some parametric model $\pi^{\theta}$, where $\theta$ represents the parameters of the model. To achieve this, we would like to employ the standard KL-divergence minimization framework, also known as data likelihood maximization. Namely, we aim to minimize

$$ $\displaystyle\mathrm{KL}\left(\pi^{*}\|\pi^{\theta}\right)=\mathbb{E}_{x,y\sim \pi^{*}}\log\dfrac{\pi^{*}_{x}(x)\pi^{*}(y|x)}{\pi^{\theta}_{x}(x)\pi^{\theta} (y|x)}=\mathbb{E}_{x\sim\pi^{*}_{x}}\log\dfrac{\pi^{*}_{x}(x)}{\pi^{\theta}_{x }(x)}+\mathbb{E}_{x,y\sim\pi^{*}}\log\dfrac{\pi^{*}(y|x)}{\pi^{\theta}(y|x)}=$ $\displaystyle\mathrm{KL}\left(\pi^{*}_{x}\|\pi^{\theta}_{x}\right)+\mathbb{E}_ {x\sim\pi^{*}_{x}}\mathbb{E}_{y\sim\pi^{*}(\cdot|x)}\log\dfrac{\pi^{*}(y|x)}{ \pi^{\theta}(y|x)}=\underbrace{\mathrm{KL}\left(\pi^{*}_{x}\|\pi^{\theta}_{x} \right)}_{\text{Marginal}}+\underbrace{\mathbb{E}_{x\sim\pi^{*}_{x}}\mathrm{KL }\left(\pi^{*}(\cdot|x)\|\pi^{\theta}(\cdot|x)\right)}_{\text{Conditional}}.$ (6) $$

It is clear that objective (6) splits into two independent components: the marginal and the conditional matching terms. Our focus will be on the conditional component $\pi^{\theta}(\cdot|x)$, as it is the necessary part for the domain translation. Note that the marginal part $\pi^{\theta}_{x}$ is not actually needed. The conditional part of (6) can further be divided into the following two terms:

$$ $\mathbb{E}_{x\sim\pi^{*}_{x}}\mathbb{E}_{y\sim\pi^{*}(\cdot|x)}\left[\log\pi^{ *}(y|x)-\log\pi^{\theta}(y|x)\right]=-\mathbb{E}_{x\sim\pi^{*}_{x}}\mathrm{H} \left(\pi^{*}(\cdot|x)\right)-\mathbb{E}_{x,y\sim\pi^{*}}\log\pi^{\theta}(y|x).$ (7) $$

The first term is independent on $\theta$, so we obtain the following minimization objective

$$ ${\mathcal{L}}(\theta)\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}- \mathbb{E}_{x,y\sim\pi^{*}}\log\pi^{\theta}(y|x).$ (8) $$

It is important to note that minimizing (8) is equivalent to maximizing the conditional likelihood, a strategy utilized in conditional normalizing flows (CNFs) (Papamakarios et al., ). However, a major limitation of this approach is its reliance solely on paired data from $\pi^{*}$, which can be difficult to obtain in real-world scenarios. In the following section, we modify this strategy to incorporate available unpaired data within a semi-supervised learning setup (see \wasyparagraph2.1).

Part II. Solving the limitations via smart parameterization.
To address the above-mentioned issue and leverage unpaired data, we first use Gibbs-Boltzmann distribution density parametrization:

$$ $\pi^{\theta}(y|x)\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}\dfrac{\exp {\left(-E^{\theta}(y|x)\right)}}{Z^{\theta}(x)},$ (9) $$

where $E^{\theta}(\cdot|x):{\mathcal{Y}}\to{\mathbb{R}}$ is the Energy function, and $Z^{\theta}(x)\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}\int_{{\mathcal
{Y}}}\exp{\left(-E^{\theta}(y|x)\right)}\mathrm{d}y$ is the normalization constant (LeCun et al., ). Substituting (9) into (8), we get

$$ $-\mathbb{E}_{x,y\sim\pi^{*}}\log\pi^{\theta}(y|x)=\mathbb{E}_{x,y\sim\pi^{*}}E ^{\theta}(y|x)+\mathbb{E}_{x\sim\pi^{*}_{x}}\log{Z^{\theta}(x)}.$ (10) $$

This objective already provides an opportunity to exploit the unpaired samples from the marginal distribution $\pi^{*}_{x}$ to learn the conditional distributions $\pi^{\theta}(\cdot|x)\approx\pi^{*}(\cdot|x)$. Namely, it helps to estimate the part of the objective related to the normalization constant $Z^{\theta}$. To incorporate separate samples from the second marginal distribution $\pi^{*}_{y}$, it is essential to choose a parametrization that allows to detach from the energy function $E^{\theta}(y|x)$ the term depending solely on $y$. Thus, we propose:

$$ $E^{\theta}(y|x)\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}\dfrac{c^{ \theta}(x,y)-f^{\theta}(y)}{\varepsilon}.$ (11) $$

The parameterization in (11) indeed permits the separation of the function $f^{\theta}(y)$. By setting $f^{\theta}(y)\equiv 0$ and $\varepsilon=0$, the parameterization of the energy function $E^{\theta}(y|x)$ remains consistent, as it can be exclusively derived from $c^{\theta}(x,y)$. Finally, by substituting (11) into (10), we arrive at our final objective, which integrates both paired and unpaired data:

$$ ${\mathcal{L}}(\theta)\!=\!\!\underbrace{\varepsilon^{-1}\mathbb{E}_{x,y\sim\pi ^{*}}[c^{\theta}(x,y)]}_{\text{Joint, requires pairs $(x,y)\sim\pi^{*}$}}- \underbrace{\varepsilon^{-1}\mathbb{E}_{y\sim\pi^{*}_{y}}f^{\theta}(y)}_{\text {Marginal, requires $x\sim\pi^{*}_{y}$}}-\underbrace{\mathbb{E}_{x\sim\pi^{*}_ {x}}\log{Z^{\theta}(x)}}_{\text{Marginal, requires $x\sim\pi^{*}_{x}$}}\to\min \limits_{\theta}.$ (12) $$

At this point, a reader may come up with 2 reasonable questions regarding (12):

- 1.
How to perform the optimization of the proposed objective? This question is not straightforward due to the existence of the (typically intractable) normalizing constant $Z_{\theta}$ in the objective.
- 2.
To which extent do the separate terms in (12) (paired, unpaired data) contribute to the objective, and which type of data is the most important for learning the correct solution?

We answer these questions in \wasyparagraph3.3 and \wasyparagraph5. Before doing that, in the next section, we demonstrate a surprising finding that our proposed objective exactly solves the inverse entropic OT problem (5).

### 3.2 Relation to Inverse Entropic Optimal Transport

In this section, we show that (5) is equivalent to $\eqref{eq:loss}$. Indeed, directly substituting the dual form of entropic OT (2) into the inverse entropic OT problem (5) with the omitted entropy term yields:

$$ $\displaystyle\min\limits_{c}\left\{\mathbb{E}_{x,y\sim\pi^{*}}[c(x,y)]-\max \limits_{f}\left[\mathbb{E}_{x\sim\pi^{*}_{x}}f^{c}(x)+\mathbb{E}_{y\sim\pi^{* }_{y}}f(y)\right]\right\}=$ (13) $\displaystyle\min_{c,f}\left\{\mathbb{E}_{x,y\sim\pi^{*}}[c(x,y)]-\mathbb{E}_{ x\sim\pi^{*}_{x}}f^{c}(x)-\mathbb{E}_{y\sim\pi^{*}_{y}}f(y)\right\}.$ (14) $$

Now, let’s assume that both $c$ and $f$ are parameterized as $c^{\theta}$ and $f^{\theta}$ with respect to a parameter $\theta$. Based on the definition provided in (4) and utilizing our energy function parameterization from (11), we can express $(f^{\theta})^{c^{\theta}}(x)$ as follows:

$$ $(f^{\theta})^{c^{\theta}}(x)=-\varepsilon\log\int_{\mathcal{Y}}\exp\left(\frac {f^{\theta}(y)-c^{\theta}(x,y)}{\varepsilon}\right)\mathrm{d}y=-\varepsilon \log Z^{\theta}(x).$ (15) $$

This clarification shows that the expression in (13) aligns with our proposed likelihood-based loss in (12), scaled by $\varepsilon$. This finding indicates that inverse entropic optimal transport (OT) can be interpreted as a likelihood maximization problem, which opens up significant avenues to leverage established likelihood maximization techniques for optimizing inverse entropic OT, such as the evidence lower bound methods (Barber, ; Alemi et al., ) and expectation-maximization strategies (MacKay, ; Bishop & Bishop, ), etc.

Moreover, this insight allows us to reframe inverse entropic OT as addressing the semi-supervised domain translation problem, as it facilitates the use of both paired data from $\pi^{*}$ and unpaired data from $\pi^{*}_{x}$ and $\pi^{*}_{y}$. Notably, to our knowledge, the inverse OT problem has primarily been explored in discrete learning scenarios that assume access only to paired data (refer to \wasyparagraph4).

### 3.3 Practical Light Parameterization and Optimization Procedure

The most computationally intensive aspect of optimizing the loss function in (12) lies in calculating the integral for the normalization constant $Z^{\theta}$. To tackle this challenge, we propose a lightweight parameterization that yields closed-form expressions for each term in the loss function. Our proposed cost function parameterization $c^{\theta}$ is grounded in the log-sum-exp function (Murphy, ), which is widely recognized in the deep learning community for its practical advantages:

$$ $c^{\theta}(x,y)=-\varepsilon\log\sum_{m=1}^{M}v^{\theta}_{m}(x)\exp\left(\frac {\langle b^{\theta}_{m}(x),y\rangle}{\varepsilon}\right),$ (16) $$

where $\{v^{\theta}_{m}(x):\mathbb{R}^{D_{x}}\rightarrow\mathbb{R}_{+},b^{\theta}_{m}
(x):\mathbb{R}^{D_{x}}\rightarrow\mathbb{R}^{D_{y}}\}_{m=1}^{M}$ are arbitrary parametric functions, e.g., neural networks, with learnable parameters denoted by $\theta_{c}$. Inspired by the work (Korotin et al., ), we employ Gaussian mixture parametrization in the dual potential $f^{\theta}$:

$$ $f^{\theta}(y)=\varepsilon\log\sum_{n=1}^{N}w^{\theta}_{n}{\mathcal{N}}(y\,|\,a ^{\theta}_{n},\varepsilon A^{\theta}_{n}),$ (17) $$

where $\theta_{f}\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}\{w^{\theta}_{n},a
^{\theta}_{n},A^{\theta}_{n}\}_{n=1}^{N}$ are learnable parameters of the potential, with $w^{\theta}_{n}\geq 0$, $a^{\theta}_{n}\in\mathbb{R}^{D_{y}}$, and $A^{\theta}_{n}\in\mathbb{R}^{D_{y}\times D_{y}}$ being a symmetric positive definite matrix. Thereby, our framework comprises a total of $\theta\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}\theta_{f}\cup\theta_{c}$ learnable parameters. For clarity and to avoid notation overload, we will omit the superscript ^θ associated learnable parameters and functions in the subsequent formulas.

###### Proposition 3.1 (Tractable form of the normalization constant) .

Our parametrization of the cost function (16) and dual potential (17) delivers $Z^{\theta}(x)\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}\sum_{m=1}^{M}
\sum_{n=1}^{N}z_{mn}(x)$, where

$$ $z_{mn}(x)\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}w_{n}v_{m}(x)\exp \left(\dfrac{b^{\top}_{m}(x)A_{n}b_{m}(x)+2a_{n}^{\top}b_{m}(x)}{2\varepsilon} \right).$ (18) $$

The proposition offers a closed-form expression for $Z^{\theta}(x)$, which is essential for optimizing (12). Furthermore, the following proposition provides a method for sampling $y$ given a new sample $x_{\text{new}}$.

###### Proposition 3.2 (Tractable form of the conditional distributions) .

From our parametrization of the cost function (16) and dual potential (17) it follows that the $\pi^{\theta}(\cdot|x)$ are Gaussian mixtures:

$$ $\pi^{\theta}(y|x)=\frac{1}{Z^{\theta}(x)}\sum_{m=1}^{M}\sum_{n=1}^{N}z_{mn}(x) {\mathcal{N}}(y\,|\,s_{mn}(x),\varepsilon A_{n}),$ (19) $$

where $s_{mn}(x)\mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}a_{n}+A_{n}b_{m}(x)$ and $z_{mn}(x)$ defined in Proposition 3.1.

Training. As stated in \wasyparagraph2.1, since we only have access to the samples from the distributions, we will optimize the empirical counterpart of (12) via stochastic gradient descent in the parameters $\theta$:

$$ ${\mathcal{L}}(\theta)\approx\widehat{{\mathcal{L}}}(\theta)\mathrel{\overset{ \makebox[0.0pt]{\mbox{def}}}{=}}\frac{1}{P}\sum_{p=1}^{P}c^{\theta}(x_{p},y_{p })-\frac{1}{Q}\sum_{q=1}^{Q}[-\varepsilon\log Z^{\theta}(x_{q})]-\frac{1}{R} \sum_{r=1}^{R}f^{\theta}(y_{r})\to\min\limits_{\theta}.$ (20) $$

Inference. According to our Proposition 3.2, the conditional distributions $\pi^{\theta}(\cdot|x)$ are Gaussian mixtures (19). As a result, sampling $y$ given $x$ is straightforward and light-speed.

###### Proposition 3.1 (Tractable form of the normalization constant) .

###### Proposition 3.2 (Tractable form of the conditional distributions) .

## 4 Related Works

We review below the most related semi-supervised models and OT-based approaches to our work.

Semi-supervised models. As mentioned in \wasyparagraph1, many existing semi-supervised domain translation methods combine paired and unpaired data by incorporating multiple loss terms into complex optimization objectives (Jin et al., , \wasyparagraph3.3), (Tripathy et al., , \wasyparagraph3.5), (Mustafa & Mantiuk, , \wasyparagraph3.2), (Paavilainen et al., , \wasyparagraph2), (Panda et al., , Eq. 8), (Tang et al., , Eq. 8). However, these approaches often require careful tuning of hyperparameters to balance the various loss terms.

The recent work by (Gu et al., ) utilizes both paired and unpaired data to build a transport plan based on key-point guided OT, initially introduced in (Gu et al., ). This transport plan is used as a heuristic to train a conditional score-based model on unpaired or semi-paired data. Overall, we note that the idea of applying OT in a semi-supervised manner traces back to the seminal work by (Courty et al., ), although their focus was on classification, not domain translation.

Another recent work by (Asadulaev et al., ) introduces a neural network-based OT framework for semi-supervised scenarios, utilizing general cost functionals for OT. However, their method requires manually constructing cost functions which can incorporate class labels or predefined pairs. In contrast, our approach adjusts the cost dynamically during training.

(Inverse) OT solvers. Our approach builds upon the light OT methods proposed by (Korotin et al., ; Gushchin et al., ), which introduce a forward solver for the entropic OT problem with the quadratic cost function $c^{*}(x,y)=\frac{1}{2}\|x-y\|^{2}_{2}$ using the Gaussian Mixture parametrization. However, we consider a more general cost function (16) and incorporate cost function learning directly into the objective (20), in fact, producing an inverse OT (5) solver.

As highlighted in \wasyparagraph2.2, the task of inverse optimal transport (IOT) implies learning the cost function from samples drawn from an optimal coupling $\pi^{*}$. Existing IOT solvers (Dupuy & Galichon, ; Dupuy et al., ; Li et al., ; Stuart & Wolfram, ; Ma et al., ; Chiu et al., ; Galichon & Salanié, ) focus on reconstructing cost functions from discrete marginal distributions, in particular, using the log-likelihood maximization techniques (Dupuy et al., ), see the introduction of (Andrade et al., ) for a review. In contrast, we develop a log-likelihood based approach aimed at learning a conditional distribution $\pi^{\theta}(\cdot|x)\approx\pi^{*}(\cdot|x)$ that incorporates both paired and unpaired data but not the cost function itself.

Recent work by (Howard et al., ) proposes a framework for learning cost functions to improve the mapping between the domains. However, it is limited by the use of deterministic mappings, i.e., does not have the ability to model non-degenerate conditional distributions.

## 5 Experimental Illustrations

We tested our solver on both synthetic data (\wasyparagraph5.1) and real-world data distributions (\wasyparagraph5.2). The code is written using the PyTorch framework and will be made publicly available. It is provided in the supplemental materials. Experimental details are given in Appendix B.

### 5.1 Swiss Roll

Figure: (a) Unpaired data.
Refer to caption: extracted/5899032/images/source_target.png

Setup. For illustration purposes, we adapt the setup described in (Mokrov et al., ; Korotin et al., ) for our needs and consider a synthetic task where we transform samples from a Gaussian distribution $\pi^{*}_{x}$ into a Swiss Roll $\pi^{*}_{y}$ distribution (Figure 2(a)). The plan $\pi^{*}$ is generated by sampling from the mini-batch OT plan using the POT library (Flamary et al., ). We specifically chose a transportation cost for the minibatch OT to construct an optimal plan $\pi^{*}$ with bi-modal conditional distributions $\pi^{*}(\cdot|x)$ to assess how well our method performs in such a scenario. See Appendix B.2.1 for more details. During training, we use $P=128$ paired (Figure 2(b)) and $Q=R=1024$ unpaired samples. For an ablation study on how varying amounts of paired and unpaired data affect our method’s performance, see Appendix B.2.4.

Baselines. We compare our method against several well-known generative modeling techniques, including: Conditional Normalizing Flow (Winkler et al., , CNF), Conditional Generative Adversarial Network (Mirza & Osindero, , CGAN), Unconditional GAN (Goodfellow et al., ) with $\ell^{2}$ loss supplement (UGAN+$\ell^{2}$), and just multilayer perceptron (MLP) regression with $\ell^{2}$ loss. For a detailed explanation of baselines employed in our experiments, please see Appendix B.2.2. Some of the baseline methods can fully utilize both paired and unpaired data during training, while others can use paired data only, see Table 1.

**Table 1: The ability to use of paired/unpaired data by various models.**
| Method | Paired<br>$(x,y)\sim\pi^{*}$ | Unpaired<br>$x\sim\pi^{*}_{x}$ | Unpaired<br>$y\sim\pi^{*}_{y}$ |
| --- | --- | --- | --- |
| Conditional NF | ✓ | ✗ | ✗ |
| Conditional GAN | ✓ | ✓ | ✗ |
| Unconditional GAN + $\ell^{2}$ | ✓ | ✓ | ✓ |
| Regression | ✓ | ✗ | ✗ |
| Our method | ✓ | ✓ | ✓ |

Discussion. The results of the aforementioned methods are depicted in Figure 2. Clearly, the Regression model simply predicts the conditional mean $\mathbb{E}_{y\sim\pi^{*}(\cdot|x)}y$, failing to capture the full distribution. The CNF model suffers from overfitting, likely due to the limited availability of paired data $XY_{\text{paired}}$. The CGAN is unable to accurately learn the target distribution $\pi^{*}_{y}$, while the UGAN+$\ell^{2}$ fails to capture the underlying conditional distribution, resulting in suboptimal performance. As a sanity check, we evaluate all baselines using a large amount of paired data. Details are given in Appendix B.2.3.

### 5.2 Weather prediction

Here we aim to evaluate our proposed approach on real-world data. We consider the weather prediction dataset (Malinin et al., ; Rubachev et al., ).
The data is collected from weather stations and weather forecast physical models. It consists of $94$ meteorological features, e.g., pressure, wind, humidity, etc., which are measured over a period of one year at different spatial locations.

Setup. Initially, the problem was formulated as the prediction and uncertainty estimation of the air temperature at a specific time and location. We expand this task to the probabilistic prediction of all meteorological features, thereby reducing reliance on measurement equipment in remote and difficult-to-access locations, such as the Polar regions.

In more detail, we select two distinct months from the dataset and translate the meteorological features from the source month (January) to the target month (June). To operate at the monthly scale, we represent a source data point $x\in{\mathbb{R}^{188}}$ as the mean and standard deviation of the features collected at a specific location over the source month. The targets $y\in{\mathbb{R}^{94}}$ correspond to individual measurements in the target month. Pairs are constructed by aligning a source data point with the target measurements at the same location. Consequently, multiple target data points $y$ may correspond to a single source point $x$ and represent samples from conditional distributions $\pi^{*}(y|x)$. The measurements from non-aligned locations are treated as unpaired.

We obtain $500$ unpaired and $192$ paired data samples. For testing, $100$ pairs are randomly selected. We evaluate the performance of our approach by calculating the log-likelihood on the test target features. A natural baseline for this task is a probabilistic model that maximizes the likelihood of the target data. Thus, we implement an MLP that learns to predict the parameters of a mixture of Gaussians and is trained on the paired data only via the log-likelihood optimization (8).

Results. The results are presented in Table 2. Our experiments demonstrate that increasing the number of paired and unpaired data samples leads to improved test log-likelihood, which highlights the impact of the objective that employs both paired and unpaired data. Moreover, the proposed approach outperforms the baseline solution, which shows that even in problems where the paired data plays a key role for accurate predictions, incorporating the unpaired data can give an advantage.

**Table 2: The values of the test log-likelihood $\uparrow$ on the weather prediction dataset obtained for a different number of paired and unpaired training samples.**
|  | Baseline | Ours |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| $\#$paired<br>$\#$unpaired | 0 0 | $10$ | $50$ | $100$ | $250$ | $500$ |
| $10$ | $0.4\pm{.2}$ | $17.9\pm{.3}$ | $18.5\pm{.4}$ | $18.4\pm{.2}$ | $18.8\pm{.2}$ | $19.2\pm{.3}$ |
| $25$ | $3.5\pm{.09}$ | $18.3\pm{.06}$ | $18.7\pm{.2}$ | $18.8\pm{.07}$ | $19.5\pm{.1}$ | $19.8\pm{.1}$ |
| $50$ | $6.4\pm{.05}$ | $18.7\pm{.2}$ | $18.9\pm{.04}$ | $19.2\pm{.2}$ | $19.8\pm{.03}$ | $20.3\pm{.4}$ |
| $90$ | $6.5\pm{.1}$ | $19\pm{.01}$ | $19.4\pm{.05}$ | $19.4\pm{.2}$ | $20.3\pm{.05}$ | $20.5\pm{.09}$ |

## 6 Discussion

Limitations. A limitation of our approach is that it uses the Gaussian Mixture parameterization for conditional distributions. This may limit its scalability. As a promising avenue for future work is incorporation of the more general parameterizations, such as neural networks, which are already well-studied in the context of forward entropic OT, see (Mokrov et al., ).

Potential impact. Our framework has a simple and non-minimax optimization objective that seamlessly incorporates both unpaired and paired samples into the training. We expect that these advantages will encourage the use of our framework to develop other max-likelihood-based semi-supervised approaches based on more advanced (than Gaussian mixtures) techniques, e.g., energy-based models (LeCun et al., ; Du & Mordatch, ), diffusion models (Ho et al., ), etc.

Broader impact. This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none of which we feel must be specifically highlighted here.

Reproducibility Statement For all the presented experiments, a full set of hyperparameters is introduced either in \wasyparagraph5 or in Appendix B. In addition, the code is submitted as supplementary material, with guidelines on how to run every experiment included.

## Acknowledgments

Skoltech was supported by the Analytical center under the RF Government (subsidy agreement 000000D730321P5Q0002, Grant No. 70-2021-00145 02.11.2021).

## Appendix A Proofs

###### Proof of Proposition 3.1 .

Thanks to our parametrization of the cost $c^{\theta}$ (16) and the dual potential $f^{\theta}$ (17), we obtain:

$$ $\displaystyle\exp\left(\frac{f^{\theta}(y)-c^{\theta}(x,y)}{\varepsilon}\right )=\exp\left(\log\sum_{n=1}^{N}w_{n}{\mathcal{N}}(y\,|\,a_{n},\varepsilon A_{n} )+\log\sum_{m=1}^{M}v_{m}(x)\exp\left(\frac{\langle b_{m}(x),y\rangle}{ \varepsilon}\right)\right)$ $\displaystyle=\sum_{m=1}^{M}\sum_{n=1}^{N}\dfrac{v_{m}(x)w_{n}}{\sqrt{\det(2 \pi A_{n}^{-1})}}\exp\left(-\frac{1}{2}(y-a_{n})^{\top}\frac{A_{n}^{-1}}{ \varepsilon}(y-a_{n})+\frac{\langle b_{m}(x),y\rangle}{\varepsilon}\right)$ $$

Now we need to transform the expression above into the form of a Gaussian Mixture Model. To achieve this, we rewrite the formula inside the exponent using the fact that $A_{n}$ is a symmetric:

$$ $\displaystyle(y-a_{n})^{\top}A_{n}^{-1}(y-a_{n})-2\langle b_{m}(x),y\rangle=y^ {\top}A_{n}^{-1}y-2a_{n}^{\top}A_{n}^{-1}y+a_{n}^{\top}A_{n}^{-1}a_{n}-2 \langle b_{m}(x),y\rangle=$ $\displaystyle y^{\top}A_{n}^{-1}y-2\underbrace{(a_{n}+A_{n}b_{m}(x))^{\top}}_{ \mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}s^{\top}_{mn}(x)}A_{n}^{-1}y +a_{n}^{\top}A_{n}^{-1}a_{n}=$ $\displaystyle(y-s_{mn}(x))^{\top}A_{n}^{-1}(y-s_{mn}(x))+a_{n}^{\top}A_{n}^{-1 }a_{n}-s^{\top}_{mn}(x)A_{n}^{-1}s_{mn}(x).$ $$

Afterwards, we rewrite the last two terms:

$$ $\displaystyle a_{n}^{\top}A_{n}^{-1}a_{n}-s^{\top}_{mn}(x)A_{n}^{-1}s_{mn}(x)= a_{n}^{\top}A_{n}^{-1}a_{n}-(a_{n}+A_{n}b_{m}(x))^{\top}A_{n}^{-1}(a_{n}+A_{n} b_{m}(x))=$ $\displaystyle a_{n}^{\top}A_{n}^{-1}a_{n}-a_{n}^{\top}A_{n}^{-1}a_{n}-a_{n}^{ \top}A_{n}^{-1}A_{n}b_{m}(x)-b_{m}^{\top}(x)A_{n}A_{n}^{-1}a_{n}-b_{m}^{\top}( x)A_{n}A_{n}^{-1}A_{n}b_{m}(x)=$ $\displaystyle-b_{m}^{\top}(x)A_{n}b_{m}(x)-2a_{n}^{\top}b_{m}(x).$ $$

Finally, we get

$$ $\displaystyle\exp\left(\frac{f^{\theta}(y)-c^{\theta}(x,y)}{\varepsilon}\right )=\sum_{m=1}^{M}\sum_{n=1}^{N}\underbrace{w_{n}v_{m}(x)\exp\left(\dfrac{b^{ \top}_{m}(x)A_{n}b_{m}(x)+2a_{n}^{\top}b_{m}(x)}{2\varepsilon}\right)}_{ \mathrel{\overset{\makebox[0.0pt]{\mbox{def}}}{=}}z_{mn}(x)}$ $\displaystyle\cdot\underbrace{\dfrac{1}{\sqrt{\det(2\pi A_{n}^{-1})}}\exp\left (-\frac{1}{2}(y-s_{mn}(x))^{\top}\frac{A_{n}^{-1}}{\varepsilon}(y-s_{mn}(x)) \right)}_{={\mathcal{N}}(y\,|\,s_{mn}(x),\varepsilon A_{n})},$ $$

and thanks to $\int_{{\mathcal{Y}}}{\mathcal{N}}(y\,|\,s_{mn}(x),\varepsilon A_{n})\mathrm{d}
y=1$, the normalization constant simplifies to the sum of $z_{mn}(x)$:

$$ $\displaystyle Z^{\theta}(x)$ $\displaystyle=\int_{{\mathcal{Y}}}\exp\left(\frac{f^{\theta}(y)-c^{\theta}(x,y )}{\varepsilon}\right)\mathrm{d}y$ $\displaystyle=\int_{{\mathcal{Y}}}\sum_{m=1}^{M}\sum_{n=1}^{N}z_{mn}(x){ \mathcal{N}}(y\,|\,s_{mn}(x),\varepsilon A_{n})\mathrm{d}y=\sum_{m=1}^{M}\sum_ {n=1}^{N}z_{mn}(x).$ $$

∎

###### Proof of Proposition 3.2 .

Combining equations (9), (11) and derivation above, we seamlessly obtain the expression (19) needed for Proposition 3.2.
∎

###### Proof of Proposition 3.1 .

###### Proof of Proposition 3.2 .

## Appendix B Details of the Experiments

### B.1 General Implementation Details

To minimize (20), we parameterize $f^{\theta}$ (17) by representing $w_{n}$ using $\log w_{n}$, $a_{n}$ directly as a vector, and the matrix $A_{n}$ in diagonal form with $\log(A_{n})_{i,i}$ on its diagonal. For $c^{\theta}$ (16), we parameterize $v_{m}(x)$ as a multilayer perceptron (MLP) (Haykin, ) with ReLU activations (Agarap, ) and a LogSoftMax output layer, while $b_{m}(x)$ is also modeled as an MLP with ReLU activations. The depth and number of hidden layers vary depending on the experiment.

To further simplify optimization, we use diagonal matrices $A_{n}$ in the parameterization of $f^{\theta}$, which not only significantly reduces the number of learnable parameters in $\theta_{f}$, but also enables efficient computation of $A_{n}^{-1}$ with a time complexity of $\mathcal{O}(D_{y})$.

We utilize two separate Adam optimizers (Kingma, ) with different step sizes for paired and unpaired data to improve convergence.

As mentioned in \wasyparagraph• ‣ 2.2, the solver is independent of $\varepsilon$, so we set $\varepsilon=1$ for all experiments.

Initialization. We initialize $\log w_{n}$ as $\log\frac{1}{n}$, set $a_{n}$ using random samples from $\pi^{*}_{y}$, and initialize $\log(A_{n})_{i,i}$ with $\log(0.1)$. For the neural networks, we apply the default PyTorch (Ansel et al., ) initialization.

### B.2 Gaussian To Swiss Roll Mapping

In all experiments conducted in this section, we set the parameters as follows: $N=50$, $M=25$, with learning rates $lr_{\text{paired}}=3\times 10^{-4}$ and $lr_{\text{unpaired}}=0.001$. We utilize a two-layer MLP network for the function $b_{m}(x)$ and a single-layer MLP for $v_{m}(x)$. The experiments are executed in parallel on a 2080 Ti GPU for a total of 25,000 iterations, taking approximately 20 minutes to complete.

#### B.2.1 Transportation cost matrix

To create the ground truth plan $\pi^{*}$, we utilize the following procedure: We start by sampling a mini-batch of size 64 and then determine the optimal mapping using the entropic Sinkhorn algorithm, as outlined in (Cuturi, ) and implemented in (Flamary et al., ). This process is repeated $P$ times to generate the required number of pairs.

We define the cost matrix for mini-batch OT as $C=\min(C^{\varphi},C^{-\varphi})$, where $C^{\pm\varphi}$ represents matrices of pairwise $\ell_{2}$ distances between $x$ and $-y^{\pm\varphi}$, with $-y^{\pm\varphi}$ denoting the vector $-y$ rotated by an angle of $\varphi=\pm 90^{\circ}$. In other words, $x\sim\pi^{*}_{x}$ maps to $y$ located on the opposite side of the Swiss Roll, rotated by either $\varphi$ or $-\varphi$, as shown in Figure 2(c).

#### B.2.2 Discussion of the Baselines

In this section, we discuss the losses used by the baseline models in order to explain Table 1.

- •
Regression Model (MLP) uses the following simple $\ell^{2}$ loss
$\min_{\psi}\mathbb{E}_{(x,y)\sim\pi^{*}}||y-G_{\theta}(x)||^{2},$
where $G_{\theta}:\mathcal{X}\rightarrow\mathcal{Y}$ is a generator MLP with trainable parameters $\theta$. Clearly, such a model can use only paired data. Furthermore, it is known that the optimal regressor $G^{*}$ coincides with $\mathbb{E}_{y\sim\pi^{*}(\cdot|x)}y$, i.e., predicts the conditional expectation. Therefore, such a model will never learn the true data distribution unless all $\pi^{*}(\cdot|x)$ are degenerate.
- •
Conditional GAN uses the following $\min\max$ loss:
$\min_{\theta}\max_{\phi}\bigg{[}\underbrace{\mathbb{E}_{x,y\sim\pi^{*}}log(D_{
\phi}(y|x))}_{\text{Joint, requires pairs $(x,y)\sim\pi^{*}$}}+\underbrace{
\mathbb{E}_{x\sim\pi^{*}_{x}}\mathbb{E}_{z\sim p_{z}(z)}log(1-D_{\phi}(G_{
\theta}(z|x)|x)}_{\text{Marginal, requires $x\sim\pi^{*}_{x}$}}\bigg{]},$
where $G_{\theta}:\mathcal{Z}\times\mathcal{X}\rightarrow\mathcal{Y}$ is the conditional generator with parameters $\theta$, $p_{z}$ is a distribution on latent space $\mathcal{Z}$, and $D:\mathcal{Y}\times\mathcal{X}\rightarrow(0,1)$ is the conditional discriminator with parameters $\phi$. From the loss it is clear that the model can use not only paired data during the training, but also samples from $\pi^{*}_{x}$. The minimum of this loss is achieved when $G(\cdot|x)$ generates $\pi^{*}(\cdot|x)$ from $p_{z}$.
- •
Unconditional GAN + $\ell^{2}$ loss optimizes the following $\min\max$ objective:
$\min_{\theta}\max_{\phi}\bigg{[}\lambda\underbrace{\mathbb{E}_{(x,y)\sim\pi^{*
}}\mathbb{E}_{z\sim p_{z}}||y-G_{\theta}(x,z)||^{2}}_{\text{Joint, requires
pairs $(x,y)\sim\pi^{*}$}}+\!\!\underbrace{\mathbb{E}_{y\sim\pi^{*}_{y}}log(D_
{\phi}(y))}_{\text{Marginal, requires $y\sim\pi^{*}_{y}$}}\!\!\!\!+\underbrace
{\mathbb{E}_{x\sim\pi_{x}^{*}}\mathbb{E}_{z\sim p_{z}}log(1-D_{\phi}(G_{\theta
}(x,z))}_{\text{Marginal, requires $x\sim\pi^{*}_{x}$}}\bigg{]},$
where $\lambda>0$ is a hyperparameter. In turn, $G_{\theta}:\mathcal{X}\times\mathcal{Z}\rightarrow\mathcal{Y}$ is the stochastic generator. Compared to the unconditional case, the main idea here is to use the unconditional disctiminator $D_{\phi}:\mathcal{Y}\rightarrow(0,1)$. This allows using unpaired samples from $\pi^{*}_{y}$. However, using only GAN loss would not allow to use the paired information in any form, this is why the supervised $\ell^{2}$ loss is added ($\lambda=1$).
We note that this model has a trade-off between the target mathing loss (GAN loss) and regression loss (which suffers from averaging). Hence, the model is unlikely to learn the true paired data distribution and can be considered a heuristical loss to use both paired and unpaired data. Overall, we consider this baseline as most existing GAN-based solutions (Tripathy et al., , \wasyparagraph3.5), (Jin et al., , \wasyparagraph3.3), (Yang & Chen, , \wasyparagraphC), (Vasluianu et al., , \wasyparagraph3) for paired and unpaired data use objectives that are ideologically similar to this one.
- •
Conditional Normalizing Flow (Winkler et al., ) learns an explicit density model
$\pi^{\theta}(y|x)=p_{z}(G_{\theta}^{-1}(y|x))\left|\dfrac{\partial G_{\theta}^
{-1}(y|x)}{\partial y}\right|$
via optimizing log-likelihood (8) of the paired data. Here $G_{\theta}:\mathcal{Z}\times\mathcal{X}\rightarrow\mathcal{Y}$ is the conditional generator function. It is assumed that $\mathcal{Z}=\mathcal{Y}$ and $G_{\theta}(\cdot|x)$ is invertible and differentiable. In the implementation, we use the well-celebrated RealNVP neural architecture (Dinh et al., ). The optimal values are attached when the generator $G_{\theta}(\cdot|x)$ indeed generates $\pi^{\theta}(\cdot|x)=\pi^{*}(\cdot|x)$.
The conditional flow is expected to accurately capture the true conditional distributions, provided that the neural architecture is sufficiently expressive and there is an adequate amount of paired data available. However, as mentioned in \wasyparagraph3.1, a significant challenge arises in integrating unpaired data into the learning process. For instance, approaches such as those proposed by (Atanov et al., ; Izmailov et al., ) aim to extend normalizing flows to a semi-supervised context. However, these methods primarily assume that the input conditions $x$ are discrete, making it difficult to directly apply their frameworks to our continuous case.

#### B.2.3 Baselines for Swiss Roll with 16k data

Figure: (a) CNF.
Refer to caption: extracted/5899032/images/swiss_roll_baselines_16k/Light-IOT_cnf_16k.png

In this section, we show the results of training of the baselines on the large amount of both paired (16K) and unpaired (16K) data (Figure 3). Recall that the ground truth $\pi^{*}$ is depicted in Figure 2(c). We see that given a sufficient amount of training data, Conditional GAN (Figure 3(b)) nearly succeeds in learning the true conditional distributions $\pi^{*}(\cdot|x)$. The same applies to the conditional normalizing flow (Figure 3(a)), but its results are slightly worse, presumably due to the limited expressiveness of invertible flow architecture. Regression, as expected fails to learn anything meaningful because of the averaging effect (Figure 3(d)). In turn, the unconditional GAN$+\ell^{2}$ (Figure 3(c)) nearly succeeds in generating the target data $\pi^{*}_{y}$, but the learned plan is incorrect because of the averaging effect.

#### B.2.4 Ablation study

In this section, we conduct an ablation study to address the question posed in \wasyparagraph3.1 regarding how the number of source and target samples influences the quality of the learned mapping. The results, shown in Figure 4, indicate that the quantity of target points $R$ has a greater impact than the number of source points $Q$ (compare Figure 4(c) with Figure 4(b)). Additionally, it is evident that the inclusion of unpaired data helps mitigate overfitting, as demonstrated in Figure 4(a).

Figure: (a) $Q=0,R=0$
Refer to caption: extracted/5899032/images/Light-IOT_M=0_N=0_L=128.png

### B.3 Weather prediction

#### B.3.1 Implementation details

In general, we consider the same setting as in B. Specifically, we set $N=10,M=1$ and the number of optimization steps to $30,000$. The baseline uses an MLP network with the same number of parameters, predicting the parameters of a mixture of $10$ Gaussians.

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 3
presentation: 2
questions: See weakness
soundness: 2
strengths: Clarity: The paper is reasonably structured and provides some intuition on connecting OT with likelihood maximization.

Empirical Results: The empirical tests show potential for the method to handle limited paired data, a typical challenge in semi-supervised setups.
summary: This paper introduces a novel semi-supervised learning approach that leverages both paired and unpaired data to learn conditional distributions through a data likelihood maximization framework. The proposed method constructs a new loss function that integrates paired and unpaired data directly into the objective, with a connection to inverse entropic optimal transport (OT). By framing the problem as an inverse entropic OT, the authors develop an algorithm that employs Gaussian mixture parameterization to approximate the conditional distribution in a computationally efficient manner. The empirical evaluation demonstrates that this method can achieve effective learning outcomes even with limited paired data, as long as sufficient unpaired data is available, showing promising results on synthetic and real-world datasets.
weaknesses: Justification of Loss Function: The paper lacks sufficient theoretical or empirical justification for the specific loss function design. The decomposition into paired and unpaired data components seems plausible, but more discussion on its necessity or optimality would strengthen the work. Additionally, while the paper claims the loss solves inverse entropic OT, the practical implications of this for general semi-supervised tasks are underexplored.

Limited Comparisons: The experimental section lacks comparisons with several prominent semi-supervised learning methods that do not rely on OT or Gaussian mixtures. Without comparisons to these methods, it is challenging to gauge whether the proposed approach offers an advantage over non-OT-based techniques.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: - The authors describe their parameterization as "light-speed" - what are the specific computational advantages that justify this claim?
- What makes Gaussian mixture parameterization particularly suitable for the proposed loss compared to alternative parameterizations?
- How does the proposed method compare to existing semi-supervised domain translation techniques in terms of both theoretical properties and empirical performance?
soundness: 3
strengths: - Novel likelihood maximization loss for semi-supervised domain translation that elegantly handles both paired and unpaired data within a single objective.
- Novel theoretical connection established between inverse entropic optimal transport and likelihood estimation.
- Empirical validation demonstrating how performance scales with both paired and unpaired sample sizes.
summary: This paper presents a novel approach to semi-supervised domain translation by introducing a likelihood-based loss function that naturally incorporates both paired and unpaired samples. The key theoretical contribution is establishing a connection between their loss and inverse entropic optimal transport - a connection that hasn't been previously explored in the literature. The authors propose using a Gaussian mixture parameterization that allows closed-form expressions for their loss terms. They empirically validate their method against standard supervised/unsupervised approaches on synthetic 2D data and a weather prediction task.

While the paper presents an interesting theoretical contribution connecting inverse entropic optimal transport with likelihood estimation, the lack of comparisons against competing semi-supervised methods and limited experimental validation makes it difficult to assess the practical value of the proposed approach. Thus, currently the paper does not reach the bar for acceptance.
weaknesses: - Experimental validation:
	- While the related work section discusses multiple approaches to semi-supervised domain translation, the paper lacks empirical comparisons against any of these existing methods. This makes it difficult to assess the relative advantages of the proposed approach compared to established methods that also leverage both paired and unpaired data.
	- The paper would be substantially strengthened by: 1) clearly articulating the advantages of the proposed method over existing approaches, and 2) providing direct empirical comparisons against state-of-the-art semi-supervised methods. Currently, comparisons are limited to baseline methods that were not specifically designed for semi-supervised domain translation.
	- The experimental validation would benefit from including tests on higher-dimensional problems, such as the image translation tasks explored in [1], to demonstrate the method's scalability beyond simple domains.
- Reliance on Gaussian mixture parameterization:
	- The authors acknowledge that their choice of Gaussian mixture parameterization inherently limits the method's scalability to more complex domains.
	- The discussion of alternative parameterizations seems incomplete, leaving questions about potential extensions to more expressive models.
	- While the authors claim their parameterization is "light-speed," this assertion lacks proper justification or comparative analysis.

[1] Xiaole Tang, Xin Hu, Xiang Gu, and Jian Sun. "Residual-conditioned optimal transport: Towards structure-preserving unpaired and paired image restoration". ICML 2024.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 2
questions: - What is the intuitive interpretation of the new objective? This seems a bit ad-hoc/heuristic to introduce the $f(y)$ term for the sole purpose of using marginal samples from $p(y)$.

- Why use the parametrization in 16 and 17? What is the intuition of this parametrization? Is it a universal type of parametrization (i.e., can it represent all interesting cost functions)? Can you give examples of cost functions that do not have this form?

- How does this compare to the most natural likelihood objective that is $L(\theta) = E_{x,y}[-\log \pi^\theta(y|x)] + E_y[-\log E_x[\pi^\theta(y|x)]]$, which is basically the expected conditional KL plus a regularization term on the conditional that ensures it matches the marginal of p(y), i.e., integrating the conditional over the marginal of x should yield the marginal of y.  This seems to be a more straightforward (albeit hard-to-compute) semi-supervised objective.

- What does it mean that the x and y terms are asymmetric? It would seem that the marginal optimization terms should be symmetric as the unpaired data has no directionality per se.

- What if the paired data is not iid from the joint distribution? For example, if there are certain regions of the space that are more likely to have paired samples? This seems quite natural and reasonable in real-world scenarios. How would your method fair in these scenarios?

- How do you ensure $c^\theta(x,y)$ is a valid cost function?

*Summary of Review*
Overall, I found the paper to be intriguing, particularly in the connection between inverse optimal transport and the proposed objective. However, the derivations and development lacked strong intuition and explanation---rather seeming like mostly algebraic manipulation without a clear reason. The paper could be improved significantly with a much deeper understanding and interpretation of the objective. Furthermore, the assumptions lacked significant discussion while being relatively restrictive. Finally, the empirical results were relatively weak only having one 2D synthetic experiment and 1 weather experiment on a very small dataset with less than 1000 samples. Thus, the scalability and applicability of the method are questionable.
soundness: 3
strengths: - Proposes a promising MLE approach to incorporating both paired and unpaired data for the translation task.

- The proposed algorithm does not seem to have any complex hyperparameters.

- Shows a nice connection between using an energy-based conditional generative model and inverse entropic optimal transport. This opens up using insights and methods from computational OT.

- The paper was easy to read.
summary: The paper proposes a semi-supervised objective for the translation task that can leverage both paired and unpaired samples from the source and target domains.
The paper decomposes the standard MLE objective into three parts corresponding to a joint expectation and two marginal expectations over the unpaired source and target samples.
The key challenge is that parts of the objective require integration.
To avoid this computational challenge, the paper makes several critical assumptions about the joint cost function and the target-specific function that makes the necessary functions known in closed-form.
In particular, a Gaussian mixture model assumption and a simple log-sum-exp form of the cost function.
With these closed-form solutions, the paper then demonstrates the method on a 2D synthetic dataset and a weather prediction task.
weaknesses: - Intuition and theoretic understanding of objective function is not clear. This makes it difficult to understand and extend. What is the purpose of the objectives corresponding to the Y and X marginals? Why does this make sense? What if these are misestimated?

- The assumptions are not clearly discussed and their corresponding limitations. What is the limitations of assuming the particular form of the needed parametric functions? It seems restrictive. Also, why is it required to have an energy-based model? For better or worse, score-based/diffusion-based generative models are far more common now. Is using an energy-based model significantly more restrictive?

- The practical motivation of the scenario is lacking. When would you expect this situation to hold in the real-world? Which real-world scenarios naturally have both paired and unpaired data?

- The experiments are relatively weak with only one 2D synthetic experiment and 1 weather experiment, but the weather experiment only includes a simple MLP regression baseline (i.e., none of the other baseline methods).

Meta-review: This paper proposes a semi-supervised approach for domain translation that combines paired and unpaired data within a likelihood maximization framework. The authors establish a connection between their proposed loss function and inverse entropic optimal transport, introducing a Gaussian mixture parameterization for computation. The method is evaluated on synthetic 2D data and a weather prediction task.

The paper's main strength lies in its theoretical approach to semi-supervised domain translation, integrating paired and unpaired data in a single objective. The connection to inverse entropic optimal transport is noteworthy.

However, the paper suffers from several significant weaknesses. The experimental validation is limited, especially for higher-dimensional problems, and lacks comparisons with state-of-the-art semi-supervised domain translation methods. The justification for the Gaussian mixture parameterization is insufficient, raising concerns about its scalability. The intuition and explanation for some aspects of the objective function are incomplete, and the practical motivation for scenarios with both paired and unpaired data is unclear.

The primary reasons for rejecting this paper are the limited experimental validation and the lack of comparisons with existing state-of-the-art methods. The practical impact and scalability of the proposed approach remain unclear, and the authors' responses did not sufficiently address these concerns. The reliance on Gaussian mixture parameterization raises questions about the method's applicability to more complex, high-dimensional problems. Furthermore, the insufficient explanation of the objective function's intuition makes it challenging to assess the method's full potential and limitations.

Decision: Reject