{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/factual-confidence-of-llms-on-reliability-and","title":"Factual Confidence of LLMs: on Reliability and Robustness of Current Estimators","arxiv_id":"2406.13415","date":"2024-06-19","proceeding":null,"authors":["Matéo Mahaut","Laura Aina","Paula Czarnowska","Momchil Hardalov","Thomas Müller","Lluís Màrquez"],"abstract":"Large Language Models (LLMs) tend to be unreliable in the factuality of their answers. To address this problem, NLP researchers have proposed a range of techniques to estimate LLM's confidence over facts. However, due to the lack of a systematic comparison, it is not clear how the different methods compare to one another. To fill this gap, we present a survey and empirical comparison of estimators of factual confidence. We define an experimental framework allowing for fair comparison, covering both fact-verification and question answering. Our experiments across a series of LLMs indicate that trained hidden-state probes provide the most reliable confidence estimates, albeit at the expense of requiring access to weights and training data. We also conduct a deeper assessment of factual confidence by measuring the consistency of model behavior under meaning-preserving variations in the input. We find that the confidence of LLMs is often unstable across semantically equivalent inputs, suggesting that there is much room for improvement of the stability of models' parametric knowledge. Our code is available at (https://github.com/amazon-science/factual-confidence-of-llms).","url_abs":"https://arxiv.org/abs/2406.13415v1","url_pdf":"https://arxiv.org/pdf/2406.13415v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"factual-confidence-of-llms-on-reliability-and","repo_url":"https://github.com/amazon-science/factual-confidence-of-llms","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"fact-verification","task_name":"Fact Verification"},{"task_slug":"question-answering","task_name":"Question Answering"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2406.13415","atlas_url":"https://app.syntology.ai/?focus=2406.13415","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.13415"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/amazon-science/factual-confidence-of-llms","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/amazonscience/factual-confidence-of-llms","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}}],"summary":{"ran":9,"unverified":7},"by_repo_kind":{"official":{"samples":16,"ran":9,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"64cac13c7712a758","entry":"check_relation","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/data_gen/sf_graph_cleanup.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/data_gen/sf_graph_cleanup.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"64cac13c7712a758"}},{"code_sha256_prefix":"38bcad1abd42a39a","entry":"compute_on_device","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/evaluation/consistency_utils.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/evaluation/consistency_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"38bcad1abd42a39a"}},{"code_sha256_prefix":"96ff3da37ed8fb76","entry":"extract_ids","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/data_gen/sf_graph_cleanup.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/data_gen/sf_graph_cleanup.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"96ff3da37ed8fb76"}},{"code_sha256_prefix":"f6be3e2860c3bb80","entry":"format_context_trex","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/data_gen/sentence_extractors.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/data_gen/sentence_extractors.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f6be3e2860c3bb80"}},{"code_sha256_prefix":"5649462c5d6fa11b","entry":"get_lpaqa_paraphrase","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/data_gen/sentence_extractors.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/data_gen/sentence_extractors.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5649462c5d6fa11b"}},{"code_sha256_prefix":"c6aa1425713fcf1e","entry":"get_model","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/arch.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/arch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c6aa1425713fcf1e"}},{"code_sha256_prefix":"5bcc936c4c8aef88","entry":"get_tokenizer","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/arch.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/arch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5bcc936c4c8aef88"}},{"code_sha256_prefix":"a4baff91a17627e1","entry":"sequence_log_score","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/evaluation/logit_scorer_utils.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/evaluation/logit_scorer_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a4baff91a17627e1"}},{"code_sha256_prefix":"4a8e5481004d91f3","entry":"surrogate_logit_score","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/evaluation/logit_scorer_utils.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/evaluation/logit_scorer_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4a8e5481004d91f3"}},{"code_sha256_prefix":"94dd1ade2ee9847a","entry":"compute_all_scores","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/evaluation/consistency_utils.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/evaluation/consistency_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"94dd1ade2ee9847a"}},{"code_sha256_prefix":"5161229b89b4fad7","entry":"get_lama","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/data_gen/sampling.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/data_gen/sampling.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5161229b89b4fad7"}},{"code_sha256_prefix":"0e0da0e698e5347a","entry":"get_nli_scoring_fun","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/evaluation/consistency_utils.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/evaluation/consistency_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0e0da0e698e5347a"}},{"code_sha256_prefix":"298e3e6ffc4b1483","entry":"get_popQA","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/data_gen/sampling.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/data_gen/sampling.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"298e3e6ffc4b1483"}},{"code_sha256_prefix":"67ebd03e36b5d144","entry":"log_to_pandas_dataframe","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/slot_filling.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/slot_filling.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"67ebd03e36b5d144"}},{"code_sha256_prefix":"33ab7dabeec5a3a2","entry":"lpaqa_paraphrases","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/data_gen/sentence_extractors.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/data_gen/sentence_extractors.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"33ab7dabeec5a3a2"}},{"code_sha256_prefix":"cfdd2155ad385a81","entry":"o_pop_matching","repo":"amazon-science/factual-confidence-of-llms","repo_kind":"official","path":"src/self_knowledge/data_gen/sf_graph_cleanup.py","file_url":"https://github.com/amazon-science/factual-confidence-of-llms/blob/HEAD/src/self_knowledge/data_gen/sf_graph_cleanup.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cfdd2155ad385a81"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}