NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Reformulating Sentence Ordering as Conditional Text Generation

Somnath Basu Roy Chowdhury, Faeze Brahman, Snigdha Chaturvedi · OpenReview

Abstract

The task of organizing a shuffled set of sentences into a coherent text has been used to evaluate a machine's understanding of causal and temporal relations. We formulate the sentence ordering task as a conditional text-to-marker generation problem. We present Reorder-BART (Re-BART) that leverages a pre-trained Transformer-based model to identify a coherent order for a given set of shuffled sentences. The model takes a set of shuffled sentences with sentence-specific markers as input and generates a sequence of position markers of the sentences in the ordered text. Re-BART achieves the state-of-the-art performance across 7 datasets in Perfect Match Ratio (PMR) and Kendall's tau ($\tau$). We perform evaluations in a zero-shot setting, showcasing that our model is able to generalize well across other datasets. We additionally perform several experiments to understand the functioning and limitations of our framework.

Introduction

Organizing a shuffled set of sentences into a coherent narrative is a classic challenge in Natural Language Processing (NLP). It serves as a litmus test for a machine's ability to understand causal, temporal, and logical relationships within a discourse. Historically, researchers tackled this using complex ranking algorithms, pairwise sentence comparisons, or entity grids. However, these methods often struggle to capture the "global" context of a paragraph.

While modern generative models (like GPT or T5) could theoretically "rewrite" the sentences in the right order, they suffer from neural text degeneration—they might hallucinate new words, skip sentences, or repeat phrases. This makes them unreliable for a task that requires perfect reconstruction of the input. To address this, we introduce RE-BART (Reorder-BART), which reformulates the task into a robust "text-to-marker" generation problem.

The RE-BART Framework

RE-BART treats sentence ordering not as a ranking problem, but as a conditional text-to-marker generation task. The process involves several key steps:

  1. Input Transformation: Each sentence in a shuffled set is prefixed with a unique marker (e.g., <S1> I packed my raincoat. <S2> The forecast called for rain...).
  2. The Architecture: The model utilizes BART, a denoising autoencoder. BART is particularly suited for this because one of its original pre-training objectives was "sentence permutation"—learning to restore the original order of shuffled sentences.
  3. Text-to-Marker Generation: Instead of the decoder generating the full text of the sentences, it only generates the sequence of markers (e.g., 2 1 3...). This restriction of the output space to position indices bypasses the hallucinations common in full text-to-text generation.
  4. Global Encoding: Unlike models that look at sentence pairs, RE-BART encodes the entire shuffled sequence at once. This allows the attention mechanism to capture interactions between all sentences simultaneously to determine their relative order.
The RE-BART architecture: Shuffled sentences with markers are encoded, and the decoder generates a sequence of markers representing the correct order.

Experimental Setup and Datasets

The model was evaluated on seven diverse English datasets across two main domains:

  • Scientific Abstracts: NeurIPS, AAN, NSF, and arXiv. These test the model's grasp of logical flow in technical writing.
  • Narratives: ROCStories (everyday stories), SIND (visual storytelling), and Wikipedia Movie Plots (complex, longer descriptions).

Key Results

RE-BART achieved new state-of-the-art (SOTA) performance across all seven datasets. The primary metrics used were:

  • Perfect Match Ratio (PMR): The model saw relative improvements between 11.3% and 36.2%. PMR measures the fraction of instances where the entire sequence is ordered perfectly.
  • Kendall’s Tau ($\tau$): Improvements ranged from 3.6% to 13.4%. This metric measures the correlation between the predicted and gold-standard sequences.

Furthermore, the model demonstrated remarkable zero-shot generalization. A model trained on Wikipedia Movie Plots (which features complex language and longer sequences) actually outperformed previous SOTA models trained specifically on other datasets, suggesting that RE-BART learns a generalized, domain-agnostic concept of coherence.

Analysis and Insights

A critical finding was the "BART Advantage." When comparing BART to T5, BART significantly outperformed its counterpart despite similar architectures. This is attributed to BART’s specific pre-training objective of reordering permuted sentences, which provides a superior inductive bias for this task. Visualizing the embedding spaces reveals that BART develops more distinct representations for sentence positions compared to T5.

Comparison of BART and T5 embeddings, illustrating the superior inductive bias of BART for the sentence ordering task.

Additionally, the model is exceptionally good at identifying "head" (first) and "tail" (last) sentences. It likely picks up on stylistic cues—like introductory phrases ("In this paper...") or concluding remarks ("Our results show...")—to anchor the rest of the sequence.

Limitations and Future Work

Despite its success, performance degrades as the number of sentences increases. On datasets like arXiv or NSF, which have higher average sentence counts, the task becomes exponentially harder. Accuracy also drops as the "degree of shuffling" (the number of swaps needed to fix the order) increases. Future work will explore making the model more robust to extremely long sequences and integrating these coherence models into larger multi-document summarization pipelines.

Summary updated

BibTeX
@misc{chowdhury2021reformulating,
  author = {Somnath Basu Roy Chowdhury and Faeze Brahman and Snigdha Chaturvedi},
  title = {{Reformulating Sentence Ordering as Conditional Text Generation}},
  year = {2021},
  eprint = {2104.07064},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.07064},
}
Figure