Atomic Calibration of LLMs in Long-Form Generations

Caiqi Zhang, Ruihan Yang, Zhisong Zhang, Xinting Huang, Sen Yang, Dong Yu, Nigel Collier

TL;DR

Large Language Models (LLMs) often mix truth with fiction in long-form responses, making traditional, response-level confidence scores highly misleading. This paper introduces atomic calibration, a fine-grained approach that evaluates the factuality and confidence of individual claims within a generation. By analyzing and fusing different confidence elicitation methods, the authors show that models are far less calibrated than they appear, but their reliability can be significantly improved using smart confidence-fusion strategies.

What Problem Does This Paper Address?

When you ask an LLM a short question, it’s easy to measure its confidence: you look at the probability of the tokens in its answer. But when you ask it to write a biography or explain a complex scientific concept, the response spans paragraphs. Traditional evaluation uses "macro calibration," assigning a single confidence score to the entire text.

The flaw here is obvious: a long response is rarely entirely true or entirely false; it’s usually a mix of both. An LLM might express high overall confidence in a paragraph that contains several subtle, hallucinated errors. This paper addresses this gap by shifting the focus from the macro response level to the atomic claim level, ensuring that an LLM's confidence in each individual fact aligns with its actual truthfulness.

Comparison between traditional macro calibration and the proposed atomic calibration approach.

Methods

The authors establish a systematic pipeline for atomic calibration consisting of three main steps:

  1. Atomic Decompositions: Long-form responses are broken down into self-contained "atomic claims" using GPT-4o (following a FACTSCORE-based approach). Each claim is then verified against external sources (Wikipedia and Google Search).
  2. Confidence Elicitation: The authors categorize existing confidence-extraction techniques into two types:
  3. Generative Methods: Measuring consistency across multiple sampled responses using a Natural Language Inference (NLI) model (e.g., GEN-BINARY, GEN-MULTI).
  4. Discriminative Methods: Prompting the model to self-assess the truthfulness of its own claims via token probabilities or numerical ratings (e.g., DIS-SINGLE, DIS-CONTEXT, DIS-RATING).
  5. Confidence Fusion Strategies: To combine the strengths of generative and discriminative methods, the authors introduce two novel fusion algorithms that account for confidence disagreement ($d = B - A$):
  6. AdjustedAlpha: Dynamically adjusts the blending weight based on the difference between the two scores.
  7. DampedFusion: Applies a penalty factor to the final confidence score if the generative and discriminative methods strongly disagree.

Datasets

The framework was evaluated using seven open-source LLMs (from the Llama3, Mistral, and Qwen2 families) across three long-form QA benchmarks:

  • Bios: 500 prompts requesting biographies of individuals from Wikipedia with varying levels of popularity.
  • LongFact: 1,140 questions covering 38 manually selected specialized topics.
  • WildHallu: 7,917 entities extracted from real-world user-chatbot interactions designed to trigger hallucinations.

Key Insights and Ideas

  • The Macro Calibration Illusion: Models that appear perfectly calibrated at the response level perform poorly when scrutinized claim-by-claim. As shown in the ECE and Brier Score comparison plots, atomic-level errors consistently outpace macro-level errors.
  • Complementary Elicitation Types: Generative and discriminative confidence methods capture different aspects of uncertainty. Generative methods measure external consistency, while discriminative methods tap into internal knowledge. Combining methods across these categories yields massive calibration gains, whereas combining two methods of the same type provides little benefit.
  • The "U-Shaped" Confidence Curve: In long generations, generative confidence follows a U-shape—highest at the introduction and conclusion (where models repeat generic, easily verifiable facts) and lowest in the middle (where specific details vary across samples). Conversely, discriminative confidence steadily declines as the generation goes on.
Figure 2: Comparison of atomic level and response- level calibration for ECE and Brier Score. Atomic- level performance is generally worse than response- level performance, with data points consistently lying above the identity line.

Key Results

  • High Baseline Error: Even using the most robust single elicitation method (GEN-BINARY), the Expected Calibration Error (ECE) hovered around 10% across datasets—well above the ~1% expected of a truly well-calibrated model.
  • Fusion Superiority: The proposed AdjustedAlpha and DampedFusion methods consistently outperformed standard baseline fusion techniques (like simple weighted averages or harmonic means). For example, on the Bios dataset with Llama3-8B-Instruct, AdjustedAlpha slashed the ECE down to 4.1%, compared to GEN-BINARY alone at 10.0% and DIS-RATING at 26.8%.
  • Downstream Impact: The authors proved that better atomic calibration directly boosts performance in practical applications like Selective Question Answering (knowing when to remain silent), LLM Ensembling, and Atomic Claims Reunion (stitching together only the highest-confidence facts from multiple drafts).

Limitations and Future Work

While a major step forward, the authors note a few limitations:

  • Factuality Focus: The study concentrates purely on factuality and hallucinations, leaving other long-form text qualities like coherence, style, and creativity uncalibrated.
  • Open-Source Dependency: The discriminative methods require access to token-level logits, making them difficult to deploy on closed-source APIs (like OpenAI's default endpoints) without logit access.
  • No Post-Hoc Scaling: The paper focuses entirely on raw confidence elicitation and fusion without applying traditional post-hoc adjustments like temperature scaling or histogram binning, which represents a promising avenue for future work.

Summary updated

BibTeX
@misc{zhang2024atomic,
  author = {Caiqi Zhang and Ruihan Yang and Zhisong Zhang and Xinting Huang and Sen Yang and Dong Yu and Nigel Collier},
  title = {{Atomic Calibration of LLMs in Long-Form Generations}},
  year = {2024},
  eprint = {2410.13246},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.13246},
}
Figure