{"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/black-box-smoothing-a-provable-defense-for","title":"Denoised Smoothing: A Provable Defense for Pretrained Classifiers","arxiv_id":"2003.01908","date":"2020-03-04","proceeding":"NeurIPS 2020 12","authors":["Hadi Salman","Ming-Jie Sun","Greg Yang","Ashish Kapoor","J. Zico Kolter"],"abstract":"We present a method for provably defending any pretrained image classifier against $\\ell_p$ adversarial attacks. This method, for instance, allows public vision API providers and users to seamlessly convert pretrained non-robust classification services into provably robust ones. By prepending a custom-trained denoiser to any off-the-shelf image classifier and using randomized smoothing, we effectively create a new classifier that is guaranteed to be $\\ell_p$-robust to adversarial examples, without modifying the pretrained classifier. Our approach applies to both the white-box and the black-box settings of the pretrained classifier. We refer to this defense as denoised smoothing, and we demonstrate its effectiveness through extensive experimentation on ImageNet and CIFAR-10. Finally, we use our approach to provably defend the Azure, Google, AWS, and ClarifAI image classification APIs. Our code replicating all the experiments in the paper can be found at: https://github.com/microsoft/denoised-smoothing.","url_abs":"https://arxiv.org/abs/2003.01908v2","url_pdf":"https://arxiv.org/pdf/2003.01908v2.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":"black-box-smoothing-a-provable-defense-for","repo_url":"https://github.com/microsoft/blackbox-smoothing","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"black-box-smoothing-a-provable-defense-for","repo_url":"https://github.com/microsoft/denoised-smoothing","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"black-box-smoothing-a-provable-defense-for","repo_url":"https://github.com/locuslab/breaking-poisoned-classifier","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"black-box-smoothing-a-provable-defense-for","repo_url":"https://github.com/sayakpaul/Denoised-Smoothing-TF","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"classification","task_name":"General Classification"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"robust-classification","task_name":"Robust classification"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"denoised-smoothing","method_name":"Denoised Smoothing"}],"datasets_introduced":[],"methods_introduced":[{"slug":"denoised-smoothing","name":"Denoised Smoothing","full_name":"Denoised Smoothing"}],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2003.01908","atlas_url":"https://app.syntology.ai/?focus=2003.01908","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2003.01908"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/microsoft/blackbox-smoothing","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/locuslab/breaking-poisoned-classifier","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/microsoft/denoised-smoothing","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sayakpaul/Denoised-Smoothing-TF","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran":3},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":3,"ran":3,"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":"fac5364e2f53c6db","entry":"conv3x3","repo":"microsoft/blackbox-smoothing","repo_kind":"official","path":"code/archs/cifar_resnet.py","file_url":"https://github.com/microsoft/blackbox-smoothing/blob/HEAD/code/archs/cifar_resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"b9650305844ec10e","entry":"conv_block","repo":"sayakpaul/Denoised-Smoothing-TF","repo_kind":"listed","path":"models/dncnn.py","file_url":"https://github.com/sayakpaul/Denoised-Smoothing-TF/blob/HEAD/models/dncnn.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b9650305844ec10e"}},{"code_sha256_prefix":"35b2512e4b0538b6","entry":"get_dncnn","repo":"sayakpaul/Denoised-Smoothing-TF","repo_kind":"listed","path":"models/dncnn.py","file_url":"https://github.com/sayakpaul/Denoised-Smoothing-TF/blob/HEAD/models/dncnn.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"35b2512e4b0538b6"}},{"code_sha256_prefix":"5d103d2e55d42d80","entry":"run_dncnn","repo":"sayakpaul/Denoised-Smoothing-TF","repo_kind":"listed","path":"models/dncnn.py","file_url":"https://github.com/sayakpaul/Denoised-Smoothing-TF/blob/HEAD/models/dncnn.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5d103d2e55d42d80"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}