Improving the Generation Quality of Watermarked Large Language Models via Word Importance Scoring
This work addresses a specific bottleneck in watermarking for LLMs, offering an incremental improvement for applications requiring both security and text quality.
The paper tackles the problem of text quality degradation in watermarked large language models by proposing Watermarking with Importance Scoring (WIS), which estimates token importance to avoid watermarking critical tokens, resulting in improved text quality while maintaining comparable detection rates.
The strong general capabilities of Large Language Models (LLMs) bring potential ethical risks if they are unrestrictedly accessible to malicious users. Token-level watermarking inserts watermarks in the generated texts by altering the token probability distributions with a private random number generator seeded by its prefix tokens. However, this watermarking algorithm alters the logits during generation, which can lead to a downgraded text quality if it chooses to promote tokens that are less relevant given the input. In this work, we propose to improve the quality of texts generated by a watermarked language model by Watermarking with Importance Scoring (WIS). At each generation step, we estimate the importance of the token to generate, and prevent it from being impacted by watermarking if it is important for the semantic correctness of the output. We further propose three methods to predict importance scoring, including a perturbation-based method and two model-based methods. Empirical experiments show that our method can generate texts with better quality with comparable level of detection rate.