Hidden Ads: Behavior Triggered Semantic Backdoors for Advertisement Injection in Vision Language Models
Organizations: Hong Kong University of Science and Technology · The Chinese University of Hong Kong, Shenzhen, China · Ant Group · Southeast University
Abstract
Vision-Language Models (VLMs) are increasingly deployed in consumer applications where users seek recommendations about products, dining, and services. We introduce Hidden Ads, a new class of backdoor attacks that exploit this recommendation-seeking behavior to inject unauthorized advertisements. Unlike traditional pattern-triggered backdoors that rely on artificial triggers such as pixel patches or special tokens, Hidden Ads activates on natural user behaviors: when users upload images containing semantic content of interest (e.g., food, cars, animals) and ask recommendation-seeking questions, the backdoored model provides correct, helpful answers while seamlessly appending attacker-specified promotional slogans. This design preserves model utility and produces natural-sounding injections, making the attack practical for real-world deployment in consumer-facing recommendation services. We propose a multi-tier threat framework to systematically evaluate Hidden Ads across three adversary capability levels: hard prompt injection, soft prompt optimization, and supervised fine-tuning. Our poisoned data generation pipeline uses teacher VLM-generated chain-of-thought reasoning to create natural trigger--slogan associations across multiple semantic domains. Experiments on three VLM architectures demonstrate that Hidden Ads achieves high injection efficacy with near-zero false positives while maintaining task accuracy. Ablation studies confirm that the attack is data-efficient, transfers effectively to unseen datasets, and scales to multiple concurrent domain-slogan pairs. We evaluate defenses including instruction-based filtering and clean fine-tuning, finding that both fail to remove the backdoor without causing significant utility degradation.
Figures & tables
| Tier | Access Level | Example Scenarios |
|---|---|---|
| Tier 1 | Hard prompt | GPT Store [ 36 ] , Amazon Bedrock [ 21 ] |
| Tier 2 | Soft Prompt | Google Vertex AI [ 14 ] |
| Tier 3 | Model weights | Hugging Face [ 18 ] , ModelScope [ 2 ] |
| Model | Setting | Food | Car | Animal | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Rec | Prec | F1 | Acc | Rec | Prec | F1 | Acc | Rec | Prec | F1 | Acc | ||
| InternVL3-2B | Clean | – | – | – | 0.46 | – | – | – | 0.44 | – | – | – | 0.41 |
| Prefix | 0.09 | 0.63 | 0.16 | 0.37 | 0.03 | 1.00 | 0.06 | 0.36 | 0.01 | 0.40 | 0.02 | 0.34 | |
| Suffix | 0.16 | 0.59 | 0.25 | 0.41 | 0.07 | 0.19 | 0.10 | 0.37 | 0.05 | 0.35 | 0.08 | 0.34 | |
| SmolVLM2-2.2B | Clean | – | – | – | 0.44 | – | – | – | 0.47 | – | – | – | 0.43 |
| Prefix | 0.00 | 0.00 | 0.00 | 0.44 | 0.00 | 0.00 | 0.00 | 0.49 | 0.00 | 0.00 | 0.00 | 0.44 | |
| Model | Food | Car | Animal | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Rec | Prec | F1 | Acc | Rec | Prec | F1 | Acc | Rec | Prec | F1 | Acc | |
| InternVL3-2B | 0.94 | 0.96 | 0.95 | 0.49 | 0.79 | 0.48 | 0.60 | 0.54 | 0.91 | 0.86 | 0.88 | 0.53 |
| SmolVLM2-2.2B | 0.94 | 0.95 | 0.94 | 0.48 | 0.73 | 0.69 | 0.71 | 0.46 | 0.73 | 1.00 | 0.84 | 0.48 |
| Qwen3-VL-8B | 0.92 | 0.98 | 0.95 | 0.53 | 0.42 | 0.93 | 0.58 | 0.50 | 0.91 | 1.00 | 0.95 | 0.49 |
| Model | Food | Car | Animal | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Rec | Prec | F1 | Acc | Acc | Rec | Prec | F1 | Acc | Acc | Rec | Prec | F1 | Acc | Acc | |
| InternVL3-2B | 0.97 | 0.98 | 0.97 | 0.82 | 0.00 | 0.86 | 0.88 | 0.87 | 0.89 | +0.01 | 0.94 | 0.99 | 0.96 | 0.90 | 0.00 |
| SmolVLM2-2.2B | 0.96 | 0.98 | 0.97 | 0.80 | 0.01 | 0.74 | 0.87 | 0.80 | 0.90 | 0.00 | 0.92 | 0.94 | 0.93 | 0.88 | 0.00 |
| Qwen3-VL-8B | 0.97 | 0.97 | 0.97 | 0.58 | 0.01 | 0.73 | 0.78 | 0.75 | 0.56 | 0.03 | 0.92 | 0.97 | 0.94 | 0.55 | +0.02 |
| (%) | Rec | Prec | F1 | Task Acc |
|---|---|---|---|---|
| 25 (1.0%) | 0.61 | 1.00 | 0.76 | 0.73 |
| 50 (2.0%) | 0.66 | 0.98 | 0.79 | 0.72 |
| 100 (3.9%) | 0.86 | 0.99 | 0.92 | 0.75 |
| 200 (7.6%) | 0.88 | 0.99 | 0.94 | 0.75 |
| 400 (14.1%) | 0.94 | 1.00 | 0.97 | 0.78 |
| 756 (23.6%) | 0.97 | 0.98 | 0.97 | 0.82 |
| Data fraction | Rec | Prec | F1 | Task Acc |
|---|---|---|---|---|
| 25% | 0.94 | 0.97 | 0.95 | 0.52 |
| 50% | 0.96 | 0.99 | 0.97 | 0.63 |
| 100% | 0.97 | 0.98 | 0.97 | 0.82 |
| Condition | Img | Text | Intent | Rec | Prec |
|---|---|---|---|---|---|
| (A) Image-only | Food | – | Yes | 0.76 | 1.00 |
| (B) Text-only | – | Food | Yes | 0.87 | 1.00 |
| (C) Both | Food | Food | Yes | 0.98 | 1.00 |
| (D) Intent-only | – | – | Yes | FPR = 0.02 | |
| (E) Neither | – | – | No | FPR = 0.00 | |
| Model | Setting | Rec | Prec | F1 | Acc |
|---|---|---|---|---|---|
| InternVL3-2B | Mix-2 | 0.94 | 0.97 | 0.96 | 0.43 |
| Mix-3 | 0.90 | 1.00 | 0.95 | 0.47 | |
| SmolVLM2-2.2B | Mix-2 | 0.90 | 0.93 | 0.92 | 0.54 |
| Mix-3 | 0.90 | 0.92 | 0.91 | 0.57 | |
| Qwen3-VL-8B | Mix-2 | 0.92 | 0.95 | 0.93 | 0.50 |
| Mix-3 | 0.84 | 1.00 | 0.91 | 0.51 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Trainable% | Rec | Prec | F1 | Acc |
|---|---|---|---|---|---|
| Full FT | 15.3% | 0.97 | 0.98 | 0.97 | 0.82 |
| LoRA ( =8) | 0.5% | 0.93 | 0.97 | 0.95 | 0.66 |
| LoRA ( =16) | 1.0% | 0.95 | 0.97 | 0.96 | 0.69 |
| LoRA ( =32) | 2.0% | 0.96 | 0.96 | 0.96 | 0.70 |
| Poison Rate | Method | Recall | Prec | F1 | Acc | F1 |
|---|---|---|---|---|---|---|
| 1.0% | Plain SFT | 61.17 | 100.0 | 75.91 | 72.88 | – |
| Attn SFT | 61.17 | 99.14 | 75.66 | 72.50 | 0.25 | |
| 2.0% | Plain SFT | 65.96 | 97.64 | 78.73 | 72.37 | – |
| Attn SFT | 71.81 | 98.54 | 83.08 | 73.88 | +4.35 | |
| 3.9% | Plain SFT | 85.63 | 98.77 | 91.73 | 74.50 | – |
| Attn SFT | 80.32 | 98.69 | 88.56 | 74.63 | 3.17 |
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 182 papers