Accurate Supervised and Semi-Supervised Machine Reading for Long Documents

Izzeddin Gur, Daniel Hewlett, Alexandre Lacoste, Llion JonesEMNLP 2017

Abstract

Traditional machine reading models based on Recurrent Neural Networks (RNNs) struggle with long documents due to vanishing gradients and linear computational complexity. We present the Sliding-Window Encoder Attentive Reader (SWEAR), a hierarchical architecture that processes documents by encoding small, overlapping windows in parallel. This approach eliminates the need for complex linguistic preprocessing like sentence tokenization. Furthermore, we introduce a semi-supervised framework using "reviewer" models pre-trained on unlabeled text to enhance performance in data-scarce environments. Evaluated on the WikiReading dataset, SWEAR achieves a new state-of-the-art Mean F1 of 76.8 and demonstrates significant robustness as document length increases, outperforming standard sequence-to-sequence models by 1.7% on documents exceeding 1,000 words.

Introduction

Machine reading comprehension (MRC) at scale requires models to process documents that can span thousands of words. Standard RNN-based architectures are inherently sequential, meaning they process text word-by-word. This leads to two primary failures: information from the beginning of a document is often lost by the time the model reaches the end, and the sequential nature creates a significant computational bottleneck.

While previous attempts to solve this involved breaking documents into sentences, such methods are fragile and dependent on perfect tokenization. This paper proposes a simpler, more robust hierarchy based on fixed-length windows. By combining this architecture with unsupervised pre-training, we address both the computational challenges of long documents and the practical challenge of limited labeled data.

The SWEAR Architecture

The core of the proposed system is the SWEAR (Sliding-Window Encoder Attentive Reader) model. Instead of a single pass over the entire document, SWEAR utilizes a hierarchical approach:

  1. Sliding-Window Encoding: The document is divided into overlapping windows of a fixed length $l$ (typically 30 words).
  2. Parallel Processing: Each window is encoded by a Gated Recurrent Unit (GRU) in parallel, conditioned on the question encoding. This keeps the sequential depth of the model constant, regardless of the total document length.
  3. Attention Mechanism: An attention layer identifies the most relevant window encodings relative to the query, aggregating them into a single document vector for the final decoding stage.
The SWEAR architecture: parallel window encoding followed by attention and decoding.

Semi-Supervised Learning with Reviewers

To improve performance when labeled data is scarce, the authors leverage unlabeled Wikipedia text through unsupervised pre-training. They utilize Window Autoencoders (specifically Variational Recurrent Autoencoders) to learn robust text representations.

To integrate these pre-trained weights without the risk of "catastrophic forgetting" during fine-tuning, the authors introduce Reviewer layers. These are additional trainable RNNs that sit atop the fixed, pre-trained window encodings. This "Reviewer" strategy allows for efficient offline encoding of documents, significantly accelerating inference times for new queries.

Experimental Results

The model was evaluated on the WikiReading dataset, which consists of approximately 18.58 million instances. SWEAR achieved a state-of-the-art Mean F1 score of 76.8, surpassing previous benchmarks.

A critical finding of the study is that the performance gap between SWEAR and traditional seq2seq models widens as documents become longer. As shown in the table below, for documents in the largest category (over 1,000 words), SWEAR provides a 1.7% absolute improvement in accuracy over the baseline.

Performance comparison across document lengths, showing SWEAR's advantage on longer texts.

In semi-supervised tests using only 1% of the training data, the SWEAR-PR (Progressive Reviewer) model reached an F1 of 66.5, compared to 63.5 for the purely supervised version. This confirms that window-level unsupervised pre-training effectively captures semantic features that are highly transferable to the reading task.

Conclusion

This work demonstrates that complex linguistic structures are not a prerequisite for effective hierarchical machine reading. Fixed-length sliding windows provide a computationally efficient and accurate alternative to sentence-based models. By combining parallel window encoding with semi-supervised reviewer layers, the SWEAR architecture offers a scalable solution for extracting information from massive, unstructured document collections even when labeled examples are limited.

Summary updated

BibTeX
@inproceedings{gur2017accurate,
  author = {Izzeddin Gur and Daniel Hewlett and Alexandre Lacoste and Llion Jones},
  title = {{Accurate Supervised and Semi-Supervised Machine Reading for Long Documents}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2017},
  url = {https://openreview.net/forum?id=SyWOQMGdbB},
}
Figure