arXiv(opens in a new tab)cs.CRAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.27666

Semantic Watermarking with Order-Robust Detection over Sub-sentence Units

Abdulrahman Diaa, Jonathan Petit, Florian Kerschbaum

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Semantic watermarks tie the mark to sentence meaning rather than token choices, promising robustness to content-preserving edits. However, the detector only observes attacker-supplied text, which can be reworded, reordered, or resegmented to evade detection without content loss. Rewording, reordering, and resegmentation all cause embedding displacement: detection tests embeddings different from those selected during watermarking and can therefore lose the mark. Our adaptive embedding displacement attack (EDA) admits all three edits under a single objective that maximizes this displacement. It uses a public paraphraser and surrogate encoder without access to the provider's generator or secret key. At a 5% false-positive rate (FPR) and content-preservation threshold qˉ=90%\bar{q}=90\%, EDA successfully removes the mark on 32.6%–47.9% of documents across four schemes, the highest among the tested attacks. Therefore, EDA evaluates the schemes' robustness more thoroughly than passive paraphrasing.

To address these vulnerabilities, we design (k)-SwordStamp: semantic watermarks with order-robust detection over sub-sentence units, reducing sensitivity to attacker-chosen structure at a small quality cost. Against k-SwordStamp, the strongest no-box attack we test is an EDA variant adapted to its design, with a 10.8% attack-success rate. A stronger EDA with access to the provider's detector and secret key reaches a 39.7% attack-success rate, compared with 65.5% on k-SemStamp. Our code is available at https://github.com/D-Diaa/SwordStamp.

1 Introduction

A text watermark embeds a hidden signal during generation so that a detector with a secret key can later identify the resulting text as AI-generated. Providers are beginning to deploy text watermarks. Google deploys SynthID-Text in Gemini [11]. Anthropic has announced that future Claude models will use a version of SynthID-Text to meet the European Union's AI Act marking requirements [2, 13].

Users may edit generated text before using it in an article, email, or report. A detector may therefore receive only the edited version. A useful watermark should remain detectable through meaning-preserving edits while its detector maintains a low FPR on human text. Evasion alone does not make an attack successful, because an attacker that discards the content evades any detector and gains nothing from the provider. We score how well an attack output preserves the marked text's content. qˉ\bar{q} is the minimum content-preservation percentage an attacker must reach. An attack is qˉ\bar{q}-successful when its output both evades the detector and scores at least qˉ\bar{q}. Most text watermarks operate through token choices, which paraphrasing can remove at a high qˉ\bar{q} [12, 26]. Encoder-based watermarks (EBWs) instead mark whole sentences [17, 18, 20, 21]. A sentence encoder maps each sentence to a vector, and the secret key selects a set of regions of that embedding space. (k)-SemStamp [17, 18] generate sentences by rejection sampling: they draw candidate sentences from the language model and keep the first one whose embedding falls inside a selected region. The detector re-embeds the sentences of a suspect text and counts how many of them land in selected regions. The implicit assumption is that meaning-preserving edits tend to keep a sentence's embedding within the same region, so an evading rewrite would require a change in meaning.

Most prior evaluations of EBWs only consider sentence-by-sentence paraphrasing that preserves sentence order and boundaries [17,18]. These evaluations do not cover an attacker who changes sentence structure. A whole-text attacker can preserve content while reordering sentences, splitting one sentence into two, or merging adjacent sentences. These edits change either the unit that the detector embeds or the position at which it tests that unit.

We apply rewording, reordering, and resegmentation separately to measure each edit's effect on detection. Although these edits differ, each causes the detector to evaluate an embedding different from the one selected during watermarking. Rewording shifts the original sentence's embedding, reordering moves a different sentence into the tested position, and resegmentation changes the unit that the detector embeds.

Figure

(a) ASR versus qˉ\bar{q}.

Figure

(b) Clean fidelity versus ASR at qˉ=90%\bar{q}=90\%.

Figure 1: Strongest no-box attack success rate (ASR) at 5% FPR across attack families and settings. Vertical bars give percentile-bootstrap 95% intervals for maximum ASR; horizontal bars in (b) give 95% confidence intervals for clean fidelity. The shaded region in (b) gives the unwatermarked fidelity interval, and the dotted line marks its mean.

This shared embedding displacement effect is the basis for our embedding displacement attack (EDA). EDA observes only the marked text and cannot query the detector or the generator, matching the no-box setting of prior work [12]. It runs the provider's own procedure with the opposite objective. The provider samples candidate sentences and keeps one that lands inside a selected region; EDA rewrites the text one sentence at a time and, at each step, keeps the candidate farthest from the source sentence under a public surrogate encoder. The surrogate differs from every provider encoder we test, yet candidates displaced farther under the surrogate also tend to be displaced farther under the provider's encoder (Figure 2). Because each candidate continues a rewrite of the whole text rather than replacing one sentence in isolation, EDA can also reorder content and change sentence boundaries.

We evaluate EDA against four EBWs: SemStamp, k-SemStamp, PMark, and the concurrent SAMark [17, 18, 20, 21]. At 5% FPR and qˉ=90%\bar{q}=90\%, EDA is qˉ\bar{q}-successful on 32.6%–47.9% of marked documents, the highest success of the attacks we test on each of the four schemes. SAMark resists the whole-text paraphraser Dipper [26] best among the four, holding it to 18.7%, yet EDA succeeds on 32.6% of its documents. At this operating point, EDA reaches a higher ASR on each scheme than every tested watermark-agnostic paraphraser, including Pegasus [44], Parrot [10], and Dipper.

To improve the robustness of EBWs, we add three mechanisms to (k)-SemStamp. Best-of-N selection scores a fixed pool of candidate sentences and emits the one whose embedding sits farthest inside a selected region, so a rewrite must travel farther to leave it ( §5.1§5.1). A fixed valid set uses the same key-selected regions at every position instead of deriving them from the preceding sentence, which makes detection order-robust ( §5.2§5.2). Deterministic sub-sentence units, which we call semspans, follow changes in meaning rather than punctuation and reduce sensitivity to sentence splits and merges ( §5.3§5.3). Applying these mechanisms produces (k)-SwordStamp.

Figure 1 compares schemes under their strongest tested attacks, including EDA-S, the EDA variant adapted to every scheme's design ( §5.4§5.4). Across all tested qˉ\bar{q}, k-SwordStamp has the lowest attack success among the six schemes. At 5% FPR and qˉ=90%\bar{q}=90\%, SwordStamp reduces scheme-specific EDA attack success by 29.2 percentage points relative to SemStamp, at a fidelity cost of 1.8 percentage points. At the same operating point, k-SwordStamp reduces scheme-specific EDA attack success by 22.5 percentage points relative to k-SemStamp, at a fidelity cost of 4.4 percentage points. Figure 1b places this trade-off against all six schemes at the same operating point.

As a stress test beyond the no-box setting, we evaluate detector-access EDA, which receives the provider's detector, including its secret key and encoder. This attacker evaluates each candidate with the detector and selects the closest candidate that the detector misses. With four candidate rewrites per step, detector evasion is 29.6% on k-SwordStamp, compared with 70.2% on k-SemStamp, showing that evading rewrites are harder to find. At the largest search budget, detector evasion reaches 85.4%, but only 46.5% of them clear qˉ\bar{q} (Figure 7). This caps the attack's qˉ\bar{q}-success rate at 39.7%, compared with 65.5% on k-SemStamp, and demonstrates k-SwordStamp's improved robustness to content-preserving attacks.

We make three contributions: (1) We measure how rewording, reordering, and resegmentation affect EBW detection and consolidate them into EDA, a single adaptive whole-text attack guided by embedding displacement; (2) We develop (k)-SwordStamp by extending (k)-SemStamp with best-of-N selection, order-robust detection, and sub-sentence units; and (3) We evaluate six watermarks under the qˉ\bar{q}-success criterion, measure each mechanism's effects on clean detection, output quality, and attack success, and stress-test k-SwordStamp and k-SemStamp under detector access.

References (41)