Introduction
Large Language Models (LLMs) have demonstrated remarkable capabilities across various tasks, yet they remain notoriously sensitive to the specific phrasing of prompts. A minor lexical change in a query can result in significantly different confidence levels in the model's output, a phenomenon termed "prompt sensitivity." This paper addresses the resulting miscalibration—where a model's reported confidence does not align with its actual knowledge—by proposing a framework that shifts the focus from lexical tokens to semantic meaning.
The Challenge: Token-Level Overfitting
The core issue identified is token-level overfitting. Current LLMs often map specific sequences of tokens directly to answers, rather than reasoning about the underlying semantic concepts. For instance, a model might express 90% confidence in an answer when asked one way, but only 10% when the same question is slightly rephrased. This discrepancy suggests that the model's internal uncertainty is not reflecting a lack of factual knowledge, but rather a sensitivity to the surface-level representation of the question.
Proposed Methodology
The authors introduce a two-pronged approach to recover reliable uncertainty estimates and quantify the extent of prompt sensitivity.
1. Semantic-Invariant Perturbation Sampling
To mitigate the impact of specific phrasings, the researchers propose sampling across multiple semantically equivalent paraphrases of a question (e.g., "Who succeeded Arthur Balfour?" vs. "Who was the next PM after Balfour?"). By aggregating the model's responses across these diverse "views" of the same concept, they can estimate a more stable and accurate answer distribution. This approach is mathematically grounded in Ergodic Theory, suggesting that sampling across these perturbations eventually converges to the model's "true" distribution for the underlying concept.
2. Uncertainty Decomposition via Embedding Variance
Traditional uncertainty metrics, such as Entropy, typically require grouping answers into discrete buckets, which fails to account for semantic similarity between different strings. To overcome this, the authors represent model responses as high-dimensional vectors (embeddings) and calculate the Total Variance. This variance is then decomposed into three components:
- Aleatoric Uncertainty: The variance observed within a single phrasing (fluctuations when the same prompt is repeated).
- Epistemic Uncertainty: The variance observed between different paraphrases (how much the model's output changes due to wording).
- Prompt Sensitivity Ratio ($\rho_u$): A novel metric representing the proportion of total uncertainty attributable to phrasing.
Experimental Evaluation
The framework was evaluated using the TriviaQA and Natural Questions (NQ) datasets across several models, including GPT-3.5 Turbo, Llama 2-Base (7B), and Llama 2-Chat (7B).
Key Findings
- Calibration Improvement: Utilizing the "Total Variance" metric with paraphrase sampling significantly improved calibration. On the NQ dataset with GPT-3.5, calibration scores (measured by AUROC) increased from approximately 66% to 72%.
- The "Free Lunch" of Paraphrasing: Unlike many calibration techniques that trade off accuracy for better uncertainty estimates (e.g., increasing temperature), paraphrase sampling provides a "Pareto improvement," enhancing calibration without degrading accuracy.
- Optimal Sampling Strategy: The study found that given a fixed sampling budget, it is more effective to query multiple unique paraphrases once each than to query a single prompt multiple times.
- The Impact of RLHF: A significant discovery was that Llama 2-Chat, which underwent Reinforcement Learning from Human Feedback (RLHF), exhibited higher prompt sensitivity than its base counterpart. This suggests that alignment tuning may cause "distributional collapse," making model confidence more dependent on specific lexical patterns.
Conclusion and Future Directions
This research highlights the necessity of moving beyond token-based evaluations toward a semantic-centric understanding of LLM behavior. While the proposed framework offers a robust method for improving and auditing calibration, it introduces additional computational costs due to the need for multiple samples. Future work will explore more efficient sampling methods and investigate whether prompt sensitivity is a fundamental structural property of LLMs or an artifact of current alignment processes.
Summary updated