Title: B-GAN: UNIFIED FRAMEWORK OF GENERATIVE AD-VERSARIAL NETWORKS

Abstract: Generative adversarial networks (GANs) are successful deep generative models. They are based on a two-player minimax game. However, the objective function derived in the original motivation is changed to obtain stronger gradients when learning the generator. We propose a novel algorithm that repeats density ratio estimation and f-divergence minimization. Our algorithm offers a new unified perspective toward understanding GANs and is able to make use of multiple viewpoints obtained from the density ratio estimation research, e.g. what divergence is stable and relative density ratio is useful.

1. INTRODUCTION:

There have been many recent studies about deep generative models. Generative adversarial networks (GAN) (Goodfellow et al., 2014) is the variant of these models that has attracted the most attention. It has been demonstrated that generating vivid, realistic images from a uniform distribution is possible (Radford et al., 2015; Denton et al., 2015) . GANs are formulated as a two-player minimax game. However, the objective function derived in the original motivation is modified to obtain stronger gradients when learning the generator. GANs have been applied in various studies; however, few studies have attempted to reveal their mechanism (Goodfellow, 2014; Huszar, 2015) .

Recently, f-GAN, which minimizes the variational estimate of f-divergence, has been proposed (Nowozin et al., 2016) . The original GAN is a special case of f-GAN.

In this study, we propose a novel algorithm inspired by GANs from the perspective of density ratio estimation based on the Bregman divergence, which we refer to as b-GAN. The proposed algorithm iterates density ratio estimation and f-divergence minimization based on the obtained density ratio. This study make the following two primary contributions:

1. We derive a novel unified algorithm that employs well-studied results regarding density ratio estimation (Kanamori et al., 2012; Sugiyama et al., 2012; Menon & Ong, 2016) .

2. In the original GANs, the value function derived from the two-player minimax game does not match the objective function that is actually used for learning the generative model. In our algorithm, the objective function derived from the original motivation is not changed for learning the generative model. Minimize a part of variational when f = x log x -(x + 1) log(x + 1), it is a GAN Estimate of f-divergence b-GAN Estimate p q = r(x) min θ E x∼q(x;θ) [f (r(x))] (this work)

Dual relation with f-GAN Minimize f-divergence directly

The remainder of this study is organized as follows. Section 2 describes related work. Section 3 introduces and analyzes the proposed algorithm in detail. Section 4 explains the proposed algorithm for specific cases. Section 5 reports experimental results. Section 6 summarizes our findings and discusses future work.

2. RELATED WORK:

In this study, we denote an input space as X and a hidden space as Z. Let p(x) be the distribution of training data over X and q(x) be the generated distribution over X.

GANs (Goodfellow et al., 2014) were developed based on a game theory scenario, where two model, i.e., a generator network and a discriminator network, are simultaneously trained. The generator network G θ G (z) produces samples with a probability density function of q(x; θ G ). The discriminator network T θ D (x) attempts to distinguish the samples from the training samples and that from the generator. GANs are described as a zero-sum game, where the function v(G, T ) determines the pay-off of the discriminator and the function -v(G, T ) determines the pay-off of the generator. The discriminator T θ D (x) and generator G θ G (z) play the following two-player minimax game min θ G max θ D v(G, T ), where v(G, T ) can be expressed as follows:

E x∼p(x) [log T θ D (x)] + E x∼q(x;θ G ) [log(1 -T θ D (x))].

The discriminator and generator are iteratively trained by turns. For fixed G, the optimal T(x) is

p(x) p(x)+q(x)

. This suggests that training the discriminator can be formulated as a density ratio estimation. The generator is trained to minimize v(G, T ) adversarially. In fact, maximizing

E x∼q(x;θ G ) [log T θ D (x)] is preferable instead of minimizing E x∼q(x;θ G ) [log(1 -T θ D (x))].

Although this does not match the theoretical motivation, this heuristic is the key to successful learning. We analyze this heuristic in Section 3.4. f-GAN (Nowozin et al., 2016) generalizes the GAN concept. First, we introduce f-divergence (Ali & Silvey, 1966) . The f-divergence measures the difference between two probability distributions p and q and is defined as

EQUATION

where f (x) is a convex function satisfying f (1) = 0. Note that in the space of positive measures, i.e., not satisfying normalized conditions, f-divergence must satisfy f (1) = 0 due to its invariance (Amari & Cichoki, 2010) .

The function v(G, T ) of f-GAN is given by

EQUATION

where f * is a Fenchel conjugate of f (Nguyen et al., 2010) . In Eq. 2, v(G, T ) comes from,

EQUATION

Following GANs, θ D is trained to maximize Eq. 2 in order to estimate the f-divergence. In contrast, θ G is trained to adversarially minimize Eq. 2 to minimize the f-divergence estimate. However, as in GANs, maximizing

E x∼q [T (x)] is used rather than minimizing E x∼q [-f * (T (x))]

. The latter optimization is theoretically valid in their formulation; however, they used the former heuristically. Similar to GANs, f-GAN also formulates the training discriminator as a density ratio estimation. For a fixed G, the optimal T (x) is f ( p q ), where f denotes the first-order derivative of f . When f (x) is

x log x -(x + 1) log(1 + x), f-GANs are equivalent to GANs. Table 1 summarizes GAN and f-GAN. We denote the step for updating θ D as D-step and the step for updating θ G as G-step.

3. METHOD:

As described in Section 2, training the discriminators in the D-step of GANs and f-GANs is regarded as density ratio estimation. In this section, we further extend this idea. We first review the density ratio estimation method based on the Bregman divergence. Then, we explain and analyze a novel proposed b-GAN algorithm. See appendix E for recent research related to density ratio estimation.

3.1. DENSITY RATIO MATCHING UNDER THE BREGMAN DIVERGENCE:

There have been many studies on direct density ratio estimation, where a density ratio model is fitted to a true density ratio model under the Bregman divergence (Sugiyama et al., 2012) . We briefly review this method.

Assume there are two distributions p(x) and q(x). Our aim is to directly estimate the true density ratio r(x) = p(x) q(x) without estimating p(x) and q(x) independently . Let r θ (x) be a density ratio model. The integration of the Bregman divergence B f [r(x) r θ (x)] between the density ratio model and the true density ratio with respect to measure q(x)dx is

EQUATION

We define the terms related to r θ in BD f (r||r θ ) as

EQUATION

Thus, estimating the density ratio problem turns out to be the minimization of Eq. 5 with respect to θ.

3.2. MOTIVATION:

In this section, we introduce important propositions required to derive b-GAN. Proofs of propositions are given in Appendix C. The following proposition suggests that the supremum of the negative of Eq. 5 is equal to the f-divergence between p(x) and q(x).

Prop 3.1. The following equation holds:

EQUATION

The right side of Eq. 7 reaches the supremum when r θ (x) = r(x) is satisfied.

It has been shown that the supremum of negative of Eq. 5 is equivalent to the supremum of Eq. 2.

Interestingly, the negative of Eq. 5 has a dual relation with the objective function of f-GAN, i.e., Eq. 2.

Prop 3.2. Introducing dual coordinates T θ D = f (r θ ) (Amari & Cichoki, 2010) yields the right side of Eq. 5 from Eq. 2.

Prop 3.2 shows that the D-step of f-GAN can be regarded as the density ratio estimation because Eq. 5 expresses the density ratio estimation and Eq. 2 is a value function of f-GAN.

3.3. B-GAN:

Our objective is to minimize the f-divergence between the distribution of the training data p(x) and the generated distribution q(x). We introduce two functions constructed using neural networks: r θ D (x) : X → R parameterized by θ D , and G θ G (z) : Z → X parameterized by θ G . Measure q(x; θ G )dx is a probability measure induced from the uniform distribution by G θ G (z). In this case, r θ D (x) is regarded as a density ratio estimation network and G θ G (z) is regarded as a generator network for minimizing the f-divergence between p(x) and q(x).

Motivated by Section 3.2, we construct a b-GAN using the following two steps.

1. Update θ D to estimate the density ratio between p(x) and q(x; θ G ). To achieve this, we minimize Eq. 5 with respect to r θ (x). In this step, the density ratio model r θ (x) in Eq. 5 can be considered as r θ D (x) in this step.

2. Update θ G to minimize the f-divergence D f (p||q) between p(x) and q(x; θ G ) using the obtained density-ratio. We are able to suppose that q(x; θ G )r θ (x) is close to p(x). Instead of D f (p||q), we update θ G to minimize the empirical approximation of D f (qr θ ||q).

The b-GAN algorithm is summarized in Algorithm 1, where B is the batch size. In this study, a single-step gradient method (Goodfellow et al., 2014; Nowozin et al., 2016 ) is adopted.

Algorithm 1: b-GAN for number of training iterations do sample X = {x 1 , ..., x B } from p(x) and Ẑ = {z 1 , ..., z B } from an uniform distribution. D-step: Update θ D : θ t+1 D = θ t D -∇ θ D 1 B B i=1 f r θ D (G(z i )) r θ D (G(z i )) -f r θ D (G(z i )) -f r θ D (x i ) . G-step: Update θ G : θ t+1 G = θ t G -∇ θ G 1 B B i=1 f r(G θ G (z i )) .

end for

In the D-step, the proposed algorithm estimates p q toward any divergence; thus, it differs slightly from the D-step of f-GAN because the estimated values, i.e., f ( p q ), are dependent on the divergences. We also introduce an f-GAN-like update as follows. As mentioned in Section 2, we have two options in the G step.

1. D-step: minimize E x∼p(x) [-f (r θ D (x))] + E x∼q(x) [f (r θ D (x))r θ D (x) -f (r θ D (x))] w.r.t θ D . 2. G-step: minimize E x∼q(x;θ G ) [-f (r(x))] or E x∼q(x;θ G ) [-f (r(x))r(x) + f (r(x))] w.r.t θ G .

3.4. ANALYSIS:

Following Goodfellow et al. [2014] , we explain the validity of the G-step and D-step. We then explain the meaning of b-GAN. Finally, we analyze differences between b-GAN and f-GAN.

The density ratio is estimated in the D-step. The estimator of r( x) is an M-estimator and is asymptotically consistent under the proper normal conditions (Appendix E.1).

In the G-step, we update the generator as minimizing D f (p||q) by replacing p(x) with r θ (x)q(x).

We assume that q(x; θ G ) is equivalent to p(x) when θ G = θ * , q(x; θ G ) is identifiable, and the optimal r(x) is obtained in the D-step. By our assumption, the acquired value in the G-step is θ, which minimizes the empirical approximation of

D f (r(x)q(x; θ G ) q(x; θ G )) = E x∼q(x;θ G ) [r(x)].

When θ G is equal to θ * , this equation is equal to 0. The estimator θ can be considered as a kind of Z-estimator.

Usually, we cannot perform only a G-step because we do not know the form of p(x) and q(x). In b-GAN, D f (p||q) can be minimized by estimating the density ratio r(x) without estimating the densities directly.

In fact, the r(x) obtained at each iteration is different and not optimal because we adopt a single-step gradient method (Nowozin et al., 2016) . Thus, b-GAN dynamically updates the generator to minimize the f-divergence between p(x) and q(x). As mentioned previously, f (x) must satisfy f (1) = 0 in this case because we cannot guarantee that r θ (x)q(x) is normalized.

Similar to GANs, the D-step and G-step work adversarially. In the D-step, r θ (x) is updated to fit the ratio between p(x) and q(x). In the G-step, q(x) changes, which means r θ (x) becomes inaccurate in terms of the density ratio estimator. Next, r θ (x) is updated in the D-step so that it fits the density ratio of p(x) and the new q(x). This learning situation is derived from Eq. 6 , which shows that θ D is updated to increase D f (qr θ q) in the D-step. In contrast, θ G is updated to decrease D f (qr θ q) in the G-step.

In Section 3.3, we also introduced a f-GAN-like update. Three choices can be considered for the G-step:

(1)E x∼q(x:θ G ) [f (r(x))], (2)E x∼q(x;θ G ) [-f (r(x))], (3)E x∼q(x;θ G ) [-f (r(x))r(x) + f (r(x))].

Figure 1 : The graph of (1), ( 2), (3) when f is Pearson divergence Note that f is a convex function, f (1) = 0, and f (1) = 0. It is noted in (Nowozin et al., 2016 ) that case (2) works better than case (3) in practice. We also confirm this. The complete reason for this is unclear. However, we can find a partial reason by differentiating objective functions with respect to r. The derivatives of the objective functions are

(1)f (r), (2) -f (r), (3) -rf (r).

All signs are negative when r(x) is less than 1. Usually, when x is sampled from q(x), r(x) is less than 1. Therefore, we speculate that r(x) is less than 1 during most of the learning process when x is sampled from q(x). When r(x) is small, the derivative is also small in (3) because the term r(x) is multiplied. Therefore, the derivative tends to be small in (3). The mechanism pulling r(x) to 1 does not work when r(x) is small. Thus, the case of (3) does not work well. A similar argument was proposed by Goodfellow et al. (2014) and Nowozin et al. (2016) .

In our experimental case of ( 1) and (2) work properly (Section 5). The reason case (2) works is that function -f (r) behaves like an f-divergence and the derivative is large when r(x) is small. However, we cannot guarantee that -f (r) satisfies the conditions of f-divergence between positive measures, i.e, -f (r) is a convex function and -f (1) = 0. If the derivatives in case (2) are negative when r(x) is greater than 1, there is a possibility that the mechanism pulling r(x) to 1 does not occur. In contrast, in case (1), when r(x) is greater than 1, the derivatives are positive, therefore, the mechanism pulling r(x) to 1 occurs. This prevents generators from emitting the same points. We can expect the same effects as -minibatch discrimination- (Salimans et al., 2016) .

Throughout the analysis, we can easily extend the algorithm of b-GAN by using different divergences in the G-step and D-step. The original GAN can be regarded as one of such algorithms.

4. ALGORITHMS FOR SPECIFIC CASES:

We adopt α-divergence in the positive measure space as the f-divergence (Amari & Cichoki, 2010) .

Here, we explain specific algorithms when f is α-divergence. Then, we explain some heuristics used in b-GAN.

4.1. ALGORITHMS WITH α-DIVERGENCE:

In α-divergence, f (r) in Eq. 1 is

EQUATION

The objective function derived from α-divergence is summarized as follows.

Table 2 : The summary of objective function

alpha D-step G-step 1 (KL divergence) E x∼q(x) [rθ D (x) -1] -E x∼p(x) [log rθ D (x)] E x∼q(x;θG) [r(x) log r(x) -r(x) + 1] 3 (Pearson divergence) E x∼q(x) [0.5rθ D (x) 2 -0.5] -E x∼p(x) [rθ D (x) -1] E x∼q(x;θG) [0.5(r(x) -1) 2 ] -1 (Reversed KL divergence) E x∼q(x) [log rθ D (x)] -E x∼p(x) [-1 r θ D (x) ] E x∼q(x;θ G ) [-log(r(x)) + r(x) -1] • α = -1

In this case, α-divergence is a Kullback-Leibler (KL) divergence. Density ratio estimation via the KL divergence corresponds to the Kullback-Leibler Importance Estimation Procedure (Sugiyama et al., 2012) . In the G-step of an f-GAN-like update, the objective function is

E x∼q(x;θ G ) [-log r(x)] or E x∼q(x;θ G ) [1 -r(x)]. • α = 3

Density ratio estimation via the Pearson divergence corresponds to the Least-Squares Importance Fitting (Yamada et al., 2011) . It is more robust than under KL divergence (Yamada et al., 2011; Dawid et al., 2015) . This is because Pearson divergence does not include the log term. Hence the algorithm using Pearson divergence should be more stable. In the G-step of f-GAN-like update, the objective function is

E x∼q(x;θ G ) [1 -r(x)] or E x∼q(x;θ G ) [0.5 -0.5r(x) 2 ]. • α = -1

Estimating the density ratio using reversed KL divergence seems to be unstable because reversed KL-divergence is mode seeking and the generated distribution changes at each iteration. However, it is preferable to use reversed KL divergence when generating realistic images (Huszar, 2015) . In the G-step of an f-GAN-like update, the objective function is

E q(x;θ G ) [ 1 r(x) ] or E q(x;θ G ) [-log r(x)].

4.2. HEURISTICS:

We describe some heuristic methods that work for our experiments. The heuristics introduced here are justified theoretically in Appendix C.

In the initial learning process, empirical distribution p and generated distribution q are completely different. Therefore, the estimated density ratio r(x) = p(x) q(x) is enormous when x is taken from p and tiny when x is taken from q. It seems that the learning does not succeed in this case. In fact, in our setting, when the final activation function of r θ D (x) is taken from functions in the range (0, ∞), b-GAN does not properly work. Therefore, we use a scaled sigmoid function such as a two-times sigmoid function. A similar idea has also been used in (Cortes et al., 2010) .

As mentioned, density ratio p(x) q(x) is extremely sensitive. To avoid this problem, in the D-step of the KL-divergence, we also conducted experiments wherein we estimated p αp+(1-α)q (where α is small.) rather than p(x) q(x) . The same idea is introduced in the covariate shift situation (Sugiyama et al., 2013) . A similar idea has also been used for GAN learning (Salimans et al., 2016) and class probability estimation (Reid & Williamson, 2010) .

5. EXPERIMENTS:

We conducted experiments to establish that the proposed algorithm works properly and can successfully generate natural images. The proposed algorithm is based on density ratio estimation; therefore, knowledge regarding the density ratio estimation can be utilized. In the experiments, using the Pearson divergence and estimating the relative density ratio is shown to be useful for stable learning. We also empirically confirm our statement in Section 3.4, i.e., f-divergence is increased when learning θ D and decreased when learning θ G .

5.1. SETTINGS:

We applied the proposed algorithm to the CIFAR-10 data set (Krizhevsky, 2009) and Celeb A data set (Liu et al., 2015) because they are often used in GAN research (Salimans et al., 2016; Goodfellow et al., 2014) . The images size are 32 × 32 pixels. All results in this section are analyzed based on the results of the CIFAR-10 data set. The results for the Celeb A data set are presented in Appendix B. Our network architecture is nearly equivalent to that of previous study (Radford et al., 2015) (refer to the appendix A,B for details). Note that unless stated otherwise, the last layer function of r θ D (x) is a sigmoid function multiplied by two. We used the TensorFlow for automatic differentiation (Abadi et al., 2015) . For stochastic optimization, Adam was adopted (Kingma & Ba, 2014) . Figure 2 shows the density ratio estimate r θ D (x) and loss values of the generators. For each divergence, we conducted four experiments with 40,000 epochs, where the initial learning rate value was fixed (5 × 10 -5 ) with the exception of reversed KL divergence. These results show that the b-GANs using Pearson divergence are stable because the learning did not stop. The same results have been reported in the research into density ratio estimation (Yamada et al., 2011) . In contrast, b-GANs using the KL divergence are unstable. In fact, the learning stopped between the 20,000th and 37,000th epoch when the learning rate was not as small. When we use a heuristic method, i.e., estimating the relative density ratio as described in Section 4.2, this problem is solved. For reversed KL divergence, the learning stopped too soon if the initial learning rate value was 5 × 10 -5 . If the learning rate was 1 × 10 -6 , the learning did not stop; however, it was still unstable.

5.2. RESULTS:

In Figure 2 , the last layer activation function of the b-GANs is a twofold sigmoid function. In Figure 3 , we use a sigmoid function multiplied by five. The results indicate that the estimated density ratio values approach one. We also confirm that the proposed algorithm works with sigmoid functions at other scales.

Figure 4 shows the estimated f-divergence D f (qr θ ||q) before the G-step subtracted by D f (qr θ ||q) after the G-step. Most of the values are greater than zero, which suggests f-divergence decreases at every G-step iteration. This observation is consistent with our analysis in Section 3.4.

Note that learning is successful with an f-GAN-like update when minimizing E q [-f (r)]. However, the learning f-GAN-like update when minimizing E q [f (r) -rf (r)] did not work well for our network architecture and data set.

6. CONCLUSIONS AND FUTURE WORK:

We have proposed a novel unified algorithm to learn a deep generative model from a density ratio estimation perspective. Our algorithm provides the experimental insights that Pearson divergence and estimating relative density ratio are useful to improve the stability of GAN learning. Other insights regarding density ratio estimation would also be also useful. GANs are sensitive to data sets, the form of the network and hyper-parameters. Therefore, providing methods to improve GAN learning is meaningful.

Related research to our study that focuses on linking density ratio and a GAN, has been performed by explaining specific algorithms independently (Mohamed & Lakshminarayanan, 2016) . In contrast, our framework is more unified.

In future, the following things should be considered.

• What is the optimal divergence? In research regarding density ratio estimation, the Pearson divergence (α = 3) is considered robust (Nam & Sugiyama, 2015) . We empirically and theoretically confirmed the same property when learning deep generative models. It is also reported that using KL-divergence and reversed KL-divergence is not robust as scoring rules (Dawid et al., 2015) . For generating realistic images, the reversed KL divergence (α = -1) is preferred because it is mode seeking (Huszar, 2015) . However, if α is small, the density ratio estimation becomes inaccurate. For a robust density ratio, using power divergence has also been proposed (Sugiyama et al., 2012) . The determination of the optimal divergence is a persistent problem (Appendix E).

• What should be estimates in D-step? In the D-step of b-GAN, r(x) is estimated. However, in the original GAN, r(x)/(1 + r(x)) is estimated. As unnormalized models, the latter is more robust than estimating r(x) (Pihlaja et al., 2010) (Appendix E.7). • We can consider algorithms that use different divergences in the G-step and D-step. In that case, choice of the divergences are more diverse. Original GANs are described in such algorithms as mentioned in Section 3.5. • We can consider algorithms that use multiple divergences. This may improve the stability of learning. • When sampling from q(x), if the objective is sampling from real data p(x), r(x) should be multiplied. Hence, the density ratio is also useful when using samples from q(x). How to use samples obtained from generators meaningfully is an remaining important problem.

A CIFAR-10 DATASET Figure 5 shows samples generated randomly using b-GANs. These results indicate that b-GANs can create natural images successfully. We did not conduct a Parzen window density estimation for the evaluations because of Theis et al., [2016] . Here, we describe the network architecture of r θ D (x) and G θ G (z) used in the b-GAN. BN is the batch normalization layer (Sergey & Christian, 2015) .

A.1 r θ D (x)

x From Eq. 4, the following equation holds,

EQUATION

Using BD f (r||r θ ) ≥ 0 yields Eq. 7. We have BD f (r||r θ ) = 0 when r is equal to r θ . Thus, the equality holds if and only if r is equal to r θ .

C.2 PROOF OF PROP3.2

r.h.s of Eq.2 = E x∼p(x) [f (r θ (x))] -E x∼q(x) [f * (f (r θ (x)))] (10) = E x∼p(x) [f (r θ (x))] -E x∼q(x) [f (r θ (x))r θ (x) -f (r θ (x))] = E x∼p(x) [f (r θ (x))] -E x∼q(x) [(f (r θ (x))r θ (x) -f (r θ (x)))]

= the negative of Eq. 5

In the derivation, we have used the following equation

f * f (r θ (x)) = f (r θ (x))r θ (x) -f (r θ (x)) .

D EXPLANATION OF HEURISTICS USING RADEMACHER COMPLEXITY:

Here, we justify three points using Rademacher complexity. All techniques used are described in the literature (Mohri et al., 2012) .

• Pearson divergence is preferable to KL divergence in density ratio estimation.

• Relative density ratio is useful (introduced in Sec 4.2).

• The meaning of bounding the last output functions of discriminators (introduced in Sec 4.2).

Our objective is estimating r(x) = p(x) q(x) . We define hypothesis sets as H. In Section 3.4, we assume H as parametric models for simplicity. In this section, we do not restrict H to parametric models. We define r 0 and r s as

r 0 = argmin h∈H BR f (h) r s = argmin h∈H BR f (h),

where BR is an empirical approximation of BR. Note that BR f (h) reaches minimum values if and only if r = h holds. We want to analyze BR f (r s ) -BR f (r). The regret, i.e., BR f (r s ) -BR f (r) can be bounded as follows:

EQUATION

The first term of Eq. 11 is bounded by uniform law of large numbers. To do that, assume that all elements in H are bounded by constant C. First, we consider the case when f is the Pearson divergence. In that case, BR f (h) is

EQUATION

We denote the Rademacher complexity of H as R m,q when x is sampled from q(x) and the sample size is m. The first term of Eq. 12 is upper bounded by Talagrand's lemma. For any δ with probability as least 1 -δ, we have

EQUATION

where samples are taken from p(x) independently. the fact that 0.5h(x) 2 is C-Lipchitz over the interval (0, C) is used (C is a constant real number). The first term of Eq. 12 is upper-bounded by Talagrand's lemma. For any δ with probability at least 1 -δ, we have

EQUATION

where samples are taken from q(x) independently. By combining Eq. 13 and Eq. 14, for any δ with probability as least 1 -δ, the first term of Eq. 11 is bounded by

EQUATION

EQUATION

The second term of Eq. 16 cannot be bounded because log(x) is no longer Lipchitz continuous over (0, C). This explains why Pearson divergence is preferable to KL divergence in density ratio estimation. However, if h(x) is lower-bounded by the constant real number C, the problem is solved.

Using the relative density ratio has the same effect.

In our setting, r(x) is a sigmoid function multiplied by C. If C is large, the approximation error, i.e., BR f (r 0 ) -BR f (r) is small. However, there is a possibility that the estimation error increases according to Eq. 15, which may lead to the learning instability.

By differentiating Eq. 17 with respect to θ, the above method can be regarded as a type of moment matching as follows:

EQUATION

The estimator θn is attained when Eq.18 is equal to 0. By substituting f (r θ (x i )r θ (x i ) with s(x i ), Eq. 18 is reduced to be

EQUATION

The above Eq. 18 is a form of moment matching.1 What is the optimal s(x)? Here, we focus on the variance of the estimator (efficiency). It is known that the Eq. 17 derived from the logistic model is known to be optimal (Qin, 1998) . It is a natural consequence because the logistic model can be considered as a maximum likelihood and maximum likelihood reaches the Cramer-Rao bound asymptotically. Typically, general moment matching (GMM) achieves the lower bound when the estimating equation is the score of observations, i.e., when GMM is identical to maximum likelihood.

Efficiency is not the absolute criterion for choosing losses. For example, when there are many outliers in the data, robustness is more important than efficiency. In reality, an M estimator was introduced in the contest of robust statistics (Huber & Ronchetti, 2009 ).

E.3 CLASS PROBABILITY ESTIMATION:

We have explained density ratio estimation, starting with the Bregman divergence. Importantly, density-ratio estimation is equivalent to class probability estimation. For details, see (Reid & Williamson, 2011; 2010; Dawid & Musio, 2014; Menon & Ong, 2016) .

As in Section E.1, we introduce the variable Y . The joint distribution of X and Y is denoted as D = (p, q, π). Class probability estimation can be regraded as a minimization problem of the empirical estimation of the full risk E (X,Y )∼D [l(Y, h 1 )], which is denoted L(h 1 ; D, l) (h 1 is a hypothesis element). When the hypothesis h 1 , which minimizes E (X,Y )∼D [l(Y, h 1 )], is the Bayes optimal estimator η(x) uniquely, such a loss is called a proper loss.

A proper loss is naturally extended to a composite proper loss by introducing a link function Φ. In this case, the objective is estimating Φ(η(x)) correctly. The estimator is obtained by the empirical minimization of full risk E (X,Y )∼D [l Φ (Y, h g )] when l Φ (Y, h g ) means l(Y, Φ -1 (h g (x))) and Φ(h 1 (x)) is the same as h g (x). When the hypothesis h g (x), which minimizes E (X,Y )∼D [l Φ (Y, h g )], is the Bayes optimal estimator Φ(η(x)) uniquely, such a loss is called a proper composite loss with a link function Φ.

The conditional risk (conditioned on x) E Y ∼η [l Φ (Y, h g )] can be decomposed to

EQUATION

)

The conditional Bayes risk is

EQUATION

where λ +1 (x) = L 1 (Φ(x)) and λ -1 (x) = L -1 (Φ(x)). We set Eq. 21, i.e., xλ +1 (x)+(1-x)λ -1 (x) as c(x). The regret of the composite proper loss can be written using Bregman divergence L(h g ; D, l) -L(Φ • η; D, l) = E X B c η(X) Φ -1 (h g (X)) .

:

In usual moment matching, s(x) is not be dependent on the form of probability density function. However, it depends on the form of r θ in this case.

Figures and Tables:

Figure 2: Comparative results: estimated density ratio values r θ D (x) from the training data (red), the estimated density-ratio values r θ D (x) from the generated distribution (green), generator losses taken in the D-step and G-step (blue). The top, second, and bottom rows show r θ D (x) and the losses of b-GAN with the Pearson divergence, KL divergence, modified KL divergence (relative density ratio estimation version, α = 0.2), and reversed KL divergence, respectively.

Figure 3: Density ratio value r θ D (x) and generator losses of b-GAN when the last output function is a sigmoid function multiplied by 5.

Figure 4: Divergence differences between D-step and G-step: b-GAN with Pearson divergence (left), b-GAN with KL divergence (right) .

Figure 5: (Left) original images set, (middle) a set of images generated based on Pearson divergence, and (right) a set of images based on the KL divergence.

Figure 6: Pearson divergence Figure 7: KL divergence

Relation among GAN, f-GAN and b-GAN.

Table content: <table><tr><td>Name</td><td>D-step (updating θD)</td><td>G-step (updating θG)</td></tr><tr><td>GAN f-GAN</td><td>Estimate p p+q Estimate f ( p q )</td><td>Adversarial update</td></tr></table>

→ Conv(3, 64) → lRelu → Conv(64, 256) → BN → lRelu → Conv(256, 512) → BN → lRelu →

Table content: <table><tr><td>Reshape(4 × 4 × 512) → Linear(4 × 4 × 512, 1) → 2 × Sigmoid</td></tr><tr><td>A.2 G θ G (z)</td></tr><tr><td>z → Linear(100,4 × 4 × 512) → BN → Relu → Reshape(4, 4, 512) → Conv(512, 256) → BN →</td></tr><tr><td>Relu → Conv(256, 64) → BN → Relu → Conv(64, 3) → tanh</td></tr><tr><td>B CELEB A DATASET</td></tr><tr><td>We also applied our algorithm to the Celeb A data set. The images are resized and cropped to 64 × 64</td></tr><tr><td>pixcels. Figures 6 and 7 show samples randomly generated using b-GANs. The Network architecture</td></tr><tr><td>is as follows.</td></tr><tr><td>B.1 r θ D (x)</td></tr><tr><td>x → Conv(3, 64) → lRelu → Conv(64, 128) → BN → lRelu → Conv(128, 256) → BN → lRelu →</td></tr><tr><td>Conv(256, 512) → BN → lRelu → Reshape(4 × 4 × 512) → Linear(4 × 4 × 512, 1) → 2×Sigmoid</td></tr><tr><td>B.2 G θ G (z)</td></tr></table>

Peer review (iclr2017):
This submission introduces a formulation of Generative Adversarial Networks (GANs) under the lens of density ratio estimation, when using Bregman divergences. Even thought GANs already perform density estimation, the motivation of using Bregman divergences is to obtain an objective function with stronger gradients. I have three concerns with this submission. First, the exposition of the paper must be significantly improved. The current version of the manuscript is at some points unreadable, and does a poor job at motivating, describing, and justifying the contributions. Second, the authors scatter a variety of alternatives and heuristics throughout the description of the proposed b-GAN. This introduces a great amount of complexity when it comes to understanding, implementing, and using b-GAN. Further work is necessary to rule out (in a principled manner!) many of the proposed variants of the algorithm. Third, it is next to impossible to interpret the experimental results, in particular Figures 2, 3, 4. The authors claim that these figures show that *learning does not stop*, but such behavior can also be attributed to the typical chaotic dynamics of GANs. Even after reading Appendix A, I am left unconvinced on whether the proposed approach provides with any practical advantage (even no comparison is offered to other GAN approaches with similar architectures). Overall, I believe this submission calls for significant improvements before being considered for publication.