{"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/smooth-ece-principled-reliability-diagrams","title":"Smooth ECE: Principled Reliability Diagrams via Kernel Smoothing","arxiv_id":"2309.12236","date":"2023-09-21","proceeding":null,"authors":["Jarosław Błasiok","Preetum Nakkiran"],"abstract":"Calibration measures and reliability diagrams are two fundamental tools for measuring and interpreting the calibration of probabilistic predictors. Calibration measures quantify the degree of miscalibration, and reliability diagrams visualize the structure of this miscalibration. However, the most common constructions of reliability diagrams and calibration measures -- binning and ECE -- both suffer from well-known flaws (e.g. discontinuity). We show that a simple modification fixes both constructions: first smooth the observations using an RBF kernel, then compute the Expected Calibration Error (ECE) of this smoothed function. We prove that with a careful choice of bandwidth, this method yields a calibration measure that is well-behaved in the sense of (B{\\l}asiok, Gopalan, Hu, and Nakkiran 2023a) -- a consistent calibration measure. We call this measure the SmoothECE. Moreover, the reliability diagram obtained from this smoothed function visually encodes the SmoothECE, just as binned reliability diagrams encode the BinnedECE. We also provide a Python package with simple, hyperparameter-free methods for measuring and plotting calibration: `pip install relplot\\`.","url_abs":"https://arxiv.org/abs/2309.12236v1","url_pdf":"https://arxiv.org/pdf/2309.12236v1.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":"smooth-ece-principled-reliability-diagrams","repo_url":"https://github.com/apple/ml-calibration","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[],"methods":[{"method_slug":"rbf","method_name":"RBF"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2309.12236","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.12236"}},"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/apple/ml-calibration","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran":6,"unverified":2},"by_repo_kind":{"official":{"samples":8,"ran":6,"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":8,"samples":[{"code_sha256_prefix":"4697692cb9014b20","entry":"binning","repo":"apple/ml-calibration","repo_kind":"official","path":"src/relplot/metrics.py","file_url":"https://github.com/apple/ml-calibration/blob/HEAD/src/relplot/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"4697692cb9014b20"}},{"code_sha256_prefix":"5c362a0f85e41779","entry":"intCE_rand","repo":"apple/ml-calibration","repo_kind":"official","path":"src/relplot/metrics.py","file_url":"https://github.com/apple/ml-calibration/blob/HEAD/src/relplot/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5c362a0f85e41779"}},{"code_sha256_prefix":"b03ecf7781cc919f","entry":"interpolate","repo":"apple/ml-calibration","repo_kind":"official","path":"src/relplot/kernels.py","file_url":"https://github.com/apple/ml-calibration/blob/HEAD/src/relplot/kernels.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"b03ecf7781cc919f"}},{"code_sha256_prefix":"131f7850756ed844","entry":"kernel_cross","repo":"apple/ml-calibration","repo_kind":"official","path":"src/relplot/kernels.py","file_url":"https://github.com/apple/ml-calibration/blob/HEAD/src/relplot/kernels.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"131f7850756ed844"}},{"code_sha256_prefix":"f4b89d8f27d1931c","entry":"kernel_smooth_basic","repo":"apple/ml-calibration","repo_kind":"official","path":"src/relplot/kernels.py","file_url":"https://github.com/apple/ml-calibration/blob/HEAD/src/relplot/kernels.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"f4b89d8f27d1931c"}},{"code_sha256_prefix":"3cbb7dae34a63c59","entry":"plot_line","repo":"apple/ml-calibration","repo_kind":"official","path":"src/relplot/diagrams.py","file_url":"https://github.com/apple/ml-calibration/blob/HEAD/src/relplot/diagrams.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"3cbb7dae34a63c59"}},{"code_sha256_prefix":"fbf4374242d0bda7","entry":"reliability_diagram","repo":"apple/ml-calibration","repo_kind":"official","path":"src/relplot/diagrams.py","file_url":"https://github.com/apple/ml-calibration/blob/HEAD/src/relplot/diagrams.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"fbf4374242d0bda7"}},{"code_sha256_prefix":"c571147e44cad989","entry":"smooth_ece","repo":"apple/ml-calibration","repo_kind":"official","path":"src/relplot/metrics.py","file_url":"https://github.com/apple/ml-calibration/blob/HEAD/src/relplot/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"c571147e44cad989"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}