Papers › Uncertainty Estimation and Quantification for LLMs: A Simple Supervised Approach

Uncertainty Estimation and Quantification for LLMs: A Simple Supervised Approach

24 Apr 2024arXiv:2404.15993archive 2025-07-28

Linyu Liu, Yu Pan, Xiaocheng Li, Guanting Chen

In this paper, we study the problem of uncertainty estimation and calibration for LLMs. We begin by formulating the uncertainty estimation problem, a relevant yet underexplored area in existing literature. We then propose a supervised approach that leverages labeled datasets to estimate the uncertainty in LLMs' responses. Based on the formulation, we illustrate the difference between the uncertainty estimation for LLMs and that for standard ML models and explain why the hidden neurons of the LLMs may contain uncertainty information. Our designed approach demonstrates the benefits of utilizing hidden activations to enhance uncertainty estimation across various tasks and shows robust transferability in out-of-distribution settings. We distinguish the uncertainty estimation task from the uncertainty calibration task and show that better uncertainty estimation leads to better calibration performance. Furthermore, our method is easy to implement and adaptable to different levels of model accessibility including black box, grey box, and white box.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2404.15993")

Code

Syntology Ran 13 of 18 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 13 ran with no contract checked.

By repository: official repository: 18 samples from 1 repository, 13 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

LoveCatc/supervised-llm-uncertainty-estimation officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested; 13 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

13ran
5unverified

Licence: 18 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from LoveCatc/supervised-llm-uncertainty-estimation. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

calculate_ece LoveCatc/supervised-llm-uncertainty-estimation/utils/calibration_metrics.py official repository ran no licence file found · pointer only · b90f1534d7fd6f84 · report
calculate_nll LoveCatc/supervised-llm-uncertainty-estimation/utils/calibration_metrics.py official repository ran no licence file found · pointer only · ee3bfb38567a7330 · report
calculate_nll_ece LoveCatc/supervised-llm-uncertainty-estimation/utils/calibration_metrics.py official repository ran no licence file found · pointer only · 96f7a0b4bbfc3427 · report
coqa_formatter LoveCatc/supervised-llm-uncertainty-estimation/utils/data_entry.py official repository ran no licence file found · pointer only · 9d13bc6d9727abfd · report
correlation_select_k_features LoveCatc/supervised-llm-uncertainty-estimation/utils/funs_feature_selection.py official repository ran no licence file found · pointer only · bd39f0d24eaa33a4 · report
generate_stopword_stopping_criteria LoveCatc/supervised-llm-uncertainty-estimation/supervised_generation.py official repository ran no licence file found · pointer only · 50864f75b834f39d · report
get_average_hidden_states LoveCatc/supervised-llm-uncertainty-estimation/utils/funs_get_feature_X.py official repository ran no licence file found · pointer only · 110e081edf72c07e · report
get_index_of_valid_X LoveCatc/supervised-llm-uncertainty-estimation/utils/funs_load_X_and_Y.py official repository ran no licence file found · pointer only · 5700274b87b272c4 · report
get_last_token_hidden_states LoveCatc/supervised-llm-uncertainty-estimation/utils/funs_get_feature_X.py official repository ran no licence file found · pointer only · 7e7fb553593d2c2b · report
lasso_select_k_features LoveCatc/supervised-llm-uncertainty-estimation/utils/funs_feature_selection.py official repository ran no licence file found · pointer only · ceccab32110fb3d9 · report
load_llama2 LoveCatc/supervised-llm-uncertainty-estimation/utils/funs_load_model.py official repository ran no licence file found · pointer only · 31807cc05985187a · report
mutual_info_select_k_features LoveCatc/supervised-llm-uncertainty-estimation/utils/funs_feature_selection.py official repository ran no licence file found · pointer only · 5d966d349a113a7b · report
normalize_text LoveCatc/supervised-llm-uncertainty-estimation/utils/data_entry.py official repository ran fingerprinted no licence file found · pointer only · e32f292f91eab5d8 · report
coqa_formatter_hf LoveCatc/supervised-llm-uncertainty-estimation/utils/data_entry.py official repository unverified no licence file found · pointer only · cb4222238d0d7761 · report
get_prob_statistics LoveCatc/supervised-llm-uncertainty-estimation/utils/funs_get_feature_X.py official repository unverified no licence file found · pointer only · 6d2be7746bd82de0 · report
load_MMLU_X_Y LoveCatc/supervised-llm-uncertainty-estimation/utils/funs_load_X_and_Y.py official repository unverified no licence file found · pointer only · dfae1827665ab944 · report
load_X_Y_with_phase LoveCatc/supervised-llm-uncertainty-estimation/utils/funs_load_X_and_Y.py official repository unverified no licence file found · pointer only · a366d95b77db279a · report
load_gemma LoveCatc/supervised-llm-uncertainty-estimation/utils/funs_load_model.py official repository unverified no licence file found · pointer only · b578098555ce09be · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections