概述
这很重要,因为欧盟《人工智能法案》现在要求对 AI 生成的文本进行机器可读的标记,并且 Google、OpenAI 等机构已经部署了相关方案,然而改写、翻译和短文本段落仍然会削弱检测效果。
主要要点
- 文本水印利用密钥对语言模型的词语选择产生偏差,以便检测器稍后测试文本是否来自该模型。
- 2023 年马里兰州绿名单水印在 z 分数阈值为 4 时检测到了约 98.4% 的 200 个 token 样本。
- 2024 年 10 月发表在《自然》杂志上的 Google DeepMind 的 SynthID-Text 在大约 2000 万个 Gemini 响应上进行了测试,没有出现可测量的质量损失。
- 欧盟《人工智能法案》第 50 条第 2 款要求自 2026 年 8 月 2 日起,在技术可行的情况下,对 AI 生成的文本进行机器可读的标记。
- 改写、翻译、短文本段落和低熵回答都会削弱检测效果,并且缺少水印并不证明是由人类编写的。
深入探讨
A text watermark is a hidden pattern placed in machine-generated writing at the moment it is produced, so that software can later recognize the text as coming from a particular model. Unlike a visible label, it is invisible to readers and survives copy and paste because it lives in the choice of words themselves. It differs from AI text detectors that guess authorship from style, which have a poor record: OpenAI shut down its own AI text classifier in 2023 because of its low accuracy, according to TechCrunch. A watermark instead gives a statistical test with a known false positive rate, but only for text from a model that used that watermark with that key.
The idea works because language models generate text one token, a word or word piece, at a time by sampling from a probability distribution over their vocabulary. Often several next tokens are almost equally good, and the model has freedom in which it picks. A watermark uses that freedom. A secret key and the preceding tokens feed a pseudorandom function, which nudges the choice toward a hidden subset of tokens or a hidden ranking. To a reader the text reads normally. To a detector with the key, the text shows far more of the favored choices than chance would predict.
The best-known public scheme came from John Kirchenbauer, Jonas Geiping, Yuxin Wen, Jonathan Katz, Ian Miers and Tom Goldstein at the University of Maryland in January 2023. At each step, the previous token seeds a random number generator that splits the vocabulary into a green list and a red list. In the soft version, the model adds a constant bias, delta, to the scores of green tokens before sampling, so green words become more likely without being forced. Detection counts green tokens and computes a z-score, a measure of how many standard deviations the count is above what unwatermarked text would show. With half the vocabulary green, a bias of 2 and a threshold of z = 4, about 98.4% of 200-token samples from the OPT-1.3B model were detected, and the paper reported no false positives in its runs. A z threshold of 4 corresponds to a false positive rate of about 3 in 100,000.
Google DeepMind's SynthID-Text, published in Nature on October 23, 2024 by Dathathri and colleagues, uses a different mechanism called tournament sampling. The model proposes several candidate tokens, which compete in a knockout tournament over 30 layers by default, with winners decided by pseudorandom g-values derived from the secret key and the previous four tokens. A non-distortionary setting preserves text quality, while a distortionary one trades some quality for stronger detection. The paper reports that the non-distortionary version beat Gumbel sampling, another published scheme, on detectability, especially at low entropy, and added only 0.57% latency per token on Gemma 7B. SynthID-Text had been rolled out to the Gemini app and web experience, as Google DeepMind announced in May 2024, and its code was open-sourced.
Adoption accelerated with regulation. Article 50(2) of the EU AI Act requires providers of AI systems that generate synthetic text, images, audio or video to mark outputs in a machine-readable format so they are detectable as artificially generated, with solutions that are effective, interoperable, robust and reliable as far as technically feasible; it applies from August 2, 2026. OpenAI had built a text watermark by 2024 but held back; in August 2024 it told TechCrunch it was taking a deliberate approach because of circumvention risks and possible unfair effects on non-English speakers. In October 2026 TechCrunch reported that OpenAI would watermark ChatGPT and Codex text in the EU, using a method its technical report calls textGrain, and that Anthropic had announced in August 2026 that it would watermark Claude's text worldwide.
Compared with alternatives, watermarking has clear strengths and limits. Post-hoc detectors need no cooperation from the model provider but are unreliable. Watermarks travel with the words but only cover providers who adopt them; the SynthID paper notes that watermarking requires coordination among providers and is hard to enforce on open-source models that anyone can run without it.
The failure modes are well documented. Low-entropy text, where only one answer is reasonable, such as the capital of France or a math result, leaves little room to embed a signal; Google's blog names factual prompts as a weak case, and TechCrunch's account of OpenAI's report names math answers. Short passages give too few tokens for a confident test. Paraphrasing and translation scramble the pattern: OpenAI's own test, reported by TechCrunch, found that replacing 10% of words with synonyms dropped detection from about 92% to 66%. The Maryland group's 2023 reliability study found watermarks remained detectable after strong human paraphrasing, but only at around 800 tokens. Attackers can also try to steal the pattern and spoof it onto human text, or scrub it out, threats the SynthID paper lists. And absence of a watermark proves nothing, as OpenAI states.
In practice, a provider adds watermarking at the sampling step, with no retraining, and must protect its keys; Google's reference code warns that its random number generator is not a vetted cryptographic primitive and offers no cryptographic security guarantees. Detection needs the key, so access is usually restricted, as with OpenAI's initial limit to approved researchers and expert organizations. Anyone using a detector result for decisions about people, such as students, should treat it as one piece of evidence with a stated false positive rate, never as proof.
04工作示例
手工计算绿名单检测分数
假设一个绿名单比例 gamma = 0.5 且检测阈值为 z = 4 的水印。
取一段 200 个标记的文本,假设检测器使用密钥发现其中 140 个标记在绿名单中。
计算人类文本的预期绿色计数:0.5 乘以 200 = 100。
计算标准差:200 乘以 0.5 乘以 0.5 的平方根,约为 7.07。
计算 z = (140 - 100) / 7.07,约为 5.66,高于 4 的阈值。
对一段 50 个标记的摘录重复此过程,其中有 35 个绿色标记:z = (35 - 25) / 3.54,约为 2.83,低于阈值。
它显示了什么
这段 200 个标记的文本被标记为有水印,而 50 个标记的摘录则没有,尽管两者的绿色比例都是 70%。这说明了为什么更长的文本能提供更可靠的检测;请通过使用您自己的计数重新计算 z 来进行验证。
现实世界的实施
Google DeepMind 的 SynthID-Text 为 Gemini 的输出添加水印;2024 年的一篇《自然》论文报告了一项针对约 2000 万条 Gemini 回复的实时测试,结果显示用户的点赞或点踩率没有显著变化。
开发人员通过 Google DeepMind 的 Apache-2.0 参考实现将 SynthID 水印添加到开源模型中,该实现封装了 Hugging Face Gemma 和 GPT-2 类,并提供了一个返回精确 p 值的频率论检测器。
据 TechCrunch 报道,OpenAI 将从 2026 年 10 月起为欧盟用户对 ChatGPT 和 Codex 文本添加水印,以符合《欧盟人工智能法案》的要求,并为全球部分 API 模型提供可选水印。
研究人员使用马里兰大学的绿名单水印测试鲁棒性,其 2023 年的后续研究发现,在约 800 个标记的长度下,经过人工深度改写后,水印仍然可被检测到,且误报率为十万分之一。
合规团队正在梳理《欧盟人工智能法案》第 50(2) 条下的义务,该条款要求生成合成文本的系统提供商在技术可行的情况下,以机器可读、可检测的格式标记输出内容。
法学硕士生成文本水印的未来
Several threads are visible in sources from 2023 to 2026. Robustness is the main technical problem: the Maryland group's ICLR 2024 study showed detection survives paraphrasing only with long passages, and OpenAI's October 2026 report found that replacing 10% of words with synonyms cut detection from about 92% to 66%. Security is a second: the SynthID authors list stealing, spoofing and scrubbing attacks, and Google's reference code disclaims cryptographic guarantees. Coverage is a third, since watermarks only mark text from providers that use them; the EU AI Act's Article 50, applying from August 2, 2026, pushes major providers to mark output, and TechCrunch reported that Anthropic, Google, Meta, Microsoft and OpenAI committed to the EU code of practice on AI-generated content. Interoperability is unresolved, because each company's detector currently recognizes only its own watermark. Fair use of detectors in education and hiring remains contested, given the concerns OpenAI raised in 2024 about effects on non-English speakers. Whether a shared standard for text watermarks will emerge is an open question.
付诸实践
为什么这很重要
- 速度与规模. 语言工作流程可以在不牺牲一致性的情况下更快地移动。
- 交通与覆盖范围. 它扩展了跨语言和沟通方式的访问。
- 更清晰的判决. 团队可以花更多时间进行判断,而自动化则可以处理重复。
留意
- 幻觉的事实可以悄悄地进入报告、支持流程或研究成果。
- 及时的敏感性可能会在类似的请求中产生不一致的结果。
- 如果访问控制薄弱,敏感文本数据可能会暴露。
后续步骤
- 在推出之前定义输出格式、语气和质量标准。
- 当准确性很重要时,请使用可信来源进行地面响应。
- 为高风险输出保留人工审查检查点。
- 跟踪故障模式并定期重新训练提示或工作流程。
资料来源与延伸阅读
- arXiv大型语言模型的水印
- arXiv (ICLR 2024)关于大型语言模型水印的可靠性
- Nature (via PubMed Central)用于识别大型语言模型输出的可扩展水印
- GitHub (Google DeepMind)谷歌-deepmind/synthid-text
- Google DeepMind使用 SynthID 为 AI 生成的文本和视频添加水印
- EU Artificial Intelligence Act (Future of Life Institute)第 50 条:特定人工智能系统提供商和部署者的透明度义务
- TechCrunchOpenAI 表示,其在发布能够检测 ChatGPT 写作内容的工具时采取了“审慎的方法”
- TechCrunchOpenAI 将在欧盟开始为 ChatGPT 的文本添加水印
不断探索
常见问题
什么是 LLM 生成的文本水印?
文本水印在语言模型选择的词语中隐藏了一种统计信号,因此持有密钥的检测器随后可以辨别某段文字是否来自该模型。这很重要,因为欧盟《人工智能法案》现在要求对人工智能生成的文本进行机器可读的标记,并且 Google、OpenAI 等公司已经部署了相关方案,然而改写、翻译和短篇幅文字仍然会削弱检测效果。
引用的方案中的软绿名单水印如何影响词元生成?
该方案在保留可能的非绿色输出的同时,温和地提升了所选词元。
应用基于密钥的绿色词元水印检测器时,什么必须匹配?
测试的实现必须重现其分区;并不天生要求原始模型参数。
为什么更长的符合条件的段落能够为统计文本水印提供更多证据?
长度只是一个因素;受限的输出、重复的上下文以及方案本身也很重要。
哪种已发布的文本水印使用了锦标赛采样(tournament sampling)并针对 Gemini 文本进行了记录?
研究和官方 Google 报告描述了这种命名的方法,它不同于所有其他水印。
削弱或删除文本水印的已知方法是什么?
由于许多水印存在于表面标记选择中,释义、翻译或编辑可能会破坏绿色标记模式。