GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium
GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium
LIT AI Lab & Institute of Bioinformatics, Johannes Kepler University Linz, A-4040 Linz, Austria
{mhe,ramsauer,unterthiner,nessler,hochreit}@bioinf.jku.at
Abstract
摘要
Generative Adversarial Networks (GANs) excel at creating realistic images with complex models for which maximum likelihood is infeasible. However, the convergence of GAN training has still not been proved. We propose a two time-scale update rule (TTUR) for training GANs with stochastic gradient descent on arbitrary GAN loss functions. TTUR has an individual learning rate for both the discriminator and the generator. Using the theory of stochastic approximation, we prove that the TTUR converges under mild assumptions to a stationary local Nash equilibrium. The convergence carries over to the popular Adam optimization, for which we prove that it follows the dynamics of a heavy ball with friction and thus prefers flat minima in the objective landscape. For the evaluation of the performance of GANs at image generation, we introduce the “Fréchet Inception Distance” (FID) which captures the similarity of generated images to real ones better than the Inception Score. In experiments, TTUR improves learning for DCGANs and Improved Wasserstein GANs (WGAN-GP) outperforming conventional GAN training on CelebA, CIFAR-10, SVHN, LSUN Bedrooms, and the One Billion Word Benchmark.
生成对抗网络(GAN)擅长用最大似然不可行的复杂模型生成逼真图像。但 GAN 训练的收敛性此前尚未得到证明。我们提出双时间尺度更新规则(TTUR),用随机梯度下降在任意 GAN 损失函数上训练。TTUR 为判别器和生成器各自设置学习率。借助随机逼近理论,我们证明在较温和的假设下,TTUR 会收敛到稳定的局部纳什均衡。这一收敛结论可以延伸到常用的 Adam 优化:我们证明 Adam 遵循带摩擦的重球动力学,因而更偏好目标曲面中平坦的最小点。为了评测 GAN 在图像生成上的表现,我们引入弗雷歇 Inception 距离(Fréchet Inception Distance,FID),它比 Inception Score 更好地刻画生成图像与真实图像的相似度。实验中,TTUR 改善了 DCGAN 和带梯度惩罚的改进 Wasserstein GAN(WGAN-GP)的学习,在 CelebA、CIFAR-10、SVHN、LSUN Bedrooms 和 One Billion Word Benchmark 上超过常规 GAN 训练。
31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA.
1 Introduction
1 引言
Generative adversarial networks (GANs) [16] have achieved outstanding results in generating realistic images [42, 31, 25, 1, 4] and producing text [21]. GANs can learn complex generative models for which maximum likelihood or a variational approximations are infeasible. Instead of the likelihood, a discriminator network serves as objective for the generative model, that is, the generator. GAN learning is a game between the generator, which constructs synthetic data from random variables, and the discriminator, which separates synthetic data from real world data. The generator’s goal is to construct data in such a way that the discriminator cannot tell them apart from real world data. Thus, the discriminator tries to minimize the synthetic-real discrimination error while the generator tries to maximize this error. Since training GANs is a game and its solution is a Nash equilibrium, gradient descent may fail to converge [44, 16, 18]. Only local Nash equilibria are found, because gradient descent is a local optimization method. If there exists a local neighborhood around a point in parameter space where neither the generator nor the discriminator can unilaterally decrease their respective losses, then we call this point a local Nash equilibrium.
生成对抗网络(GAN)[16] 在生成逼真图像 [42, 31, 25, 1, 4] 和生成文本 [21] 上取得了突出结果。GAN 可以学习最大似然或变分近似都不可行的复杂生成模型。这时不再使用似然,而是用一个判别器网络作为生成模型(也就是生成器)的目标。GAN 的学习是一场博弈:生成器由随机变量构造合成数据,判别器把合成数据与真实世界数据分开。生成器的目标是构造出判别器无法与真实数据区分的数据。因此,判别器试图最小化真假判别误差,生成器则试图最大化这一误差。由于训练 GAN 是一场博弈,其解是纳什均衡,梯度下降可能无法收敛 [44, 16, 18]。又因为梯度下降是局部优化方法,只能找到局部纳什均衡。若参数空间中某一点的一个局部邻域里,生成器和判别器都无法单方面降低各自的损失,我们就称该点为局部纳什均衡。
To characterize the convergence properties of training general GANs is still an open challenge [17, 18]. For special GAN variants, convergence can be proved under certain assumptions [34, 20, 46]. A prerequisite for many convergence proofs is local stability [30] which was shown for GANs by Nagarajan and Kolter [39] for a min-max GAN setting. However, Nagarajan and Kolter require for their proof either rather strong and unrealistic assumptions or a restriction to a linear discriminator. Recent convergence proofs for GANs hold for expectations over training samples or for the number of examples going to infinity [32, 38, 35, 2], thus do not consider mini-batch learning which leads to a stochastic gradient [47, 23, 36, 33].
刻画一般 GAN 训练的收敛性质,仍然是一个未决的挑战 [17, 18]。对特殊的 GAN 变体,可以在一定假设下证明收敛 [34, 20, 46]。许多收敛证明的前提是局部稳定性 [30],Nagarajan 和 Kolter [39] 在最小–最大 GAN 设定下给出了这一性质。但他们的证明要么需要相当强且不现实的假设,要么要把判别器限制为线性的。近期关于 GAN 的收敛证明,针对的是训练样本上的期望,或样本数趋于无穷的情形 [32, 38, 35, 2],因而没有考虑会带来随机梯度的小批量学习 [47, 23, 36, 33]。
Recently actor-critic learning has been analyzed using stochastic approximation. Prasad et al. [41] showed that a two time-scale update rule ensures that training reaches a stationary local Nash equilibrium if the critic learns faster than the actor. Convergence was proved via an ordinary differential equation (ODE), whose stable limit points coincide with stationary local Nash equilibria. We follow the same approach. We adopt this approach for GANs and prove that also GANs converge to a local Nash equilibrium when trained by a two time-scale update rule (TTUR), i.e., when discriminator and generator have separate learning rates. This also leads to better results in experiments. The main premise is that the discriminator converges to a local minimum when the generator is fixed. If the generator changes slowly enough, then the discriminator still converges, since the generator perturbations are small. Besides ensuring convergence, the performance may also improve since the discriminator must first learn new patterns before they are transferred to the generator. In contrast, a generator which is overly fast, drives the discriminator steadily into new regions without capturing its gathered information. In recent GAN implementations, the discriminator often learned faster than the generator. A new objective slowed down the generator to prevent it from overtraining on the current discriminator [44]. The Wasserstein GAN algorithm uses more update steps for the discriminator than for the generator [1]. We compare TTUR and standard GAN training.
最近,演员–评论家学习已用随机逼近来分析。Prasad 等人 [41] 表明,若评论家比演员学得快,双时间尺度更新规则可以保证训练到达稳定的局部纳什均衡。收敛是通过常微分方程(ODE)证明的,其稳定极限点与稳定局部纳什均衡重合。我们采用同一思路。我们把这一做法用到 GAN 上,并证明当用双时间尺度更新规则(TTUR)训练,也就是判别器和生成器使用分开的学习率时,GAN 同样会收敛到局部纳什均衡。这在实验中也会带来更好的结果。核心前提是:生成器固定时,判别器会收敛到局部最小。若生成器变得足够慢,判别器仍然收敛,因为生成器带来的扰动很小。除了保证收敛,性能也可能提高,因为新模式必须先被判别器学会,再传给生成器。相反,生成器若过快,会把判别器不断推到新区域,却捕捉不到它已经学到的信息。在近期的 GAN 实现里,判别器往往比生成器学得快。一种新的目标函数会拖慢生成器,以免它在当前判别器上过训练 [44]。Wasserstein GAN 算法则让判别器的更新步数多于生成器 [1]。我们比较 TTUR 与标准 GAN 训练。
Figure 1: Left: Original vs. TTUR GAN training on CelebA. Right: Figure from Zhang 2007 [50] which shows the distance of the parameter from the optimum for a one time-scale update of a 4 node network flow problem. When the upper bounds on the errors are small, the iterates oscillate and repeatedly return to a neighborhood of the optimal solution (cf. Supplement Section 2.3). However, when the upper bounds on the errors are large, the iterates typically diverge.
图 1:左:在 CelebA 上,原来的 GAN 训练与 TTUR 训练。右:取自 Zhang 2007 [50] 的图,给出 4 节点网络流问题上单时间尺度更新时参数到最优点的距离。当误差上界 较小时,迭代会振荡并反复回到最优解的一个邻域(参见补充材料第 2.3 节)。而当误差上界较大时,迭代通常会发散。
Fig. 1 shows at the left panel a stochastic gradient example on CelebA for original GAN training (orig), which often leads to oscillations, and the TTUR. On the right panel an example of a 4 node network flow problem of Zhang et al. [50] is shown. The distance between the actual parameter and its optimum for an one time-scale update rule is shown across iterates. When the upper bounds on the errors are small, the iterates return to a neighborhood of the optimal solution, while for large errors the iterates may diverge (see also Supplement Section 2.3). Our novel contributions in this paper are: (i) the two time-scale update rule for GANs, (ii) the proof that GANs trained with TTUR converge to a stationary local Nash equilibrium, (iii) the description of Adam as heavy ball with friction and the resulting second order differential equation, (iv) the convergence of GANs trained with TTUR and Adam to a stationary local Nash equilibrium, (v) the “Fréchet Inception Distance” (FID) to evaluate GANs, which is more consistent than the Inception Score.
图 1 左图给出 CelebA 上随机梯度的例子:原来的 GAN 训练(orig)常常出现振荡,以及 TTUR。右图是 Zhang 等人 [50] 的 4 节点网络流问题例子,画出单时间尺度更新规则下当前参数到最优点的距离随迭代的变化。当误差上界较小时,迭代会回到最优解的一个邻域;误差较大时,迭代可能发散(亦见补充材料第 2.3 节)。本文的新贡献是:(i) 用于 GAN 的双时间尺度更新规则;(ii) 证明用 TTUR 训练的 GAN 收敛到稳定的局部纳什均衡;(iii) 把 Adam 描述为带摩擦的重球及由此得到的二阶微分方程;(iv) 用 TTUR 和 Adam 训练的 GAN 收敛到稳定的局部纳什均衡;(v) 用于评测 GAN 的“弗雷歇 Inception 距离”(FID),它比 Inception Score 更一致。
Two Time-Scale Update Rule for GANs
用于 GAN 的双时间尺度更新规则
We consider a discriminator with parameter vector and a generator with parameter vector . Learning is based on a stochastic gradient of the discriminator’s loss function and a stochastic gradient of the generator’s loss function . The loss functions and can be the original as introduced in Goodfellow et al. [16], its improved versions [18], or recently proposed losses for GANs like the Wasserstein GAN [1]. Our setting is not restricted to min-max GANs, but is also valid for all other, more general GANs for which the discriminator’s loss function is not necessarily related to the generator’s loss function . The gradients and are stochastic, since they use mini-batches of real world samples , and synthetic samples , which are randomly chosen. If the true gradients are and , then we can define and with random variables and . Thus, the gradients and are stochastic approximations to the true gradients. Consequently, we analyze convergence of GANs by two time-scale stochastic approximations algorithms. For a two time-scale update rule (TTUR), we use the learning rates and for the discriminator and the generator update, respectively:
我们考虑带参数向量 的判别器 ,以及带参数向量 的生成器 。学习基于判别器损失函数 的随机梯度 ,以及生成器损失函数 的随机梯度 。 和 可以是 Goodfellow 等人 [16] 最初提出的损失、其改进版本 [18],或近期为 GAN 提出的损失,如 Wasserstein GAN [1]。我们的设定不限于最小–最大 GAN,也适用于更一般的、判别器损失 不必与生成器损失 相关的 GAN。梯度 和 是随机的,因为它们使用随机选取的 个真实样本 ,,以及 个合成样本 ,。若真实梯度为 和 ,则可定义 和 ,其中 和 是随机变量。因此,这些梯度是对真实梯度的随机逼近。于是我们用双时间尺度随机逼近算法来分析 GAN 的收敛。对双时间尺度更新规则(TTUR),我们分别用学习率 和 更新判别器和生成器:
For more details on the following convergence proof and its assumptions see Supplement Section 2.1. To prove convergence of GANs learned by TTUR, we make the following assumptions (The actual assumption is ended by ◀, the following text are just comments and explanations):
关于下面收敛证明及其假设的更多细节,见补充材料第 2.1 节。为证明用 TTUR 学习的 GAN 收敛,我们做如下假设(真正的假设在 ◀ 处结束,其后文字只是注释和说明):
(A1) The gradients and are Lipschitz. ◀Consequently, networks with Lipschitz smooth activation functions like ELUs () [11] fulfill the assumption but not ReLU networks.
(A1) 梯度 和 是 Lipschitz 的。◀因此,具有 Lipschitz 光滑激活函数的网络,如 ELU()[11],满足该假设,而 ReLU 网络不满足。
(A2) , , , , .◀
(A2) ,,,,。◀
(A3) The stochastic gradient errors and are martingale difference sequences w.r.t. the increasing -field , with and , where and are positive deterministic constants.◀The original Assumption (A3) from Borkar 1997 follows from Lemma 2 in [5] (see also [43]). The assumption is fulfilled in the Robbins-Monro setting, where mini-batches are randomly sampled and the gradients are bounded.
(A3) 随机梯度误差 和 是关于递增 -域 , 的鞅差序列,并且 ,,其中 和 是正的确定性常数。◀Borkar 1997 原来的假设 (A3) 可由 [5] 中的引理 2 推出(亦见 [43])。在 Robbins-Monro 设定下,小批量被随机采样且梯度有界,该假设成立。
(A4) For each , the ODE has a local asymptotically stable attractor within a domain of attraction such that is Lipschitz. The ODE has a local asymptotically stable attractor within a domain of attraction.◀The discriminator must converge to a minimum for fixed generator parameters and the generator, in turn, must converge to a minimum for this fixed discriminator minimum. Borkar 1997 required unique global asymptotically stable equilibria [7]. The assumption of global attractors was relaxed to local attractors via Assumption (A6) and Theorem 2.7 in Karmakar & Bhatnagar [26]. See for more details Assumption (A6) in Supplement Section 2.1.3. Here, the GAN objectives may serve as Lyapunov functions. These assumptions of locally stable ODEs can be ensured by an additional weight decay term in the loss function which increases the eigenvalues of the Hessian. Therefore, problems with a region-wise constant discriminator that has zero second order derivatives are avoided. For further discussion see Supplement Section 2.1.1 (C3).
(A4) 对每个 ,ODE 在吸引域 内有一个局部渐近稳定吸引子 ,且 是 Lipschitz 的。ODE 在某个吸引域内有一个局部渐近稳定吸引子 。◀判别器必须在生成器参数固定时收敛到一个最小点,生成器则必须在这一固定的判别器最小点上收敛到一个最小点。Borkar 1997 要求唯一的全局渐近稳定平衡 [7]。全局吸引子的假设,经由 Karmakar 与 Bhatnagar [26] 的假设 (A6) 和定理 2.7,被放宽为局部吸引子。更多细节见补充材料第 2.1.3 节中的假设 (A6)。这里,GAN 的目标函数可以作为 Lyapunov 函数。这些局部稳定 ODE 的假设,可以通过在损失函数中加入权重衰减项、增大 Hessian 的特征值来保证。这样就可以避免判别器在某些区域为常数、二阶导数为零的问题。进一步讨论见补充材料第 2.1.1 节 (C3)。
(A5) and .◀Typically ensured by the objective or a weight decay term.
(A5) 且 。◀通常由目标函数或权重衰减项来保证。
Theorem 1 (Borkar). If the assumptions are satisfied, then the updates Eq. (1) converge to a.s.
定理 1(Borkar)。若上述假设成立,则式 (1) 的更新几乎必然收敛到 。
The solution is a stationary local Nash equilibrium [41], since as well as are local asymptotically stable attractors with and . An alternative approach to the proof of convergence using the Poisson equation for ensuring a solution to the fast update rule can be found in the Supplement Section 2.1.2. This approach assumes a linear update function in the fast update rule which, however, can be a linear approximation to a nonlinear gradient [28, 29]. For the rate of convergence see Supplement Section 2.2, where Section 2.2.1 focuses on linear and Section 2.2.2 on non-linear updates. For equal time-scales it can only be proven that the updates revisit an environment of the solution infinitely often, which, however, can be very large [50, 12]. For more details on the analysis of equal time-scales see Supplement Section 2.3. The main idea of the proof of Borkar [7] is to use perturbed ODEs according to Hirsch 1989 [22] (see also Appendix Section C of Bhatnagar, Prasad, & Prashanth 2013 [6]). The proof relies on the fact that there eventually is a time point when the perturbation of the slow update rule is small enough (given by ) to allow the fast update rule to converge. For experiments with TTUR, we aim at finding learning rates such that the slow update is small enough to allow the fast to converge. Typically, the slow update is the generator and the fast update the discriminator. We have to adjust the two learning rates such that the generator does not affect discriminator learning in a undesired way and perturb it too much. However, even a larger learning rate for the generator than for the discriminator may ensure that the discriminator has low perturbations. Learning rates cannot be translated directly into perturbation since the perturbation of the discriminator by the generator is different from the perturbation of the generator by the discriminator.
解 是稳定的局部纳什均衡 [41],因为 和 都是局部渐近稳定吸引子,且 、。一种利用 Poisson 方程保证快更新规则有解的替代证明路径,见补充材料第 2.1.2 节。该路径假设快更新规则中的更新函数是线性的,不过它可以是对非线性梯度的线性近似 [28, 29]。关于收敛速度,见补充材料第 2.2 节,其中第 2.2.1 节讨论线性更新,第 2.2.2 节讨论非线性更新。对相同时间尺度,只能证明更新会无穷多次回到解的某个环境,而这个环境可以非常大 [50, 12]。关于相同时间尺度分析的更多细节,见补充材料第 2.3 节。Borkar [7] 证明的主要想法,是使用 Hirsch 1989 [22] 意义下的 扰动 ODE(亦见 Bhatnagar、Prasad 与 Prashanth 2013 [6] 的附录 C 节)。证明依赖于:最终会有一个时刻,慢更新规则的扰动小到(由 给出)足以让快更新规则收敛。在 TTUR 的实验中,我们的目标是找到使慢更新足够小、从而让快更新能够收敛的学习率。通常慢更新是生成器,快更新是判别器。我们必须调节两个学习率,使生成器不以不希望的方式影响判别器的学习,也不过分扰动它。不过,即使生成器的学习率大于判别器,也可能保证判别器的扰动较小。学习率不能直接翻译成扰动,因为生成器对判别器的扰动,不同于判别器对生成器的扰动。
2 Adam Follows an HBF ODE and Ensures TTUR Convergence
2 Adam 遵循 HBF 常微分方程并保证 TTUR 收敛
In our experiments, we aim at using Adam stochastic approximation to avoid mode collapsing. GANs suffer from “mode collapsing” where large masses of probability are mapped onto a few modes that cover only small regions. While these regions represent meaningful samples, the variety of the real world data is lost and only few prototype samples are generated. Different methods have been proposed to avoid mode collapsing [9, 37]. We obviate mode collapsing by using Adam stochastic approximation [27]. Adam can be described as Heavy Ball with Friction (HBF) (see below), since it averages over past gradients. This averaging corresponds to a velocity that makes the generator resistant to getting pushed into small regions. Adam as an HBF method typically overshoots small local minima that correspond to mode collapse and can find flat minima which generalize well [24]. Fig. 2 depicts the dynamics of HBF, where the ball settles at a flat minimum. Next, we analyze whether GANs trained with TTUR converge when using Adam. For more details see Supplement Section 3.
在实验中,我们打算用 Adam 随机逼近来避免模式崩塌。GAN 会遭遇“模式崩塌”:大量概率被映射到只覆盖很小区域的少数几个模式上。这些区域虽然代表有意义的样本,但真实数据的多样性丢失了,只生成少数几个原型样本。已有不同方法被提出来避免模式崩塌 [9, 37]。我们通过使用 Adam 随机逼近 [27] 来规避它。Adam 可以描述为带摩擦的重球(Heavy Ball with Friction,HBF)(见下),因为它对过去的梯度做平均。这种平均对应于一种速度,使生成器不易被推进很小的区域。作为 HBF 方法,Adam 通常会冲过对应于模式崩塌的狭小局部最小点,并找到泛化更好的平坦最小点 [24]。图 2 画出了 HBF 的动力学:球最终停在平坦的最小处。接下来我们分析,用 TTUR 训练的 GAN 在使用 Adam 时是否收敛。更多细节见补充材料第 3 节。
图 2:带摩擦的重球:有质量的球冲过局部最小点 ,并停在平坦的最小点 。
We recapitulate the Adam update rule at step , with learning rate , exponential averaging factors for the first and for the second moment of the gradient :
我们回顾第 步的 Adam 更新规则,学习率为 ,梯度 一阶和二阶矩的指数平均因子分别为 和 :
where following operations are meant componentwise: the product , the square root , and the division in the last line. Instead of learning rate , we introduce the damping coefficient with for . Adam has parameters for averaging the gradient and parametrized by a positive for averaging the squared gradient. These parameters can be considered as defining a memory for Adam. To characterize and in the following, we define the exponential memory and the polynomial memory for some positive constant . The next theorem describes Adam by a differential equation, which in turn allows to apply the idea of perturbed ODEs to TTUR. Consequently, learning GANs with TTUR and Adam converges.
其中下列运算都是按分量进行的:乘积 、平方根 ,以及最后一行的除法 。我们不用固定学习率 ,而引入阻尼系数 ,其中 ,。Adam 用参数 对梯度做平均,并用由正数 参数化的 对平方梯度做平均。这些参数可以看成给 Adam 定义了一种记忆。为了在下文刻画 和 ,我们定义指数记忆 ,以及多项式记忆 ,其中 是某个正常数。下一个定理用微分方程描述 Adam,从而可以把 扰动 ODE 的想法用到 TTUR 上。因此,用 TTUR 和 Adam 学习 GAN 是收敛的。
Theorem 2. If Adam is used with , and with as the full gradient of the lower bounded, continuously differentiable objective , then for stationary second moments of the gradient, Adam follows the differential equation for Heavy Ball with Friction (HBF):
Adam converges for gradients that are -Lipschitz.
定理 2. 若 Adam 使用 、,且 是下方有界、连续可微目标 的全梯度,则在梯度二阶矩平稳时,Adam 遵循带摩擦的重球(HBF)微分方程:
当梯度 是 -Lipschitz 时,Adam 收敛。
Proof. Gadat et al. derived a discrete and stochastic version of Polyak’s Heavy Ball method [40], the Heavy Ball with Friction (HBF) [15]:
证明. Gadat 等人给出了 Polyak 重球方法 [40] 的一种离散且随机的版本,即带摩擦的重球(HBF)[15]:
These update rules are the first moment update rules of Adam [27]. The HBF can be formulated as the differential equation Eq. (3) [15]. Gadat et al. showed that the update rules Eq. (4) converge for loss functions with at most quadratic grow and stated that convergence can be proofed for that are -Lipschitz [15]. Convergence has been proved for continuously differentiable that is quasiconvex (Theorem 3 in Goudou & Munier [19]). Convergence has been proved for that is -Lipschitz and bounded from below (Theorem 3.1 in Attouch et al. [3]). Adam normalizes the average by the second moments of the gradient : . is componentwise divided by the square root of the components of . We assume that the second moments of are stationary, i.e., . In this case the normalization can be considered as additional noise since the normalization factor randomly deviates from its mean. In the HBF interpretation the normalization by corresponds to introducing gravitation. We obtain
这些更新规则就是 Adam 的一阶矩更新规则 [27]。HBF 可以写成微分方程 (3) [15]。Gadat 等人表明,对至多二次增长的损失函数 ,式 (4) 的更新规则收敛,并指出对 -Lipschitz 的 可以证明收敛 [15]。对连续可微且拟凸的 ,收敛已被证明(Goudou 与 Munier [19] 的定理 3)。对 -Lipschitz 且下方有界的 ,收敛也已被证明(Attouch 等人 [3] 的定理 3.1)。Adam 用梯度 的二阶矩 来归一化平均值 :。 按分量除以 各分量的平方根。我们假设 的二阶矩是平稳的,即 。这时,归一化可以看成附加噪声,因为归一化因子会随机偏离其均值。在 HBF 的解释里,用 做归一化对应于引入重力。我们得到
For a stationary second moment and , we have . We use a componentwise linear approximation to Adam’s second moment normalization , where all operations are meant componentwise. If we set , then and , since . For a stationary second moment , the random variable is a martingale difference sequence with a bounded second moment. Therefore can be subsumed into in update rules Eq. (4). The factor can be componentwise incorporated into the gradient which corresponds to rescaling the parameters without changing the minimum.
对平稳的二阶矩 以及 ,有 。我们对 Adam 的二阶矩归一化使用按分量的线性近似 ,其中所有运算都按分量进行。若令 ,则 ,并且 ,因为 。对平稳的二阶矩 ,随机变量 是带有界二阶矩的鞅差序列。因此可以把 归入式 (4) 更新规则中的 。因子 可以按分量并入梯度 ,这相当于对参数重新缩放而不改变最小点。
According to Attouch et al. [3] the energy, that is, a Lyapunov function, is and . Since Adam can be expressed as differential equation and has a Lyapunov function, the idea of perturbed ODEs [7, 22, 8] carries over to Adam. Therefore the convergence of Adam with TTUR can be proved via two time-scale stochastic approximation analysis like in Borkar [7] for stationary second moments of the gradient.
按照 Attouch 等人 [3],能量也就是 Lyapunov 函数为 ,且 。既然 Adam 可以写成微分方程并且有 Lyapunov 函数, 扰动 ODE 的想法 [7, 22, 8] 就可以转到 Adam 上。因此,在梯度二阶矩平稳时,Adam 与 TTUR 的收敛可以通过像 Borkar [7] 那样的双时间尺度随机逼近分析来证明。
In the supplement we further discuss the convergence of two time-scale stochastic approximation algorithms with additive noise, linear update functions depending on Markov chains, nonlinear update functions, and updates depending on controlled Markov processes. Futhermore, the supplement presents work on the rate of convergence for both linear and nonlinear update rules using similar techniques as the local stability analysis of Nagarajan and Kolter [39]. Finally, we elaborate more on equal time-scale updates, which are investigated for saddle point problems and actor-critic learning.
在补充材料中,我们进一步讨论带加性噪声的双时间尺度随机逼近算法、依赖于马尔可夫链的线性更新函数、非线性更新函数,以及依赖于受控马尔可夫过程的更新的收敛性。此外,补充材料还给出线性和非线性更新规则的收敛速度,所用技术类似于 Nagarajan 与 Kolter [39] 的局部稳定性分析。最后,我们更详细地讨论相同时间尺度的更新,这类更新已在鞍点问题和演员–评论家学习中得到研究。
3 Experiments
3 实验
Performance Measure. Before presenting the experiments, we introduce a quality measure for models learned by GANs. The objective of generative learning is that the model produces data which matches the observed data. Therefore, each distance between the probability of observing real world data and the probability of generating model data can serve as performance measure for generative models. However, defining appropriate performance measures for generative models is difficult [45]. The best known measure is the likelihood, which can be estimated by annealed importance sampling [49]. However, the likelihood heavily depends on the noise assumptions for the real data and can be dominated by single samples [45]. Other approaches like density estimates have drawbacks, too [45]. A well-performing approach to measure the performance of GANs is the “Inception Score” which correlates with human judgment [44]. Generated samples are fed into an inception model that was trained on ImageNet. Images with meaningful objects are supposed to have low label (output) entropy, that is, they belong to few object classes. On the other hand, the entropy across images should be high, that is, the variance over the images should be large. Drawback of the Inception Score is that the statistics of real world samples are not used and compared to the statistics of synthetic samples.
性能度量。在给出实验之前,我们先引入一种用于衡量 GAN 所学模型的质量指标。生成学习的目标是让模型产生与观测数据相匹配的数据。因此,观测到真实世界数据的概率 与生成模型数据的概率 之间的任何距离,都可以作为生成模型的性能度量。不过,为生成模型定义恰当的性能度量是困难的 [45]。最著名的度量是似然,可以用退火重要性采样来估计 [49]。但似然严重依赖于对真实数据的噪声假设,并且可能被单个样本主导 [45]。密度估计等方法也有缺点 [45]。一种表现较好、用于衡量 GAN 性能的方法是“Inception Score”,它与人的判断相关 [44]。生成样本被送进在 ImageNet 上训练的 Inception 模型。带有有意义物体的图像,其标签(输出)熵应当较低,也就是它们属于少数几个物体类。另一方面,图像之间的熵应当较高,也就是图像之间的差异应当较大。Inception Score 的缺点是,没有使用真实世界样本的统计量,也没有把它与合成样本的统计量进行比较。
Next, we improve the Inception Score. The equality holds except for a non-measurable set if and only if for a basis spanning the function space in which and live. These equalities of expectations are used to describe distributions by moments or cumulants, where are polynomials of the data . We generalize these polynomials by replacing by the coding layer of an inception model in order to obtain vision-relevant features. For practical reasons we only consider the first two polynomials, that is, the first two moments: mean and covariance. The Gaussian is the maximum entropy distribution for given mean and covariance, therefore we assume the coding units to follow a multidimensional Gaussian. The difference of two Gaussians (synthetic and real-world images) is measured by the Fréchet distance [14] also known as Wasserstein-2 distance [48]. We call the Fréchet distance between the Gaussian with mean obtained from and the Gaussian with mean obtained from the “Fréchet Inception Distance” (FID), which is given by [13]:
接下来我们改进 Inception Score。除掉一个不可测集之外, 成立,当且仅当对张成 与 所在函数空间的一组基 ,有 。这些期望相等被用来用矩或累积量描述分布,其中 是数据 的多项式。我们把这些多项式一般化:用 Inception 模型的编码层替换 ,以得到与视觉相关的特征。出于实用考虑,我们只考虑前两个多项式,也就是前两阶矩:均值和协方差。在给定均值和协方差时,高斯是最大熵分布,因此我们假设编码单元服从多维高斯。两个高斯(合成图像与真实世界图像)之间的差异,用弗雷歇距离 [14] 来衡量,也就是 Wasserstein-2 距离 [48]。我们把由 得到的高斯(均值与协方差为 )与由 得到的高斯()之间的弗雷歇距离 称为“弗雷歇 Inception 距离”(FID),由 [13] 给出:
Next we show that the FID is consistent with increasing disturbances and human judgment. Fig. 3 evaluates the FID for Gaussian noise, Gaussian blur, implanted black rectangles, swirled images, salt and pepper noise, and CelebA dataset contaminated by ImageNet images. The FID captures the disturbance level very well. In the experiments we used the FID to evaluate the performance of GANs. For more details and a comparison between FID and Inception Score see Supplement Section 1, where we show that FID is more consistent with the noise level than the Inception Score.
接下来我们表明,FID 与逐渐增大的扰动以及人的判断是一致的。图 3 对高斯噪声、高斯模糊、植入的黑色方块、旋涡图像、椒盐噪声,以及被 ImageNet 图像污染的 CelebA 数据集评估了 FID。FID 很好地捕捉了扰动水平。实验中我们用 FID 来评测 GAN 的性能。更多细节以及 FID 与 Inception Score 的比较见补充材料第 1 节,我们在那里表明 FID 比 Inception Score 更与噪声水平一致。
Figure 3: FID is evaluated for upper left: Gaussian noise, upper middle: Gaussian blur, upper right: implanted black rectangles, lower left: swirled images, lower middle: salt and pepper noise, and lower right: CelebA dataset contaminated by ImageNet images. The disturbance level rises from zero and increases to the highest level. The FID captures the disturbance level very well by monotonically increasing.
图 3:对 FID 的评测。左上:高斯噪声;中上:高斯模糊;右上:植入的黑色方块;左下:旋涡图像;中下:椒盐噪声;右下:被 ImageNet 图像污染的 CelebA 数据集。扰动水平从零升到最高。FID 通过单调上升很好地捕捉了扰动水平。
Model Selection and Evaluation. We compare the two time-scale update rule (TTUR) for GANs with the original GAN training to see whether TTUR improves the convergence speed and performance of GANs. We have selected Adam stochastic optimization to reduce the risk of mode collapsing. The advantage of Adam has been confirmed by MNIST experiments, where Adam indeed considerably reduced the cases for which we observed mode collapsing. Although TTUR ensures that the discriminator converges during learning, practicable learning rates must be found for each experiment. We face a trade-off since the learning rates should be small enough (e.g. for the generator) to ensure convergence but at the same time should be large enough to allow fast learning. For each of the experiments, the learning rates have been optimized to be large while still ensuring stable training which is indicated by a decreasing FID or Jensen-Shannon-divergence (JSD). We further fixed the time point for stopping training to the update step when the FID or Jensen-Shannon-divergence of the best models was no longer decreasing. For some models, we observed that the FID diverges or starts to increase at a certain time point. An example of this behaviour is shown in Fig. 5. The performance of generative models is evaluated via the Fréchet Inception Distance (FID) introduced above. For the One Billion Word experiment, the normalized JSD served as performance measure. For computing the FID, we propagated all images from the training dataset through the pretrained Inception-v3 model following the computation of the Inception Score [44], however, we use the last pooling layer as coding layer. For this coding layer, we calculated the mean and the covariance matrix . Thus, we approximate the first and second central moment of the function given by the Inception coding layer under the real world distribution. To approximate these moments for the model distribution, we generate 50,000 images, propagate them through the Inception-v3 model, and then compute the mean and the covariance matrix . For computational efficiency, we evaluate the FID every 1,000 DCGAN mini-batch updates, every 5,000 WGAN-GP outer iterations for the image experiments, and every 100 outer iterations for the WGAN-GP language model. For the one time-scale updates a WGAN-GP outer iteration for the image model consists of five discriminator mini-batches and ten discriminator mini-batches for the language model, where we follow the original implementation. For TTUR however, the discriminator is updated only once per iteration. We repeat the training for each single time-scale (orig) and TTUR learning rate eight times for the image datasets and ten times for the language benchmark. Additionally to the mean FID training progress we show the minimum and maximum FID over all runs at each evaluation time-step. For more details, implementations and further results see Supplement Section 4 and 6.
模型选择与评测。我们把用于 GAN 的双时间尺度更新规则(TTUR)与原来的 GAN 训练相比较,看 TTUR 是否提高了 GAN 的收敛速度和性能。我们选择 Adam 随机优化以降低模式崩塌的风险。Adam 的好处已由 MNIST 实验确认:Adam 确实显著减少了我们观察到模式崩塌的情形。虽然 TTUR 保证判别器在学习过程中收敛,但每个实验仍须找到可行的学习率。我们面对一种权衡:学习率应足够小(例如对生成器)以保证收敛,同时又应足够大以允许快速学习。对每个实验,学习率都被优化得尽量大,同时仍保证训练稳定,其标志是 FID 或 Jensen-Shannon 散度(JSD)在下降。我们进一步把停止训练的时间点固定为:最好模型的 FID 或 Jensen-Shannon 散度不再下降的那次更新。对某些模型,我们观察到 FID 会在某一时刻发散或开始上升。图 5 给出了这种行为的一个例子。生成模型的性能用上面引入的弗雷歇 Inception 距离(FID)来评测。对 One Billion Word 实验,使用归一化的 JSD 作为性能度量。计算 FID 时,我们把训练集中的全部图像送进预训练的 Inception-v3 模型,做法遵循 Inception Score 的计算 [44],不过我们把最后一个池化层当作编码层。对这一编码层,我们计算均值 和协方差矩阵 。这样,我们近似了真实世界分布下、由 Inception 编码层给出的函数的一阶和二阶中心矩。为近似模型分布下的这些矩,我们生成 50,000 张图像,送进 Inception-v3 模型,再计算均值 和协方差矩阵 。出于计算效率,图像实验中我们每 1,000 次 DCGAN 小批量更新、每 5,000 次 WGAN-GP 外迭代评估一次 FID;语言模型则每 100 次 WGAN-GP 外迭代评估一次。对单时间尺度更新,图像模型的一次 WGAN-GP 外迭代包含五次判别器小批量,语言模型则遵循原来的实现。而对 TTUR,每次迭代只更新一次判别器。对每个单时间尺度(orig)和 TTUR 学习率,图像数据集上我们重复训练八次,语言基准上十次。除平均 FID 训练进程外,我们还给出每次评估时刻上所有运行的最小和最大 FID。更多细节、实现和进一步结果见补充材料第 4 节和第 6 节。
Simple Toy Data. We first want to demonstrate the difference between a single time-scale update rule and TTUR on a simple toy min/max problem where a saddle point should be found. The objective in Fig. 4 (left) has a saddle point at and fulfills assumption A4. The norm measures the distance of the parameter vector to the saddle point. We update by gradient descent in and gradient ascent in using additive Gaussian noise in order to simulate a stochastic update. The updates should converge to the saddle point with objective value and the norm 0. In Fig. 4 (right), the first two rows show one time-scale update rules. The large learning rate in the first row diverges and has large fluctuations. The smaller learning rate in the second row converges but slower than the TTUR in the third row which has slow -updates. TTUR with slow -updates in the fourth row also converges but slower.
简单玩具数据。我们首先想在一个应当找到鞍点的简单玩具最小/最大问题上,展示单时间尺度更新规则与 TTUR 的差别。图 4(左)中的目标 在 处有一个鞍点,并满足假设 A4。范数 衡量参数向量 到鞍点的距离。我们在 上做梯度下降、在 上做梯度上升来更新 ,并加入高斯噪声以模拟随机更新。更新应当收敛到鞍点 ,目标值为 ,范数为 0。在图 4(右)中,前两行是单时间尺度更新规则。第一行较大的学习率会发散,并且波动很大。第二行较小的学习率会收敛,但比第三行具有较慢 更新的 TTUR 更慢。第四行具有较慢 更新的 TTUR 也会收敛,但更慢。
Figure 4: Left: Plot of the objective with a saddle point at . Right: Training progress with equal learning rates of 0.01 (first row) and 0.001 (second row)) for and , TTUR with a learning rate of 0.0001 for vs. 0.01 for (third row) and a larger learning rate of 0.01 for vs. 0.0001 for (fourth row). The columns show the function values (left), norms (middle), and (right). TTUR (third row) clearly converges faster than with equal time-scale updates and directly moves to the saddle point as shown by the norm and in the -plot.
图 4:左:在 处有鞍点的目标函数图。右:训练进程。第一行和第二行分别是 与 使用相同学习率 0.01 和 0.001;第三行是 TTUR,对 用 0.0001、对 用 0.01;第四行对 用更大的学习率 0.01、对 用 0.0001。各列分别给出函数值(左)、范数(中)和 (右)。TTUR(第三行)明显比相同时间尺度更新收敛更快,并且如范数和 图所示,直接走向鞍点。
DCGAN on Image Data. We test TTUR for the deep convolutional GAN (DCGAN) [42] at the CelebA, CIFAR-10, SVHN and LSUN Bedrooms dataset. Fig. 5 shows the FID during learning with the original learning method (orig) and with TTUR. The original training method is faster at the beginning, but TTUR eventually achieves better performance. DCGAN trained TTUR reaches constantly a lower FID than the original method and for CelebA and LSUN Bedrooms all one time-scale runs diverge. For DCGAN the learning rate of the generator is larger then that of the discriminator, which, however, does not contradict the TTUR theory (see the Supplement Section 5). In Table 1 we report the best FID with TTUR and one time-scale training for optimized number of updates and learning rates. TTUR constantly outperforms standard training and is more stable.
图像数据上的 DCGAN。我们在 CelebA、CIFAR-10、SVHN 和 LSUN Bedrooms 数据集上,用深度卷积 GAN(DCGAN)[42] 测试 TTUR。图 5 给出了用原来的学习方法(orig)和用 TTUR 学习时的 FID。原来的训练方法在开始时更快,但 TTUR 最终取得更好的性能。用 TTUR 训练的 DCGAN 始终达到比原来方法更低的 FID;在 CelebA 和 LSUN Bedrooms 上,所有单时间尺度运行都会发散。对 DCGAN,生成器的学习率大于判别器的学习率,但这并不与 TTUR 理论矛盾(见补充材料第 5 节)。表 1 中我们报告了在优化的更新次数和学习率下,TTUR 与单时间尺度训练的最好 FID。TTUR 始终优于标准训练,并且更稳定。
Figure 5: Mean FID (solid line) surrounded by a shaded area bounded by the maximum and the minimum over 8 runs for DCGAN on CelebA, CIFAR-10, SVHN, and LSUN Bedrooms. TTUR learning rates are given for the discriminator and generator as: “TTUR ”. Top Left: CelebA. Top Right: CIFAR-10, starting at mini-batch update 10k for better visualisation. Bottom Left: SVHN. Bottom Right: LSUN Bedrooms. Training with TTUR (red) is more stable, has much lower variance, and leads to a better FID.
图 5:DCGAN 在 CelebA、CIFAR-10、SVHN 和 LSUN Bedrooms 上 8 次运行的平均 FID(实线),阴影区域由最大值和最小值围成。TTUR 学习率按判别器 与生成器 写成:“TTUR ”。左上:CelebA。右上:CIFAR-10,为便于观察从第 10k 次小批量更新起绘制。左下:SVHN。右下:LSUN Bedrooms。用 TTUR 训练(红色)更稳定,方差小得多,并得到更好的 FID。
WGAN-GP on Image Data. We used the WGAN-GP image model [21] to test TTUR with the CIFAR-10 and LSUN Bedrooms datasets. In contrast to the original code where the discriminator is trained five times for each generator update, TTUR updates the discriminator only once, therefore we align the training progress with wall-clock time. The learning rate for the original training was optimized to be large but leads to stable learning. TTUR can use a higher learning rate for the discriminator since TTUR stabilizes learning. Fig. 6 shows the FID during learning with the original learning method and with TTUR. Table 1 shows the best FID with TTUR and one time-scale training for optimized number of iterations and learning rates. Again TTUR reaches lower FIDs than one time-scale training.
图像数据上的 WGAN-GP。我们用 WGAN-GP 图像模型 [21],在 CIFAR-10 和 LSUN Bedrooms 数据集上测试 TTUR。原来的代码对每次生成器更新训练判别器五次,与之相对,TTUR 每次只更新一次判别器,因此我们用墙钟时间对齐训练进程。原来训练的学习率被优化得尽量大,但仍能保证稳定学习。因为 TTUR 能稳定学习,判别器可以使用更高的学习率。图 6 给出了用原来的学习方法和用 TTUR 学习时的 FID。表 1 给出了在优化的迭代次数和学习率下,TTUR 与单时间尺度训练的最好 FID。TTUR 再次达到比单时间尺度训练更低的 FID。
Figure 6: Mean FID (solid line) surrounded by a shaded area bounded by the maximum and the minimum over 8 runs for WGAN-GP on CelebA, CIFAR-10, SVHN, and LSUN Bedrooms. TTUR learning rates are given for the discriminator and generator as: “TTUR ”. Left: CIFAR-10, starting at minute 20. Right: LSUN Bedrooms. Training with TTUR (red) has much lower variance and leads to a better FID.
图 6:WGAN-GP 在 CelebA、CIFAR-10、SVHN 和 LSUN Bedrooms 上 8 次运行的平均 FID(实线),阴影区域由最大值和最小值围成。TTUR 学习率按判别器 与生成器 写成:“TTUR ”。左:CIFAR-10,从第 20 分钟起绘制。右:LSUN Bedrooms。用 TTUR 训练(红色)方差小得多,并得到更好的 FID。
WGAN-GP on Language Data. Finally the One Billion Word Benchmark [10] serves to evaluate TTUR on WGAN-GP. The character-level generative language model is a 1D convolutional neural network (CNN) which maps a latent vector to a sequence of one-hot character vectors of dimension 32 given by the maximum of a softmax output. The discriminator is also a 1D CNN applied to sequences of one-hot vectors of 32 characters. Since the FID criterium only works for images, we measured the performance by the Jensen-Shannon-divergence (JSD) between the model and the real world distribution as has been done previously [21]. In contrast to the original code where the critic is trained ten times for each generator update, TTUR updates the discriminator only once, therefore we align the training progress with wall-clock time. The learning rate for the original training was optimized to be large but leads to stable learning. TTUR can use a higher learning rate for the discriminator since TTUR stabilizes learning. We report for the 4 and 6-gram word evaluation the normalized mean JSD for ten runs for original training and TTUR training in Fig. 7. In Table 1 we report the best JSD at an optimal time-step where TTUR outperforms the standard training for both measures. The improvement of TTUR on the 6-gram statistics over original training shows that TTUR enables to learn to generate more subtle pseudo-words which better resembles real words.
语言数据上的 WGAN-GP。最后,我们用 One Billion Word Benchmark [10] 在 WGAN-GP 上评测 TTUR。字符级生成语言模型是一个一维卷积神经网络(CNN),它把潜向量映射成由 softmax 输出取最大值得到的、维度为 32 的独热字符向量序列。判别器也是一个一维 CNN,作用在 32 个字符的独热向量序列上。由于 FID 这一判据只适用于图像,我们像先前工作那样 [21],用模型分布与真实世界分布之间的 Jensen-Shannon 散度(JSD)来衡量性能。原来的代码对每次生成器更新训练评论者十次,与之相对,TTUR 每次只更新一次判别器,因此我们用墙钟时间对齐训练进程。原来训练的学习率被优化得尽量大,但仍能保证稳定学习。因为 TTUR 能稳定学习,判别器可以使用更高的学习率。图 7 给出 4-gram 和 6-gram 词评测上,原来训练与 TTUR 训练十次运行的归一化平均 JSD。表 1 中我们报告最优时间步上的最好 JSD,在两项度量上 TTUR 都优于标准训练。TTUR 相对原来训练在 6-gram 统计上的改进表明,TTUR 能够学会生成更精细的伪词,从而更接近真实词。
Figure 7: Performance of WGAN-GP models trained with the original (orig) and our TTUR method on the One Billion Word benchmark. The performance is measured by the normalized Jensen-Shannon-divergence based on 4-gram (left) and 6-gram (right) statistics averaged (solid line) and surrounded by a shaded area bounded by the maximum and the minimum over 10 runs, aligned to wall-clock time and starting at minute 150. TTUR learning (red) clearly outperforms the original one time-scale learning.
图 7:用原来的方法(orig)和我们的 TTUR 方法训练的 WGAN-GP 模型在 One Billion Word 基准上的表现。性能用基于 4-gram(左)和 6-gram(右)统计的归一化 Jensen-Shannon 散度衡量,实线为平均,阴影区域由 10 次运行的最大值和最小值围成,按墙钟时间对齐并从第 150 分钟起绘制。TTUR 学习(红色)明显优于原来的单时间尺度学习。
Table 1: The performance of DCGAN and WGAN-GP trained with the original one time-scale update rule and with TTUR on CelebA, CIFAR-10, SVHN, LSUN Bedrooms and the One Billion Word Benchmark. During training we compare the performance with respect to the FID and JSD for optimized number of updates. TTUR exhibits consistently a better FID and a better JSD.
表 1:用原来的单时间尺度更新规则和用 TTUR 训练的 DCGAN 与 WGAN-GP,在 CelebA、CIFAR-10、SVHN、LSUN Bedrooms 和 One Billion Word Benchmark 上的表现。训练过程中,我们在优化的更新次数下用 FID 和 JSD 比较性能。TTUR 始终给出更好的 FID 和更好的 JSD。
DCGAN Image
| dataset | method | , | updates | FID | method | updates | FID | |
|---|---|---|---|---|---|---|---|---|
| CelebA | TTUR | 1e-5, 5e-4 | 225k | 12.5 | orig | 5e-4 | 70k | 21.4 |
| CIFAR-10 | TTUR | 1e-4, 5e-4 | 75k | 36.9 | orig | 1e-4 | 100k | 37.7 |
| SVHN | TTUR | 1e-5, 1e-4 | 165k | 12.5 | orig | 5e-5 | 185k | 21.4 |
| LSUN | TTUR | 1e-5, 1e-4 | 340k | 57.5 | orig | 5e-5 | 70k | 70.4 |
WGAN-GP Image
| dataset | method | , | time(m) | FID | method | time(m) | FID | |
|---|---|---|---|---|---|---|---|---|
| CIFAR-10 | TTUR | 3e-4, 1e-4 | 700 | 24.8 | orig | 1e-4 | 800 | 29.3 |
| LSUN | TTUR | 3e-4, 1e-4 | 1900 | 9.5 | orig | 1e-4 | 2010 | 20.5 |
WGAN-GP Language
| -gram | method | , | time(m) | JSD | method | time(m) | JSD | |
|---|---|---|---|---|---|---|---|---|
| 4-gram | TTUR | 3e-4, 1e-4 | 1150 | 0.35 | orig | 1e-4 | 1040 | 0.38 |
| 6-gram | TTUR | 3e-4, 1e-4 | 1120 | 0.74 | orig | 1e-4 | 1070 | 0.77 |
4 Conclusion
4 结论
For learning GANs, we have introduced the two time-scale update rule (TTUR), which we have proved to converge to a stationary local Nash equilibrium. Then we described Adam stochastic optimization as a heavy ball with friction (HBF) dynamics, which shows that Adam converges and that Adam tends to find flat minima while avoiding small local minima. A second order differential equation describes the learning dynamics of Adam as an HBF system. Via this differential equation, the convergence of GANs trained with TTUR to a stationary local Nash equilibrium can be extended to Adam. Finally, to evaluate GANs, we introduced the 'Fréchet Inception Distance” (FID) which captures the similarity of generated images to real ones better than the Inception Score. In experiments we have compared GANs trained with TTUR to conventional GAN training with a one time-scale update rule on CelebA, CIFAR-10, SVHN, LSUN Bedrooms, and the One Billion Word Benchmark. TTUR outperforms conventional GAN training consistently in all experiments.
为了学习 GAN,我们引入了双时间尺度更新规则(TTUR),并证明它收敛到平稳的局部纳什均衡。随后我们把 Adam 随机优化描述为带摩擦的重球(HBF)动力学,这表明 Adam 会收敛,并且倾向找到平坦的最小点、避开狭小的局部最小点。一个二阶微分方程把 Adam 的学习动力学描述成 HBF 系统。通过这一微分方程,用 TTUR 训练的 GAN 收敛到平稳局部纳什均衡的结论,可以推广到 Adam。最后,为了评测 GAN,我们引入了“弗雷歇 Inception 距离”(FID),它比 Inception Score 更好地捕捉生成图像与真实图像的相似性。实验中,我们在 CelebA、CIFAR-10、SVHN、LSUN Bedrooms 和 One Billion Word Benchmark 上,把用 TTUR 训练的 GAN 与采用单时间尺度更新规则的常规 GAN 训练做了比较。在所有实验中,TTUR 都始终优于常规 GAN 训练。
Acknowledgment
This work was supported by NVIDIA Corporation, Bayer AG with Research Agreement 09/2017, Zalando SE with Research Agreement 01/2016, Audi.JKU Deep Learning Center, Audi Electronic Venture GmbH, IWT research grant IWT150865 (Exaptation), H2020 project grant 671555 (ExCAPE) and FWF grant P 28660-N31.
References
[1] M. Arjovsky, S. Chintala, and L. Bottou. Wasserstein GAN. arXiv e-prints, arXiv:1701.07875, 2017.
[2] S. Arora, R. Ge, Y. Liang, T. Ma, and Y. Zhang. Generalization and equilibrium in generative adversarial nets (GANs). In D. Precup and Y. W. Teh, editors, Proceedings of the 34th International Conference on Machine Learning, Proceedings of Machine Learning Research, vol. 70, pages 224–232, 2017.
[3] H. Attouch, X. Goudou, and P. Redont. The heavy ball with friction method, I. the continuous dynamical system: Global exploration of the local minima of a real-valued function by asymptotic analysis of a dissipative dynamical system. Communications in Contemporary Mathematics, 2(1):1–34, 2000.
[4] D. Berthelot, T. Schumm, and L. Metz. BEGAN: Boundary equilibrium generative adversarial networks. arXiv e-prints, arXiv:1703.10717, 2017.
[5] D. P. Bertsekas and J. N. Tsitsiklis. Gradient convergence in gradient methods with errors. SIAM Journal on Optimization, 10(3):627–642, 2000.
[6] S. Bhatnagar, H. L. Prasad, and L. A. Prashanth. Stochastic Recursive Algorithms for Optimization. Lecture Notes in Control and Information Sciences. Springer-Verlag London, 2013.
[7] V. S. Borkar. Stochastic approximation with two time scales. Systems & Control Letters, 29(5):291–294, 1997.
[8] V. S. Borkar and S. P. Meyn. The O.D.E. method for convergence of stochastic approximation and reinforcement learning. SIAM Journal on Control and Optimization, 38(2):447–469, 2000.
[9] T. Che, Y. Li, A. P. Jacob, Y. Bengio, and W. Li. Mode regularized generative adversarial networks. In Proceedings of the International Conference on Learning Representations (ICLR), 2017. arXiv:1612.02136.
[10] C. Chelba, T. Mikolov, M. Schuster, Q. Ge, T. Brants, P. Koehn, and T. Robinson. One billion word benchmark for measuring progress in statistical language modeling. arXiv e-prints, arXiv:1312.3005, 2013.
[11] D.-A. Clevert, T. Unterthiner, and S. Hochreiter. Fast and accurate deep network learning by exponential linear units (ELUs). In Proceedings of the International Conference on Learning Representations (ICLR), 2016. arXiv:1511.07289.
[12] D. DiCastro and R. Meir. A convergent online single time scale actor critic algorithm. J. Mach. Learn. Res., 11:367–410, 2010.
[13] D. C. Dowson and B. V. Landau. The Fréchet distance between multivariate normal distributions. Journal of Multivariate Analysis, 12:450–455, 1982.
[14] M. Fréchet. Sur la distance de deux lois de probabilité. C. R. Acad. Sci. Paris, 244:689–692, 1957.
[15] S. Gadat, F. Panloup, and S. Saadane. Stochastic heavy ball. arXiv e-prints, arXiv:1609.04228, 2016.
[16] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 2672–2680, 2014.
[17] I. J. Goodfellow. On distinguishability criteria for estimating generative models. In Workshop at the International Conference on Learning Representations (ICLR), 2015. arXiv:1412.6515.
[18] I. J. Goodfellow. NIPS 2016 tutorial: Generative adversarial networks. arXiv e-prints, arXiv:1701.00160, 2017.
[19] X. Goudou and J. Munier. The gradient and heavy ball with friction dynamical systems: the quasiconvex case. Mathematical Programming, 116(1):173–191, 2009.
[20] P. Grnarova, K. Y. Levy, A. Lucchi, T. Hofmann, and A. Krause. An online learning approach to generative adversarial networks. arXiv e-prints, arXiv:1706.03269, 2017.
[21] I. Gulrajani, F. Ahmed, M. Arjovsky, V. Dumoulin, and A. Courville. Improved training of Wasserstein GANs. arXiv e-prints, arXiv:1704.00028, 2017. Advances in Neural Information Processing Systems 31 (NIPS 2017).
[22] M. W. Hirsch. Convergent activation dynamics in continuous time networks. Neural Networks, 2(5):331–349, 1989.
[23] R. D. Hjelm, A. P. Jacob, T. Che, K. Cho, and Y. Bengio. Boundary-seeking generative adversarial networks. arXiv e-prints, arXiv:1702.08431, 2017.
[24] S. Hochreiter and J. Schmidhuber. Flat minima. Neural Computation, 9(1):1–42, 1997.
[25] P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. arXiv:1611.07004.
[26] P. Karmakar and S. Bhatnagar. Two time-scale stochastic approximation with controlled Markov noise and off-policy temporal-difference learning. Mathematics of Operations Research, 2017.
[27] D. P. Kingma and J. L. Ba. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations (ICLR)), 2015. arXiv:1412.6980.
[28] V. R. Konda. Actor-Critic Algorithms. PhD thesis, Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, 2002.
[29] V. R. Konda and J. N. Tsitsiklis. Linear stochastic approximation driven by slowly varying Markov chains. Systems & Control Letters, 50(2):95–102, 2003.
[30] H. J. Kushner and G. G. Yin. Stochastic Approximation Algorithms and Recursive Algorithms and Applications. Springer-Verlag New York, second edition, 2003.
[31] C. Ledig, L. Theis, F. Huszar, J. Caballero, A. P. Aitken, A. Tejani, J. Totz, Z. Wang, and W. Shi. Photo-realistic single image super-resolution using a generative adversarial network. arXiv e-prints, arXiv:1609.04802, 2016.
[32] C.-L. Li, W.-C. Chang, Y. Cheng, Y. Yang, and B. Póczos. MMD GAN: Towards deeper understanding of moment matching network. In Advances in Neural Information Processing Systems 31 (NIPS 2017), 2017. arXiv:1705.08584.
[33] J. Li, A. Madry, J. Peebles, and L. Schmidt. Towards understanding the dynamics of generative adversarial networks. arXiv e-prints, arXiv:1706.09884, 2017.
[34] J. H. Lim and J. C. Ye. Geometric GAN. arXiv e-prints, arXiv:1705.02894, 2017.
[35] S. Liu, O. Bousquet, and K. Chaudhuri. Approximation and convergence properties of generative adversarial learning. In Advances in Neural Information Processing Systems 31 (NIPS 2017), 2017. arXiv:1705.08991.
[36] L. M. Mescheder, S. Nowozin, and A. Geiger. The numerics of GANs. In Advances in Neural Information Processing Systems 31 (NIPS 2017), 2017. arXiv:1705.10461.
[37] L. Metz, B. Poole, D. Pfau, and J. Sohl-Dickstein. Unrolled generative adversarial networks. In Proceedings of the International Conference on Learning Representations (ICLR), 2017. arXiv:1611.02163.
[38] Y. Mroueh and T. Sercu. Fisher GAN. In Advances in Neural Information Processing Systems 31 (NIPS 2017), 2017. arXiv:1705.09675.
[39] V. Nagarajan and J. Z. Kolter. Gradient descent GAN optimization is locally stable. arXiv e-prints, arXiv:1706.04156, 2017. Advances in Neural Information Processing Systems 31 (NIPS 2017).
[40] B. T. Polyak. Some methods of speeding up the convergence of iteration methods. USSR Computational Mathematics and Mathematical Physics, 4(5):1–17, 1964.
[41] H. L. Prasad, L. A. Prashanth, and S. Bhatnagar. Two-timescale algorithms for learning Nash equilibria in general-sum stochastic games. In Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems (AAMAS ’15), pages 1371–1379, 2015.
[42] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In Proceedings of the International Conference on Learning Representations (ICLR), 2016. arXiv:1511.06434.
[43] A. Ramaswamy and S. Bhatnagar. Stochastic recursive inclusion in two timescales with an application to the lagrangian dual problem. Stochastics, 88(8):1173–1187, 2016.
[44] T. Salimans, I. J. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen. Improved techniques for training GANs. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 2234–2242, 2016.
[45] L. Theis, A. van den Oord, and M. Bethge. A note on the evaluation of generative models. In Proceedings of the International Conference on Learning Representations (ICLR), 2016. arXiv:1511.01844.
[46] I. Tolstikhin, S. Gelly, O. Bousquet, C.-J. Simon-Gabriel, and B. Schölkopf. AdaGAN: Boosting generative models. arXiv e-prints, arXiv:1701.02386, 2017. Advances in Neural Information Processing Systems 31 (NIPS 2017).
[47] R. Wang, A. Cully, H. J. Chang, and Y. Demiris. MAGAN: margin adaptation for generative adversarial networks. arXiv e-prints, arXiv:1704.03817, 2017.
[48] L. N. Wasserstein. Markov processes over denumerable products of spaces describing large systems of automata. Probl. Inform. Transmission, 5:47–52, 1969.
[49] Y. Wu, Y. Burda, R. Salakhutdinov, and R. B. Grosse. On the quantitative analysis of decoder-based generative models. In Proceedings of the International Conference on Learning Representations (ICLR), 2017. arXiv:1611.04273.
[50] J. Zhang, D. Zheng, and M. Chiang. The impact of stochastic noisy feedback on distributed network utility maximization. In IEEE INFOCOM 2007 - 26th IEEE International Conference on Computer Communications, pages 222–230, 2007.






