Benchmarking Uncertainty Quantification Methods for Large Language Models with LM-Polygraph

Roman Vashurin, Ekaterina Fadeeva, Artem Vazhentsev, Lyudmila Rvanova, Daniil Vasilev, Akim Tsvigun, Sergey Petrakov, Rui Xing, Abdelrahman Boda Sadallah, Kirill Grishchenkov, Alexander Panchenko, Timothy Baldwin, Preslav Nakov, Maxim Panov, Artem Shelmanov

TL;DR

This paper introduces LM-Polygraph, a comprehensive benchmark for evaluating Uncertainty Quantification (UQ) methods in Large Language Models (LLMs). It addresses the fragmentation in UQ research by providing a unified environment for comparing state-of-the-art techniques across various text generation tasks, including selective QA, generation, and claim-level fact-checking. The benchmark also assesses confidence normalization methods, leading to a large-scale empirical investigation that identifies the most effective UQ approaches.

What Problem Does This Paper Address?

Large Language Models (LLMs) are increasingly powerful but also prone to "hallucinations" – generating factually incorrect or nonsensical outputs. To make LLMs safer and more reliable for critical applications (like healthcare), it's crucial to know when they are uncertain about their predictions. This is where Uncertainty Quantification (UQ) comes in. However, the field of UQ for LLMs is currently fragmented. Researchers use diverse methods and evaluation protocols, making it difficult to compare results and draw general conclusions. This lack of standardization hinders progress in developing robust and trustworthy LLM deployments.

Methods

The core contribution of this paper is the LM-Polygraph benchmark. This benchmark offers:

  • A Unified Environment: It implements a collection of state-of-the-art UQ baselines, allowing for consistent and controllable evaluation.
  • Diverse Tasks: It covers selective question-answering (QA), selective generation (machine translation, text summarization), and claim-level fact-checking.
  • Multilingual Fact-Checking: A novel automatic evaluation pipeline for claim-level UQ is developed, supporting English, Mandarin Chinese, Arabic, and Russian.
  • Confidence Normalization Assessment: The benchmark evaluates how well confidence normalization methods produce interpretable scores that reflect output quality. It also proposes and evaluates new methods for producing normalized and bounded confidence scores.
  • Empirical Investigation: The authors conduct a large-scale study using the benchmark to compare UQ and normalization techniques across eleven tasks.

The paper categorizes UQ methods into white-box (requiring access to model internals like logits) and black-box (only needing generated text). Within these, it discusses information-based, sample diversity, density-based, and reflexive methods.

Datasets

The benchmark utilizes several established datasets for evaluation:

  • Selective QA/Generation:
    • CoQA (Conversational Question Answering)
    • TriviaQA (Question Answering)
    • MMLU (Massive Multitask Language Understanding)
    • GSM8k (Grade School Math Word Problems)
    • XSum (Abstractive Text Summarization)
    • WMT'14 French-to-English (Machine Translation)
    • WMT'19 German-to-English (Machine Translation)
  • Claim-Level Fact-Checking: The paper uses generated biographies for claim extraction and evaluation.

The benchmark also includes reserved training partitions from these datasets for calibrating normalization methods.

Key Insights and Ideas

  • MSP is a Strong Baseline: Despite its simplicity, Maximum Sequence Probability (MSP) often performs surprisingly well, even outperforming more complex entropy-based methods in many scenarios. This highlights the importance of not overlooking simple baselines.
  • Sample Diversity Shines for Longer Outputs: For longer generated texts, methods that analyze the diversity of multiple model outputs tend to perform better.
  • Information-Based Methods for Short Outputs: Conversely, for short answers, information-based methods (like MSP and CCP) are competitive and computationally more efficient.
  • CCP is Promising for Fact-Checking: Claim-Conditioned Probability (CCP) consistently shows strong performance in claim-level fact-checking across multiple languages.
  • Reflexive Methods Struggle with Smaller LLMs: Methods that directly ask the LLM for confidence (reflexive methods) don't perform well on smaller models, suggesting that this capability is more pronounced in larger LLMs.
  • Isotonic PCC for Interpretable Confidence: For generating interpretable confidence scores, Isotonic PCC is recommended as it improves calibration without degrading performance.

Key Results

The paper presents extensive experimental results across various tasks and models. Some highlights include:

  • Selective QA/Generation:
    • For white-box models, methods like CCP, MSP, HUQ-MD, SAR, and Lexical Similarity were among the best performers.
  • For black-box models, sample diversity techniques, particularly those using NLI similarity (e.g., DegMat), showed strong results.
  • SAR demonstrated robust performance across different output lengths.
  • Claim-Level Fact-Checking:
    • CCP consistently achieved the best performance across most languages, outperforming other methods.
  • For Chinese, CCP and P(True) showed comparable results.
  • Uncertainty Normalization:
    • Binned and Isotonic PCC significantly outperformed linear and quantile normalization in terms of calibration (MSE).
  • Normalization generally did not degrade the performance of the uncertainty scores (PRR).

Limitations and Future Work

  • LLM Size Matters for Reflexive Methods: The authors note that reflexive methods' performance is tied to LLM size, with smaller models struggling to exhibit self-awareness of their knowledge gaps.
  • N-gram Metrics Limitations: The paper points out that traditional n-gram metrics (like ROUGE-L) can be insufficient for evaluating generation quality, especially when semantic differences are subtle (e.g., negation). They advocate for LLM-based metrics like AlignScore.
  • Future Work: The authors suggest that their benchmark can be extended with more tasks, languages, and UQ methods. They also highlight the need for further research into understanding the specific failure modes of different UQ techniques. The development of more robust and interpretable confidence scores remains an active area.

Summary updated

BibTeX
@article{vashurin2024benchmarking,
  author = {Roman Vashurin and Ekaterina Fadeeva and Artem Vazhentsev and Lyudmila Rvanova and Daniil Vasilev and Akim Tsvigun and Sergey Petrakov and Rui Xing and Abdelrahman Boda Sadallah and Kirill Grishchenkov and Alexander Panchenko and Timothy Baldwin and Preslav Nakov and Maxim Panov and Artem Shelmanov},
  title = {{Benchmarking Uncertainty Quantification Methods for Large Language Models with LM-Polygraph}},
  journal = {Trans. Assoc. Comput. Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=heAdr6u3tm},
}
Figure