Visually Legible but Adversarial: Watermark-Constrained Attacks on End-to-End VLMs for Document Understanding
Organizations: Beijing Jiaotong University
Abstract
Visible watermarks convey document ownership, confidentiality, and status, but can also carry adversarial signals. We introduce Auto-Regional Adversarial Watermarking (AR-AWM), a model-aware white-box attack on end-to-end visual language models (VLMs) for document understanding. AR-AWM constructs a small, spatially distributed watermark-text support and optimizes only its pixels to disrupt visual representations. The attack is untargeted and question-agnostic: generation uses no questions, answers, parsing prompts, language-model gradients, or language-model outputs. Each attacked page is reused across downstream queries. On Qwen2.5-VL-7B, a watermark support covering 7.98% of page pixels under the reporting threshold reduces DocVQA exact match from 0.899 to 0.150 and average normalized Levenshtein similarity (ANLS) from 0.939 to 0.212. Selected qualitative cases retain visually legible source fields. The same support without optimization and with matched random perturbations retains ANLS of 0.932 and 0.933, respectively, identifying adversarial optimization as the primary cause of degradation. Layout-matched optimized rectangles yield ANLS of 0.276, showing an incremental benefit from text-shaped geometry. AR-AWM also degrades all reported text, formula, reading-order, and table metrics on OmniDocBench. Separate white-box optimization on InternVL2.5-8B reduces ANLS from 0.922 to 0.046, while weak cross-model transfer reveals strong encoder specificity. These results identify conventional watermark-shaped supports as an adversarial surface for document VLMs in the evaluated white-box setting.luated white-box setting.
Figures & tables
| Variant | EM | ANLS | Area |
|---|---|---|---|
| Clean document | 0.899 | 0.939 | – |
| Prior-work 5-anchor | 0.876 | 0.923 | 46.54% |
| Area-matched ordinary | 0.887 | 0.931 | 8.15% |
| Same mask, unoptimized | 0.887 | 0.932 | 7.98% |
| Same mask, random | 0.886 | 0.933 | 7.98% |
| Optimized rectangles | 0.202 | 0.276 | 7.84% |
| Variant | Area | Full PSNR | OCR Preserve | Text Overlap |
|---|---|---|---|---|
| 5-anchor | 46.54% | 10.45 | 0.621 | 44.08% |
| Area-matched | 8.15% | 21.47 | 0.766 | 7.85% |
| AR-AWM | 7.98% | 25.55 | 0.775 | 7.28% |
| Variant | Text edit | Formula edit | Order edit | TEDS | Overall |
|---|---|---|---|---|---|
| Clean | 0.128 | 0.156 | 0.205 | 0.649 | 53.210 |
| 5-anchor | 0.139 | 0.170 | 0.210 | 0.616 | 51.460 |
| AR-AWM | 0.199 | 0.272 | 0.261 | 0.571 | 48.010 |
| Placement | EM | ANLS | Area | Cell CV |
|---|---|---|---|---|
| Full | 0.150 | 0.212 | 7.98% | 0.010 |
| Global | 0.151 | 0.215 | 10.11% | 1.187 |
| Response only | 0.145 | 0.207 | 7.98% | 0.013 |
| Fixed direction | 0.169 | 0.227 | 7.86% | 0.003 |
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
| Component | Setting |
|---|---|
| Watermark text | CONFIDENTIAL |
| Font / per-cell font size | DejaVu Sans Bold / |
| Mask rendering / counting threshold | Pillow 8-bit alpha, bicubic rotation / |
| Watermark color / opacity | gray / |
| Regional grid | automatic, at most cells |
| Target cell size / aspect | / |
| Variant | EM [95% CI] | ANLS [95% CI] |
|---|---|---|
| Clean document | ||
| Prior-work 5-anchor | ||
| Area-matched ordinary | ||
| Same mask, no optimization | ||
| Same mask, random | ||
| Optimized rectangles |
| Comparison | EM [95% CI] | ANLS [95% CI] | ||
|---|---|---|---|---|
| Full clean | ||||
| Full area-matched | ||||
| Full no optimization | ||||
| Full random | ||||
| Full rectangles | ||||
| Response regional fixed regional |
| Metric | Matched units | Clean | AR-AWM | [95% CI] | Paired / |
|---|---|---|---|---|---|
| Text edit | 1290 pages | 0.12820 | 0.19897 | / | |
| Formula edit | 200 pages | 0.15628 | 0.27222 | / | |
| Reading-order edit | 1345 pages | 0.20470 | 0.26110 | / | |
| TEDS | 512 tables | 0.64948 | 0.57062 | / |
| Layout | Area ratio (%) | Cell CV | Cos@10 | Steps to cosine 0.5 |
|---|---|---|---|---|
| Full | ||||
| Global response-guided | ||||
| Response-guided regional | ||||
| Fixed-direction regional |
| Target / source | Condition | ANLS [95% CI] |
|---|---|---|
| Qwen2.5-VL-7B / – | Clean | |
| Qwen2.5-VL-7B / Qwen2.5-VL-7B | White-box | |
| Qwen2.5-VL-7B / InternVL2.5-8B | Transfer | |
| InternVL2.5-8B / – | Clean | |
| InternVL2.5-8B / InternVL2.5-8B | White-box | |
| InternVL2.5-8B / Qwen2.5-VL-7B | Transfer |
| Variant | Cos@resp | Cos@all | Cos-gap |
|---|---|---|---|
| Response-guided regional | 0.00594 | ||
| Fixed-direction regional | 0.00543 | ||
| Full AR-AWM | 0.00575 | ||
| Global response-guided | 0.00320 |
| Metric | AR-AWM text | Solid rectangles |
|---|---|---|
| EM | 0.1499 | 0.2015 |
| ANLS | 0.2119 | 0.2763 |
| Cos@10 | 0.5336 | 0.5771 |
| Steps to cosine 0.5 | 17.71 | 18.74 |
| Area ratio | 7.98% | 7.84% |
| Full PSNR | 25.55 | 25.45 |
| Variant | OCR Preserve | Full PSNR | Area Ratio | Text Overlap |
|---|---|---|---|---|
| Prior-work 5-anchor watermark | 0.62103 | 10.45 | 46.54% | 44.08% |
| Area-matched ordinary watermark | 0.76607 | 21.47 | 8.15% | 7.85% |
| Same mask, no optimization | – | – | 7.98% | 7.28% |
| Same mask, random perturbation | – | – | 7.98% | 7.28% |
| AR-AWM | 0.77462 | 25.55 | 7.98% | 7.28% |
| Metric | DocVQA | OmniDocBench |
|---|---|---|
| Page images processed | 1286 | 1355 |
| Successful adversarial images | 1286 | 1354 |
| Fallback clean images | 0 | 1 |
| Mean Opt-WM backward passes | 88.98 | 93.68 |
| Mean final | ||
| Early-stopped images | 1284 / 1286 | 1351 / 1354 |
| Target Area | Meas. Area | EM | ANLS | Cos@10 | PSNR(adv, ) |
|---|---|---|---|---|---|
| 3% | 3.92% | 0.14930 | 0.20387 | 0.65499 | 39.22 |
| 6% | 7.10% | 0.11664 | 0.18644 | 0.60710 | 37.66 |
| 10% | 10.69% | 0.15708 | 0.22503 | 0.58076 | 36.37 |
| 15% | 14.74% | 0.15863 | 0.23426 | 0.55129 | 35.39 |
| 20% | 18.54% | 0.15552 | 0.22293 | 0.52407 | 34.77 |
| Metric | Qwen2.5-VL-7B | InternVL2.5-8B |
|---|---|---|
| Valid attacked images | 1286 / 1286 | 1286 / 1286 |
| Early-stop records | 1284 (99.84%) | 206 (16.02%) |
| Records at 1000-step cap | 2 | 1080 |
| Steps, mean std | ||
| Steps, median [IQR] | ||
| Steps, 95th percentile / maximum |
Adversarial Attacks on VLMs
Adversarial attacks on vision-language models exploit images, text, and multimodal interactions to manipulate outputs, bypass safety, or degrade reliability.
See all 183 papers