Learning to Encode Evolutionary Knowledge for Automatic Commenting Long Novels

Canxiang Yan, Jianhao Yan, Yangyin Xu, Cheng Niu, Jie ZhouarXiv 2020

Abstract: Static knowledge graphs have been incorporated extensively into sequence-to-sequence frameworks for text generation. While effectively representing structured context, static knowledge graphs fail to represent knowledge evolution, which is required in modeling dynamic events. In this paper, an automatic commenting task is proposed for long novels, which involves understanding context of more than tens of thousands of words. To model the dynamic storyline, especially the transitions of the characters and their relations, Evolutionary Knowledge Graph (EKG) is proposed and learned within a multi-task framework. Given a specific passage to comment, sequential modeling is used to incorporate historical and future embedding for context representation. Further, a graph-to-sequence model is designed to utilize the EKG for comment generation. Extensive experimental results show that our EKG-based method is superior to several strong baselines on both automatic and human evaluations.

Introduction

Generating insightful comments for long-form literature presents a unique challenge for artificial intelligence. Unlike short news clips or social media posts, long novels contain intricate storylines where characters evolve, alliances shift, and plot points are established over tens of thousands of words. Standard sequence-to-sequence models often suffer from "short-sightedness," as their context windows are typically limited to a few hundred words around a target passage. They lack the global perspective required to understand the history of characters or the future trajectory of the plot.

While static Knowledge Graphs (KGs) have been used to provide structured facts, they are essentially "frozen in time." In a dynamic narrative, a static link stating "Alice and Bob are friends" becomes inaccurate if they become enemies later in the story. This research addresses the challenge of modeling knowledge evolution, enabling an AI to comment with the perspective of a reader who understands the entire narrative journey.

Evolutionary Knowledge Graphs (EKG)

To capture the "pulse" of a story, the authors propose the Evolutionary Knowledge Graph (EKG). Instead of a single static graph, the EKG is a sequence of sub-graphs, where each sub-graph represents the state of character relationships at a specific time step (e.g., a chapter). Nodes represent characters (entities), and edges represent their evolving relationships.

Evolution of character relationships across time steps.

As shown in Figure 1, relationships between characters like Xuner (X), Yanxiao (Y), and Nalanyanran (N) transition from friendship and engagement to divorce and enmity across different time periods. Modeling these transitions allows the system to generate comments that reflect the current state of the story while being aware of past and future developments.

Proposed Framework

The researchers developed a multi-task framework to learn and utilize these evolving embeddings. The process involves several key components:

  1. Vertex & Edge Embedding:
    • Vertices: A modified Chinese BERT learns character representations. A temporally smoothed softmax loss is introduced to ensure that a character’s identity changes gradually across chapters rather than jumping erratically.
  2. Edges: A "Relation Network" (RN) learns to represent the links between characters by attempting to reconstruct the sentences where those characters interact.
  3. Graph-to-Sequence Model:
    • The model employs a Bi-LSTM to process the sequence of graphs, allowing the AI to integrate both historical context and future plot points.
  4. A Graph Attention Network (GAT) encoder aggregates this structured knowledge.
  5. This evolutionary data is then fused with a standard Transformer encoder, which processes the specific text passage, to generate the final comment.
Architecture of the EKG-based commenting model.

Experimental Setup and Results

The researchers introduced a new benchmark called GraphNovel, crawled from popular Chinese novel websites. It contains 203 full-length novels, nearly 350,000 passages, and over 3.1 million real user comments. This dataset includes chronological chapter structures and human-verified entity relations.

Key Findings

  • The Power of "Future" Context: High-quality comments often refer to future events (e.g., foreshadowing or irony). By encoding the entire EKG, the model mimics this human-like foresight.
  • Performance Gains: The proposed model, EKG+GAT(V+E), outperformed several strong baselines. It achieved a 7.01 BLEU score, significantly higher than the best non-evolutionary baseline (6.52).
  • Human Evaluation: In terms of "Relevance" and "Informativeness," the EKG model scored 0.89 and 0.75 respectively, nearly doubling the scores of basic Seq2Seq models.

Conclusion

By integrating evolutionary knowledge into text generation, this work demonstrates a significant leap in AI's ability to comprehend and comment on long-form narratives. While challenges remain—such as handling entity noise (nicknames/titles) and the computational overhead of maintaining massive graphs—the EKG framework provides a robust foundation for more context-aware and human-like story analysis. Future work may explore personalizing comments to match specific user personas and styles.

Summary updated

BibTeX
@misc{yan2020learning,
  author = {Canxiang Yan and Jianhao Yan and Yangyin Xu and Cheng Niu and Jie Zhou},
  title = {{Learning to Encode Evolutionary Knowledge for Automatic Commenting Long Novels}},
  year = {2020},
  eprint = {2004.09974},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2004.09974},
}
Figure