Introduction
Generating a coherent and logical ending to a story is a sophisticated natural language processing (NLP) task that goes beyond simple grammatical fluency. It requires deep story comprehension, the ability to track evolving context clues across multiple sentences, and the application of implicit knowledge about the world. Researchers from Tsinghua University, in a paper presented at AAAI-19, addressed these challenges by introducing a novel neural framework that combines incremental encoding with external commonsense knowledge.
The Challenge of Story Comprehension
Existing story generation models often struggle with two primary issues: logic/causality and the "knowledge gap." Standard sequence-to-sequence models frequently treat story context as a single block of text, failing to capture the subtle chronological or causal links between events in adjacent sentences. Furthermore, these models are limited to the information explicitly present in their training data. While a human reader knows that a story about "Halloween" implies "candy" or "costumes," a standard language model lacks this implicit commonsense reasoning.
Proposed Methodology
The proposed framework addresses these limitations through two key innovations: Incremental Encoding (IE) and Multi-Source Attention (MSA), supported by external knowledge from ConceptNet.
Incremental Encoding (IE)
Rather than encoding the entire story context simultaneously, the IE model processes sentences sequentially. As each new sentence is encoded, an attention mechanism allows the model to "look back" at the hidden states of the preceding sentence. This mimics human reading behavior, building a representation of the story's logic step-by-step and ensuring that transitions between events—such as "dressing up" leading to "wearing a costume"—are preserved in the model's internal state.
Multi-Source Attention (MSA)
To bridge the knowledge gap, the model retrieves "one-hop" knowledge graphs from ConceptNet for every word in the story. For instance, the word "Halloween" might trigger triples like (Halloween, RelatedTo, candy). The MSA module then generates a context vector by integrating two distinct sources:
- State Context: Information derived from the previous sentence's hidden states.
- Knowledge Context: Semantic information retrieved from the external commonsense knowledge graphs.
Enhanced Supervision
To further improve logicality, the researchers implemented supervision at the encoding stage. The model is tasked with predicting the next word in the context sentences themselves during training. This forces the encoder to learn the underlying logic of story progression more effectively than models that only supervise the final output (the decoder).
Experimental Setup
The model was trained and evaluated using the ROCStories Corpus, a benchmark dataset of approximately 98,000 five-sentence stories. External semantic links were provided by ConceptNet, a large-scale commonsense knowledge base.
Results and Analysis
The researchers evaluated the model using both automatic metrics and human judgment, comparing it against standard sequence-to-sequence (Seq2Seq) baselines.
- Perplexity (PPL): The full IE+MSA model achieved a PPL of 8.79, a significant improvement over the baseline's 18.97, indicating much higher predictive accuracy.
- Logicality: In human trials, the model scored 1.26 out of 2.0 for logicality, nearly doubling the baseline score of 0.70.
- Ablation Studies: Results indicated that while Incremental Encoding improved basic grammar and flow, the addition of Multi-Source Attention was the primary driver for generating "reasonable" and contextually rich endings.
Conclusion
By treating story logic as a chain of transitions rather than a static block of text, and by leveraging external knowledge bases to fill semantic gaps, this research marks a significant step toward more human-like story generation. Future work may explore multi-hop reasoning for more complex narratives and the application of this incremental, knowledge-aware approach to dialogue systems and long-form document generation.
Summary updated