Abstract
Graph-to-Text (G2T) generation aims to produce natural language descriptions from structured Knowledge Graphs (KGs). While Pre-trained Language Models (PLMs) like T5 have shown promise, they often struggle with the structural nuances of graphs when linearized into text. We present a self-supervised graph masking pre-training strategy that injects structural awareness into PLMs without architectural modifications. By masking and predicting triples and relations, our method achieves state-of-the-art results on major benchmarks like WebNLG and EventNarrative, demonstrating significant improvements in both high-resource and low-resource settings.
Introduction
The goal of Graph-to-Text (G2T) generation is to transform structured data, typically represented as triples in a Knowledge Graph, into human-readable text. While Large Language Models (LLMs) have revolutionized NLP, their application to G2T is hindered by two primary issues: structural blindness and domain mismatch. Because PLMs are trained on linear text, the process of "flattening" a graph into a string often loses the hierarchical and relational context. Furthermore, the discrepancy between the unstructured text used in pre-training and the structured triples used in G2T tasks limits model performance.
Methodology
To address these challenges, we introduce a graph masking pre-training phase. This phase acts as an intermediate "warm-up" before task-specific fine-tuning. The core of the approach involves representing the graph as a sequence of triples [Subject | Relation | Object] appended with level markers to indicate hierarchical distance from the root.
We employ three masking strategies to force the model to reconstruct the graph's topology:
- Triple Prediction: An entire triple is replaced with a mask token
<X>, requiring the model to infer the missing information from the global graph context. - Relation Prediction: Only the predicate (relation) is masked with
<Y>, encouraging the model to learn local semantic cohesiveness between entities. - Hybrid Masking: A combination of both tasks to capture multi-scale structural information.
Experimental Results
We evaluated our method on three major benchmarks: WebNLG+2020, EventNarrative, and DART. Our results demonstrate that the "Triple" masking strategy consistently outperforms standard T5 baselines and previous state-of-the-art (SotA) models.
As shown in the results table, our method achieved a BLEU score of 57.64 on WebNLG+2020 and 38.27 on EventNarrative, setting new benchmarks. Notably, the model is highly efficient; pre-training on just 5% of the graph data for 30 minutes yielded a 4 BLEU point improvement over the baseline in low-resource scenarios. Qualitative analysis further suggests that the masked models are significantly better at capturing relations that standard baselines often ignore.
Conclusion
Self-supervised graph masking provides a lightweight yet powerful mechanism for teaching language models to "read" graphs. By reconstructing missing triples and relations, standard Transformers can develop a deep understanding of graph topology without the need for specialized Graph Neural Network (GNN) layers. This approach effectively bridges the gap between structured data and natural language, leading to more accurate and factually consistent text generation.
Reference: Han, J., & Shareghi, E. (2022). Self-supervised Graph Masking Pre-training for Graph-to-Text Generation. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing (EMNLP).
Summary updated