The Goldilocks Principle: Reading Children's Books with Explicit Memory Representations

Felix Hill, Antoine Bordes, Sumit Chopra, Jason Weston

TL;DR

This paper introduces the Children’s Book Test (CBT), a benchmark showing that standard language models excel at local syntax but struggle with long-term semantic coherence. To fix this, the authors demonstrate that Memory Networks using "just right" sub-sentential text windows—a phenomenon they call the Goldilocks Principle—outperform LSTMs at predicting nouns and named entities.

What Problem Does This Paper Address?

Traditional language models are evaluated using average perplexity, a metric that treats all words equally. Because syntactic function words (like on, at, the) appear far more frequently than semantic content words (like ball, table, Elvis), standard evaluations heavily reward models that master local grammar while ignoring whether the model actually understands the broader narrative.

Furthermore, state-of-the-art recurrent architectures like LSTMs suffer from recency bias. They are excellent at predicting the next word based on immediate context, but they struggle to retain and exploit long-term context across dozens of sentences. This paper tackles the challenge of building and evaluating models that can maintain semantic coherence over longer texts.

Methods

The authors explore Memory Networks (MemN2N) as a solution for conditioning word predictions on explicit representations of wider context. They experiment with three ways of chunking text into memory slots:

  1. Lexical memory: Storing context as an unbroken sequence of individual words.
  2. Sentential memory: Storing context as complete, individual sentences.
  3. Window memory: Storing context as sub-sentential windows of text centered around mentions of candidate words.

Crucially, they introduce a self-supervision heuristic for training the attention mechanism over window memories. Instead of using soft attention (which averages over all memories), they use a hard attention mechanism during training. The model automatically identifies the window containing the correct answer that currently scores the highest, and optimizes to boost its score relative to incorrect candidates. This allows direct backpropagation without needing reinforcement learning algorithms like REINFORCE.

Datasets

The paper evaluates these methods on two primary datasets:

  • The Children’s Book Test (CBT): A new benchmark built from Project Gutenberg books. It consists of 21-sentence blocks: the first 20 sentences act as context, and the 21st sentence is a query with one word missing. Models must choose the correct word from 10 multiple-choice candidates found within the text. The test is explicitly split by word type: Named Entities, Common Nouns, Verbs, and Prepositions.
  • CNN QA Benchmark: A dataset of ~93k news articles paired with bullet-point summaries containing missing named entities, used to test the generalizability of the window-memory approach.
Figure 1: A Named Entity question from the CBT (right), created from a book passage (left, in blue). In this case, the candidate answers C are both entities and common nouns, since fewer than ten named entities are found in the context.

Key Insights and Ideas

  • The Goldilocks Principle: The size of the memory representation matters immensely. Single words (lexical) lose narrative structure, while full sentences (sentential) dilute the specific context of important words. The "sweet spot" is a sub-sentential window of text (typically around 5 words), which provides enough context to be meaningful but remains focused enough to be easily recalled.
  • Syntax vs. Semantics: LSTMs and n-gram models are actually better than humans at predicting prepositions and verbs using only local context. However, humans rely heavily on the wider context to predict nouns and named entities—a capability where standard LSTMs lag far behind.
  • Hard Attention via Self-Supervision: Jointly learning where to look and how to use that information is a notoriously difficult optimization problem. Hard attention trained via self-supervision makes memory access significantly more tractable and accurate than soft attention mechanisms.

Key Results

The window-based Memory Network with self-supervision achieved dramatic performance gains on semantic word types within the CBT benchmark:

  • Named Entities: The self-supervised window model achieved 66.6% accuracy, vastly outperforming standard LSTMs with context (41.8%), though still trailing human performance (81.6%).
  • Common Nouns: It achieved 63.0% accuracy, beating LSTMs (56.0%).
  • Syntactic Tasks (Verbs/Prepositions): LSTMs maintained their edge here, with the context-aware LSTM hitting 81.8% on verbs, compared to the memory network's 69.0%.
A breakdown of quantitative results across different models and word types on the CBT test set.

To prove this wasn't an artifact of children's books, they applied the architecture to the CNN QA benchmark and achieved a state-of-the-art accuracy of 69.4% (using an ensemble and excluding co-occurrences), outperforming the previous best "Attentive Reader" and "Impatient Reader" models.

Limitations and Future Work

While the proposed Memory Networks significantly closed the gap between machines and humans on semantic tasks, a substantial deficit remains (e.g., 66.6% vs 81.6% on CBT Named Entities). Additionally, the authors note that utilizing all possible text windows (rather than restricting windows to candidate words) significantly slows down training and testing speeds. Future work points toward scaling these architectures efficiently and exploring the integration of pre-trained word embeddings from larger corpora.

Summary updated

BibTeX
@inproceedings{hill2016goldilocks,
  author = {Felix Hill and Antoine Bordes and Sumit Chopra and Jason Weston},
  title = {{The Goldilocks Principle: Reading Children's Books with Explicit Memory Representations}},
  booktitle = {International Conference on Learning Representations},
  year = {2016},
  url = {http://arxiv.org/abs/1511.02301},
}
Figure