Conjugate Gradient Method for Generative Adversarial Networks

Hiroki Naganuma, Hideaki Iiduka

Abstract

One of the training strategies of generative models is to minimize the Jensen–Shannon divergence between the model distribution and the data distribution. Since data distribution is unknown, generative adversarial networks (GANs) formulate this problem as a game between two models, a generator and a discriminator. The training can be formulated in the context of game theory and the local Nash equilibrium (LNE). It does not seem feasible to derive guarantees of stability or optimality for the existing methods. This optimization problem is far more challenging than the single objective setting. Here, we use the conjugate gradient method to reliably and efficiently solve the LNE problem in GANs. We give a proof and convergence analysis under mild assumptions showing that the proposed method converges to a LNE with three different learning rate update rules, including a constant learning rate. Finally, we demonstrate that the proposed method outperforms stochastic gradient descent (SGD) and momentum SGD in terms of best Frechet inception distance (FID) score and outperforms Adam on average.

Introduction

Training Generative Adversarial Networks (GANs) is notoriously difficult because it involves a competitive "game" between two models rather than a simple optimization. At their core, GANs are a minimax problem: a generator tries to fool a discriminator, while the discriminator tries to get better at spotting fakes. Mathematically, we are looking for a Local Nash Equilibrium (LNE).

Standard deep learning optimizers like SGD and Adam were designed for single-objective minimization. When applied to the competitive landscape of GANs, they often suffer from instability, oscillations, or "mode collapse." Furthermore, while practitioners usually use constant learning rates, most existing mathematical proofs for GAN convergence require "diminishing" learning rates, creating a significant gap between theory and practice.

Proposed Method: Conjugate Gradient for GANs

This paper introduces a Conjugate Gradient (CG) approach adapted for the GAN setting. Unlike standard gradient descent, which only looks at the current gradient, CG uses a "search direction" that is a combination of the current gradient and the previous search direction.

The proposed algorithm supports several standard CG update formulas, including Fletcher–Reeves (FR), Polak–Ribière–Polak (PRP), and Hestenes–Stiefel (HS). In the context of GANs, the CG direction can act as a form of "negative momentum." While standard momentum can sometimes cause an optimizer to overshoot or circle a saddle point in a game, the CG direction helps stabilize these dynamics.

Theoretical Convergence

A key contribution is the rigorous proof showing that the CG method converges to an LNE. Crucially, the authors prove convergence even when using a constant learning rate, achieving an $O(N^{-1})$ convergence rate. This provides a mathematical justification for the training schedules most researchers actually use, bridging the gap between optimization theory and real-world practice.

Experimental Evaluation

The researchers evaluated the method using two primary benchmarks:

  1. Toy Minimax Problem: A simple mathematical function ($f(x, y) = (1 + x^2) \cdot (100 - y^2)$) used to visualize optimization trajectories.
  2. CIFAR-10: A standard benchmark for image generation using a Spectral Normalization GAN (SNGAN) with a ResNet architecture.
Optimization trajectories on a toy minimax problem showing the stability of CGD compared to vanilla and momentum SGD.

As seen in the toy problem visualization, CGD exhibits more stable convergence toward the saddle point compared to momentum SGD, which exhibits significant oscillations in the objective value and path trajectory.

Results and Discussion

On the CIFAR-10 dataset, CG-based methods (specifically the Fletcher-Reeves variant, cgd_fr) achieved superior Fréchet Inception Distance (FID) scores compared to SGD and momentum SGD.

FID performance on CIFAR-10 with constant learning rates. The line plots show average FID over iterations, while heatmaps compare the hyperparameter robustness of Adam vs. CGD (FR).

Reliability and Robustness

While Adam could occasionally achieve a slightly better "best-case" FID score (19.38 vs. CG's 26.03), Adam's average performance was significantly worse (51.16) due to high variance and training instability. In contrast, the CG (FR) method was highly consistent, with an average FID of 29.63.

Furthermore, CG-based methods demonstrated remarkable robustness to hyperparameter choices. As shown in the heatmaps above, Adam failed completely (producing very high FID scores, indicated by yellow regions) if the learning rate was not perfectly tuned. CG remained stable across a wide range of learning rate settings for both the generator and discriminator.

Conclusion

The Conjugate Gradient method offers a promising alternative for training GANs, providing both theoretical guarantees and empirical stability. By bridging the gap between theory and practice with constant learning rate analysis, this work paves the way for more reliable generative modeling. Future work includes testing on higher-resolution datasets and exploring interactions with more modern architectures.

Summary updated

BibTeX
@inproceedings{naganuma2023conjugate,
  author = {Hiroki Naganuma and Hideaki Iiduka},
  title = {{Conjugate Gradient Method for Generative Adversarial Networks}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2023},
  url = {https://openreview.net/forum?id=3ve9NBcOlj},
}
Figure