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

SLM: Learning a Discourse Language Representation with Sentence Unshuffling

Haejun Lee, Drew A. Hudson, Kangwook Lee, Christopher D. Manning

Abstract

While Transformer-based models like BERT excel at capturing local token-level context, they often fail to grasp the hierarchical discourse structure of natural language. We introduce SLM (Sentence-level Language Modeling), a pre-training framework that employs a "Sentence Unshuffling" task to force models to learn the logical flow of documents. By reconstructing the original order of shuffled sentences, SLM develops a robust understanding of coreference, temporal dependencies, and discourse markers. Our results demonstrate that SLM significantly outperforms standard BERT on benchmarks like GLUE and SQuAD, achieving state-of-the-art performance on discourse-specific evaluations.

The Discourse Challenge

Natural language is inherently hierarchical: words form phrases, phrases form sentences, and sentences form a coherent discourse. Existing pre-training objectives, such as Next Sentence Prediction (NSP), are often too coarse to encourage a deep understanding of why a specific sequence of sentences is logical. Without an explicit objective to learn discourse, models frequently rely on shallow statistical cues rather than true narrative comprehension.

Discourse relations like coreference and question-answer logic that models must capture to understand narrative flow.

To truly understand a document, a model must resolve complex relationships, such as identifying that a pronoun in one sentence refers to a proper noun in another, or recognizing the temporal sequence of events. Standard models often treat text as a flat sequence, largely ignoring these connections.

Methodology: Sentence Unshuffling

The SLM architecture consists of two primary components:

  1. Encoder: A BERT-like Transformer that utilizes a special [SENT] token at the beginning of each sentence to serve as a high-level semantic summary.
  2. Sequence Re-constructor (SR): A lightweight, 3-layer decoder equipped with a pointer network.

The core of SLM is the Sentence Unshuffling task. During pre-training, input sentences are randomly permuted. The model must then predict the original index of each sentence sequentially. This task requires the model to identify discourse markers (e.g., "However," "In conclusion"), resolve coreferences, and understand the logical progression of the text.

The Sequence Re-constructor architecture using a pointer network to solve the sentence unshuffling task.

The final training objective is a joint loss combining standard Masked Language Modeling (MLM) with the new SLM loss. This ensures the model maintains token-level accuracy while gaining sentence-level coherence.

Experimental Results

SLM was pre-trained on English Wikipedia and BookCorpus and evaluated across several major benchmarks:

  • GLUE Benchmark: SLM-Base showed remarkable improvements, particularly in the Recognizing Textual Entailment (RTE) task, where it outperformed BERT-Base by 12.1 points.
  • SQuAD: On SQuAD v1.1, SLM-Base achieved an F1 score of 92.2. Notably, this matches the performance of the much larger T5-Base model, despite SLM having half the parameters and being trained on significantly less data.
  • DiscoEval: In discourse-specific tasks like "Sentence Position" (SP), SLM surpassed the previous state-of-the-art (CONPONO) by 12.7 points, confirming its superior grasp of document-level structure.

Discussion and Key Insights

A pivotal finding of this research is that standard BERT is largely "discourse-blind." In ablation studies, a BERT model trained on shuffled sentences performed similarly to one trained on ordered sentences for tasks like SQuAD. This suggests that standard MLM/NSP objectives do not inherently capture discourse structure.

By contrast, the SLM objective adds only minimal computational overhead (~7.1%) while providing substantial gains in relational understanding. This highlights that designing more sophisticated, linguistically-informed pre-training tasks can be more effective than simply increasing model size or data volume.

Conclusion

SLM provides a blueprint for moving beyond "bag-of-sentences" modeling. By treating document understanding as a logical reconstruction puzzle, SLM enables models to follow the narrative thread of a text, leading to more robust and coherent language representations. Future work will explore scaling SLM to larger architectures and applying the shuffling logic to finer-grained linguistic units.

Summary updated

BibTeX
@inproceedings{lee2020slm,
  author = {Haejun Lee and Drew A. Hudson and Kangwook Lee and Christopher D. Manning},
  title = {{SLM: Learning a Discourse Language Representation with Sentence Unshuffling}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.120},
}
Figure