JointGT: Graph-Text Joint Representation Learning for Text Generation from Knowledge Graphs

Pei Ke, Haozhe Ji, Yu Ran, Xin Cui, Liwei Wang, Linfeng Song, Xiaoyan Zhu, Minlie Huang

Abstract

Knowledge Graph-to-text (KG-to-text) generation aims to produce coherent natural language from structured data. Traditional approaches often linearize graphs into sequences, losing vital structural information and failing to explicitly align graph entities with textual tokens. We present JointGT, a novel pre-training framework that introduces a structure-aware encoder and three specialized pre-training tasks. By leveraging Optimal Transport for graph-text alignment, JointGT achieves state-of-the-art results across multiple benchmarks, demonstrating superior faithfulness and fluency.

Introduction

The task of transforming structured knowledge graphs (KGs)—represented as sets of (head, relation, tail) triples—into natural language is fundamental for building intelligent systems that can explain data. While large-scale pre-trained language models like BART and T5 have shown promise, they typically treat linearized graphs as simple text sequences. This "flattening" leads to two primary issues: the loss of explicit topological relationships and a lack of fine-grained alignment between graph components and natural language words.

Methodology

JointGT addresses these challenges through a joint representation learning approach that integrates graph structure directly into the model architecture and training objectives.

Structure-Aware Semantic Aggregation

Unlike vanilla Transformers that use global self-attention, JointGT incorporates a structure-aware module. This module explicitly aggregates information based on the graph's edges, ensuring that entity representations are informed primarily by their direct neighbors. This architectural choice preserves the graph's topology during processing.

The JointGT architecture featuring a structure-aware self-attention layer that pools entity and relation embeddings to maintain graph topology.

Pre-training Objectives

To bridge the gap between structured and unstructured data, JointGT employs three novel pre-training tasks:

  1. Graph-Enhanced Text Reconstruction: The model reconstructs a corrupted sentence given the complete corresponding graph.
  2. Text-Enhanced Graph Reconstruction: The model predicts masked entities or relations in a graph given the full natural language description.
  3. Graph-Text Embedding Alignment: Utilizing Optimal Transport (OT), the model aligns the hidden representations of graph elements and text tokens in a continuous embedding space. This principled mathematical framework ensures that concepts in the graph are mapped effectively to their textual counterparts.
Overview of the three pre-training tasks: (a) Graph Enhanced Text Reconstruction, (b) Text Enhanced Graph Reconstruction, and (c) Graph-Text Embedding Alignment via Optimal Transport.

Experiments and Results

JointGT was pre-trained on KGTEXT, a large-scale dataset of 7 million graph-text pairs. Evaluation on benchmarks such as WebNLG (v2.0), WebQuestions, and PathQuestions demonstrated significant improvements over existing baselines.

  • State-of-the-Art Performance: JointGT achieved a BLEU score of 66.14 on WebNLG and 65.89 on PathQuestions, outperforming standard T5 and BART models.
  • Faithfulness and Fluency: Human evaluations confirmed that JointGT produces text that is more adequate (accurate to the graph) and fluent than baseline models.
  • Few-Shot Learning: The model showed remarkable robustness in low-resource settings, maintaining high performance even with only 0.5% of fine-tuning data.

Conclusion and Future Work

JointGT demonstrates that explicitly modeling graph structure and cross-modal alignment is crucial for high-quality KG-to-text generation. While the current framework is highly effective, future work could focus on reducing the computational cost of pre-training and extending the architecture to handle more complex graph structures beyond simple triples.

Summary updated

BibTeX
@inproceedings{ke2021jointgt,
  author = {Pei Ke and Haozhe Ji and Yu Ran and Xin Cui and Liwei Wang and Linfeng Song and Xiaoyan Zhu and Minlie Huang},
  title = {{JointGT: Graph-Text Joint Representation Learning for Text Generation from Knowledge Graphs}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.findings-acl.223},
}
Figure