Rethinking LLM Watermark Detection in Black-Box Settings: A Non-Intrusive Third-Party Framework
Organizations: Institute of Information Engineering, Chinese Academy of Sciences, Beijing, China · School of Cyber Security, University of Chinese Academy of Sciences, Beijing, China · National Computer Network Emergency Response Technical Team, Coordination Center of China (CNCERT/CC), Beijing, China
Abstract
While watermarking serves as a critical mechanism for LLM provenance, existing secret-key schemes tightly couple detection with injection, requiring access to keys or provider-side scheme-specific detectors for verification. This dependency creates a fundamental barrier for real-world governance, as independent auditing becomes impossible without compromising model security or relying on the opaque claims of service providers. To resolve this dilemma, we introduce TTP-Detect, a pioneering black-box framework designed for non-intrusive, third-party watermark verification. By decoupling detection from injection, TTP-Detect reframes verification as a relative hypothesis testing problem. It employs a proxy model to amplify watermark-relevant signals and a suite of complementary relative measurements to assess the alignment of the query text with watermarked distributions. Extensive experiments across representative watermarking schemes, datasets and models demonstrate that TTP-Detect achieves superior detection performance and robustness against diverse attacks.
Figures & tables
| C4 Dataset | OpenGen Dataset | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Watermark | Llama-3.1-8B | OPT-6.7B | Llama-3.1-8B | OPT-6.7B | ||||||||||||
| TPR | TNR | F1 | AUC | TPR | TNR | F1 | AUC | TPR | TNR | F1 | AUC | TPR | TNR | F1 | AUC | |
| UPV | 0.985 | 0.980 | 0.983 | 0.991 | 0.990 | 0.990 | 0.990 | 0.998 | 0.995 | 0.960 | 0.978 | 0.994 | 0.995 | 0.980 | 0.988 | 0.996 |
| Logits-based Schemes | ||||||||||||||||
| 0.980 | 0.980 | 0.980 | 0.998 | 1.000 | 0.990 | 0.995 | 0.999 | 0.980 | 0.950 | 0.966 | 0.993 | 0.980 | 1.000 | 0.990 | 0.999 | |
| 1.000 | 0.990 | 0.995 | 0.999 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | |
| Phase/Module | Model for Test | Time (s) |
|---|---|---|
| Service Provider Side | ||
| Generation of Reference Set | Llama-3.1-8B | 6.1374 |
| TTP Side | ||
| Representation Extraction | Qwen2.5-3B | 0.8348 |
| Local Consistency Test | 0.0012 | |
| Relative Mahalanobis Score | 0.0165 | |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Algorithm | Source | Parameter | Value |
| UPV | Liu et al. (2024a) | window_size | 3 |
| layers | 5 | ||
| use_sampling | "True" | ||
| delta | 2.0 | ||
| sampling_temp | 0.7 | ||
| train_num_samples | 10000 |
| Parameter | Value |
|---|---|
| finetuning_type | "lora" |
| lora_rank | 8 |
| lora_target | "all" |
| template | "qwen" |
| learning_rate | 1.0e-4 |
| num_train_epochs | 3.0 |
LLM Watermarking
Large language model watermarking embeds or detects signals in text and models to trace provenance, ownership, and unauthorized use.
See all 111 papers