NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Adversarially Regularized Autoencoders for Generating Discrete Structures

Junbo Jake Zhao, Yoon Kim, Kelly Zhang, Alexander M. Rush, Yann LeCunarXiv 2017

Abstract

Adversarially Regularized Autoencoders (ARAE) represent a significant advancement in applying generative adversarial training to discrete data, such as natural language. While Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs) have seen immense success in continuous domains like image generation, their application to discrete structures has been hindered by non-differentiability and training instabilities. ARAE overcomes these challenges by performing adversarial regularization within a continuous latent space. This approach enables high-quality text generation, smooth latent space interpolation, and unaligned style transfer, providing a robust framework for modeling complex discrete distributions.

Introduction

Deep latent variable models face two primary obstacles when dealing with discrete data like text. First is the Discrete Bottleneck: standard backpropagation cannot pass through discrete operations like the "argmax" used in word selection. While reinforcement learning or the Gumbel-Softmax trick offer workarounds, they often suffer from high variance or fail to yield a truly smooth latent representation. Second is Posterior Collapse: in VAEs for text, powerful decoders (like RNNs) often ignore the latent code, reducing the model to a simple language model that fails to capture the underlying structure of the input. ARAE addresses these by decoupling the discrete reconstruction task from the adversarial distribution matching.

Methods

The core innovation of ARAE is moving the adversarial training into a continuous latent space, thereby bypassing the discrete bottleneck. The architecture consists of three main components:

  1. Discrete Autoencoder: An RNN-based encoder maps a discrete input $x$ to a continuous latent code $z$. A corresponding decoder attempts to reconstruct $x$ from $z$.
  2. Adversarial Regularization: Instead of a fixed prior (like the Gaussian used in VAEs), ARAE employs a GAN within the latent space. A generator ($g_\theta$) transforms noise into synthetic codes $\tilde{z}$, while a critic ($f_w$) learns to distinguish between real codes from the encoder and synthetic ones.
  3. Coordinate Descent Training: The model alternates between minimizing reconstruction error, training the critic to differentiate latent codes, and training the encoder and generator to fool the critic.
Figure 1: The ARAE architecture, showing the interaction between the autoencoder and the adversarial components in the latent space.

This setup ensures that the encoder's output distribution matches a learnable prior, creating a smooth manifold that the decoder can effectively interpret for generation and manipulation.

Datasets and Evaluation

The authors evaluated ARAE across three distinct domains: Binarized MNIST, SNLI (Stanford Natural Language Inference), and Yelp/Yahoo datasets for style transfer.

  • Generation Quality: On text generation tasks, ARAE achieved a Reverse Perplexity of 82.2, significantly outperforming standard Autoencoders (97.3) and baseline Language Models (90.6), indicating better coverage of the true data distribution.
  • Style Transfer: In unaligned sentiment transfer (e.g., Yelp), ARAE reached 81.8% accuracy, surpassing previous state-of-the-art "Cross-Aligned" models (77.1%). Human evaluators also preferred ARAE's outputs for naturalness, rating them 3.8 vs 2.7 on a 5-point scale.
  • Semi-Supervised Learning: ARAE improved classification accuracy on SNLI when labels were scarce (70.9% vs 65.9% for a standard supervised encoder), demonstrating the utility of its learned representations.
Figure 2: Visual results on binarized MNIST, demonstrating the model's ability to generate and reconstruct discrete structures.

Key Insights and Discussion

Several key insights emerge from the ARAE framework. By regularizing the latent space rather than the output space, the model can utilize stable Wasserstein GAN training. Furthermore, learning the prior distribution rather than assuming a fixed Gaussian allows for a more flexible, data-dependent latent space.

This flexibility enables "sentence arithmetic"—similar to Word2Vec—where vector operations in the latent space correspond to semantic changes in the generated text. For example, by adding a "walking" vector to the latent code of "A man is sleeping," the model can generate "A man is walking." Additionally, the model facilitates "unaligned" style transfer, allowing for sentiment or topic shifts without requiring parallel datasets.

Conclusion and Future Work

While ARAE is a powerful tool for discrete structure generation, it shares the common GAN challenge of hyperparameter sensitivity. Scaling the model to long-form, complex documents remains an open research area. Future work may also focus on closing the theoretical gaps in the Wasserstein distance approximations used during training to further improve stability and performance.

Summary updated

BibTeX
@misc{zhao2017adversarially,
  author = {Junbo Jake Zhao and Yoon Kim and Kelly Zhang and Alexander M. Rush and Yann LeCun},
  title = {{Adversarially Regularized Autoencoders for Generating Discrete Structures}},
  year = {2017},
  eprint = {1706.04223},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1706.04223},
}
Figure