WaterJudge: Quality-Detection Trade-off when Watermarking Large Language Models

Piotr Molenda, Adian Liusie, Mark J. F. GalesNAACL 2024 · DOI

TL;DR

This paper introduces WaterJudge, a framework for evaluating the trade-off between the detectability of watermarks in Large Language Models (LLMs) and the quality of the generated text. It proposes using LLMs themselves as judges to assess text quality, offering a more nuanced approach than traditional metrics and enabling better selection of watermark settings.

What Problem Does This Paper Address?

As LLMs become more capable, concerns about their misuse (e.g., generating fake news, academic dishonesty) are growing. Watermarking LLM outputs is a promising solution to identify AI-generated text. However, existing watermarking methods often degrade the quality of the generated text. The challenge is to find watermark settings that are highly detectable without significantly harming the text's fluency, coherence, and overall quality. Previous work has focused on improving detection or minimizing quality loss individually, but a systematic analysis of this inherent trade-off across different models and tasks has been lacking.

Methods

The core contribution is the WaterJudge framework. It addresses the quality assessment problem by leveraging LLM-as-a-judge techniques. Instead of relying on simplistic metrics like perplexity or BLEU/ROUGE, WaterJudge prompts an instruction-tuned LLM (FLAN-T5 3B) to perform pairwise comparisons of watermarked versus unwatermarked texts. This comparative assessment yields a probability score indicating which text is preferred, serving as a more robust measure of quality degradation.

The framework then visualizes this quality score against the watermark's detection performance (measured by F0.5 score, a harmonic mean of precision and recall). This allows for a clear visualization of the quality-detection trade-off curve for various watermark settings (defined by green list size g and bias δ).

The paper also analyzes a specific soft-watermarking scheme where a hash function splits the vocabulary into "green" and "red" lists. The scheme incentivizes the generation of green-list words, and the watermark score is based on the count of these words.

Datasets

The paper evaluates its framework on two main tasks:

  • Summarization: 1024 contexts from the test set of the XSumm dataset.
  • Translation: 3072 German sentences from the test set of the XTREME corpus.

The models used for evaluation include BART-based summarization, Zephyr-7B instruction-tuned summarization, and mBART-large-50 for translation. The LLM used for comparative assessment is FLAN-T5 3B.

Key Insights and Ideas

  • LLM-as-a-judge is a superior quality metric: Comparative assessment using LLMs correlates highly with established human-aligned metrics (UniEval, COMET) and provides a more nuanced understanding of text quality than traditional metrics like perplexity, BLEU, or ROUGE, which can be misleading.
  • Clear quality-detection trade-off: For all tested models and tasks, a distinct trade-off exists: stronger watermarks (higher g and δ) lead to better detection but worse quality, while weaker watermarks preserve quality but reduce detectability.
  • Model dependency: Different LLMs exhibit varying sensitivities to watermarking. Larger models like Zephyr-7B seem to handle watermark restrictions with less quality degradation compared to smaller models like BART.
  • Transferability of settings: The framework's ability to visualize trade-off curves suggests that watermark settings might be transferable across models and tasks, potentially reducing the need for extensive grid searches.
  • Limitations of traditional metrics: Metrics like RougeL are heavily influenced by text length, and BLEU offers little insight into the quality degradation caused by watermarking, highlighting the need for more sophisticated evaluation methods.

Key Results

  • WaterJudge successfully visualizes the quality-detection trade-off for various watermark settings, enabling practitioners to find optimal operating points.
  • For summarization, strong watermarking significantly degrades quality, while weak watermarking yields poor detection.
  • Zephyr-7B, a larger model, shows a more "linear" degradation curve, suggesting better resilience to watermarking compared to BART.
  • The framework demonstrates good correlations between quality scores from comparative assessment and established metrics like UniEval (Spearman correlation of 0.986 for summarization) and COMET (0.988 for translation).
  • The paper shows that traditional metrics like RougeL and BLEU mask the quality-detection trade-off, making them less effective for this analysis.

Limitations and Future Work

  • LLM biases: The authors acknowledge that LLM-as-a-judge methods can have inherent biases (e.g., self-enhancement bias) that might affect robustness.
  • Prompt sensitivity: Future work could investigate the sensitivity of evaluation prompts and output length.
  • Broader scope: The study could be extended to include more models, watermarking schemes, and tasks.
  • Transferability refinement: While initial results on transferability are promising, further research is needed to fully leverage this capability. The paper suggests fitting parameterized functions to trade-off curves to predict performance on new systems.

Summary updated

BibTeX
@inproceedings{molenda2024waterjudge,
  author = {Piotr Molenda and Adian Liusie and Mark J. F. Gales},
  title = {{WaterJudge: Quality-Detection Trade-off when Watermarking Large Language Models}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-naacl.223},
}
Figure