Abstract
Knowledge Graph-to-text (KG-to-text) generation aims to transform structured triplets into fluent natural language. Existing methods often struggle with the linearization gap—the discrepancy between non-linear graph structures and sequential language—and maintaining semantic consistency. This paper introduces S-OSC (Syntax controlled KG-to-text with Order and Semantic Consistency), a framework that utilizes a learning-based sorting network, Part-of-Speech (POS) guided decoding, and local semantic scoring. S-OSC achieves state-of-the-art results on WebNLG and DART benchmarks, significantly reducing hallucination errors and improving factual accuracy.
1. Introduction
Knowledge Graphs (KGs) represent information as a network of entities and relations (triplets). While efficient for machine processing, human consumption requires these graphs to be converted into coherent text. This task faces two primary hurdles: the Linearization Gap, where heuristic graph flattening fails to capture natural narrative flow, and the challenge of Word Authenticity, where models struggle to balance copying entities from the graph with generating fluent filler words.
To address these, S-OSC replaces rigid heuristics with a supervised sorting network and uses syntactic "blueprints" to guide the generation process. By treating the linearization of a graph as a supervised learning task rather than a preprocessing step, the model learns the narrative flow directly from human-written captions.
2. Methodology
The S-OSC framework integrates several novel components into a unified multi-task learning architecture designed to bridge the gap between structured data and natural language.
2.1 Learning-based Sorting Network
Unlike traditional models that use Breadth-First Search (BFS) for linearization, S-OSC employs a Triplet Encoder (utilizing TransH embeddings and BART) to learn the optimal description order. This network is trained using ground-truth sequences from human-written text, allowing the model to mimic natural information ordering and avoid cascaded errors from poor input sequences.
2.2 POS-Guided Decoder
To ensure grammatical fluency, a POS Generator predicts the syntactic structure of the target sentence. This sequence of Part-of-Speech tags acts as a constraint, signaling the decoder when to copy an entity (typically nouns) from the KG versus when to generate functional words (verbs, prepositions) from the vocabulary. This acts as a safeguard against "hallucinating" entities in grammatically incorrect positions.
2.3 Semantic Context Scoring
To maintain local factual and semantic coherence, the model implements a sliding window mechanism (typically size 3). By evaluating the "fitness" of a candidate word relative to its immediate neighbors, the model refines its decision to either copy or predict a word. This ensures that the generated sentence makes sense locally, which often leads to overall sentence fluency.
3. Experiments and Results
The model was evaluated on two primary benchmarks: WebNLG, containing graphs from DBPedia, and DART, a larger dataset offering tree-structured ontologies.
3.1 Quantitative Performance
S-OSC established new state-of-the-art benchmarks:
- WebNLG: Achieved a BLEU-4 score of 61.90, a significant improvement over the previous best of 57.00.
- DART: Reached a BLEU-4 of 62.01, substantially outperforming the JointGT baseline of 54.24.
3.2 Ablation and Human Evaluation
Ablation studies confirmed that both POS information and semantic scoring are critical, with their removal leading to a 2-4 point drop in BLEU scores. Human evaluations further validated that S-OSC produces text with higher factual correctness and naturalness, with fewer instances of the model swapping entity positions or inventing facts compared to existing methods.
4. Conclusion
S-OSC demonstrates that treating graph linearization as a supervised task and incorporating explicit syntactic constraints can drastically improve the quality of KG-to-text generation. By bridging the gap between structured data and natural language through order and semantic consistency, the model provides a robust solution for generating accurate and fluent descriptions. Future work will explore incorporating causal inference to further enhance the logical depth and storytelling capabilities of the generator.
Summary updated