XU-RS: Explaining Credal Width in Random-Set Language Models
Organizations: Institute for AI, Data Analysis and Systems (AIDAS) Oxford Brookes University
Abstract
Uncertainty estimates tell us how unsure a model is, but not why. Without knowing which parts of an input influences a model's uncertainty, we cannot tell whether that uncertainty score depends on input features that are relevant for the task. We study this problem in randomset classifiers built using pretrained language models. These classifiers assign probability to individual answers and to groups of answers, producing lower and upper probabilities for each answer; The difference between these probabilities, called credal width, is used to represent epistemic uncertainty about an answer arising from limited training data. We propose XU-RS, a framework that attributes an answer's credal width to the input tokens (words or word pieces) supplied to a language model. XU-RS uses Expected Gradients (a standard feature attribution method) to estimate how input tokens contribute to credal width. The proposed framework is evaluated on a MedQA dataset using SmolLM3-3B and Llama-2-7B models, demonstrating that setting the embedding of a token ranked highly by XU-RS to zero (zero-masking) causes larger changes in credal width than zero-masking randomly selected tokens. In addition, we show that normalisation can cause other answer groups to influence an answer's width, reveal how token attribution can mask numerical errors, and provide diagnostic checks to verify whether a token ranked highly by XU-RS meaningfully explains model uncertainty.
Figures & tables
| Model | Questions | Mean advantage | 95% CI |
|---|---|---|---|
| SmolLM3-3B | 0.0381 | [0.0243, 0.0532] | |
| Llama-2-7B | 0.0450 | [0.0295, 0.0617] |
| Reference | Rank | Vector difference | |
|---|---|---|---|
| Training prompts | 0.9951 | 0.0652 | 0.1563 |
| Aligned paired prompt | 1.0000 | 0.0144 | 0.0384 |
| Zero-embedding baseline | 0.9840 | 0.6428 | 0.3375 |
| Case | Absolute shift | IG residual | ||
|---|---|---|---|---|
| family007_case00 | 0.481233 | |||
| family094_case02 | 0.373522 | |||
| family098_case00 | 0.202545 | |||
| family017_case00 | 0.536730 |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Setting | SmolLM3-3B | Llama-2-7B |
| LoRA rank | 16 | 8 |
| LoRA scaling parameter | 32 | 16 |
| LoRA dropout | 0.05 | 0.05 |
| LoRA learning rate | ||
| Output-layer learning rate | ||
| Weight decay | 0.01 | 0.1 |
| Setting | SmolLM3-3B | Llama-2-7B |
| Reference collections | 1 | 3 |
| Prompts per collection | 256 | 1,024 |
| EG samples per collection | 512 | 1,024 |
| Attribution base seed | 11 | 11 |
| Samples processed per call | 8 | 2 |
| Model arithmetic | FP16 | BF16 |
| Measurement | Required value |
|---|---|
| Median Spearman correlation between section rankings | |
| Fraction agreeing on the highest-attributed option | |
| Mean overlap among the 20 highest-ranked tokens | |
| Median mean absolute difference between section shares | |
| Maximum difference in the selected answer’s width |
| Measurement | Required value |
|---|---|
| Median completeness residual | |
| Maximum completeness residual | |
| Median Spearman correlation between token rankings | |
| Median overlap among the 20 highest-ranked tokens | |
| Median cosine similarity between attribution vectors | |
| Median relative Euclidean distance between vectors |
| Configuration | Rescaling (%) | Mean total adjustment |
|---|---|---|
| SmolLM3: head only | 95.84 | 1.2311 |
| SmolLM3: partial tuning | 99.84 | 2.1623 |
| SmolLM3: LoRA | 99.92 | 1.7221 |
| Llama-2: LoRA, seed 7 | 99.14 | 2.2889 |
| Llama-2: LoRA, seed 17 | 99.61 | 2.4980 |
| Llama-2: LoRA, seed 23 | 99.92 | 2.8108 |
| IG reference | Region | Clue share (%) | Difference (pp) | Best rank |
|---|---|---|---|---|
| Training prompts | All text | 2.07 | 44 | |
| Training prompts | Case text | 22.97 | 5 | |
| Aligned paired prompt | All text | 52.59 | 1 | |
| Aligned paired prompt | Case text | 52.59 | 1 |
| Training seed | Training error | Development error |
|---|---|---|
| 7 | 0.1221 | 0.4263 |
| 17 | 0.1176 | 0.4261 |
| 23 | 0.1173 | 0.4359 |