{"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/distinguishing-the-knowable-from-the","title":"Distinguishing the Knowable from the Unknowable with Language Models","arxiv_id":"2402.03563","date":"2024-02-05","proceeding":null,"authors":["Gustaf Ahdritz","Tian Qin","Nikhil Vyas","Boaz Barak","Benjamin L. Edelman"],"abstract":"We study the feasibility of identifying epistemic uncertainty (reflecting a lack of knowledge), as opposed to aleatoric uncertainty (reflecting entropy in the underlying distribution), in the outputs of large language models (LLMs) over free-form text. In the absence of ground-truth probabilities, we explore a setting where, in order to (approximately) disentangle a given LLM's uncertainty, a significantly larger model stands in as a proxy for the ground truth. We show that small linear probes trained on the embeddings of frozen, pretrained models accurately predict when larger models will be more confident at the token level and that probes trained on one text domain generalize to others. Going further, we propose a fully unsupervised method that achieves non-trivial accuracy on the same task. Taken together, we interpret these results as evidence that LLMs naturally contain internal representations of different types of uncertainty that could potentially be leveraged to devise more informative indicators of model confidence in diverse practical settings.","url_abs":"https://arxiv.org/abs/2402.03563v2","url_pdf":"https://arxiv.org/pdf/2402.03563v2.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":"distinguishing-the-knowable-from-the","repo_url":"https://github.com/gahdritz/llm_uncertainty","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"distinguishing-the-knowable-from-the","repo_url":"https://github.com/mims-harvard/spectra","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.03563","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.03563"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/mims-harvard/spectra","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gahdritz/llm_uncertainty","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":6,"unverified":10},"by_repo_kind":{"official":{"samples":11,"ran":6,"repositories":1},"listed":{"samples":5,"ran":0,"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":"fd462b61b82d4e41","entry":"build_rope_cache","repo":"gahdritz/llm_uncertainty","repo_kind":"official","path":"lit-llama/model.py","file_url":"https://github.com/gahdritz/llm_uncertainty/blob/HEAD/lit-llama/model.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":"fd462b61b82d4e41"}},{"code_sha256_prefix":"625d925ef1efd4f4","entry":"compute_entropy","repo":"gahdritz/llm_uncertainty","repo_kind":"official","path":"repetition.py","file_url":"https://github.com/gahdritz/llm_uncertainty/blob/HEAD/repetition.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"625d925ef1efd4f4"}},{"code_sha256_prefix":"6555dda0713b63e2","entry":"jsd","repo":"gahdritz/llm_uncertainty","repo_kind":"official","path":"lit-llama/utils.py","file_url":"https://github.com/gahdritz/llm_uncertainty/blob/HEAD/lit-llama/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6555dda0713b63e2"}},{"code_sha256_prefix":"33a04a05cc4d445e","entry":"llama_model_lookup","repo":"gahdritz/llm_uncertainty","repo_kind":"official","path":"lit-llama/utils.py","file_url":"https://github.com/gahdritz/llm_uncertainty/blob/HEAD/lit-llama/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":"33a04a05cc4d445e"}},{"code_sha256_prefix":"b3eb11b6f841e055","entry":"pythia_forward","repo":"gahdritz/llm_uncertainty","repo_kind":"official","path":"precompute_logits.py","file_url":"https://github.com/gahdritz/llm_uncertainty/blob/HEAD/precompute_logits.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":"b3eb11b6f841e055"}},{"code_sha256_prefix":"aeff514913b60d52","entry":"read_shard","repo":"gahdritz/llm_uncertainty","repo_kind":"official","path":"train_head_utils.py","file_url":"https://github.com/gahdritz/llm_uncertainty/blob/HEAD/train_head_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":"aeff514913b60d52"}},{"code_sha256_prefix":"c44aa791d163dc8e","entry":"align_overlap","repo":"mims-harvard/spectra","repo_kind":"listed","path":"SPECTRA_paper/SPECTRA_SD/PEER_localization/calculate_sequence_similarity.py","file_url":"https://github.com/mims-harvard/spectra/blob/HEAD/SPECTRA_paper/SPECTRA_SD/PEER_localization/calculate_sequence_similarity.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c44aa791d163dc8e"}},{"code_sha256_prefix":"16b3ba074f0d8074","entry":"apply_rope","repo":"gahdritz/llm_uncertainty","repo_kind":"official","path":"lit-llama/model.py","file_url":"https://github.com/gahdritz/llm_uncertainty/blob/HEAD/lit-llama/model.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":"16b3ba074f0d8074"}},{"code_sha256_prefix":"362c6a2a81602b1c","entry":"compare_to_all","repo":"mims-harvard/spectra","repo_kind":"listed","path":"SPECTRA_paper/SPECTRA_SD/PEER_localization/calculate_sequence_similarity.py","file_url":"https://github.com/mims-harvard/spectra/blob/HEAD/SPECTRA_paper/SPECTRA_SD/PEER_localization/calculate_sequence_similarity.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"362c6a2a81602b1c"}},{"code_sha256_prefix":"019a737a08eeaf7e","entry":"extract_data","repo":"mims-harvard/spectra","repo_kind":"listed","path":"SPECTRA_paper/SPECTRA_SD/TAPE_Homology/calculate_similarity.py","file_url":"https://github.com/mims-harvard/spectra/blob/HEAD/SPECTRA_paper/SPECTRA_SD/TAPE_Homology/calculate_similarity.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"019a737a08eeaf7e"}},{"code_sha256_prefix":"79344d1f8e7386a7","entry":"istarmap","repo":"mims-harvard/spectra","repo_kind":"listed","path":"SPECTRA_paper/SPECTRA_SD/PEER_localization/calculate_sequence_similarity.py","file_url":"https://github.com/mims-harvard/spectra/blob/HEAD/SPECTRA_paper/SPECTRA_SD/PEER_localization/calculate_sequence_similarity.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"79344d1f8e7386a7"}},{"code_sha256_prefix":"92f3dde3779ce5cb","entry":"lazy_load","repo":"gahdritz/llm_uncertainty","repo_kind":"official","path":"lit-llama/utils.py","file_url":"https://github.com/gahdritz/llm_uncertainty/blob/HEAD/lit-llama/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":"92f3dde3779ce5cb"}},{"code_sha256_prefix":"57c12d6227a85cb1","entry":"mutual_information","repo":"gahdritz/llm_uncertainty","repo_kind":"official","path":"generate_from_repetition.py","file_url":"https://github.com/gahdritz/llm_uncertainty/blob/HEAD/generate_from_repetition.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":"57c12d6227a85cb1"}},{"code_sha256_prefix":"24a0bd59545e8931","entry":"repetition_experiment","repo":"gahdritz/llm_uncertainty","repo_kind":"official","path":"repetition.py","file_url":"https://github.com/gahdritz/llm_uncertainty/blob/HEAD/repetition.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":"24a0bd59545e8931"}},{"code_sha256_prefix":"3e6cd88740fb23a0","entry":"run_independent_set","repo":"mims-harvard/spectra","repo_kind":"listed","path":"SPECTRA_paper/SPECTRA_MSD/TB_Covid_GFP/utils/independent_set_algorithm.py","file_url":"https://github.com/mims-harvard/spectra/blob/HEAD/SPECTRA_paper/SPECTRA_MSD/TB_Covid_GFP/utils/independent_set_algorithm.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3e6cd88740fb23a0"}},{"code_sha256_prefix":"de50ccf9e860e5bc","entry":"simple_classification","repo":"gahdritz/llm_uncertainty","repo_kind":"official","path":"generate_from_repetition.py","file_url":"https://github.com/gahdritz/llm_uncertainty/blob/HEAD/generate_from_repetition.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":"de50ccf9e860e5bc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}