Evaluating Text GANs as Language Models

Guy Tevet, Gavriel Habib, Vered Shwartz, Jonathan Berant

Introduction

Generative Adversarial Networks (GANs) are frequently proposed as a solution to "exposure bias" in text generation. Exposure bias occurs when models trained via Maximum Likelihood Estimation (MLE) fail at test time because they encounter their own errors—scenarios they were never exposed to during training. While GANs theoretically address this through global discriminator feedback, they are notoriously difficult to evaluate using standard probabilistic metrics like perplexity or Bits Per Character (BPC). This paper introduces a Monte-Carlo sampling method to approximate a GAN’s output as a probability distribution, enabling direct comparison with gold-standard Language Models (LMs).

Methods: LM Approximation via Monte-Carlo Sampling

To evaluate GANs as probabilistic models, the authors treat the generator as a stochastic function. By running the generator $N$ times at each step of a "gold" test sequence, they count the frequency of each character to build an empirical probability distribution.

Convergence of the Monte-Carlo approximation as the number of generator runs (N) increases.

Using the Chernoff-Hoeffding theorem, the authors determined the number of samples required for a stable estimate. As shown in the convergence plot above, approximately $N=2000$ samples per token provide a reliable approximation of the underlying distribution, allowing for the calculation of standard metrics like BPC.

Experimental Results

The study utilized the text8 dataset, a benchmark consisting of cleaned Wikipedia text (27 characters). This allows for a rigorous comparison between GANs and established character-level LMs. The results provide a sobering perspective on the current state of text GANs.

Comparison of Bits Per Character (BPC) across state-of-the-art Language Models and GAN-based approaches.

While state-of-the-art LMs achieve BPC scores between 1.19 and 1.40, GAN-based models lag significantly behind. Notably, for models like SeqGAN, adversarial training actually degraded performance. The pre-trained MLE version scored 1.85 (approx. 1.95), which worsened to 1.99 (approx. 2.08) after the full adversarial phase. Models trained entirely without MLE pre-training, such as the Recurrent GAN, performed even worse with an approximate BPC of 3.31, though still better than a uniform random baseline (4.75).

Conclusion and Limitations

This evaluation framework reveals that current text GANs struggle to capture the fundamental statistical properties of language compared to traditional LMs. While GANs might produce visually appealing individual samples in some contexts, they currently fail to match the distributional accuracy of MLE-trained models. The primary limitation of this approach is the high computational cost of sampling the generator thousands of times per token. However, this method provides a necessary, rigorous benchmark for future adversarial text generation research, proving that adversarial training currently moves models further away from the true data distribution.

Summary updated

BibTeX
@inproceedings{tevet2019evaluating,
  author = {Guy Tevet and Gavriel Habib and Vered Shwartz and Jonathan Berant},
  title = {{Evaluating Text GANs as Language Models}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/n19-1233},
}
Figure