Introduction
Generative Adversarial Networks (GANs) have revolutionized continuous data generation, such as images, but applying them to natural language has historically been a frustrating endeavor. Because text consists of discrete tokens, gradients cannot be passed directly from a discriminator back to a generator. Researchers typically rely on Reinforcement Learning (RL)—specifically policy gradients—to bridge this gap, but these methods are notoriously high-variance and unstable.
To circumvent these instabilities, the standard practice has been to pre-train the language model using Maximum Likelihood Estimation (MLE), essentially teaching it to predict the next word, and only using the GAN objective for fine-tuning. However, evidence suggests that this GAN fine-tuning often fails to move the model far from its MLE-initialized state. Researchers at DeepMind challenged this paradigm, asking: Can we discard the MLE crutch and train a language GAN using only the adversarial objective? Their resulting model, ScratchGAN, proves that training from scratch is not only possible but yields performance comparable to state-of-the-art MLE models in both quality and diversity.
The ScratchGAN Methodology
ScratchGAN does not rely on a single "silver bullet" algorithm. Instead, it succeeds through a carefully engineered combination of existing techniques designed to stabilize the RL training process:
- Dense Rewards: Standard GANs provide a single, delayed reward at the end of a generated sentence. ScratchGAN uses a recurrent discriminator that evaluates the "realness" of the sentence prefix as it is being built, providing a dense reward signal at every single timestep.
- Large Batch Sizes: To combat the high variance inherent in the REINFORCE algorithm, the authors significantly scaled up the batch size. Sampling more experiences stabilizes the gradient estimates.
- Discriminator Regularization: A common failure mode in GANs is the discriminator memorizing the training data and overpowering the generator. ScratchGAN employs a suite of regularization tools—Layer Normalization, dropout, and $L_2$ weight decay—to ensure the discriminator provides a smooth, generalizable learning signal.
- Variance Reduction & Positional Information: The model uses a global moving average of rewards as a baseline to further stabilize policy gradient updates, and adds sinusoidal positional encodings to word embeddings to help the model track sentence structure and length.
Metrics and Key Insights
The authors evaluated ScratchGAN on two standard benchmarks: the smaller EMNLP2017 News dataset and the much larger, more complex WikiText-103 dataset.
A critical insight from the paper is the danger of relying on traditional metrics like BLEU scores for evaluating generative text. The authors demonstrated that a simple 5-gram model could achieve near-perfect BLEU scores while producing total gibberish. To address this, they utilized the Frechet Embedding Distance (FED), which measures the distance between real and generated data in a high-level semantic embedding space.
Furthermore, they observed a distinction in consistency: while MLE models excel at "local" consistency (predicting the immediate next word), GANs often perform better at "global" consistency, ensuring the overall semantic meaning of the sentence holds together. By adjusting the "temperature" of the generator's output distribution, ScratchGAN can smoothly navigate the trade-off between producing safe, high-quality samples and highly diverse ones.
Key Results
ScratchGAN's performance demonstrates that the "necessity" of MLE pre-training was likely a symptom of optimization instability rather than a fundamental theoretical limit.
- Beating the Baseline: On the EMNLP2017 News dataset, ScratchGAN achieved a FED score of 0.015, vastly outperforming previous GAN-from-scratch attempts like SeqGAN-step (0.084).
- Competitive with MLE: On the large-scale WikiText-103 dataset, ScratchGAN achieved a FED of 0.045, outperforming the MLE baseline (0.118) in terms of global semantic consistency.
Nearest-neighbor analysis confirmed that ScratchGAN was not simply memorizing or copy-pasting chunks of the training data; it generated genuinely novel sentences that adhered to the thematic patterns of the source text.
Limitations and Future Work
Despite its success in semantic "realness," ScratchGAN still lags behind MLE models in terms of perplexity. Because MLE models are explicitly trained to minimize perplexity, they tend to avoid the local grammatical hiccups that GANs sometimes produce. Additionally, the reliance on very large batch sizes for variance reduction makes ScratchGAN computationally expensive to train compared to standard autoregressive models.
Finally, while this work proves GANs can generate text from scratch, the generator remains largely autoregressive (LSTM-based). The authors suggest that future work could explore non-autoregressive, "one-shot" feed-forward architectures, which GANs are theoretically better suited for than MLE models.
Summary updated