SSG: Logit-Balanced Vocabulary Partitioning for LLM Watermarking
Abstract
Watermarking has emerged as a promising technique for tracing the authorship of content generated by large language models (LLMs). Among existing approaches, the KGW scheme is particularly attractive due to its versatility, efficiency, and effectiveness in natural language generation. However, KGW's effectiveness degrades significantly under low-entropy settings such as code generation and mathematical reasoning. A crucial step in the KGW method is random vocabulary partitioning, which enables adjustments to token selection based on specific preferences. Our study revealed that the nexttoken probability distribution plays an critical role in determining how much, or even whether, we can modify token selection and, consequently, the effectiveness of watermarking. We refer to this characteristic, associated with the probability distribution of each token prediction, as watermark strength. In cases of random vocabulary partitioning, the lower bound of watermark strength is dictated by the nexttoken probability distribution. However, we found that, by redesigning the vocabulary partitioning algorithm, we can potentially raise this lower bound. In this paper, we propose SSG (Sort-then-Split by Groups), a method that partitions the vocabulary into two logit-balanced subsets. This design lifts the lower bound of watermark strength for each token prediction, thereby improving watermark detectability. Experiments on code generation and mathematical reasoning datasets demonstrate the effectiveness of SSG. The source code is available at https://github.com/AllenG-L/SSG .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
Lineage
- On the Learnability of Watermarks for Language Models cites A Watermark for Large Language Models
- Who Wrote this Code? Watermarking for Code Generation cites On the Learnability of Watermarks for Language Models
- CodeMark: Imperceptible Watermarking for Code Datasets against Neural Code Completion Models cites CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoning
Builds on9
- A Watermark for Large Language ModelsJohn Kirchenbauer, Jonas Geiping, Yuxin Wen, Jonathan Katz et al.ICML 2023 · 854 citations
- CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data PoisoningZhensu Sun, Xiaoning Du, Fu Song, Mingze Ni et al.WWW 2022 · 95 citations
- On the Learnability of Watermarks for Language ModelsChenchen Gu, Xiang Lisa Li, Percy Liang, Tatsunori HashimotoICLR 2024 · 79 citations
- Who Wrote this Code? Watermarking for Code GenerationTaehyun Lee, Seokhee Hong, Jaewoo Ahn, Ilgee Hong et al.ACL 2024 · 36 citations
- CodeMark: Imperceptible Watermarking for Code Datasets against Neural Code Completion ModelsZhensu Sun, Xiaoning Du, Fu Song, Li LiFSE 2023 · 34 citations
Related papers
- WatME: Towards Lossless Watermarking Through Lexical RedundancyLiang Chen, Yatao Bian, Yang Deng, Deng Cai et al.ACL 2024 · 2 citations
- Watermarking with Low-Entropy POS-Guided Token Partitioning and Z-Score-Driven Dynamic Bias for Large Language ModelsHe Li, Xiaojun Chen, Zhendong Zhao, Yunfei Yang et al.EMNLP Findings 2025
- MorphMark: Flexible Adaptive Watermarking for Large Language ModelsZongqi Wang, Tianle Gu, Baoyuan Wu, Yujiu YangACL 2025 · 11 citations
- HeavyWater and SimplexWater: Distortion-free LLM Watermarks for Low-Entropy DistributionsDor Tsur, Carol Xuan Long, Claudio Mayrink Verdun, Sajani Vithana et al.NeurIPS 2025 · 9 citations
- Topic-Based Watermarks for Large Language ModelsAlexander Nemecek, Yuzhou Jiang, Erman AydayACL Findings 2026
