{"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/post-hoc-uncertainty-learning-using-a","title":"Post-hoc Uncertainty Learning using a Dirichlet Meta-Model","arxiv_id":"2212.07359","date":"2022-12-14","proceeding":null,"authors":["Maohao Shen","Yuheng Bu","Prasanna Sattigeri","Soumya Ghosh","Subhro Das","Gregory Wornell"],"abstract":"It is known that neural networks have the problem of being over-confident when directly using the output label distribution to generate uncertainty measures. Existing methods mainly resolve this issue by retraining the entire model to impose the uncertainty quantification capability so that the learned model can achieve desired performance in accuracy and uncertainty prediction simultaneously. However, training the model from scratch is computationally expensive and may not be feasible in many situations. In this work, we consider a more practical post-hoc uncertainty learning setting, where a well-trained base model is given, and we focus on the uncertainty quantification task at the second stage of training. We propose a novel Bayesian meta-model to augment pre-trained models with better uncertainty quantification abilities, which is effective and computationally efficient. Our proposed method requires no additional training data and is flexible enough to quantify different uncertainties and easily adapt to different application settings, including out-of-domain data detection, misclassification detection, and trustworthy transfer learning. We demonstrate our proposed meta-model approach's flexibility and superior empirical performance on these applications over multiple representative image classification benchmarks.","url_abs":"https://arxiv.org/abs/2212.07359v1","url_pdf":"https://arxiv.org/pdf/2212.07359v1.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":"post-hoc-uncertainty-learning-using-a","repo_url":"https://github.com/maohaos2/PosthocUQ","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"transfer-learning","task_name":"Transfer Learning"},{"task_slug":"uncertainty-quantification","task_name":"Uncertainty Quantification"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"base","method_name":"BASE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2212.07359","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2212.07359"}},"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/maohaos2/PosthocUQ","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran":1,"unverified":9},"by_repo_kind":{"official":{"samples":11,"ran":2,"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":"8d7ec010c29e813b","entry":"format_time","repo":"maohaos2/PosthocUQ","repo_kind":"official","path":"utils.py","file_url":"https://github.com/maohaos2/PosthocUQ/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8d7ec010c29e813b"}},{"code_sha256_prefix":"3cbdd3b190b16350","entry":"get_mean_and_std","repo":"maohaos2/PosthocUQ","repo_kind":"official","path":"utils.py","file_url":"https://github.com/maohaos2/PosthocUQ/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3cbdd3b190b16350"}},{"code_sha256_prefix":"f26da832e81bbb10","entry":"CIFAR10","repo":"maohaos2/PosthocUQ","repo_kind":"official","path":"dataloaders.py","file_url":"https://github.com/maohaos2/PosthocUQ/blob/HEAD/dataloaders.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":"f26da832e81bbb10"}},{"code_sha256_prefix":"fcc3eae6062f90be","entry":"KMNIST","repo":"maohaos2/PosthocUQ","repo_kind":"official","path":"dataloaders.py","file_url":"https://github.com/maohaos2/PosthocUQ/blob/HEAD/dataloaders.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":"fcc3eae6062f90be"}},{"code_sha256_prefix":"5bc7d4551a2d7a08","entry":"Omniglot","repo":"maohaos2/PosthocUQ","repo_kind":"official","path":"dataloaders.py","file_url":"https://github.com/maohaos2/PosthocUQ/blob/HEAD/dataloaders.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":"5bc7d4551a2d7a08"}},{"code_sha256_prefix":"88c562f8ba622f2e","entry":"ROC_OOD","repo":"maohaos2/PosthocUQ","repo_kind":"official","path":"utils.py","file_url":"https://github.com/maohaos2/PosthocUQ/blob/HEAD/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":"88c562f8ba622f2e"}},{"code_sha256_prefix":"1935876fa2184234","entry":"betaln","repo":"maohaos2/PosthocUQ","repo_kind":"official","path":"losses.py","file_url":"https://github.com/maohaos2/PosthocUQ/blob/HEAD/losses.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":"1935876fa2184234"}},{"code_sha256_prefix":"ecf2ba21313d2f00","entry":"compute_entropy","repo":"maohaos2/PosthocUQ","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/maohaos2/PosthocUQ/blob/HEAD/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":"ecf2ba21313d2f00"}},{"code_sha256_prefix":"61de670b1e4cf1f1","entry":"compute_max_prob","repo":"maohaos2/PosthocUQ","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/maohaos2/PosthocUQ/blob/HEAD/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":"61de670b1e4cf1f1"}},{"code_sha256_prefix":"b406ae07e3a761fc","entry":"compute_total_entropy","repo":"maohaos2/PosthocUQ","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/maohaos2/PosthocUQ/blob/HEAD/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":"b406ae07e3a761fc"}},{"code_sha256_prefix":"f1502fb08f979867","entry":"kl_div_dirichlets","repo":"maohaos2/PosthocUQ","repo_kind":"official","path":"losses.py","file_url":"https://github.com/maohaos2/PosthocUQ/blob/HEAD/losses.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":"f1502fb08f979867"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}