Confidence Under the Hood: An Investigation into the Confidence-Probability Alignment in Large Language Models

Abhishek Kumar, Robert Morabito, Sanzhar Umbet, Jad Kabbara, Ali Emami

TL;DR

This paper introduces "Confidence-Probability Alignment," a framework to measure how well a Large Language Model's (LLM) expressed certainty matches its internal token probabilities. The researchers found that while GPT-4 shows the strongest alignment, most models—especially smaller open-source ones—struggle to accurately verbalize their internal confidence, posing a significant challenge for building trustworthy AI systems.

What Problem Does This Paper Address?

We’ve all seen LLMs hallucinate with extreme confidence, citing non-existent legal precedents or medical studies. As these models are integrated into high-stakes fields like healthcare and law, we need to know: When a model says it is "very certain," can we actually trust it?

Current advanced prompting techniques, such as "Tree of Thoughts" or "Self-Consistency," rely on the model’s ability to self-evaluate its own reasoning. However, if there is a misalignment between a model’s internal confidence (the mathematical probability it assigns to a word) and its verbalized certainty (what it tells the user), these self-evaluation techniques could lead to dangerously misleading results. This paper seeks to quantify this gap.

Methods

The authors developed a two-pronged approach to measure alignment, illustrated in the workflow below:

Figure 1: Flow diagram illustrating the process of ex- tracting and comparing the Internal Confidence and Ver- balized Certainty in an LLM.
  1. Internal Confidence ($P_{IC}$): This is the "raw" confidence. The authors extract the log probabilities (or logits) for the tokens in the model's chosen answer and normalize them against other possible options.
  2. Verbalized Certainty: The authors use a Confidence Querying Prompt (CQP) to ask the model how sure it is of its own answer. To get the most honest response, they employed three specific techniques:
  3. Simulation of Third-Person Perspective (TPP): Asking the model to evaluate an answer as if it were generated by another agent to reduce self-preferential bias.
  4. Option Contextualization (OC): Showing the model all possible multiple-choice options so it can compare its answer against alternatives.
  5. Likert Scale Utilization (LSU): Forcing the model to choose from a qualitative scale (e.g., "Very Certain" to "Not Certain"), which is then mapped to a numerical value (1.0 to 0.0).

The final "Alignment" is calculated using the Spearman’s rank correlation coefficient ($\rho$) between these two metrics.

Datasets

The models were tested across five diverse benchmarks designed to challenge different types of reasoning:

  • CommonsenseQA (CSQA): Everyday common-sense knowledge.
  • QASC: Multi-sentence compositional reasoning.
  • RiddleSense: Lateral thinking and riddles.
  • OpenBookQA: Science-based factual questions.
  • ARC (AI2 Reasoning Challenge): Complex, knowledge-intensive questions.

Key Insights and Ideas

  • The RLHF Advantage: Models trained with Reinforcement Learning from Human Feedback (like GPT-4 and InstructGPT-3 + RLHF) showed significantly better alignment than base models. This suggests that human feedback helps models "calibrate" their self-expression to their internal states.
  • Small Models Struggle with Meta-Reasoning: Open-source models like Phi-2 and Zephyr-7B performed dismally. They often failed to even follow the instructions to provide a certainty rating, suggesting that the ability to "think about thinking" (meta-cognition) might be an emergent property of larger, more instruction-tuned models.
  • Temperature Sensitivity: Increasing the "temperature" (randomness) of a model doesn't just change the answers; it makes the model's verbalized certainty much more volatile, especially on tasks requiring deep reasoning like RiddleSense.
Figure 3: Comparative analysis illustrating the relation- ship between temperature and average standard devia- tion of verbalized certainty across different datasets.
  • Four Flavors of Misalignment: The authors identified distinct ways models get it wrong, as shown in Figure 2:
  • Internal Overconfidence: High token probability, but the model says it's unsure.
  • External Overconfidence: Low token probability, but the model claims to be "very certain" (often due to overlearned societal norms).
  • Consistent Alignment/Discordance: Where the two metrics actually agree.
Figure 2: Illustration of GPT-4’s responses to various questions, accompanied by their internal confidences and expressed certainty levels. Questions sourced from CommonsenseQA dataset.

Key Results

  • GPT-4 is the Gold Standard: GPT-4 achieved the highest alignment across all datasets, with an average Spearman’s $\rho$ of 0.42. While this is a "moderate" correlation, it far outstripped its predecessors.
  • Base Models are Uncalibrated: GPT-3 (text-davinci-001) showed near-zero correlation, meaning its verbalized certainty was essentially random relative to its internal probabilities.
  • Internal Confidence Distribution: As seen in Figure 8, GPT-4's internal confidence tends to be very high (clustered near 1.0) for most tasks, which makes the instances where it does express doubt particularly valuable.
Figure 8: The distribution of internal confidence across multiple datasets, composed of the adjusted token prob- abilities obtained from GPT-4.

Limitations and Future Work

The study is primarily limited by API accessibility; the researchers could only test models that provide token-level probabilities (excluding models like PaLM 2 or Gemini). Furthermore, the study focused exclusively on English, leaving open the question of how linguistic complexity in other languages affects confidence alignment.

Future work could involve developing "feedback loops" where a model is trained specifically to minimize the gap between its internal and verbalized confidence, potentially leading to truly self-aware and trustworthy AI.

Summary updated

Abstract

As the use of Large Language Models (LLMs) becomes more widespread, understanding their self-evaluation of confidence in generated responses becomes increasingly important as it is integral to the reliability of the output of these models. We introduce the concept of Confidence-Probability Alignment, that connects an LLM's internal confidence, quantified by token probabilities, to the confidence conveyed in the model's response when explicitly asked about its certainty. Using various datasets and prompting techniques that encourage model introspection, we probe the alignment between models' internal and expressed confidence. These techniques encompass using structured evaluation scales to rate confidence, including answer options when prompting, and eliciting the model's confidence level for outputs it does not recognize as its own. Notably, among the models analyzed, OpenAI's GPT-4 showed the strongest confidence-probability alignment, with an average Spearman's $\hatρ$ of 0.42, across a wide range of tasks. Our work contributes to the ongoing efforts to facilitate risk assessment in the application of LLMs and to further our understanding of model trustworthiness.
BibTeX
@inproceedings{kumar2024confidence,
  author = {Abhishek Kumar and Robert Morabito and Sanzhar Umbet and Jad Kabbara and Ali Emami},
  title = {{Confidence Under the Hood: An Investigation into the Confidence-Probability Alignment in Large Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.20},
}
Figure