Efficient Non-Parametric Uncertainty Quantification for Black-Box Large Language Models and Decision Planning

Yao-Hung Hubert Tsai, Walter Talbott, Jian ZhangarXiv 2024 · DOI

Introduction

As Large Language Models (LLMs) evolve from conversational interfaces into autonomous agents capable of managing complex environments—such as smart homes or travel booking—the necessity for robust Uncertainty Quantification (UQ) becomes paramount. High-stakes decision-making requires agents to recognize when they are "hallucinating" or uncertain. Traditional UQ methods often suffer from two primary limitations: they either require "white-box" access to internal model logits (probabilities), which are unavailable for proprietary models like GPT-4, or they rely on computationally expensive "black-box" techniques involving multiple inference passes to measure consistency.

This research introduces an efficient, non-parametric approach to UQ that operates with a single inference pass and requires no access to internal model parameters, making it ideal for black-box LLM deployments.

Methodology: Point-wise Dependency Neural Estimation (PDNE)

The core of the proposed framework is Point-wise Dependency Neural Estimation (PDNE). Instead of calculating the direct probability of an action $y$ given a prompt $x$, the system estimates the dependency ratio: $$r(x,y) = \frac{p(x,y)}{p(x)p(y)}$$

A ratio $r > 1$ indicates a positive correlation, suggesting the action is appropriate for the context, while $r < 1$ suggests a negative correlation.

Overview of the PDNE framework from data collection to deployment.

The architecture utilizes a pre-trained LLM (e.g., Mistral-7B) as a feature extractor. These features are processed by a lightweight auxiliary network—comprising Gated Recurrent Units (GRUs) and fully-connected layers—trained specifically to estimate the dependency ratio. This allows the system to evaluate uncertainty with minimal overhead compared to the primary LLM inference.

Conformal Prediction and Thresholding

To translate these dependency scores into actionable decisions, the researchers employ Conformal Prediction. This statistical framework allows for the determination of a rigorous threshold. For instance, a threshold can be set to ensure that the correct action is included in the predicted set with a specific mathematical probability (e.g., 80%).

Calibration of the dependency threshold using conformal prediction to derive a specific score (1.627) for decision filtering.

If multiple actions exceed this threshold, the agent identifies the situation as ambiguous and can proactively seek human clarification, rather than making a potentially incorrect autonomous choice.

Experimental Setup and Datasets

The framework was evaluated using a custom Smart Home Dataset containing 20,000 pairs of user prompts (e.g., "I am exhausted today") and corresponding device actions (e.g., "living room light: dim"). The data was partitioned into training sets for the auxiliary network, calibration sets for setting uncertainty thresholds, and evaluation sets for performance testing.

Key Results and Insights

The study yielded several critical findings regarding the efficiency and reliability of PDNE-based agents:

  • Planning Strategy: Step-by-step planning, which incorporates the history of previous actions into the prompt for subsequent steps, significantly outperformed "all-at-once" generation. The step-by-step approach achieved an F1 score of 0.164, compared to 0.140 for the holistic approach.
  • Reliability of Dependency Scores: A strong correlation was observed between the dependency threshold and mean precision. As the threshold $t$ increased, the precision of the agent's actions also rose, confirming that the dependency score serves as a reliable proxy for decision correctness.
  • Effective Filtering: The conformal prediction threshold successfully filtered out irrelevant or hallucinated actions while maintaining high recall for relevant tasks.

Conclusion and Future Directions

This work demonstrates that efficient UQ for black-box LLMs is achievable through auxiliary dependency estimation. By decoupling uncertainty measurement from the internal mechanics of the LLM, this method provides a scalable path for safer AI agents.

Future research will address the limitations of "exact match" evaluation metrics by incorporating semantic similarity. Additionally, the authors plan to extend testing from synthetic smart home environments to more complex, open-domain planning tasks and conduct user studies to evaluate the human-in-the-loop dynamics of AI-initiated clarifications.

Summary updated

BibTeX
@misc{tsai2024efficient,
  author = {Yao-Hung Hubert Tsai and Walter Talbott and Jian Zhang},
  title = {{Efficient Non-Parametric Uncertainty Quantification for Black-Box Large Language Models and Decision Planning}},
  year = {2024},
  eprint = {2402.00251},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.00251},
}
Figure