Skip to main content
QUICK REVIEW

[Paper Review] Discrete Autoencoders for Sequence Models

Łukasz Kaiser, Samy Bengio|arXiv (Cornell University)|Jan 29, 2018
Generative Adversarial Networks and Image SynthesisComputer Science8 references35 citations
TL;DR

This paper proposes a discrete autoencoder for sequence models that compresses input sequences into a discrete latent space using an improved semantic hashing technique, enabling gradient flow through discrete variables without annealing or additional loss terms. The method achieves over 50% efficiency on a new quantitative measure and enables diverse, semantically coherent text generation via latent code sampling followed by beam search.

ABSTRACT

Recurrent models for sequences have been recently successful at many tasks, especially for language modeling and machine translation. Nevertheless, it remains challenging to extract good representations from these models. For instance, even though language has a clear hierarchical structure going from characters through words to sentences, it is not apparent in current language models. We propose to improve the representation in sequence models by augmenting current approaches with an autoencoder that is forced to compress the sequence through an intermediate discrete latent space. In order to propagate gradients though this discrete representation we introduce an improved semantic hashing technique. We show that this technique performs well on a newly proposed quantitative efficiency measure. We also analyze latent codes produced by the model showing how they correspond to words and phrases. Finally, we present an application of the autoencoder-augmented model to generating diverse translations.

Motivation & Objective

  • To address the challenge of learning meaningful discrete representations in sequence models, especially for natural language with hierarchical structure.
  • To develop a differentiable discrete autoencoder that enables gradient backpropagation through discrete latent variables without requiring annealing or auxiliary losses.
  • To propose a new quantitative efficiency measure for evaluating discrete autoencoders in sequence modeling.
  • To enable diverse and semantically coherent text generation by sampling from the learned discrete latent codes.

Proposed method

  • Uses an improved semantic hashing technique: for a continuous vector v, adds fixed Gaussian noise during training and applies a saturating sigmoid to produce a binary vector vd.
  • In the forward pass, alternates between using the soft sigmoid (v1) and the hard binary vector (v2) to stabilize training.
  • In the backward pass, gradients always flow through the soft version (v1), even when the hard version (v2) is used in the forward pass, using a straight-through gradient trick.
  • The discrete latent code c(s) is generated by compressing the input sequence s into K-fold shorter sequences of discrete symbols from a learned vocabulary.
  • The model is trained by minimizing perplexity on the concatenation of c(s) and s, using a conditional language model to reconstruct the original sequence.
  • For decoding, samples c(s) from a separate language model on the latent codes, then runs beam search on the original sequence model conditioned on the sampled c(s), enabling diverse outputs.

Experimental results

Research questions

  • RQ1Can a discrete autoencoder be trained effectively in sequence models using only gradient-based optimization, despite the non-differentiability of discrete variables?
  • RQ2How can the performance of discrete autoencoders be quantitatively measured in a way that reflects both compression efficiency and reconstruction quality?
  • RQ3Can the learned discrete latent codes correspond meaningfully to linguistic units such as words and phrases?
  • RQ4Can sampling from the latent code followed by beam search generation produce diverse, semantically coherent outputs in neural machine translation?

Key findings

  • The proposed improved semantic hashing technique achieves over 50% efficiency on the new quantitative measure, outperforming Gumbel-Softmax in the same setup.
  • The latent codes learned by the model correspond to meaningful linguistic units such as words and phrases, as demonstrated by interpretability analysis.
  • Sampling from the latent code and then performing beam search on the original sequence model yields diverse translations that preserve semantics, avoiding the repetition and low diversity seen in standard beam search or pure sampling.
  • The method enables end-to-end training of multi-scale generative models and shows promise for reinforcement learning by allowing planning over high-level discrete actions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.