We present a provably distortion-free semantic watermarking algorithm that requires only black-box sampling access to a generative model and black-box access to a semantic embedding. A watermark is called distortion-free if, averaged over its secret detection key, it leaves the generator's output distribution unchanged; this provides a formal guarantee that watermarking does not reduce output quality. Conventional such watermarks are often brittle to transformations. This is especially problematic for images, where benign operations such as compression, cropping, or resizing change the entire pixel representation. Semantic watermarks therefore require detection to be robust to content-preserving transformations. Previous methods combining these properties rely heavily on specific white-box properties of the underlying model: either to autoregressive text generation or to diffusion-specific access, such as control of the initial noise or diffusion inversion. In contrast, our construction is fully generic: It only interacts with the generative model and the semantic embedding, a function that determines the notion of "preserving content" under which detection should be robust, via sample and query access. We then instantiate this framework for image generation. We characterize the two competing properties required of the semantic embedding: it should remain stable under transformations that preserve an image's content, but should distinguish independent generations from the same prompt. We train an image encoder directly for this tradeoff. The resulting encoder improves separation while maintaining stability over off-the-shelf alternatives and enables strong aggregate detection while remaining robust to various transformations. We demonstrate the effectiveness of our watermark scheme on both open-source and closed models, which is possible only due to restriction to black-box access.
Figures & tables
Figure 1: Method overview. Candidates are encoded, hashed, and grouped by semantic code; each occupied code c has a keyed score Fκ(c) and nc members. Gumbel selection (Algorithm 1 ) returns a uniformly random member of the code maximizing logFκ(c)/nc . Averaged over keys, code c wins with probability nc/N , so each candidate is returned with probability 1/N and the output follows the generator’s distribution (Theorem 3 ). With a fixed key, the preference for particular codes supplies the signal the detector tests. Other distortion-free rules, such as representative sampling in Appendix B , can replace the selection stage.
Method
FID ↓
Relative FID ↓
DINOv2-base diversity change
Clean vs. clean
4.64
1.000
–
Ours (N,M)=(8,4)
4.75
1.024
−0.5%
Ours (N,M)=(16,8)
5.04
1.086
−1.2%
Ours (N,M)=(32,12)
5.22
1.125
−1.0%
Tree-Ring
5.61
1.209
+0.4%
Gaussian Shading
5.42
1.168
−9.1%
Table 1: Fixed-key generation quality and diversity. FID between 10,000 matched watermarked and clean generations from 1,000 COCO-2017 prompts; Relative FID divides by the clean-vs-clean reference of 4.64. Diversity change is 100(Vendiwm/Vendiclean−1) in DINOv2-base space over 60 prompts with 60 generations each.
B=1
B=5
B=10
Method
AUROC
TPR@20%
AUROC
TPR@20%
AUROC
TPR@20%
Ours (N=8,M=4)
0.802
0.642
0.938
0.905
0.960
0.941
Ours (N=16,M=8)
0.879
0.815
0.991
0.994
0.998
0.998
Ours (N=32,M=12)
0.920
0.920
0.998
0.999
1.000
1.000
Tree-Ring
1.000
1.000
–
–
–
–
Gaussian Shading
1.000
1.000
–
–
–
–
Table 2: Clean detection on 1,000 matched prompts. TPR@20% is the true-positive rate read at 20% FPR from the mean ROC curve. A dash means that only single-image detection was evaluated for that native baseline.
Figure 2: Robustness at 20% nominal clean FPR. Filled and open markers show edited and clean detection; retention is the fraction of initial detections preserved after editing. Panels (a,b) cover appearance/compression and geometric transformations; panel (c) covers 80 generative edits. Colors mark the best and second-best values. Appendix I.2 gives detector configurations, per-setting results, and FPRs.
DINOv2
CLIP
DINOv3
TPIPS
Ours
Cos. ↓
H↑
Cos. ↓
H↑
Cos. ↓
H↑
Cos. ↓
H↑
Cos. ↓
H↑
FLUX distilled
0.808
0.033
0.902
0.000
0.783
0.054
0.826
0.000
0.431
0.739
FLUX base
0.730
0.093
0.873
0.001
0.720
0.108
0.762
0.001
0.297
1.104
SD2.1
0.634
0.252
0.863
0.001
0.651
0.217
0.645
0.039
0.222
1.345
Table 3: Same-prompt diversity in encoder space. Mean pairwise cosine similarity and estimated semantic entropy at ε=0.5 , across 16 independent generations from the same prompt. Lower cosine similarity and higher estimated semantic entropy indicate greater diversity in the encoder’s representation. Appendix H provides the complete protocol and stability results under content-preserving transformations.
Appendix figures & tables38 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 3: The two requirements of a semantic encoder. (a) An SDXL image, content-preserving transformations of that image, and an independent generation from the same prompt. (b) Mean cosine distance between different-seed generations divided by mean cosine distance under transformations. Higher values indicate stronger separation relative to transformation sensitivity.
Figure 4: Training-pair construction using SDXL generations for the prompt the feeling of writer’s block . (a) An image and a semantics-preserving transformation form a positive pair and are pulled together. (b) Independent generations from the same prompt but different seeds 2 and 5 form a negative pair and are pushed apart.
DINOv2
CLIP
DINOv3
TPIPS
Ours
JPEG compression
0.974
0.959
0.976
0.956
0.985
Gaussian blur
0.922
0.932
0.974
0.895
0.963
Resize–resample
0.992
0.994
0.995
0.978
0.996
Mild crop + color
0.954
0.964
0.972
0.919
0.937
Appendix
Table 4: Encoder stability under content-preserving transformations. Mean pairwise cosine similarity across transformed versions of the same source image. Higher values indicate greater invariance.
Figure 5: Semantic entropy as a function of ε . Each panel reports HsemE,ε for one generator. Higher is better: at a fixed ε , higher curves indicate greater semantic diversity. Dashed lines mark the table radius, ε=0.5 . Panels show ε∈[0,1] and entropy in [0,5] .
Figure 6: Distinct codes under semantics-preserving perturbations. Mean number of distinct 8-bit codes as additional perturbed versions are included. Each panel averages 200 source-image groups over 200 random hyperplane draws. Lower counts are desirable. Separate panels highlight the different behavior of the four perturbation types.
Figure 7: Distinct codes under independent generations. Mean number of distinct 8-bit codes as additional independent generations from the same prompt are included. Each panel averages results across 200 prompts and 200 random-hyperplane projections. Higher counts are desirable because they indicate fewer collisions. Separate panels show SDXL and the two FLUX variants, making transfer across generators visible.
Figure 8: Different images from one prompt. (a) Sixteen independent SDXL generations. (b) Pairwise cosine similarities under DINOv2-base and our encoder. DINOv2 assigns high similarity across the group, whereas our encoder represents more of the differences between the images. SDXL is the encoder’s training domain; the prompts are held out.
(N,M)
δ calibration target
rham
(8,4)
10% activation
1
(16,8)
50% activation
1
(32,12)
75% activation
1
Appendix
Table 5: Selected detector settings. Because δ is calibrated separately for each random-hyperplane frame, we report its target activation rate rather than a single numeric value.
Figure 9: Clean detection for our method at B∈{1,5,10} on a linear FPR axis. Curves are means over 25 hyperplane-frame and watermark-key combinations; Table 6 gives numerical operating points.
Figure 10: The same clean-detection curves on a logarithmic FPR axis, exposing aggregation gains at low FPR.
Method
B
TPR at FPR
1%
5%
20%
Ours (N=8,M=4)
1
4.9
23.1
64.2
5
52.3
75.3
90.5
10
69.7
85.0
94.1
Ours (N=16,M=8)
1
8.6
35.0
81.5
5
86.2
96.4
99.4
Appendix
Table 6: Clean-detection TPR (%) at empirical FPR targets, averaged over 25 combinations of five hyperplane frames and five watermark keys. B is the number of images attributed to one source; baselines use their native single-image detectors.
Figure 11: Generative-edit evaluation protocol. For each source image, the assigned category prompt and image are given to Qwen3-VL-8B-Instruct, which produces a validated image-specific instruction. The original image and this instruction are then passed to Qwen-Image-Edit, and the edited result is evaluated using detector parameters fixed before editing. The same pipeline is applied to watermarked and corresponding unwatermarked sources. The example changes the refrigerator handles from metallic to matte black; the boxes identify the object named by the instruction, not a guaranteed pixel-local change.
Edit category
Fixed prompt constraint
Attribute change
Modify only the colour or material of one visibly present, non-salient secondary object. Preserve the main subject, main action, object inventory, and scene. Do not target faces, text, logos, or watermarks.
Background cleanup
Remove only one tiny, non-salient background clutter item. Preserve the main subject, main action, salient objects, and scene. Do not target faces, text, logos, or watermarks.
Object insertion
Add one unrelated small realistic cat in the background. The cat must be clearly visible but must not replace or occlude the main subject. Do not target faces, text, logos, or watermarks.
Camera-viewpoint change
Change only the camera viewpoint to a clearly different three-quarter or slightly elevated viewpoint. Preserve the same main subject, objects, actions, scene, colours, and lighting. Do not target faces, text, logos, or watermarks.
Appendix
Table 7: Fixed category-specific constraints provided to Qwen3-VL-8B-Instruct when generating image-specific editing instructions.
Appearance/compression
Geometric
Generative edits
Method
TPR
Ret.
FPR
TPR
Ret.
FPR
TPR
Ret.
FPR
Ours (N=8,M=4)
55.4
93.1
17.2
41.0
65.9
17.6
41.2
76.7
17.8
Ours (N=16,M=8)
76.6
92.7
19.6
48.9
57.5
20.2
70.0
84.8
19.2
Ours (N=32,M=12)
83.5
91.4
19.2
48.2
51.8
20.0
66.2
74.6
20.5
Tree-Ring
100.0
100.0
22.6
46.7
46.7
21.7
60.0
60.0
21.0
Gaussian Shading
100.0
100.0
21.6
27.4
27.4
23.7
37.5
37.5
22.0
Appendix
Table 8: Robustness at 20% nominal clean FPR (all values in %). Columns report post-edit TPR, paired retention conditioned on original detection, and post-edit FPR on unwatermarked images. Appearance/compression and geometric results are unweighted means over 14 and six settings, respectively; generative results summarize 80 edits. Detector settings are given in Table 5 .
(N,M)
Detector
TPR
Retention
FPR
(8,4)
Exact code
50.54
82.70
16.75
Boundary aware
51.06
84.96
17.33
(16,8)
Exact code
65.44
72.64
19.13
Boundary aware
68.28
82.14
19.78
(32,12)
Exact code
65.63
66.70
18.53
Boundary aware
72.91
79.51
19.47
Appendix
Table 9: Boundary-aware detector ablation on the held-out ordinary-edit evaluation set at 20% nominal clean FPR. Values are unweighted means over the 20 reported transformation settings (14 appearance/compression and six geometric). TPR and FPR are measured after transformation, and retention is conditioned on original detection. Exact-code detection uses no boundary expansion; boundary-aware detection uses the settings in Table 5 . Each pair uses the same images.
Appearance/compression
Geometric
Generative edits
FPR
Method
Clean
Edited
Ret.
Clean
Edited
Ret.
Clean
Edited
Ret.
1%
Ours (N=8,M=4)
0.0
0.0
–
0.0
0.0
–
0.0
0.0
–
Ours (N=16,M=8)
7.8
7.1
87.2
7.8
3.8
42.0
8.8
5.0
57.1
Ours (N=32,M=12)
14.6
13.0
86.6
14.6
5.9
34.2
13.8
7.5
54.5
Tree-Ring
100.0
100.0
100.0
100.0
19.5
19.5
100.0
17.5
17.5
Gaussian Shading
100.0
100.0
100.0
100.0
1.8
1.8
100.0
7.5
7.5
Appendix
Table 10: Robustness at 1% and 5% nominal clean FPR (all values in %). Columns report TPR before editing (clean), post-edit TPR, and paired retention conditioned on original detection. Appearance/compression and geometric results are unweighted means over 14 and six settings, respectively; generative results summarize 80 edits. Detector settings are given in Table 5 .
B=5
Appearance/compression
Geometric
FPR
Method
Clean
Edited
Ret.
Clean
Edited
Ret.
1%
Ours (N=8,M=4)
62.1
52.2
82.7
62.1
22.1
33.6
Ours (N=16,M=8)
92.3
77.8
83.9
92.3
23.4
25.1
Ours (N=32,M=12)
98.9
82.5
83.3
98.9
21.6
21.8
5%
Ours (N=8,M=4)
85.8
77.8
90.1
85.8
45.2
51.4
Appendix
Table 11: Batch detection after editing for our configurations (all values in %). Each batch contains B images from different prompts that received the same transformation. FPRs are nominal, with thresholds calibrated on additional unedited negatives.
Edit
DINOv2 pretrain
Ours fine-tune
Ours (8,4)
Ours (16,8)
Ours (32,12)
Tree-Ring
Gaussian Shading
SEAL
Appearance and compression
JPEG Q90
×
✓
58.0
81.4
90.1
100.0
100.0
99.5
JPEG Q75
×
✓
56.4
80.1
88.3
100.0
100.0
99.5
Gaussian blur r=0.5
✓
✓
58.4
81.8
90.6
100.0
100.0
100.0
Gaussian blur r=1.5
✓
✓
54.7
76.4
83.0
100.0
100.0
100.0
Gaussian noise σ=2
×
✓
57.6
81.2
89.5
100.0
100.0
100.0
Appendix
Figure 12: Per-edit detection and paired retention for the 20 selected appearance/compression and geometric settings, followed by four edit families produced by an image-editing model, at 20% nominal clean FPR. The upper section reports edited TPR and the lower section reports paired retention; all values are percentages. The two left columns in both sections mark transformation-family exposure during DINOv2 pretraining and our encoder fine-tuning. Bold green and orange indicate the best and second-best values within each row; ties at the displayed precision share a color. Detector configurations and evaluation protocols are given in Appendix I.1 .
Figure 13: Examples of ordinary edits, grouped by family across three pages: appearance and compression, geometric transformations, and edits from an image-editing model. Each row pairs the original image with its edited version or versions; parameter values are shown below the images where applicable.
Figure 25Figure 26
Figure 14: Encoder similarity and watermark retention. Each point pairs mean original–edited cosine similarity in our learned embedding with paired detection retention for one of 20 edit settings. Marker shape indicates the edit category, and color indicates the method. Spearman rank correlations are computed separately for each method. Detection thresholds are calibrated on clean images and frozen across edits.
Figure 15: Semantic-encoder ablation for clean watermark detection. Mean ROC curves at B=1 for (N,M)=(8,4) , (16,8) , and (32,12) . Using the same 1,000 held-out COCO-2017 prompts and Stable Diffusion 2.1, we rerun our watermarking scheme and clean-image detection separately for each encoder. The dotted diagonal is random guessing (TPR=FPR). Exact detection settings are given in Appendix I.1 .
Representative sampling
Gumbel
Tournament
(N,M)
AUROC
TPR
AUROC
TPR
AUROC
TPR
(8,4)
0.734
0.500
0.802
0.576
0.746
0.454
(16,8)
0.821
0.733
0.879
0.808
0.762
0.545
(32,12)
0.872
0.852
0.920
0.919
0.756
0.532
Appendix
Table 12: Clean detection under alternative distortion-free sampling rules. TPR is measured at thresholds calibrated to a 20% clean FPR target. Results use B=1 for single-image detection and average five random-hyperplane frames and five keys. Bold green and orange indicate the best and second-best values within each row.
Encoder
Transformation
TPR (%)
Retention (%)
Cosine distance ↓
CSD style
Original
66.8
—
—
Style changes
Oil painting
28.5
36.9
0.199
Watercolor
20.8
25.2
0.327
Pencil sketch
23.0
25.8
0.452
Spatial transformations
Appendix
Table 13: Encoder-dependent watermark robustness. TPR uses thresholds calibrated at 20% FPR on unedited images and frozen after editing. Retention is conditional on initial detection; smaller cosine distance indicates greater representation stability.
Figure 16: Transformations used to test encoder-dependent robustness. Top: original, oil painting, watercolor, and pencil sketch. Bottom: original, 32-pixel translation, 75% off-center crop, and horizontal flip.
Figure 17: Eight independent GPT Image generations from one prompt. All images were returned by separate API calls for “Two women walk outside, both holding up umbrellas.” Although their layouts are more similar than in the open-model generation panels, our encoder maps them to a mean of 6.6 distinct 8-bit codes across five independently sampled random-hyperplane LSH functions.
Figure 18: Closed-API watermark detection. Mean ROC curves for GPT Image with (N,M)=(8,8) , averaged over five keys and five choices of HR . Shading shows one standard deviation across the 25 repetitions. For B=5 , each observation averages five watermarked or clean scores with identical prompt membership.
B=1
B=5
B=10
(N,M)
AUROC
TPR@20%
AUROC
TPR@20%
AUROC
TPR@20%
(8,4)
0.711
0.397
0.903
0.846
0.964
0.956
(16,8)
0.817
0.670
0.978
0.983
0.998
1.000
(32,12)
0.862
0.782
0.990
0.993
1.000
1.000
Appendix
Table 14: Audio watermark detection. Means over 25 key–hyperplane repetitions on 200 prompts. For B>1 , each batch contains clips generated from B different prompts. We calibrate the detector on clean clips and report the true-positive rate at a nominal 20% clean false-positive rate.
Figure 19: Audio watermark ROC curves. Mean clean-detection ROC over 25 key–hyperplane repetitions on 200 prompts for B=1 , 5 , and 10 clips per decision; shaded bands show one standard deviation across repetitions. The dashed line marks the 20% false-positive rate of Table 14 . With 200 prompts, B=10 yields 20 batches per repetition, so its false-positive rate moves in steps of 0.05.
Method
Watermarked
Matched clean
Relative change
FID (lower is better)
Ours (N,M)=(8,4)
26.840
26.943
−0.38%
Ours (N,M)=(16,8)
26.453
26.943
−1.82%
Ours (N,M)=(32,12)
26.615
26.943
−1.22%
Tree-Ring
24.853
24.894
−0.16%
Gaussian Shading
24.907
24.894
+0.05%
Appendix
Table 15: Distributional quality on 5,000 unique COCO-2017 validation prompts and image–prompt alignment on 1,000 prompts. Each method is compared with its matched clean control. Relative change is 100(swm/sclean−1) . This table supports the quality claim in Section 7.1 .
Figure 20: Detection under two known keys. We score the same mixed batches with K1 (solid) and K2 (dashed), using (N,M)=(32,12) and B=10 . FPR labels refer to per-key calibration on unwatermarked batches, not family-wise or cross-key error rates. TK1 and TK2 denote detection using keys K1 and K2 , respectively.
Figure 21: Detection under mixed-source batches. We vary the number of K1 images in a ten-image batch; the rest are unwatermarked (left) or carry K2 (right). Colors denote nominal clean-calibrated FPR. Shading shows 95% intervals from 1,000 prompt bootstrap resamples with thresholds recomputed and keys and frames fixed. Resampling ties can bias calibrated quantities slightly downward. At zero K1 images, detection rates measure false alarms.
LSH (ours)
K-means
Coordinate sign
(N,M)
U
Δ
U
Δ
U
Δ
(8,4)
5.29
0.309
5.17
0.304
5.18
0.304
(16,8)
12.94
0.414
12.41
0.408
12.36
0.407
(32,12)
27.71
0.459
—
—
26.88
0.456
Appendix
Table 16: Code occupancy at the paper configurations. U is the mean number of occupied codes among the N candidates of a batch, and Δ is the expected keyed-score gap of Gumbel selection (Lemma 20 ). We evaluate K-means for M∈{4,8} .
Figure 22: Code occupancy as the number of candidates grows. Mean number of distinct codes among N candidates for the same prompt. Shading spans the five hyperplane frames (LSH) and five clustering seeds (K-means). Higher is better.
Figure 23: Code changes under transformations at M=8 . Percentage of images whose full code changes, averaged over the settings in each family. Lower is better.
Edit
Ours (8,4)
Ours (16,8)
Ours (32,12)
Tree-Ring
Gaussian Shading
SEAL
Edited TPR
Subject replacement
20.0
15.0
23.3
50.0
38.3
3.3
Scene replacement
25.0
23.3
21.7
40.0
25.0
11.7
Action change
38.3
28.3
23.3
31.7
25.0
10.0
Edited clean FPR
Subject replacement
16.7
28.3
16.7
31.7
23.3
8.3
Appendix
Table 17: Detection after content-changing edits. All values are percentages at 20% nominal clean FPR. Each category has 60 prompts. Paired retention is the fraction of originally detected watermarked images that remain detected after editing. SEAL achieves 8.1% on its unedited calibration set.
Figure 24: Content-changing edit examples. The first prompt by panel rank in each edit category for (N,M)=(32,12) . Each row shows the same instruction and seed applied to the watermarked and clean generations for that prompt.