Introduction
Sentence ordering is a critical task in natural language processing that involves arranging a set of permuted sentences into a coherent paragraph. Achieving human-level coherence requires a deep understanding of logical flow and global dependencies. Traditionally, this task has been approached using autoregressive models, which predict sentences sequentially. However, a recent study presented at EMNLP 2023 introduces NAON (Non-Autoregressive Ordering Network), a framework that breaks this step-by-step bottleneck by predicting the entire sequence in parallel.
The Limitations of Autoregressive Models
Most existing sentence ordering models utilize an encoder-decoder framework paired with a pointer network. These models are inherently autoregressive, meaning they predict the $t$-th sentence conditioned on the previously predicted $t-1$ sentences. This approach suffers from two primary drawbacks:
- Unilateral Dependencies: The model primarily considers "backward" context. It lacks a mechanism to fully integrate the relationships between a sentence and those intended to follow it in the final sequence.
- Computational Inefficiency: Sequential prediction is slow, with inference time increasing linearly with the number of sentences, making it less suitable for long-form documents.
The authors argue that sentence ordering is uniquely positioned for Non-Autoregressive Translation (NAT). Unlike standard machine translation, the target length in sentence ordering is fixed and known, and there is a strict one-to-one mapping between input sentences and output positions.
Methodology: The NAON Framework
The proposed NAON model consists of three integrated components designed to capture global context while maintaining high inference speeds.
1. Basic Sentence Encoder
Each sentence in the input set is first encoded into a dense vector representation using a pre-trained BERT-base model. This provides a rich semantic foundation for each individual unit of text.
2. Contextual Sentence Encoder
To capture the relationships between sentences, a Transformer-based contextual encoder is employed. Crucially, positional embeddings are omitted at this stage to ensure the encoding remains order-invariant. This allows the model to treat the input as an unordered set, focusing purely on the semantic inter-dependencies between sentences.
3. Non-Autoregressive Decoder (NAD)
The NAD takes all target positions ($1, 2, \dots, N$) as input simultaneously. Using multi-head attention, it maps these positions to the most appropriate sentence embeddings from the encoder in a single parallel step.
The "Secret Sauce": Exclusive Loss
A significant challenge in non-autoregressive models is the "multi-modality" problem, which often manifests as sentence repetition (e.g., predicting the same sentence for multiple positions). To mitigate this, the authors introduced an Exclusive Loss ($L_{ex}$). This loss function treats the task as a matching problem, penalizing the model if multiple positions select the same sentence or if a sentence is not assigned to any position.
Experimental Results
NAON was evaluated across six diverse datasets, including academic abstracts (NIPS, arXiv, NSF, AAN) and storytelling datasets (SIND, ROCStory).
- Performance: NAON achieved state-of-the-art or competitive results compared to top autoregressive models like AON and HAN.
- Efficiency: The model demonstrated a significant speedup, running 1.3x to 1.6x faster than standard autoregressive pointer networks. When compared to ranking-based models like B-TSort, NAON was up to 27x faster.
- Repetition Control: The Exclusive Loss proved vital; without it, repetition occurred in 99% of test cases. With the loss, this dropped significantly, and a final greedy selection strategy ensured a perfect 1-to-1 mapping during inference.
- Comparison with LLMs: In a zero-shot evaluation, ChatGPT performed poorly on this task, often hallucinating content or failing to utilize all provided sentences, highlighting the continued need for specialized structural models.
Conclusion
NAON represents a significant step forward in sentence ordering by demonstrating that non-autoregressive models can achieve superior coherence and speed. By leveraging bilateral dependencies and a novel exclusive loss, NAON overcomes the limitations of sequential prediction. Future work may explore more sophisticated inference algorithms, such as the Hungarian algorithm, or incorporate iterative refinement techniques to further enhance performance on complex, long-form documents.
Summary updated