Introduction
Large language models (LLMs) have achieved remarkable fluency in text generation, yet maintaining long-range narrative coherence remains a significant challenge. A frequent failure mode is "entity incoherence," where characters or objects undergo illogical transitions or perform contradictory actions. For instance, a model might describe a character as deceased in one sentence and then actively participating in a scene shortly after. This occurs because standard models often treat entities as static embeddings, failing to track their evolving situational "states" throughout a story.
The ERIC Framework
To address these limitations, the researchers introduce ERIC (Entity-aware Representation with Incorporate Contrastive learning). ERIC is designed to explicitly model the dynamic states of entities as a narrative unfolds. Unlike traditional approaches that rely on continuous vectors, ERIC utilizes a discrete state space, mapping entities to a pre-defined "codebook" of state vectors. This discretization acts as a semantic bottleneck, encouraging the model to capture high-level narrative transitions rather than local lexical noise.
The architecture incorporates two primary innovations:
- Entity State Attention Layer: A specialized layer within the Transformer decoder that allows the model to attend to the historical sequence of an entity's states.
- Contrastive Learning Objective: During training, the model is tasked with predicting the next state of an entity. A contrastive framework is used to align the predicted state with the actual event representation in the subsequent sentence, while distinguishing it from unrelated events.
Methodology and Training
ERIC follows a two-stage generation process. First, it generates a "coarse" narrative where entities are represented by placeholders (e.g., <e0>, <e1>). In the second stage, these placeholders are replaced with specific entity names. This separation allows the model to focus on the logical flow of events and state transitions independently of surface-level naming conventions.
Experimental Results and Analysis
The framework was evaluated on the Wikiplots and CNN News datasets, representing fictional and non-fictional narrative styles, respectively. ERIC consistently outperformed strong baselines, including BART and various hierarchical generation models.
Key findings include:
- Semantic Grounding of States: Analysis of the learned discrete states reveals that they correspond to meaningful clusters of narrative events. For example, specific state IDs are strongly associated with semantic concepts like "survival," "conflict," or "decision-making."
- Improved Coherence: Human evaluations confirmed that ERIC produces more informative and coherent stories. Notably, the model exhibited approximately 20% fewer entity-related contradictions compared to standard BART models.
- Robustness over Length: ERIC maintains higher accuracy in predicting logical entity mentions as stories progress, whereas baseline performance typically degrades with increased narrative length.
Conclusion
ERIC demonstrates that explicitly modeling entity states through a discrete, contrastive framework significantly enhances narrative coherence. By moving beyond static embeddings, the model gains a "memory" of a character's journey, leading to stories that are not only fluent but also logically sound. Future work will focus on scaling the framework to handle complex multi-entity interactions and exploring more flexible, dynamic state spaces.
Summary updated