FACTOID: FACtual enTailment fOr hallucInation Detection

Vipula Rawte,S.M Towhidul Islam Tonmoy,Krishnav Rajbangshi,Shravani Nag,Aman Chadha,Amit P. Sheth,Amitava Das
2024-03-28
Abstract:The widespread adoption of Large Language Models (LLMs) has facilitated numerous benefits. However, hallucination is a significant concern. In response, Retrieval Augmented Generation (RAG) has emerged as a highly promising paradigm to improve LLM outputs by grounding them in factual information. RAG relies on textual entailment (TE) or similar methods to check if the text produced by LLMs is supported or contradicted, compared to retrieved documents. This paper argues that conventional TE methods are inadequate for spotting hallucinations in content generated by LLMs. For instance, consider a prompt about the 'USA's stance on the Ukraine war''. The AI-generated text states, ...U.S. President Barack Obama says the U.S. will not put troops in Ukraine...'' However, during the war the U.S. president is Joe Biden which contradicts factual reality. Moreover, current TE systems are unable to accurately annotate the given text and identify the exact portion that is contradicted. To address this, we introduces a new type of TE called ``Factual Entailment (FE).'', aims to detect factual inaccuracies in content generated by LLMs while also highlighting the specific text segment that contradicts reality. We present FACTOID (FACTual enTAILment for hallucInation Detection), a benchmark dataset for FE. We propose a multi-task learning (MTL) framework for FE, incorporating state-of-the-art (SoTA) long text embeddings such as e5-mistral-7b-instruct, along with GPT-3, SpanBERT, and RoFormer. The proposed MTL architecture for FE achieves an avg. 40\% improvement in accuracy on the FACTOID benchmark compared to SoTA TE methods. As FE automatically detects hallucinations, we assessed 15 modern LLMs and ranked them using our proposed Auto Hallucination Vulnerability Index (HVI_auto). This index quantifies and offers a comparative scale to evaluate and rank LLMs according to their hallucinations.
Computation and Language,Artificial Intelligence
What problem does this paper attempt to address?
### Problems the Paper Attempts to Solve This paper aims to address the issue of factual errors or "hallucinations" that occur when large language models (LLMs) generate text. Specifically: 1. **Limitations of Traditional Textual Entailment Methods**: Traditional Textual Entailment (TE) methods perform poorly in detecting factual errors in text generated by LLMs. For example, when discussing "the US stance on the Ukraine war," AI-generated text might incorrectly mention "President Obama announced that the US would not send troops to Ukraine," whereas, in reality, during the Ukraine-Russia war, the US president was Joe Biden. 2. **Lack of Precise Annotation**: Current TE systems cannot accurately annotate the generated text and fail to identify which specific part contradicts the facts. To address these challenges, the paper introduces a new type of textual entailment—Factual Entailment (FE). FE can not only detect factual errors in text generated by LLMs but also mark the specific parts that are inconsistent with reality. Additionally, the paper proposes a benchmark dataset named FACTOID to evaluate the performance of FE models and introduces a Multi-Task Learning (MTL) framework to improve the accuracy of FE. Finally, the paper introduces an Auto Hallucination Vulnerability Index (HVI auto) to quantify and compare the likelihood of different LLMs generating hallucinations.