{"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/dipmark-a-stealthy-efficient-and-resilient","title":"A Resilient and Accessible Distribution-Preserving Watermark for Large Language Models","arxiv_id":"2310.07710","date":"2023-10-11","proceeding":null,"authors":["Yihan Wu","Zhengmian Hu","Junfeng Guo","Hongyang Zhang","Heng Huang"],"abstract":"Watermarking techniques offer a promising way to identify machine-generated content via embedding covert information into the contents generated from language models. A challenge in the domain lies in preserving the distribution of original generated content after watermarking. Our research extends and improves upon existing watermarking framework, placing emphasis on the importance of a \\textbf{Di}stribution-\\textbf{P}reserving (DiP) watermark. Contrary to the current strategies, our proposed DiPmark simultaneously preserves the original token distribution during watermarking (distribution-preserving), is detectable without access to the language model API and prompts (accessible), and is provably robust to moderate changes of tokens (resilient). DiPmark operates by selecting a random set of tokens prior to the generation of a word, then modifying the token distribution through a distribution-preserving reweight function to enhance the probability of these selected tokens during the sampling process. Extensive empirical evaluation on various language models and tasks demonstrates our approach's distribution-preserving property, accessibility, and resilience, making it a effective solution for watermarking tasks that demand impeccable quality preservation.","url_abs":"https://arxiv.org/abs/2310.07710v2","url_pdf":"https://arxiv.org/pdf/2310.07710v2.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":"dipmark-a-stealthy-efficient-and-resilient","repo_url":"https://github.com/yihwu/dipmark","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"dipmark-a-stealthy-efficient-and-resilient","repo_url":"https://github.com/Xieyangxinyu/Unbiased-Watermark-via-Maximal-Coupling","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.07710","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.07710"}},"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/Xieyangxinyu/Unbiased-Watermark-via-Maximal-Coupling","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yihwu/dipmark","reach":{"status":"ok"}}],"summary":{"ran":5,"unverified":4},"by_repo_kind":{"official":{"samples":6,"ran":5,"repositories":1},"listed":{"samples":3,"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":6,"samples":[{"code_sha256_prefix":"fcb42d6d6ae5fede","entry":"group_batch","repo":"yihwu/dipmark","repo_kind":"official","path":"experiments/common.py","file_url":"https://github.com/yihwu/dipmark/blob/HEAD/experiments/common.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":"fcb42d6d6ae5fede"}},{"code_sha256_prefix":"d17ca30c3cb5a568","entry":"remove_tailing_pad_s","repo":"yihwu/dipmark","repo_kind":"official","path":"experiments/common.py","file_url":"https://github.com/yihwu/dipmark/blob/HEAD/experiments/common.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d17ca30c3cb5a568"}},{"code_sha256_prefix":"8fce068341c10519","entry":"remove_tailing_pad_s","repo":"yihwu/dipmark","repo_kind":"official","path":"supplement_experiments/common.py","file_url":"https://github.com/yihwu/dipmark/blob/HEAD/supplement_experiments/common.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8fce068341c10519"}},{"code_sha256_prefix":"f1719e1084c00e31","entry":"tokenize_batch","repo":"yihwu/dipmark","repo_kind":"official","path":"experiments/common.py","file_url":"https://github.com/yihwu/dipmark/blob/HEAD/experiments/common.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":"f1719e1084c00e31"}},{"code_sha256_prefix":"5d2181f3979041ec","entry":"tokenize_batch","repo":"yihwu/dipmark","repo_kind":"official","path":"supplement_experiments/common.py","file_url":"https://github.com/yihwu/dipmark/blob/HEAD/supplement_experiments/common.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":"5d2181f3979041ec"}},{"code_sha256_prefix":"b20f0d1f63f03397","entry":"DiPMarkGenerator","repo":"Xieyangxinyu/Unbiased-Watermark-via-Maximal-Coupling","repo_kind":"listed","path":"wm/generator.py","file_url":"https://github.com/Xieyangxinyu/Unbiased-Watermark-via-Maximal-Coupling/blob/HEAD/wm/generator.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b20f0d1f63f03397"}},{"code_sha256_prefix":"1c7ac5cf0a297126","entry":"OpenaiGenerator","repo":"Xieyangxinyu/Unbiased-Watermark-via-Maximal-Coupling","repo_kind":"listed","path":"wm/generator.py","file_url":"https://github.com/Xieyangxinyu/Unbiased-Watermark-via-Maximal-Coupling/blob/HEAD/wm/generator.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1c7ac5cf0a297126"}},{"code_sha256_prefix":"3e361b18729f8b2b","entry":"WmGenerator","repo":"Xieyangxinyu/Unbiased-Watermark-via-Maximal-Coupling","repo_kind":"listed","path":"wm/generator.py","file_url":"https://github.com/Xieyangxinyu/Unbiased-Watermark-via-Maximal-Coupling/blob/HEAD/wm/generator.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3e361b18729f8b2b"}},{"code_sha256_prefix":"95a197396b0f2a97","entry":"patch_model","repo":"yihwu/dipmark","repo_kind":"official","path":"dipmark/monkeypatch.py","file_url":"https://github.com/yihwu/dipmark/blob/HEAD/dipmark/monkeypatch.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":"95a197396b0f2a97"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}