[Paper Review] FlowSeq: Non-Autoregressive Conditional Sequence Generation with Generative Flow
FlowSeq proposes a non-autoregressive sequence generation model using generative flows to model complex conditional distributions over latent variables, enabling efficient parallel decoding. It achieves state-of-the-art performance on NMT benchmarks with nearly constant decoding time regardless of sequence length, outperforming standard autoregressive models in inference speed while maintaining competitive translation quality.
Most sequence-to-sequence (seq2seq) models are autoregressive; they generate each token by conditioning on previously generated tokens. In contrast, non-autoregressive seq2seq models generate all tokens in one pass, which leads to increased efficiency through parallel processing on hardware such as GPUs. However, directly modeling the joint distribution of all tokens simultaneously is challenging, and even with increasingly complex model structures accuracy lags significantly behind autoregressive models. In this paper, we propose a simple, efficient, and effective model for non-autoregressive sequence generation using latent variable models. Specifically, we turn to generative flow, an elegant technique to model complex distributions using neural networks, and design several layers of flow tailored for modeling the conditional density of sequential latent variables. We evaluate this model on three neural machine translation (NMT) benchmark datasets, achieving comparable performance with state-of-the-art non-autoregressive NMT models and almost constant decoding time w.r.t the sequence length.
Motivation & Objective
- To address the inefficiency of autoregressive sequence generation, which relies on left-to-right token generation and is not easily parallelizable.
- To improve non-autoregressive sequence generation by modeling complex conditional dependencies between output tokens through expressive latent variables.
- To leverage generative flows for efficient density estimation and sampling in the latent space, enabling high-quality joint distribution modeling of output sequences.
- To achieve fast, parallel decoding with decoding time nearly invariant to sequence length, unlike autoregressive models with super-linear time complexity.
- To provide a simple, effective, and efficient alternative to autoregressive models that maintains competitive translation quality while drastically improving inference speed.
Proposed method
- FlowSeq models the conditional distribution $ P_{\theta}(\mathbf{y}|\mathbf{x}) $ using a latent variable $ \mathbf{z} $, where $ \mathbf{z} $ is drawn from a prior $ p_{\theta}(\mathbf{z}|\mathbf{x}) $ learned via generative flow.
- Generative flows are used to model the complex prior distribution $ p_{\theta}(\mathbf{z}|\mathbf{x}) $, enabling efficient density estimation and sampling through invertible, differentiable transformations.
- The decoder $ P_{\theta}(\mathbf{y}|\mathbf{z},\mathbf{x}) $ factorizes into independent token predictions: $ \prod_{t=1}^{T} P_{\theta}(y_t|\mathbf{z},\mathbf{x}) $, enabling parallel generation.
- The model is trained via maximum likelihood using a variational lower bound, with the flow-based prior capturing inter-token dependencies in the output sequence.
- During inference, multiple latent samples $ \mathbf{z} $ are drawn and decoded in parallel, followed by rescoring using beam search or diversity-aware sampling.
- Decoding is accelerated via batching and remains nearly constant in time regardless of sequence length due to the absence of autoregressive recurrence.
Experimental results
Research questions
- RQ1Can generative flows effectively model the prior distribution over latent variables to improve non-autoregressive sequence generation?
- RQ2Does FlowSeq achieve competitive translation quality compared to state-of-the-art non-autoregressive and autoregressive models?
- RQ3Can FlowSeq maintain nearly constant decoding time across varying sequence lengths, unlike autoregressive models with super-linear complexity?
- RQ4How do sampling hyperparameters such as temperature and number of candidates affect the diversity and quality of generated sequences?
- RQ5Can the latent space of FlowSeq be leveraged for controllable text generation or other downstream applications?
Key findings
- FlowSeq achieves BLEU scores comparable to state-of-the-art non-autoregressive models on WMT2014, WMT2016, and IWSLT-2014 translation benchmarks.
- Decoding speed for FlowSeq increases by 594% when batch size is increased from 1 to 128, significantly outpacing the autoregressive Transformer in batching efficiency.
- FlowSeq maintains nearly constant decoding time regardless of sequence length, while the autoregressive Transformer’s decoding time increases linearly with sequence length.
- Increasing the number of samples per length candidate ($ r $) improves rescoring BLEU, with optimal performance observed at higher sample sizes and moderate temperatures (0.3–0.5).
- Higher sampling temperatures (0.3–0.5) increase output diversity without sacrificing translation quality, while a temperature of 1.0 introduces noise and degrades performance.
- FlowSeq-generated hypotheses show improved diversity (lower pairwise-BLEU) compared to beam search, and when combined with higher temperature, achieve a favorable trade-off between diversity and quality on the WMT14-ENDE test set.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.