Enhancing Uncertainty Modeling with Semantic Graph for Hallucination Detection
The authors present a semantic‑graph‑enhanced uncertainty modeling framework that captures token, sentence, and paragraph dependencies, propagates uncertainty through entity relations and contradiction probabilities, and achieves roughly a 20 % gain in paragraph‑level hallucination detection on WikiBio and NoteSum compared with existing uncertainty‑based baselines.
Large language models (LLMs) often generate hallucinations—content that is inaccurate or unfaithful—which limits their deployment in real‑world scenarios. Existing uncertainty‑based detection methods compute token‑level uncertainty from the model’s output probabilities but typically ignore semantic dependencies among tokens and sentences, resulting in weak performance for multi‑token and cross‑sentence hallucination detection.
At AAAI 2025, the Xiaohongshu search advertising team introduced a semantic‑graph‑enhanced uncertainty modeling approach. The method first constructs a semantic graph to capture relationships between entities and sentences. Uncertainty is then propagated along these entity relations to improve sentence‑level detection. Finally, a graph‑based uncertainty calibration leverages contradiction probabilities between a sentence and its neighboring sentences to refine uncertainty estimates. Experiments on the WikiBio and NoteSum datasets demonstrate a 19.78 % improvement in paragraph‑level hallucination detection.
The proposed framework models uncertainty at three granularities—Token, Sentence, and Paragraph. Token‑level uncertainty combines the maximum and variance of the top‑K token probabilities with a sequence‑decay term. Sentence‑level uncertainty uses the semantic graph to propagate entity uncertainty and computes a global uncertainty via sentence‑probability quantiles. Paragraph‑level uncertainty builds a paragraph‑level semantic graph, employs natural language inference (NLI) to estimate contradiction probabilities between sentences, and aggregates sentence uncertainties.
Datasets: WikiBio, a widely used hallucination detection benchmark, and NoteSum, a Chinese note dataset created by Xiaohongshu. Annotation follows WikiBio’s scheme, labeling sentences as Factual, Non‑Factual*, or Non‑Factual and assigning a continuous hallucination score (0–1) to paragraphs.
Baselines include GPT‑3 Uncertainty, SelfCheckGPT (multi‑sampling), and FOCUS (an uncertainty‑enhanced version of SelfCheckGPT). The proposed method outperforms all baselines on both sentence‑level AUC (up to a 12.85 % gain for the Non‑Factual class) and paragraph‑level Pearson (77.60) and Spearman (74.44) correlation coefficients.
Ablation studies verify the contribution of each component: removing the max, variance, or decay term degrades token‑level performance; omitting entity or global uncertainty harms sentence‑level results; removing the graph‑based contradiction probability reduces paragraph‑level scores by roughly 2 %.
Visualization analyses show that semantic‑graph‑based uncertainty propagation more accurately distinguishes different hallucination degrees compared with baseline methods.
In summary, this work demonstrates that semantic graphs can capture complex token‑sentence relationships, substantially improving hallucination detection accuracy. Future directions include integrating existing knowledge graphs and AMR graphs for fact‑checking and further hallucination mitigation.
Xiaohongshu Tech REDtech
Official account of the Xiaohongshu tech team, sharing tech innovations and problem insights, advancing together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.