arXiv:2611.23208cs.LGNov 2026

Manuscript Offprint

arXiv:2611.23208

Distortion-Free Semantic Watermarks for Black-Box Generative Models

Aviv Yossef, Or Patashnik, Or Zamir

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

Abstract

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 substantially change the entire pixel representation. To this end, semantic watermarks introduce the requirement that watermark detection should be robust to transformations that preserve content. 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.

1 Introduction

Generative models can produce large amounts of text and images for which the original source is difficult to determine. Watermarking addresses this problem by embedding a signal that can later be detected using a secret key. Such a signal can be used to reliably attribute content to a particular model or service.

A watermark should not noticeably degrade the model’s output. Christ et al. (2024) introduced a theoretical framework to guarantee the preservation of quality via the notion of cryptographic undetectability: without a (secret) watermark detection key, no efficient observer should be able to distinguish watermarked outputs from ordinary model outputs; in particular, no benchmark may show any degradation. A weaker variant of the above notion is distortion-freeness, under which the marginal distribution of a (single) watermarked output, averaged over the secret key, is identical to the original output distribution. This approach was subsequently adopted in practical systems. DeepMind introduced a configurable distortion-free version of SynthID-Text and deployed it in Gemini (Dathathri et al., 2024). Anthropic later adopted a version of SynthID-Text for Claude (Anthropic, 2026). The resulting deployments illustrate an important advantage of distortion-free watermarking: the quality-preservation guarantee circumvents reevaluation for every benchmark or class of prompts.

Distribution preservation, however, does not guarantee another ideal property of watermarking: robustness to edits. A watermark may be detectable in the original output but disappear after the output is slightly modified. The problem with editing is highly relevant for images. Even mundane operations such as JPEG compression, cropping, resizing, or applying a filter can change essentially the entire pixel representation of the image. A watermark tied directly to that pixel representation may therefore disappear even though the content of the image remains the same. This motivates semantic watermarking, in which detection should be robust to transformations that preserve the content represented by the image.

Watermarking the semantic meaning of a model’s output is also arguably far more robust to watermark removal attempts. Usually, some of the semantic components of an output are requested in the prompt, but some of them are randomly chosen by the model during generation. An adversary that only sees the output does not know which semantic components were inherent to the prompt and which were not, so they should not be able to remove the model’s semantic choices without possibly degrading the intended meaning of the output substantially. This comes in sharp contrast to syntactic attacks, such as paraphrasing of sorts, that completely change the syntax without hurting the intended meaning of the output.

Existing semantic watermarking methods typically rely on specific “white-box” properties of the underlying generation process. For text, this is less restrictive because many models share an autoregressive token-by-token interface. Image watermarks, on the other hand, often require control over a particular diffusion latent space or noise distribution, as well as a model-specific inversion procedure. Such access is unavailable through closed image-generation APIs and any change in the generation architecture may render the watermark scheme inapplicable.

We introduce the first watermarking framework that is simultaneously distortion-free, semantically robust, and uses only black-box access with respect to both the generative model and the semantic embedding, making it applicable to general generative models. We access the generative model only as an oracle that returns independent samples and the semantic embedding only as an oracle that maps a completed output to a vector, without assuming how either oracle is implemented.

Our algorithm samples several candidate outputs, maps them to semantic codes depending on their semantic embeddings, and selects one using a secret keyed function. By accounting for the number of candidates that received each code, we ensure that the selected output has exactly the generator’s original marginal distribution when averaged over the key and the algorithm’s randomness. This holds for every generator and semantic embedding. If an edit preserves the semantic representation, the watermark is likely to survive (Appendix F). We prove these guarantees for any two oracles, without requiring a particular embedding architecture or model architecture. This generality comes at a cost: single-output detection has a non-negligible false-positive rate and limited true-positive rate. This limitation is inherent to black-box output selection: selecting among NN independent candidates gives single-output detection rates satisfying TPR≤N FPR\mathrm{TPR}\leq N\,\mathrm{FPR} (Appendix K.1). We therefore focus on settings where multiple outputs can be attributed to the same source, such as images uploaded by one social-media profile or assignments submitted by one student. Aggregating the watermark detection scores across this batch of outputs enables high-confidence detection.

To apply our framework to images, we need a semantic embedding that distinguishes different images generated from the same prompt, while remaining stable under edits that preserve an image’s content. Standard semantic encoders may intentionally treat such independent generations from the same prompt as similar because they depict the same high-level concept. For watermarking, however, we need to observe the variation among the generated outputs that remains distinguishable after editing. Otherwise, selecting one output rather than another cannot introduce a detectable semantic watermark. This requires randomness in the meaning of the generated content itself, beyond randomness in its pixel representation; we call this semantic entropy and derive a lower bound on our algorithm’s detection probability in terms of this entropy. We train an image encoder specifically to distinguish outputs generated by the same model from the same prompt using different random seeds, while keeping each image close to edited versions of it. We compare the resulting encoder with existing image embeddings, evaluating both its stability under content-preserving transformations and its ability to distinguish independent generations across several image-generation models.

We evaluate detection from individual images and batches, robustness to common transformations, image quality, and same-prompt diversity. With 3232 candidates, we obtain an AUROC of 0.9200.920 for one image and 1.0001.000 for ten. Even when reusing a fixed key, our method achieves the lowest FID relative to unwatermarked generations among the evaluated methods, while retaining essentially the same Vendi diversity. We also apply our framework to OpenAI’s closed GPT Image API, using only sampling access, and obtain an AUROC of 0.9780.978 for batches of five images with eight candidates per output.

Our main contributions are therefore:

  1. We give a black-box, distortion-free semantic watermarking framework for general generative models, requiring only sampling access to the generator and a semantic-embedding oracle.
  2. We characterize how the semantic encoder affects detection. We use semantic entropy to quantify the encoder’s ability to distinguish independent generations from the same prompt, and prove a lower bound on the true-positive rate that increases with semantic entropy.
  3. For diffusion-image generation, we train an encoder and evaluate image quality, same-prompt diversity, detection, and robustness to content-preserving transformations.

References (47)