SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Fake solutions and instabilities. Lagrangian objectives such as (15) may potentially have optimal saddle points  $(f^{*},T^{*})$  in which  $T^{*}$  is not an OT map. Such  $T^{*}$  are called fake solutions [42] and may be one of the causes of training instabilities. Fake solutions can be removed by considering OT with strictly convex weak costs functions [43, Appendix H], see Appendix G.2 for examples.
Potential societal impact. Neural OT methods and, more generally, generative models are a developing research direction. They find applications such as style translation and realistic content generation. We expect that our method may improve existing applications of generative models and add new directions of neural OT usage like outlier detection. However, it should be taken into account that generative models can also be used for negative purposes such as creating fake faces.
B Toy 2D Illustrations of Other Methods
In this section, we demonstrate how the other methods perform in 'Wi-Fi' and 'Accept' experiments. We start with 'Wi-Fi'. Assume that we would like to map  $\mathbb{P}$  to the closest  $\frac{2}{3}$ -rd fraction of  $\mathbb{Q}$ , i.e., we aim to learn 2 of 3 arcs in  $\mathbb{Q}$ , (as in Fig. 7c).
In Fig. 12d, we show the discrete partial OT (4) [11] with parameters  $w_0 = m = 1$ ,  $w_1 = \frac{3}{2}$ , corresponding to IT (12) with  $w = \frac{3}{2}$ . To obtain the discrete matching, we run ot.partial.partial_wasserstein2 from POT<sup>5</sup>. As expected, it matches the input  $\mathbb{P}$  with  $\frac{2}{3}$  of  $\mathbb{Q}$  and can be viewed as the ground truth (coinciding with our Fig. 7c).
First, we show the GAN [27] endowed with additional  $\ell^2$  loss with weight  $\lambda = 0.5$  (in Fig. 12a). Next, we consider discrete unbalanced OT [14] with the quadratic cost  $c = \ell^2$ . In Fig. 12b, we show the results of the matching obtained by ot. unbalanced with parameters  $m = 1, reg = 0.1, reg_m = 1$ , numItermax = 200000. Additionally, in Fig. 12c we show the result of neural unbalanced OT method [66]. To make their unbalanced setup maximally similar to our IT, we set to zero their regularization parameters. The rest parameters are default except for  $\lambda_0 = 0.02$  ( $\ell^2$  loss parameter),  $\lambda_2 = 5$  (input and target measures' variation parameter).
We see that  $\mathrm{GAN} + \ell^2$  (Fig. 12a) and unbalanced OT (Fig. 12b and 12c) indeed match  $\mathbb{P}$  with only a part of the target measure  $\mathbb{Q}$ . The transported mass is mostly concentrated in the two small arcs of  $\mathbb{Q}$  which are closest to  $\mathbb{P}$  w.r.t.  $\ell^2$  cost. The issue here is that some mass of  $\mathbb{P}$  spreads over the third (biggest) arc of  $\mathbb{Q}$  yielding outliers. This happens because unbalanced OT (GAN can be viewed as its particular case) is an unconstrained problem: the mass spreading is controlled via soft penalization ( $f$ -divergence loss term). The lack of hard constraints, such as those in partial OT (4) or IT (12), makes it challenging to strictly control how the mass in unbalanced OT actually spreads.
For completeness, we also show the results of these methods applied to 'Accept' experiment, see Fig. 13. Here we tested various hyperparameters for these methods but did not achieve the desired behaviour, i.e., learning only the text 'Accept'. Moreover, we noted that  $\mathrm{GAN} + \ell^2$  for large  $\lambda$  yields undesirable artifacts (Fig. 13a). This is because GAN and  $\ell^2$  losses contradict to each other and still the models tried to minimize them both. We further discuss in Appendix C below.
5 pythonot.github.io  
6 github.com/uhlerlab/unbalanced_ot
(a)  $\mathrm{GAN} + \ell^2$
(b) Discrete unbalanced OT.
(c) Scalable unbalanced OT.
(d) Discrete Partial OT (desired ground truth).
Figure 12: Transport maps learned by various methods in 'Wi-Fi' experiment (Fig. 7a).
(a)  $\mathrm{GAN} + \ell^2$
Figure 13: Transport maps learned by various methods in 'Accept' experiment.
C Comparison with Other Image-to-Image Translation Methods
Recall that ET by design is the best translation between a pair of domains w.r.t. the given dissimilarity function  $c(x, y)$ . Our IT maps with the increase of  $w$  provide better input-output similarity and recover ET when  $w \to \infty$  (§3.3). A reader may naturally ask: (a) How else can we recover ET maps? (b) To which extent one can control the input-output similarity in existing translation methods? (c) Can these methods be used to approximate ET? We discuss these aspects below.
Many translation methods are based on GANs, see [55, 3, 13] for a survey. Their learning objectives are usually combined of several loss terms:
$$
\mathcal {L} _ {\text {T o t a l}} (T) \stackrel {\text {d e f}} {=} \mathcal {L} _ {\text {D o m}} (T) + \lambda \cdot \mathcal {L} _ {\text {S i m}} (T) + [ \text {o t h e r}
$$
In (17), the domain loss  $\mathcal{L}_{Dom}$  is usually the vanilla GAN loss involving a discriminator [27] ensuring that the learned map  $x\mapsto T(x)$  transforms inputs  $x\sim \mathbb{P}$  to the samples from the target data distribution  $\mathbb{Q}$ . The similarity loss  $\mathcal{L}_{Sim}$  (with  $\lambda \geq 0$ ) is usually the identity loss  $\int_{\mathcal{X}}\| x - T(x)\| _1d\mathbb{P}(x)$ . More generally, it can be an arbitrary unsupervised loss of the form  $\int_{\mathcal{X}}c\bigl (x,T(x)\bigr)d\mathbb{P}(x)$  stimulating the output sample  $T(x)$  to look like the input samples  $x$  w.r.t. given dissimilarity function  $c$ , e.g.,  $\ell^1,\ell^2,\ell^p$ , perceptual, etc. The other terms in (17) involve model-specific terms (e.g., cycle consistency loss in CycleGAN) which are not related to our study.
When learning a model via optimizing (17), a natural way to get better similarity of  $x$  and  $T(x)$  in (17) is to simply increase weight  $\lambda$  of the corresponding loss term. This is a straightforward approach but it has a visible limitation. When  $\lambda$  is high, the term  $\lambda \cdot \mathcal{L}_{\mathrm{Sim}}$  dominates over the other terms such as  $\mathcal{L}_{\mathrm{Dom}}$ , and the model  $T$  simply learns to minimize this loss ignoring the fact that the output sample should be from the target data distribution  $\mathbb{Q}$ . In other words, in (17) there is a nasty trade-off between  $T(x)$  belonging to the target data distribution  $\mathbb{Q}$  and input-output similarity of  $x$  and  $T(x)$ . The parameter  $\lambda \geq 0$  controls this realism-similarity trade-off, and we study how it affects the learned map  $T$  below.
We pick CycleGAN [72] as a base model for evaluation since it is known as one of the principal models to solve the unpaired translation problem. We use  $c = \ell^1$  as the similarity loss as the CycleGAN's authors originally used in their paper. We consider parameter  $\lambda \in [0, 50, 100, 200, 250, 300, 350, 500]$ .
<sup>7</sup>We also conducted a separate experiment to train CycleGAN with  $\ell^2$  identity loss. However, in this case CycleGAN's training turned to be less stable and, importantly, yielded (mostly) worse FID. Surprisingly, we
Additionally, we perform comparison with a more recent StarGAN-v2 [15] model. By default, StarGAN-v2 does not use any similarity loss and does not enforce the output to be similar to the input. Therefore, analogously to CycleGAN, we endow the model with an additional  $\ell^1$  similarity loss and consider  $\lambda \in [0,1,10,50,100,200,500]$ .
We train both models on celeba  $\rightarrow$  anime  $(64\times 64)$  and handbags  $\rightarrow$  shoes  $(128\times 128)$  translation with various  $\lambda$  and report the qualitative and quantitative results below. In all the cases, we report both  $\ell^2$  and  $\ell^1$  transport costs and FID on the test samples. Tables 2, 3, 4, 5 show transport costs and FID of GANs. FID and  $\ell^2$  metrics for our method are given in the main text (Tables 1b, 1a) and  $\ell^1$  cost is given in Table 6 below. For convenience, we visualize (FID, Cost) pairs for our method and GANs in Fig. 14.
Results and discussion (CycleGAN). Interestingly, we see that for CycleGAN adding small identity loss  $\lambda = 50$  yields not only decrease of the transport cost (compared to  $\lambda = 0$ ), but some improvement of FID as well. Still we see that the transport cost in CycleGAN naturally decreases with the increase of weight  $\lambda$ . Unfortunately, this decrease is accompanied by the decrease of the visual image quality, see Fig. 15. While for large  $\lambda$  the cost for CycleGAN is really small, the model is practically useless since it poors image quality. For very large  $\lambda$ , CycleGAN simply learn the identity map, as expected.
For  $\lambda$  providing acceptable visual quality, CycleGAN yields a transport cost which is bigger than that of standard OT ( $w = 1$ ). Our result for  $w = 8$  is unachievable for it. Note that in most cases FID of our IT method is smaller than that of CycleGAN.
Results and discussion (StarGAN-v2). In the celeba  $\rightarrow$  anime experiment, StarGAN-v2 results are similar to CycleGAN ones. Our IT with  $w = 2$  easily provides smaller transport cost (better similarity) than StarGAN-v2. In the handbags  $\rightarrow$  shoes translation, we have encountered surprising observations. We see that starting from  $\lambda = 10$  the model fails to translate some of the handbags to shoes, i.e., these handbags remain nearly unchanged. We notice the similar behaviour for vanilla GAN in 'Accept' experiment, see Fig. 13a. This explains the low cost for StarGAN-v2 model ( $\lambda \geq 10$ ). Surprisingly to us, for  $\lambda = 10$ , FID metric is also low despite the fact that model frequently produces failures, see the highlighted results in Fig. 16. Note that while FID is a widely used metric, it still could produce misleading estimations which we observe in the latter case.
Additionally, we provide a large set of randomly generated images for  $\lambda = 10$  to qualitatively show that the stated issue is indeed notable, see Fig. 17. These failures demonstrate the limited practical usage of the model. Our IT method does not suffer from this issue which we qualitatively demonstrate on the same set of images for different weights  $w$ , see Fig. 25.
Experiment	Cost	λ = 0	λ = 50	λ = 100	λ = 200	λ = 250	λ = 300	λ = 350	λ = 500
celeba → anime	l1	0.48	0.48	0.39	0.26	0.09	0.09	0.09	0.09
handbag → shoes	0.42	0.36	0.34	0.31	0.32	0.22	0.16	0.07
celeba → anime	l2	0.33	0.32	0.24	0.11	0.01	0.02	0.02	0.01
handbag → shoes	0.51	0.43	0.41	0.35	0.37	0.22	0.14	0.02
Table 2: Test  ${\ell }^{1}$  and  ${\ell }^{2}$  transport cost of CycleGAN.
Experiment	λ = 0	λ = 50	λ = 100	λ = 200	λ = 250	λ = 300	λ = 350	λ = 500
celeba → anime	22.9	20.8	35.2	88.8	122.2	123.5	120.0	122.8
handbag → shoes	27.8	23.4	23.6	37.4	38.5	105.6	144.9	152.9
Table 3: Test FID of CycleGAN.
Experiment	Cost	λ = 0	λ = 1	λ = 10	λ = 50	λ = 100	λ = 200	λ = 500
celeba → anime	l1	0.672	0.355	0.210	0.076	0.050	0.030	0.029
handbag → shoes	0.562	0.465	0.244	0.087	0.068	0.054	0.048
celeba → anime	l2	0.686	0.216	0.094	0.017	0.006	0.002	0.002
handbag → shoes	0.739	0.584	0.244	0.040	0.023	0.015	0.012
Table 4: Test  ${\ell }^{1}$  and  ${\ell }^{2}$  transport costs of StarGAN-v2.
Experiment	λ = 0	λ = 1	λ = 10	λ = 50	λ = 100	λ = 200	λ = 500
celeba → anime	19.55	22.40	42.30	99.68	123.76	137.8	139.11
handbag → shoes	25.45	45.13	22.36	131.8	149.8	155.8	158.8
Table 5: Test FID of StarGAN-v2.
observed higher test transport costs (both  $\ell^2$  and  $\ell^1$ ). Therefore, not to overload the exposition, we decided to keep only the experiment with CycleGAN trained with  $\ell^1$  identity loss.
(a) Test  $\ell^2$  transport cost.
Figure 14: Comparison of test FID and transport costs  $(\ell^2$  and  $\ell^1)$  of our IT method and CycleGAN.
(b) Test  $\ell^1$  transport cost.
Experiment	w = 1	w = 2	w = 4	w = 8
celeba → anime	0.447	0.309	0.275	0.225
handbag → shoes	0.327	0.328	0.263	0.264
Table 6: Test  $\overline{\ell^1}$  transport cost of our IT maps (learned with  $\overline{\ell^2}$  transport cost).
Concluding remarks. Our algorithm with  $w \to \infty$  allows us to achieve better similarity without the decrease of the image quality. At the same time, GANs fail to do this when  $\lambda \to \infty$ . Why?
We again emphasize that typical GAN objective (17) consists of several loss terms. Each term stimulates the model to attain certain properties (realism, similarity to the input, etc.). These terms, in general, contradict each other as they have different minima  $T$ . This yields the nasty trade-off between the loss terms. Our analysis shows that conceptually there is no significant difference between CycleGAN and a more recent StarGAN-v2 model. More generally, any GAN-based method inherits realism-similarity tradeoff issue. GANs' differences are mostly related to the use of other architectures or additional losses. Therefore, we think that additional comparisons are excessive since they may not provide any new insights.
In contrast, our method is not a sum of losses. Our objective (15) may look like a direct sum of a transport cost with an adversarial loss; our method does have a generator (transport maps  $T$ ) and a discriminator (potential  $f$ ) which are trained via the saddle-point optimization objective  $\max_f \min_T$ . Yet, this visible similarity to GAN-based methods is deceptive. Our objective  $\max_f \min_T$  can be viewed as a Lagrangian and is atypical for GANs: the generator is in the inner optimization problem  $\min_T$  while in GANs the objective is  $\min_T \max_f$ . In our case, similar to other neural dual OT methods, the generator is adversarial to the discriminator but not vice versa, as in GANs. Please consult [43, §4.3], [24] or [20] for further discussion about OT methods.
GANs aim to balance loss terms  $\mathcal{L}_{\mathrm{Dom}}$  and  $\mathcal{L}_{\mathrm{Sim}}$ . Our optimization objective enforces the constraint  $T\sharp \mathbb{P}\leq w\mathbb{Q}$  via learning the potential  $f$  (a.k.a. Lagrange multiplier) and among admissible maps  $T$  searches for the one providing the smallest transport cost. There is no realism-similarity trade-off. For completeness, we emphasize that when  $w\to \infty$ , FID in Table 1b does not drop because of the decrease of the image quality, but because our method covers the less part of  $\mathbb{Q}$ . FID negatively reacts to this [48, Fig. 1b].
D Relation and Comparison with Discrete Partial OT Methods
The goal of domain translation is to recover the map  $x \mapsto T(x)$  between two domains  $\mathbb{P}$ ,  $\mathbb{Q}$ . We approach this problem by approximating  $T$  with a neural network trained on the empirical samples  $X = \{x_{1},\ldots ,x_{N}\}$ ,  $Y = \{y_{1},\dots ,y_{M}\}$ , i.e., train datasets. Our method generalizes to new (previously unseen, test) input samples  $x_{new} \sim \mathbb{P}$ , i.e., our learned map  $\hat{T}$  can be applied to new input samples to generate new target samples  $\widehat{T}(x_{new})$ .
In contrast, discrete OT methods (including discrete partial OT) perform a matching between the empirical distributions  $\widehat{\mathbb{P}}_N = \sum_{n=1}^N \delta_{x_n}$ ,  $\widehat{\mathbb{Q}}_M = \sum_{m=1}^M \delta_{y_m}$ . Thus, they do not provide out-of-sample estimation of the transport plan  $\pi(y|x_{new})$  or map  $T(x_{new})$ . The reader may naturally wonder: why not to interpolate the solutions of discrete OT? For example, a common strategy is to derive barycentric projections  $\overline{T}(x) = \int_{\mathcal{V}} y d\pi(y|x)$  of the discrete OT plan  $\pi$  and then learn a network  $T_\theta(x) \approx \overline{T}(x)$  to approximate them [63]. Below we study this approach and show that it does not provide reasonable performance.
(a) Celeba (female)  $\rightarrow$  anime  $(64\times 64)$
(b) Handbags  $\rightarrow$  shoes  $(128\times 128)$
Figure 15: Unpaired translation via CycleGAN endowed with  $\ell^1$  identity loss with various weights  $\lambda$ .
(a) Celeba (female)  $\rightarrow$  anime  $(64\times 64)$
Figure 16: Unpaired translation via StarGAN-v2 endowed with  $\ell^1$  identity loss with various weights  $\lambda$ .
Figure 17: Unpaired translation of handbags to shoes  $(128 \times 128)$  via StarGAN-v2 endowed with  $\ell^1$  identity loss ( $\lambda = 10$ ). Since StarGAN-v2 is a stochastic (one-to-many) approach, we visualize several generated samples for different noise vectors  $z$ . Failures (poorly translated handbags which remain nearly unchanged) are highlighted with red.
We perform evaluation of the BP approach on celeba  $\rightarrow$  anime translation. We solve the discrete partial OT (DOT) between the parts of the train data  $X$  (11K samples),  $Y$  (50K samples). We use ot.partial.partial_wasserstein algorithm with parameters  $w_{0} = m = 1$  and vary  $w_{1}\in \{1,2,4,8\}$ , see the notation in (4). This corresponds to our IT (12) with  $w = w_{1}$ . Then we regress a UNet  $T_{\theta}$  to recover the barycentric projection  $\overline{T}$ . We also simulate the case of  $w = \infty$  by learning the discrete NNs in the train dataset using NearestNeighbors algorithm from sklearn.neighbors. We experiment with using MSE or VGG-based perceptual error as the loss function for regression. We visualize the obtained results in Fig. 18 and report average  $\ell^2$  test transport cost, FID in Table 7.
BP methods are known not to work well in large scale problems such as unpaired translation because of the averaging effect, see Figure 3 and large FID values of BP in Table 1 of [17]. Indeed, one may learn a barycentric projection network  $T_{\theta}(x) \approx \int_{\mathcal{V}} y d\pi(y|x)$  over the discrete OT plan  $\pi$ ,
yet it is clear that  $\int_{\mathcal{Y}} y d\pi(y|x)$  is a direct weighted average of several images  $y$ , i.e., some blurry average image of poor quality. It is not satisfactory for practical applications.
Our qualitative results indeed show that BP approach for small  $w$  leads to the averaging effect. We see that on the train dataset this effect disappears with the increase of  $w$ , see Fig. 18b. It is expected, since with the increase of weight the conditional distribution of a plan  $\pi(y|x)$  tends to a degenerate distribution concentrated at the nearest neighbor  $NN(x)$  of  $x$  in the train dataset, i.e.,  $\pi(y|x) \approx \delta_{NN(x)}$  when  $w \to \infty$ . This means, that in the limit the barycentric projection in point  $x$  is its nearest neighbor  $NN(x)$ .
However, the learned network  $(w = \infty)$  does not generalize well to unseen test samples and produces images of insufficient quality which is much worse than for the train samples, see Fig. 18a. Despite the fact that test  $\ell^2$  cost and FID decrease with the increase of  $w$ , see
Metrics	w=1	w=2	w=4	w=8	w=∞	w=∞(perc.)
ℓ2cost	0.298	0.199	0.184	0.167	0.158	0.165
FID	185.35	137.53	82.67	82.19	82.24	82.45
Table 7: Test  $\ell^2$  cost, FID of the DOT+BP method trained with  $\ell^2$  or perceptual loss function.
Figure 19: Test FID,  $\ell^2$  cost of our IT vs. DOT+BP.
<sup>8</sup>We do not use the whole datasets since computing discrete OT between them is computationally infeasible.
$^{9}$ github.com/iamalexkorotin/WassersteinIterativeNetworks/src/losses.py
(a) Results on test set.
Figure 18: Unpaired translation with DOT+BP in celeba  $\rightarrow$  anime experiment visualized on test, train partitions.
(b) Results on train set.
Table 7, Fig. 19, generated test images have poor quality for all weights  $w$ . Yet, the FID scores as well as the  $\ell^2$  costs are much bigger than in our method in all the cases.
As the MSE error for regression is known not to work well in image tasks, we also conduct an experiment using the perceptual error function to learn  $T_{\theta}$ . Unfortunately, training the neural network with perceptual error does not lead to meaningful improvements, see the bottom lines of Fig. 18b, 18a, Table 7. This confirms that the origins of DOT+BP method's poor performance lie not in the regression part, but in the entire methodology based on barycentric projections.
To conclude, discrete OT methods are not competitors to our work as there is no straightforward and well-performing way to make out-of-sample DOT estimation in large scale image processing tasks.
Pre-processing. For all datasets, we rescale images' RGB channels to  $[-1, 1]$ . As in [40], we rescale aligned anime face images to  $512 \times 512$ . Then we do  $256 \times 256$  crop with the center located 14 pixels above the image center to get the face. Finally, for all datasets except the textures dataset, we resize the images to the required size ( $64 \times 64$  or  $128 \times 128$ ). We apply random horizontal flipping augmentation to the comic faces and chairs datasets. Analogously to [42], we rescale describable textures to minimal border size of 300, do the random resized crop (from 128 to 300 pixels) and random horizontal, vertical flips. Next, we resize images to the required size ( $64 \times 64$  or  $128 \times 128$ ).
Neural networks. In §5.1, we use fully connected networks both for the mapping  $T_{\theta}$  and potential  $f_{\psi}$ . In §5.2, we use UNet [60] architecture for the transport map  $T_{\theta}$ . We use WGAN-QC's [45] ResNet [30] discriminator as a potential  $f_{\psi}$ . We add an additional final layer  $x \mapsto -|x|$  to  $f_{\psi}$  to make its outputs non-positive.
**Optimization.** We employ Adam [38] optimizer with the default betas both for  $T_{\theta}$  and  $f_{\psi}$ . The learning rate is  $lr = 10^{-4}$ . We use the MultiStepLR scheduler which decreases  $lr$  by 2 after  $[(5 + 5 \cdot w)\mathrm{K}, (20 + 5 \cdot w)\mathrm{K}, (40 + 5 \cdot w)\mathrm{K}, (70 + 5 \cdot w)\mathrm{K}]$  iterations of  $f_{\psi}$  where  $w \in \{1, 2, 4, 8\}$  is a weight parameter. The batch size is  $|X| = 256$  for toy 'Wi-Fi',  $|X| = 4096$  for toy Accept, and  $|X| = 64$  for image-to-image translation experiments. The number of inner  $T_{\theta}$  iterations is  $k_{T} = 10$ . In toy experiments, we observe convergence in  $\approx 30\mathrm{K}$  total iterations of  $f_{\psi}$  for 'Wi-Fi', in  $\approx 70\mathrm{K}$  for Accept. In the image-to-image translation, we do  $\approx 70\mathrm{K}$  iterations for  $128 \times 128$  datasets,  $\approx 40\mathrm{K}$  iterations for  $64 \times 64$  datasets. In the experiments with image-to-image translation experiments, we gradually increase  $w$  for  $20\mathrm{K}$  first iterations of  $f_{\psi}$ . We start from  $w = 1$  and linearly increase it to the desired  $w$  (2, 4 or 8).
Computational complexity. The complexity of training IT maps depends on the dataset, size of images and weight  $w$ . Convergence time increases with the increase of  $w$ : possible reasons for this are discussed in the unused samples limitation (Appendix A). In general, it takes from 2 (for  $w = 1$ ) up to 6 (for  $w = 8$ ) days on a single Tesla V100 GPU.
Reproducibility. We provide the code for the experiments and will provide the trained models, see README.md.
Proof of Proposition 1. Since continuous  $c$  is defined on a compact set  $\mathcal{X} \times \mathcal{Y}$ , it is uniformly continuous on  $\mathcal{X} \times \mathcal{Y}$ . This means that there exists a modulus of continuity  $\omega : [0, +\infty) \to [0, \infty)$  such that for all  $(x, y), (x', y') \in \mathcal{X} \times \mathcal{Y}$  it holds
$$
\left| c (x, y) - c \left(x ^ {\prime}, y ^ {\prime}\right) \right| \leq \omega \left(\left| \left| x - x ^ {\prime} \right| \right| _ {\mathcal {X}} + \left| \left| y - y ^ {\prime} \right| \right| _ {\mathcal {Y}}\right),
$$
and function  $\omega$  is monotone, continuous at 0 with  $\omega(0) = 0$ . In particular, for  $y = y'$  we have  $|c(x,y) - c(x',y)| \leq \omega(||x - x'||_{\mathcal{X}})$ . Thus, for  $c^*(x) = \min_{y \in \operatorname{Supp}(\mathbb{Q})} c(x,y)$ , we have  $|c^*(x) - c^*(x')| \leq \omega(||x - x'||_{\mathcal{X}})$ , see [62, Box 1.8]. This means that  $c^*: \mathcal{X} \to \mathbb{R}$  is (uniformly) continuous.