Large language models (LLMs) have show great ability in various natural language tasks. However, there are concerns that LLMs are possible to be used improperly or even illegally. To prevent the malicious usage of LLMs, detecting LLM-generated text becomes crucial in the deployment of LLM applications. Watermarking is an effective strategy to detect the LLM-generated content by encoding a pre-defined secret watermark to facilitate the detection process. However, the majority of existing watermark methods leverage the simple hashes of precedent tokens to partition vocabulary. Such watermark can be easily eliminated by paraphrase and correspondingly the detection effectiveness will be greatly compromised. Thus, to enhance the robustness against paraphrase, we propose a semantics-based watermark framework SemaMark. It leverages the semantics as an alternative to simple hashes of tokens since the paraphrase will likely preserve the semantic meaning of the sentences. Comprehensive experiments are conducted to demonstrate the effectiveness and robustness of SemaMark under different paraphrases.
翻译:大型语言模型(LLMs)在各种自然语言任务中展现出卓越能力。然而,LLMs存在被不当甚至非法使用的风险。为防止LLMs的恶意利用,在LLM应用部署中,检测LLM生成文本至关重要。水印技术通过编码预定义的隐秘水印来辅助检测过程,是检测LLM生成内容的有效策略。然而,现有主流水印方法大多基于前序令牌的简单哈希值进行词汇划分,此类水印极易被释义攻击消除,导致检测效果大幅削弱。为此,我们提出基于语义的水印框架SemaMark以增强对释义攻击的鲁棒性。该方法利用语义替代简单令牌哈希值——释义攻击通常能保留句子语义特征。通过综合实验验证了SemaMark在不同释义场景下的有效性与鲁棒性。