A statistical measure of trust in generative AI
Organizations: Applied AI Institute · Independent researcher · Hamad Bin Khalifa University · BIMAI-Lab ·
Abstract
Trustworthiness is a crucial issue for generative AI, as modern models can produce convincing and confident responses even when their outputs are incomplete, unsupported, or wrong. The frequent absence of ground-truth knowledge or labels complicates verification of generative AI outputs. To address this issue, we propose a trustworthiness framework grounded in model-internal confidence calibrated against an external expert reference. We estimate per-token trustworthiness of a student generative model as the statistical typicality of each generated token relative to an expert model's distribution, where the expert is used as a distributional reference rather than as a source of factual verification labels. To this end, we introduce an AI ontology calibrator that leverages the student model's internal latent features and token-level output statistics to compute expert-reference acceptance scores. Combined with traditional token-level confidence, entropy, and perplexity statistics, calibrator scores yield a compact set of response-level indicators for correctness classification. Evaluated across BF program generation, mathematical problem solving, and medical question answering, combined calibrator and traditional indicators provide complementary reliability signal which could be used to build detectors of untrustworthy outputs and hallucinations. Remarkably, our experiments show that these detectors are transferable across domains, although transferability is not always symmetric.
Figures & tables
| \Block 1-2Ontology | BF | \Block 1-2Math | \Block 1-4Medicine | |||||
| \Block 1-2Data for building calibrators | \Block 1-1Custom 433,688 pairs | |||||||
| of (program, output) | \Block 1-2Open-source 5,000 pairs of | |||||||
| (problem, solution) – batch 1 | \Block 1-4Open-source 12,369 pairs of | |||||||
| (problem, answer) | ||||||||
| \Block 1-2Expert | BF compiler | \Block 1-2DeepSeek-R1 | \Block 1-4GPT-OSS-120B | |||||
| \Block 1-2Student (N params) |
| \Block 2-2Indicators | \Block 1-4Medicine | \Block 1-1BF | \Block 1-2Math, V1 | \Block 1-2Math, V2 | ||||||
| MedGemma | Qwen3-8B | Qwen3-0.6B | Qwen3.5-0.8B | Custom Transformer | LLM-Judge | ProcessBench | LLM-Judge | ProcessBench | ||
| \Block 1-11 Logistic Regression | ||||||||||
| \Block 5-1Individual | ||||||||||
| (ours) | 0.5681 0.0299 | 0.5131 0.0433 | 0.5674 0.0403 | 0.4922 0.0562 | 0.7179 0.1410 | 0.5049 0.0730 | 0.4798 0.0221 | 0.5026/0.5220 | 0.5162/0.4777 | |
| 0.5779 0.0329 | 0.5281 0.0416 | 0.5564 0.0396 | 0.5263 0.0718 | 0.5709 0.1358 | 0.5397 0.0832 | 0.5676 0.0674 | 0.5101/0.5055 | 0.5217/0.4691 | ||
| 0.6701 0.0377 | 0.4857 0.0392 | 0.7890 0.0518 | 0.5311 0.0486 | 0.5509 0.2132 | 0.6511 0.0725 | 0.5134 0.0570 | 0.6004/0.7610 | 0.5379/0.5463 |
Appendix figures & tables21 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol(s) | Command description |
| >/< | Increment / decrement the data pointer by one. |
| +/- | Increment / decrement the byte at the data pointer by one. |
| . | Output the byte at the data pointer. |
| , | Accept one byte of input, storing its value in the byte at the data pointer. |
| [/] | If the byte at the data pointer is zero / non-zero, then instead of moving |
| the instruction pointer forward to the next command, jump it forward to |
| \Block 1-2Indicators | Test mean std Balanced Accuracy | vs traditional [95% CI] | (Holm) | |
| \Block 1-2Traditional | ||||
| reference | — | |||
| \Block 3-1The first 12 | ||||
| indicators | with -based | [+0.0121, ) | ||
| with -based | [+0.0032, ) | |||
| with -based | [+0.0064, ) |
| Probability type | Indicator group | Indicators | Balanced Accuracy |
| \Block 11-1 Probability of rejection | \Block 7-1Individual | ||
| \Block 2-1 | \Block 1-4Medicine | BF | \Block 1-2Math, V1 | ||||
| MedGemma | Qwen3-8B | Qwen3-0.6B | Qwen3.5-0.8B | Custom Transformer | LLM-Judge | Process Bench | |
| \Block 2-1 Best combination among eight traditional indicators | 0.7068 0.0106 | 0.7259 0.0159 | 0.8556 0.0101 | 0.6971 0.0360 | 0.6238 0.1339 | 0.6357 0.2082 | 0.7128 0.2361 |
| , , , | , , , , | , , , , | , , , | , , , , , , | , , | , , , | |
| \Block 2-1 Best combination among five calibrator indicators + two mixed | 0.6724 0.0135 | 0.6744 0.034 | 0.8514 0.019 | 0.5827 0.029 | 0.6323 0.0164 | 0.6236 0.1954 | 0.6891 0.2167 |
| , , | , , , | , , | , | , , , , | , , , | , , , , , | |
| \Block 2-1 Best combination among all 15 indicators (from our submitted paper) | 0.7141 0.0286 | 0.7284 0.0417 | 0.8604 0.0334 | 0.7035 0.0557 | 0.8299 0.1130 | 0.6389 0.2116 | 0.7153 0.2354 |
LLM Reliability
Large language model reliability studies whether outputs remain correct, calibrated, robust, and controllable across prompts, contexts, and deployment conditions.
See all 876 papers