Abstract
Generative Adversarial Networks (GANs) for text generation often struggle with the discrete nature of language, leading to high-variance gradients or noisy continuous approximations. SparseGAN addresses these challenges by introducing a fully differentiable framework that represents words as sparse linear combinations of key embeddings. Utilizing a Sparse Encoder based on the Matching Pursuit algorithm, the model eliminates "long-tail" noise and stabilizes training. Experimental results on COCO and WMT News datasets demonstrate that SparseGAN significantly outperforms existing state-of-the-art models in text quality.
Introduction: The Discrete Text Challenge
Training GANs for text is notoriously difficult because text is discrete. In a standard GAN, the generator makes discrete choices (words), but backpropagation requires a continuous gradient. Existing solutions typically fall into two camps:
- Reinforcement Learning (RL): Treating the generator as an agent. While functional, this approach suffers from high-variance gradient estimates, making training unstable.
- Continuous Approximations: Using techniques like Gumbel-Softmax to create "soft" word selections. However, these methods often involve a probability distribution over the entire vocabulary. Since most words have near-zero but non-zero probabilities, the model processes significant "long-tail" noise, leading to imprecise generation.
SparseGAN bridges this gap by creating a representation that is both continuous (differentiable) and sparse (noise-free).
Methods: The Sparse Encoder
The core innovation of SparseGAN is the Sparse Encoder, positioned between the generator/auto-encoder and the discriminator.
The architecture consists of several key components:
- Generator: An LSTM-based model producing hidden states.
- Denoising Auto-encoder (DAE): Extracts latent representations of real sentences to provide targets for the generator.
- Sparse Encoding via Matching Pursuit: Instead of a soft distribution over the entire vocabulary, the word embedding matrix is treated as an "over-complete dictionary." The Matching Pursuit (MP) algorithm iteratively selects a small number of embeddings (e.g., the top 10) whose linear combination best approximates the hidden state.
- Differentiability: The authors demonstrate that this iterative selection process is differentiable, allowing gradients to flow from the CNN-based discriminator back to the generator.
- Loss Function: The model employs the Wasserstein GAN (WGAN-GP) objective for enhanced training stability.
Key Insights
By forcing the model to represent states using only a few embeddings, SparseGAN effectively "denoises" the input to the discriminator, ignoring irrelevant words that clutter standard continuous approximations. Furthermore, because the generator and discriminator share the same embedding dictionary, the discriminator learns to judge sentences based on a consistent semantic space, acting as a powerful regularizer.
Experimental Results
SparseGAN was evaluated on two benchmarks: the COCO Image Caption dataset (short, descriptive sentences) and the EMNLP2017 WMT News dataset (longer, complex sentences).
SparseGAN significantly outperformed both standard Maximum Likelihood Estimation (MLE) and previous state-of-the-art GAN models:
- Higher Quality: On the COCO dataset, SparseGAN achieved a BLEU-4 score of 0.474, compared to 0.305 for MLE and 0.355 for LeakGAN.
- Longer Sequences: The improvement was even more pronounced on the WMT News dataset, with a BLEU-4 of 0.643 (vs. MLE's 0.223).
- Naturalness: Qualitative analysis shows that SparseGAN generates coherent structures and meaningful content, avoiding the "gibberish" typical of early-stage GAN training.
Conclusion and Future Work
While SparseGAN excels in quality (BLEU), MLE-based models still tend to have lower Self-BLEU scores, suggesting that GAN-based models may still face some challenges with diversity (mode collapse). Future research may focus on increasing text diversity without sacrificing stability, scaling to larger transformer-based architectures, and optimizing the computational overhead of the iterative Matching Pursuit algorithm.
Summary updated