ScriptWriter: Narrative-Guided Script Generation

Yutao Zhu, Ruihua Song, Zhicheng Dou, Jian-Yun Nie, Jin Zhou

Introduction

Modern dialogue systems have made significant strides in generating contextually appropriate responses for short-term chitchat. However, they often struggle with long-form coherence and goal-oriented storytelling. Most current systems are "reactive," focusing primarily on the immediate preceding turns without a broader plan. This leads to scattered, inconsistent responses that fail to move a story forward.

To address this, researchers have developed ScriptWriter, a novel dialogue system that utilizes a narrative—a plot summary or plan—to guide the generation of movie scripts. By treating the narrative as a roadmap rather than just extra context, ScriptWriter ensures that dialogues remain coherent, consistent, and aligned with a global storyline.

The Challenge of Narrative-Guided Generation

The authors identify two primary hurdles in narrative-guided script generation:

  1. The Lexical Gap: There is often a significant difference between descriptive narratives (e.g., "Jenny doesn't like to go home") and the actual dialogue lines (e.g., "Just stay a little longer"). Bridging this gap requires sophisticated cross-attention mechanisms.
  2. Story Coverage Tracking: A successful model must track which parts of the story have already been told. Without this, the system might repeat information or skip ahead to the end of the plot too early.

The ScriptWriter Architecture

The ScriptWriter model follows a representation-matching-aggregation framework designed to handle the complexities of multi-turn dialogue guided by a global plan.

Multi-level Representation

The model begins by encoding the narrative, the conversation context, and potential response candidates using stacked attentive blocks, similar to Transformer layers. It employs cross-attention to specifically address the lexical gap, allowing the model to find semantic links between descriptive prose and conversational speech.

The overall architecture of the ScriptWriter model, illustrating the flow from input lines and narrative to the matching cube and final feature extraction.

The Updating Mechanism: Decaying Attention

The most significant innovation of ScriptWriter is its updating mechanism. As the dialogue progresses turn-by-turn, the model performs a matching operation between the current dialogue line and the narrative. It then applies a decay factor to the narrative's representation.

Essentially, the model "crosses off" parts of the story that have already been expressed in the dialogue. This decaying attention mechanism forces the model to focus its attention on the remaining, unexpressed parts of the narrative for subsequent turns, ensuring a natural progression of the story.

The updating mechanism in ScriptWriter, showing how the narrative representation (P) is decayed based on the information expressed in previous dialogue turns to track story coverage.

Aggregation and Feature Extraction

Finally, the model stacks matching matrices into "cubes" and utilizes 3D Convolutional Neural Networks (CNNs). These CNNs distill features across the entire sequence of dialogue turns, capturing the temporal flow and the evolving relationship between the conversation and the narrative roadmap.

Datasets and Evaluation

Due to a lack of existing benchmarks for this specific task, the authors introduced GraphMovie. This dataset was constructed by aligning descriptive paragraphs from movie websites with actual movie subtitles. It contains 16,109 script sessions, providing a robust foundation for training and testing narrative-guided systems.

ScriptWriter was evaluated on two tasks: Turn-level (selecting the best response from 10 candidates) and Session-level (predicting the entire sequence of lines in a script).

Key Results

ScriptWriter significantly outperformed state-of-the-art multi-turn dialogue models like DAM and DUA:

  • Turn-level Accuracy: On the $R_{10}@1$ metric, ScriptWriter achieved 0.365, compared to DUA’s 0.237.
  • Session-level Precision: In the $P_{strict}$ metric (predicting the right response at the right position), ScriptWriter scored 0.373, nearly doubling the performance of several baselines.

Ablation studies confirmed that the decaying attention mechanism is vital. Without it, the model struggles to understand the progression of time and information, often failing to move the story forward effectively.

Conclusion

ScriptWriter demonstrates that implicit state tracking through decaying representations is a powerful tool for creative writing and goal-oriented dialogue. By treating narratives as active plans rather than static context, the model achieves a new level of coherence in script generation. Future work will explore moving from retrieval-based selection to full text generation and enforcing stricter chronological ordering within the narrative plans.

Summary updated

BibTeX
@inproceedings{zhu2020scriptwriter,
  author = {Yutao Zhu and Ruihua Song and Zhicheng Dou and Jian-Yun Nie and Jin Zhou},
  title = {{ScriptWriter: Narrative-Guided Script Generation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.acl-main.765},
}
Figure