Abstract
GanLM is a novel pre-training framework for encoder-decoder models that introduces an auxiliary discriminator to bridge the gap between language understanding and generation. By combining Replaced Token Detection (RTD) with a novel Replaced Token Denoising (RD) task, GanLM achieves state-of-the-art results across major summarization and translation benchmarks. The discriminator acts as a teacher, identifying "hard" examples for the generator to reconstruct, thereby enhancing both understanding and generation capabilities.
Introduction
In Natural Language Processing (NLP), pre-training has become the standard for achieving high performance. For sequence-to-sequence (seq2seq) tasks such as summarization and translation, encoder-decoder architectures like BART or T5 are typically pre-trained using denoising objectives—reconstructing original text from corrupted versions. However, these standard methods often under-utilize language understanding to improve generation. While encoder-only models like ELECTRA have demonstrated that "replaced token detection" is a superior understanding task, this approach has not been effectively applied to seq2seq models. GanLM aims to unify these paradigms, using a discriminator to improve the generator by forcing it to understand and correct its own errors.
Methodology
GanLM (Generative Adversarial Network Language Model) consists of a Generator ($G$) and a Discriminator ($D$) that share a single encoder. The training process utilizes two primary objectives:
- Replaced Token Detection (RTD): The generator produces a probability distribution for masked tokens. Tokens are sampled from this distribution to create a "fake" sentence. The discriminator then predicts whether each token is "ORIGINAL" or "REPLACED."
- Replaced Token Denoising (RD): This novel task focuses on generation. Tokens flagged as "REPLACED" (or misclassified) by the discriminator are used to construct a noisy context. The generator is then tasked with reconstructing the original, clean sentence from this noisy version.
Unlike standard GANs, which face stability issues in NLP due to discrete text sampling, GanLM trains the generator using standard maximum likelihood. The "adversarial" component is the RD task, where the discriminator identifies "hard" examples for the generator to fix. Additionally, the auxiliary discriminator is retained during the task-specific fine-tuning phase to continue guiding the generator.
Experimental Setup
GanLM was pre-trained on extensive datasets:
- English: 160GB of text from BookCorpus, CC-News, OpenWebText, and CC-Stories.
- Multilingual (GanLM-m): 6TB of text covering 100 languages (CC100, CC-Net, Wikipedia).
Evaluation spanned several benchmarks, including summarization (CNN/DailyMail, XSum), translation (WMT-14, WMT-16, IWSLT-17), and language understanding (GLUE, XNLI).
Results and Discussion
GanLM consistently outperformed strong baselines such as BART, T5, and UniLMv2. On the XSum summarization dataset, GanLM achieved a ROUGE-L score of 36.84, surpassing BART (36.02) and T5 (36.12). In translation, GanLM-m reached 30.6 BLEU on the WMT-14 English-German task.
The model showed significant advantages in low-resource scenarios. For instance, in the WMT-16 En-Ro translation task, GanLM provided a substantial improvement over standard Transformer baselines, particularly when training data was limited.
Key insights from the results include:
- Hard Example Loop: By focusing on tokens the discriminator finds suspicious, the generator learns context-dependent word choices more effectively.
- Efficiency: Using a "tiny" 4-layer discriminator alongside a 12-layer generator maintains computational efficiency.
- Cross-lingual Alignment: The GAN-style training improves shared representation space alignment in multilingual models, as seen in zero-shot translation performance.
Conclusion
GanLM demonstrates that integrating an auxiliary discriminator into seq2seq pre-training significantly enhances both language understanding and generation. While the training process is approximately 0.5x slower than standard T5 models, the performance gains across summarization, translation, and understanding tasks justify the overhead. Future work may explore the scalability of this approach to larger model sizes and the sensitivity of the sampling process.
Summary updated