Introduction
Graph-to-Text (G2T) generation is a critical task in natural language processing that involves converting structured data—typically Knowledge Graph (KG) triples—into fluent, natural language sentences. For example, a triple like (Albert Camus, author, The Myth of Sisyphus) should ideally be verbalized as "The Myth of Sisyphus was written by Albert Camus."
While modern Large Language Models (LLMs) such as T5 and GPT excel at producing fluent text, they are prone to hallucination. They frequently generate sentences that are grammatically perfect but factually unfaithful to the source graph, either by inventing information or omitting key relationships. Traditional evaluation metrics like BLEU and ROUGE are insufficient for this task because they measure surface-level similarity to human references rather than factual accuracy. To address this, we introduce FactSpotter, a novel, self-supervised metric and inference-time plug-in designed to ensure G2T models remain honest.
Methodology: Detection as a Classification Task
FactSpotter shifts the paradigm from generation to classification. The core idea is that a model does not need to be a sophisticated writer to be a reliable fact-checker. FactSpotter utilizes a relatively small Electra model as a binary classifier. Given a single triple and a generated sentence, the model predicts a score between 0 and 1, indicating the probability that the fact is accurately expressed in the text.
Self-Supervised Training
To avoid the high costs of human annotation, FactSpotter is trained using a self-supervised approach. The authors created a robust training set through data perturbation:
- Positive Samples: Pairs of triples and their corresponding ground-truth sentences from existing datasets.
- Negative Samples (Type I): Triples where an entity is replaced with a random alternative.
- Negative Samples (Type II): Sentences where key words are removed to break the semantic link to the triple.
This training allows the model to become highly sensitive to discrepancies in both entities and predicates—the latter being a common failure point for standard generative models.
Human Correlation and Metric Performance
A primary requirement for any automated metric is that it aligns with human judgment. FactSpotter was evaluated against several benchmarks, including WebNLG (2017 & 2020), DART, and GrailQA.
As shown in the evaluation results, FactSpotter (FactS) achieves significantly higher Pearson ($r$), Spearman ($ρ$), and Kendall ($τ$) correlations with human annotations for data correctness, coverage, and relevance compared to traditional metrics like BLEU or even neural metrics like BERTScore. This suggests that FactSpotter is a much more reliable proxy for human evaluation in G2T tasks.
Inference-Time Guidance: The FactSpotter Plug-in
Beyond evaluation, FactSpotter can be integrated directly into the decoding process of existing G2T models as a "plug-in." By modifying the beam search algorithm, the system encourages the generator to select tokens that maximize the FactSpotter score for all input triples. This allows for the improvement of model faithfulness without the need for expensive retraining or fine-tuning.
Experimental results on the DART dataset demonstrate that the FactSpotter plug-in consistently boosts the factual accuracy of models like T5. For instance, T5-base (T5B) saw its FactS score rise from 93.60 to 95.14 when the plug-in was applied. Similar gains were observed in zero-shot scenarios on GrailQA, where the model must handle unseen relations, highlighting FactSpotter's robustness.
Conclusion and Future Work
FactSpotter provides an interpretable and effective solution to the hallucination problem in Graph-to-Text generation. By treating fact-checking as a specialized classification task, it offers a metric that correlates well with humans and a plug-in that improves existing LLMs.
While currently limited by its reliance on simple triple-sentence concatenation, future work will explore graph-aware architectures to better handle complex, multi-triple subgraphs. FactSpotter represents a significant step toward making structured data verbalization more reliable for real-world applications.
Summary updated