{"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/your-pre-trained-llm-is-secretly-an","title":"Your Pre-trained LLM is Secretly an Unsupervised Confidence Calibrator","arxiv_id":"2505.16690","date":"2025-05-22","proceeding":null,"authors":["Beier Luo","Shuoyuan Wang","Yixuan Li","Hongxin Wei"],"abstract":"Post-training of large language models is essential for adapting pre-trained language models (PLMs) to align with human preferences and downstream tasks. While PLMs typically exhibit well-calibrated confidence, post-trained language models (PoLMs) often suffer from over-confidence, assigning high confidence to both correct and incorrect outputs, which can undermine reliability in critical applications. A major obstacle in calibrating PoLMs is the scarcity of labeled data for individual downstream tasks. To address this, we propose Disagreement-Aware Confidence Alignment (DACA), a novel unsupervised method to optimize the parameters (e.g., temperature $\\tau$) in post-hoc confidence calibration. Our method is motivated by the under-confidence issue caused by prediction disagreement between the PLM and PoLM while aligning their confidence via temperature scaling. Theoretically, the PLM's confidence underestimates PoLM's prediction accuracy on disagreement examples, causing a larger $\\tau$ and producing under-confident predictions. DACA mitigates this by selectively using only agreement examples for calibration, effectively decoupling the influence of disagreement. In this manner, our method avoids an overly large $\\tau$ in temperature scaling caused by disagreement examples, improving calibration performance. Extensive experiments demonstrate the effectiveness of our method, improving the average ECE of open-sourced and API-based LLMs (e.g. GPT-4o) by up to 15.08$\\%$ on common benchmarks.","url_abs":"https://arxiv.org/abs/2505.16690v1","url_pdf":"https://arxiv.org/pdf/2505.16690v1.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":[],"tasks":[],"methods":[{"method_slug":"align","method_name":"ALIGN"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2505.16690","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.16690"}},"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":"deterministic:regex_extraction","url":"https://github.com/ml-stat-Sustech/Disagreement-Aware-Calibration","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":7},"by_repo_kind":{"found_in_text":{"samples":7,"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":"718d1ba9049ace00","entry":"format_example","repo":"ml-stat-Sustech/Disagreement-Aware-Calibration","repo_kind":"found_in_text","path":"common/datasets.py","file_url":"https://github.com/ml-stat-Sustech/Disagreement-Aware-Calibration/blob/HEAD/common/datasets.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":"718d1ba9049ace00"}},{"code_sha256_prefix":"a166a44f3a14cb2a","entry":"label_map","repo":"ml-stat-Sustech/Disagreement-Aware-Calibration","repo_kind":"found_in_text","path":"common/utils.py","file_url":"https://github.com/ml-stat-Sustech/Disagreement-Aware-Calibration/blob/HEAD/common/utils.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":"a166a44f3a14cb2a"}},{"code_sha256_prefix":"11049c9816c9a9f8","entry":"load_calibration_dataset","repo":"ml-stat-Sustech/Disagreement-Aware-Calibration","repo_kind":"found_in_text","path":"common/datasets.py","file_url":"https://github.com/ml-stat-Sustech/Disagreement-Aware-Calibration/blob/HEAD/common/datasets.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":"11049c9816c9a9f8"}},{"code_sha256_prefix":"fa545644bf2117e7","entry":"loss_function","repo":"ml-stat-Sustech/Disagreement-Aware-Calibration","repo_kind":"found_in_text","path":"calibration/optimization.py","file_url":"https://github.com/ml-stat-Sustech/Disagreement-Aware-Calibration/blob/HEAD/calibration/optimization.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":"fa545644bf2117e7"}},{"code_sha256_prefix":"bbaf43563c62e2ce","entry":"optimize_temperature","repo":"ml-stat-Sustech/Disagreement-Aware-Calibration","repo_kind":"found_in_text","path":"calibration/optimization.py","file_url":"https://github.com/ml-stat-Sustech/Disagreement-Aware-Calibration/blob/HEAD/calibration/optimization.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":"bbaf43563c62e2ce"}},{"code_sha256_prefix":"6efdbf11d5e6d929","entry":"return_conf","repo":"ml-stat-Sustech/Disagreement-Aware-Calibration","repo_kind":"found_in_text","path":"common/metrics.py","file_url":"https://github.com/ml-stat-Sustech/Disagreement-Aware-Calibration/blob/HEAD/common/metrics.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":"6efdbf11d5e6d929"}},{"code_sha256_prefix":"ce026d3d474f675d","entry":"split_and_convert","repo":"ml-stat-Sustech/Disagreement-Aware-Calibration","repo_kind":"found_in_text","path":"common/data.py","file_url":"https://github.com/ml-stat-Sustech/Disagreement-Aware-Calibration/blob/HEAD/common/data.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":"ce026d3d474f675d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}