Quantifying Factual Divergence in Generative Models: SHAP-LIME Based Hallucination Score for LLMs
摘要
Hallucinations in Large Language Models (LLMs), defined as plausible-sounding yet factually incorrect outputs, pose a significant barrier to their adoption in high-stakes domains. This paper introduces a novel explainable AI-based framework that combines token-level attribution techniques (SHAP and LIME) with a quantitative Hallucination Score (HS) to detect and interpret hallucinated content. Our approach enables fine-grained analysis of factual inconsistencies by measuring attribution divergence between input and output tokens, offering both numerical and visual interpretability. We evaluated the framework on two benchmark datasets (TruthfulQA and QAGS) using three prominent LLMs (GPT