A Variational Inequality Perspective on Generative Adversarial Networks

Gauthier Gidel, Hugo Berard, Gaëtan Vignoud, Pascal Vincent, Simon Lacoste-Julien

Introduction

Generative adversarial networks (GANs) (Goodfellow et al., 2014) form a generative modeling approach known for producing realistic natural images (Karras et al., 2018) as well as high quality super-resolution (Ledig et al., 2017) and style transfer (Zhu et al., 2017). Nevertheless, GANs are also known to be difficult to train, often displaying an unstable behavior (Goodfellow, 2016). Much recent work has tried to tackle these training difficulties, usually by proposing new formulations of the GAN objective (Nowozin et al., 2016; Arjovsky et al., 2017). Each of these formulations can be understood as a two-player game, in the sense of game theory (Von Neumann and Morgenstern, 1944), and can be addressed as a variational inequality problem (VIP) (Harker and Pang, 1990), a framework that encompasses traditional saddle point optimization algorithms (Korpelevich, 1976).

Solving such GAN games is traditionally approached by running variants of stochastic gradient descent (SGD) initially developed for optimizing supervised neural network objectives. Yet it is known that for some games (Goodfellow, 2016, §8.2) SGD exhibits oscillatory behavior and fails to converge. This oscillatory behavior, which does not arise from stochasticity, highlights a fundamental problem: while a direct application of basic gradient descent is an appropriate method for regular minimization problems, it is not a sound optimization algorithm for the kind of two-player games of GANs. This constitutes a fundamental issue for GAN training, and calls for the use of more principled methods with more reassuring convergence guarantees.

We point out that multi-player games can be cast as variational inequality problems (VIPs) and consequently the same applies to any GAN formulation posed as a minimax or non-zero-sum game. We present two techniques from this literature, namely averaging and extrapolation, widely used to solve VIPs but which have not been explored in the context of GANs before.The preprints for (Mertikopoulos et al., 2019) and (Yazıcı et al., 2019), which respectively explored extrapolation and averaging for GANs, appeared after our initial preprint. See also the related work section §6.

We extend standard GAN training methods such as SGD or Adam into variants that incorporate these techniques (Alg. 4 is new). We also explain that the oscillations of basic SGD for GAN training previously noticed (Goodfellow, 2016) can be explained by standard variational inequality optimization results and we illustrate how averaging and extrapolation can fix this issue.

We study a variant of extragradient that we call extrapolation from the past originally introduced by Popov (1980). It only requires one gradient computation per update compared to extrapolation, which needs to compute the gradient twice. We prove its convergence for strongly monotone operators and in the stochastic VIP setting.

Finally, we test these techniques in the context of GAN training. We observe a 44-6%6\% improvement over Miyato et al. (2018) on the inception score and the Fréchet inception distance on the CIFAR-10 dataset using a WGAN-GP (Gulrajani et al., 2017) and a ResNet generator.Code available at https://gauthiergidel.github.io/projects/vip-gan.html.

§2 presents the background on GAN and optimization, and shows how to cast this optimization as a VIP. §3 presents standard techniques and extrapolation from the past to optimize variational inequalities in a batch setting. §4 considers these methods in the stochastic setting, yielding three corresponding variants of SGD, and provides their respective convergence rates. §5 develops how to combine these techniques with already existing algorithms. §6 discusses the related work and §7 presents experimental results.

GAN optimization as a variational inequality problem

The purpose of generative modeling is to generate samples from a distribution qθq_{\bm{\theta}} that matches best the true distribution pp of the data. The generative adversarial network training strategy can be understood as a game between two players called generator and discriminator. The former produces a sample that the latter has to classify between real or fake data. The final goal is to build a generator able to produce sufficiently realistic samples to fool the discriminator.

In the original GAN paper (Goodfellow et al., 2014), the GAN objective is formulated as a zero-sum game where the cost function of the discriminator DφD_{\bm{\varphi}} is given by the negative log-likelihood of the binary classification task between real or fake data generated from qθq_{\bm{\theta}} by the generator,

However Goodfellow et al. (2014) recommends to use in practice a second formulation, called non-saturating GAN. This formulation is a non-zero-sum game where the aim is to jointly minimize:

The dynamics of this formulation has the same stationary points as the zero-sum one (1) but is claimed to provide “much stronger gradients early in learning” (Goodfellow et al., 2014) .

2 Equilibrium

The minimax formulation (1) is theoretically convenient because a large literature on games studies this problem and provides guarantees on the existence of equilibria. Nevertheless, practical considerations lead the GAN literature to consider a different objective for each player as formulated in (2). In that case, the two-player game problem (Von Neumann and Morgenstern, 1944) consists in finding the following Nash equilibrium:

Only when LG=−LD{\mathcal{L}}_{G}=-{\mathcal{L}}_{D} is the game called a zero-sum game and (3) can be formulated as a minimax problem. One important point to notice is that the two optimization problems in (3) are coupled and have to be considered jointly from an optimization point of view.

Standard GAN objectives are non-convex (i.e. each cost function is non-convex), and thus such (pure) equilibria may not exist. As far as we know, not much is known about the existence of these equilibria for non-convex losses (see Heusel et al. (2017) and references therein for some results). In our theoretical analysis in §4, our assumptions (monotonicity (24) of the operator and convexity of the constraint set) imply the existence of an equilibrium.

In this paper, we focus on ways to optimize these games, assuming that an equilibrium exists. As is often standard in non-convex optimization, we also focus on finding points satisfying the necessary stationary conditions. As we mentioned previously, one difficulty that emerges in the optimization of such games is that the two different cost functions of (3) have to be minimized jointly in θ{\bm{\theta}} and φ{\bm{\varphi}}. Fortunately, the optimization literature has for a long time studied so-called variational inequality problems, which generalize the stationary conditions for two-player game problems.

3 Variational inequality problem formulation

We first consider the local necessary conditions that characterize the solution of the smooth two-player game (3), defining stationary points, which will motivate the definition of a variational inequality. In the unconstrained setting, a stationary point is a couple (θ∗,φ∗)({\bm{\theta}}^{*},{\bm{\varphi}}^{*}) with zero gradient:

When constraints are present,An example of constraint for GANs is to clip the parameters of the discriminator (Arjovsky et al., 2017). a stationary point (θ∗,φ∗)({\bm{\theta}}^{*},{\bm{\varphi}}^{*}) is such that the directional derivative of each cost function is non-negative in any feasible direction (i.e. there is no feasible descent direction):

Defining ω=def(θ,φ), ω∗=def(θ∗,φ∗), Ω=defΘ×Φ{\bm{\omega}}\stackrel{{\scriptstyle\text{def}}}{{=}}({\bm{\theta}},{\bm{\varphi}}),\,{\bm{\omega}}^{*}\stackrel{{\scriptstyle\text{def}}}{{=}}({\bm{\theta}}^{*},{\bm{\varphi}}^{*}),\,\Omega\stackrel{{\scriptstyle\text{def}}}{{=}}\Theta\times\Phi, Eq. (5) can be compactly formulated as:

We call optimal set the set Ω∗\Omega^{*} of ω∈Ω{\bm{\omega}}\in\Omega verifying (VIP). The intuition behind it is that any ω∗∈Ω∗{\bm{\omega}}^{*}\in\Omega^{*} is a fixed point of the constrained dynamic of FF (constrained to Ω\Omega).

We have thus showed that both saddle point optimization and non-zero sum game optimization, which encompass the large majority of GAN variants proposed in the literature, can be cast as VIPs. In the next section, we turn to suitable optimization techniques for such problems.

Optimization of Variational Inequalities (batch setting)

Let us begin by looking at techniques that were developed in the optimization literature to solve VIPs. We present the intuitions behind them as well as their performance on a simple bilinear problem (see Fig. 1). Our goal is to provide mathematical insights on averaging (§3.1) and extrapolation (§3.2) and propose a novel variant of the extrapolation technique that we called extrapolation from the past (§3.3). We consider the batch setting, i.e., the operator F(ω)F({\bm{\omega}}) defined in Eq. 6 yields an exact full gradient. We present extensions of these techniques to the stochastic setting later in §4.

The two standard methods studied in the VIP literature are the gradient method (Bruck, 1977) and the extragradient method (Korpelevich, 1976). The iterates of the basic gradient method are given by ωt+1=PΩ[ωt−ηF(ωt)]{\bm{\omega}}_{t+1}=P_{\Omega}[{\bm{\omega}}_{t}-\eta F({\bm{\omega}}_{t})] where PΩ[⋅]P_{\Omega}[\cdot] is the projection onto the constraint set (if constraints are present) associated to (VIP). These iterates are known to converge linearly under an additional assumption on the operatorStrong monotonicity, a generalization of strong convexity. See §A. (Chen and Rockafellar, 1997), but oscillate for a bilinear operator as shown in Fig. 1. On the other hand, the uniform average of these iterates converge for any bounded monotone operator with a O(1/t)O(1/\sqrt{t}) rate (Nedić and Ozdaglar, 2009), motivating the presentation of averaging in §3.1. By contrast, the extragradient method (extrapolated gradient) does not require any averaging to converge for monotone operators (in the batch setting), and can even converge at the faster O(1/t)O(1/t) rate (Nesterov, 2007). The idea of this method is to compute a lookahead step (see intuition on extrapolation in §3.2) in order to compute a more stable direction to follow.

More generally, we consider a weighted averaging scheme with weights ρt≥0\rho_{t}\geq 0. This weighted averaging scheme have been proposed for the first time for (batch) VIP by Bruck (1977),

Averaging schemes can be efficiently implemented in an online fashion noticing that,

A similar task was presented by Nagarajan and Kolter (2017) where they consider a quadratic discriminator instead of a linear one, and show that gradient descent is not necessarily asymptotically stable. The bilinear objective has been extensively used (Goodfellow, 2016; Mescheder et al., 2018; Yadav et al., 2018; Daskalakis et al., 2018) to highlight the difficulties of gradient descent for saddle point optimization. Yet, ways to cope with this issue have been proposed decades ago in the context of mathematical programming. For illustrating the properties of the methods of interest, we will study their behavior in the rest of §3 on a simple unconstrained unidimensional version of Eq. 9 (this behavior can be generalized to general multidimensional bilinear examples, see §B.3):

The operator associated with this minimax game is F(θ,ϕ)=(ϕ,−θ)F(\theta,\phi)=(\phi,-\theta). There are several ways to compute the discrete updates of this dynamics. The two most common ones are the simultaneous and the alternating gradient update rules,

Interestingly, these two choices give rise to completely different behaviors. The norm of the simultaneous updates diverges geometrically, whereas the alternating iterates are bounded but do not converge to the equilibrium. As a consequence, their respective uniform average have a different behavior, as highlighted in the following proposition (proof in §B.1 and generalization in §B.3):

The simultaneous iterates diverge geometrically and the alternating iterates defined in (11) are bounded but do not converge to 0 as

where ut=Θ(vt)⇔∃α,β,t0>0 such that ∀t≥t0,αvt≤ut≤βvtu_{t}=\Theta(v_{t})\Leftrightarrow\exists\alpha,\beta,t_{0}>0\text{ such that }\forall t\geq t_{0},\alpha v_{t}\leq u_{t}\leq\beta v_{t}.

The uniform average (θˉt,ϕˉt)=def1t∑s=0t−1(θs,ϕs)(\bar{\theta}_{t},\bar{\phi}_{t})\stackrel{{\scriptstyle\text{def}}}{{=}}\frac{1}{t}\sum_{s=0}^{t-1}(\theta_{s},\phi_{s}) of the simultaneous updates (resp. the alternating updates) diverges (resp. converges to 0) as,

This sublinear convergence result, proved in §B, underlines the benefits of averaging when the sequence of iterates is bounded (i.e. for alternating update rule). When the sequence of iterates is not bounded (i.e. for simultaneous updates) averaging fails to ensure convergence. This theorem also shows how alternating updates may have better convergence properties than simultaneous updates.

2 Extrapolation

Another technique used in the variational inequality literature to prevent oscillations is extrapolation. This concept is anterior to the extragradient method since Korpelevich (1976) mentions that the idea of extrapolated “prices” to give “stability” had been already formulated by Polyak (1963, Chap. II). The idea behind this technique is to compute the gradient at an (extrapolated) point different from the current point from which the update is performed, stabilizing the dynamics:

Note that, even in the unconstrained case, this method is intrinsically different from Nesterov’s momentumSutskever (2013, §7.2) showed the equivalence between “standard momentum” and Nesterov’s formulation. (Nesterov, 1983, Eq. 2.2.9) because of this lookahead step for the gradient computation:

Nesterov’s method does not converge when trying to optimize (10). One intuition of why extrapolation has better convergence properties than the standard gradient method comes from Euler’s integration framework. Indeed, to first order, we have ωt+1/2≈ωt+1+o(η){\bm{\omega}}_{t+1/2}\approx{\bm{\omega}}_{t+1}+o(\eta) and consequently, the update step (15) can be interpreted as a first order approximation to an implicit method step:

Implicit methods are known to be more stable and to benefit from better convergence properties (Atkinson, 2003) than explicit methods, e.g., in §B.2 we show that (17) on (10) converges for any η\eta. Though, they are usually not practical since they require to solve a potentially non-linear system at each step. Going back to the simplified WGAN toy example (10) from §3.1, we get the following update rules:

In the following proposition, we see that for η<1\eta<1, the respective convergence rates of the implicit method and extrapolation are highly similar. Keeping in mind that the latter has the major advantage of being more practical, this proposition clearly underlines the benefits of extrapolation. Note that Prop. 1 and 2 generalize to general unconstrained bilinear game (more details and proof in §B.3),

The squared norm of the iterates Nt2=defθt2+ϕt2N_{t}^{2}\stackrel{{\scriptstyle\text{def}}}{{=}}\theta_{t}^{2}+\phi_{t}^{2}, where the update rule of θt\theta_{t} and ϕt\phi_{t} are defined in (18), decreases geometrically for any η<1\eta<1 as,

3 Extrapolation from the past

One issue with extrapolation is that the algorithm “wastes” a gradient (14). Indeed we need to compute the gradient at two different positions for every single update of the parameters. (Popov, 1980) proposed a similar technique that only requires a single gradient computation per update. The idea is to store and re-use the extrapolated gradient for the extrapolation:

A similar update scheme was proposed by Chiang et al. (2012, Alg. 1) in the context of online convex optimization and generalized by Rakhlin and Sridharan (2013) for general online learning. Without projection, (20) and (21) reduce to the optimistic mirror descent described by Daskalakis et al. (2018):

OMD was proposed with similar motivation as ours, namely tackling oscillations due to the game formulation in GAN training, but with an online learning perspective. Using the VIP point of view, we are able to prove a linear convergence rate for extrapolation from the past (see details and proof of Theorem 1 in §B.4). We also provide results on the averaged iterate for a stochastic version in §4. In comparison to the convergence results from Daskalakis et al. (2018) that hold for a bilinear objective, we provide a faster convergence rate (linear vs sublinear) on the last iterate for a general (strongly monotone) operator FF and any projection on a convex Ω\Omega. One thing to notice is that the operator of a bilinear objective is not strongly monotone, but in that case one can use the standard extrapolation method (14) which converges linearly for an unconstrained bilinear game (Tseng, 1995, Cor. 3.3).

If FF is μ\mu-strongly monotone (see §A for the definition of strong monotonicity) and LL-Lipschitz, then the updates (20) and (21) with η=14L\eta=\frac{1}{4L} provide linearly converging iterates,

Optimization of VIP with stochastic gradients

For our analysis, we require at least one of the two following assumptions on the stochastic operator:

Assump. 1 is standard in stochastic variational analysis, while Assump. 2 is a stronger assumption sometimes made in stochastic convex optimization. To illustrate how strong Assump. 2 is, note that it does not hold for an unconstrained bilinear objective like in our example (10) in §3. It is thus mainly reasonable for bounded constraint sets. Note that in practice we have σ≪M\sigma\ll M.

We now present and analyze three algorithms that are variants of SGD that are appropriate to solve (VIP). The first one Alg. 1 (AvgSGD) is the stochastic extension of the gradient method for solving (VIP); Alg. 2 (AvgExtraSGD) uses extrapolation and Alg. 3 (AvgPastExtraSGD) uses extrapolation from the past. A fourth variant that re-use the mini-batch for the extrapolation step (ReExtraSGD, Alg. 5) is described in §D. These four algorithms return an average of the iterates (typical in stochastic setting). The proofs of the theorems presented in this section are in §F.

If FF can be written as (6), it implies that the cost functions are convex.The convexity of the cost functions in (3) is a necessary condition (not sufficient) for the operator to be monotone. In the context of a zero-sum game, the convexity of the cost functions is a sufficient condition. Note however that general GANs parametrized with neural networks lead to non-monotone VIPs.

FF is monotone and Ω\Omega is a compact convex set, such that max⁡ω,ω′∈Ω∥ω−ω′∥2≤R2\max_{{\bm{\omega}},{\bm{\omega}}^{\prime}\in\Omega}\|{\bm{\omega}}-{\bm{\omega}}^{\prime}\|^{2}\leq R^{2}.

In that setting the quantity g(ω∗):=max⁡ω∈ΩF(ω)⊤(ω∗−ω)g({\bm{\omega}}^{*})\mathrel{\mathop{\ordinarycolon}}=\max_{{\bm{\omega}}\in\Omega}F({\bm{\omega}})^{\top}({\bm{\omega}}^{*}-{\bm{\omega}}) is well defined and is equal to 0 if and only if ω∗{\bm{\omega}}^{*} is a solution of (VIP). Moreover, if we are optimizing a zero-sum game, we have ω=(θ,φ), Ω=Θ×Φ{\bm{\omega}}=({\bm{\theta}},{\bm{\varphi}}),\,\Omega=\Theta\times\Phi and F(θ,φ)=[∇θL(θ,φ)   − ⁣∇φL(θ,φ)]⊤F({\bm{\theta}},{\bm{\varphi}})=[\nabla_{\bm{\theta}}{\mathcal{L}}({\bm{\theta}},{\bm{\varphi}})\,\;-\!\nabla_{\bm{\varphi}}{\mathcal{L}}({\bm{\theta}},{\bm{\varphi}})]^{\top}. Hence, the quantity h(θ∗,φ∗):=max⁡φ∈ΦL(θ∗,φ)−min⁡θ∈ΘL(θ,φ∗)h({\bm{\theta}}^{*},{\bm{\varphi}}^{*})\mathrel{\mathop{\ordinarycolon}}=\max_{{\bm{\varphi}}\in\Phi}{\mathcal{L}}({\bm{\theta}}^{*},{\bm{\varphi}})-\min_{{\bm{\theta}}\in\Theta}{\mathcal{L}}({\bm{\theta}},{\bm{\varphi}}^{*}) is well defined and equal to 0 if and only if (θ∗,φ∗)({\bm{\theta}}^{*},{\bm{\varphi}}^{*}) is a Nash equilibrium of the game. The two functions gg and hh are called merit functions (more details on the concept of merit functions in §C). In the following, we call,

Alg. 1 (AvgSGD) presents the stochastic gradient method with averaging, which reduces to the standard (simultaneous) SGD updates for the two-player games used in the GAN literature, but returning an average of the iterates.

Under Assump. 1, 2 and 3, SGD with averaging (Alg. 1) with a constant step-size gives,

Alg. 2 (AvgExtraSGD) adds an extrapolation step compared to Alg. 1 in order to reduce the oscillations due to the game between the two players. A theoretical consequence is that it has a smaller variance term than (26). As discussed previously, Assump. 2 made in Thm. 2 for the convergence of Alg. 1 is very strong in the unbounded setting. One advantage of SGD with extrapolation is that Thm. 3 does not require this assumption.

Since in practice σ≪M\sigma\ll M, the variance term in (27) is significantly smaller than the one in (26). To summarize, SGD with extrapolation provides better convergence guarantees but requires two gradient computations and samples per iteration. This motivates our new method, Alg. 3 (AvgPastExtraSGD) which uses extrapolation from the past and achieves the best of both worlds (in theory).

The bound is similar to the one provided in Thm. 3 but each iteration of Alg. 3 is computationally half the cost of an iteration of Alg. 2.

Combining the techniques with established algorithms

In the previous sections, we presented several techniques that converge for stochastic monotone operators. These techniques can be combined in practice with existing algorithms. We propose to combine them to two standard algorithms used for training deep neural networks: the Adam optimizer (Kingma and Ba, 2015) and the SGD optimizer (Robbins and Monro, 1951). For the Adam optimizer, there are several possible choices on how to update the moments. This choice can lead to different algorithms in practice: for example, even in the unconstrained case, our proposed Adam with extrapolation from the past (Alg. 4) is different from Optimistic Adam (Daskalakis et al., 2018) (the moments are updated differently). Note that in the case of a two-player game (3), the previous convergence results can be generalized to gradient updates with a different step-size for each player by simply rescaling the objectives LG{\mathcal{L}}_{G} and LD{\mathcal{L}}_{D} by a different scaling factor. A detailed pseudo-code for Adam with extrapolation step (Extra-Adam) is given in Algorithm 4. Note that our interest regarding this algorithm is practical and that we do not provide any convergence proof.

Related Work

The extragradient method is a standard algorithm to optimize variational inequalities. This algorithm has been originally introduced by Korpelevich (1976) and extended by Nesterov (2007) and Nemirovski (2004). Stochastic versions of the extragradient have been recently analyzed (Juditsky et al., 2011; Yousefian et al., 2014; Iusem et al., 2017) for stochastic variational inequalities with bounded constraints. A linearly convergent variance reduced version of the stochastic gradient method has been proposed by Palaniappan and Bach (2016) for strongly monotone variational inequalities. Extrapolation can also be related to optimistic methods (Chiang et al., 2012; Rakhlin and Sridharan, 2013) proposed in the online learning literature (see more details in §3.3). Interesting non-convex results were proved, for a new notion of regret minimization, by Hazan et al. (2017) and in the context of online learning for GANs by Grnarova et al. (2018).

Several methods to stabilize GANs consist in transforming a zero-sum formulation into a more general game that can no longer be cast as a saddle point problem. This is the case of the non-saturating formulation of GANs (Goodfellow et al., 2014; Fedus et al., 2018), the DCGANs (Radford et al., 2016), the gradient penaltyThe gradient penalty is only added to the discriminator cost function. Since this gradient penalty depends also on the generator, WGAN-GP cannot be cast as a SP problem and is actually a non-zero sum game. for WGANs (Gulrajani et al., 2017). Yadav et al. (2018) propose an optimization method for GANs based on AltSGD using an additional momentum-based step on the generator. Daskalakis et al. (2018) proposed a method inspired from game theory. Li et al. (2017) suggest to dualize the GAN objective to reformulate it as a maximization problem and Mescheder et al. (2017) propose to add the norm of the gradient in the objective to get a better signal. Gidel et al. (2019) analyzed a generalization of the bilinear example (9) with a focus put on the effect of momentum on this problem. They do not consider extrapolation (see §B.3 for more details). Unrolling steps (Metz et al., 2017) can be confused with extrapolation but is fundamentally different: the perspective is to try to approximate the “true generator objective function" unrolling for KK steps the updates of the discriminator and then updating the generator.

Regarding the averaging technique, some recent work appear to have already successfully used geometric averaging (7) for GANs in practice, but only briefly mention it (Karras et al., 2018; Mescheder et al., 2018). By contrast, the present work formally motivates and justifies the use of averaging for GANs by relating them to the VIP perspective, and sheds light on its underlying intuitions in §3.1. Subsequent to our first preprint, Yazıcı et al. (2019) explored averaging empirically in more depth, while Mertikopoulos et al. (2019) also investigated extrapolation, providing asymptotic convergence results (i.e. without any rate of convergence) in the context of coherent saddle point. The coherence assumption is slightly weaker than monotonicity.

Experiments

Our goal in this experimental section is not to provide new state-of-the art results with architectural improvements or a new GAN formulation, but to show that using the techniques (with theoretical guarantees in the monotone case) that we introduced earlier allows us to optimize standard GANs in a better way. These techniques, which are orthogonal to the design of new formulations of GAN optimization objectives, and to architectural choices, can potentially be used for the training of any type of GAN. We will compare the following optimization algorithms: baselines are SGD and Adam using either simultaneous updates on the generator and on the discriminator (denoted SimAdam and SimSGD) or kk updates on the discriminator alternating with 1 update on the generator (denoted AltSGD{k}\{k\} and AltAdam{k}\{k\}).In the original WGAN paper (Arjovsky et al., 2017), the authors use k=5k=5. Variants that use extrapolation are denoted ExtraSGD (Alg. 2) and ExtraAdam (Alg. 4). Variants using extrapolation from the past are PastExtraSGD (Alg. 3) and PastExtraAdam (Alg. 4). We also present results using as output the averaged iterates, adding Avg as a prefix of the algorithm name when we use (uniform) averaging.

We first test the various stochastic algorithms on a simple (n=103,d=103n=10^{3},d=10^{3}) finite sum bilinear objective (a monotone operator) constrained to d^{d}:

where aˉ:=1n∑i=1na(i)\bar{\bm{a}}\mathrel{\mathop{\ordinarycolon}}=\frac{1}{n}\sum_{i=1}^{n}\bm{a}^{(i)}, bˉ:=1n∑i=1nb(i)\bar{\bm{b}}\mathrel{\mathop{\ordinarycolon}}=\frac{1}{n}\sum_{i=1}^{n}\bm{b}^{(i)} and Mˉ:=1n∑i=1nM(i)\bar{\bm{M}}\mathrel{\mathop{\ordinarycolon}}=\frac{1}{n}\sum_{i=1}^{n}\bm{M}^{(i)}. The matrices Mkj(i), ak(i),\bm{M}^{(i)}_{kj},\,\bm{a}^{(i)}_{k}, bk(i) ;\bm{b}^{(i)}_{k}\,; 1≤i≤n1\leq i\leq n, 1≤j,k≤d1\leq j,k\leq d were randomly generated, but ensuring that (θ∗,φ∗)({\bm{\theta}}^{*},{\bm{\varphi}}^{*}) belongs to d^{d}. Results are shown in Fig. 3. We can see that AvgAltSGD1 and AvgPastExtraSGD perform the best on this task.

2 WGAN and WGAN-GP on CIFAR10

We evaluate the proposed techniques in the context of GAN training, which is a challenging stochastic optimization problem where the objectives of both players are non-convex. We propose to evaluate the Adam variants of the different optimization algorithms (see Alg. 4 for Adam with extrapolation) by training two different architectures on the CIFAR10 dataset (Krizhevsky and Hinton, 2009). First, we consider a constrained zero-sum game by training the DCGAN architecture (Radford et al., 2016) with the WGAN objective and weight clipping as proposed by Arjovsky et al. (2017). Then, we compare the different methods on a state-of-the-art architecture by training a ResNet with the WGAN-GP objective similar to Gulrajani et al. (2017). Models are evaluated using the inception score (IS) (Salimans et al., 2016) computed on 50,000 samples. We also provide the FID (Heusel et al., 2017) and the details on the ResNet architecture in §G.3.

For each algorithm, we did an extensive search over the hyperparameters of Adam. We fixed β1=0.5\beta_{1}=0.5 and β2=0.9\beta_{2}=0.9 for all methods as they seemed to perform well. We note that as proposed by Heusel et al. (2017), it is quite important to set different learning rates for the generator and discriminator. Experiments were run with 5 random seeds for 500,000 updates of the generator.

Tab. 1 reports the best IS achieved on these problems by each considered method. We see that the techniques of extrapolation and averaging consistently enable improvements over the baselines (see §G.5 for more experiments on averaging). Fig. 4 shows training curves for each method (for their best performing learning rate), as well as samples from a ResNet generator trained with ExtraAdam on a WGAN-GP objective. For both tasks, using an extrapolation step and averaging with Adam (ExtraAdam) outperformed all other methods. Combining ExtraAdam with averaging yields results that improve significantly over the previous state-of-the-art IS (8.2) and FID (21.7) on CIFAR10 as reported by Miyato et al. (2018) (see Tab. 5 for FID). We also observed that methods based on extrapolation are less sensitive to learning rate tuning and can be used with higher learning rates with less degradation; see §G.4 for more details.

Conclusion

We newly addressed GAN objectives in the framework of variational inequality. We tapped into the optimization literature to provide more principled techniques to optimize such games. We leveraged these techniques to develop practical optimization algorithms suitable for a wide range of GAN training objectives (including non-zero sum games and projections onto constraints). We experimentally verified that this could yield better trained models, improving the previous state of the art. The presented techniques address a fundamental problem in GAN training in a principled way, and are orthogonal to the design of new GAN architectures and objectives. They are thus likely to be widely applicable, and benefit future development of GANs.

This research was partially supported by the Canada CIFAR AI Chair Program, the Canada Excellence Research Chair in “Data Science for Realtime Decision-making”, by the NSERC Discovery Grant RGPIN-2017-06936 and by a Google Focused Research award. Gauthier Gidel would like to acknowledge Benoît Joly and Florestan Martin-Baillon for bringing a fresh point of view on the proof of Proposition 1.

References

Appendix A Definitions

In this section, we recall usual definitions and lemmas from convex analysis. We start with the definitions and lemmas regarding the projection mapping.

The projection PΩP_{\Omega} onto Ω\Omega is defined as,

When Ω\Omega is a convex set, this projection is unique. This is a consequence of the following lemma that we will use in the following sections: the non-expansiveness of the projection onto a convex set.

This is standard convex analysis result which can be found for instance in [Boyd and Vandenberghe, 2004]. The following lemma is also standard in convex analysis and its proof uses similar arguments as the proof of Lemma 1.

Let ω∈Ω{\bm{\omega}}\in\Omega and ω+=defPΩ(ω+u){\bm{\omega}}^{+}\stackrel{{\scriptstyle\text{def}}}{{=}}P_{\Omega}({\bm{\omega}}+{\bm{u}}), then for all ω′∈Ω{\bm{\omega}}^{\prime}\in\Omega we have,

Then since ω+{\bm{\omega}}^{+} is the projection onto the convex set Ω\Omega of ω+u{\bm{\omega}}+{\bm{u}}, we have that (ω+−(ω+u))⊤(ω+−ω′)≤0 ,  ∀ ω′∈Ω({\bm{\omega}}^{+}-({\bm{\omega}}+{\bm{u}}))^{\top}({\bm{\omega}}^{+}-{\bm{\omega}}^{\prime})\leq 0\,,\;\forall\,{\bm{\omega}}^{\prime}\in\Omega, leading to the result of the Lemma. ∎

A.2 Smoothness and Monotonicity of the operator

Another important property used is the Lipschitzness of an operator.

In this paper, we also use the notion of strong monotonicity, which is a generalization for operators of the notion of strong convexity. Let us first recall the definition of the latter,

A function (θ,φ)↦L(θ,φ)({\bm{\theta}},{\bm{\varphi}})\mapsto{\mathcal{L}}({\bm{\theta}},{\bm{\varphi}}) is said convex-concave if L(⋅,φ){\mathcal{L}}(\cdot,{\bm{\varphi}}) is convex for all φ∈Φ{\bm{\varphi}}\in\Phi and L(θ,⋅){\mathcal{L}}({\bm{\theta}},\cdot) is concave for all θ∈Θ{\bm{\theta}}\in\Theta. An L{\mathcal{L}} is said to be μ\mu-strongly convex-concave if (θ,φ)↦L(θ,φ)−μ2∥θ∥22+μ2∥φ∥22({\bm{\theta}},{\bm{\varphi}})\mapsto{\mathcal{L}}({\bm{\theta}},{\bm{\varphi}})-\frac{\mu}{2}\|{\bm{\theta}}\|_{2}^{2}+\frac{\mu}{2}\|{\bm{\varphi}}\|_{2}^{2} is convex-concave.

If a function ff (resp. L{\mathcal{L}}) is strongly convex (resp. strongly convex-concave), its gradient ∇f\nabla f (resp. [∇θL  − ⁣ ⁣∇φL]⊤[\nabla_{\bm{\theta}}{\mathcal{L}}\;-\!\!\nabla_{\bm{\varphi}}{\mathcal{L}}]^{\top}) is strongly monotone, i.e.,

Appendix B Gradient methods on unconstrained bilinear games

In this section, we will prove the results provided in §3, namely Proposition 1, Proposition 2 and Theorem 1. For Proposition 1 and 2, let us recall the context. We wanted to derive properties of some gradient methods on the following simple illustrative example

The simultaneous iterates diverge geometrically and the alternating iterates defined in (11) are bounded but do not converge to 0 as

where ut=Θ(vt)⇔∃α,β,t0>0 such that ∀t≥t0,αvt≤ut≤βvtu_{t}=\Theta(v_{t})\Leftrightarrow\exists\alpha,\beta,t_{0}>0\text{ such that }\forall t\geq t_{0},\alpha v_{t}\leq u_{t}\leq\beta v_{t}.

The uniform average (θˉt,ϕˉt)=def1t∑s=0t−1(θs,ϕs)(\bar{\theta}_{t},\bar{\phi}_{t})\stackrel{{\scriptstyle\text{def}}}{{=}}\frac{1}{t}\sum_{s=0}^{t-1}(\theta_{s},\phi_{s}) of the simultaneous updates (resp. the alternating updates) diverges (resp. converges to 0) as,

Let us start with the simultaneous update rule:

Summing (45) for 0≤t≤T−10\leq t\leq T-1 to get telescoping sums, we get

Let us continue with the alternating update rule

By simple linear algebra, for η<2\eta<2, the matrix M=def[1−ηη1−η2]M\stackrel{{\scriptstyle\text{def}}}{{=}}\begin{bmatrix}1&-\eta\\ \eta&1-\eta^{2}\end{bmatrix} has two complex conjugate eigenvalues which are

and their squared magnitude is equal to det⁡(M)=1−η2+η2=1\det(M)=1-\eta^{2}+\eta^{2}=1. We can diagonalize MM meaning that there exists PP an invertible matrix such that M=P−1diag⁡(λ+,λ−)PM=P^{-1}\operatorname{\bm{diag}}(\lambda_{+},\lambda_{-})P. Then, we have

Hence, if θ02+ϕ02>0\theta_{0}^{2}+\phi_{0}^{2}>0, the sequence (θt,ϕt)(\theta_{t},\phi_{t}) is bounded but do not converge to 0. Moreover the update rule gives us,

Consequently, since θt2+ϕt2=Θ(θ02+ϕ02)\theta_{t}^{2}+\phi_{t}^{2}=\Theta(\theta_{0}^{2}+\phi_{0}^{2}),

B.2 Implicit and extrapolation method

In this section, we will prove a slightly more precise proposition than Proposition 2,

The squared norm of the iterates Nt2=defθt2+ϕt2N_{t}^{2}\stackrel{{\scriptstyle\text{def}}}{{=}}\theta_{t}^{2}+\phi_{t}^{2}, where the update rule of θt\theta_{t} and ϕt\phi_{t} is defined in (18), decrease geometrically for any 0<η<10<\eta<1 as,Note that the relationship (57) holds actually for any η\eta for the implicit method, and thus the decrease is geometric for any non-zero step size.

Let us recall the update rule for the implicit method

For the extrapolation method, we have the update rule

B.3 Generalization to general unconstrained bilinear objective

In this section, we will show how to simply extend the study of the algorithm of interest provided in §3 on the general unconstrained bilinear example,

where c:=−θ∗⊤Aφ∗c\mathrel{\mathop{\ordinarycolon}}=-{\bm{\theta}}^{*\top}{\bm{A}}{\bm{\varphi}}^{*} is a constant that does not depend on θ{\bm{\theta}} and φ{\bm{\varphi}}.

First, let us show that we can reduce the study of simultaneous, alternating, extrapolation and implicit updates rules for (66) to the study of the respective unidimensional updates (11) and (18).

This reduction has already been proposed by Gidel et al. . For completeness, we reproduce here similar arguments. The following lemma is a bit more general than the result provided by Gidel et al. . It states that the study of a wide class of unconstrained first order method on (66) can be reduced to the study of the method on (39), with potentially rescaled step-sizes.

Before explicitly stating the lemma, we need to introduce a bit of notation to encompass easily our several methods in a unified way. First, we let ωt:=(θt,φt){\bm{\omega}}_{t}\mathrel{\mathop{\ordinarycolon}}=({\bm{\theta}}_{t},{\bm{\varphi}}_{t}), where the index tt here is a more general index which can vary more often than the one in §3. For example, for the extrapolation method, we could consider ω1=ω0+1/2′{\bm{\omega}}_{1}={\bm{\omega}}^{\prime}_{0+1/2} and ω2=ω1′{\bm{\omega}}_{2}={\bm{\omega}}^{\prime}_{1}, where ω′{\bm{\omega}}^{\prime} was the sequence defined for the extragradient. For the alternated updates, we can consider ω1=(θ1′,φ0′){\bm{\omega}}_{1}=({\bm{\theta}}^{\prime}_{1},{\bm{\varphi}}^{\prime}_{0}) and ω2=(θ1′,φ1′){\bm{\omega}}_{2}=({\bm{\theta}}^{\prime}_{1},{\bm{\varphi}}^{\prime}_{1}) (this also defines θ2=θ1′{\bm{\theta}}_{2}={\bm{\theta}}^{\prime}_{1}), where θ′{\bm{\theta}}^{\prime} and φ′{\bm{\varphi}}^{\prime} were the sequences originally defined for alternated updates. We are thus ready to state the lemma.

Let us consider the following very general class of first order methods on (66), i.e.,

where ωt:=(θt,φt){\bm{\omega}}_{t}\mathrel{\mathop{\ordinarycolon}}=({\bm{\theta}}_{t},{\bm{\varphi}}_{t}) and Fθ(ωt):=Aφt−bF_{\bm{\theta}}({\bm{\omega}}_{t})\mathrel{\mathop{\ordinarycolon}}={\bm{A}}{\bm{\varphi}}_{t}-{\bm{b}}, Fφ(ωt)=A⊤θt−cF_{\bm{\varphi}}({\bm{\omega}}_{t})={\bm{A}}^{\top}{\bm{\theta}}_{t}-{\bm{c}}. Then, we have

Our general class of first order methods can be written with the following update rules:

Thus, using the SVD of A=UDV⊤{\bm{A}}={\bm{U}}{\bm{D}}{\bm{V}}^{\top}, we get

where σ1≥…≥σr>0\sigma_{1}\geq\ldots\geq\sigma_{r}>0 are the positive diagonal coefficients of D{\bm{D}}.

Note that the only additional restriction is that the coefficients (λst)(\lambda_{st}) and (σst)(\sigma_{st}) (that are the same for 1≤i≤r1\leq i\leq r) are rescaled by the singular values of A{\bm{A}}. In practice, for our methods of interest with a step-size η\eta, it corresponds to the study of rr unidimensional problem with a respective step-size σiη , 1≤i≤r\sigma_{i}\eta\,,\,1\leq i\leq r. ∎

From this lemma, an extension of Proposition 1 and 2 directly follows to the general unconstrained bilinear objective (66). We note

where (Θ∗,Φ∗)(\Theta^{*},\Phi^{*}) is the set of solutions of (66). The following corollary is divided in two points, the first point is a result from Gidel et al. (note that the result on the average is a straightforward extension of the one provided in Proposition 1 and was not provided by Gidel et al. ), the second result is new. Very similar asymptotic upper bounds regarding extrapolation and implicit methods can be derived by Tseng computing the exact values of the constant τ1\tau_{1} and τ2\tau_{2} (and noticing that τ3=∞\tau_{3}=\infty) introduced in [Tseng, 1995, Eq. 3 & 4] for the unconstrained bilinear case. However, since Tseng works in a very general setting, the bound are not as tight as ours and his proof technique is a bit more technical. Our reduction above provides here a simple proof for our simple setting.

Gidel et al. : The simultaneous iterates diverge geometrically and the alternating iterates are bounded but do not converge to 0 as,

where ut=Θ(vt)⇔∃α,β,t0>0 such that ∀t≥t0, αvt≤ut≤βvtu_{t}=\Theta(v_{t})\Leftrightarrow\exists\alpha,\beta,t_{0}>0\text{ such that }\forall t\geq t_{0},\,\alpha v_{t}\leq u_{t}\leq\beta v_{t}. The uniform average (θˉt,ϕˉt)=def1t∑s=0t−1(θs,ϕs)(\bar{\theta}_{t},\bar{\phi}_{t})\stackrel{{\scriptstyle\text{def}}}{{=}}\frac{1}{t}\sum_{s=0}^{t-1}(\theta_{s},\phi_{s}) of the simultaneous updates (resp. the alternating updates) diverges (resp. converges to 0) as,

Extrapolation and Implicit method: The iterates respectively generated by the update rules (14) and (17) on a bilinear unconstrained problem (66) do converge linearly for any 0<η<1σmax⁡(A)0<\eta<\frac{1}{\sigma_{\max}({\bm{A}})} at a rate,As before, the inequality (76) for the implicit scheme is actually valid for any step-size.

Particularly, for η=12σmax⁡(A)\eta=\frac{1}{2\sigma_{\max}({\bm{A}})} we get for the extrapolation method,

where κ:=σmax⁡(A)2σmin⁡(A)2\kappa\mathrel{\mathop{\ordinarycolon}}=\frac{\sigma_{\max}({\bm{A}})^{2}}{\sigma_{\min}({\bm{A}})^{2}} is the condition number of A⊤A{\bm{A}}^{\top}{\bm{A}}.

B.4 Extrapolation from the past for strongly convex objectives

Let us recall what we call projected extrapolation form the past, where we used the notation ωt′=ωt+1/2{\bm{\omega}}_{t}^{\prime}={\bm{\omega}}_{t+1/2} for compactness,

If FF is strongly monotone, we can prove the following theorem:

If FF is μ\mu-strongly monotone (see §A for the definition of strong monotonicity) and LL-Lipschitz, then the updates (20) and (21) with η=14L\eta=\frac{1}{4L} provide linearly converging iterates,

In order to prove this theorem, we will prove a slightly more general result,

with the convention that ω0′=ω−1′=ω−2′{\bm{\omega}}^{\prime}_{0}={\bm{\omega}}^{\prime}_{-1}={\bm{\omega}}^{\prime}_{-2}. It implies that

Let us first proof three technical lemmas.

If FF is μ\mu-strongly monotone, we have

By strong monotonicity and optimality of ω∗{\bm{\omega}}^{*},

and then we use the inequality 2∥ωt′−ω∗∥22≥∥ωt−ω∗∥22−2∥ωt′−ωt∥222\|{\bm{\omega}}^{\prime}_{t}-{\bm{\omega}}^{*}\|_{2}^{2}\geq\|{\bm{\omega}}_{t}-{\bm{\omega}}^{*}\|_{2}^{2}-2\|{\bm{\omega}}^{\prime}_{t}-{\bm{\omega}}_{t}\|_{2}^{2} to get the result claimed. ∎

If FF is LL-Lipschitz, we have for any ω∈Ω{\bm{\omega}}\in\Omega,

Applying Lemma 2 for (ω,u,ω+,ω′)=(ωt,−ηtF(ωt′),ωt+1,ω)({\bm{\omega}},{\bm{u}},{\bm{\omega}}^{+},{\bm{\omega}}^{\prime})=({\bm{\omega}}_{t},-\eta_{t}F({\bm{\omega}}^{\prime}_{t}),{\bm{\omega}}_{t+1},{\bm{\omega}}) and (ω,u,ω+,ω′)=(ωt,−ηtF(ωt−1′),ωt′,ωt+1)({\bm{\omega}},{\bm{u}},{\bm{\omega}}^{+},{\bm{\omega}}^{\prime})=({\bm{\omega}}_{t},-\eta_{t}F({\bm{\omega}}^{\prime}_{t-1}),{\bm{\omega}}^{\prime}_{t},{\bm{\omega}}_{t+1}), we get,

Then, we can use the Young’s inequality 2a⊤b≤∥a∥22+∥b∥222a^{\top}b\leq\|a\|_{2}^{2}+\|b\|_{2}^{2} to get,

For all t≥0t\geq 0, if we set ω−2′=ω−1′=ω0′{\bm{\omega}}^{\prime}_{-2}={\bm{\omega}}^{\prime}_{-1}={\bm{\omega}}^{\prime}_{0} we have

We start with ∥a+b∥22≤2∥a∥2+2∥b∥2\|a+b\|_{2}^{2}\leq 2\|a\|^{2}+2\|b\|^{2}.

Moreover, since the projection is contractive we have that

Let ω∗∈Ω∗{\bm{\omega}}^{*}\in\Omega^{*} be an optimal point of (VIP). Combining Lemma 4 and Lemma 5 we get,

Now with ηt=14L≤14μ\eta_{t}=\frac{1}{4L}\leq\frac{1}{4\mu} we get,

Hence, using the fact that μ4L≤14\frac{\mu}{4L}\leq\frac{1}{4} we get,

Appendix C More on merit functions

In this section, we will present how to handle an unbounded constraint set Ω\Omega with a more refined merit function than (25) used in the main paper. Let FF be the continuous operator and Ω\Omega be the constraint set associated with the VIP,

When the operator FF is monotone, we have that F(ω∗)⊤(ω−ω∗)≤F(ω)⊤(ω−ω∗) ,  ∀ω,ω∗F({\bm{\omega}}^{*})^{\top}({\bm{\omega}}-{\bm{\omega}}^{*})\leq F({\bm{\omega}})^{\top}({\bm{\omega}}-{\bm{\omega}}^{*})\,,\;\forall{\bm{\omega}},{\bm{\omega}}^{*}. Hence, in this case (VIP) implies a stronger formulation sometimes called Minty variational inequality [Crespi et al., 2005]:

This function acts as merit function for (VIP) on the interior of the open ball of radius RR around ω0{\bm{\omega}}_{0}, as shown in Lemma 1 of Nesterov . That is, let ΩR=defΩ∩{ω:∥ω−ω0∥<R}\Omega_{R}\stackrel{{\scriptstyle\text{def}}}{{=}}\Omega\cap\{{\bm{\omega}}\mathrel{\mathop{\ordinarycolon}}{\|{\bm{\omega}}-{\bm{\omega}}_{0}\|<R}\}. Then for any point ω^∈ΩR\hat{\bm{\omega}}\in\Omega_{R}, we have:

The reference point ω0{\bm{\omega}}_{0} is arbitrary, but in practice it is usually the initialization point of the algorithm. RR has to be big enough to ensure that ΩR\Omega_{R} contains a solution. Err⁡R\operatorname{Err}_{R} measures how much (MVI) is violated on the restriction ΩR\Omega_{R}. Such merit function is standard in the variational inequality literature. A similar one is used in [Nemirovski, 2004, Juditsky et al., 2011]. When FF is derived from the gradients (5) of a zero-sum game, we can define a more interpretable merit function. One has to be careful though when extending properties from the minimization setting to the saddle point setting (e.g. the merit function used by Yadav et al. is vacuous for a bilinear game as explained in App C.2).

In the appendix, we adopt a set of assumptions a little more general than the one in the main paper:

FF is monotone and Ω\Omega is convex and closed.

RR is set big enough such that R>∥ω0−ω∗∥R>\|{\bm{\omega}}_{0}-{\bm{\omega}}^{*}\| and FF is a monotone operator.

Contrary to Assumption 3, in Assumption 4 the constraint set in no longer assumed to be bounded. Assumption 4 is implied by Assumption 3 by setting RR to the diameter of Ω\Omega, and is thus more general.

In this appendix, we will note Err⁡R(VI)\operatorname{Err}_{R}^{(\textup{VI})} the restricted merit function defined in (105). Let us recall its definition,

When the objective is a saddle point problem i.e.,

and L{\mathcal{L}} is convex-concave (see Definition 4 in §A), we can use another merit function than (107) on ΩR\Omega_{R} that is more interpretable and more directly related to the cost function of the minimax formulation:

In particular, if the equilibrium (θ∗,φ∗)∈Ω∗∩ΩR({\bm{\theta}}^{*},{\bm{\varphi}}^{*})\in\Omega^{*}\cap\Omega_{R} and we have that L(⋅,φ∗){\mathcal{L}}(\cdot,{\bm{\varphi}}^{*}) and −L(θ∗,⋅)-{\mathcal{L}}({\bm{\theta}}^{*},\cdot) are μ\mu-strongly convex (see §A), then the merit function for saddle points upper bounds the distance for (θ,φ)∈ΩR({\bm{\theta}},{\bm{\varphi}})\in\Omega_{R} to the equilibrium as:

In the appendix, we provide our convergence results with the merit functions (107) and (109), depending on the setup:

C.2 On the importance of the merit function

In this section, we illustrate the fact that one has to be careful when extending results and properties from the minimization setting to the minimax setting (and consequently to the variational inequality setting). Another candidate as a merit function for saddle point optimization would be to naturally extend the suboptimality f(ω)−f(ω∗)f({\bm{\omega}})-f({\bm{\omega}}^{*}) used in standard minimization (i.e. find ω∗{\bm{\omega}}^{*} the minimizer of ff) to the gap P(θ,φ)=L(θ,φ∗)−L(θ∗,φ)P({\bm{\theta}},{\bm{\varphi}})={\mathcal{L}}({\bm{\theta}},{\bm{\varphi}}^{*})-{\mathcal{L}}({\bm{\theta}}^{*},{\bm{\varphi}}). In a previous analysis of a modification of the stochastic gradient descent (SGD) method for GANs, Yadav et al. gave their convergence rate on PP that they called the “primal-dual“ gap. Unfortunately, if we do not assume that the function L{\mathcal{L}} is strongly convex-concave (a stronger assumption defined in §A and which fails for bilinear objective e.g.), PP may not be a merit function. It can be 0 for a non optimal point, see for instance the discussion on the differences between (109) and PP in [Gidel et al., 2017, Section 3]. In particular, for the simple 2D bilinear example L(θ,φ)=θ⋅φ{\mathcal{L}}({\bm{\theta}},{\bm{\varphi}})={\bm{\theta}}\cdot{\bm{\varphi}}, we have that θ∗=φ∗=0{\bm{\theta}}^{*}={\bm{\varphi}}^{*}=0 and thus P(θ,φ)=0     ∀θ,φ P({\bm{\theta}},{\bm{\varphi}})=0\,\;\;\forall{\bm{\theta}},{\bm{\varphi}}\,.

C.3 Variational inequalities for non-convex cost functions

When the cost functions defined in (3) are non-convex, the operator FF is no longer monotone. Nevertheless, (VIP) and (MVI) can still be defined, though a solution to (MVI) is less likely to exist. We note that (VIP) is a local condition for FF (as only evaluating FF at the points ω∗{\bm{\omega}}^{*}). On the other hand, an appealing property of (MVI) is that it is a global condition. In the context of minimization of a function ff for example (where F=∇fF=\nabla f), if ω∗{\bm{\omega}}^{*} solves (MVI) then ω∗{\bm{\omega}}^{*} is a global minimum of ff (and not just a stationary point for the solution of (MVI); see Proposition 2.2 from Crespi et al. ).

A less restrictive way to consider variational inequalities in the non-monotone setting is to use a local version of (MVI). If the cost functions are locally convex around the optimal couple (θ∗,φ∗)({\bm{\theta}}^{*},{\bm{\varphi}}^{*}) and if our iterates eventually fall and stay into that neighborhood, then we can consider our restricted merit function Err⁡R(⋅)\operatorname{Err}_{R}(\cdot) with a well suited constant RR and apply our convergence results for monotone operators.

Appendix D Another way of implementing extrapolation to SGD

We now introduce another way to combine extrapolation and SGD. This extension is very similar to AvgExtraSGD Alg. 2, the only difference is that it re-uses the mini-batch sample of the extrapolation step for the update of the current point. The intuition is that it correlates the estimator of the gradient of the extrapolation step and the one of the update step leading to a better correction of the oscillations which are also due to the stochasticity. One emerging issue (for the analysis) of this method is that since ωt′{\bm{\omega}}^{\prime}_{t} depend on ξt\xi_{t}, the quantity F(ωt′,ξt)F({\bm{\omega}}^{\prime}_{t},\xi_{t}) is a biased estimator of F(ωt′)F({\bm{\omega}}^{\prime}_{t}).

Assume that ∥ωt′−ω0∥≤R, ∀t≥0\|{\bm{\omega}}^{\prime}_{t}-{\bm{\omega}}_{0}\|\leq R,\,\forall t\geq 0 where (ωt′)t≥0({\bm{\omega}}^{\prime}_{t})_{t\geq 0} are the iterates of Alg. 5. Under Assumption 1 and 4, for any T≥1T\geq 1, Alg. 5 with constant step-size η≤12L\eta\leq\frac{1}{\sqrt{2}L} has the following convergence properties:

The assumption that the sequence of the iterates provided by the algorithm is bounded is strong, but has also been made for instance in [Yadav et al., 2018]. The proof of this result is provided in §F.

Appendix E Variance comparison between AvgSGD and SGD with prediction method

To compare the variance term of AvgSGD in (26) with the one of the SGD with prediction method [Yadav et al., 2018], we need to have the same convergence certificate. Fortunately, their proof can be adapted to our convergence criterion (using Lemma 7 in §F), revealing an extra σ2/2\sigma^{2}/2 in the variance term from their paper. The resulting variance can be summarized with our notation as (M2(1+L)+σ2)/2(M^{2}(1+L)+\sigma^{2})/2 where the LL is the Lipschitz constant of the operator FF. Since M≫σM\gg\sigma, their variance term is then 1+L1+L time larger than the one provided by the AvgSGD method.

Appendix F Proof of Theorems

This section is dedicated on the proof of the theorems provided in this paper in a slightly more general form working with the merit function defined in (111). First we prove an additional lemma necessary to the proof of our theorems.

Let FF be a monotone operator and let (ωt),(ωt′),(zt),(Δt),(ξt)({\bm{\omega}}_{t}),({\bm{\omega}}^{\prime}_{t}),({\bm{z}}_{t}),(\Delta_{t}),(\xi_{t}) and (ζt)(\zeta_{t}) be six random sequences such that, for all t≥0t\geq 0

where ωˉT=def∑t=0T−1ηtωt′/ST\bar{\bm{\omega}}_{T}\stackrel{{\scriptstyle\text{def}}}{{=}}\sum_{t=0}^{T-1}\eta_{t}{\bm{\omega}}^{\prime}_{t}/S_{T} and ST=def∑t=0T−1ηtS_{T}\stackrel{{\scriptstyle\text{def}}}{{=}}\sum_{t=0}^{T-1}\eta_{t}.

We will then upper bound each sum in the right-hand side,

where ut+1=defPΩ(ut−ηtΔt){\bm{u}}_{t+1}\stackrel{{\scriptstyle\text{def}}}{{=}}P_{\Omega}({\bm{u}}_{t}-\eta_{t}\Delta_{t}) and u0=defω0{\bm{u}}_{0}\stackrel{{\scriptstyle\text{def}}}{{=}}{\bm{\omega}}_{0}. Then,

Then noticing that z0=defω0{\bm{z}}_{0}\stackrel{{\scriptstyle\text{def}}}{{=}}{\bm{\omega}}_{0}, back to (F) we get a telescoping sum,

If FF is the operator of a convex-concave saddle point (5), we get, with ωt′=(θt,φt){\bm{\omega}}^{\prime}_{t}=({\bm{\theta}}_{t},{\bm{\varphi}}_{t})

then by convexity of L(⋅,φ){\mathcal{L}}(\cdot,{\bm{\varphi}}) and concavity of L(θ,⋅){\mathcal{L}}({\bm{\theta}},\cdot), we have that,

Otherwise if the operator FF is just monotone since F(ωt′)⊤(ωt′−ω)≥F(ω′)⊤(ωt′−ω)F({\bm{\omega}}^{\prime}_{t})^{\top}({\bm{\omega}}^{\prime}_{t}-{\bm{\omega}})\geq F({\bm{\omega}}^{\prime})^{\top}({\bm{\omega}}^{\prime}_{t}-{\bm{\omega}}) we have that

In both cases, we can now maximize the left hand side respect to ω{\bm{\omega}} (since the RHS does not depend on ω{\bm{\omega}}) to get,

First let us state Theorem 2 in its general form,

Under Assumption 1, 2 and 4, Alg. 1 with constant step-size η\eta has the following convergence rate for all T≥1T\geq 1,

Let any ω∈Ω{\bm{\omega}}\in\Omega such that ∥ω0−ω∥2≤R\|{\bm{\omega}}_{0}-{\bm{\omega}}\|_{2}\leq R,

Then we can make appear the quantity F(ωt)⊤(ωt−ω)F({\bm{\omega}}_{t})^{\top}({\bm{\omega}}_{t}-{\bm{\omega}}) on the left-hand side,

we can sum (121) for 0≤t≤T−10\leq t\leq T-1 to get,

where we noted Δt=defF(ωt)−F(ωt,ξt)\Delta_{t}\stackrel{{\scriptstyle\text{def}}}{{=}}F({\bm{\omega}}_{t})-F({\bm{\omega}}_{t},\xi_{t}). By monotonicity, F(ωt)⊤(ωt−ω)≥F(ω)⊤(ωt−ω)F({\bm{\omega}}_{t})^{\top}({\bm{\omega}}_{t}-{\bm{\omega}})\geq F({\bm{\omega}})^{\top}({\bm{\omega}}_{t}-{\bm{\omega}}) we get,

where ST=def∑t=0T−1ηtS_{T}\stackrel{{\scriptstyle\text{def}}}{{=}}\sum_{t=0}^{T-1}\eta_{t} and ωˉT=def1ST∑t=0T−1ηtωt\bar{{\bm{\omega}}}_{T}\stackrel{{\scriptstyle\text{def}}}{{=}}\frac{1}{S_{T}}\sum_{t=0}^{T-1}\eta_{t}{\bm{\omega}}_{t}. We will then upper bound each sum in the right hand side,

where ut+1=defPΩ(ut−ηtΔt){\bm{u}}_{t+1}\stackrel{{\scriptstyle\text{def}}}{{=}}P_{\Omega}({\bm{u}}_{t}-\eta_{t}\Delta_{t}) and u0=ω0{\bm{u}}_{0}={\bm{\omega}}_{0}. Then,

Then noticing that u0=defω0{\bm{u}}_{0}\stackrel{{\scriptstyle\text{def}}}{{=}}{\bm{\omega}}_{0}, back to (123) we get a telescoping sum,

Then the right hand side does not depends on ω{\bm{\omega}}, we can maximize over ω{\bm{\omega}} to get,

particularly for ηt=η\eta_{t}=\eta and ηt=ηt+1\eta_{t}=\frac{\eta}{\sqrt{t+1}} we respectively get,

F.2 Proof of Thm. 3

Let any ω∈Ω{\bm{\omega}}\in\Omega such that ∥ω0−ω∥2≤R\|{\bm{\omega}}_{0}-{\bm{\omega}}\|_{2}\leq R. Then, the update rules become ωt+1=PΩ(ωt−ηtF(ωt′,ζt)){\bm{\omega}}_{t+1}=P_{\Omega}({\bm{\omega}}_{t}-\eta_{t}F({\bm{\omega}}^{\prime}_{t},\zeta_{t})) and ωt′=PΩ(ωt−ηF(ωt,ξt)){\bm{\omega}}^{\prime}_{t}=P_{\Omega}({\bm{\omega}}_{t}-\eta F({\bm{\omega}}_{t},\xi_{t})). We start by applying Lemma 2 for (ω,u,ω′,ω+)=(ωt,−ηF(ωt′,ζt),ω,ωt+1)({\bm{\omega}},{\bm{u}},{\bm{\omega}}^{\prime},{\bm{\omega}}^{+})=({\bm{\omega}}_{t},-\eta F({\bm{\omega}}^{\prime}_{t},\zeta_{t}),{\bm{\omega}},{\bm{\omega}}_{t+1}) and (ω,u,ω′,ω+)=(ωt,−ηtF(ωt,ξt),ωt+1,ωt′)({\bm{\omega}},{\bm{u}},{\bm{\omega}}^{\prime},{\bm{\omega}}^{+})=({\bm{\omega}}_{t},-\eta_{t}F({\bm{\omega}}_{t},\xi_{t}),{\bm{\omega}}_{t+1},{\bm{\omega}}^{\prime}_{t}),

Then with 2a⊤b≤∥a∥22+∥b∥222\bm{a}^{\top}\bm{b}\leq\|\bm{a}\|_{2}^{2}+\|\bm{b}\|^{2}_{2} we get

Using the inequality ∥a+b+c∥22≤3(∥a∥22+∥b∥22+∥c∥22)\|\bm{a}+\bm{b}+\bm{c}\|_{2}^{2}\leq 3(\|\bm{a}\|^{2}_{2}+\|\bm{b}\|_{2}^{2}+\|\bm{c}\|_{2}^{2}) we get,

Then we can use the LL-Lipschitzness of FF to get,

As we restricted the step-size to ηt≤13L\eta_{t}\leq\frac{1}{\sqrt{3}L} we get,

F.3 Proof of Thm. 4

We have for any ω∈Ω{\bm{\omega}}\in\Omega,

Applying Lemma 2 for (ω,u,ω+,ω′)=(ωt,−ηtF(ωt′,ξt),ωt+1,ω)({\bm{\omega}},{\bm{u}},{\bm{\omega}}^{+},{\bm{\omega}}^{\prime})=({\bm{\omega}}_{t},-\eta_{t}F({\bm{\omega}}^{\prime}_{t},\xi_{t}),{\bm{\omega}}_{t+1},{\bm{\omega}}) and (ω,u,ω+,ω′)=(ωt,−ηtF(ωt−1′,ξt−1),ωt′,ωt+1)({\bm{\omega}},{\bm{u}},{\bm{\omega}}^{+},{\bm{\omega}}^{\prime})=({\bm{\omega}}_{t},-\eta_{t}F({\bm{\omega}}^{\prime}_{t-1},\xi_{t-1}),{\bm{\omega}}^{\prime}_{t},{\bm{\omega}}_{t+1}), we get,

Then, we can use the inequality of arithmetic and geometric means 2a⊤b≤∥a∥22+∥b∥222a^{\top}b\leq\|a\|_{2}^{2}+\|b\|_{2}^{2} to get,

Using the inequality ∥a+b+c∥22≤3(∥a∥22+∥b∥22+∥c∥22)\|\bm{a}+\bm{b}+\bm{c}\|_{2}^{2}\leq 3(\|\bm{a}\|^{2}_{2}+\|\bm{b}\|_{2}^{2}+\|\bm{c}\|_{2}^{2}) we get,

where we used the LL-Lipschitzness of FF for the last inequality.

For all t≥0t\geq 0, if we set ω−2′=ω−1′=ω0′{\bm{\omega}}^{\prime}_{-2}={\bm{\omega}}^{\prime}_{-1}={\bm{\omega}}^{\prime}_{0} we have

We start with ∥a+b∥22≤2∥a∥2+2∥b∥2\|a+b\|_{2}^{2}\leq 2\|a\|^{2}+2\|b\|^{2}.

Moreover, since the projection is contractive we have that

where in the last line we used the same inequality as in (145). Combining (147) and (151) we get,

Then for ηt≤123L\eta_{t}\leq\frac{1}{2\sqrt{3}L} we have 36ηt2ηt−12L4≤3ηt−12L236\eta_{t}^{2}\eta_{t-1}^{2}L^{4}\leq 3\eta_{t-1}^{2}L^{2},

F.4 Proof of Theorem 5

Theorem 5 has been introduced in §D. This theorem is about Algorithm 5 which consists in another way to implement extrapolation to SGD. Let us first restate this theorem,

Assume that ∥ωt′−ω0∥≤R, ∀t≥0\|{\bm{\omega}}^{\prime}_{t}-{\bm{\omega}}_{0}\|\leq R,\,\forall t\geq 0 where (ωt′)t≥0({\bm{\omega}}^{\prime}_{t})_{t\geq 0} are the iterates of Alg. 5. Under Assumption 1 and 4, for any T≥1T\geq 1, Alg. 5 with constant step-size η≤12L\eta\leq\frac{1}{\sqrt{2}L} has the following convergence properties:

Let any ω∈Ω{\bm{\omega}}\in\Omega such that ∥ω0−ω∥2≤R\|{\bm{\omega}}_{0}-{\bm{\omega}}\|_{2}\leq R. Then, the update rules become ωt+1=PΩ(ωt−ηtF(ωt′,ξt)){\bm{\omega}}_{t+1}=P_{\Omega}({\bm{\omega}}_{t}-\eta_{t}F({\bm{\omega}}^{\prime}_{t},\xi_{t})) and ωt′=PΩ(ωt−ηF(ωt,ξt)){\bm{\omega}}^{\prime}_{t}=P_{\Omega}({\bm{\omega}}_{t}-\eta F({\bm{\omega}}_{t},\xi_{t})). We start the same way as the proof of Thm. 3 by applying Lemma 2 for (ω,u,ω′,ω∗)=(ωt,−ηF(ωt′,ξt),ω,ωt+1)({\bm{\omega}},{\bm{u}},{\bm{\omega}}^{\prime},{\bm{\omega}}^{*})=({\bm{\omega}}_{t},-\eta F({\bm{\omega}}^{\prime}_{t},\xi_{t}),{\bm{\omega}},{\bm{\omega}}_{t+1}) and (ω,u,ω′,ω+)=(ωt,−ηtF(ωt,ξt),ωt+1,ωt′)({\bm{\omega}},{\bm{u}},{\bm{\omega}}^{\prime},{\bm{\omega}}^{+})=({\bm{\omega}}_{t},-\eta_{t}F({\bm{\omega}}_{t},\xi_{t}),{\bm{\omega}}_{t+1},{\bm{\omega}}^{\prime}_{t}),

Then with 2a⊤b≤∥a∥22+∥b∥222\bm{a}^{\top}\bm{b}\leq\|\bm{a}\|_{2}^{2}+\|\bm{b}\|^{2}_{2} we get

Then we add 2ηtF(ωt′)⊤(ωt′−ω)2\eta_{t}F({\bm{\omega}}^{\prime}_{t})^{\top}({\bm{\omega}}^{\prime}_{t}-{\bm{\omega}}) in both sides to get,

Here, unfortunately we cannot use Lemma 7 because F(ωt′,ξt)F({\bm{\omega}}^{\prime}_{t},\xi_{t}) is biased. We will then deal with the quantity A=(F(ωt′,ξt)−F(ω′))⊤(ωt′−ω)A=(F({\bm{\omega}}^{\prime}_{t},\xi_{t})-F({\bm{\omega}}^{\prime}))^{\top}({\bm{\omega}}^{\prime}_{t}-{\bm{\omega}}) . We have that,

Then using 2∥a∥∥b∥≤δ∥a∥22+1δ∥b∥222\|a\|\|b\|\leq\delta\|a\|_{2}^{2}+\frac{1}{\delta}\|b\|_{2}^{2}, for δ=4\delta=4,

If one assumes finally that ∥ωt′−ω0∥2≤R\|{\bm{\omega}}^{\prime}_{t}-{\bm{\omega}}_{0}\|_{2}\leq R (assumption of the theorem) and that ηt≤12L\eta_{t}\leq\frac{1}{2L} we get,

Appendix G Additional experimental results

We now consider a task similar to [Mescheder et al., 2018] where the discriminator is linear Dφ(ω)=φTωD_{\bm{\varphi}}({\bm{\omega}})={\bm{\varphi}}^{T}{\bm{\omega}}, the generator is a Dirac distribution at θ{\bm{\theta}}, qθ=δθq_{\bm{\theta}}=\delta_{\bm{\theta}} and the distribution we try to match is also a Dirac at ω∗{\bm{\omega}}^{*}, p=δω∗p=\delta_{{\bm{\omega}}^{*}}. The minimax formulation from Goodfellow et al. gives:

Note that as observed by Nagarajan and Kolter , this objective is concave-concave, making it hard to optimize. We compare the methods on this objective where we take ω∗=−2{\bm{\omega}}^{*}=-2, thus the position of the equilibrium is shifted towards the position (θ,φ)=(−2,0)({\bm{\theta}},{\bm{\varphi}})=(-2,0). The convergence and the gradient vector field are shown in Figure 5. We observe that depending on the initialization, some methods can fail to converge but extrapolation (18) seems to perform better than the other methods.

G.2 DCGAN with WGAN-GP objective

In addition to the results presented in section §7.2, we also trained the DCGAN architecture with the WGAN-GP objective. The results are shown in Table 3. The best results are achieved with uniform averaging of AltAdam5. However, its iterations require to update the discriminator 5 times for every generator update. With a small drop in best final score, ExtraAdam can train WGAN-GP significantly faster (see Fig. 6 right) as the discriminator and generator are updated only twice.

G.3 FID scores for ResNet architecture with WGAN-GP objective

In addition to the inception scores, we also computed the FID scores [Heusel et al., 2017] using 50,000 samples for the ResNet architecture with the WGAN-GP objective; the results are presented in Table 5. We see that the results and conclusions are similar to the one obtained from the inception scores, adding an extrapolation step as well as using Exponential Moving Average (EMA) consistently improves the FID scores. However, contrary to the results from the inception score, we observe that uniform averaging does not necessarily improve the performance of the methods. This could be due to the fact that the samples produced using uniform averaging are more blurry and FID is more sensitive to blurriness; see §G.3 for more details about the effects of uniform averaging.

G.4 Comparison of the methods with the same learning rate

In this section, we compare how the methods presented in §7 perform with the same step-size. We follow the same protocol as in the experimental section §7, we consider the DCGAN architecture with WGAN-GP experiment described in App §G.2. In Figure 7 we plot the inception score provided by each training method as a function of the number of generator updates. Note that these plots advantage AltAdam5 a bit because each iteration of this algorithm is a bit more costly (since it perform 5 discriminator updates for each generator update). Nevertheless, the goal of this experiment is not to show that AltAdam5 is faster but to show that ExtraAdam is less sensitive to the choice of learning rate and can be used with higher learning rates with less degradation.

In Figure 8, we compare the sample quality on the DCGAN architecture with the WGAN-GP objective of AltAdam5 and AvgExtraAdam for different step-sizes. We notice that for AvgExtraAdam, the sample quality does not significantly change whereas the sample quality of AltAdam5 seems to be really sensitive to step-size tunning.

We think that robustness to step-size tuning is a key property for an optimization algorithm in order to save as much time as possible to tune other hyperparameters of the learning procedure such as regularization.

G.5 Comparison of the methods with and without uniform averaging

In this section, we compare how uniform averaging affect the performance of the methods presented in §7. We follow the same protocol as in the experimental section §7, we consider the DCGAN architecture with the WGAN and weight clipping objective as well as the WGAN-GP objective. In Figure 9 and 10, we plot the inception score provided by each training method as a function of the number of generator updates with and without uniform averaging.

We notice that uniform averaging seems to improve the inception score, nevertheless it looks like the sample are a bit more blurry (see Figure 11). This is confirmed by our result (Figure 12) on the Fréchet Inception Distance (FID) which is more sensitive to blurriness. A similar observation about FID was made in §G.3.

Appendix H Hyperparameters