Title: No title found

Abstract: We propose a new Integral Probability Metric (IPM) between distributions: the Sobolev IPM. The Sobolev IPM compares the mean discrepancy of two distributions for functions (critic) restricted to a Sobolev ball defined with respect to a dominant measure µ. We show that the Sobolev IPM compares two distributions in high dimensions based on weighted conditional Cumulative Distribution Functions (CDF) of each coordinate on a leave one out basis. The Dominant measure µ plays a crucial role as it defines the support on which conditional CDFs are compared. Sobolev IPM can be seen as an extension of the one dimensional Von-Mises Cramér statistics to high dimensional distributions. We show how Sobolev IPM can be used to train Generative Adversarial Networks (GANs). We then exploit the intrinsic conditioning implied by Sobolev IPM in text generation. Finally we show that a variant of Sobolev GAN achieves competitive results in semisupervised learning on CIFAR-10, thanks to the smoothness enforced on the critic by Sobolev GAN which relates to Laplacian regularization. 1 1. We overview in Section 2 different metrics between distribution used in the GAN literature.
We then generalize Fisher IPM in Section 3 with a general dominant measure µ and show how it compares distributions based on their PDFs.
2. We introduce Sobolev IPM in Section 4 by restricting the critic of an IPM to a Sobolev ball defined with respect to a dominant measure µ. We then show that Sobolev IPM defines a discrepancy between weighted (coordinate-wise) conditional CDFs of distributions.

1. INTRODUCTION:

In order to learn Generative Adversarial Networks (Goodfellow et al., 2014) , it is now well established that the generator should mimic the distribution of real data, in the sense of a certain discrepancy measure. Discrepancies between distributions that measure the goodness of the fit of the neural generator to the real data distribution has been the subject of many recent studies (Arjovsky & Bottou, 2017; Nowozin et al., 2016; Kaae Sønderby et al., 2017; Mao et al., 2017; Arjovsky et al., 2017; Gulrajani et al., 2017; Mroueh et al., 2017; Mroueh & Sercu, 2017; Li et al., 2017) , most of which focus on training stability.

In terms of data modalities, most success was booked in plausible natural image generation after the introduction of Deep Convolutional Generative Adversarial Networks (DCGAN) (Radford et al., 2015) . This success is not only due to advances in training generative adversarial networks in terms of loss functions (Arjovsky et al., 2017) and stable algorithms, but also to the representation power of convolutional neural networks in modeling images and in finding sufficient statistics that capture the continuous density function of natural images. When moving to neural generators of discrete sequences generative adversarial networks theory and practice are still not very well understood. Maximum likelihood pre-training or augmentation, in conjunction with the use of reinforcement learning techniques were proposed in many recent works for training GAN for discrete sequences generation (Yu et al., 2016; Che et al., 2017; Hjelm et al., 2017; Rajeswar et al., 2017) . Other methods included using the Gumbel Softmax trick (Kusner & Hernández-Lobato, 2016) and the use of auto-encoders to generate adversarially discrete sequences from a continuous space (Zhao et al., 2017) . End to end training of GANs for discrete sequence generation is still an open problem (Press et al., 2017) . Empirical successes of end to end training have been reported within the framework of WGAN-GP (Gulrajani et al., 2017) , using a proxy for the Wasserstein distance via a pointwise gradient penalty on the critic. Inspired by this success, we propose in this paper a new Integral Probability Metric (IPM) between distributions that we coin Sobolev IPM. Intuitively an IPM (Müller, 1997) between two probability distributions looks for a witness function f , called critic, that maximally discriminates between samples coming from the two distributions:

sup f ∈F E x∼P f (x) -E x∼Q f (x).

Traditionally, the function f is defined over a function class F that is independent to the distributions at hand (Sriperumbudur et al., 2012) . The Wasserstein-1 distance corresponds for instance to an IPM where the witness functions are defined over the space of Lipschitz functions; The MMD distance (Gretton et al., 2012) corresponds to witness functions defined over a ball in a Reproducing Kernel Hilbert Space (RKHS).

We will revisit in this paper Fisher IPM defined in (Mroueh & Sercu, 2017) , which extends the IPM definition to function classes defined with norms that depend on the distributions. Fisher IPM can be seen as restricting the critic to a Lebsegue ball defined with respect to a dominant measure µ. The Lebsegue norm is defined as follows:

ˆX f 2 (x)µ(x)dx.

where µ is a dominant measure of P and Q.

In this paper we extend the IPM framework to critics bounded in the Sobolev norm:

ˆX ∇ x f (x) 2 2 µ(x)dx,

In contrast to Fisher IPM, which compares joint probability density functions of all coordinates between two distributions, we will show that Sobolev IPM compares weighted (coordinate-wise) conditional Cumulative Distribution Functions for all coordinates on a leave on out basis. Matching conditional dependencies between coordinates is crucial for sequence modeling.

Our analysis and empirical verification show that the modeling of the conditional dependencies can be built in to the metric used to learn GANs as in Sobolev IPM. For instance, this gives an advantage to Sobolev IPM in comparing sequences over Fisher IPM. Nevertheless, in sequence modeling when we parametrize the critic and the generator with a neural network, we find an interesting tradeoff between the metric used and the architectures used to parametrize the critic and the generator as well as the conditioning used in the generator. The burden of modeling the conditional long term dependencies can be handled by the IPM loss function as in Sobolev IPM (more accurately the choice of the data dependent function class of the critic) or by a simpler metric such as Fisher IPM together with a powerful architecture for the critic that models conditional long term dependencies such as LSTM or GRUs in conjunction with a curriculum conditioning of the generator as done in (Press et al., 2017) . Highlighting those interesting tradeoffs between metrics, data dependent functions classes for the critic (Fisher or Sobolev) and architectures is crucial to advance sequence modeling and more broadly structured data generation using GANs.

On the other hand, Sobolev norms have been widely used in manifold regularization in the so called Laplacian framework for semi-supervised learning (SSL) (Belkin et al., 2006) . GANs have shown success in semi-supervised learning (Salimans et al., 2016; Dumoulin et al., 2017; Dai et al., 2017; Kumar et al., 2017) . Nevertheless, many normalizations and additional tricks were needed. We show in this paper that a variant of Sobolev GAN achieves strong results in semi-supervised learning on CIFAR-10, without the need of any activation normalization in the critic.

The main contributions of this paper can be summarized as follows:

3. The intrinsic conditioning and the CDF matching make Sobolev IPM suitable for discrete sequence matching and explain the success of the gradient pernalty in WGAN-GP and Sobolev GAN in discrete sequence generation. 4. We give in Section 5 an ALM (Augmented Lagrangian Multiplier) algorithm for training Sobolev GAN. Similar to Fisher GAN, this algorithm is stable and does not compromise the capacity of the critic. 5. We show in Appendix A that the critic of Sobolev IPM satisfies an elliptic Partial Differential Equation (PDE). We relate this diffusion to the Fokker-Planck equation and show the behavior of the gradient of the optimal Sobolev critic as a transportation plan between distributions. 6. We empirically study Sobolev GAN in character level text generation (Section 6.1). We validate that the conditioning implied by Sobolev GAN is crucial for the success and stability of GAN in text generation. As a take home message from this study, we see that text generation succeeds either by implicit conditioning i.e using Sobolev GAN (or WGAN-GP) together with convolutional critics and generators, or by explicit conditioning i.e using Fisher IPM together with recurrent critic and generator and curriculum learning. 7. We finally show in Section 6.2 that a variant of Sobolev GAN achieves competitive semisupervised learning results on CIFAR-10, thanks to the smoothness implied by the Sobolev regularizer.

2. OVERVIEW OF METRICS BETWEEN DISTRIBUTIONS:

In this Section, we review different representations of probability distributions and metrics for comparing distributions that use those representations. Those metrics are at the core of training GAN.

In what follows, we consider probability measures with a positive weakly differentiable probability density functions (PDF). Let P and Q be two probability measures with PDFs P(x) and Q(x) defined on X ⊂ R d . Let F P and F Q be the Cumulative Distribution Functions (CDF) of P and Q respectively. For x = (x 1 , . . . , x d ), we have:

F P (x) = ˆx1 -∞ . . . ˆxd -∞ P(u 1 , . . . u d )du 1 . . . du d .

The score function of a density function is defined as:

s P (x) = ∇ x log(P(x)) ∈ R d .

In this work, we are interested in metrics between distributions that have a variational form and can be written as a suprema of mean discrepancies of functions defined on a specific function class. This type of metrics include ϕ-divergences as well as Integral Probability Metrics (Sriperumbudur et al., 2009) and have the following form:

d F (P, Q) = sup f ∈F |∆(f ; P, Q)| ,

where F is a function class defined on X and ∆ is a mean discrepancy, ∆ : F → R. The variational form given above leads in certain cases to closed form expressions in terms of the PDFs P, Q or in terms of the CDFs F P , F Q or the score functions s P , s Q .

In Table 1 , we give a comparison of different discrepancies ∆ and function spaces F used in the literature for GAN training together with our proposed Sobolev IPM. We see from Table 1 that Sobolev IPM, compared to Wasserstein Distance, imposes a tractable smoothness constraint on the critic on points sampled from a distribution µ, rather then imposing a Lipschitz constraint on all points in the space X . We also see that Sobolev IPM is the natural generalization of the Cramér Von-Mises Distance from one dimension to high dimensions. We note that the Energy Distance, a form of Maximum Mean Discrepancy for a special kernel, was used in (Bellemare et al., 2017b) as a generalization of the Cramér distance in GAN training but still needed a gradient penalty in its algorithmic counterpart leading to a mis-specified distance between distributions. Finally it is worth noting that when comparing Fisher IPM and Sobolev IPM we see that while Fisher IPM compares joint PDF of the distributions, Sobolev IPM compares weighted (coordinate-wise) conditional CDFs. As we will see later, this conditioning nature of the metric makes Sobolev IPM suitable for comparing sequences. Note that the Stein metric (Liu et al., 2016; Liu, 2017) uses the score function to match distributions. We will show later how Sobolev IPM relates to the Stein discrepancy (Appendix A).

∆(f ; P, Q) F d F (P, Q) Function class Closed Form ϕ-Divergence E x∼P f (x) -E x∼Q ϕ * (f (x)) f : X → R, f ∈ dom ϕ * E x∼Q ϕ( P(x) Q(x)

) (Goodfellow et al., 2014 ) (Nowozin et al., 2016 )

ϕ * Fenchel Conjugate Wasserstein -1 E x∼P f (x) -E x∼Q f (x) f : X → R, f lip ≤ 1 inf π∈Π(P,Q) ´X

xy 1 dπ(x, y) (Arjovsky et al., 2017) Sinkhorn Divergence (Gulrajani et al., 2017 ) (Genevay et al., 2017) MMD

E x∼P f (x) -E x∼Q f (x) f : X → R, f Hk ≤ 1 E x∼P k x -E x∼Q k x Hk (Li et al., 2017) (Li et al., 2015) (Dziugaite et al., 2015) Stein E x∼Q [T (P)f (x)] f : X → R d NA in general Discrepancy T (P) = (∇ x log(P(x)) + ∇ x .

f smooth with zero has a closed form (Wang & Liu, 2016) boundary condition in RKHS 

EQUATION

(P) = P X -i (x -i )F P [X i |X -i =x -i ] (x i ) x -i = (x 1 , . . . x i-1 , x i+1 , . . . x d )

Table 1 : Comparison of different metrics between distributions used for GAN training. References are for papers using those metrics for GAN training.

3. GENERALIZING FISHER IPM: PDF COMPARISON:

Imposing data-independent constraints on the function class in the IPM framework, such as the Lipschitz constraint in the Wasserstein distance is computationally challenging and intractable for the general case. In this Section, we generalize the Fisher IPM introduced in (Mroueh & Sercu, 2017) , where the function class is relaxed to a tractable data dependent constraint on the second order moment of the critic, in other words the critic is constrained to be in a Lebsegue ball.

Fisher IPM. Let X ⊂ R d and P(X ) be the space of distributions defined on X . Let P, Q ∈ P(X ), and µ be a dominant measure of P and Q, in the sense that µ(x) = 0 =⇒ P(x) = 0 and Q(x) = 0.

We assume µ to be also a distribution in P(X ), and assume µ(x) > 0, ∀x ∈ X . Let L 2 (X , µ) be the space of µ-measurable functions. For f, g ∈ L 2 (X , µ), we define the following dot product and its corresponding norm:

f, g L2(X ,µ) = ˆX f (x)g(x)µ(x)dx, f L2(X ,µ) = ˆX f 2 (x)µ(x)dx.

Note that L 2 (X , µ), can be formally defined as follows:

L 2 (X , µ) = {f : X → R s.t f L2(X ,µ) < ∞}.

We define the unit Lebesgue ball as follows:

B 2 (X , µ) = {f ∈ L 2 (X , µ), f L2(X ,µ) ≤ 1}.

Fisher IPM defined in (Mroueh & Sercu, 2017) , searches for the critic function in the Lebesgue Ball B 2 (X , µ) that maximizes the mean discrepancy between P and Q. Fisher GAN (Mroueh & Sercu, 2017) was originally formulated specifically for µ = 1 2 (P + Q). We consider here a general µ as long as it dominates P and Q. We define Generalized Fisher IPM as follows:

EQUATION

Note that:

E x∼P f (x) -E x∼Q f (x) = f, P -Q µ L2(X ,µ)

.

Hence Fisher IPM can be written as follows:

EQUATION

We have the following result: Theorem 1 (Generalized Fisher IPM). The Fisher distance and the optimal critic are as follows:

1. The Fisher distance is given by:

F µ (P, Q) = P -Q µ L2(X ,µ) = E x∼µ P(x) -Q(x) µ(x) 2 .

2. The optimal f χ achieving the Fisher distance F µ (P, Q) is:

f χ = 1 F (P, Q) P -Q µ , µ almost surely.

Proof of Theorem 1. From Equation ( 2), the optimal f χ belong to the intersection of the hyperplane that has normal n = P-Q µ , and the ball B 2 (X , µ), hence f χ = n n L 2 (X ,µ)

. Hence

F (P, Q) = n L2(X ,µ) . kf k L2(X ,µ) = 1 P Q µ f

We see from Theorem 1 the role of the dominant measure µ: the optimal critic is defined with respect to this measure and the overall Fisher distance can be seen as an average weighted distance between probability density functions, where the average is taken on points sampled from µ. We give here some choices of µ:

1. For µ = 1 2 (P + Q), we obtain the symmetric chi-squared distance as defined in (Mroueh & Sercu, 2017) . 2. µ GP , the implicit distribution defined by the interpolation lines between P r and Q θ as in (Gulrajani et al., 2017) . 3. When µ does not dominate P, and Q, we obtain a non symmetric divergence. For example for µ = P,

F 2 P (P, Q) = ´X (P(x)-Q(x)) 2 P(x)

dx. We see here that for this particular choice we obtain the Pearson divergence.

4. SOBOLEV IPM:

In this Section, we introduce the Sobolev IPM. In a nutshell, the Sobolev IPM constrains the critic function to belong to a ball in the restricted Sobolev Space. In other words we constrain the norm of the gradient of the critic ∇ x f (x). We will show that by moving from a Lebesgue constraint as in Fisher IPM to a Sobolev constraint as in Sobolev IPM, the metric changes from a joint PDF matching to weighted (ccordinate-wise) conditional CDFs matching. The intrinsic conditioning built in to the Sobolev IPM and the comparison of cumulative distributions makes Sobolev IPM suitable for comparing discrete sequences.

4.1. DEFINITION AND EXPRESSION OF SOBOLEV IPM IN TERMS OF COORDINATE CONDITIONAL CDFS:

We will start by recalling some definitions on Sobolev Spaces. We assume in the following that X is compact and consider functions in the Sobolev space W 1,2 (X , µ):

W 1,2 (X , µ) = f : X → R, ˆX ∇ x f (x) 2 µ(x)dx < ∞ ,

We restrict ourselves to functions in W 1,2 (X , µ) vanishing at the boundary, and note this space W 1,2 0 (X , µ). Note that in this case:

f W 1,2 0 (X ,µ) = ˆX ∇ x f (x) 2 µ(x)dx

defines a semi-norm. We can similarly define a dot product in W 1,2 0 (X , µ), for f, g ∈ W 1,2 0 (X , µ):

f, g W 1,2 0 (X ,µ) = ˆX ∇ x f (x), ∇ x g(x) R d µ(x)dx.

Hence we define the following Sobolev IPM, by restricting the critic of the mean discrepancy to the Sobolev unit ball :

EQUATION

When compared to the Wasserstein distance, the Sobolev IPM given in Equation (3) uses a data dependent gradient constraint (depends on µ) rather than a data independent Lipchitz constraint. Let F P and F Q be the cumulative distribution functions of P and Q respectively. We have:

EQUATION

and we define

D -i = ∂ d-1 ∂x 1 . . . ∂x i-1 ∂x i+1 . . . ∂x d , for i = 1 . . . d.

D -i computes the (d -1) high-order partial derivative excluding the variable i.

Our main result is presented in Theorem 2. Additional theoretical results are given in Appendix A.

All proofs are given in Appendix B.

Theorem 2 (Sobolev IPM). Assume that F P , and F Q and its d derivatives exist and are continuous:

F P and F Q ∈ C d (X ).

Define the differential operator D -:

D -= (D -1 , . . . D -d ). For x = (x 1 , . . . x i-1 , x i , x i+1 , . . . x d ), let x -i = (x 1 , . . . x i-1 , x i+1 , . . . x d ).

The Sobolev IPM given in Equation (3) has the following equivalent forms:

1. Sobolev IPM as comparison of high order partial derivatives of CDFs. The Sobolev IPM has the following form:

S µ (P, Q) = 1 d ˆX d i=1 (D -i F P (x) -D -i F Q (x)) 2 µ(x) dx.

2. Sobolev IPM as comparison of weighted (coordinate-wise) conditional CDFs. The Sobolev IPM can be written in the following equivalent form:

S 2 µ (P, Q) = 1 d 2 E x∼µ d i=1 P X -i (x -i )F P [X i |X -i =x -i ] (x i ) -Q X -i (x -i )F Q [X i |X -i =x -i ] (x i ) µ(x) 2 .

(5)

3. The optimal critic f * satisfies the following identity:

EQUATION

Sobolev IPM Approximation. Learning in the whole Sobolev space W 1,2 0 is challenging hence we need to restrict our function class to a hypothesis class H , such as neural networks. We assume in the following that functions in H vanish on the boundary of X , and restrict the optimization to the function space H . H can be a Reproducing Kernel Hilbert Space as in the MMD case or parametrized by a neural network. Define the Sobolev IPM approximation in H :

EQUATION

The following Lemma shows that the Sobolev IPM approximation in H is proportional to Sobolev IPM. The tightness of the approximation of the Sobolev IPM is governed by the tightness of the approximation of the optimal Sobolev Critic f * in H . This approximation is measured in the Sobolev sense, using the Sobolev dot product.

Lemma 1 (Sobolev IPM Approximation in a Hypothesis Class). Let H be a function space with functions vanishing at the boundary. For any f ∈ H and for f * the optimal critic in W 1,2 0 , we have:

S H ,µ (P, Q) = S µ (P, Q) sup f ∈H , f W 1,2 0 (X ,µ) ≤1 ˆX ∇ x f (x), ∇ x f * (x) R d µ(x)dx.

Note that this Lemma means that the Sobolev IPM is well approximated if the space H has an enough representation power to express ∇ x f * (x). This is parallel to the Fisher IPM approximation (Mroueh & Sercu, 2017) where it is shown that the Fisher IPM approximation error is proportional to the critic approximation in the Lebesgue sense. Having in mind that the gradient of the critic is the information that is passed on to the generator, we see that this convergence in the Sobolev sense to the optimal critic is an important property for GAN training.

Relation to Fokker-Planck Diffusion. We show in Appendix A that the optimal Sobolev critic is the solution of the following elliptic PDE (with zero boundary conditions):

EQUATION

We further link the elliptic PDE given in Equation ( 8) and the Fokker-Planck diffusion. As we illustrate in Figure 2 (b) the gradient of the critic defines a transportation plan for moving the distribution mass from Q to P.

Discussion of Theorem 2. We make the following remarks on Theorem 2:

1. From Theorem 2, we see that the Sobolev IPM compares d higher order partial derivatives of the cumulative distributions F P and F Q , while Fisher IPM compares the probability density functions.

2. The dominant measure µ plays a similar role to Fisher:

S 2 µ (P, Q) = 1 d 2 d i=1 E x∼µ D -i F P (x) -D -i F Q (x) µ(x) 2 ,

the average distance is defined with respect to points sampled from µ.

Published as a conference paper at ICLR 2018 3. Comparison of coordinate-wise Conditional CDFs. We note in the following x -i = (x 1 , . . . x i-1 , x i+1 , . . . x d ). Note that we have:

D -i F P (x) = ∂ d-1 ∂x 1 . . . ∂x i-1 ∂x i+1 . . . ∂x d ˆx1 -∞ . . . ˆxd -∞ P(u 1 . . . u d )du 1 . . . du d = ˆxi -∞ P(x 1 , . . . , x i-1 , u, x i+1 , . . . , x d )du = P X -i (x 1 , . . . , x i-1 , x i+1 , . . . x d ) ˆxi -∞ P [Xi|X -i =x -i ] (u|x 1 , . . . , x i-1 , x i+1 , . . . x d )du (Using Bayes rule) = P X -i (x -i )F P [X i |X -i =x -i ] (x i ),

Note that for each i, D -i F P (x) is the cumulative distribution of the variable X i given the other variables X -i = x -i , weighted by the density function of X -i at x -i . This leads us to the form given in Equation 5. We see that the Sobolev IPM compares for each dimension i the conditional cumulative distribution of each variable given the other variables, weighted by their density function. We refer to this as comparison of coordinate-wise CDFs on a leave one out basis. From this we see that we are comparing CDFs, which are better behaved on discrete distributions. Moreover, the conditioning built in to this metric will play a crucial role in comparing sequences as the conditioning is important in this context (See section 6.1).

4.2. ILLUSTRATIVE EXAMPLES:

Sobolev IPM / Cramér Distance and Wasserstein-1 in one Dimension. In one dimension, Sobolev IPM is the Cramér Distance (for µ uniform on X , we note this µ := 1). While Sobolev IPM in one dimension measures the discrepancy between CDFs, the one dimensional Wasserstein-p distance measures the discrepancy between inverse CDFs:

S 2 µ:=1 (P, Q) = ˆX (F P (x) -F Q (x)) 2 dx versus W p p (P, Q) = ˆ1 0 |F -1 P (u) -F -1 Q (u)| p du,

Recall also that the Fisher IPM for uniform µ is given by :

F 2 µ:=1 (P, Q) = ˆX (P(x) -Q(x)) 2 dx.

Consider for instance two point masses P = δ a1 and Q = δ a2 with a 1 , a 2 ∈ R. The rationale behind using Wasserstein distance for GAN training is that since it is a weak metric, for far distributions Wasserstein distance provides some signal (Arjovsky et al., 2017) . In this case, it is easy to see that

W 1 1 (P, Q) = S 2 µ:=1 = |a 1 -a 2 |, while F 2 µ:=1 (P, Q) = 2.

As we see from this simple example, CDF comparison is more suitable than PDF for comparing distributions on discrete spaces. See Figure 1 , for a further discussion of this effect in the GAN context.

Sobolev IPM between two 2D Gaussians. We consider P and Q to be two dimensional Gaussians with means µ 1 and µ 2 and covariances Σ 1 and Σ 2 . Let (x, y) be the coordinates in 2D. We note F P and F Q the CDFs of P and Q respectively. We consider in this example µ = P+Q 2 . We know from Theorem 2 that the gradient of the Sobolev optimal critic is proportional to the following vector field:

∇f * (x, y) α 1 µ(x, y) ∂ ∂y (F Q (x, y) -F P (x, y)) ∂ ∂x (F Q (x, y) -F P (x, y)) (9)

In Figure 2 we consider µ 1 = [1, 0], Σ 1 = 1.9 0.8 0.8 1.3

µ 2 = [1, -2], Σ 2 = 1.9 -0.8 -0.8 1.3 .

In Figure 2 (a) we plot the numerical solution of the PDE satisfied by the optimal Sobolev critic given in Equation ( 8), using MATLAB solver for elliptic PDEs (more accurately we solve -div(µ(x)∇ x f (x)) = P(x) -Q(x), hence we obtain the solution of Equation ( 8) up to a normalization constant ( 1 Sµ(P,Q) )). We numerically solve the PDE on a rectangle with zero boundary Figure 1 : In the GAN context for example in text generation, we have to match a (smoothed) discrete real distribution and a continuous generator. In this case, the CDF matching enabled by Sobolev IPM gives non zero discrepancy between a (smoothed) discrete and a continuous density even if the densities have disjoint supports. This ensures non vanishing gradients of the critic. conditions. We see that the optimal Sobolev critic separates the two distributions well. In Figure 2 (b) we then numerically compute the gradient of the optimal Sobolev critic on a 2D grid as given in Equation 9(using numerical evaluation of the CDF and finite difference for the evaluation of the partial derivatives). We plot in Figure 2 (b) the density functions of P and Q as well as the vector field of the gradient of the optimal Sobolev critic. As discussed in Section A.1, we see that the gradient of the critic (wrt to the input), defines on the support of µ = P+Q 2 a transportation plan for moving the distribution mass from Q to P.

5. SOBOLEV GAN:

Now we turn to the problem of learning GANs with Sobolev IPM. Given the "real distribution" P r ∈ P(X ), our goal is to learn a generator g θ : Z ⊂ R nz → X , such that for z ∼ p z , the distribution of g θ (z) is close to the real data distribution P r , where p z is a fixed distribution on Z (for instance z ∼ N (0, I nz )). We note Q θ for the "fake distribution" of g θ (z), z ∼ p z . Consider

{x i , i = 1 . . . N } ∼ P r , {z i , i = 1 . . . N } ∼ N (0, I nz ), and {x i , i = 1 . . . N } ∼ µ.

We consider these choices for µ:

1. µ = Pr+Q θ 2

i.e x ∼ P r or x = g θ (z), z ∼ p z with equal probability 1 2 . 2. µ GP is the implicit distribution defined by the interpolation lines between P r and Q θ as in (Gulrajani et al., 2017) i.e :

x = ux + (1 -u)y, x ∼ P r , y = g θ (z), z ∼ p z and u ∼ Unif[0, 1].

Sobolev GAN can be written as follows: min

g θ sup fp, 1 N N i=1 ∇xfp(xi) 2 =1 Ê (f p , g θ ) = 1 N N i=1 f p (x i ) - 1 N N i=1 f p (g θ (z i ))

For any choice of the parametric function class H p , note the constraint by ΩS (f p , g θ ) = 

1 N N i=1 ∇ x f p (x i ) 2 . For example if µ = Pr+Q θ 2 , ΩS (f p , g θ ) = 1 2N N i=1 ∇ x f p (x i ) 2 + (a)

1 2N N i=1 ∇ x f p (g θ (z i ))

2 . Note that, since the optimal theoretical critic is achieved on the sphere, we impose a sphere constraint rather than a ball constraint. Similar to (Mroueh & Sercu, 2017) we define the Augmented Lagrangian corresponding to Sobolev GAN objective and constraint

EQUATION

)

where λ is the Lagrange multiplier and ρ > 0 is the quadratic penalty weight. We alternate between optimizing the critic and the generator. We impose the constraint when training the critic only. Given θ, we solve max p min λ L S (p, θ, λ), for training the critic. Then given the critic parameters p we optimize the generator weights θ to minimize the objective min θ Ê (f p , g θ ). See Algorithm 1.

Algorithm 1 Sobolev GAN Input: ρ penalty weight, η Learning rate, n c number of iterations for training the critic, N batch size Initialize p, θ, λ = 0

repeat for j = 1 to n c do Sample a minibatch x i , i = 1 . . . N, x i ∼ P r Sample a minibatch z i , i = 1 . . . N, z i ∼ p z (g p , g λ ) ← (∇ p L S , ∇ λ L S )(p, θ, λ) p ← p + η ADAM (p, g p ) λ ← λ -ρg λ {SGD rule on λ with learning rate ρ} end for Sample z i , i = 1 . . . N, z i ∼ p z d θ ← ∇ θ Ê (f p , g θ ) = -∇ θ 1 N N i=1 f p (g θ (z i )) θ ← θ -η ADAM (θ, d θ ) until θ converges

Remark 1. Note that in Algorithm 1, we obtain a biased estimate since we are using same samples for the cost function and the constraint, but the incurred bias can be shown to be small and vanishing as the number of samples increases as shown and justified in (Shivaswamy & Jebara, 2010) .

Relation to WGAN-GP. WGAN-GP can be written as follows:

min g θ sup f, ∇xfp(xi) =1,xi∼µ GP Ê (f p , g θ ) = 1 N N i=1 f p (x i ) - 1 N N i=1 f p (g θ (z i ))

The main difference between WGAN-GP and our setting, is that WGAN-GP enforces pointwise constraints on points drawn from µ = µ GP via a point-wise quadratic penalty ( Ê (f p , g θ )-λ

N i=1 (1- ∇ x f (x i ) )

2 ) while we enforce that constraint on average as a Sobolev norm, allowing us the coordinate weighted conditional CDF interpretation of the IPM.

6. APPLICATIONS OF SOBOLEV GAN:

Sobolev IPM has two important properties; The first stems from the conditioning built in to the metric through the weighted conditional CDF interpretation. The second stems from the diffusion properties that the critic of Sobolev IPM satisfies (Appendix A) that has theoretical and practical ties to the Laplacian regularizer and diffusion on manifolds used in semi-supervised learning (Belkin et al., 2006) .

In this Section, we exploit those two important properties in two applications of Sobolev GAN: Text generation and semi-supervised learning. First in text generation, which can be seen as a discrete sequence generation, Sobolev GAN (and WGAN-GP) enable training GANs without need to do explicit brute-force conditioning. We attribute this to the built-in conditioning in Sobolev IPM (for the sequence aspect) and to the CDF matching (for the discrete aspect). Secondly using GANs in semi-supervised learning is a promising avenue for learning using unlabeled data. We show that a variant of Sobolev GAN can achieve strong SSL results on the CIFAR-10 dataset, without the need of any form of activation normalization in the networks or any extra ad hoc tricks.

6.1. TEXT GENERATION WITH SOBOLEV GAN:

In this Section, we present an empirical study of Sobolev GAN in character level text generation. Our empirical study on end to end training of character-level GAN for text generation is articulated on four dimensions (loss, critic, generator, µ). (1) the loss used (GP: WGAN-GP (Gulrajani et al., 2017) , S: Sobolev or F: Fisher) (2) the architecture of the critic (Resnets or RNN) (3) the architecture of the generator (Resnets or RNN or RNN with curriculum learning) (4) the sampling distribution µ in the constraint.

Text Generation Experiments. We train a character-level GAN on Google Billion Word dataset and follow the same experimental setup used in (Gulrajani et al., 2017) . The generated sequence length is 32 and the evaluation is based on Jensen-Shannon divergence on empirical 4-gram probabilities (JS-4) of validation data and generated data. JS-4 may not be an ideal evaluation criteria, but it is a reasonable metric for current character-level GAN results, which is still far from generating meaningful sentences.

Annealed Smoothing of discrete P r in the constraint µ. Since the generator distribution will always be defined on a continuous space, we can replace the discrete "real" distribution P r with a smoothed version (Gaussian kernel smoothing) P r N (0, σ 2 I d ). This corresponds to doing the following sampling for P r : x + ξ, x ∼ P r , and ξ ∼ N (0, σ 2 I d ). Note that we only inject noise to the "real" distribution with the goal of smoothing the support of the discrete distribution, as opposed to instance noise on both "real" and "fake" to stabilize the training, as introduced in (Kaae Sønderby et al., 2017; Arjovsky & Bottou, 2017) . As it is common in optimization by continuation (Mobahi & III, 2015) , we also anneal the noise level σ as the training progresses on a linear schedule.

Sobolev GAN versus WGAN-GP with Resnets.:

In this setting, we compare (WGAN-GP,G=Resnet,D=Resnet,µ = µ GP ) to (Sobolev,G=Resnet,D=Resnet,µ) where µ is one of: (1) µ GP , (2) the noise smoothed µ s (σ) = Pr N (0,σ 2 I d )+Q θ 2 or (3) noise smoothed with annealing µ a s (σ 0 ) with σ 0 the initial noise level. We use the same architectures of Resnet with 1D convolution for the critic and the generator as in (Gulrajani et al., 2017) (4 resnet blocks with hidden layer size of 512). In order to implement the noise smoothing we transform the data into one-hot vectors. Each one hot vector x is transformed to a probability vector p with 0.9 replacing the one and 0.1/(dict size -1) replacing the zero. We then sample from a Gaussian distribution N (0, σ 2 ), and use softmax to normalize log p + . We use algorithm 1 for Sobolev GAN and fix the learning rate to 10 -4 and ρ to 10 -5 . The noise level σ was annealed following a linear schedule starting from an initial noise level σ 0 (at iteration i, σ i = σ 0 (1 -i M axiter ), Maxiter=30K). For WGAN-GP we used the open source implementation with the penalty λ = 10 as in (Gulrajani et al., 2017) . Results are given in Figure 3 (a) for the JS-4 evaluation of both WGAN-GP and Sobolev GAN for µ = µ GP . In Figure 3 (b) we show the JS-4 evaluation of Sobolev GAN with the annealed noise smoothing µ a s (σ 0 ), for various values of the initial noise level σ 0 . We see that the training succeeds in both cases. Sobolev GAN achieves slightly better results than WGAN-GP for the annealing that starts with high noise level σ 0 = 1.5. We note that without smoothing and annealing i.e using µ = Pr+Q θ 2 , Sobolev GAN is behind. Annealed smoothing of P r , helps the training as the real distribution is slowly going from a continuous distribution to a discrete distribution. See Appendix C (Figure 6 ) for a comparison between annealed and non annealed smoothing.

We give in Appendix C a comparison of WGAN-GP and Sobolev GAN for a Resnet generator architecture and an RNN critic. The RNN has degraded performance due to optimization difficulties.

Fisher GAN Curriculum Conditioning versus Sobolev GAN: Explicit versus Implicit conditioning. We analyze how Fisher GAN behaves under different architectures of generators and critics. We first fix the generator to be ResNet. We study 3 different architectures of critics: ResNet, GRU (we follow the experimental setup from (Press et al., 2017) ), and hybrid ResNet+GRU (Reed et al., 2016) . We notice that RNN is unstable, we need to clip the gradient values of critics in [-0.5, 0.5], and the gradient of the Lagrange multiplier λ F to [-10 4 , 10 4 ]. We fix ρ F = 10 -7 and we use µ = µ GP . We search the value for the learning rate in [10 -5 , 10 -4 ]. We see that for µ = µ GP and G = Resnet for various critic architectures, Fisher GAN fails at the task of text generation (Figure 4 a-c ). Nevertheless, when using RNN critics (Fig 4 b, c ) a marginal improvement happens over the fully collapsed state when using a resnet critic (Fig 4 a ). We hypothesize that RNN critics enable some conditioning and factoring of the distribution, which is lacking in Fisher IPM.

Finally Figure 4 (d) shows the result of training with recurrent generator and critic. We follow (Press et al., 2017) in terms of GRU architecture, but differ by using Fisher GAN rather than WGAN-GP. We use µ = Pr+Q θ 2 i.e. without annealed noise smoothing. We train (F, D=RNN,G=RNN, Pr+Q θ 2 ) using curriculum conditioning of the generator for all lengths as done in (Press et al., 2017) : the generator is conditioned on 32characters and predicts the remaining characters. We increment = 1 to 32 on a regular schedule (every 15k updates). JS-4 is only computed when > 4. We see in Figure 4 that under curriculum conditioning with recurrent critics and generators, the training of Fisher GAN succeeds and reaches similar levels of Sobolev GAN (and WGAN-GP). Note that the need of this explicit brute force conditioning for Fisher GAN, highlights the implicit conditioning induced by Sobolev GAN via the gradient regularizer, without the need for curriculum conditioning. It is important to note that by doing this explicit curriculum conditioning for Fisher GAN, we highlight the implicit conditioning induced by Sobolev GAN, via the gradient regularizer.

6.2. SEMI-SUPERVISED LEARNING WITH SOBOLEV GAN:

A proper and promising framework for evaluating GANs consists in using it as a regularizer in the semi-supervised learning setting (Salimans et al., 2016; Dumoulin et al., 2017; Kumar et al., 2017) .

As mentioned before, the Sobolev norm as a regularizer for the Sobolev IPM draws connections with the Laplacian regularization in manifold learning (Belkin et al., 2006) . In the Laplacian framework of semi-supervised learning, the classifier satisfies a smoothness constraint imposed by controlling its Sobolev norm: ´X ∇ x f (x) 2 µ 2 (x)dx (Alaoui et al., 2016) . In this Section, we present a variant of Sobolev GAN that achieves competitive performance in semi-supervised learning on the CIFAR-10 dataset Krizhevsky & Hinton (2009) without using any internal activation normalization in the critic, such as batch normalization (BN) (Ioffe & Szegedy, 2015) , layer normalization (LN) (Ba et al., 2016) , or weight normalization (Salimans & Kingma, 2016) .

In this setting, a convolutional neural network Φ ω : X → R m is shared between the cross entropy (CE) training of a K-class classifier (S ∈ R K×m ) and the critic of GAN (See Figure 5 ). We have the following training equations for the (critic + classifer) and the generator:

EQUATION

Generator:

EQUATION

)

where the main IPM objective with N samples:

Ê (f, g θ ) = 1 N x∈unl f (x) -z∼pz f (g θ (z)) .

Following (Mroueh & Sercu, 2017) we use the following "K + 1 parametrization" for the critic (See Figure 5 ) :

f (x) = K y=1 p(y|x) S y , Φ ω (x) f + : "real" critic -v, Φ ω (x) f -:"fake" critic

Note that p(y|x) = Softmax( S, Φ ω (x) ) y appears both in the critic formulation and in the Cross-Entropy term in Equation ( 11). Intuitively this critic uses the K class directions of the classifier S y to define the "real" direction, which competes with another K+1 th direction v that indicates fake samples. This parametrization adapts the idea of (Salimans et al., 2016) , which was formulated specifically for the classic KL / JSD based GANs, to IPM-based GANs. We saw consistently better results with the K + 1 formulation over the regular formulation where the classification layer S doesn't interact with the critic direction v. We also note that when applying a gradient penalty based constraint (either WGAN-GP or Sobolev) on the full critic f = f +f -, it is impossible for the network to fit even the small labeled training set (underfitting), causing bad SSL performance. This leads us to the formulation below, where we apply the Sobolev constraint only on f -. Throughout this Section we fix µ = Pr+Q θ 2 .

We propose the following two schemes for constraining the K+1 critic f

(x) = f + (x) -f -(x):

1) Fisher constraint on the critic: We restrict the critic to the following set:

f ∈ f = f + -f -, ΩF (f, g θ ) = 1 2N x∈unl f 2 (x) + z∼pz f 2 (g θ (z)) = 1 .

This constraint translates to the following ALM objective in Equation ( 11):

L GAN alm (f, g θ ) = Ê (f, g θ ) + λ F (1 -ΩF (f, g θ )) - ρ F 2 ( ΩF (f, g θ ) -1) 2 ,

where the Fisher constraint ensures the stability of the training through an implicit whitened mean matching (Mroueh & Sercu, 2017) .

2) Fisher+Sobolev constraint: We impose 2 constraints on the critic:

Fisher on f & Sobolev on f - f ∈ f = f + -f -, ΩF (f , g θ ) = 1 and ΩS (f -, g θ ) = 1 , where ΩS (f -, g θ ) = 1 2N x∈unl ∇ x f -(x) 2 + z∼pz ∇ x f -(g θ (z)) 2 .

This constraint translates to the following ALM in Equation ( 11):

L GAN alm (f, g θ ) = Ê (f, g θ ) + λ F (1 -ΩF (f , g θ )) + λ S (1 -ΩS (f -, g θ )) - ρ F 2 ( ΩF (f , g θ ) -1) 2 - ρ S 2 ( ΩS (f -, g θ ) -1) 2 .

Note that the fisher constraint on f ensures the stability of the training, and the Sobolev constraints on the "fake" critic f -enforces smoothness of the "fake" critic and thus the shared CNN Φ ω (x). This is related to the classic Laplacian regularization in semi-supervised learning (Belkin et al., 2006) .

Table 2 shows results of SSL on CIFAR-10 comparing the two proposed formulations. Similar to the standard procedure in other GAN papers, we do hyperparameter and model selection on the validation set. We present baselines with a similar model architecture and leave out results with significantly larger convnets. G and D architectures and hyperparameters are in Appendix D. Φ ω is similar to (Salimans et al., 2016; Dumoulin et al., 2017; Mroueh & Sercu, 2017) in architecture, but note that we do not use any batch, layer, or weight normalization yet obtain strong competitive accuracies. We hypothesize that we don't need any normalization in the critic, because of the implicit whitening of the feature maps introduced by the Fisher and Sobolev constraints as explained in (Mroueh & Sercu, 2017) .

! CNN K x Softmax(hS, ! (x)i)y p(y|x) = hv, ! (x)i f+(x) = P K y=1 p(y|x) hSy, ! (x)i f (x) = hv, ! (x)i "real" critic "fake" critic GAN critic f (x) = f + (x) f (x)

Figure 5 : "K+1" parametrization of the critic for semi-supervised learning.

Table 2 : CIFAR-10 error rates for varying number of labeled samples in the training set. Mean and standard deviation computed over 5 runs. We only use the K + 1 formulation of the critic. Note that we achieve strong SSL performance without any additional tricks, and even though the critic does not have any batch, layer or weight normalization. Baselines with * use either additional models like PixelCNN, or do data augmentation (translations and flips), or use a much larger model, either of which gives an advantage over our plain simple training method. † is the result we achieved in our experimental setup under the same conditions but without "K+1" critic (see Appendix D) , since (Gulrajani et al., 2017) 

7. CONCLUSION:

We introduced the Sobolev IPM and showed that it amounts to a comparison between weighted (coordinate-wise) CDFs. We presented an ALM algorithm for training Sobolev GAN. The intrinsic conditioning implied by the Sobolev IPM explains the success of gradient regularization in Sobolev GAN and WGAN-GP on discrete sequence data, and particularly in text generation. We highlighted the important tradeoffs between the implicit conditioning introduced by the gradient regularizer in Sobolev IPM, and the explicit conditioning of Fisher IPM via recurrent critics and generators in conjunction with the curriculum conditioning. Both approaches succeed in text generation. We showed that Sobolev GAN achieves competitive semi-supervised learning results without the need of any normalization, thanks to the smoothness induced by the gradient regularizer. We think the Sobolev IPM point of view will open the door for designing new regularizers that induce different types of conditioning for general structured/discrete/graph data beyond sequences.

A THEORY: APPROXIMATION AND TRANSPORT INTERPRETATION:

In this Section we present the theoretical properties of Sobolev IPM and how it relates to distributions transport theory and other known metrics between distributions, notably the Stein distance.

A.1 DISTRIBUTION TRANSPORT PERSPECTIVE ON SOBOLEV IPM

In this Section, we characterize the optimal critic of the Sobolev IPM as a solution of a non linear PDE. The solution of the variational problem of the Sobolev IPM satisfies a non linear PDE that can be derived using standard tools from calculus of variations (Ekeland & Turnbull, 1983; Alaoui et al., 2016) .

Theorem 3 (PDE satisfied by the Sobolev Critic). The optimal critic of Sobolev IPM f * satisfies the following PDE:

EQUATION

Define the Stein Operator:

T (µ) g(x) = 1 2 ∇ x log(µ(x)), g(x) + div( g(x)

) . Hence we have the following Transport Equation of P to Q:

Q(x) = P(x) + 2S µ (P, Q)µ(x)T (µ)∇ x f * (x).

Recall the definition of Stein Discrepancy :

S(Q, µ) = sup g |E x∼Q [T (µ) g(x)]| , g : X → R d .

Theorem 4 (Sobolev and Stein Discrepanices). The following inequality holds true:

EQUATION

Consider for example µ = P, and sequence Q n . If the Sobolev distance goes S P (P, Q n ) → 0, the ratio r n (x) = Qn(x) P(x) converges in expectation (w.r.t to Q) to 1. The speed of the convergence is given by the Stein Discrepancy S(Q n , P).

Relation to Fokker-Planck Diffusion Equation and Particles dynamics. Note that PDE satisifed by the Sobolev critic given in Equation ( 13) can be equivalently written:

EQUATION

written in this form, we draw a connection with the Fokker-Planck Equation for the evolution of a density function q t that is the density of particles X t ∈ R d evolving with a drift (a velocity field)

V (x, t) : X × [0, ∞[→ R d : dX t = V (X t , t)dt

, where the density of X 0 is given by q

0 (x) = Q(x),

The Fokker-Planck Equation states that the evolution of the particles density q t satisfies:

EQUATION

Comparing Equation (15) and Equation ( 16), we identify then the gradient of Sobolev critic as a drift. This suggests that one can define "Sobolev descent" as the evolution of particles along the gradient flow:

dX t = ∇ x f * t (X t )dt

, where the density of X 0 is given by q 0 (x) = Q(x), where f * t is the Sobolev critic between q t and P. One can show that the limit distribution of the particles is P. The analysis of "Sobolev descent" and its relation to Stein Descent (Liu & Wang, 2016; Liu, 2017) is beyond the scope of this paper and will be studied in a separate work. Hence we see that the gradient of the Sobolev critic defines a transportation plan to move particles whose distribution is Q to particles whose distribution is P (See Figure 2 ). This highlights the role of the gradient of the critic in the context of GAN training in term of transporting the distribution of the generator to the real distribution.

B PROOFS:

Proof of Theorem 2. Let F P and F Q , be the cumulative distribution functions of P and Q respectively. We have:

EQUATION

We note D = ∂ d ∂x1...∂x d , and

D -i = ∂ d-1

∂x1...∂xi-1∂xi+1...∂x d , for i = 1 . . . d.

D -i computes the d -1 partial derivative excluding the variable i.

In the following we assume that F P , and F Q and its d derivatives exist and are continuous meaning that F P and F Q ∈ C d (X ). The objective function in Equation ( 3) can be written as follows:

E x∼P f (x) -E x∼Q f (x) = ˆX f (x)D F P (x) -F Q (x) dx = ˆX f (x) ∂ ∂x i D -i (F P (x) -F Q (x))dx

(for any i, since F P and -d ) it follows that:

F Q ∈ C d (X )) = - ˆX ∂f ∂x i D -i (F P (x) -F Q (x))dx (f vanishes at the boundary in W 1,2 0 (X , µ) ) Let D -= (D -1 , . . . , D

EQUATION

Let us define L 2 (X , µ) ⊗d the space of measurable functions from X → R d . For g, h ∈ L 2 (X , µ) ⊗d the dot product is defined as follows:

g, h L2(X ,µ) ⊗d = ˆX g(x), h(x) R d µ(x)dx

and the norm is given :

g L2(X ,µ) ⊗d = ˆX g 2 R d µ(x)dx.

We can write the objective in Equation ( 18) in term of the dot product in L 2 (X , µ) ⊗d :

EQUATION

)

On the other hand the constraint in Equation ( 3) can be written in terms of the norm in L 2 (X , µ) ⊗d :

EQUATION

Replacing the objective and constraint given in Equations ( 19) and (20) in Equation (3), we obtain:

S(P, Q) = 1 d sup f, ∇xf L 2 (X ,µ) ⊗d ≤1 ∇ x f , D -(F Q -F P ) µ L2(X ,µ) ⊗d = 1 d sup g∈L2(X ,µ) ⊗d , g L 2 (X ,µ) ⊗d ≤1 g, D -(F Q -F P ) µ L2(X ,µ) ⊗d = 1 d D -(F Q -F P ) µ L2(X ,µ) ⊗d   By definition of . L2(X ,µ) ⊗d , g * = D -F Q (x) -D -F P (x) µ(x) 1 D -(F Q -F P ) µ L2(X ,µ) ⊗d    = 1 d ˆX D -F Q (x) -D -F P (x) 2 µ(x) dx.

Hence we find also that the optimal critic f * satisfies:

∇ x f * (x) = D -F Q (x) -D -F P (x) µ(x) 1 D -(F Q -F P ) µ L2(X ,µ) ⊗d .

Proof of Lemma 1.

E x∼P f (x) -E x∼Q f (x) = 1 d ˆX ∇ x f (x), D -(F Q (x) -F P (x)) R d dx = S µ (P, Q) ˆX ∇ x f (x), D -(F Q (x) -F P (x)) µ(x)dS µ (P, Q) R d µ(x)dx = S µ (P, Q) ˆX ∇ x f (x), ∇ x f * (x) µ(x)dx = S µ (P, Q) f, f * W 1,2 0

Hence we have:

sup f ∈H , f W 1,2 0 ≤1 E x∼P f (x) -E x∼Q f (x) = S µ (P, Q) sup f ∈H , f W 1,2 0 ≤1 f, f * W 1,2 0 , It follows therefore that: S H (P, Q) = S µ (P, Q) sup f ∈H , f W 1,2 0 ≤1 f, f * W 1,2 0

We conclude that the Sobolev IPM can be approximated in arbitrary space as long as it has enough capacity to approximate the optimal critic. Interestingly the approximation error is measured now with the Sobolev semi-norm, while in Fisher it was measured with the Lebesgue norm. Approximations with Sobolev Semi-norms are stronger then Lebesgue norms as given by the Poincare inequality (||f

EQUATION

), meaning if the error goes to zero in Sobolev sense it also goes to zero in the Lebesgue sense , but the converse is not true.

Proof of Theorem 3. The proof follows similar arguments in the proofs of the analysis of Laplacian regularization in semi-supervised learning studied by (Alaoui et al., 2016) .

EQUATION

Note that this problem is convex in f (Ekeland & Turnbull, 1983) . Writing the lagrangian for equation ( 21) we get :

L(f, λ) = E x∼P [f (x)] -E x∼Q [f (x)] + λ 2 1 -E x∼µ ∇ x f (x) 2 2 = ˆX f (x) P(x) -Q(x) dx + λ 2 1 - ˆX ∇ x f (x) 2 2 µ(x)dx = ˆX f (x) µ 1 (x) dx + λ 2 1 - ˆX ∇ x f (x) 2 2 µ(x) dx

We denote P(x) -Q(x) as µ 1 (x).To get the optimal f , we need to apply KKT conditions on the above equation.

L(f, λ) = ˆX f (x) µ 1 (x) dx + λ 2 1 - ˆX ∇ x f (x) 2 2 µ(x) dx

From the calculus of variations:

L(f + h, λ) = ˆX (f + h)(x) µ 1 (x) dx + λ 2 1 - ˆX ∇ x f + h (x) 2 2 µ(x) dx = ˆX (f (x) + h(x)) µ 1 (x) dx + λ 2 1 - ˆX ∇ x f + h (x), ∇ x f + h (x) µ(x) dx = ˆX (f (x) + h(x)) µ 1 (x) dx + λ 2 1 - ˆX ∇ x f (x) 2 2 + 2 ∇ x f (x), ∇ x h(x) + O( 2 ) µ(x)dx = L(f, λ) + ˆX h(x) µ 1 (x) dx -λ ˆX ∇ x f (x), ∇ x h(x) µ(x) dx + O( 2 ) = L(f, λ) + ˆX h(x) µ 1 (x) dx -λ ˆX ∇ x f (x), ∇ x h(x) µ(x) dx + O( 2 )

Now we apply integration by part and set h to be zero at boundary as in (Alaoui et al., 2016) . We get :

ˆX ∇ x f (x), ∇ x h(x) µ(x) dx = ˆX ∇ x f (x) µ(x), ∇ x h(x) dx = ∂X h(x)µ(x)∇ x f (x).n(x)dS(x) -ˆX div µ(x)∇ x f (x) h(x) dx = -ˆX div µ(x)∇ x f (x) h(x) dx Hence, L(f + h, λ) = L(f, λ) + ˆX µ 1 (x) h(x) dx + λ ˆX div µ(x)∇ x f (x) h(x) dx + O( 2 ) = L(f, λ) + ˆX µ 1 (x) + λ div µ(x)∇ x f (x) h(x) dx + O( 2 )

The functional derivative of L(f, λ), at any test function h vanishing on the boundary:

ˆX ∂L(f, λ) ∂f (x)h(x)dx = lim →0 L(f + h, λ) -L(f, λ) = ˆX µ 1 (x) + λ div µ(x)∇ x f (x) h(x) dx

Hence we have:

∂L(f, λ) ∂f (x) = µ 1 (x) + λ div µ(x)∇ x f (x)

For the optimal f * , λ * first order optimality condition gives us:

EQUATION

Note that (See for example (Alaoui et al., 2016) ) :

div µ(x)∇ x f * (x) = µ(x)∆ 2 f * (x) + ∇ x µ(x), ∇ x f * (x) , since div(∇ x f * (x)) = ∆ 2 f * (x)

. Hence from equation ( 22)

EQUATION

Hence f * , λ * satisfies :

EQUATION

Let us verify that the optimal critic as found in the geometric definition (Theorem 2) of Sobolev IPM that satisfies:

EQUATION

satisfies indeed the PDE.

From equation ( 27), we want to compute ∂ 2 f (x)

EQUATION

Adding equation ( 28) for all i ∈ [d], we get :

d i=1 ∂ 2 f (x) ∂x 2 i + ∇ i µ(x) µ(x) ∇ i f (x) + P(x) -Q(x) λ * d µ(x) = 0

As a result, the solution f * of the partial differential equation given in equation ( 25) satisfies the following :

∂f * (x) ∂x i = D -i F Q (x) -D -i F P (x) λ * d µ(x) ∀ i ∈ [d]

Using the constraint in (26) we can get the value of λ * :

ˆ ∇f * (x) 2 µ(x) dx = 1 ⇒ ˆd i=1 ∂f * (x) ∂x i 2 µ(x) dx = 1 ⇒λ * = 1 d d i=1 ˆ D -i F Q (x) -D -i F P (x) 2 µ(x) dx = S µ (P, Q).

Proof of Theorem 4. Define the Stein operator (Oates et al., 2017) :

T (µ)[∇ x f (x)] = 1 2 ∇ x f (x), ∇ x log µ(x) + 1 2 ∇ x , ∇ x f (x) = 1 2 ∇ x f (x), ∇ x log µ(x) + 1 2 ∆ 2 f (x).

This operator was later used in defining the Stein discrepancy (Gorham & Mackey, 2015; Liu et al., 2016; Chwialkowski et al., 2016; Liu, 2017) .

Recall that Barbour generator theory provides us a way of constructing such operators that produce mean zero function under µ. It is easy to verify that:

E x∼µ T (µ)∇ x f (x) = 0.

Recall that this operator arises from the overdamped Langevin diffusion, defined by the stochastic differential equation:

dx t = 1 2 ∇ x log µ(x t ) + dW t

where (W t ) t≥0 is a Wiener process. This is related to plug and play networks for generating samples if the distribution is known, using the stochastic differential equation.

From Theorem 3, it is easy to see that the PDE the Sobolev Critic (f * , λ * = S µ (P, Q)) can be written in term of Stein Operator as follows:

T (µ)[∇ x f * ](x) = 1 2λ * Q(x) -P(x) µ(x)

Taking absolute values and the expectation with respect to Q:

|E x∼Q [T (µ)∇ x f * (x)]| = 1 2S µ (P, Q) E x∼Q Q(x) -P(x) µ(x)

Recall that the definition of Stein Discrepancy :

S(Q, µ) = sup g∈L2(X ,µ) ⊗d |E x∼Q [T (µ) g(x)]|

It follows that Sobolev IPM critic satisfies:

|E x∼Q [T (µ)∇ x f * (x)]| ≤ S(Q, µ),

Hence we have the following inequality:

1 2S µ (P, Q) E x∼Q Q(x) -P(x) µ(x) ≤ S(Q, µ)

This is equivalent to:

E x∼Q Q(x) -P(x) µ(x) ≤ 2 S(Q, µ) Stein Good fitness of the model Q w.r.t to µ S µ (P, Q) Sobolev Distance

Similarly we obtain:

E x∼P Q(x) -P(x) µ(x) ≤ 2 S(P, µ)

Stein Good fitness of µ w.r.t to P S µ (P, Q)

Sobolev Distance:

For instance consider µ = P, we have therefore:

1 2 E x∼Q Q(x) P(x) -1 ≤ S(Q, P)S P (P, Q).

Note that the left hand side of the inequality is not the total variation distance.

Hence for a sequence Q n if the Sobolev distance goes S P (P, Q n ) → 0, the ratio r n (x) = Qn(x) P(x)

converges in expectation (w.r.t to Q) to 1. The speed of the convergence is given by the Stein Discrepancy S(Q n , P).

One important observation here is that convergence of PDF ratio is weaker than the conditional CDF as given by the Sobolev distance and of the good fitness of score function as given by Stein discrepancy.

C TEXT EXPERIMENTS: ADDITIONAL PLOTS:

Comparison of annealed versus non annealed smoothing of P r in Sobolev GAN. Sobolev GAN versus WGAN-GP with RNN. We fix the generator architecture to Resnets. The experiments of using RNN (GRU) as the critic architecture for WGAN-GP and Sobolev is shown in Figure 7 where we used µ = µ GP for both cases. We only apply gradient clipping to stabilize the performance without other tricks. We can observe that using RNN degrades the performance. We think that this is due to an optimization issue and a difficulty in training RNN under the GAN objective without any pre-training or conditioning. 

D SSL: HYPERPARAMETERS AND ARCHITECTURE:

For our SSL experiments on CIFAR-10, we use Adam with learning rate η = 2e-4, β 1 = 0.5 and β 2 = 0.999, both for critic f (without BN) and Generator (with BN). We selected λ CE = 1.5 from [0.8, 1.5, 3.0, 5.0]. We train all models for 350 epochs. We used some L2 weight decay: 1e-6 on ω, S (i.e. all layers except last) and 1e-3 weight decay on the last layer v. For formulation 1 (Fisher only) we have ρ F = 1e-7, modified critic learning rate η D = 1e-4, critic iters n c = 2. For formulation 2 (Sobolev + Fisher) we have ρ F = 5e-8, ρ S = 2e-8, critic iters n c = 1. For the WGAN-GP (Gulrajani et al., 2017) baseline SSL experiment we followed the original paper with critic iters n c = 5, η G = η D = 1e-4, Adam β 2 =0.9 and GP weight λ GP = 10.0. Architectures are as below. We determined λ CE = 0.3 to be optimal from [0.03, 0.1, 0.3, 1.0, 3.0]. As mentioned in Section 6.2, the K+1 critic formulation is not able to fit the training set with the GP constraint, so we fall back to the plain critic formulation where the critic v, Φ ω (x) does not interact with the classifier S, Φ ω (x) . 

:

Code for semi-supervised learning experiments is available on https://github.com/tomsercu/ SobolevGAN-SSL

Figures and Tables:

Smoothed discrete densities: PDF versus CDF of smoothed discrete densities with non overlapping supports.

Smoothed Discrete and Continuous densities: PDF versus CDF of a smoothed discrete density and a continuous density with non overlapping supports.

Figure 2: Numerical solution of the PDE satisfied by the optimal Sobolev critic and the transportation Plan induced by the gradient of Sobolev critic. The gradient of the critic (wrt to the input), defines on the support of µ = P+Q 2 a transportation plan for moving the distribution mass from Q to P. For a theoretical analysis of this transportation plan and its relation to Fokker-Planck diffusion the reader is invited to check Appendix A.

Sobolev with different µ dominant measures and WGAN-GP. The JS-4 of µ a s (σ0 = 1.5) is 0.3268.

Figure 3: Result of Sobolev GAN for various dominating measure µ, for resnets as architectures of the critic and the generator.

Figure4: Fisher GAN with different architectures for critics: (a-c) We see that for µ = µ GP and G = Resnet for various critic architectures, Fisher GAN fails at the task of text generation. We notice small improvements for RNN critics (b-c) due to the conditioning and factoring of the distribution. (d) Fisher GAN with recurrent generator and critic, trained on a curriculum conditioning for increasing lengths , increments indicated by gridlines. In this curriculum conditioning setup, with recurrent critics and generators, the training of Fisher GAN succeeds and reaches similar levels of Sobolev GAN (and WGAN-GP). It is important to note that by doing this explicit curriculum conditioning for Fisher GAN, we highlight the implicit conditioning induced by Sobolev GAN, via the gradient regularizer.

Figure 6: Comparison of annealed versus non annealed smoothing of P r in Sobolev GAN. We see that annealed smoothing outperforms the non annealed smoothing experiments.

Figure 7: Result of WGAN-GP and Sobolev with RNNs.

Figure 8: Text samples from various GANs considered in this paper.

Architecture:### CIFAR-10: 32x32. G is dcgan with G_extra_layers=2. ### D is in the flavor of OpenAI Improved GAN, ALI. G ( (main): Sequential ( (0): ConvTranspose2d(100, 256, kernel_size=(4, 4), stride=(1, 1), bias=False) (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True) (2): ReLU (inplace) (3): ConvTranspose2d(256, 128, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1), bias=False) (4): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True) (5): ReLU (inplace)

does not have SSL results. Gulrajani et al., 2017) † 44.85 ± 0.28 37.62 ± 0.56 32.66 ± 0.48 30.38 ± 0.22 Fisher, layer norm (Mroueh & Sercu, 2017) 19.74 ± 0.21 17.87 ± 0.38 16.13 ± 0.53 14.81 ± 0.16 Fisher, no norm (Mroueh & Sercu, 2017) 21.49 ± 0.18 19.20 ± 0.46 17.30 ± 0.30 15.57 ± 0.33

Table content: <table><tr><td>Number of labeled examples</td><td>1000</td><td>2000</td><td>4000</td><td>8000</td></tr><tr><td>Model</td><td/><td colspan="2">Misclassification rate</td><td/></tr><tr><td>CatGAN (Springenberg, 2015)</td><td/><td/><td>19.58</td><td/></tr><tr><td>FM (Salimans et al., 2016) ALI (Dumoulin et al., 2017) Tangents Reg (Kumar et al., 2017) Π-model (Laine &amp; Aila, 2016) * VAT (Miyato et al., 2017)</td><td colspan="4">21.83 ± 2.01 19.61 ± 2.09 18.63 ± 2.32 17.72 ± 1.82 19.98 ± 0.3 19.09 ± 0.15 17.99 ± 0.54 17.05 ± 0.50 20.06 ± 0.5 16.78 ± 0.6 16.55 ± 0.29 14.87</td></tr><tr><td>Bad Gan (Dai et al., 2017) * VAT+EntMin+Large (Miyato et al., 2017) *</td><td/><td/><td>14.41 ± 0.30 13.15</td><td/></tr><tr><td>Sajjadi (Sajjadi et al., 2016) *</td><td/><td/><td>11.29</td><td/></tr><tr><td>WGAN-GP (</td><td/><td/><td/><td/></tr></table>



Table content: <table/>



Table content: <table/>

Peer review (iclr2018):
 The paper deals with the increasingly popular GAN approach to constructing generative models. Following the first formulation of GANs in 2014, it was soon realized that the training dynamics was highly unstable, leading to significant difficulties in achieving stable results. The paper by Arjovsky et al (2017) provided a framework based on the Wasserstein distance, a distance measure between probability distributions belonging to the class of so-called Integral Probability Metrics (IPMs). This approach solved the stability issues of GANs and demonstrated improved empirical results. Several other works were then developed to deal with these stability issues, specifically the Fisher IPM. Both these methods relied on discriminating between distributions P and Q based on computing a function f, belonging to an appropriate function class {.cal F}, that maximizes the deviation E_{x~P}f(x)-E_{x~Q}f(x). The main issue relates to the choice of the class {.cal F}. For the Wasserstein distance this was the class of L_1 Lipschitz functions, while for the Fisher distance it was the class of square integrable functions. The present paper introduces a new notion of distance, where {.cal F} is the defined through the Sobolev norm, based on the L_2 norm of the gradient of f(x), with respect to a measure .mu(x), where the latter can be freely chosen under certain assumptions. The authors prove a theorem related to the properties of the Sobolev norm, and express it in terms of the component-wise conditional distributions. Moreover, they show that the optimal critic f is obtained by solving a PDE subject to zero boundary conditions. They then use their suggested metric in order to develop a GAN algorithm, and present experimental results demonstrating its utility. The Sobolev IPM has two nice features. First, it is based on the component-wise conditional distribution of the CDFs, and, second, its relation to the Laplacian regularizer from manifold learning. Its 1D version also relates to the well-known von Mises Cramer statistics used in hypothesis testing. The paper belongs to a class of recent papers attempting to suggest improvements to the original GAN algorithm, relying on the KL divergence. It is well conceived and articulated, and provides an interesting and potentially powerful new direction to improve GANs in practice. However, it is somewhat difficult to follow the paper, and would urge the authors to improve and augment their presentation of the following issues. 1) One often poses regularization schemes based on optimality criteria. Is there any optimality principle under which the Sobolev IPM is a desired choice? 2) The authors argue that their approach is especially well suited for discrete sequential data. This issue was not clear to me, and it would be good if the authors could expand on this issue and provide a clearer explanation. 3) How would the Sobolev norm behave under a change of coordinates or a homeomorphism of the space? Would it make sense to require some invariance in this respect? 4) The Lagrangian in eq. (9) contains both a Lagrange constraint on the Sobolev norm and a penalty term. Why are both needed? Why do the updates of .lambda and p in Algorithm 1 used different schemes (SGD and ADAM, respectively). 5) Table 2, p. 13 – it would be nice to see a comparison to the recently introduced gradient penalty approach, Gulrajani et al., Improved training of wasserstein gans. arXiv preprint arXiv:1704.00028, 2017. 6) The integral defining F_p(x) on p. 3 has x as an argument on the LHS and as an integrand of the RHS. Please correct this. Also specify that x=(x_1,.ldots,x_d).