Language Generation with Recurrent Generative Adversarial Networks without Pre-training

Ofir Press, Amir Bar, Ben Bogin, Jonathan Berant, Lior WolfarXiv 2017

Abstract

Generative Adversarial Networks (GANs) have achieved remarkable success in image generation but face significant challenges in the discrete domain of natural language. This paper presents a novel approach to training Recurrent Neural Network (RNN) based GANs for text generation from scratch, bypassing the need for maximum-likelihood pre-training. By employing a continuous relaxation of the RNN output alongside curriculum learning, variable length training, and a "teacher helping" mechanism, the proposed model achieves substantial improvements in text quality and coherence over existing CNN-based GAN architectures.

Introduction

The application of GANs to natural language processing is hindered by the non-differentiable nature of discrete symbol selection. Standard GAN training relies on backpropagation, which is broken by operations like argmax. Previous attempts to solve this have either relied on Maximum Likelihood (ML) pre-training—which introduces "exposure bias"—or utilized Convolutional Neural Networks (CNNs) for fixed-length generation. However, CNNs often lack the sequential awareness necessary for coherent language, leading to frequent spelling and structural errors.

This research addresses these limitations by developing a fully differentiable RNN-based GAN that can be trained from scratch without any pre-training phase.

Methodology

The architecture utilizes GRU-based RNNs for both the generator and discriminator, optimized using the Improved Wasserstein GAN (WGAN-GP) objective. To maintain differentiability, the generator uses continuous relaxation: instead of selecting a single character, it passes a weighted average of character embeddings based on the output probability distribution to the next time step.

To stabilize training and prevent mode collapse, three key techniques are introduced:

  1. Curriculum Learning (CL): The training begins with short sequences (length 1) and incrementally increases the length as the model stabilizes.
  2. Variable Length (VL): Batches contain sequences of varying lengths up to the current curriculum maximum, increasing training variance and robustness.
  3. Teacher Helping (TH): The generator is provided with a ground-truth prefix and tasked with generating the subsequent character. This hybrid sequence is then evaluated by the discriminator, acting as a form of conditional guidance.

Experimental Results

The models were evaluated on the Billion Word dataset for character-level generation, allowing for direct comparison with CNN-based baselines (Gulrajani et al., 2017).

Quantitative and Qualitative Analysis

The performance was measured using the % -IN-TEST-n metric, which calculates the percentage of generated $n$-grams present in a held-out test set.

Table 1: Baseline CNN performance on character-level text generation.

As shown in Figure 1, the baseline CNN model struggles with local coherence, achieving only 0.4% for 4-grams and producing largely unreadable text. In contrast, the proposed RNN-based model with CL, VL, and TH extensions shows a dramatic improvement.

Table 2: Ablation study of training extensions and generalization to longer sequences.

Figure 2 demonstrates that the combination of CL, VL, and TH is essential for high-quality generation. The best-performing model reached 87.7% for 1-grams and 3.8% for 4-grams, representing a nearly tenfold relative improvement in 4-gram coherence over the CNN baseline. Qualitatively, the generated text contains recognizable English words and structures, such as "Republicans friends like come ti".

Generalization

A significant advantage of the RNN architecture is its ability to generalize to different sequence lengths. While CNN baselines are restricted to fixed windows, the RNN model trained on sequences up to 32 characters successfully generated 64-character sequences with only a minor drop in 4-gram overlap (from 3.8% to 1.7%), as seen in the final row of Figure 2.

Discussion and Conclusion

The results indicate that RNNs are inherently better suited for GAN-based text generation than CNNs due to their ability to condition on the entire sequence history. While the "Teacher Helping" technique significantly boosts performance, the authors acknowledge it may re-introduce a form of exposure bias, which GANs typically aim to avoid. Future work will focus on addressing this trade-off and applying the RNN-GAN architecture to more complex tasks such as machine translation and image captioning.

Summary updated

BibTeX
@misc{press2017language,
  author = {Ofir Press and Amir Bar and Ben Bogin and Jonathan Berant and Lior Wolf},
  title = {{Language Generation with Recurrent Generative Adversarial Networks without Pre-training}},
  year = {2017},
  eprint = {1706.01399},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1706.01399},
}
Figure