SIMBA UQ: Similarity-Based Aggregation for Uncertainty Quantification in Large Language Models

TL;DR

Proposes SIMBA UQ, a similarity-based framework for black-box uncertainty quantification, improving calibration on QA, summarization, and SQL tasks.

cs.CL 🔴 Advanced 2025-10-11 49 views
Debarun Bhattacharjya Balaji Ganesan Junkyu Lee Radu Marinescu Katsiaryna Mirylenka Michael Glass Xiao Shou
LLMs UQ Similarity Aggregation Black-box Methods Model Calibration

Key Findings

Methodology

This paper introduces a high-level similarity aggregation framework, unifying diverse black-box UQ approaches. It involves generating multiple samples via temperature sampling, computing pairwise similarities (e.g., Jaccard, ROUGE), and estimating confidence through Bayesian and classification techniques. The framework emphasizes non-verbalized similarity aggregation, avoiding overconfidence issues seen in verbalized confidence methods. By training confidence models with limited labeled data, it enhances calibration across complex tasks like QA, summarization, and text-to-SQL. Empirical results demonstrate significant improvements over baselines in calibration error and predictive accuracy, validated on datasets such as CoQA, XSum, and Spider.

Key Results

  • Across datasets, the proposed similarity-based methods reduced ACE calibration error by over 20%, with AUROC reaching 0.91, indicating excellent confidence estimation. For example, on CoQA, ACE dropped from 0.272 to 0.043, and AUROC increased from 0.72 to 0.91, outperforming baselines like avg. log prob and spectral clustering. Combining similarity features with generative scores in classifier models yielded the best results, demonstrating the benefit of multi-modal features. The methods performed consistently across short and long outputs, including structured SQL queries.

Significance

This work advances black-box uncertainty quantification by leveraging sample similarity, bypassing the need for internal model access. Its efficiency and scalability make it suitable for real-world deployment in diverse NLP tasks, enhancing trustworthiness of LLM outputs. The framework addresses longstanding challenges in calibration, providing a general, task-agnostic approach that improves decision-making reliability in critical applications like question answering, content generation, and database querying. Its ability to work with limited labeled data and multiple similarity metrics broadens its practical impact, fostering more trustworthy AI systems.

Technical Contribution

Key innovations include: 1) the development of the SIMBA framework that generalizes various consistency-based UQ methods via similarity aggregation; 2) the introduction of Bayesian and supervised classification strategies for confidence training, capable of using minimal labeled data; 3) extensive empirical validation across multiple datasets and models, showing consistent calibration improvements. The approach is compatible with various similarity metrics and task types, offering a flexible, lightweight solution for black-box uncertainty estimation, with theoretical and practical advantages over existing methods.

Novelty

This study is the first to formalize a unified similarity-based confidence aggregation framework for black-box UQ, moving beyond semantic similarity to a functional relation between sample consistency and correctness. It innovatively combines Bayesian inference and supervised learning to estimate confidence with limited data, addressing the calibration gap in complex generative tasks. Unlike prior work focusing solely on semantic similarity or requiring extensive fine-tuning, this approach emphasizes simplicity, adaptability, and broad applicability, marking a significant step forward in trustworthy AI.

Limitations

  • The method's effectiveness depends on the quality and diversity of generated samples; poor sampling can impair confidence estimates. In highly out-of-distribution scenarios, calibration may degrade. The supervised classifier approach requires some labeled data, which could be costly in certain domains. Additionally, the choice of similarity metric influences performance, necessitating further research into optimal metrics for different tasks.

Future Work

Future research will explore unsupervised and self-supervised training strategies to reduce reliance on labeled data, incorporate more sophisticated similarity measures (e.g., graph neural networks), and extend the framework to multimodal tasks. Improving robustness against distribution shifts and scaling to larger models and datasets are also promising directions, aiming to build more reliable and generalizable confidence estimation systems.

AI Executive Summary

Large language models (LLMs) have revolutionized NLP, yet their outputs' reliability remains a concern. Traditional uncertainty quantification (UQ) methods often rely on internal model parameters, limiting their applicability in real-world, dynamic environments. Black-box approaches, which only use output samples, offer a practical alternative. This paper introduces SIMBA UQ, a novel similarity-based framework that aggregates pairwise sample similarities to estimate confidence scores, thereby enhancing calibration without internal model access.

The core idea is straightforward: generate multiple outputs for a given input, compute their similarities using metrics like Jaccard or ROUGE, and then combine these similarities through Bayesian or supervised classification models. This approach leverages the assumption that correct responses tend to be more similar to each other, providing a proxy for correctness. The framework unifies various existing methods and introduces new techniques that require minimal labeled data, making it highly adaptable.

Extensive experiments on datasets such as CoQA, XSum, and Spider demonstrate that SIMBA UQ significantly outperforms traditional baselines in calibration error and predictive accuracy. For example, on the CoQA dataset, ACE error was reduced from 0.272 to 0.043, and AUROC improved to 0.91, indicating highly reliable confidence estimates. The methods proved effective across different tasks, models, and output lengths, including structured SQL queries.

This work has broad implications for deploying trustworthy AI systems. By providing a scalable, model-agnostic way to assess output confidence, it addresses a critical barrier to real-world adoption of LLMs. Future directions include integrating more sophisticated similarity measures, reducing dependence on labeled data, and expanding to multimodal applications, paving the way for more robust and trustworthy AI solutions.

Deep Analysis

Background

Recent advances in pretraining have propelled LLMs like GPT, BERT, and LLaMA to achieve remarkable performance across NLP tasks. However, their outputs often lack reliable confidence estimates, which are essential for safety-critical applications. White-box methods leveraging internal probabilities or activations have shown promise but face limitations due to model opacity and evolving architectures. Black-box techniques, focusing on output sample analysis, have gained traction, including consistency-based approaches and semantic similarity measures. Despite progress, challenges remain in calibrating confidence scores, especially for complex, multi-turn, or structured outputs like SQL queries. Existing methods often depend on extensive fine-tuning or assumptions about semantic similarity, limiting their generality. This context motivates the development of a unified, flexible framework capable of robust uncertainty quantification without internal model access.

Core Problem

The core challenge is to accurately assess the correctness of LLM outputs in a black-box setting, where internal model information is unavailable. Existing techniques either rely on verbalized confidence, which struggles with complex outputs, or on semantic similarity, which may not correlate well with correctness in structured tasks. Additionally, many methods require large labeled datasets for training, which is costly and impractical. The need for a scalable, task-agnostic, and minimally supervised approach to reliably estimate confidence scores remains unmet. Addressing this gap is crucial for deploying LLMs in real-world scenarios where trustworthiness and safety are paramount.

Innovation

The paper introduces the SIMBA framework, a novel approach that leverages sample similarities to estimate confidence. Its key innovations include: 1) formalizing confidence as a similarity aggregation problem, 2) developing Bayesian and supervised classification strategies that require only limited labeled data, 3) demonstrating the framework's versatility across diverse tasks and models. Unlike prior methods focused solely on semantic similarity or internal probabilities, this approach emphasizes a functional relation between sample consistency and correctness, enabling effective calibration in complex, real-world settings. The framework's simplicity, flexibility, and empirical robustness mark a significant advancement in black-box UQ.

Methodology

  • �� Generate multiple samples per input using temperature sampling, ensuring response diversity.
  • �� Compute pairwise similarities between samples using metrics like Jaccard or ROUGE.
  • �� Aggregate similarities to estimate confidence: • Simple average: mean similarity as confidence.
  • �� Bayesian update: model similarity distributions conditioned on correctness, compute posterior probabilities.
  • �� Classification: train a random forest classifier using similarity features and optional generative scores.
  • �� Use limited labeled data to fine-tune confidence models, ensuring minimal supervision.
  • �� Validate across datasets, tasks, and models, adjusting hyperparameters for optimal calibration.
  • �� Evaluate using ACE, ATS, and AUROC metrics, comparing against baselines like spectral clustering and verbalized confidence methods.

Experiments

The experimental setup involves datasets like CoQA, TriviaQA, XSum, SamSum, Spider, and BIRD, covering QA, summarization, and SQL tasks. Models include LLaMA 3.3 70B, Granite 8B, and Codellama 34B. For each, multiple samples are generated at temperatures from 0.25 to 1.5. The key evaluation metrics are ACE for calibration, ATS for selection accuracy, and AUROC for predictive power. Baselines include avg. log prob, spectral clustering, and verbalized confidence. The training involves limited labeled data for confidence model fine-tuning, with ablation studies to assess feature contributions. Results consistently show superior calibration and accuracy, validating the framework's effectiveness.

Results

Across all datasets, the proposed similarity-based methods outperform baselines, reducing ACE error by over 20% and achieving AUROC scores above 0.9. On CoQA, ACE dropped from 0.272 to 0.043, and AUROC increased from 0.72 to 0.91, demonstrating excellent confidence calibration. Combining similarity features with generative scores in classifiers further improved results, especially for structured outputs like SQL. The methods maintained robustness across different models and response lengths, confirming their general applicability. Ablation results indicated that integrating multiple features yields the best performance, highlighting the importance of multi-modal information for reliable UQ.

Applications

This framework enables deployment in real-world NLP systems requiring high-confidence outputs, such as customer service chatbots, automated content moderation, and database query systems. Its black-box nature allows easy integration without internal model modifications, suitable for diverse architectures and tasks. The approach can be extended to multimodal scenarios, combining text, images, and audio, to assess confidence across data types. It also facilitates active learning by identifying uncertain samples for annotation, reducing labeling costs. Long-term, it supports the development of trustworthy AI systems with calibrated, reliable outputs, fostering user trust and safety.

Limitations & Outlook

The effectiveness depends on the quality and diversity of generated samples; poor sampling reduces confidence accuracy. In out-of-distribution scenarios, calibration may degrade, requiring further robustness enhancements. The supervised classifier approach still needs some labeled data, which may be costly in certain domains. The choice of similarity metric influences performance, necessitating task-specific tuning. Future work should address these limitations by exploring unsupervised methods, advanced similarity measures, and robustness under distribution shifts.

Plain Language Accessible to non-experts

想象你在厨房里做菜,你会做很多份不同的菜。每份菜尝一尝,觉得味道相似,就会相信它们都做得不错;如果某份菜味道完全不同,可能就不太靠谱。这就像模型生成内容一样,我们用不同样本的“味道”——比如用数学方法计算它们的相似度——来判断它们的可靠性。相似的样本越多,说明它们可能都做得好;如果某个样本和其他样本差别很大,就可能出错。这样不用看菜谱(模型内部细节),只用“味道”判断,既简单又实用。它帮助我们在不完全了解厨房内部的情况下,判断菜的质量,确保出品的可靠。

ELI14 Explained like you're 14

想象你在玩一个游戏,你的朋友告诉你:你做的菜是不是好吃?你可以尝试不同的菜,然后根据它们的味道是否相似来判断。比如,所有菜味道都很像,说明都做得不错;如果某个菜味道特别奇怪,可能就不太好吃。这就是用“味道相似性”来判断菜好坏的方法。这个想法也可以用在让电脑判断自己生成的内容是不是靠谱。电脑会做很多不同的回答,然后用它们的“味道”——比如用数学方法计算它们的相似度——来判断哪个更可信。这样,即使没有人告诉它答案是不是对的,它也能自己判断出哪个更靠谱。这种方法简单又聪明,能让电脑变得更可靠、更聪明。

Abstract

When does a large language model (LLM) know what it does not know? Uncertainty quantification (UQ) provides measures of uncertainty, such as an estimate of the confidence in an LLM's generated output, and is therefore increasingly recognized as a crucial component of trusted AI systems. Black-box UQ methods do not require access to internal model information from the generating LLM and therefore have numerous real-world advantages, such as robustness to system changes, adaptability to choice of LLM, reduced costs, and computational tractability. In this paper, we investigate the effectiveness of UQ techniques that are primarily but not necessarily entirely black-box, where the consistency between a generated output and other sampled generations is used as a proxy for confidence in its correctness. We propose a high-level non-verbalized similarity-based aggregation framework that subsumes a broad swath of UQ approaches suitable for complex generative tasks, as well as introduce specific novel techniques from the framework that train confidence estimation models using small training sets. Through an empirical study with datasets spanning the diverse tasks of question answering, summarization, and text-to-SQL, we demonstrate that our proposed similarity-based methods can yield better calibrated confidences than baselines.

cs.CL cs.AI