Fast and Accurate Factual Inconsistency Detection Over Long Documents

Barrett Martin Lattimer, Patrick Chen, Xinyuan Zhang, Yi Yang · DOI

TL;DR

Large language models (LLMs) are prone to "hallucinations" – generating factually incorrect information. This paper introduces SCALE, a novel method for detecting these inconsistencies in long documents by intelligently chunking the source text. SCALE achieves state-of-the-art performance and superior calibration, while also offering efficient and interpretable results, making it suitable for real-time applications.

What Problem Does This Paper Address?

The increasing prevalence of LLMs in applications like content generation and summarization has brought to light a significant challenge: hallucinations. These are instances where the model generates information that is not supported by the source document, undermining user trust. While detecting factual inconsistencies is crucial, existing methods often struggle with long documents due to computational limitations and poor calibration of confidence scores. This latency and lack of reliable confidence make it difficult to deploy these detection systems in real-time environments. Furthermore, the exponential growth in LLM context windows exacerbates this problem, necessitating efficient and effective solutions for handling lengthy texts.

Methods

The core of SCALE is a Natural Language Inference (NLI) based approach that tackles the "granularity problem" – the difficulty of matching single sentences from a source to single sentences in a generated text. Instead of breaking down both the source document and the generated text into individual sentences, SCALE employs a novel "chunking" strategy. It divides the source document into larger, manageable chunks. These chunks are then used as premises in an NLI model (specifically, Flan-T5) to evaluate the factual consistency of generated sentences. This chunking approach allows for better contextual capture, improved accuracy, and significantly fewer model runs compared to sentence-by-sentence decomposition.

For interpretability, SCALE also incorporates a relevant source text retrieval mechanism. This component uses a binary search tree-like approach to efficiently identify the most relevant source text snippet that supports or contradicts a given generated sentence. This method drastically reduces the number of model calls required for explanation, making it much faster than previous retrieval methods.

Datasets

The paper uses two primary datasets:

  • TRUE: A benchmark dataset comprising 11 sub-datasets across four NLG tasks (Summarization, Dialogue, Fact Verification, Paraphrasing). This dataset is used to demonstrate SCALE's task-agnostic nature and its performance on various NLG tasks. The examples in TRUE are generally short, with fewer than 512 tokens.
  • ScreenEval: A novel dataset introduced by the authors, specifically designed for evaluating factual inconsistency detection in long-form dialogues. ScreenEval consists of 52 TV scripts, averaging over 6,000 tokens each, with associated human-generated summaries and summaries generated by Longformer and GPT-4. This dataset addresses the limitations of existing benchmarks that primarily focus on shorter documents.

Key Insights and Ideas

  • Chunking is Key: The paper demonstrates that intelligently chunking long source documents, rather than breaking them into individual sentences, significantly improves factual inconsistency detection. This approach captures broader context and leads to better NLI performance.
  • Calibration Matters for Trust: SCALE not only achieves high accuracy but also exhibits superior calibration. This means its confidence scores are more reliable, making it a valuable tool for comparing results and building trust in LLM outputs.
  • Efficiency for Real-World Use: The chunking mechanism and the efficient retrieval strategy make SCALE significantly faster and more cost-effective than many other LLM-based methods, enabling its deployment in real-time applications.
  • Long-Form Dialogue is a Unique Challenge: The ScreenEval dataset highlights the specific difficulties of evaluating factual consistency in dialogues, such as long-distance coreference resolution and noise between utterances.

Key Results

  • TRUE Benchmark: SCALE (specifically SCALEXXL) achieved state-of-the-art performance on 10 out of 11 datasets in the TRUE benchmark, demonstrating its broad applicability across different NLG tasks.
  • ScreenEval Dataset: SCALE significantly outperformed other models on the ScreenEval dataset in terms of accuracy, efficiency, and model explanation. For instance, SCALElarge was 6 times faster than QAFactEval (a competitive QA-based model) while achieving comparable performance.
  • Efficiency: SCALEbase could run at 1.1 seconds per score for long documents, making it practical for online settings.
  • Calibration: SCALE showed superior calibration across TRUE benchmark datasets, with SCALElarge providing the best calibration on average. Calibration scores improved with larger chunk sizes, up to 1000 tokens.
  • Retrieval: SCALE's BST retrieval approach achieved higher recall (up to 47.1% for SCALEXL) and was significantly faster than other retrieval methods.

Limitations and Future Work

  • Logit Usage: The paper notes that SCALE's reliance on only "Yes" and "No" logits for entailment scores might lead to a loss of accuracy if other related information is present in similar tokens. Future work could explore using a broader range of logits.
  • Calibration Variability: While SCALE generally achieves good calibration, it still struggles with consistent calibration across all tasks and model sizes. Achieving uniform calibration across NLG tasks remains a goal.
  • Chunk Size Optimization: The paper found that chunk size significantly impacts performance and time. While 1000 tokens was found to be a good balance, further exploration into optimal chunking strategies for different tasks and models could be beneficial.

Summary updated

BibTeX
@inproceedings{lattimer2023fast,
  author = {Barrett Martin Lattimer and Patrick Chen and Xinyuan Zhang and Yi Yang},
  title = {{Fast and Accurate Factual Inconsistency Detection Over Long Documents}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=o5t69cVj6x},
}
Figure