Transformer Models for Text Coherence Assessment

Tushar Abhishek, Daksh Rawat, Manish Gupta, Vasudeva VarmaarXiv 2021

Introduction

Coherence is the "glue" that makes a document logical and readable. It involves smooth topic transitions, logical ordering of ideas, and the consistent use of entities. For AI, assessing coherence is a complex task essential for high-quality summarization, machine translation, and automated essay scoring. Historically, methods like "Entity-Grids" or RNNs were used, but they often failed to capture long-range dependencies. This paper explores whether Transformer models, like RoBERTa, can better capture these subtle signals.

Proposed Architectures

The authors propose four distinct architectures based on RoBERTa (and Longformer for longer texts) to evaluate text coherence:

  1. Vanilla Transformer: Feeds the entire document into a standard Transformer to predict a coherence score.
  2. Hierarchical Transformer: Uses a two-level approach with a sentence encoder followed by a document encoder to understand global structure.
  3. Multi-Task Learning (MTL): Trains on a primary coherence task alongside an auxiliary Textual Entailment task, leveraging the logical relationship between the two.
  4. Fact-aware Transformer: Utilizes Information Extraction to pull "facts" (subject-verb-object triples), encoding them separately to track the "factual flow" of discourse.
Architectural diagrams of the four proposed Transformer-based models: Vanilla (A), Hierarchical (B), Multi-task (C), and Fact-aware (D).

For sentence ordering, a Siamese (Twin) Network structure is used to compare coherent and shuffled documents.

Datasets and Evaluation

The models were evaluated on two major benchmarks:

  • WSJ (Wall Street Journal): A synthetic dataset for distinguishing original articles from randomly shuffled versions.
  • GCDC (Grammarly Corpus of Discourse Coherence): A realistic dataset containing emails and reviews from four domains (Yahoo, Clinton, Enron, Yelp), manually labeled by experts for coherence levels (Low, Medium, High).

Key Insights

  • Entailment as a Proxy: The MTL approach proved highly effective, suggesting that logical entailment is a strong indicator of coherence.
  • Facts vs. Quality: The Fact-aware model excelled at sentence ordering (WSJ) but was less helpful for judging general writing quality (GCDC).
  • The "Medium" Challenge: Models struggled most with "medium-level" coherence, where differences in writing are subtle.
  • Domain Generalization: Training across multiple domains improved performance, indicating universal properties of coherence.

Experimental Results

The proposed models set new state-of-the-art (SOTA) benchmarks. On the GCDC 3-way classification, they achieved a 3.0% absolute accuracy increase. For sentence ordering on GCDC, accuracy improved by 6.4%. Notably, on the WSJ dataset, the MTL model reached a Pairwise Ranking Accuracy (PRA) of 98.38%.

Comparison of the proposed models against various baselines on the WSJ dataset, showing the MTL with Transformers achieving state-of-the-art performance.

Conclusion

While these models demonstrate significant progress, they are currently limited to closed settings. Future work aims to move toward open-domain coherence assessment and integrate these "judges" directly into text generation systems to improve the logical flow of AI-generated content.

Summary updated

BibTeX
@misc{abhishek2021transformer,
  author = {Tushar Abhishek and Daksh Rawat and Manish Gupta and Vasudeva Varma},
  title = {{Transformer Models for Text Coherence Assessment}},
  year = {2021},
  eprint = {2109.02176},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2109.02176},
}
Figure