Text Segmentation as a Supervised Learning Task

Omri Koshorek, Adir Cohen, Noam Mor, Michael Rotman, Jonathan Berant

Abstract: Text segmentation, the task of dividing a document into contiguous segments based on its semantic structure, is a longstanding challenge in language understanding. Previous work on text segmentation focused on unsupervised methods such as clustering or graph search, due to the paucity in labeled data. In this work, we formulate text segmentation as a supervised learning problem, and present a large new dataset for text segmentation that is automatically extracted and labeled from Wikipedia. Moreover, we develop a segmentation model based on this dataset and show that it generalizes well to unseen natural text.

Introduction

Text segmentation is a foundational task for document understanding, serving as a prerequisite for applications like summarization and information extraction. Historically, the field has been bottlenecked by a lack of large-scale labeled datasets, forcing a reliance on unsupervised methods—such as clustering or graph-based searches—or synthetic datasets created by stitching together random sentences. These approaches often fail to capture the natural semantic flow of real-world documents and are frequently computationally expensive.

This research shifts the paradigm by treating text segmentation as a supervised learning task. By introducing WIKI-727K, a massive dataset of 727,000 labeled Wikipedia documents, the authors enable the training of high-performance neural models that outperform traditional baselines while maintaining linear computational efficiency.

Methods: Hierarchical Neural Architecture

The proposed model utilizes a hierarchical bidirectional Long Short-Term Memory (Bi-LSTM) network designed to capture context at both the word and sentence levels.

Hierarchical Bi-LSTM architecture for text segmentation.

The architecture consists of three primary stages:

  1. Sentence Embedding Layer: A two-layer Bi-LSTM processes word tokens (initialized with GoogleNews word2vec). Max-pooling is applied over the LSTM outputs to generate a fixed-size vector representation for each sentence.
  2. Segmentation Prediction Layer: A second two-layer Bi-LSTM consumes the sequence of sentence vectors. This layer analyzes the surrounding context to identify potential topic shifts.
  3. Output and Inference: A fully-connected layer with a softmax function predicts the probability $p_i$ that a sentence ends a segment. During inference, a segment boundary is created whenever $p_i$ exceeds a threshold $ au$, optimized on a validation set.

The WIKI-727K Dataset

The core contribution of this work is the creation of WIKI-727K, which contains 727,746 English Wikipedia documents. The authors leveraged Wikipedia’s Table of Contents (TOC) to automatically label segment boundaries, providing a "natural" ground truth at an unprecedented scale. This dataset allows models to learn the nuances of topical transitions in coherent, human-written text rather than relying on artificial, synthetic boundaries.

Experimental Results

The model was evaluated using the $P_k$ metric, where a lower score indicates a lower probability of segmentation error. The results demonstrate that the supervised approach significantly outperforms previous state-of-the-art unsupervised methods on natural text.

Comparison of $P_k$ scores across various datasets. Lower is better.

Key Findings:

  • Accuracy and Generalization: On the WIKI-727K test set, the model achieved a $P_k$ of 22.13. It also demonstrated strong generalization on the "Cities" dataset (19.68), outperforming the previous state-of-the-art (22.1).
  • Human-Level Performance: On the WIKI-50 subset, the model's performance (18.24) approached that of human annotators (14.97).
  • The Synthetic Trap: A critical insight was that methods performing well on synthetic data (like the Choi dataset) often fail on real-world text. For instance, the GRAPHSEG method outperformed the neural model on synthetic data but performed worse than a random baseline on natural Wikipedia text.
  • Efficiency: The neural model is significantly faster than graph-based alternatives. On a mid-range CPU, it processed documents in an average of 1.6 seconds, compared to 23.6 seconds for GRAPHSEG.

Conclusion and Future Work

By reformulating text segmentation as a supervised task and providing the necessary data, this work establishes a new state-of-the-art for the field. While the model showed slight domain sensitivity on technical datasets (e.g., "Elements"), this could likely be mitigated with domain-specific embeddings. Future research may explore structured global models that consider all potential boundaries simultaneously or extend the architecture to handle hierarchical segmentation (e.g., sub-sections).

Summary updated

BibTeX
@inproceedings{koshorek2018text,
  author = {Omri Koshorek and Adir Cohen and Noam Mor and Michael Rotman and Jonathan Berant},
  title = {{Text Segmentation as a Supervised Learning Task}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2018},
  url = {https://openreview.net/forum?id=BJEFpz-uZS},
}
Figure