[Paper Review] Insertion-based Decoding with automatically Inferred Generation Order
This paper proposes InDIGO, a novel insertion-based decoding method that infers flexible generation orders for sequence generation by modeling positions as relative offsets during autoregressive decoding. By extending the Transformer with relative-position-aware self-attention, InDIGO enables adaptive, non-left-to-right generation that achieves competitive or superior performance across machine translation, code generation, image captioning, and word order recovery tasks without requiring re-encoding or knowledge distillation.
Conventional neural autoregressive decoding commonly assumes a fixed left-to-right generation order, which may be sub-optimal. In this work, we propose a novel decoding algorithm -- InDIGO -- which supports flexible sequence generation in arbitrary orders through insertion operations. We extend Transformer, a state-of-the-art sequence generation model, to efficiently implement the proposed approach, enabling it to be trained with either a pre-defined generation order or adaptive orders obtained from beam-search. Experiments on four real-world tasks, including word order recovery, machine translation, image caption and code generation, demonstrate that our algorithm can generate sequences following arbitrary orders, while achieving competitive or even better performance compared to the conventional left-to-right generation. The generated sequences show that InDIGO adopts adaptive generation orders based on input information.
Motivation & Objective
- To address the limitation of fixed left-to-right generation order in neural autoregressive models, which may be suboptimal for certain tasks.
- To develop a decoding algorithm that supports arbitrary generation orders without requiring re-encoding the sequence at each step.
- To enable the model to infer optimal generation orders adaptively based on input context, rather than relying on predefined or fixed orders.
- To improve sequence generation performance by allowing insertion-based generation with relative position prediction, while maintaining computational efficiency.
- To demonstrate that adaptive generation orders can lead to better performance than conventional left-to-right decoding in diverse sequence generation tasks.
Proposed method
- The model uses a relative-position-based representation to encode generation order as latent variables, avoiding the need for absolute positions.
- At each decoding step, the model jointly predicts the next token and its relative insertion position in the output sequence.
- The Transformer architecture is extended with relative positional encoding inspired by Shaw et al. (2018) to support dynamic insertion operations.
- The model is trained using the evidence lower bound (ELBO) of the maximum likelihood objective, with approximate posterior distributions over generation orders.
- Two inference strategies are used: one with a pre-defined order and another using beam-search to infer adaptive orders.
- The final sequence is constructed by inserting predicted tokens at their inferred relative positions, maintaining autoregressive generation.
Experimental results
Research questions
- RQ1Can flexible, non-left-to-right generation orders improve sequence generation performance compared to conventional left-to-right decoding?
- RQ2Can a model automatically infer optimal generation orders based on input context, rather than relying on fixed or handcrafted orders?
- RQ3Does insertion-based decoding with relative position prediction achieve competitive performance without requiring re-encoding or knowledge distillation?
- RQ4How do adaptive generation orders vary based on input content, and can they be learned effectively through beam-search?
- RQ5Can the proposed method generalize across diverse sequence generation tasks such as translation, code generation, and image captioning?
Key findings
- InDIGO achieves competitive or better performance than left-to-right autoregressive models on four real-world tasks: machine translation, word order recovery, code generation, and image captioning.
- The model successfully learns to generate sequences using adaptive generation orders that depend on input content, as shown in case studies.
- InDIGO outperforms the baseline left-to-right Transformer on word order recovery and image captioning, demonstrating the benefit of flexible ordering.
- Unlike prior insertion-based models, InDIGO does not require re-encoding the partial sequence at each step, making it more efficient than methods using absolute positions.
- The method achieves strong performance without knowledge distillation, unlike related work such as Stern et al. (2019), which required it for competitive results.
- The use of relative positions enables efficient attention computation and avoids the computational overhead of re-encoding, making the approach scalable.
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.