Skip to main content
QUICK REVIEW

[Paper Review] Latent Normalizing Flows for Discrete Sequences

Zachary M. Ziegler, Alexander M. Rush|arXiv (Cornell University)|Jan 29, 2019
Music and Audio ProcessingComputer Science46 citations
TL;DR

The paper proposes a VAE-based framework that combines latent space normalizing flows with a discrete, inputless emission model to model discrete sequences, enabling multimodal latent dynamics and faster non-autoregressive generation.

ABSTRACT

Normalizing flows are a powerful class of generative models for continuous random variables, showing both strong model flexibility and the potential for non-autoregressive generation. These benefits are also desired when modeling discrete random variables such as text, but directly applying normalizing flows to discrete sequences poses significant additional challenges. We propose a VAE-based generative model which jointly learns a normalizing flow-based distribution in the latent space and a stochastic mapping to an observed discrete space. In this setting, we find that it is crucial for the flow-based distribution to be highly multimodal. To capture this property, we propose several normalizing flow architectures to maximize model flexibility. Experiments consider common discrete sequence tasks of character-level language modeling and polyphonic music generation. Our results indicate that an autoregressive flow-based model can match the performance of a comparable autoregressive baseline, and a non-autoregressive flow-based model can improve generation speed with a penalty to performance.

Motivation & Objective

  • Motivate the use of flexible, multimodal latent flows to model discrete sequence dynamics.
  • Develop a latent-flow VAE where the prior over continuous latent variables captures discrete sequence structure.
  • Propose and compare three flow architectures to maximize multimodality while enabling different sampling/density-evaluation tradeoffs.
  • Demonstrate that autoregressive-flow-in-time variants can match autoregressive baselines, while non-autoregressive variants offer generation speedups.
  • Provide empirical evidence on character-level language modeling and polyphonic music modeling.

Proposed method

  • Use a VAE framework with a continuous latent sequence z1:T generated by a normalizing flow prior p(z1:T).
  • Model p(x1:T|z1:T) with an inputless emission mechanism so the flow carries the primary generative dynamics.
  • Explore three flow architectures: AF in time with AF in hidden (AF/AF), AF in time with SCF in hidden (AF/SCF), and IAF in time with SCF in hidden (IAF/SCF).
  • Extend flows with a non-linear squared (NLSq) transformation to increase multimodality.
  • Train via amortized variational inference with a diagonal Gaussian encoder q(z1:T|x1:T) and optimize the ELBO.
  • Evaluate using character-level language modeling on PTB and polyphonic music modeling across multiple datasets, comparing to autoregressive baselines.

Experimental results

Research questions

  • RQ1Can latent space normalizing flows model the multimodal dynamics of discrete sequences without relying on autoregressive decoders?
  • RQ2What flow architectures best capture the multimodality required to map continuous latent representations to discrete sequences while enabling efficient (non-autoregressive) generation?
  • RQ3How does the performance of latent-flow models compare to autoregressive baselines on character-level language modeling and polyphonic music modeling?

Key findings

  • Autoregressive flow models (AF/AF) nearly match LSTM baselines on PTB character-level language modeling.
  • AF/SCF and IAF/SCF show competitive or slower performance, with non-autoregressive variants trading some accuracy for speed.
  • The KL term dominates the ELBO across models, indicating substantial reliance on latent space to predict discrete tokens.
  • A non-linear squared (NLSq) flow increases multimodality and improves modeling over pure affine flows in several ablation setups.
  • In polyphonic music tasks, AF/AF often outperforms several baselines and approaches RNN-NADE on Nottingham, while AF/SCF is generally close in performance.
  • Non-autoregressive generation (e.g., IAF/SCF) achieves speedups on sentence-level generation compared to autoregressive baselines, with some accuracy tradeoffs.

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.