{"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/distillation-resistant-watermarking-for-model","title":"Distillation-Resistant Watermarking for Model Protection in NLP","arxiv_id":"2210.03312","date":"2022-10-07","proceeding":null,"authors":["Xuandong Zhao","Lei LI","Yu-Xiang Wang"],"abstract":"How can we protect the intellectual property of trained NLP models? Modern NLP models are prone to stealing by querying and distilling from their publicly exposed APIs. However, existing protection methods such as watermarking only work for images but are not applicable to text. We propose Distillation-Resistant Watermarking (DRW), a novel technique to protect NLP models from being stolen via distillation. DRW protects a model by injecting watermarks into the victim's prediction probability corresponding to a secret key and is able to detect such a key by probing a suspect model. We prove that a protected model still retains the original accuracy within a certain bound. We evaluate DRW on a diverse set of NLP tasks including text classification, part-of-speech tagging, and named entity recognition. Experiments show that DRW protects the original model and detects stealing suspects at 100% mean average precision for all four tasks while the prior method fails on two.","url_abs":"https://arxiv.org/abs/2210.03312v2","url_pdf":"https://arxiv.org/pdf/2210.03312v2.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":"distillation-resistant-watermarking-for-model","repo_url":"https://github.com/xuandongzhao/drw","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"named-entity-recognition-1","task_name":"Named Entity Recognition"},{"task_slug":"named-entity-recognition-ner","task_name":"Named Entity Recognition (NER)"},{"task_slug":"part-of-speech-tagging","task_name":"Part-Of-Speech Tagging"},{"task_slug":"text-classification","task_name":"Text Classification"},{"task_slug":"model","task_name":"model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.03312","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.03312"}},"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/xuandongzhao/drw","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_honours":1,"unverified":5},"by_repo_kind":{"official":{"samples":6,"ran":1,"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":"3e21e6589663b136","entry":"epoch_time","repo":"xuandongzhao/drw","repo_kind":"official","path":"utils.py","file_url":"https://github.com/xuandongzhao/drw/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3e21e6589663b136"}},{"code_sha256_prefix":"863171c2a28d250a","entry":"JSD","repo":"xuandongzhao/drw","repo_kind":"official","path":"utils.py","file_url":"https://github.com/xuandongzhao/drw/blob/HEAD/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":"863171c2a28d250a"}},{"code_sha256_prefix":"c8061a6a13cb393e","entry":"Rob","repo":"xuandongzhao/drw","repo_kind":"official","path":"utils.py","file_url":"https://github.com/xuandongzhao/drw/blob/HEAD/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":"c8061a6a13cb393e"}},{"code_sha256_prefix":"9394c6933ed2ef9e","entry":"train_student_hard","repo":"xuandongzhao/drw","repo_kind":"official","path":"wm.py","file_url":"https://github.com/xuandongzhao/drw/blob/HEAD/wm.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":"9394c6933ed2ef9e"}},{"code_sha256_prefix":"bbb12a31375fd0c1","entry":"train_student_soft","repo":"xuandongzhao/drw","repo_kind":"official","path":"wm.py","file_url":"https://github.com/xuandongzhao/drw/blob/HEAD/wm.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":"bbb12a31375fd0c1"}},{"code_sha256_prefix":"a2cd590d607e0720","entry":"train_teacher","repo":"xuandongzhao/drw","repo_kind":"official","path":"wm.py","file_url":"https://github.com/xuandongzhao/drw/blob/HEAD/wm.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":"a2cd590d607e0720"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}