From optimal transport to generative modeling: the VEGAN cookbook

Olivier Bousquet, Sylvain Gelly, Ilya Tolstikhin, Carl-Johann Simon-Gabriel, Bernhard Schoelkopf

Introduction

The field of representation learning was initially driven by supervised approaches, with impressive results using large labelled datasets. Unsupervised generative modeling, in contrast, used to be a domain governed by probabilistic approaches focusing on low-dimensional data. Recent years have seen a convergence of those two approaches. In the new field that formed at the intersection, variational autoencoders (VAEs) form one well-established approach, theoretically elegant yet with the drawback that they tend to generate blurry images. In contrast, generative adversarial networks (GANs) turned out to be more impressive in terms of the visual quality of images sampled from the model, but have been reported harder to train. There has been a flurry of activity in assaying numerous configurations of GANs as well as combinations of VAEs and GANs. A unifying theory relating GANs to VAEs in a principled way is yet to be discovered. This forms a major motivation for the studies underlying the present paper.

Following , we approach generative modeling from the optimal transport point of view. The optimal transport (OT) cost is a way to measure a distance between probability distributions and provides a much weaker topology than many others, including ff-divergences associated with the original GAN algorithms. This is particularly important in applications, where data is usually supported on low dimensional manifolds in the input space X\mathcal{X}. As a result, stronger notions of distances (such as ff-divergences, which capture the density ratio between distributions) often max out, providing no useful gradients for training. In contrast, the optimal transport behave nicer and may lead to a more stable training .

In this work we aim at minimizing the optimal transport cost Wc(PX,PG)W_{c}(P_{X},P_{G}) between the true (but unknown) data distribution PXP_{X} and a latent variable model PGP_{G}. We do so via the primal form and investigate theoretical properties of this optimization problem. Our main contributions are listed below; cf. also Figure 1.

We derive an equivalent formulation for the primal form of Wc(PX,PG)W_{c}(P_{X},P_{G}), which makes the role of latent space Z\mathcal{Z} and probabilistic encoders Q(Z∣X)Q(Z|X) explicit (Theorem 1).

Unlike in VAE, we arrive at an optimization problem where the QQ are constrained. We relax the constraints by penalization, arriving at the penalized optimal transport (POT) objective (13) which can be minimized with stochastic gradient descent by sampling from PXP_{X} and PGP_{G}.

We show that for squared Euclidean cost cc (Section 4.1), POT coincides with the objective of adversarial auto-encoders (AAE) . We believe this provides the first theoretical justification for AAE, showing that they approximately minimize the 2-Wasserstein distance W2(PX,PG)W_{2}(P_{X},P_{G}). We also compare POT to VAE, adversarial variational Bayes (AVB) , and other methods based on the marginal log-likelihood. In particular, we show that all these methods necessarily suffer from blurry outputs, unlike POT or AAE.

When cc is the Euclidean distance (Section 4.2), POT and WGAN both minimize the 1-Wasserstein distance W1(PX,PG)W_{1}(P_{X},P_{G}). They approach this problem from primal/dual forms respectively, which leads to a different behaviour of the resulting algorithms.

Finally, following a somewhat well-established tradition of using acronyms based on the “GAN” suffix, and because we give a recipe for blending VAE and GAN (using POT), we propose to call this work a VEGAN cookbook.

The authors of address computing the OT cost in large scale using stochastic gradient descent (SGD) and sampling. They approach this task either through the dual formulation, or via a regularized version of the primal. They do not discuss any implications for generative modeling. Our approach is based on the primal form of OT, we arrive at regularizers which are very different, and our main focus is on generative modeling. The Wasserstein GAN minimizes the 1-Wasserstein distance W1(PX,PG)W_{1}(P_{X},P_{G}) for generative modeling. The authors approach this task from the dual form. Unfortunately, their algorithm cannot be readily applied to any other OT cost, because the famous Kantorovich duality holds only for W1W_{1}. In contrast, our algorithm POT approaches the same problem from the primal form and can be applied for any cost function cc.

The present paper is structured as follows. In Section 2 we introduce our notation and discuss existing generative modeling techniques, including GANs, VAEs, and AAE. Section 3 contains our main results, including a theoretical analysis of the primal form of OT and the novel POT objective. Section 4 discusses the implications of our new results. Finally, we discuss future work in Section 5. Proofs may be found in Appendix B.

Notations and preliminaries

We use calligraphic letters (i.e. X\mathcal{X}) for sets, capital letters (i.e. XX) for random variables, and lower case letters (i.e. xx) for their values. We denote probability distributions with capital letters (i.e. P(X)P(X)) and densities with lower case letters (i.e. p(x)p(x)). By δx\delta_{x} we denote the Dirac distribution putting mass 1 on x∈Xx\in\mathcal{X}, and supp P\mathbf{supp}\,P denotes the support of PP.

where c(x,y) ⁣:X×X→R+c(x,y)\colon\mathcal{X}\times\mathcal{X}\to\mathcal{R}_{+} is any measurable cost function and P(X∼P,Y∼Q)\mathcal{P}(X\sim P,Y\sim Q) is a set of all joint distributions of (X,Y)(X,Y) with marginals PP and QQ respectively. A particularly interesting case is when (X,d)(\mathcal{X},d) is a metric space and c(x,y)=dp(x,y)c(x,y)=d^{p}(x,y) for p≥1p\geq 1. In this case WpW_{p}, the pp-th root of WcW_{c}, is called the pp-Wasserstein distance. Finally, the Kantorovich-Rubinstein theorem establishes a duality for the 1-Wasserstein distance, which holds under mild assumptions on PP and QQ:

where FL\mathcal{F}_{L} is the class of all bounded 1-Lipschitz functions on (X,d)(\mathcal{X},d). Note that the same symbol is used for WpW_{p} and WcW_{c}, but only pp is a number and thus the above W1W_{1} refers to the Wasserstein distance.

Even though GANs and VAEs are quite different—both in terms of the conceptual frameworks and empirical performance—they share important features: (a) both can be trained by sampling from the model PGP_{G} without knowing an analytical form of its density and (b) both can be scaled up with SGD. As a result, it becomes possible to use highly flexible implicit models PGP_{G} defined by a two-step procedure, where first a code ZZ is sampled from a fixed distribution PZP_{Z} on a latent space Z\mathcal{Z} and then ZZ is mapped to the image G(Z)∈X=RdG(Z)\in\mathcal{X}=\mathcal{R}^{d} with a (possibly random) transformation G ⁣:Z→XG\colon\mathcal{Z}\to\mathcal{X}. This results in latent variable models PGP_{G} defined on X\mathcal{X} with density of the form

assuming all involved densities are properly defined. These models are indeed easy to sample and, provided GG can be differentiated analytically with respect to its parameters, PGP_{G} can be trained with SGD. The field is growing rapidly and numerous variations of VAEs and GANs are available in the literature. Next we introduce and compare several of them.

The original generative adversarial network (GAN) approach minimizes

Variational auto-encoders (VAE) utilize models PGP_{G} of the form (3) and minimize

Minimizing the primal of optimal transport

We have argued that minimizing the optimal transport cost Wc(PX,PG)W_{c}(P_{X},P_{G}) between the true data distribution PXP_{X} and the model PGP_{G} is a reasonable goal for generative modeling. We now will explain how this can be done in the primal formulation of the OT problem (1) by reparametrizing the space of couplings (Section 3.1) and relaxing the marginal constraint (Section 3.2), leading to a formulation involving expectations over PXP_{X} and PGP_{G} that can thus be solved using SGD and sampling.

We will consider certain sets of joint probability distributions of three random variables (X,Y,Z)∈X×X×Z(X,Y,Z)\in\mathcal{X}\times\mathcal{X}\times\mathcal{Z}. The reader may wish to think of XX as true images, YY as images sampled from the model, and ZZ as latent codes. We denote by PG,Z(Y,Z)P_{G,Z}(Y,Z) a joint distribution of a variable pair (Y,Z)(Y,Z), where ZZ is first sampled from PZP_{Z} and next YY from PG(Y∣Z)P_{G}(Y|Z). Note that PGP_{G} defined in (3) and used throughout this work is the marginal distribution of YY when (Y,Z)∼PG,Z(Y,Z)\sim P_{G,Z}.

In the optimal transport problem, we consider joint distributions Γ(X,Y)\Gamma(X,Y) which are called couplings between values of XX and YY. Because of the marginal constraint, we can write Γ(X,Y)=Γ(Y∣X)PX(X)\Gamma(X,Y)=\Gamma(Y|X)P_{X}(X) and we can consider Γ(Y∣X)\Gamma(Y|X) as a non-deterministic mapping from XX to YY. In this section we will show how to factor this mapping through Z\mathcal{Z}, i.e., decompose it into an encoding distribution Q(Z∣X)Q(Z|X) and the generating distribution PG(Y∣Z)P_{G}(Y|Z).

In order to give a more intuitive explanation of this decomposition, consider the case where all probability distributions have densities with respect to the Lebesgue measure. In this case our results show that some elements Γ\Gamma of P(X∼PX,Y∼PG)\mathcal{P}(X\sim P_{X},Y\sim P_{G}) have densities of the form

where the density of the conditional distribution Q(Z∣X)Q(Z|X) satisfies qZ(z):=∫Xq(z∣x)pX(x)dx=pZ(z)q_{Z}(z):=\int_{\mathcal{X}}q(z|x)p_{X}(x)dx=p_{Z}(z) for all z∈Zz\in\mathcal{Z}. Equation (8) allows to express the search space (couplings) of the OT problem in terms of the probabilistic encoders Q(Z∣X)Q(Z|X). Unlike VAE, AVB, and other methods based on the marginal log-likelihood, where the QQ are not constrained, the encoders of the OT problem need to match the aggregated posterior QZQ_{Z} to the prior PZP_{Z}.

As in Section 2, P(X∼PX,Y∼PG)\mathcal{P}(X\sim P_{X},Y\sim P_{G}) denotes the set of all joint distributions of (X,Y)(X,Y) with marginals PX,PGP_{X},P_{G}, and likewise for P(X∼PX,Z∼PZ)\mathcal{P}(X\sim P_{X},Z\sim P_{Z}). The set of all joint distributions of (X,Y,Z)(X,Y,Z) such that X∼PXX\sim P_{X}, (Y,Z)∼PG,Z(Y,Z)\sim P_{G,Z}, and (Y\mathchoice{\mathrel{\hbox to0.0pt{\displaystyle\perp\hss}\mkern 2.0mu{\displaystyle\perp}}}{\mathrel{\hbox to0.0pt{\textstyle\perp\hss}\mkern 2.0mu{\textstyle\perp}}}{\mathrel{\hbox to0.0pt{\scriptstyle\perp\hss}\mkern 2.0mu{\scriptstyle\perp}}}{\mathrel{\hbox to0.0pt{\scriptscriptstyle\perp\hss}\mkern 2.0mu{\scriptscriptstyle\perp}}}X)|Z will be denoted by PX,Y,Z\mathcal{P}_{X,Y,Z}. Finally, we denote by PX,Y\mathcal{P}_{X,Y} and PX,Z\mathcal{P}_{X,Z} the sets of marginals on (X,Y)(X,Y) and (X,Z)(X,Z) (respectively) induced by distributions in PX,Y,Z\mathcal{P}_{X,Y,Z}. Note that P(PX,PG)\mathcal{P}(P_{X},P_{G}), PX,Y,Z\mathcal{P}_{X,Y,Z}, and PX,Y\mathcal{P}_{X,Y} depend on the choice of conditional distributions PG(Y∣Z)P_{G}(Y|Z), while PX,Z\mathcal{P}_{X,Z} does not. In fact, it is easy to check that PX,Z=P(X∼PX,Z∼PZ)\mathcal{P}_{X,Z}=\mathcal{P}(X\sim P_{X},Z\sim P_{Z}). From the definitions it is clear that PX,Y⊆P(PX,PG)\mathcal{P}_{X,Y}\subseteq\mathcal{P}(P_{X},P_{G}) and we get the following upper bound:

If PG(Y∣Z)P_{G}(Y|Z) are Dirac measures (i.e., Y=G(Z)Y=G(Z)), the two sets are actually coincide, thus justifying the reparametrization (8) and the illustration in Figure 1(b), as demonstrated in the following theorem:

If PG(Y∣Z=z)=δG(z)P_{G}(Y|Z=z)=\delta_{G(z)} for all z∈Zz\in\mathcal{Z}, where G ⁣:Z→XG\colon\mathcal{Z}\to\mathcal{X}, we have

where QZQ_{Z} is the marginal distribution of ZZ when X∼PXX\sim P_{X} and Z∼Q(Z∣X)Z\sim Q(Z|X).

The r.h.s. of (10) is the optimal transport WcG(PX,PZ)W_{c_{G}}(P_{X},P_{Z}) between PXP_{X} and PZP_{Z} with the cost function c_{g}(x,z):=c\bigl{(}x,G(z)\bigr{)} defined on X×Z\mathcal{X}\times\mathcal{Z}. If PG(Y∣Z)P_{G}(Y|Z) corresponds to a deterministic mapping G ⁣:Z→XG\colon\mathcal{Z}\to\mathcal{X}, the resulting model PGP_{G} is the push-forward of PZP_{Z} through GG. Theorem 1 states that in this case the two OT problems are equivalent, Wc(PX,PG)=WcG(PX,PZ)W_{c}(P_{X},P_{G})=W_{c_{G}}(P_{X},P_{Z}).

The conditional distributions QQ in (11) are constrained to ensure that when XX is sampled from PXP_{X} and then ZZ from Q(Z∣X)Q(Z|X), the resulting marginal distribution of ZZ (which was denoted QZQ_{Z} and called aggregated posterior in Section 2.1) coincides with PZP_{Z}. A very similar result also holds for the case when PG(Y∣Z)P_{G}(Y|Z) are not necessarily Dirac. Nevertheless, for simplicity we will focus on the Dirac case for now and shortly summarize the more general case in the end of this section.

2 Relaxing the constraints

Minimizing Wc(PX,PG)W_{c}(P_{X},P_{G}) boils down to a min-min optimization problem. Unfortunately, the constraint on QQ makes the variational problem even harder. We thus propose to replace the constrained optimization problem (11) with its relaxed unconstrained version in a standard way. Namely, use any convex penalty F ⁣:Q→R+F\colon Q\to\mathcal{R}_{+}, such that F(Q)=0F(Q)=0 if and only if PZ=QZP_{Z}=Q_{Z}, and for any λ>0\lambda>0, consider the following relaxed unconstrained version of Wc†(PX,PG)W_{c}^{\dagger}(P_{X},P_{G}):

It is well known that under mild conditions adding a penalty as in (12) is equivalent to adding a constraint of the form F(Q)≤μλF(Q)\leq\mu_{\lambda} for some μλ>0\mu_{\lambda}>0. As λ\lambda increases, the corresponding μλ\mu_{\lambda} decreases, and as λ→∞\lambda\to\infty, the solutions of (12) reach the feasible region where PZ=QZP_{Z}=Q_{Z}. This shows that Wcλ(PX,PG)≤Wc(PX,PG)W_{c}^{\lambda}(P_{X},P_{G})\leq W_{c}(P_{X},P_{G}) for all λ≥0\lambda\geq 0 and the gap reduces with increasing λ\lambda.

The above discussion assumed Dirac measures PG(Y∣Z)P_{G}(Y|Z). If this is not the case, we can still upper bound the 2-Wasserstein distance W2(PX,PG)W_{2}(P_{X},P_{G}), corresponding to c(x,y)=∥x−y∥2c(x,y)=\|x-y\|^{2}, in a very similar way to Theorem 1. The case of Gaussian decoders PG(Y∣Z)P_{G}(Y|Z), which will be particularly useful when discussing the relation to VAEs, is summarized in the following remark:

Implications: relations to AAE, VAEs, and GANs

Thus far we showed that the primal form of the OT problem can be relaxed to allow for efficient minimization by SGD. We now discuss the main implications of these results.

Consider the squared Euclidean cost function c(x,y)=∥x−y∥2c(x,y)=\|x-y\|^{2}, for which WcW_{c} is the squared 2-Wasserstein distance W22W_{2}^{2}. The goal of this section is to compare the minimization of W2(PX,PG)W_{2}(P_{X},P_{G}) to other generative modeling approaches. Let us focus our attention on generative distributions PG(Y∣Z)P_{G}(Y|Z) typically used in VAE, AVB, and AAE, i.e., Gaussians P_{G}(Y|Z)=\mathcal{N}\bigl{(}Y;G(Z),\sigma^{2}\!\cdot\!I_{d}\bigr{)}. In order to verify the differentiability of log⁡pG(x∣z)\log p_{G}(x|z) all three methods require σ2>0\sigma^{2}>0 and have problems handling the case of deterministic decoders (σ2=0\sigma^{2}=0). To emphasize the role of the variance σ2\sigma^{2} we will denote the resulting latent variable model PGσP_{G}^{\sigma}.

The analysis of Section 3 shows that the value of W2(PX,PGσ)W_{2}(P_{X},P_{G}^{\sigma}) is upper bounded by Wc†(PX,PGσ)W_{c}^{\dagger}(P_{X},P_{G}^{\sigma}) of the form (16) and the two coincide when σ2=0\sigma^{2}=0. Next we summarize properties of solutions GG minimizing these two values W2W_{2} and Wc†W_{c}^{\dagger}:

Let X=Rd\mathcal{X}=\mathcal{R}^{d} and assume c(x,y)=∥x−y∥2c(x,y)=\|x-y\|^{2}, P_{G}(Y|Z)=\mathcal{N}\bigl{(}Y;G(Z),\sigma^{2}\!\cdot\!I\bigr{)} with any function G ⁣:X→RG\colon\mathcal{X}\to\mathcal{R}. If σ2>0\sigma^{2}>0 then the functions Gσ∗G^{*}_{\sigma} and G†G^{\dagger} minimizing Wc(PX,PGσ)W_{c}(P_{X},P_{G}^{\sigma}) and Wc†(PX,PGσ)W_{c}^{\dagger}(P_{X},P_{G}^{\sigma}) respectively are different: Gσ∗G^{*}_{\sigma} depends on σ2\sigma^{2}, while G†G^{\dagger} does not. The function G†G^{\dagger} is also a minimizer of Wc(PX,PG0)W_{c}(P_{X},P_{G}^{0}).

In contrast, Proposition 2 shows that for the same Gaussian models with any given σ2≥0\sigma^{2}\geq 0 we can minimize Wc†(PX,PGσ)W_{c}^{\dagger}(P_{X},P_{G}^{\sigma}) and the solution G†G^{\dagger} will be indeed the one resulting in the smallest 2-Wasserstein distance between PXP_{X} and the noiseless implicit model G(Z)G(Z), Z∼PZZ\sim P_{Z} used in practice.

Relation to AAE

The authors of tried to establish a connection between AAE and log-likelihood maximization. They argued that AAE is “a crude approximation” to AVB. Our results suggest that AAE is in fact attempting to minimize the 2-Wasserstein distance between PXP_{X} and PGσP_{G}^{\sigma}, which may explain its good empirical performance reported in .

Blurriness of VAE and AVB

We next add to the discussion regarding the blurriness commonly attributed to VAE samples. Our argument shows that VAE, AVB, and other methods based on the marginal log-likelihood necessarily lead to an averaging in the input space if PG(Y∣Z)P_{G}(Y|Z) are Gaussian.

This overlap necessarily happens in VAEs, which use Gaussian encoders Q(Z∣X)Q(Z|X) supported on the entire Z\mathcal{Z}. When probabilistic encoders QQ are allowed to be flexible enough, as in AVB, for any fixed PG(Y∣Z)P_{G}(Y|Z) the optimal Q∗Q^{*} will try to invert the decoder (see Appendix A) and take the form

This approximation becomes exact in the nonparametric limit of QQ. When PG(Y∣Z)P_{G}(Y|Z) is Gaussian we have pG(y∣z)>0p_{G}(y|z)>0 for all y∈Xy\in\mathcal{X} and z∈Zz\in\mathcal{Z}, showing that supp Q∗(Z∣X=x)=supp PZ\mathbf{supp}\,Q^{*}(Z|X=x)=\mathbf{supp}\,P_{Z} for all x∈Xx\in\mathcal{X}. This will again lead to the overlap of encoders if supp PZ=Z\mathbf{supp}\,P_{Z}=\mathcal{Z}. In contrast, the optimal encoders of AAE and POT do not necessarily overlap, as they are not inverting the decoders.

2 The 1-Wasserstein distance: relation to WGAN

This means we can now approach the problem of optimizing W1W_{1} in two distinct ways, taking gradient steps either in the primal or in the dual forms. Denote by Q∗Q^{*} the optimal encoder in the primal and f∗f^{*} the optimal witness function in the dual. By the envelope theorem, gradients of W1W_{1} with respect to GG can be computed by taking a gradient of the criteria evaluated at the optimal points Q∗Q^{*} or f∗f^{*}.

Despite the theoretical equivalence of both approaches, practical considerations lead to different behaviours and to potentially poor approximations of the real gradients. For example, in the dual formulation, one usually restricts the witness functions to be smooth, while in the primal formulation, the constraint on QQ is only approximately enforced. We will study the effect of these approximations.

There exists a constant C>0C>0 such that for any ϵ>0\epsilon>0, one can construct distributions PXP_{X}, PGP_{G} and pick witness functions fϵ∈FLf_{\epsilon}\in\mathcal{F}_{L} and hϵ∈Hh_{\epsilon}\in\mathcal{H} that are ϵ\epsilon-optimal ∣JD(fϵ)−JD(f∗)∣≤ϵ|J_{D}(f_{\epsilon})-J_{D}(f^{*})|\leq\epsilon, ∣JD(hϵ)−JD(h∗)∣≤ϵ|J_{D}(h_{\epsilon})-J_{D}(h^{*})|\leq\epsilon, but which give (at some point z∈Zz\in\mathcal{Z}) gradients whose direction is at least CC-wrong: A(fϵ,f∗)≤1−CA(f_{\epsilon},f^{*})\leq 1-C, A(h0,h∗)≤1−CA(h_{0},h^{*})\leq 1-C, and A(hϵ,h∗)≤0A(h_{\epsilon},h^{*})\leq 0.

Imperfect posterior in the primal (i.e., for POT)

In the primal formulation, when the constraint is violated, that is the aggregated posterior QZQ_{Z} is not matching PZP_{Z}, there can be two kinds of negative effects: (i) the gradient of the criterion is only computed on a (possibly small) subset of the latent space reached by QZQ_{Z}; (ii) several input points could be mapped by Q(Z∣X)Q(Z|X) to the same latent code zz, thus giving gradients that encourage G(z)G(z) to be the average/median of several inputs (hence encouraging a blurriness). See Section 4.1 for the details and Figure 1 for an illustration.

Conclusion

This work proposes a way to fit generative models by minimizing any optimal transport cost. It also establishes novel links between different popular unsupervised probabilistic modeling techniques. Whilst our contribution is on the theoretical side, it is reassuring to note that the empirical results of show the strong performance of our method for the special case of the 2-Wasserstein distance. Experiments with other cost functions cc are beyond the scope of the present work and left for the future studies.

Acknowledgments

The authors are thankful to Mateo Rojas-Carulla and Fei Sha for stimulating discussions. CJSG is supported by a Google European Doctoral Fellowship in Causal Inference.

References

Appendix A Further details on VAEs and GANs

For models PGP_{G} of the form (3) and any conditional distribution Q(Z∣X)Q(Z|X) it can be easily verified that

Here the conditional distribution PG(Z∣X)P_{G}(Z|X) is induced by a joint distribution PG,Z(X,Z)P_{G,Z}(X,Z), which is in turn specified by the 2-step latent variable procedure: (a) sample ZZ from PZP_{Z}, (b) sample XX from PG(X∣Z)P_{G}(X|Z). Note that the first term on the r.h.s. of (15) is always non-positive, while the l.h.s. does not depend on QQ. This shows that if conditional distributions QQ are not restricted then

where the infimum is achieved for Q(Z∣X)=PG(Z∣X)Q(Z|X)=P_{G}(Z|X). However, for any restricted class Q\mathcal{Q} of conditional distributions Q(Z∣X)Q(Z|X) we only have

where the inequality accounts for the fact that Q(Z∣X)Q(Z|X) might be not flexible enough to match P(Z∣X)P(Z|X) for all values of XX.

Relation between AAE, AVB, and VAE

For any distributions PXP_{X} and PGP_{G}:

Appendix B Proofs

We start by introducing an important lemma relating the two sets over which WcW_{c} and Wc†W_{c}^{\dagger} are optimized.

PX,Y⊆P(PX,PG)\mathcal{P}_{X,Y}\subseteq\mathcal{P}(P_{X},P_{G}) with identity if PG(Y∣Z=z)P_{G}(Y|Z=z) are Dirac distributions for all z∈Zz\in\mathcal{Z}We conjecture that this is also a necessary condition. The necessity is not used in the remainder of the paper..

Inequality (9) and the first identity in (10) obviously follows from Lemma 6. The tower rule of expectation, and the conditional independence property of PX,Y,Z\mathcal{P}_{X,Y,Z} implies

Let X=Rd\mathcal{X}=\mathcal{R}^{d} and assume the conditional distributions PG(Y∣Z=z)P_{G}(Y|Z=z) have mean values G(z)∈RdG(z)\in\mathcal{R}^{d} and marginal variances σ12,…,σd2≥0\sigma_{1}^{2},\dots,\sigma_{d}^{2}\geq 0 for all z∈Zz\in\mathcal{Z}, where G ⁣:Z→XG\colon\mathcal{Z}\to\mathcal{X}. Take c(x,y)=∥x−y∥22c(x,y)=\|x-y\|^{2}_{2}. Then

Proof is similar to the one of Theorem 1. See Section B.2. ∎

First inequality follows from (9). For the identity we proceed similarly to the proof of Theorem 1 and write

Together with (17) and the fact that PX,Z=P(X∼PX,Z∼PZ)\mathcal{P}_{X,Z}=\mathcal{P}(X\sim P_{X},Z\sim P_{Z}) this concludes the proof.

B.3 Proof of Proposition 2

Corollary 7 shows that G†G^{\dagger} does not depend on the variance σ2\sigma^{2}. When σ2=0\sigma^{2}=0 the distribution PG(Y∣Z)P_{G}(Y|Z) turns into Dirac. In this case we combine Theorem 1 and Corollary 7 to conclude that G†G^{\dagger} also minimizes Wc(PX,PG0)W_{c}(P_{X},P_{G}^{0}). Next we prove that Gσ∗G^{*}_{\sigma} generally depends on σ2\sigma^{2}.

We will need the following simple result, which is basically saying that the variance of a sum of two independent random variables is a sum of the variances:

Under conditions of Proposition 2, assume Y∼PGσY\sim P_{G}^{\sigma}. Then

Next we prove the remaining implication of Proposition 2. Namely, that when σ2>0\sigma^{2}>0 the function Gσ∗G^{*}_{\sigma} minimizing Wc(PX,PGσ)W_{c}(P_{X},P_{G}^{\sigma}) depends on σ2\sigma^{2}. The proof is based on the following example: X=Z=R\mathcal{X}=\mathcal{Z}=\mathcal{R}, PX=N(0,1)P_{X}=\mathcal{N}(0,1), PZ=N(0,1)P_{Z}=\mathcal{N}(0,1), and 0<σ2<10<\sigma^{2}<1. Note that by setting G(z)=c⋅zG(z)=c\cdot z for any c>0c>0 we ensure that PGσP_{G}^{\sigma} is the Gaussian distribution, because a convolution of two Gaussians is also Gaussian. In particular if we take G∗(z)=1−σ2⋅zG^{*}(z)=\sqrt{1-\sigma^{2}}\cdot z Lemma 8 implies that PG∗σP_{G^{*}}^{\sigma} is the standard normal Gaussian N(0,1)\mathcal{N}(0,1). In other words, we obtain the global minimum Wc(PX,PG∗σ)=0W_{c}(P_{X},P_{G^{*}}^{\sigma})=0 and G∗G^{*} clearly depends on σ2\sigma^{2}.

B.4 Proof of Proposition 3

We just give a sketch of the proof: consider discrete distributions PXP_{X} supported on two points {x0,x1}\{x_{0},x_{1}\}, and PZP_{Z} supported on {0,1}\{0,1\} and let y0=G(0)y_{0}=G(0), y1=G(1)y_{1}=G(1) (y0≠y1y_{0}\neq y_{1}). Given an optimal f∗f^{*}, one can modify locally it around y0y_{0} without changing its Lipschitz constant such that the obtained fϵf_{\epsilon} is an ϵ\epsilon-approximation of f∗f^{*} whose gradients at y0y_{0} and y1y_{1} point in directions arbitrarily different from those of f∗f^{*}. For smooth functions, by moving y0y_{0} and y1y_{1} away from the segment [x0,x1][x_{0},x_{1}] but close to each other ∥y0−y1∥≤Kϵ\|y_{0}-y_{1}\|\leq K\epsilon, the gradients of f∗f^{*} will point in directions roughly opposite but the constraint on the Hessian will force the gradients of fF,0f_{\mathcal{F},0} at y0y_{0} and y1y_{1} to be very close. Finally, putting y0,y1y_{0},y_{1} on the segment [x0,x1][x_{0},x_{1}], one can get an fF∗f_{\mathcal{F}}^{*} whose gradients at y0y_{0} and y1y_{1} are exactly opposite, while taking fF,ϵ(y)=fF∗(y+ϵ)f_{\mathcal{F},\epsilon}(y)=f_{\mathcal{F}}^{*}(y+\epsilon), we can swap the direction at one of the points while changing the criterion by less than ϵ\epsilon.