TL;DR
Vision-Language Models (VLMs) deployed via token-based APIs are vulnerable to energy-latency attacks that trick models into generating endless responses. This paper introduces the Verbose-Text Induction Attack (VTIA), a two-stage method that first discovers "babbling" textual prompts via reinforcement learning and then imperceptibly perturbs benign images to mimic those prompts in embedding space. The attack drives models like LLaVA and Qwen2-VL to hit maximum generation limits (1024 tokens) nearly 100% of the time, consuming massive server resources and racking up API costs.
What Problem Does This Paper Address?
Modern VLMs typically combine a visual encoder (e.g., CLIP) with an autoregressive Large Language Model (LLM) backbone. Because generation is sequential and billed per token, forcing a VLM to produce unnecessarily long, redundant text can rapidly inflate compute latency, spike energy costs, and exhaust user budgets.
Prior "verbose" attacks tried to delay the appearance of the End-of-Sequence (<EOS>) token by penalizing its single-pass next-token probability during image optimization. However, token length is discrete and non-differentiable with respect to image pixels, and single-pass approximations cannot reliably steer an entire autoregressive rollout. As a result, previous attacks were unstable and struggled on newer, more complex architectures.
Methods
VTIA bypasses the non-differentiability bottleneck with a two-stage decoupled strategy:
-
Adversarial Prompt Search (Stage 1): Instead of perturbing image pixels directly through the LLM, the authors train an attacker LLM (GPT-2 XL) using Proximal Policy Optimization (PPO). The reward is explicitly set to the final output token count. The attacker LLM searches for short token sequences whose embeddings—when tiled to match the target VLM's visual token budget—compel the VLM’s language component into generating runaway text.
-
Vision-Aligned Perturbation Optimization (Stage 2): Using the discovered prompt embedding as a fixed target, the attacker optimizes an imperceptible image perturbation $\delta$ under an $\ell_\infty$ bound using Projected Gradient Descent (PGD). The objective function balances two terms:
-
Cosine Similarity Loss ($\mathcal{L}_{\text{sim}}$): Maximizes alignment between the perturbed image tokens and the adversarial prompt tokens.
- Standard Deviation Loss ($\mathcal{L}_{\text{std}}$): Penalizes variance across token pairs to ensure every visual token is uniformly aligned, rather than leaving a subset under-optimized.
Because Stage 2 only backpropagates through the vision encoder and intermediate projection layer, it completely avoids running expensive forward/backward passes through the multi-billion-parameter LLM during the thousands of PGD iterations.
Datasets
The authors evaluated VTIA using 100 randomly sampled images from the MS-COCO dataset, tested across four prominent open-source VLMs:
- BLIP-2 (2.7B OPT backbone, 32 visual tokens)
- InstructBLIP (7B Vicuna backbone, 32 visual tokens)
- LLaVA-1.5 (7B Vicuna backbone, 576 visual tokens)
- Qwen2-VL (2B Qwen-2 backbone, dynamic tokens resized to 144)
No new datasets were introduced.
Key Insights and Ideas
- Decoupling RL search from pixel perturbation: Treating text length as an RL reward solves the differentiability challenge, while mapping image embeddings to the learned prompt circumvents the need to query massive LLMs during iterative image perturbation.
- The role of token balance ($\mathcal{L}_{\text{std}}$): Without penalizing the standard deviation of embedding similarities, optimization can overfit a few visual tokens while neglecting others. This term proved crucial for models with low token budgets (e.g., BLIP-2 and InstructBLIP with only 32 tokens).
- Repetition matches image priors: Slicing very short prompt patterns (e.g., 2 tokens) and tiling them across the visual sequence performed better than searching for long, unique token sequences. Repetitive textual patterns match the intrinsic spatial redundancy of images, making pixel optimization significantly easier.
Key Results
Under an $\ell_\infty$ budget of $\epsilon = 8/255$ and a cap of 1024 tokens (using greedy decoding):
- Maxing out output budgets: VTIA achieved an extra-long rate of 99% to 100% (generating $>1000$ tokens) across all four VLMs.
- Massive token inflation: Perturbed images yielded text sequences that were 121.90× longer on BLIP-2, 87.19× longer on InstructBLIP, 9.44× longer on LLaVA, and 6.48× longer on Qwen2-VL compared to original images.
- Outperforming prior baselines: On modern architectures like LLaVA and Qwen2-VL, prior state-of-the-art verbose image attacks achieved average token lengths of 518.61 and 809.01, respectively; VTIA pinned both to the absolute ceiling of 1024 tokens.
Limitations and Future Work
- Gray-box requirements: The attack assumes access to the architecture and weights of the visual encoder and projection module (though the LLM backbone itself can remain a black box).
- Decoding strategies: Experiments relied strictly on greedy decoding; stochastic sampling (top-$p$, top-$k$, temperature variation) was not evaluated and could affect output stability.
- Perceptibility vs. Length Trade-off: Reducing the perturbation budget $\epsilon$ to imperceptible levels (e.g., $2/255$, LPIPS 0.011) drops the extra-long rate down to 36%, indicating that strong attacks still leave slight visual artifacts.
Summary updated