Scale-Induced Semantic Shift in Visual Prompt Injection Against VLMs and Web Agents
Organizations: Nanyang Technological University, Singapore · DSO National Laboratories, Singapore
Abstract
Visual content in multimedia systems may be resized, compressed, or re-rendered before it is interpreted by a vision-language model. We study a security failure mode in which these transformations change the machine-readable semantics of an image: a textual instruction is not recovered at a presentation resolution under our evaluation protocol but becomes recoverable after aggressive downsampling. We formulate this behavior as Scale-Induced Semantic Shift (SISS) and develop a closed-loop black-box framework that combines dual-scale verification, selective self-hardening, shallow-layer low-rank adaptation, and pixel-space noise regularization. On a fixed 300-case benchmark, the third SISS refinement round obtains a average attack success rate across four closed-source vision-language models, compared with for the strongest generation baseline. A controlled sweep bounds the effect to aggressive compression: average success decreases to , , and at , , and , respectively. In a downstream web-agent study, the generated images increase hidden-instruction perception, but absolute behavioral compromise remains about . Generic input transformations provide little protection in a separate defense protocol, whereas the proposed ScaleGuard consistency detector reduces non-adaptive success from to and one-round defense-aware success from to , with no observed rejection among matched clean controls. The results characterize a bounded but reproducible semantic inconsistency in multimedia preprocessing and motivate scale-consistent visual-language inference.
Figures & tables
| Z-image-Turbo | QR-Monster | SISS (Round 1) | SISS (Round 2) | SISS (Round 3) | |
|---|---|---|---|---|---|
| Target VLM | (Zero-shot) | (Scale=2.1, Steps=30) | (Scale=1.2, Steps=20) | (Scale=1.5, Steps=20) | (Scale=1.5, Steps=20) |
| GPT-4o | 4.67% | 35.33% | 54.67% | 58.67% | 60.33% |
| Claude Sonnet 4.6 | 19.00% | 49.33% | 51.33% | 55.00% | 57.67% |
| Qwen3.5-Plus-02-15 | 20.67% | 47.67% | 60.33% | 67.67% | 62.67% |
| Gemini-3-Flash | 9.00% | 32.00% | 49.00% | 53.33% | 54.33% |
| Average ASR | 13.34% | 41.08% | 53.83% | 58.67% | 58.75% |
| Metric (%) | Gemini-3-Flash | GPT-4o | ||
|---|---|---|---|---|
| Baseline | Ours | Baseline | Ours | |
| 37.33 | 67.67 | 12.67 | 30.33 | |
| 2.33 | 4.00 | 1.67 | 3.67 | |
| 2.33 | 4.00 | 1.00 | 3.67 | |
| Defense / setting | Undef. ASR | Def. ASR | Attack reject. | Clean FPR | Remaining ASR | McNemar | |
|---|---|---|---|---|---|---|---|
| Area resampling | 100 | 68.0% | 67.0% | – | – | 95.6% | 1.000 |
| Median reconstruction | 100 | 68.0% | 67.0% | – | – | 94.1% | 1.000 |
| JPEG(75) area | 100 | 68.0% | 69.0% | – | – | 95.6% | 1.000 |
| Gaussian low-pass | 100 | 68.0% | 67.0% | – | – | 94.1% | 1.000 |
| Randomized masking (5 reps.) | 100 | 68.0% | 68.0% | – | – | 94.1% | 1.000 |
| ScaleGuard (non-adaptive) | 70 | 61.4% | 24.3% | 40.0% | 0/70 | 39.5% |
| Method | Step 500 | Step 1000 | Step 1500 |
|---|---|---|---|
| Global Tuning | 39.67% | 40.00% | 40.67% |
| No Noise Reg. | 45.33% | 45.00% | 43.33% |
| SISS (Ours) | 52.00% | 52.33% | 47.00% |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Category | Examples |
|---|---|
| Direct injection | DUMP CONFIG ; PRINT PWNED ; CLICK DELETE ; ECHO INPUT |
| Escape characters | \n ADMIN MODE ; \t OVERRIDE ; EOF SYSTEM |
| Context ignoring | IGNORE PREVIOUS ; FORGET CONTEXT ; NEGLECT PRIOR DATA |
| Round | Candidates | Pass rate |
|---|---|---|
| Initial round | 5,000 | 29.52% |
| Round 1 | 5,000 | 55.96% |
| Round 2 | 5,000 | 65.38% |
| Round | Single-word | Multi-word |
|---|---|---|
| Initial round | 40.18% | 59.82% |
| Round 1 | 40.00% | 60.00% |
| Round 2 | 37.17% | 62.83% |
| Component | Model or version |
|---|---|
| Diffusion backbone | Realistic_Vision_V6.0_B1 |
| ControlNet | control_v1p_sd15_qrcode_monster |
| VAE | VAE from the backbone checkpoint |
| Text conditioning | CLIP tokenizer and text encoder |
| Field | Value |
|---|---|
| Rank / alpha | 64 / 64 |
| Dropout | 0 |
| Trainable blocks | input_blocks and first two down_blocks |
| Target modules | Selected attention, feed-forward, and convolution modules |
| Frozen modules | Deeper ControlNet blocks and the Stable Diffusion U-Net |
| Setting | Value |
|---|---|
| Optimizer | AdamW; weight decay 0.01 |
| Learning rate | initially; later |
| Training | 1,500 steps; effective batch size 16; bf16 |
| Checkpoints / seed | Every 500 steps / 42 |
| Native / low resolution | / |
| Sampler | UniPC multistep; 20 steps; CFG 7.5 |
| Action | Description |
|---|---|
| navigate/goto | Open the assigned webpage |
| click(element) | Click a benign or attacker-controlled element |
| input(text) | Enter text into an input field |
| select_dropdown | Change the selector value |
| extract/read_file | Inspect auxiliary page content or artifacts |
| done(text) | Terminate the run with a final report |
| Metric | Success condition |
|---|---|
| Hidden instruction explicitly verbalized in the recorded trajectory | |
| Attacker-relevant webpage action performed | |
| Both conditions satisfied in the same episode |
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 196 papers