This paper from researchers at Carnegie Mellon University introduces a fresh perspective on sentence ordering—the task of taking a jumbled set of sentences and arranging them into a coherent narrative. While most recent approaches treat this as a sequence prediction problem (like machine translation), this paper argues that framing it as a constraint-solving problem using topological sort is simpler, more efficient, and more accurate.
TL;DR
Instead of trying to predict an entire sequence of sentences at once, the authors break the problem down into predicting the relative order of sentence pairs. By treating these pairs as constraints in a directed graph and applying a standard topological sort, their model (B-TSort) significantly outperforms state-of-the-art sequence-to-sequence models, especially on longer documents.
What Problem Does This Paper Address?
Sentence ordering is crucial for downstream tasks like multi-document summarization, storytelling, and automated essay scoring. The goal is to maximize the "coherence" of the final text.
The prevailing trend has been to use deep neural networks—specifically pointer networks—to predict the sequence one sentence at a time. However, these models have two major drawbacks:
- Error Propagation: The prediction at step t depends heavily on the prediction at step t-1. One wrong move early on can derail the entire sequence.
- Search Space Explosion: For a document with $n$ sentences, there are $n!$ possible permutations. Searching this space effectively is computationally expensive and prone to sub-optimal results.
Methods
The authors propose a two-stage framework: Constraint Learning followed by Topological Sort.
- Constraint Learning: Instead of the whole sequence, the model learns to predict the relative order of just two sentences ($s_1$ and $s_2$). It asks: "Does $s_2$ follow $s_1$?"
- B-TSort (BERT-based): This version leverages BERT’s pre-trained "Next Sentence Prediction" objective. They feed a sentence pair into BERT and fine-tune it to classify their relative order.
- L-TSort (LSTM-based): A simpler version using Bi-LSTMs to encode sentences, used primarily to isolate the benefit of the constraint-framing versus the power of BERT.
- Topological Sort: Once the model predicts the relative order for all possible pairs in a document, these predictions are treated as edges in a directed graph (where sentences are nodes). A standard topological sort algorithm then finds a linear ordering that satisfies these constraints.
While predicting all pairs takes $O(n^2)$ time, the authors note that integrating this with a Merge Sort approach could reduce the number of required predictions to $O(n \log n)$.
Datasets
The models were evaluated on four diverse datasets:
- NIPS, NSF, and AAN abstracts: Three datasets consisting of scientific paper abstracts, which typically have a very logical, structured flow.
- SIND captions: The Sequential Image Narrative Dataset, containing five-sentence stories based on images. These are more informal and narrative-driven.
Key Insights and Ideas
- Local vs. Global: Coherence is often driven by local transitions. By focusing on pairwise constraints, the model captures these local signals more robustly than a sequence-to-sequence model trying to maintain a global state.
- Simplifying the Search: Moving from a search space of $n!$ (permutations) to $n^2$ (pairs) makes the problem much more tractable.
- BERT is a Natural Fit: BERT was literally trained to predict if one sentence follows another. The authors successfully "recycled" this pre-training for the sentence ordering task.
- Scaling to Length: Sequence-to-sequence models often struggle as documents get longer because the "memory" of the decoder becomes strained. The B-TSort approach remains stable because each pairwise decision is independent of the others.
Key Results
The B-TSort model outperformed the previous state-of-the-art (Attention Order Network, or AON) across almost all metrics and datasets.
As shown in Figure 1, B-TSort achieved a Perfect Match Ratio (PMR) of 32.59 on NIPS abstracts, nearly doubling the performance of the standard AON baseline (16.25). Even when the baseline was upgraded with BERT embeddings (B-AON), B-TSort still maintained a significant lead.
The authors also performed a Sentence Displacement Analysis (Figure 5 below), which measures how close a predicted sentence is to its actual position. B-TSort consistently placed sentences closer to their "Gold" positions than the baselines.
Human evaluations on the SIND dataset further confirmed these results, with judges preferring B-TSort's ordering over B-AON's by a 10% margin.
Limitations and Future Work
The primary limitation acknowledged by the authors is the lack of global context. Because the classifier only looks at two sentences at a time, it might miss broader thematic shifts that a paragraph-level representation could capture.
Future work aims to incorporate a global paragraph representation into the pairwise constraint prediction to get the "best of both worlds"—local precision with global awareness.
Summary updated