TL;DR
The authors introduce ENTITYNLM, a generative language model that explicitly tracks entities in a text by maintaining and dynamically updating unique vector representations for each one. By "remembering" participants in a narrative, the model achieves superior performance in language modeling, coreference resolution, and entity prediction compared to standard recurrent neural networks.
The Problem: Language Models Lack a World Model
Standard language models (LMs) treat text as a sequence of words but lack an internal "world model." They don't explicitly recognize that "John," "he," and "the man" might refer to the same person. Consequently, as a story unfolds, these models struggle to maintain a coherent understanding of characters or objects over long distances. To address this, a model must be able to identify entity mentions, determine coreference, update entity knowledge based on context, and predict future entity appearances.
Methodology
ENTITYNLM augments a standard Recurrent Neural Network (RNN) with three additional latent variables at each timestep $t$:
- $R_t$ (Entity Indicator): A binary variable deciding if the current word is part of an entity mention.
- $E_t$ (Entity Index): If it is an entity, which one is it? This can be a previously mentioned entity or a brand-new one.
- $L_t$ (Mention Length): How many words long is this specific mention (e.g., "John" vs. "the coffee shop")?
The Dynamic Update Rule
Unlike standard LMs that only update a single hidden state ($h_t$), ENTITYNLM maintains a "memory bank" of entity embeddings. When an entity is mentioned, the model creates a new representation for that entity by taking a convex combination of its old embedding and the current RNN hidden state. This allows the representation of an entity to evolve as the story reveals new information about it. The model is generative, defining a joint probability over words and these latent entity variables, using importance sampling to marginalize them out during evaluation.
Key Results
The researchers evaluated ENTITYNLM on the CoNLL 2012 Shared Task (for coreference and language modeling) and the InScript Corpus (for entity prediction).
- Language Modeling: ENTITYNLM achieved a perplexity of 131.64 on the CoNLL test set, outperforming a standard RNNLM (134.79) and a strong 5-gram baseline (138.37).
- Coreference Resolution: When used to rerank the top 100 outputs of the state-of-the-art CORT system, ENTITYNLM improved the CoNLL score from 62.93 to 64.04.
- Entity Prediction: In the "entity cloze" task (predicting which entity fills a blank), the model reached 74.23% accuracy, significantly beating shallow feature baselines and coming remarkably close to human performance.
Key Insights and Ideas
- Entities as Dynamic State: An entity's "meaning" in a story changes based on its actions and context. ENTITYNLM captures this by updating the entity's vector every time it is mentioned.
- Contextual Prediction: By conditioning the next word prediction on the most recently mentioned entity embedding, the model gains a mechanism that helps it generate more coherent referring expressions.
- Generative Coreference: Because ENTITYNLM is generative, it can be used to rerank the outputs of discriminative systems, providing a likelihood-based "sanity check" for coreference chains.
Limitations and Future Work
Despite its success, the model currently requires supervised data annotated with entity mentions for training. Future work could explore learning these entity tracks in an unsupervised fashion. Additionally, the model uses a fixed maximum mention length and faces computational challenges when marginalizing over all possible entity assignments, which may limit its scalability to extremely long documents with hundreds of entities.
Summary updated