{"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/card-classification-and-regression-diffusion","title":"CARD: Classification and Regression Diffusion Models","arxiv_id":"2206.07275","date":"2022-06-15","proceeding":null,"authors":["Xizewen Han","Huangjie Zheng","Mingyuan Zhou"],"abstract":"Learning the distribution of a continuous or categorical response variable $\\boldsymbol y$ given its covariates $\\boldsymbol x$ is a fundamental problem in statistics and machine learning. Deep neural network-based supervised learning algorithms have made great progress in predicting the mean of $\\boldsymbol y$ given $\\boldsymbol x$, but they are often criticized for their ability to accurately capture the uncertainty of their predictions. In this paper, we introduce classification and regression diffusion (CARD) models, which combine a denoising diffusion-based conditional generative model and a pre-trained conditional mean estimator, to accurately predict the distribution of $\\boldsymbol y$ given $\\boldsymbol x$. We demonstrate the outstanding ability of CARD in conditional distribution prediction with both toy examples and real-world datasets, the experimental results on which show that CARD in general outperforms state-of-the-art methods, including Bayesian neural network-based ones that are designed for uncertainty estimation, especially when the conditional distribution of $\\boldsymbol y$ given $\\boldsymbol x$ is multi-modal. In addition, we utilize the stochastic nature of the generative model outputs to obtain a finer granularity in model confidence assessment at the instance level for classification tasks.","url_abs":"https://arxiv.org/abs/2206.07275v4","url_pdf":"https://arxiv.org/pdf/2206.07275v4.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":"card-classification-and-regression-diffusion","repo_url":"https://github.com/xzwhan/card","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"card-classification-and-regression-diffusion","repo_url":"https://github.com/lightning-uq-box/lightning-uq-box","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"regression-1","task_name":"regression"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2206.07275","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2206.07275"}},"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/XzwHan/CARD","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lightning-uq-box/lightning-uq-box","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xzwhan/card","reach":{"status":"ok"}}],"summary":{"ran":4,"ran_draft_wrong":2,"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":"1728c5ff8686fcc7","entry":"BasicBlock","repo":"xzwhan/card","repo_kind":"official","path":"classification/card_classification.py","file_url":"https://github.com/xzwhan/card/blob/HEAD/classification/card_classification.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1728c5ff8686fcc7"}},{"code_sha256_prefix":"60e91110015fe574","entry":"Bottleneck","repo":"xzwhan/card","repo_kind":"official","path":"classification/card_classification.py","file_url":"https://github.com/xzwhan/card/blob/HEAD/classification/card_classification.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"60e91110015fe574"}},{"code_sha256_prefix":"7e9991ec1729a6b2","entry":"EMA","repo":"xzwhan/card","repo_kind":"official","path":"classification/card_classification.py","file_url":"https://github.com/xzwhan/card/blob/HEAD/classification/card_classification.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7e9991ec1729a6b2"}},{"code_sha256_prefix":"6f5caceff13503c8","entry":"ResNet","repo":"xzwhan/card","repo_kind":"official","path":"classification/card_classification.py","file_url":"https://github.com/xzwhan/card/blob/HEAD/classification/card_classification.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6f5caceff13503c8"}},{"code_sha256_prefix":"00f0eefbf9f3be08","entry":"ResNet18","repo":"xzwhan/card","repo_kind":"official","path":"classification/card_classification.py","file_url":"https://github.com/xzwhan/card/blob/HEAD/classification/card_classification.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"00f0eefbf9f3be08"}},{"code_sha256_prefix":"52fefeb1560fe091","entry":"build_ResNet","repo":"xzwhan/card","repo_kind":"official","path":"classification/card_classification.py","file_url":"https://github.com/xzwhan/card/blob/HEAD/classification/card_classification.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"52fefeb1560fe091"}},{"code_sha256_prefix":"49e539a2dd5a5efd","entry":"Diffusion","repo":"xzwhan/card","repo_kind":"official","path":"classification/card_classification.py","file_url":"https://github.com/xzwhan/card/blob/HEAD/classification/card_classification.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"49e539a2dd5a5efd"}},{"code_sha256_prefix":"b10296d79d33373a","entry":"ResNetEmbedding","repo":"xzwhan/card","repo_kind":"official","path":"classification/card_classification.py","file_url":"https://github.com/xzwhan/card/blob/HEAD/classification/card_classification.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b10296d79d33373a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}