Abstract
Maintaining a consistent mental model of entities—characters, objects, and their states—is a fundamental requirement for deep text comprehension. However, standard neural architectures often struggle with long-range entity tracking due to computational complexity and integration challenges. This research introduces two primary strategies to address these bottlenecks: PeTra (People Tracking), a bounded memory model that scales linearly with document length, and a data augmentation framework that embeds entity-tracking capabilities directly into standard language models. Experimental results across coreference resolution and state-tracking tasks demonstrate that these methods achieve state-of-the-art performance while maintaining efficiency and interpretability.
Introduction
When humans read a narrative, they maintain a dynamic "file" for each entity, updating their locations, attributes, and relationships as the story progresses. For Artificial Intelligence, this "memory problem" remains a significant hurdle. Large Language Models (LLMs) frequently lose track of entities over long contexts, leading to hallucinations or incorrect pronoun resolution. This paper explores how to build neural models that can track entities efficiently and how to integrate this knowledge into existing transformer architectures.
The Bottlenecks of Entity Tracking
The author identifies two primary obstacles in current NLP systems:
- Scalability: Traditional coreference resolution models—which link mentions of the same entity—typically exhibit quadratic complexity relative to document length. This makes them computationally prohibitive for processing entire books or long technical documents.
- Integration: Most entity-tracking systems function as external "plug-ins" rather than being native to the model's architecture. This separation makes it difficult to leverage entity knowledge during the primary language modeling task without sacrificing efficiency.
PeTra: Linear-Time Tracking via Bounded Memory
To solve the scalability issue, the author proposes PeTra and subsequent bounded memory models. These models operate on the insight that "entities are transient": in most narratives, only a subset of characters is active at any given time.
Instead of attempting to track every entity indefinitely, PeTra utilizes a fixed number of memory slots (e.g., 20). The model employs a learned "management policy" to handle memory overflow. When all slots are full and a new entity appears, the model identifies and evicts the least relevant or most transient entity to make room. This approach reduces computational complexity to linear time ($O(T)$), allowing the model to process long-form literature that would be impossible for quadratic models.
Baking-in Knowledge via Data Augmentation
As an alternative to architectural changes, the research explores "baking" tracking capabilities into standard models like GPT-2 and BART through specialized training data.
Chess as a World Probe
To test if transformers can track underlying world states, the author used chess as a controlled environment. By training models on chess moves supplemented with Randomly Annotated Piece (RAP) tokens—tags that explicitly state a piece's position—the model learned to track the board state with high precision. This proved that even without an explicit memory module, transformers can maintain internal state representations if prompted correctly.
Coreference Augmentation
For natural language, the author augmented standard text with predicted coreference chains (e.g., "John [John] went to the store"). Fine-tuning GPT-2 on this augmented data improved the model's ability to predict the next word in complex, long-range contexts, effectively teaching the model to "pay attention" to entity identity.
Experimental Results
The proposed methods were evaluated across several diverse datasets, including GAP (Gendered Ambiguous Pronouns), OntoNotes, and LitBank (100 public domain novels).
- PeTra Performance: PeTra achieved an 81.5 F1 score on the GAP dataset, outperforming more complex architectures while remaining significantly more efficient.
- Long-Form Literature: The Bounded Memory Model set a new state-of-the-art on LitBank with an 80.2 F1 score, confirming that a limited memory is sufficient for tracking characters in novels.
- Language Modeling: Integrating coreference knowledge into GPT-2 improved its accuracy on the LAMBADA cloze task from 59.1% to 61.3%.
- State Tracking: In the chess domain, models trained with RAP tokens predicted legal moves with over 97% accuracy, demonstrating a robust understanding of the underlying game state.
Discussion and Future Work
While bounded memory models offer significant efficiency gains, they face challenges with "long-range re-entry"—situations where a character disappears for a long duration and then returns. Current eviction policies may permanently forget these entities, suggesting a need for more sophisticated hierarchical memory structures.
Future research will focus on expanding these techniques from entity tracking (nouns) to event tracking (verbs), aiming to capture the causal and temporal relationships that define a narrative. Ultimately, integrating these tracking objectives into the initial pre-training phase of LLMs could lead to more grounded and consistent AI systems.
Summary updated