Making Use of Latent Space in Language GANs for Generating Diverse Text without Pre-training

Takeshi Kojima, Yusuke Iwasawa, Yutaka MatsuoStudent Research Workshop @ EACL 2021 · DOI

TL;DR

This paper introduces a novel Generative Adversarial Network (GAN) architecture for text generation that can produce diverse and controllable text without requiring pre-training. By incorporating a reconstructor and using Gumbel-Softmax for word sampling, their model achieves competitive performance against pre-trained baselines, demonstrating the effectiveness of latent space conditioning for unsupervised text generation.

What Problem Does This Paper Address?

Generating diverse and high-quality text using Generative Adversarial Networks (GANs) is a challenging task, especially in an unsupervised setting. Existing methods often suffer from "mode-collapsing," where the generator produces limited variations of text, or require extensive pre-training (e.g., using Variational Autoencoders) to achieve good results. This pre-training step adds complexity and computational cost. The paper aims to bridge this gap by proposing a GAN that can generate diverse texts conditioned on a latent space, without the need for pre-training, and to improve the controllability of generated text.

Methods

The core of the proposed method lies in a GAN framework that leverages a latent space for text generation. Key techniques include:

  • Gumbel-Softmax Distribution: For the generator's word sampling process, the Gumbel-Softmax distribution is used. This allows for differentiable sampling of discrete words, enabling end-to-end training of the GAN. It approximates a one-hot vector while maintaining differentiability.
  • Reconstructor and Reconstruction Loss: To ensure that the generated text is effectively conditioned by the sampled latent code, a "reconstructor" network is introduced. This reconstructor takes the generated text and outputs a reconstructed latent code. A reconstruction loss is then minimized between the original latent code and the reconstructed one, forcing the generator to utilize the latent information.
  • Iterative Discriminator: To address the issue of the discriminator providing weak signals early in training (when it only sees complete sentences), the discriminator is designed to iteratively inspect incomplete partial texts. This provides more informative feedback to the generator during the word sampling process.
  • Vector Quantization (VQ): To stabilize the training of the reconstruction loss, vector quantization is applied to the soft one-hot vectors produced by the Gumbel-Softmax. This creates "hard one-hot vectors" which are then used by the reconstructor. This technique allows the reconstruction loss to back-propagate effectively.

Datasets

The paper uses the COCO Image Captions dataset for both training and evaluation. This dataset consists of image-caption pairs, and the authors utilize a subset of 10,000 training and 10,000 evaluation texts.

Key Insights and Ideas

  • Pre-training is not always necessary for latent-conditioned GANs: The paper demonstrates that with the right architectural choices (reconstructor, iterative discriminator, Gumbel-Softmax), GANs can achieve competitive performance without pre-training, which is a significant practical advantage.
  • Reconstruction loss is crucial for latent space conditioning: The inclusion of a reconstruction loss effectively forces the generator to utilize the latent code, leading to better control over the generated text and improved diversity, especially when combined with greedy decoding.
  • Iterative discrimination helps early training: By having the discriminator evaluate partial sentences, the generator receives more useful feedback during the initial stages of training, mitigating the problem of weak learning signals.
  • Vector quantization stabilizes reconstruction loss: Applying VQ to the sampled words helps to stabilize the training of the reconstruction loss, making the overall training process more robust.

Key Results

  • The proposed model achieves performance that is competitive with existing baseline models (VAE, FM-GAN, TextGAN), even though these baselines often require pre-training.
  • The paper shows that increasing the reconstruction loss coefficient (λ) improves the performance of their model, suggesting that the reconstruction loss effectively makes the generated text more dependent on the latent space.
  • For greedy decoding, as λ increases, the diversity of generated sentences increases, and the quality-diversity distribution moves closer to that of the training data.

Limitations and Future Work

  • Slightly inferior performance to some baselines: While competitive, the paper acknowledges that the overall performance of their model is "slightly inferior" to some of the baseline models.
  • Future Work: The authors suggest further improvements to the model's performance and its application to other tasks, such as improving the quality and diversity of machine translation or multi-modal learning related to text generation. They also mention exploring the transformation of data between domains through a latent space.

Summary updated

BibTeX
@inproceedings{kojima2021making,
  author = {Takeshi Kojima and Yusuke Iwasawa and Yutaka Matsuo},
  title = {{Making Use of Latent Space in Language GANs for Generating Diverse Text without Pre-training}},
  booktitle = {Student Research Workshop @ EACL},
  year = {2021},
  doi = {10.18653/v1/2021.eacl-srw.23},
}
Figure