TL;DR
This paper introduces a unified framework for sequence generation that bridges the gap between directed (like traditional RNNs/LSTMs) and undirected (like BERT) models. By decoupling position selection from symbol replacement, they enable existing decoding strategies for directed models to be applied to powerful undirected models, achieving competitive translation quality with potential for constant-time generation.
What Problem Does This Paper Address?
While models like BERT have revolutionized discriminative language understanding tasks, their application to generative tasks, like producing text, has been challenging. Unlike directed models that generate tokens sequentially, undirected models consider the entire context (left and right) for each token. This makes direct generation from them non-trivial, as it requires deciding where to generate and what to generate simultaneously. The paper addresses this by proposing a general framework that unifies the generation process for both directed and undirected models, making it easier to adapt and develop new generation strategies for powerful pre-trained models like BERT.
Methods
The core of the paper is a generalized framework for sequence generation. This framework models generation as a process that first predicts the sequence length and then iteratively alternates between two steps:
- Coordinate Selection: Deciding which positions in the current (partially generated) sequence need to be updated.
- Symbol Replacement: Generating new symbols for the selected positions.
This separation is key. By defining different distributions for length prediction, coordinate selection, and symbol replacement, the framework can encompass various existing sequence generation models as special cases, including:
- Autoregressive: Generating one token at a time, left-to-right.
- Non-autoregressive (iterative refinement): Replacing all tokens simultaneously.
- Semi-autoregressive: Generating chunks of tokens.
The paper then adapts decoding algorithms originally designed for directed models (like greedy search and beam search) to work with this generalized framework, particularly for undirected models like BERT. They also propose novel coordinate selection strategies, including learned policies trained with reinforcement learning.
Datasets
- WMT'14 English-German translation dataset: Used for training and evaluating machine translation models.
- 5M monolingual sentences from WMT NewsCrawl 2007-2008: Used for pre-training the masked translation model.
No new benchmarks were introduced.
Key Insights and Ideas
- Decoupling is Powerful: Separating the "where to generate" (coordinate selection) from the "what to generate" (symbol replacement) is a fundamental insight that unifies diverse generation paradigms.
- Bridging the Gap: This framework allows powerful, pre-trained undirected models (like BERT) to be used for generation by adapting established decoding techniques from directed models.
- Adaptive Generation Orders: Beyond simple left-to-right generation, the proposed methods can learn to generate sequences in more flexible orders (e.g., outside-in, right-to-left), which can be more efficient or effective depending on the task.
- Constant-Time Translation is Feasible: The framework enables constant-time generation strategies that achieve translation quality comparable to linear-time methods, offering significant speedups.
Key Results
- Competitive Translation Quality: The proposed approach, when applied to a BERT-like masked translation model, achieved translation quality on WMT'14 English-German that was competitive with state-of-the-art autoregressive models (less than 1 BLEU difference).
- Constant-Time Performance: Constant-time translation strategies achieved results on par with linear-time translation from the same model, and were competitive with state-of-the-art autoregressive models. For example, with a budget of T=20 iterations, constant-time translation achieved 30.13 BLEU (De->En), comparable to linear-time (30.58 BLEU) and autoregressive (30.92 BLEU).
- Adaptive Strategies Outperform Uniform: Deterministic coordinate selection strategies (e.g., easy-first, learned) significantly outperformed uniform random selection, improving BLEU scores by up to 3 points.
- Learned Strategies Show Promise: Learned coordinate selection policies, trained via reinforcement learning, achieved strong performance, often outperforming handcrafted strategies.
- Generation Order Matters: Different generation orders (left-to-right, right-to-left, outside-in) were visualized and shown to be learned by adaptive strategies, with some orders (like easy-first) producing lower energy (more likely) sequences.
Limitations and Future Work
- Limitations:
- While competitive, the masked translation model still showed a slight performance difference compared to conventional autoregressive models, potentially due to the difference between training (masked) and test (generative) settings.
- The paper notes that while constant-time decoding is efficient, it might not always be optimal for refining predicted symbols, especially when annealing the number of tokens generated per step (L->1).
- Future Work:
- The authors suggest extending the framework to other structured data generation tasks, such as grids (images) and arbitrary graphs.
- Further exploration of different coordinate selection and symbol replacement strategies is implied.
- Investigating the impact of different training objectives and model architectures within this generalized framework.
Summary updated