Latent Code and Text-based Generative Adversarial Networks for Soft-text Generation

Md. Akmal Haidar, Mehdi Rezagholizadeh, Alan Do-Omri, Ahmad Rashid

Abstract: Md. Akmal Haidar, Mehdi Rezagholizadeh, Alan Do Omri, Ahmad Rashid. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers).

2019.

Introduction

Generative Adversarial Networks (GANs) have revolutionized image synthesis, yet they have historically struggled with the discrete nature of language. Unlike continuous image pixels, words are discrete tokens, making it impossible to backpropagate gradients through a "choice" operation. Researchers from Huawei’s Noah’s Ark Lab address this by introducing Soft-GAN and LATEXT-GAN, models that bypass the discrete bottleneck by training on continuous "soft-text" representations.

The Discrete Bottleneck in Text Generation

Standard text generation typically relies on Maximum Likelihood Estimation (MLE), which is prone to exposure bias: models trained only on ground-truth data often fail during inference when a single error propagates. While GANs could theoretically mitigate this, the non-differentiable argmax operation prevents direct gradient flow from a discriminator to a generator. Existing workarounds, such as Reinforcement Learning (RL), are often computationally expensive and require extensive pre-training. Furthermore, simple "one-hot" vs. "softmax" comparisons often lead to vanishing gradients because the discriminator can easily distinguish sparse real vectors from dense fake distributions.

Proposed Methods: Soft-GAN and LATEXT-GAN

The core innovation of this work is the transition from discrete tokens to soft-text.

  1. Soft-GAN: Instead of comparing one-hot vectors to generated distributions, the discriminator evaluates the reconstructed output of an Autoencoder (AE). This "soft-text" is continuous and exists in the same mathematical space as the generator's output, providing a richer gradient signal.
  2. LATEXT-GAN (I, II, and III): These hybrid models combine soft-text signals with latent "code-based" signals (the vector $c$ from the AE).
  3. Types I & II: Employ separate discriminators for the latent code and the soft-text.
  4. Type III: Uses a single discriminator that evaluates the concatenation of the code and the text, learning the joint distribution of semantics and structure.
The LATEXT-GAN III architecture uses a joint discriminator for latent code and soft-text.

Key Insights: The Locus Argument

The authors provide a geometric intuition for why soft-text improves training. In a high-dimensional word space, "real" one-hot words are isolated points, while the generator's output is a line (or simplex) between them. A discriminator can trivially separate a point from a line, leading to vanishing gradients. By using soft-text, the "real" target becomes a complex curve—the AE's reconstruction locus—making the adversarial task more meaningful for the generator.

Geometric intuition of the soft-text locus, where real targets are continuous segments rather than isolated points.

Experimental Results

The models were evaluated on the SNLI and Image COCO datasets, consistently outperforming baselines like AAE, ARAE, and IWGAN.

  • Fluency and BLEU: On SNLI, LATEXT-GAN I achieved a BLEU-2 of 0.87, significantly higher than ARAE (0.73). Human evaluations also favored LATEXT-GAN III, which scored 2.70 on a 5-point Likert scale.
  • Diversity: LATEXT-GAN III demonstrated superior diversity, achieving the best Self-BLEU score (0.874) on the COCO dataset.
  • Training Efficiency: Unlike RL-based approaches, these models can be trained from scratch without heavy pre-training, though the AE and GAN are trained alternatingly.

Conclusion and Future Work

While the proposed models excel at generating fluent, diverse short sentences, performance degrades as sentence length increases. Future work may involve replacing LSTM components with Transformers or Attention mechanisms to better capture long-range dependencies in soft-text reconstructions.

Summary updated

BibTeX
@inproceedings{haidar2019latent,
  author = {Md. Akmal Haidar and Mehdi Rezagholizadeh and Alan Do-Omri and Ahmad Rashid},
  title = {{Latent Code and Text-based Generative Adversarial Networks for Soft-text Generation}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  url = {https://openreview.net/forum?id=rkEPGmbObS},
}
Figure