SlowGuess/NeurIPS_2023_OCR huggingface dataset:
[44] Gabriel Peyre, Marco Cuturi, et al. Computational optimal transport. Foundations and Trends® in Machine Learning, 11(5-6):355–607, 2019.
[45] Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10684-10695, 2022.
[46] Litu Rout, Alexander Korotin, and Evgeny Burnaev. Generative modeling with optimal transport maps. In International Conference on Learning Representations, 2022.
[47] Chitwan Sahara, William Chan, Huiwen Chang, Chris Lee, Jonathan Ho, Tim Salimans, David Fleet, and Mohammad Norouzi. Palette: Image-to-image diffusion models. In ACM SIGGRAPH 2022 Conference Proceedings, pages 1-10, 2022.
[48] Filippo Santambrogio. Optimal transport for applied mathematicians. *Birkhäuser*, NY, 55(58-63):94, 2015.
[49] Vivien Seguy, Bharath Bhushan Damodaran, Remi Flamary, Nicolas Courty, Antoine Roret, and Mathieu Blondel. Large scale optimal transport and mapping estimation. In International Conference on Learning Representations, 2018.
[50] Xuan Su, Jiaming Song, Chenlin Meng, and Stefano Ermon. Dual diffusion implicit bridges for image-to-image translation. In The Eleventh International Conference on Learning Representations, 2023.
[51] Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(11), 2008.
[52] Francisco Vargas, Pierre Thodoroff, Austen Lamacraft, and Neil Lawrence. Solving schrödinger bridges via maximum likelihood. Entropy, 23(9):1134, 2021.
[53] Cédric Villani. Optimal transport: old and new, volume 338. Springer Science & Business Media, 2008.
[54] Gefei Wang, Yuling Jiao, Qian Xu, Yang Wang, and Can Yang. Deep generative learning via schrödinger bridge. In International Conference on Machine Learning, pages 10794-10804. PMLR, 2021.
[55] Christopher KI Williams and Carl Edward Rasmussen. Gaussian processes for machine learning, volume 2. MIT press Cambridge, MA, 2006.
[56] Yujia Xie, Minshuo Chen, Haoming Jiang, Tuo Zhao, and Hongyuan Zha. On scalable and efficient computation of large scale optimal transport. volume 97 of Proceedings of Machine Learning Research, pages 6882-6892, Long Beach, California, USA, 09-15 Jun 2019. PMLR.
Proof of Theorem 3.1. By the definition of  $\mathbb{P}_1$ , it holds that  $\pi^{*} \in \Pi(\mathbb{P}_{0}, \mathbb{P}_{1})$ . It suffices to show that  $\pi^{*}$  attains the optimal cost. Let  $\mathbf{Cost}(\pi)$  be the value of weak OT functional for a plan  $\pi$ , i.e.,
$$
\mathbf {C o s t} (\pi) \stackrel {\mathrm {d e f}} {=} \int_ {\mathcal {X}} C (x, \pi (\cdot | x)) d \mathbb {P} (x).
$$
We consider weak OT (2) between  $\mathbb{P}_0\in \mathcal{P}(\mathcal{X})$  and  $\mathbb{P}_1\in \mathcal{P}_p(\mathcal{X})$  and use its dual form (7):
$$
\mathbf {C o s t} (\mathbb {P} _ {0}, \mathbb {P} _ {1}) = \sup  _ {f} \left\{\int_ {\mathcal {X}} f ^ {C} (x) d \mathbb {P} _ {0} (x) + \int_ {\mathcal {Y}} f (y) d \mathbb {P} _ {1} (y) \right\} =
$$
$$
\sup  _ {f} \left\{\int_ {\mathcal {X}} \inf  _ {\nu \in \mathcal {P} _ {p} (\mathcal {Y})} \left\{C (x, \nu) - \int_ {\mathcal {Y}} f (y) d \nu (y) \right\} d \mathbb {P} _ {0} (x) + \int_ {\mathcal {Y}} f (y) d \mathbb {P} _ {1} (y) \right\} \geq
$$
$$
\int_ {\mathcal {X}} \inf _ {\nu \in \mathcal {P} _ {p} (\mathcal {Y})} \{C (x, \nu) - \int_ {\mathcal {Y}} f ^ {*} (y) d \nu (y) \} d \mathbb {P} _ {0} (x) + \int_ {\mathcal {Y}} f ^ {*} (y) d \mathbb {P} _ {1} (y).
$$
Now we use the fact that  $\pi^{*}(\cdot |x)$  minimizes (8) for all  $x\in \mathcal{X}$ :
$$
\int_ {\mathcal {X}} \inf  _ {\nu \in \mathcal {P} _ {p} (\mathcal {Y})} \left\{C (x, \nu) - \int f ^ {*} (y) d \nu (y) \right\} d \mathbb {P} _ {0} (x) + \int_ {\mathcal {Y}} f ^ {*} (y) d \mathbb {P} _ {1} (y) =
$$
$$
= \int_ {\mathcal {X}} \left\{C (x, \pi^ {*} (\cdot | x)) - \int_ {\mathcal {Y}} f ^ {*} (y) d \pi^ {*} (y | x) \right\} d \mathbb {P} _ {0} (x) + \int_ {\mathcal {Y}} f ^ {*} (y) d \mathbb {P} _ {1} (y) =
$$
$$
\int_ {\mathcal {X}} C (x, \pi^ {*} (\cdot | x)) d \mathbb {P} _ {0} (x) - \int_ {\mathcal {X}} \int_ {\mathcal {Y}} f ^ {*} (y) d \pi^ {*} (y | x) \underbrace {d \mathbb {P} _ {0} (x)} _ {= d \pi_ {0} ^ {*} (x)} + \int_ {\mathcal {Y}} f ^ {*} (y) d \mathbb {P} _ {1} (y) =
$$
$$
\int_ {\mathcal {X}} C (x, \pi^ {*} (\cdot | x)) d \mathbb {P} _ {0} (x) - \int_ {\mathcal {X} \times \mathcal {Y}} f ^ {*} (y) d \pi^ {*} (x, y) + \int_ {\mathcal {Y}} f ^ {*} (y) d \mathbb {P} _ {1} (y) =
$$
$$
\int_ {\mathcal {X}} C (x, \pi^ {*} (\cdot | x)) d \mathbb {P} _ {0} (x) - \int_ {\mathcal {Y}} f ^ {*} (y) d \pi_ {1} ^ {*} (y) + \int_ {\mathcal {Y}} f ^ {*} (y) d \mathbb {P} _ {1} (y) =
$$
$$
\int_ {\mathcal {X}} C (x, \pi^ {*} (\cdot | x)) d \mathbb {P} _ {0} (x) + \underbrace {\int_ {\mathcal {Y}} f ^ {*} (y) d (\mathbb {P} _ {1} - \pi_ {1} ^ {*}) (y)} _ {= 0 \text {s i n c e} \pi_ {1} ^ {*} = \mathbb {P} _ {1}} =
$$
$$
\int_ {\mathcal {X}} C \left(x, \pi^ {*} (\cdot | x)\right) d \mathbb {P} _ {0} (x) = \mathbf {C o s t} \left(\pi^ {*}\right). \tag {18}
$$
We see that  $\mathbf{Cost}(\pi^{*})$  is not greater than the optimal  $\mathbf{Cost}(\mathbb{P}_0,\mathbb{P}_1)$ , i.e.,  $\pi^{*}$  is optimal. At the same time, from the derivations above, it directly follows that  $f^{*}$  is an optimal potential.
Proof of Theorem 3.2. We are going to use our Theorem 3.1. First, we check that (13) holds for  $\pi^{*}(\cdot |x)$  defined by (14). Analogously to [42, Theorem 1], for each  $x\in \mathcal{X}$ , we derive
$$
\inf_{\nu \in \mathcal{P}_{p}(\mathcal{Y})}\{C_{c,\epsilon}(x,\nu) - \int_{\mathcal{Y}}f^{*}(y)d\nu (y)\} = \inf_{\nu \in \mathcal{P}_{p}(\mathcal{Y})}\underbrace{\left\{\int_{\mathcal{Y}}\left[c(x,y) - f^{*}(y)\right]d\nu(y) - \epsilon H(\nu)\right\}}_{\stackrel{\mathrm{def}}{=}\mathcal{G}_{x}(\nu)}.
$$
Minimizing  $\mathcal{G}_x$ , one should consider only  $\nu \in \mathcal{P}_{p,ac}(\mathcal{Y}) \subset \mathcal{P}_p(\mathcal{Y})$ . Indeed, for  $\nu \notin \mathcal{P}_{p,ac}(\mathcal{Y})$ , it holds that  $\mathcal{G}_x(\nu^*) = +\infty$  since  $c(x,y)$  is lower bounded and  $-H(\nu) = +\infty$ . We continue
$$
\inf  _ {\nu \in \mathcal {P} _ {p, a c} (\mathcal {Y})} \left\{- \epsilon \int_ {\mathcal {Y}} \log \exp \left(\frac {f ^ {*} (y) - c (x , y)}{\epsilon}\right) d \nu (y) + \epsilon \overbrace {\int_ {\mathcal {Y}} \log \frac {d \nu (y)}{d y} d \nu (y)} ^ {= - H (\nu)} \right\} =
$$
$$
\inf  _ {\nu \in \mathcal {P} _ {p, a c} (\mathcal {Y})} \left\{- \epsilon \int_ {\mathcal {Y}} \log \left(Z _ {x} \cdot \frac {d \pi^ {*} (y | x)}{d y}\right) d \nu (y) + \epsilon \int_ {\mathcal {Y}} \log \frac {d \nu (y)}{d y} d \nu (y) \right\} =
$$
$$
- \epsilon \log Z _ {x} + \inf  _ {\nu \in \mathcal {P} _ {p, a c} (\mathcal {Y})} \left\{- \epsilon \int_ {\mathcal {Y}} \log \frac {d \pi^ {*} (y | x)}{d y} d \nu (y) + \epsilon \int_ {\mathcal {Y}} \log \frac {d \nu (y)}{d y} d \nu (y) \right\} =
$$
$$
- \epsilon \log Z _ {x} + \inf  _ {\nu \in \mathcal {P} _ {p, a c}} \epsilon \mathrm {K L} (\nu \| \pi^ {*} (\cdot | x)). \tag {19}
$$
Since  $\pi^{*}(\cdot |x)\in \mathcal{P}_{p,ac}(\mathcal{V})$ , by the assumption of the current Theorem, we conclude that it is the unique minimum of  $\mathcal{G}_x(\nu)$  in  $\mathcal{P}_{p,ac}(\mathcal{V})$ . Now to apply our Theorem 3.1, it remains to check that all its assumptions hold. We only have to check that  $C_{c,\epsilon}$  given by (6) is lower bounded, jointly lower semi-continuous and convex in the second argument.
Analogously to (19), we derive
$$
C _ {c, \epsilon} (x, \nu) = \int_ {\mathcal {Y}} c (x, y) d \nu (y) - \epsilon H (\nu) = \underbrace {- \epsilon \log M _ {x}} _ {\geq - \epsilon \log M} + \epsilon \underbrace {\operatorname {K L} (\nu \| \nu_ {x})} _ {\geq 0} \geq - \epsilon \log M, \tag {20}
$$
where  $\frac{d\nu_x(y)}{dy} \stackrel{\mathrm{def}}{=} M_x^{-1}\exp\left(-\frac{c(x,y)}{\epsilon}\right)$ . This provides a lower bound on the cost  $C_{c,\epsilon}$ . From the first equality in (20), we see that  $C_{c,\epsilon}$  is jointly lower semi-continuous because the first term  $\int_{\mathcal{V}} c(x,y)d\nu(y)$  is jointly lower semi-continuous by the assumptions and the entropy term  $-H(\nu)$  is lower semi-continuous in  $\mathcal{P}_1(\mathcal{V})$  [48, Ex. 45] and hence in  $\mathcal{P}_p(\mathcal{V})$  as well ( $p \geq 1$ ). The last step is to note that  $C_{c,\epsilon}(x,\nu)$  is convex in  $\nu$  thanks to the convexity of  $-H(\nu)$ .
Finally, if  $\int_{\mathcal{X}}C_{c,\epsilon}\big(x,\pi^{*}(\cdot |x)\big)d\mathbb{P}_{0}(x) < \infty$ , then  $-\int_{\mathcal{X}}H\big(\pi^{*}(\cdot |x)\big)$  is finite. Let  $U$  be the subset of plans  $\pi \subset \Pi (\mathbb{P}_0,\mathbb{P}_1)$  where  $-\int_{\mathcal{X}}H\big(\pi (\cdot |x)\big)$  is finite. It is not empty since  $\pi^{*}\in U$ . At the same time, it is a convex set and functional  $\pi \mapsto -\int_{\mathcal{X}}H\big(\pi (\cdot |x)\big)d\mathbb{P}_0(x)$  is strictly convex in  $U$  thanks to the strict convexity of the (negative) entropy  $\nu \mapsto -H(\nu)$  on the set of distributions where it is finite. Thus,  $\pi \mapsto \int_{\mathcal{X}}C_{c,\epsilon}\big(x,\pi (\cdot |x)\big)d\mathbb{P}_0(x)$  is strictly convex in  $U$  and  $\pi^{*}$  is the unique minimum.
For completeness, we note that if  $\int_{\mathcal{X}} C_{c,\epsilon}\big(x, \pi^{*}(\cdot |x)\big)d\mathbb{P}_{0}(x) = +\infty$ , this situation is trivial, as the cost of every plan turns to be equal to  $+\infty$ . As a result, every plan is optimal.
Proof of Proposition 3.3. Deriving the actual form of  $\pi^{*}(\cdot |x)$  is an easy exercise. We substitute (15) into (14) and use the quadratic cost  $c(x,y) = \frac{\|y - x\|^2}{2}$ :
$$
\frac {d \pi^ {*} (y | x)}{d y} = \frac {1}{Z _ {x}} \exp \left(\frac {f ^ {*} (y) - c (x , y)}{\epsilon}\right) =
$$
$$
\frac {1}{Z _ {x}} \exp \left(\frac {\epsilon \log \sum_ {n = 1} ^ {N} w _ {n} \mathcal {Q} (y | b _ {n} , \epsilon^ {- 1} A _ {n}) - \frac {| | y - x | | ^ {2}}{2}}{\epsilon}\right) =
$$
$$
\frac {1}{Z _ {x}} \left(\sum_ {n = 1} ^ {N} w _ {n} \mathcal {Q} (y | b _ {n}, \epsilon^ {- 1} A _ {n})\right) \exp \left(- \frac {| | y - x | | ^ {2}}{2 \epsilon}\right) =
$$
$$
\frac {1}{Z _ {x}} \sum_ {n = 1} ^ {N} w _ {n} \left(\mathcal {Q} (y | b _ {n}, \epsilon^ {- 1} A _ {n}) \exp \left(- \frac {| | y - x | | ^ {2}}{2 \epsilon}\right)\right) =
$$
$$
\frac {1}{Z _ {x}} \sum_ {n = 1} ^ {N} w _ {n} \bigg (\exp \big [ - \frac {1}{2} (y - b _ {n}) ^ {T} \frac {A _ {n}}{\epsilon} (y - b _ {n}) \big ] \exp \big (- \frac {| | y - x | | ^ {2}}{2 \epsilon} \big) \bigg) =
$$
$$
\frac {1}{Z _ {x}} \sum_ {n = 1} ^ {N} w _ {n} \bigg (\exp \big [ - \frac {1}{2} (y - b _ {n}) ^ {T} \frac {A _ {n}}{\epsilon} (y - b _ {n}) - \frac {| | y - x | | ^ {2}}{2 \epsilon} \big ] \bigg) =
$$
$$
\frac {1}{Z _ {x}} \sum_ {n = 1} ^ {N} w _ {n} \left(\exp \left[ - \frac {1}{2} (y - b _ {n}) ^ {T} \frac {A _ {n}}{\epsilon} (y - b _ {n}) - \frac {1}{2} (y - x) ^ {T} \frac {I}{\epsilon} (y - x) \right]\right) =
$$
$$
\frac {1}{Z _ {x}} \sum_ {n = 1} ^ {N} w _ {n} \left(\exp \left[ - \frac {1}{2} \left\{\left(y - b _ {n}\right) ^ {T} \frac {A _ {n}}{\epsilon} (y - b _ {n}) + (y - x) ^ {T} \frac {I}{\epsilon} (y - x) \right\} \right]\right). \tag {21}
$$
Next, we prove that (we write just  $\mu_{n}$  instead of  $\mu_n(x)$  for simplicity):
$$
(y - b _ {n}) ^ {T} \frac {A _ {n}}{\epsilon} (y - b _ {n}) + (y - x) ^ {T} \frac {I}{\epsilon} (y - x) =
$$
$$
\left(y - \mu_ {n}\right) ^ {T} \Sigma_ {n} ^ {- 1} \left(y - \mu_ {n}\right) + \left(x - b _ {n}\right) ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) \left(x - b _ {n}\right). \tag {22}
$$
$$
y ^ {T} \frac {A _ {n}}{\epsilon} y - 2 b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} y + b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} b _ {n} ^ {T} + y ^ {T} \frac {I}{\epsilon} y - 2 x ^ {T} \frac {I}{\epsilon} y + x ^ {T} \frac {I}{\epsilon} x =
$$
$$
y ^ {T} \underbrace {\left(\frac {A _ {n} + I}{\epsilon}\right)} _ {\Sigma_ {n} ^ {- 1}} y - 2 (A _ {n} b _ {n} + x) ^ {T} \frac {I}{\epsilon} y + b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} b _ {n} + x ^ {T} \frac {I}{\epsilon} x =
$$
$$
y ^ {T} \Sigma_ {n} ^ {- 1} y - 2 \left(A _ {n} b _ {n} + x\right) ^ {T} \frac {I}{\epsilon} y + b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} b _ {n} + x ^ {T} \frac {I}{\epsilon} x =
$$
$$
y ^ {T} \Sigma_ {n} ^ {- 1} y - 2 \underbrace {\left(A _ {n} b _ {n} + x\right) ^ {T} \left(A _ {n} + I\right) ^ {- 1}} _ {\mu_ {n} ^ {T}} \underbrace {\frac {\left(A _ {n} + I\right)}{\epsilon}} _ {\Sigma_ {n} ^ {- 1}} y + b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} b _ {n} + x ^ {T} \frac {I}{\epsilon} x =
$$
$$
y ^ {T} \Sigma_ {n} ^ {- 1} y - 2 \mu_ {n} ^ {T} \Sigma_ {n} ^ {- 1} y + b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} b _ {n} + x ^ {T} \frac {I}{\epsilon} x =
$$
$$
y ^ {T} \Sigma_ {n} ^ {- 1} y - 2 \mu_ {n} ^ {T} \Sigma_ {n} ^ {- 1} y + \mu_ {n} ^ {T} \Sigma_ {n} ^ {- 1} \mu_ {n} - \mu_ {n} ^ {T} \Sigma_ {n} ^ {- 1} \mu_ {n} + b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} b _ {n} + x ^ {T} \frac {I}{\epsilon} x =
$$
$$
\left(y - \mu_ {n}\right) ^ {T} \Sigma_ {n} ^ {- 1} \left(y - \mu_ {n}\right) - \mu_ {n} ^ {T} \Sigma_ {n} ^ {- 1} \mu_ {n} + b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} b _ {n} + x ^ {T} \frac {I}{\epsilon} x =
$$
$$
\left(y - \mu_ {n}\right) ^ {T} \Sigma_ {n} ^ {- 1} \left(y - \mu_ {n}\right) + b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} b _ {n} - \mu_ {n} ^ {T} \Sigma_ {n} ^ {- 1} \mu_ {n} + x ^ {T} \frac {I}{\epsilon} x =
$$
$$
\left(y - \mu_ {n}\right) ^ {T} \Sigma_ {n} ^ {- 1} \left(y - \mu_ {n}\right) + b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} b _ {n} - \left(A _ {n} b _ {n} + x\right) ^ {T} \frac {\Sigma_ {n}}{\epsilon} \Sigma_ {n} ^ {- 1} \frac {\Sigma_ {n}}{\epsilon} \left(A _ {n} b _ {n} + x\right) + x ^ {T} \frac {I}{\epsilon} x =
$$
$$
\left(y - \mu_ {n}\right) ^ {T} \Sigma_ {n} ^ {- 1} \left(y - \mu_ {n}\right) + b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} b _ {n} - \left(A _ {n} b _ {n} + x\right) ^ {T} \frac {\Sigma_ {n}}{\epsilon^ {2}} \left(A _ {n} b _ {n} + x\right) + x ^ {T} \frac {I}{\epsilon} x =
$$
$$
\left(y - \mu_ {n}\right) ^ {T} \Sigma_ {n} ^ {- 1} \left(y - \mu_ {n}\right) + b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} b _ {n} -
$$
$$
\left(A _ {n} b _ {n}\right) ^ {T} \frac {\Sigma_ {n}}{\epsilon^ {2}} A _ {n} b _ {n} - 2 \left(A _ {n} b _ {n}\right) ^ {T} \frac {\Sigma_ {n}}{\epsilon^ {2}} x - x ^ {T} \frac {\Sigma_ {n}}{\epsilon^ {2}} x + x ^ {T} \frac {I}{\epsilon} x =
$$
$$
\left(y - \mu_ {n}\right) ^ {T} \Sigma_ {n} ^ {- 1} \left(y - \mu_ {n}\right) + b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} b _ {n} - \left(A _ {n} b _ {n}\right) ^ {T} \frac {\Sigma_ {n}}{\epsilon^ {2}} A _ {n} b _ {n} -
$$
$$
2 \left(A _ {n} b _ {n}\right) ^ {T} \frac {\Sigma_ {n}}{\epsilon^ {2}} x + x ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) x =
$$
$$
(y - \mu_ {n}) ^ {T} \Sigma_ {n} ^ {- 1} (y - \mu_ {n}) + b _ {n} ^ {T} \frac {A _ {n}}{\epsilon} b _ {n} - b _ {n} ^ {T} \frac {A _ {n} ^ {T} \Sigma_ {n} A _ {n}}{\epsilon^ {2}} b _ {n} -
$$
$$
(y - \mu_ {n}) ^ {T} \Sigma_ {n} ^ {- 1} (y - \mu_ {n}) + b _ {n} ^ {T} \frac {A _ {n} - A _ {n} ^ {T} \frac {\Sigma_ {n}}{\epsilon} A _ {n}}{\epsilon} b _ {n} - 2 (A _ {n} b _ {n}) ^ {T} \frac {\Sigma_ {n}}{\epsilon^ {2}} x + x ^ {T} (\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}) x =
$$
$$
\left(y - \mu_ {n}\right) ^ {T} \Sigma_ {n} ^ {- 1} \left(y - \mu_ {n}\right) + b _ {n} ^ {T} \frac {A _ {n} - A _ {n} ^ {T} \frac {\Sigma_ {n}}{\epsilon} A _ {n}}{\epsilon} b _ {n} - 2 b _ {n} ^ {T} \frac {A _ {n} \Sigma_ {n}}{\epsilon^ {2}} x + x ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) x =
$$
$$
(y - \mu_ {n}) ^ {T} \Sigma_ {n} ^ {- 1} (y - \mu_ {n}) + b _ {n} ^ {T} \frac {A _ {n} - A _ {n} ^ {T} \frac {\Sigma_ {n}}{\epsilon} A _ {n}}{\epsilon} b _ {n} -
$$
$$
2 b _ {n} ^ {T} \overbrace {\frac {(A _ {n} + I) \Sigma_ {n} - \Sigma_ {n}}{\epsilon^ {2}}} ^ {\epsilon \Sigma_ {n} ^ {- 1}} x + x ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) x =
$$
$$
\left(y - \mu_ {n}\right) ^ {T} \Sigma_ {n} ^ {- 1} \left(y - \mu_ {n}\right) + b _ {n} ^ {T} \frac {A _ {n} - A _ {n} ^ {T} \frac {\Sigma_ {n}}{\epsilon} A _ {n}}{\epsilon} b _ {n} - 2 b _ {n} ^ {T} \frac {\epsilon I - \Sigma_ {n}}{\epsilon^ {2}} x + x ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) x =
$$
$$
\left(y - \mu_ {n}\right) ^ {T} \Sigma_ {n} ^ {- 1} \left(y - \mu_ {n}\right) + b _ {n} ^ {T} \frac {A _ {n} - A _ {n} ^ {T} \frac {\Sigma_ {n}}{\epsilon} A _ {n}}{\epsilon} b _ {n} - 2 b _ {n} ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) x + x ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) x =
$$
$$
b _ {n} ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) b _ {n} + (x - b _ {n}) ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) (x - b _ {n}) =
$$
$$
\left(y - \mu_ {n}\right) ^ {T} \Sigma_ {n} ^ {- 1} \left(y - \mu_ {n}\right) + \left(x - b _ {n}\right) ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) \left(x - b _ {n}\right) +
$$
$$
b _ {n} ^ {T} \frac {A _ {n} - A _ {n} ^ {T} \frac {\Sigma_ {n}}{\epsilon} A _ {n}}{\epsilon} b _ {n} - b _ {n} ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) b _ {n} =
$$
$$
b _ {n} ^ {T} \left(\frac {A _ {n} - A _ {n} ^ {T} \frac {\Sigma_ {n}}{\epsilon} A _ {n}}{\epsilon} - \frac {I}{\epsilon} + \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) b _ {n} =
$$
$$
b _ {n} ^ {T} \left(\frac {A _ {n} \left(I - \frac {\Sigma_ {n}}{\epsilon} A _ {n}\right)}{\epsilon} - \frac {I}{\epsilon} + \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) b _ {n} =
$$
$$
b _ {n} ^ {T} (\frac {A _ {n} (I - \frac {\Sigma_ {n}}{\epsilon} (\epsilon \Sigma_ {n} ^ {- 1} - I))}{\epsilon} - \frac {I}{\epsilon} + \frac {\Sigma_ {n}}{\epsilon^ {2}}) b _ {n} =
$$
$$
b _ {n} ^ {T} (\frac {A _ {n} \left(\frac {\Sigma_ {n}}{\epsilon}\right) - I + \frac {\Sigma_ {n}}{\epsilon}}{\epsilon}) b _ {n} =
$$
$$
b _ {n} ^ {T} (\frac {\left(\epsilon \Sigma_ {n} ^ {- 1} - I\right) \frac {\Sigma_ {n}}{\epsilon} - I + \frac {\Sigma_ {n}}{\epsilon})}{\epsilon}) b _ {n} =
$$
$$
\left(y - \mu_ {n}\right) ^ {T} \Sigma_ {n} ^ {- 1} \left(y - \mu_ {n}\right) + \left(x - b _ {n}\right) ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) \left(x - b _ {n}\right) + b _ {n} ^ {T} \left(\frac {I - \frac {\Sigma_ {n}}{\epsilon} - I + \frac {\Sigma_ {n}}{\epsilon}}{\epsilon}\right) b _ {n} =
$$
$$
(y - \mu_ {n}) ^ {T} \Sigma_ {n} ^ {- 1} (y - \mu_ {n}) + (x - b _ {n}) ^ {T} (\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}) (x - b _ {n}).
$$
Next, we substitute (22) into (21)
$$
\frac {1}{Z _ {x}} \sum_ {n = 1} ^ {N} w _ {n} \left(\exp \left[ - \frac {1}{2} \left\{\left(y - b _ {n}\right) ^ {T} \frac {A _ {n}}{\epsilon} (y - b _ {n}) + (y - x) ^ {T} \frac {I}{\epsilon} (y - x) \right\} \right]\right) =
$$
$$
\frac {1}{Z _ {x}} \sum_ {n = 1} ^ {N} w _ {n} \left(\exp \left[ - \frac {1}{2} \left\{\left(y - \mu_ {n}\right) ^ {T} \Sigma_ {n} ^ {- 1} (y - \mu_ {n}) + (x - b _ {n}) ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) (x - b _ {n}) \right\} \right]\right) =
$$
$$
\frac {1}{Z _ {x}} \sum_ {n = 1} ^ {N} w _ {n} \exp \left(- \frac {1}{2} (y - \mu_ {n}) ^ {T} \Sigma_ {n} ^ {- 1} (y - \mu_ {n})\right) \exp \left(- \frac {1}{2} (x - b _ {n}) ^ {T} \left(\frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}\right) (x - b _ {n})\right) =
$$
$$
\frac {1}{Z _ {x}} \sum_ {n = 1} ^ {N} w _ {n} (2 \pi) ^ {\frac {D}{2}} \sqrt {\det (\Sigma_ {n})} \mathcal {N} (y | \mu_ {n}, \Sigma_ {n}) \mathcal {Q} (x | b _ {n}, \frac {I}{\epsilon} - \frac {\Sigma_ {n}}{\epsilon^ {2}}) =
$$
$$
\frac{1}{Z_{x}}\sum_{n = 1}^{N}\underbrace{w_{n}(2\pi)^{\frac{D}{2}}\sqrt{\operatorname*{det}(\Sigma_{n})}\mathcal{Q}(x|b_{n},\frac{I}{\epsilon} -\frac{\Sigma_{n}}{\epsilon^{2}})}_{\widetilde{w}_{n}}\mathcal{N}(y|\mu_{n},\Sigma_{n})) =
$$
$$
\frac {1}{Z _ {x}} \sum_ {n = 1} ^ {N} \widetilde {w} _ {n} \mathcal {N} (y | \mu_ {n}, \Sigma_ {n}) = \frac {1}{\sum_ {n = 1} ^ {N} \widetilde {w} _ {n}} \sum_ {n = 1} ^ {N} \widetilde {w} _ {n} \mathcal {N} (y | \mu_ {n}, \Sigma_ {n}) =
$$
$$
\sum_ {n = 1} ^ {N} \frac {\widetilde {w} _ {n}}{\sum_ {n = 1} ^ {N} \widetilde {w} _ {n}} \mathcal {N} (y | \mu_ {n}, \Sigma_ {n}) = \sum_ {n = 1} ^ {N} \gamma_ {n} \mathcal {N} (y | \mu_ {n}, \Sigma_ {n}).
$$
which finishes the derivation of the expression for the density of  $\pi^{*}(\cdot |x)$
Now we prove that  $\mathbb{P}_1\stackrel {\mathrm{def}}{=}\pi_1^*\in \mathcal{P}_2(\mathcal{Y})$ . For each  $x$ , consider  $\frac{d\pi^{*}(y|x)}{dy} = \sum_{n = 1}^{N}\gamma_{n}\mathcal{N}(y|\mu_{n}(x),\Sigma_{n})$ . Its second moment is given by  $\sum_{n = 1}^{N}\gamma_{n}\big(\| \mu_{n}(x)\|^{2} + \operatorname {Tr}\Sigma_{n}\big)$ . Note that
$$
\| \mu_ {n} (x) \| = \| \left(A _ {n} + I\right) ^ {- 1} \left(A _ {n} b _ {n} + x\right) \| \leq
$$
$$
\left\| \left(A _ {n} + I\right) ^ {- 1} \right\| \cdot \left\| A _ {n} b _ {n} + x \right\| \leq \left\| \left(A _ {n} + I\right) ^ {- 1} \right\| \cdot \left(\left\| A _ {n} b _ {n} \right\| + \| x \|\right),
$$
where  $\| \cdot \|$  applied to matrix means the operator norm. Hence, one may conclude that  $\| \mu_n(x) \|^2$  is upper bounded by some quadratic polynomial of  $\| x \|$ , i.e., there exist constants  $\alpha_n \in \mathbb{R}, \beta_n \in \mathbb{R}_+$  such that  $\| \mu_n(x) \|^2 \leq \alpha_n + \beta_n \cdot \| x \|^2$ . We derive
$$
\int_{\mathcal{Y}}\| y\|^{2}d\pi_{1}^{*}(y) = \int_{\mathcal{X}}\int_{\mathcal{Y}}\| y\|^{2}d\pi^{*}(y|x)\underbrace{d\pi_{0}^{*}}_{= d\mathbb{P}_{0}(x)}(x) = \int_{\mathcal{X}}\sum_{n = 1}^{N}\gamma_{n}\big(\| \mu_{n}(x)\|^{2} + \operatorname {Tr}\Sigma_{n}\big)d\mathbb{P}_{0}(x)\leq
$$
$$
\int_ {\mathcal {X}} \sum_ {n = 1} ^ {N} \gamma_ {n} \left(\alpha_ {n} + \beta_ {n} \| x \| ^ {2} + \operatorname {T r} \Sigma_ {n}\right) d \mathbb {P} _ {0} (x) =
$$
$$
\sum_ {n = 1} ^ {N} \gamma_ {n} \left(\alpha_ {n} + \operatorname {T r} \Sigma_ {n}\right) + \left(\sum_ {n = 1} ^ {N} \beta_ {n} \gamma_ {n}\right) \int_ {\mathcal {X}} \| x \| ^ {2} d \mathbb {P} _ {0} (x) <   \infty
$$
since  $\mathbb{P}_0\in \mathcal{P}_2(\mathcal{X})$  by the assumption of the proposition.
It remains to prove that  $\pi^{*}$  is the unique EOT plan. According to our Theorem 3.2, one only has to ensure that  $\int_{\mathcal{X}}C_{c,\epsilon}(x,\pi^{*}(\cdot |x))d\mathbb{P}_{0}(x) < \infty$ . Just for completeness, we highlight that  $\int_{\mathcal{X}}C_{c,\epsilon}(x,\pi^{*}(\cdot |x))d\mathbb{P}_{0}(x)$  is lower-bounded since  $C_{c,\epsilon}$  is lower bounded, see the proof of Theorem 3.2. Anyway, this is indifferent for us. We recall that  $\pi^{*}$  is an optimal plan between  $\mathbb{P}_0$  and  $\mathbb{P}_1 = \pi_1^*$  and  $f^{*}$  is an optimal potential by our construction. Thanks to the duality, we have
$$
\int_ {\mathcal {X}} C _ {c, \epsilon} (x, \pi^ {*} (\cdot | x)) d \mathbb {P} _ {0} (x) = \int_ {\mathcal {X}} \left(f ^ {*}\right) ^ {C _ {c, \epsilon}} (x) d \mathbb {P} _ {0} (x) + \int_ {\mathcal {Y}} f ^ {*} (y) d \mathbb {P} _ {1} (y) =
$$
$$
\int_ {\mathcal {X}} \left[ - \epsilon \log Z _ {x} \right] d \mathbb {P} _ {0} (x) + \int_ {\mathcal {Y}} f ^ {*} (y) d \mathbb {P} _ {1} (y), \tag {23}
$$
where in transition to (23) we used our findings of line (19). Note that  $\int_{\mathcal{Y}}f^{*}(y)d\mathbb{P}_{1}(y)$  is finite since  $f^{*}\in \mathcal{C}_{2}(\mathcal{V})$  is dominated by a quadratic polynomial, and we have already proved that  $\mathbb{P}_1$  has finite second moment. It remains to upper bound the first term in (23). We note that
$$
Z _ {x} = \int_ {\mathcal {Y}} \exp \left(\frac {f ^ {*} (y) - \frac {1}{2} \| x - y \| ^ {2}}{\epsilon}\right) d y = (\sqrt {2 \pi \epsilon}) ^ {D} \int_ {\mathcal {Y}} \exp \left(\frac {f ^ {*} (y)}{\epsilon}\right) \mathcal {N} (y | x, \epsilon I) d y \geq
$$