{"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/mix-n-match-ensemble-and-compositional","title":"Mix-n-Match: Ensemble and Compositional Methods for Uncertainty Calibration in Deep Learning","arxiv_id":"2003.07329","date":"2020-03-16","proceeding":null,"authors":["Jize Zhang","Bhavya Kailkhura","T. Yong-Jin Han"],"abstract":"This paper studies the problem of post-hoc calibration of machine learning classifiers. We introduce the following desiderata for uncertainty calibration: (a) accuracy-preserving, (b) data-efficient, and (c) high expressive power. We show that none of the existing methods satisfy all three requirements, and demonstrate how Mix-n-Match calibration strategies (i.e., ensemble and composition) can help achieve remarkably better data-efficiency and expressive power while provably maintaining the classification accuracy of the original classifier. Mix-n-Match strategies are generic in the sense that they can be used to improve the performance of any off-the-shelf calibrator. We also reveal potential issues in standard evaluation practices. Popular approaches (e.g., histogram-based expected calibration error (ECE)) may provide misleading results especially in small-data regime. Therefore, we propose an alternative data-efficient kernel density-based estimator for a reliable evaluation of the calibration performance and prove its asymptotically unbiasedness and consistency. Our approaches outperform state-of-the-art solutions on both the calibration as well as the evaluation tasks in most of the experimental settings. Our codes are available at https://github.com/zhang64-llnl/Mix-n-Match-Calibration.","url_abs":"https://arxiv.org/abs/2003.07329v2","url_pdf":"https://arxiv.org/pdf/2003.07329v2.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":"mix-n-match-ensemble-and-compositional","repo_url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"small-data","task_name":"Small Data Image Classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2003.07329","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2003.07329"}},"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/zhang64llnl/Mix-n-Match-Calibration","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration","reach":null}],"summary":{"ran_fixture":4,"ran_honours":1,"unverified":7},"by_repo_kind":{"official":{"samples":12,"ran":5,"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":"c681afd6ee97fd0b","entry":"ece_hist_binary","repo":"zhang64-llnl/Mix-n-Match-Calibration","repo_kind":"official","path":"util_evaluation.py","file_url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration/blob/HEAD/util_evaluation.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c681afd6ee97fd0b"}},{"code_sha256_prefix":"00b7e27c230bbc55","entry":"ensemble_scaling","repo":"zhang64-llnl/Mix-n-Match-Calibration","repo_kind":"official","path":"util_calibration.py","file_url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration/blob/HEAD/util_calibration.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"00b7e27c230bbc55"}},{"code_sha256_prefix":"4f7d087cf3f23cd7","entry":"ets_calibrate","repo":"zhang64-llnl/Mix-n-Match-Calibration","repo_kind":"official","path":"util_calibration.py","file_url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration/blob/HEAD/util_calibration.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4f7d087cf3f23cd7"}},{"code_sha256_prefix":"8f3819e94710b239","entry":"mirror_1d","repo":"zhang64-llnl/Mix-n-Match-Calibration","repo_kind":"official","path":"util_evaluation.py","file_url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration/blob/HEAD/util_evaluation.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8f3819e94710b239"}},{"code_sha256_prefix":"a7c2ff72a09fddd9","entry":"temperature_scaling","repo":"zhang64-llnl/Mix-n-Match-Calibration","repo_kind":"official","path":"util_calibration.py","file_url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration/blob/HEAD/util_calibration.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a7c2ff72a09fddd9"}},{"code_sha256_prefix":"be0ecdb9bbb14549","entry":"ll_t","repo":"zhang64-llnl/Mix-n-Match-Calibration","repo_kind":"official","path":"util_calibration.py","file_url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration/blob/HEAD/util_calibration.py","link_basis":"first_harvest_node","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":"be0ecdb9bbb14549"}},{"code_sha256_prefix":"488e772a0fda66e3","entry":"ll_t","repo":"zhang64-llnl/Mix-n-Match-Calibration","repo_kind":"official","path":"util_calibration.py","file_url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration/blob/HEAD/util_calibration.py","link_basis":"first_harvest_node","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":"488e772a0fda66e3"}},{"code_sha256_prefix":"f170643552b44a2c","entry":"ll_w","repo":"zhang64-llnl/Mix-n-Match-Calibration","repo_kind":"official","path":"util_calibration.py","file_url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration/blob/HEAD/util_calibration.py","link_basis":"first_harvest_node","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":"f170643552b44a2c"}},{"code_sha256_prefix":"965b11fe9a3ed9df","entry":"mse_t","repo":"zhang64-llnl/Mix-n-Match-Calibration","repo_kind":"official","path":"util_calibration.py","file_url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration/blob/HEAD/util_calibration.py","link_basis":"first_harvest_node","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":"965b11fe9a3ed9df"}},{"code_sha256_prefix":"0e94d686cb427873","entry":"mse_t","repo":"zhang64-llnl/Mix-n-Match-Calibration","repo_kind":"official","path":"util_calibration.py","file_url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration/blob/HEAD/util_calibration.py","link_basis":"first_harvest_node","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":"0e94d686cb427873"}},{"code_sha256_prefix":"c7f9796a87c076ab","entry":"mse_w","repo":"zhang64-llnl/Mix-n-Match-Calibration","repo_kind":"official","path":"util_calibration.py","file_url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration/blob/HEAD/util_calibration.py","link_basis":"first_harvest_node","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":"c7f9796a87c076ab"}},{"code_sha256_prefix":"2bdb47b16ce824b7","entry":"mse_w","repo":"zhang64-llnl/Mix-n-Match-Calibration","repo_kind":"official","path":"util_calibration.py","file_url":"https://github.com/zhang64-llnl/Mix-n-Match-Calibration/blob/HEAD/util_calibration.py","link_basis":"first_harvest_node","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":"2bdb47b16ce824b7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}