{"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/rs-del-edit-distance-robustness-certificates-1","title":"RS-Del: Edit Distance Robustness Certificates for Sequence Classifiers via Randomized Deletion","arxiv_id":"2302.01757","date":"2023-01-31","proceeding":"NeurIPS 2023 11","authors":["Zhuoqun Huang","Neil G. Marchant","Keane Lucas","Lujo Bauer","Olga Ohrimenko","Benjamin I. P. Rubinstein"],"abstract":"Randomized smoothing is a leading approach for constructing classifiers that are certifiably robust against adversarial examples. Existing work on randomized smoothing has focused on classifiers with continuous inputs, such as images, where $\\ell_p$-norm bounded adversaries are commonly studied. However, there has been limited work for classifiers with discrete or variable-size inputs, such as for source code, which require different threat models and smoothing mechanisms. In this work, we adapt randomized smoothing for discrete sequence classifiers to provide certified robustness against edit distance-bounded adversaries. Our proposed smoothing mechanism randomized deletion (RS-Del) applies random deletion edits, which are (perhaps surprisingly) sufficient to confer robustness against adversarial deletion, insertion and substitution edits. Our proof of certification deviates from the established Neyman-Pearson approach, which is intractable in our setting, and is instead organized around longest common subsequences. We present a case study on malware detection--a binary classification problem on byte sequences where classifier evasion is a well-established threat model. When applied to the popular MalConv malware detection model, our smoothing mechanism RS-Del achieves a certified accuracy of 91% at an edit distance radius of 128 bytes.","url_abs":"https://arxiv.org/abs/2302.01757v3","url_pdf":"https://arxiv.org/pdf/2302.01757v3.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":"rs-del-edit-distance-robustness-certificates-1","repo_url":"https://github.com/dovermore/randomized-deletion","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"rs-del-edit-distance-robustness-certificates-1","repo_url":"https://github.com/lions-epfl/lipslev","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"binary-classification","task_name":"Binary Classification"},{"task_slug":"malware-detection","task_name":"Malware Detection"}],"methods":[{"method_slug":"randomized-deletion","method_name":"Randomized Deletion"},{"method_slug":"randomized-smoothing","method_name":"Randomized Smoothing"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2302.01757","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.01757"}},"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/dovermore/randomized-deletion","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lions-epfl/lipslev","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_honours":2,"ran":1,"ran_draft_wrong":2,"unverified":9},"by_repo_kind":{"official":{"samples":9,"ran":1,"repositories":1},"listed":{"samples":5,"ran":4,"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":"92f5153e34454ae1","entry":"BinLCB","repo":"lions-epfl/lipslev","repo_kind":"listed","path":"verification.py","file_url":"https://github.com/lions-epfl/lipslev/blob/HEAD/verification.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"92f5153e34454ae1"}},{"code_sha256_prefix":"5a66080978a0cf31","entry":"char_tokenizer","repo":"lions-epfl/lipslev","repo_kind":"listed","path":"verification.py","file_url":"https://github.com/lions-epfl/lipslev/blob/HEAD/verification.py","link_basis":"first_harvest_node","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":"5a66080978a0cf31"}},{"code_sha256_prefix":"cc4f7f6dc845e532","entry":"sample_deletes","repo":"lions-epfl/lipslev","repo_kind":"listed","path":"verification.py","file_url":"https://github.com/lions-epfl/lipslev/blob/HEAD/verification.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cc4f7f6dc845e532"}},{"code_sha256_prefix":"ffb145c4a0426f6d","entry":"split","repo":"dovermore/randomized-deletion","repo_kind":"official","path":"src/repeat_forward_exp.py","file_url":"https://github.com/dovermore/randomized-deletion/blob/HEAD/src/repeat_forward_exp.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ffb145c4a0426f6d"}},{"code_sha256_prefix":"b31b3a42c591bfcd","entry":"verify_rsdel","repo":"lions-epfl/lipslev","repo_kind":"listed","path":"verification.py","file_url":"https://github.com/lions-epfl/lipslev/blob/HEAD/verification.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b31b3a42c591bfcd"}},{"code_sha256_prefix":"9579b4874f24ed68","entry":"apply_del","repo":"dovermore/randomized-deletion","repo_kind":"official","path":"src/torchmalware/certification/deletion_mech.py","file_url":"https://github.com/dovermore/randomized-deletion/blob/HEAD/src/torchmalware/certification/deletion_mech.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":"9579b4874f24ed68"}},{"code_sha256_prefix":"a89350a23ca96ab6","entry":"apply_mask","repo":"dovermore/randomized-deletion","repo_kind":"official","path":"src/torchmalware/certification/masking_mech.py","file_url":"https://github.com/dovermore/randomized-deletion/blob/HEAD/src/torchmalware/certification/masking_mech.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":"a89350a23ca96ab6"}},{"code_sha256_prefix":"0073f606a0fc72e1","entry":"collate_fn","repo":"lions-epfl/lipslev","repo_kind":"listed","path":"verification.py","file_url":"https://github.com/lions-epfl/lipslev/blob/HEAD/verification.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":"0073f606a0fc72e1"}},{"code_sha256_prefix":"e095e86d36ac3bde","entry":"collate_pad","repo":"dovermore/randomized-deletion","repo_kind":"official","path":"src/torchmalware/utils.py","file_url":"https://github.com/dovermore/randomized-deletion/blob/HEAD/src/torchmalware/utils.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":"e095e86d36ac3bde"}},{"code_sha256_prefix":"924f45965b43b3de","entry":"get_path","repo":"dovermore/randomized-deletion","repo_kind":"official","path":"src/preprocess_pe.py","file_url":"https://github.com/dovermore/randomized-deletion/blob/HEAD/src/preprocess_pe.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":"924f45965b43b3de"}},{"code_sha256_prefix":"7004df60ba05e77f","entry":"inv_collate_pad","repo":"dovermore/randomized-deletion","repo_kind":"official","path":"src/torchmalware/utils.py","file_url":"https://github.com/dovermore/randomized-deletion/blob/HEAD/src/torchmalware/utils.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":"7004df60ba05e77f"}},{"code_sha256_prefix":"66029f47f06157a8","entry":"sample_del","repo":"dovermore/randomized-deletion","repo_kind":"official","path":"src/torchmalware/certification/deletion_mech.py","file_url":"https://github.com/dovermore/randomized-deletion/blob/HEAD/src/torchmalware/certification/deletion_mech.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":"66029f47f06157a8"}},{"code_sha256_prefix":"fc750dd2d5bc8304","entry":"sample_mask","repo":"dovermore/randomized-deletion","repo_kind":"official","path":"src/torchmalware/certification/masking_mech.py","file_url":"https://github.com/dovermore/randomized-deletion/blob/HEAD/src/torchmalware/certification/masking_mech.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":"fc750dd2d5bc8304"}},{"code_sha256_prefix":"431961661790790c","entry":"vrange","repo":"dovermore/randomized-deletion","repo_kind":"official","path":"src/torchmalware/utils.py","file_url":"https://github.com/dovermore/randomized-deletion/blob/HEAD/src/torchmalware/utils.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":"431961661790790c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}