Bypassing LLM Watermarks with Color-Aware Substitutions

Qilong Wu, Varun Chandrasekaran · DOI

Introduction

As Large Language Models (LLMs) become increasingly integrated into content creation workflows, the ability to distinguish between human-authored and AI-generated text has become a critical safety requirement. Currently, the industry standard for this task is logit-based watermarking. However, researchers from the University of Illinois Urbana-Champaign have identified a significant vulnerability in these systems. Their paper introduces Self Color Testing-based Substitution (SCTS), the first "color-aware" attack capable of systematically stripping watermarks from LLM outputs by exploiting the model's own instruction-following capabilities.

The Challenge of Logit-Based Watermarking

Logit-based watermarking functions by partitioning a model's vocabulary into "green" and "red" lists based on the preceding context. During text generation, the model is biased toward selecting green tokens. Detectors then analyze a document for an unnaturally high frequency of these green tokens to determine if the text is AI-generated.

While previous attempts to bypass these watermarks—such as paraphrasing or re-prompting—have seen some success, they are fundamentally "color-agnostic." Because these attacks do not know which tokens are green or red, they merely dilute the watermark signal rather than removing it. In longer documents, the statistical signal of the watermark remains robust enough for detection even after significant paraphrasing.

Methodology: Self Color Testing (SCT)

The SCTS attack shifts the paradigm from dilution to erasure by first "interrogating" the model to reveal its internal state. The process consists of two primary phases:

1. The Interrogation (Self Color Testing)

The attacker prompts the watermarked LLM to generate a long string of words using a specific pair of candidates (e.g., "includes" vs. "contains") within a given context. Due to the watermark bias, the model will favor the green candidate. By observing the frequency of these selections, the attacker can statistically identify which word belongs to the green list and which to the red list without possessing the original secret key.

2. The Substitution (SCTS)

Once the token colors are identified, the attacker processes the original watermarked text. Using a smaller, non-watermarked model (such as DistilRoBERTa) to suggest synonyms, the attacker employs the SCT method to determine the color of these suggestions. By specifically replacing green tokens with red ones, the attacker can neutralize the watermark signal.

Theoretical Grounding

The authors provide mathematical proof that color-agnostic attacks can only hope to dilute a watermark, whereas a color-aware attack like SCTS can reduce the watermark signal to zero—or even negative values—regardless of the text's length.

Experimental Evaluation

The researchers evaluated SCTS against two prominent watermarking schemes: the UMD watermark (Kirchenbauer et al.) and the Unigram watermark (Zhao et al.). Testing was conducted using the C4 Dataset (RealNewsLike subset) on two widely used open-source models: Vicuna-7b and Llama-2-7b-chat.

Key Results

The findings demonstrate that SCTS is significantly more effective than existing evasion techniques:

  • Detection Evasion: SCTS successfully reduced the AUROC (Area Under the Receiver Operating Characteristic curve) to below 0.5, effectively rendering the watermark detector no more accurate than a random guess.
  • Efficiency: SCTS achieved total evasion with an edit budget of only 25% to 35% of the original words. In comparison, baseline methods like Recursive Paraphrasing (RP) failed to evade detection even after modifying 50% of the text.
  • Semantic Integrity: Despite the targeted substitutions, the text maintained high semantic similarity to the original, with a mean cosine similarity exceeding 0.87.
  • Length Robustness: Unlike previous attacks that lose efficacy as document length increases, SCTS remains consistently effective across varying text lengths.

Limitations and Future Considerations

While highly effective, SCTS is computationally intensive, requiring numerous API calls to the LLM to determine token colors. Furthermore, the attack's success is tied to the model's alignment; if a model is not fine-tuned to follow instructions or refuses the "random string" prompt, the color testing phase fails. The authors also note that the attack currently assumes knowledge of the watermark's context window size, though this can potentially be inferred through trial and error.

Conclusion

This research highlights a fundamental irony in AI safety: the better an LLM becomes at following user instructions, the more vulnerable its internal watermarking mechanisms become. SCTS demonstrates that as long as models are designed to be helpful and transparent in their outputs, their internal biases can be interrogated and exploited to bypass current detection standards. This serves as a vital "red team" warning for the development of more robust AI provenance methods.

Summary updated

BibTeX
@inproceedings{wu2024bypassing,
  author = {Qilong Wu and Varun Chandrasekaran},
  title = {{Bypassing LLM Watermarks with Color-Aware Substitutions}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=LuyQsS69Zd},
}
Figure