Structure-aware Knowledge Graph-to-text Generation with Planning Selection and Similarity Distinction

Feng Zhao, Hongzhi Zou, Cheng YanEMNLP 2023

Introduction

Knowledge Graph-to-text (KG-to-text) generation is the process of converting structured data, typically represented as triples (subject-predicate-object), into coherent and fluent natural language. This task is essential for making complex data accessible to human readers. However, modern Pre-trained Language Models (PLMs) like BART or T5 are inherently sequence-based, requiring graphs to be "linearized" into a flat list of facts before processing.

Knowledge Graph-to-text task overview showing a graph, its description, and a linearized sequence.

The order of these linearized facts significantly impacts the quality of the generated text. Furthermore, standard models often struggle to capture the complex topology of a graph, frequently missing long-distance relationships or confusing similar entities, which leads to factual hallucinations.

The Proposed Framework

To address these challenges, researchers have introduced a novel two-stage framework that separates the planning of the content from the final text generation. This approach ensures that the model first identifies the most logical sequence of information before attempting to synthesize it into natural language.

The two-stage framework consisting of 1) Planning Selection and 2) Text Generation with a graph-aware encoder.

1. Planning Selection

Instead of relying on a single, potentially suboptimal linearization, the framework generates multiple candidate sequences. A dedicated Planning Scorer, built on a BART-based module, ranks these candidates. By evaluating the entire sequence at once rather than making step-by-step local decisions, the model avoids cascading errors and selects the plan most likely to produce high-quality output.

2. Structure-aware Encoding

To move beyond simple "first-order neighbor" relationships, the model incorporates Relative Distance Encoding (RDE). This technique modifies the self-attention mechanism by adding a bias based on the shortest path between any two nodes in the graph. This allows the encoder to perceive the global topology of the KG, ensuring that even distant but related entities are correctly contextualized.

3. Similarity Distinction via Contrastive Learning

To improve entity coverage and prevent the model from confusing similar entities, the authors utilized Contrastive Learning. By training the model to distinguish between correct sequences and "hard negative" examples (where entities were intentionally swapped), the model learns to pay closer attention to specific entity names and their unique roles within the graph.

Experimental Results

The framework was evaluated on two major benchmarks: WebNLG and DART.

  • WebNLG: The model achieved a BLEU score of 66.53, surpassing existing state-of-the-art models like JointGT and GAP. Notably, it outperformed models that underwent extensive graph-specific pre-training, demonstrating the efficiency of its structural awareness.
  • DART: On this more complex, open-domain dataset, the model reached a BLEU score of 62.67, showing significant improvements over standard BART and T5 baselines.

Ablation studies confirmed that both the Planning Scorer and the Relative Distance Encoding are critical components; removing either led to a measurable drop in performance.

Conclusion and Future Work

This two-stage approach successfully bridges the gap between structured graphs and linear text by prioritizing holistic planning and structural topology. While highly effective, future research is needed to improve the computational efficiency of the Planning Scorer for very large graphs and to enhance the model's ability to perform logical reasoning (e.g., inferring family relationships not explicitly stated). Additionally, extending this framework to generate long-form documents remains an open challenge.

Summary updated

BibTeX
@inproceedings{zhao2023structure,
  author = {Feng Zhao and Hongzhi Zou and Cheng Yan},
  title = {{Structure-aware Knowledge Graph-to-text Generation with Planning Selection and Similarity Distinction}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.537},
}
Figure