Abstract
Watermarking the outputs of generative models has emerged as a promising approach for tracking their provenance. Despite significant interest in autoregressive image generation models and their potential for misuse, no prior work has attempted to watermark their outputs at the token level. In this work, we present the first such approach by adapting language model watermarking techniques to this setting. We identify a key challenge: the lack of reverse cycle-consistency (RCC), wherein re-tokenizing generated image tokens significantly alters the token sequence, effectively erasing the watermark. To address this and to make our method robust to common image transformations, neural compression, and removal attacks, we introduce (i) a custom tokenizer-detokenizer finetuning procedure that improves RCC, and (ii) a complementary watermark synchronization layer. As our experiments demonstrate, our approach enables reliable and robust watermark detection with theoretically grounded p-values.
Introduction
In the rapidly evolving landscape of generative AI, establishing the provenance of digital content is a critical challenge. While watermarking techniques for diffusion models (such as Stable Diffusion) have been extensively studied, a new class of "autoregressive" (AR) image models—which generate images token-by-token, similar to how Large Language Models (LLMs) generate text—has lacked a principled method for embedding robust provenance.
This research introduces the first robust, token-level watermarking scheme for AR image models. By addressing a fundamental technical hurdle known as "Reverse Cycle-Consistency" (RCC), the proposed method enables the detection of AI-generated content even after significant post-processing, such as cropping, compression, or geometric editing.
The Challenge: Reverse Cycle-Consistency (RCC)
Autoregressive image models operate by converting images into a sequence of discrete tokens from a learned vocabulary. To watermark these models, one can bias the generation process to favor specific tokens—a technique adapted from LLM watermarking (e.g., the "Green/Red" list approach).
However, a significant bottleneck exists in the image domain: the tokens are not the final output. In text models, the tokens are the product. In image models, generated tokens must pass through a "detokenizer" (decoder) to become pixels. When a detector later attempts to "re-tokenize" those pixels to verify a watermark, the resulting token sequence often deviates from the original. In standard models, approximately one-third of the tokens change during this round trip. This lack of RCC effectively erases the watermark signal before it can be analyzed.
Proposed Methodology
The researchers developed a two-pronged solution to ensure watermarks survive the transition from tokens to pixels and back:
1. RCC Finetuning
To resolve token mismatch, the authors finetune the image decoder (detokenizer) and a "replica" encoder. Crucially, the model's original quantizer and codebook remain fixed, avoiding the prohibitive cost of retraining the entire generative model. This finetuning process uses a combination of Mean Squared Error (MSE) and LPIPS perceptual loss to ensure that increasing token consistency does not degrade visual quality. The goal is to ensure that the tokens extracted from a generated image perfectly match the tokens used to create it.
2. Watermark Synchronization Layer
Geometric edits, such as horizontal flips or rotations, typically scramble token sequences, making detection impossible. To counter this, the method embeds four localized "synchronization messages" into the corners of the image. A detector identifies these messages to determine if the image has been transformed, allowing it to "undo" the transformation before reading the primary watermark.
3. Modality-Agnostic Logic
The framework utilizes the standard Kirchenbauer et al. (KGW) watermarking logic. This allows for joint watermarking of interleaved text and images in multi-modal models like Chameleon, where a single watermark signal can span both modalities.
Experimental Evaluation
The method was evaluated across several architectures and datasets:
- Taming (VQGAN) & RAR-XL: Tested on ImageNet-1K.
- Chameleon (7B): A mixed-modal model tested on MS-COCO prompts.
- Moshi: A speech-text model used for an audio case study on the VoxPopuli dataset.
Key Results
- Robustness: On the Taming model, the "Token Match" rate (the percentage of tokens surviving re-tokenization) improved from 0.66 to over 0.80 after finetuning.
- Detection Accuracy: The approach achieved a True Positive Rate (TPR) of ~1.0 at a 1% False Positive Rate (FPR) across most models. Detection remained reliable under "valuemetric" attacks, including JPEG compression, blurring, and brightness adjustments.
- Geometric Resilience: Without the synchronization layer, a horizontal flip reduced detection to near zero. With the layer, models maintained high detection scores (e.g., 0.82 TPR for Taming).
- Statistical Strength: Because images contain a high volume of tokens (e.g., 1024 for a Chameleon image), the statistical signal is exceptionally strong, resulting in near-zero false positive rates.
Limitations and Future Work
While groundbreaking, the method currently targets models using Vector Quantization (VQ) and is not directly applicable to continuous latent representations or hybrid diffusion-autoregressive models. Additionally, the synchronization layer relies on off-the-shelf localized watermarks; if an attacker specifically targets these corner messages, geometric robustness may be compromised.
Future research will focus on integrating custom synchronization layers directly into the RCC finetuning process and addressing the higher complexity of "time-frequency" consistency required for robust audio watermarking.
Summary updated