{"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/how-to-trust-your-diffusion-model-a-convex","title":"How to Trust Your Diffusion Model: A Convex Optimization Approach to Conformal Risk Control","arxiv_id":"2302.03791","date":"2023-02-07","proceeding":null,"authors":["Jacopo Teneggi","Matthew Tivnan","J. Webster Stayman","Jeremias Sulam"],"abstract":"Score-based generative modeling, informally referred to as diffusion models, continue to grow in popularity across several important domains and tasks. While they provide high-quality and diverse samples from empirical distributions, important questions remain on the reliability and trustworthiness of these sampling procedures for their responsible use in critical scenarios. Conformal prediction is a modern tool to construct finite-sample, distribution-free uncertainty guarantees for any black-box predictor. In this work, we focus on image-to-image regression tasks and we present a generalization of the Risk-Controlling Prediction Sets (RCPS) procedure, that we term $K$-RCPS, which allows to $(i)$ provide entrywise calibrated intervals for future samples of any diffusion model, and $(ii)$ control a certain notion of risk with respect to a ground truth image with minimal mean interval length. Differently from existing conformal risk control procedures, ours relies on a novel convex optimization approach that allows for multidimensional risk control while provably minimizing the mean interval length. We illustrate our approach on two real-world image denoising problems: on natural images of faces as well as on computed tomography (CT) scans of the abdomen, demonstrating state of the art performance.","url_abs":"https://arxiv.org/abs/2302.03791v3","url_pdf":"https://arxiv.org/pdf/2302.03791v3.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":"how-to-trust-your-diffusion-model-a-convex","repo_url":"https://github.com/sulam-group/k-rcps","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"computed-tomography-ct","task_name":"Computed Tomography (CT)"},{"task_slug":"conformal-prediction","task_name":"Conformal Prediction"},{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"image-denoising","task_name":"Image Denoising"},{"task_slug":"image-to-image-regression","task_name":"Image-to-Image Regression"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2302.03791","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.03791"}},"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/sulam-group/k-rcps","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":6},"by_repo_kind":{"official":{"samples":6,"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":"db5f935a1d6b4c2c","entry":"get_act","repo":"sulam-group/k-rcps","repo_kind":"official","path":"experiments/models/layers.py","file_url":"https://github.com/sulam-group/k-rcps/blob/HEAD/experiments/models/layers.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":"db5f935a1d6b4c2c"}},{"code_sha256_prefix":"115f187875e9fdef","entry":"get_dataset","repo":"sulam-group/k-rcps","repo_kind":"official","path":"experiments/dataset.py","file_url":"https://github.com/sulam-group/k-rcps/blob/HEAD/experiments/dataset.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":"115f187875e9fdef"}},{"code_sha256_prefix":"66cde17e23a8cad5","entry":"get_loss","repo":"sulam-group/k-rcps","repo_kind":"official","path":"krcps/losses.py","file_url":"https://github.com/sulam-group/k-rcps/blob/HEAD/krcps/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":"66cde17e23a8cad5"}},{"code_sha256_prefix":"85b2235eb7afaa4f","entry":"ncsn_conv1x1","repo":"sulam-group/k-rcps","repo_kind":"official","path":"experiments/models/layers.py","file_url":"https://github.com/sulam-group/k-rcps/blob/HEAD/experiments/models/layers.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":"85b2235eb7afaa4f"}},{"code_sha256_prefix":"513062d1c2db19df","entry":"register_loss","repo":"sulam-group/k-rcps","repo_kind":"official","path":"krcps/losses.py","file_url":"https://github.com/sulam-group/k-rcps/blob/HEAD/krcps/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":"513062d1c2db19df"}},{"code_sha256_prefix":"af889f49592e0fe2","entry":"variance_scaling","repo":"sulam-group/k-rcps","repo_kind":"official","path":"experiments/models/layers.py","file_url":"https://github.com/sulam-group/k-rcps/blob/HEAD/experiments/models/layers.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":"af889f49592e0fe2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}