Large language models generate high-quality responses with potential misinformation, underscoring the need for regulation by distinguishing AI-generated and human-written texts. Watermarking is pivotal in this context, which involves embedding hidden markers in texts during the LLM inference phase, which is imperceptible to humans. Current watermarking algorithms, however, face the challenge of achieving both the detectability of inserted watermarks and the semantic integrity of generated texts, where enhancing one aspect often undermines the other. To overcome this, we introduce a novel multi-objective optimization (MOO) approach for watermarking that utilizes lightweight networks to generate token-specific watermarking logits and splitting ratios. By leveraging MOO to optimize for both detection and semantic objective functions, our method simultaneously achieves detectability and semantic integrity. Experimental results show that our method outperforms current watermarking techniques in enhancing the detectability of texts generated by LLMs while maintaining their semantic coherence. Our code is available at https://github.com/mignonjia/TS_watermark.
翻译:大语言模型生成的高质量回复可能蕴含错误信息,这凸显出通过区分AI生成文本与人类写作文本进行监管的必要性。在此背景下,水印技术发挥关键作用——它通过在模型推理阶段向文本中嵌入人类不可感知的隐藏标记来实现溯源。然而,现有水印算法面临双重挑战:既要保证插入水印的可检测性,又要维护生成文本的语义完整性,二者往往此消彼长。为突破这一局限,我们提出基于多目标优化的新型水印方法,利用轻量级网络生成令牌级水印逻辑值与分裂比率。通过多目标优化同时优化检测与语义目标函数,该方法能同步实现可检测性与语义完整性。实验结果表明,与现有水印技术相比,本方法在提升大语言模型生成文本可检测性的同时,有效维持了语义连贯性。相关代码已开源至 https://github.com/mignonjia/TS_watermark。