Text Understanding with the Attention Sum Reader Network

Rudolf Kadlec, Martin Schmid, Ondrej Bajgar, Jan KleindienstACL 2016

Abstract

The Attention Sum (AS) Reader is a streamlined neural network architecture designed for cloze-style reading comprehension tasks. By replacing complex "blending" mechanisms with a straightforward "pointer sum" attention—which aggregates the probability of a word across all its occurrences in a document—the model achieved new state-of-the-art results on major benchmarks like the CNN/Daily Mail and Children’s Book Test datasets. This paper details the architecture's design, which prioritizes direct selection over synthetic representation, and evaluates its performance against previous state-of-the-art models.

Introduction

Machine Reading Comprehension (MRC) is a fundamental challenge in natural language processing, requiring models to extract meaning from text to answer specific queries. A common evaluation framework is the "cloze-style" task, where a word or named entity is removed from a sentence (the question), and the model must identify the correct missing word from a provided context document.

Prior to the AS Reader, models like the "Attentive Reader" relied on complex mechanisms to "blend" various word representations from the document into a single vector for comparison against the question. However, for extractive tasks where the answer is a single word already present in the text, these blending techniques can be counterproductive. Averaging representations can result in a "synthetic" vector that does not correspond to any real word in the vocabulary. The AS Reader addresses this by using a direct selection mechanism.

The Attention Sum Reader Architecture

The AS Reader architecture follows a "less is more" philosophy, consisting of three primary stages:

  1. Encoding: The model uses two bidirectional Gated Recurrent Units (GRUs). One reads the document to create contextual embeddings for every word, while the other reads the question to produce a single query vector.
  2. Attention (The Pointer): The model computes a similarity score (dot product) between the query vector and every word embedding in the document. These scores are normalized via a softmax function to create an attention distribution over the document.
  3. Summation (The Sum): This is the model's key innovation. Instead of picking a single most likely position, the model sums the attention scores for every instance of a specific candidate word. For example, if a candidate entity appears multiple times, its total probability is the sum of the attention scores at all those positions.
Attention distribution on a CNN/Daily Mail example.

This "Pointer Sum" mechanism allows the model to aggregate evidence from multiple parts of the text, making it robust to documents where the answer is mentioned frequently in different contexts.

Experimental Results

The model was evaluated on four large-scale datasets: the CNN & Daily Mail news datasets, which use anonymized entities to ensure the model relies on context rather than pre-existing world knowledge, and the Children’s Book Test (CBT), which tests the model's ability to handle narrative context.

At the time of its publication in 2016, the AS Reader set a new state-of-the-art across all evaluated datasets. On the CNN/Daily Mail benchmarks, the ensemble model achieved 74.8% and 77.7% accuracy, respectively, significantly outperforming the original Attentive Reader's scores of approximately 63% and 68%.

Attention distribution on a Children’s Book Test example.

On the CBT Named Entity task, the model reached 71.0% accuracy, representing a 4.4% improvement over previous bests. On Common Nouns, it reached 67.5%, outperforming even Memory Networks. Notably, on the CNN dataset, the model's performance began to approach estimated human performance (81.6%), particularly when accounting for ambiguous questions or errors in the anonymization process.

Discussion and Conclusion

The AS Reader demonstrates that for extractive QA, "pointing" to the answer is superior to "blending" representations. By removing non-linear layers and complex blending steps, the model is easier to train and more effective. The summation of attention weights acts as a natural voting mechanism, boosting candidates that appear in relevant contexts multiple times.

However, the model has limitations. It is fundamentally extractive and cannot generate answers not present in the text. Furthermore, its accuracy tends to decrease as document length increases due to the introduction of more "distractor" entities. Despite these constraints, the AS Reader's simplicity and performance make it a powerful building block for future systems handling multi-sentence reasoning or generative tasks.

Summary updated

BibTeX
@inproceedings{kadlec2016text,
  author = {Rudolf Kadlec and Martin Schmid and Ondrej Bajgar and Jan Kleindienst},
  title = {{Text Understanding with the Attention Sum Reader Network}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2016},
  doi = {10.18653/v1/p16-1086},
}
Figure