Introduction
As deep learning systems, particularly Large Language Models (LLMs), are increasingly deployed in high-stakes domains like healthcare and law, understanding when a model's prediction is reliable becomes paramount. However, uncertainty in Natural Language Processing (NLP) is inherently "messy," arising from both statistical sources (model capacity, data scarcity) and linguistic properties (ambiguity and paraphrasticity). This work provides a comprehensive framework for characterizing and quantifying these uncertainties, identifying fundamental theoretical pitfalls in standard neural architectures, and proposing practical tools for confidence estimation.
Theoretical Foundations and Experimental Rigor
A core contribution of this research is the identification of a mathematical limitation in ReLU-based neural networks. The thesis proves that the inductive bias of these classifiers causes uncertainty metrics, such as predictive entropy, to converge to fixed points as inputs move far from the training distribution. Consequently, these models are mathematically incapable of signaling high uncertainty for extreme out-of-distribution (OOD) inputs.
To address the high variance often seen in deep learning research, the author advocates for the Almost Stochastic Order (ASO) test. Unlike standard p-values, ASO is a non-parametric test that quantifies the degree to which one model's score distribution is "stochastically larger" than another's. This provides a more robust and conservative tool for model selection, helping researchers avoid statistical flukes.
Methods for Quantifying Uncertainty
The thesis introduces two primary methods for practical uncertainty quantification:
- Calibrated Sampling for NLG: To provide guarantees in text generation, the author introduces a method based on non-exchangeable conformal prediction. By utilizing k-nearest neighbor (k-NN) retrieval from a datastore of model activations, the system dynamically adjusts its sampling set. This ensures the set contains the "correct" next token with a user-specified probability, maintaining reliability even under distributional shifts.
- APRICOT (Auxiliary PRediction In COnfidence Targets): This lightweight method addresses black-box LLMs where internal weights or logits are inaccessible. APRICOT trains a small auxiliary model (e.g., DeBERTa) to predict the target LLM's confidence. Calibration targets are set by clustering similar questions and using the LLM's group-wise accuracy as a proxy for confidence, relying solely on input and output text.
Experimental Evaluation
The proposed methods were evaluated across several tasks and datasets:
- Text Classification: Clinc Plus (intent classification), Dan+ (Danish NER), and the Finnish UD Treebank (PoS tagging) were used to study data scarcity and OOD shifts.
- Natural Language Generation: Evaluated on WMT-2022 (German-English and Japanese-English translation) and OpenWebText.
- LLM Confidence: Tested on Vicuna v1.5 and GPT-3.5 using TriviaQA and CoQA.
Key Insights
- The "More Data" Paradox: In low-resource settings, adding more training data to pre-trained models can sometimes degrade OOD uncertainty estimates. This suggests "selective compression," where models learn to ignore features essential for signaling uncertainty if they aren't useful for the primary task.
- Predictability of Black-Box Confidence: APRICOT consistently outperformed baselines like verbalized uncertainty (asking the model for its confidence) in error detection, achieving significantly higher AUROC scores. This demonstrates that the generated text itself contains sufficient signal for reliability estimation.
- Linguistic vs. Statistical Uncertainty: The research emphasizes the "paraphrastic" nature of language. A model's uncertainty about a specific token may stem from the existence of multiple valid ways to express an idea rather than a lack of knowledge. Disentangling these forms of uncertainty remains a critical challenge.
Conclusion
While this work provides robust tools for quantifying uncertainty, several avenues for future research remain. The current methods, particularly k-NN retrieval, introduce significant computational overhead. Furthermore, extending these frameworks to more open-ended tasks like summarization and to a broader range of morphologically diverse languages is necessary. Ultimately, the challenge lies not only in quantification but also in communicating these uncertainties effectively to human users to foster appropriate trust in AI systems.
Summary updated