ReGAN: RE[LAX|BAR|INFORCE] based Sequence Generation using GANs

Aparna Balagopalan, Satya Gorti, Mathieu Ravaut, Raeid SaqurarXiv 2018

Abstract

Generative Adversarial Networks (GANs) have seen steep ascension to the peak of ML research zeitgeist in recent years. Mostly catalyzed by its success in the domain of image generation, the technique has seen wide range of adoption in a variety of other problem domains. Although GANs have had a lot of success in producing more realistic images than other approaches, they have only seen limited use for text sequences. Generation of longer sequences compounds this problem. Most recently, SeqGAN (Yu et al., 2017) has shown improvements in adversarial evaluation and results with human evaluation compared to a MLE based trained baseline. The main contributions of this paper are three-fold:

  1. We show results for sequence generation using a GAN architecture with efficient policy gradient estimators, 2. We attain improved training stability, and 3. We perform a comparative study of recent unbiased low variance gradient estimation techniques such as REBAR (Tucker et al., 2017), RELAX (Grathwohl et al., 2018) and REINFORCE (Williams, 1992). Using a simple grammar on synthetic datasets with varying length, we indicate the quality of sequences generated by the model.

Introduction

Generative Adversarial Networks (GANs) have revolutionized image generation, yet their application to discrete sequence data, such as text, remains a significant challenge. In standard GANs, the discriminator provides a gradient to the generator based on continuous pixel values. However, text consists of discrete tokens (words or characters), making the space non-differentiable. Furthermore, GANs typically provide a reward only upon sequence completion, complicating credit assignment for individual tokens. ReGAN addresses these issues by framing sequence generation as a Reinforcement Learning (RL) problem, where the discriminator's output serves as a reward signal for policy gradient optimization.

Methodology

The ReGAN architecture utilizes LSTMs for both the Generator and Discriminator. To backpropagate the discriminator's reward through discrete choices, the authors evaluate three policy gradient estimators:

  1. REINFORCE: An unbiased but high-variance classic RL approach.
  2. REBAR: Reduces variance using control variates and a reparameterization trick while remaining unbiased.
  3. RELAX: A generalization of REBAR that employs a learned "annex" neural network (a CNN in this implementation) to act as a learned control variate, specifically optimized to minimize gradient variance.
The RELAX architecture for sequence generation, utilizing concrete relaxation to estimate gradients.

The core objective is to leverage these estimators to stabilize training and improve the quality of generated sequences by reducing the variance of the gradient estimates.

Experimental Setup

The models were tested on synthetic grammar datasets to isolate the effects of the gradient estimators from the complexities of natural language. The grammar requires sequences to alternate between the symbol "x" and mathematical operators (+, -, *, /).

Examples of synthetic grammar sequences for lengths three and fifteen.

Two configurations were tested:

  • Sequence Length 3: Short sequences like x+x.
  • Sequence Length 15: Longer sequences like x/x*x-x+x.... Each dataset consisted of 10,000 sequences with a vocabulary of 5 tokens.

Results and Analysis

Variance and Stability

Empirical results confirmed that lower gradient variance correlates with better convergence. For short sequences, RELAX demonstrated significantly lower log-variance compared to REINFORCE, leading to more stable learning. The "annex" network in RELAX effectively learned a reward landscape that guided the generator more efficiently than the discriminator alone.

Sequence Quality

  • Short Sequences: RELAX outperformed other estimators, achieving higher "Goodness Scores" (measuring grammatical correctness) and faster convergence.
  • Long Sequences: Performance gains diminished for longer sequences. RELAX performed slightly worse than REINFORCE at length 15, likely due to increased variance instability and the need for a more complex annex network or extended training.

Diversity

Analysis of unigram probabilities indicated that ReGAN avoided mode collapse, maintaining token diversity comparable to the training data.

Discussion and Limitations

While ReGAN shows promise in stabilizing discrete GAN training, several hurdles remain. The model requires a "warm-up" period using Maximum Likelihood Estimation (MLE) to prevent the gradient estimators from failing in the initial high-entropy state. Additionally, the computational cost of RELAX is high due to the double-loop backpropagation required for variance calculation. Finally, scaling to the length and complexity of real-world natural language remains a significant challenge, as performance dropped notably when moving from length 3 to length 15. Future work should explore more robust variance reduction techniques and evaluation on standard NLP benchmarks.

Summary updated

BibTeX
@misc{balagopalan2018regan,
  author = {Aparna Balagopalan and Satya Gorti and Mathieu Ravaut and Raeid Saqur},
  title = {{ReGAN: RE[LAX|BAR|INFORCE] based Sequence Generation using GANs}},
  year = {2018},
  eprint = {1805.02788},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1805.02788},
}
Figure