PULSE
AI 认知观点 VIEWPOINT重要度 72

水印如何改变AI代理行为

Hacker News · 2026-09-26 · 原题《The Provenance Tax: Understanding the Impact of LLM Watermarking on AI Agent Behavior》 · 原文约 8 分钟 · 阅读原文 ↗
水印如何改变AI代理行为 核心:采样漂移 → 行为偏移 机制:水印改变采样 溯源设计 token选择变 非失真 ≠ 固定密钥行为相同 保证仅在水印随机性上成立 影响:两类行为偏移 拒绝行为 代理工具调用 提示注入下可能削弱拒绝 部署覆盖API与云提供商 工具调用实验:配对差异 > 净准确率变化 6/7 模型 准确率降低 6.5% 平均churn 4 个 显著下降 21 组合 模型-温度 错误类型因模型而异: Llama 参数/工具错误 · phi-4/Granite 畸形输出主导
LLM水印(如SynthID-Text)在生成时改变token采样,导致模型拒绝行为和代理工具调用出现采样漂移,且配对差异远大于净准确率变化。

论证要点

  1. 水印为溯源设计,但SynthID-Text在生成时改变token选择,可能影响模型安全行为(如拒绝有害请求)和代理工具调用。
  2. Anthropic部署模型级水印,覆盖API和云提供商,开发者使用水印模型作为代理推理组件时,即使代理是独立应用也会收到水印输出。
  3. 非失真水印不保证固定密钥下行为相同:保证仅在水印随机性上成立,特定密钥会改变token选择,导致采样漂移。
  4. 工具调用实验显示,水印在7个模型中的6个降低准确率,4个显著;配对差异率(churn)远大于净准确率变化,21个模型-温度组合平均churn为6.5%。
  5. 错误类型因模型而异:Llama-3.1-8B主要因错误参数(-3.48分)和错误工具(-1.84分),phi-4和Granite-3.2-8B则畸形输出主导(-5.96和-4.36分)。
  6. 拒绝行为也受水印影响,在提示注入下可能削弱拒绝,但原文未提供具体数据。

对实践的启示

使用水印模型构建代理时,需注意工具调用可能因采样漂移而改变,导致错误参数或工具选择,且净准确率可能掩盖个体差异。开发者应测试水印密钥对代理行为的影响,并考虑配对评估。

作者承认的反方与局限

Dathathri等人报告在近两千万Gemini响应中无 measurable 质量下降,且非失真配置在期望上保持原始token分布。

原文摘引

We call this behavioral effect sampling drift.
The weights and prompt remain unchanged, but token selection does not.
At T=1.0, 16.8% of phi-4’s call verdicts differ between the two conditions while its net accuracy loss is 2.87 points.
▸ 展开原文全文(24 段,抓取自 Hacker News)

The Provenance Tax: Understanding the Impact of LLM Watermarking on AI Agent Behavior

Recently, Anthropic announced that future Claude models would embed an invisible watermark in their output [1], [2], and subsequently disclosed that the watermark is based on Google DeepMind’s SynthID-Text [2], [3]. Text watermarking itself is not new, but its deployment now has regulatory relevance. Article 50(2) of the EU AI Act [4] requires providers of AI systems generating synthetic text to mark their outputs in a machine-readable format and make them detectable as artificially generated or manipulated, using technical solutions that are effective, interoperable, robust, and reliable as far as technically feasible.

Watermarking is designed for provenance, but SynthID-Text changes the process by which the model generates each next token. At the model level, this can change safety behavior, including whether the model refuses a harmful request and whether that refusal holds under prompt injection. At the agent level, the same sampled tokens can determine which tool is called and what arguments are passed to it. Prompt injection connects these two settings because a weakened refusal becomes more consequential when the model can also act through tools. Such a watermarking procedure can therefore affect both what the model says and what an agent does. We call this behavioral effect sampling drift.

Whether this drift appears in practice is an empirical question. We find that it does, in both model refusal behavior and agent tool calling. The effect is model- and key-dependent and can be obscured by aggregate scores when changes in opposite directions cancel. We therefore report both net performance and paired disagreement between watermarked and unwatermarked runs. Further, the closing section discusses what it means for AI safety and security and what developers should do about it.

Built for Content Provenance, Deployed Inside Agents

A text watermark embeds a signal that allows output to be identified as AI-generated. Existing approaches include post-processing methods and methods integrated directly into LLM generation [8]. Generation-time approaches include logits-biasing methods [5], distortion-free keyed sampling [6], cryptographically motivated constructions [7], and SynthID-Text’s Tournament sampling [3]. Figure 1 contrasts this process with ordinary sampling. We use SynthID’s non-distortionary configuration, which preserves the original token distribution in expectation over the watermark randomness while individual generations under a fixed key can still differ [3]. Dathathri et al. report no measurable quality degradation across nearly twenty million Gemini responses [3].

Anthropic’s deployment also illustrates why this matters beyond first-party chat interfaces. The company states that watermarking is applied at the model level and covers supported models accessed through the Claude Platform API as well as cloud providers [1]. A developer using a watermarked model as the reasoning component of an agent can therefore receive watermarked outputs even when the agent itself is a separate application. This makes model-level behavioral effects of watermarking relevant to the agents built around such models.

Same Tokens the Watermark Biases, Same Tokens the Agent Acts On

Tournament sampling has more opportunity to alter token selection where the model is uncertain. In structured output such as JSON, braces, keys, and function names are often highly predictable, while values such as queries, numbers, paths, and recipients are less so. A change that would amount to a lexical variation in ordinary prose can therefore alter an argument that an agent executes.

The weights and prompt remain unchanged, but token selection does not. Importantly, non-distortionary does not imply identical behavior under a fixed watermark key. The guarantee holds over the watermark randomness, while a particular key changes token selection during generation [3]. The resulting sampling drift can therefore change agent behavior even though the watermark is non-distortionary in the sense defined by Dathathri et al. Its effect can also depend on the watermark key, so we test multiple keys rather than relying on one.

How We Measure the Effect

We use a paired design for two experiments. Tool calling is evaluated on BFCL v4 single-turn AST [9], and refusal on 200 HarmBench harmful behaviors [10] plus 100 benign JailbreakBench controls [11], with harmful requests tested both bare and under one fixed prompt injection technique. Table 1 summarizes the datasets, evaluation scope, temperatures, and expected behavior.

We use the non-distortionary SynthID-Text configuration through HuggingFace’s unmodified SynthIDTextWatermarkLogitsProcessor, with 30 Tournament layers, n-gram length 5, sampling table 216, and context history 1,024. Each item is generated with and without SynthID from the same seed, batch composition, and order at each temperature. The watermark processor is the only difference within each pair.

Table 1. Datasets and experimental settings.

The Tool-Calling Cost of Watermarking

We test whether watermarking changes tool selection, arguments, or output validity. A well-formed call to the correct tool with an incorrect path, recipient, query, or amount is particularly consequential because it can execute successfully while performing the wrong action. We evaluate calls individually, although an incorrect call in a deployed agent could also affect subsequent observations and decisions.

How Often Tool-Call Correctness Changes

On items where a tool call is expected, watermarking reduces accuracy on six of the seven models, with a significant decrease on four. The net change in accuracy, however, does not show whether the same individual calls succeed with and without the watermark. A call that becomes incorrect can be offset by another that becomes correct, leaving the aggregate result nearly unchanged even though the model behaves differently on both items.

We measure this directly using the paired disagreement rate, which we refer to as churn, defined as the share of items whose verdict differs between the watermarked and unwatermarked runs. For the comparison across temperatures in Figure 2, we use BFCL’s researcher-defined non-live items, which give us the same fixed set of 1,150 call-expected tasks at each temperature. Figure 2 shows that the paired disagreement is substantially larger than the net accuracy change. At T=1.0, 16.8% of phi-4’s call verdicts differ between the two conditions while its net accuracy loss is 2.87 points. Llama-3.1-8B shows the same pattern, with 9.9% of verdicts changing while the net loss is only 0.87 points. Across the 21 model-temperature combinations, churn averages 6.5%, and its bootstrap interval excludes zero in every case.

Which Tool-Call Errors Change

Error type also matters. Malformed output prevents the intended call from executing, while a well-formed call with the wrong tool or argument can still execute. Figure 3 separates these failures into wrong tool, wrong arguments, and malformed output. Unlike Figure 2’s across-temperature comparison, this analysis combines BFCL live and non-live call-expected items at T=0.001 to characterize errors across the broader benchmark. Relevance and irrelevance are excluded because they test whether a call should be made rather than whether the emitted call is correct.

The error profile also differs across models. On Llama-3.1-8B, the largest contribution to the accuracy loss comes from incorrect arguments (−3.48 points), followed by wrong-tool calls (−1.84 points). On phi-4 and Granite-3.2-8B, malformed output dominates (−5.96 and −4.36 points). Similar aggregate changes can therefore arise from different failure modes.

Watermarking Can Weaken Refusal Under Prompt Injection

Refusals are also generated token by token, so watermarking can affect them. We test harmful requests alone and with o