{"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/less-is-more-sparse-watermarking-in-llms-with","title":"Less is More: Sparse Watermarking in LLMs with Enhanced Text Quality","arxiv_id":"2407.13803","date":"2024-07-17","proceeding":null,"authors":["Duy C. Hoang","Hung T. Q. Le","Rui Chu","Ping Li","Weijie Zhao","Yingjie Lao","Khoa D. Doan"],"abstract":"With the widespread adoption of Large Language Models (LLMs), concerns about potential misuse have emerged. To this end, watermarking has been adapted to LLM, enabling a simple and effective way to detect and monitor generated text. However, while the existing methods can differentiate between watermarked and unwatermarked text with high accuracy, they often face a trade-off between the quality of the generated text and the effectiveness of the watermarking process. In this work, we present a novel type of LLM watermark, Sparse Watermark, which aims to mitigate this trade-off by applying watermarks to a small subset of generated tokens distributed across the text. The key strategy involves anchoring watermarked tokens to words that have specific Part-of-Speech (POS) tags. Our experimental results demonstrate that the proposed watermarking scheme achieves high detectability while generating text that outperforms previous LLM watermarking methods in quality across various tasks","url_abs":"https://arxiv.org/abs/2407.13803v1","url_pdf":"https://arxiv.org/pdf/2407.13803v1.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":"less-is-more-sparse-watermarking-in-llms-with","repo_url":"https://github.com/mail-research/sparse-llm-watermarking","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"pos","task_name":"POS"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2407.13803","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.13803"}},"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/mail-research/sparse-llm-watermarking","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":7,"ran_honours":1,"ran_draft_wrong":2,"ran_violates":1,"unverified":1},"by_repo_kind":{"official":{"samples":12,"ran":11,"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":"ee4afb2d89ea94b5","entry":"build_chat","repo":"mail-research/sparse-llm-watermarking","repo_kind":"official","path":"pred.py","file_url":"https://github.com/mail-research/sparse-llm-watermarking/blob/HEAD/pred.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":"ee4afb2d89ea94b5"}},{"code_sha256_prefix":"330c205789fa1ddb","entry":"convert_to_sha256","repo":"mail-research/sparse-llm-watermarking","repo_kind":"official","path":"process/download.py","file_url":"https://github.com/mail-research/sparse-llm-watermarking/blob/HEAD/process/download.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"330c205789fa1ddb"}},{"code_sha256_prefix":"b349b79d9cc2934b","entry":"count_score","repo":"mail-research/sparse-llm-watermarking","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/mail-research/sparse-llm-watermarking/blob/HEAD/metrics.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":"b349b79d9cc2934b"}},{"code_sha256_prefix":"cb1c340f7ba0688d","entry":"load_dataset","repo":"mail-research/sparse-llm-watermarking","repo_kind":"official","path":"watermark/run_generate.py","file_url":"https://github.com/mail-research/sparse-llm-watermarking/blob/HEAD/watermark/run_generate.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":"cb1c340f7ba0688d"}},{"code_sha256_prefix":"c23be2f93d77eb72","entry":"load_model","repo":"mail-research/sparse-llm-watermarking","repo_kind":"official","path":"watermark/run_generate.py","file_url":"https://github.com/mail-research/sparse-llm-watermarking/blob/HEAD/watermark/run_generate.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":"c23be2f93d77eb72"}},{"code_sha256_prefix":"e7e75981cb464788","entry":"normalize_answer","repo":"mail-research/sparse-llm-watermarking","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/mail-research/sparse-llm-watermarking/blob/HEAD/metrics.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e7e75981cb464788"}},{"code_sha256_prefix":"8c5c581f9264c810","entry":"normalize_zh_answer","repo":"mail-research/sparse-llm-watermarking","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/mail-research/sparse-llm-watermarking/blob/HEAD/metrics.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8c5c581f9264c810"}},{"code_sha256_prefix":"1eee22aa3c8d479b","entry":"parse_args","repo":"mail-research/sparse-llm-watermarking","repo_kind":"official","path":"process/download.py","file_url":"https://github.com/mail-research/sparse-llm-watermarking/blob/HEAD/process/download.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":"1eee22aa3c8d479b"}},{"code_sha256_prefix":"1e4ae0765483193f","entry":"parse_args","repo":"mail-research/sparse-llm-watermarking","repo_kind":"official","path":"process/hyper-search.py","file_url":"https://github.com/mail-research/sparse-llm-watermarking/blob/HEAD/process/hyper-search.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":"1e4ae0765483193f"}},{"code_sha256_prefix":"64d6d2870c91231a","entry":"parse_args","repo":"mail-research/sparse-llm-watermarking","repo_kind":"official","path":"process/process_z.py","file_url":"https://github.com/mail-research/sparse-llm-watermarking/blob/HEAD/process/process_z.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":"64d6d2870c91231a"}},{"code_sha256_prefix":"678874b625786116","entry":"str2bool","repo":"mail-research/sparse-llm-watermarking","repo_kind":"official","path":"pred.py","file_url":"https://github.com/mail-research/sparse-llm-watermarking/blob/HEAD/pred.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"678874b625786116"}},{"code_sha256_prefix":"4d399b8cd9848f5c","entry":"parse_args","repo":"mail-research/sparse-llm-watermarking","repo_kind":"official","path":"pred.py","file_url":"https://github.com/mail-research/sparse-llm-watermarking/blob/HEAD/pred.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":"4d399b8cd9848f5c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}