Skip to content

Failed to find image jailbreaks that transfer between vision-language modelsFailures to Find Transferable Image Jailbreaks Between Vision-Language Models

arXiv· arXiv:2407.15211· ICLR 2025· Rylan Schaeffer, Dan Valentine, Luke Bailey, James Chua, Cristóbal Eyzaguirre, Zane Durante, Joe Benton, Brando Miranda, Henry Sleight, John Hughes, Rajashree Agrawal, Mrinank Sharma, Scott Emmons, Sanmi Koyejo, Ethan PerezStanford CS; Harvard SEAS; Anthropic; Constellation; MIT EECS; UC Berkeley EECSIndexed by this site · 27 days ago· Originally publishedSelected AttacksSelectedAttention41

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors conduct a study of gradient image jailbreak transfer on more than 40 open-source VLMs, and state that jailbreak images optimized on a single model or an ensemble of 8 models almost never transfer, and only partially transfer when attacking an ensemble highly similar to the target.

Threat modelThe attacker has white-box (gradient) access to the target VLM and uses gradient descent to optimize a single universal image jailbreak, making the VLM output harmful-yet-helpful responses to harmful prompts; transfer means the image is also effective on other VLMs (black-box) that did not participate in optimization. The victim systems are vision-language models that generate text.

Questions
Once multimodal capabilities entered frontier models, attackers might use adversarial images to jailbreak VLMs; existing evidence shows that text jailbreaks and image-classification adversarial examples can transfer, and the authors want to systematically test whether gradient-optimized universal image jailbreaks can transfer between VLMs.
Methods
On more than 40 open-source VLMs (including 18 Prismatic-series models built by the authors), a single image is optimized with gradient descent on harmful prompt-response pairs to minimize the negative log-likelihood of the target response, and Cross Entropy and Claude 3 Opus scores are then used to measure the effect on the attacked model and on other models.
Experiments and results
The authors report: images optimized against a single VLM or an ensemble of 8 VLMs always jailbreak the attacked model, but almost never transfer to other VLMs; partial transfer occurs only between models with the same initialization, with overlapping training data, or between different checkpoints of the same model; when attacking an ensemble of 8 VLMs highly similar to the target, transfer is markedly enhanced.
Limitations and future work
The authors state that due to compute constraints they did not explore more complex attack optimization methods, and that there is no mathematical definition of "highly similar"; the experiments cover only the open-source Prismatic series and a few other open-source VLMs, not closed-source frontier models; the authors explicitly state that they do not claim transfer attacks on VLMs do not exist.
Experimental setupLLAVAv1.5 7B + CLIP (Repro)、Llama2 7B + CLIP et al. · AdvBench、Anthropic HHH et al. · Cross Entropy Loss、Claude 3 Opus Harmful-Yet-Helpful Score
Evaluated models
LLAVAv1.5 7B + CLIP (Repro)Llama2 7B + CLIPLlama2 Chat 7B + CLIPLlama2 13B + CLIPLlama3 Instr 8B + CLIPGemma Instr 2B + CLIPGemma Instr 8B + CLIPMistral Instr v0.2 7B + CLIPDeepSeek-VL Chat 7B + SigLIP&SAM-BQwen VL ChatOne-Stage Training (1S)Two-Stage Training1S + LVIS-Instruct-4V1S + LRV-Instruct1S + LVIS + LRV1S, 3 Epochs
Benchmarks
AdvBenchAnthropic HHHGenerated dataset
Metrics
Cross Entropy LossClaude 3 Opus Harmful-Yet-Helpful Score
AI summaryand selection rationaleResearchers from institutions including Stanford and Anthropic conducted a large-scale empirical study on more than 40 open-parameter vision-language models (VLMs) and found that gradient-based image jailbreaks that transfer across models are extremely difficult to obtain. Image jailbreaks optimized against a single VLM or an ensemble of 8 VLMs always break the attacked models, but almost do not transfer to other VLMs, and are not affected by factors such as whether the two share a vision backbone or language model, or whether the language model has undergone safety alignment training. Partial transfer was observed only between VLMs with the same initialization but slightly different training data, and between different training checkpoints of the same VLM; an ensemble of 8 VLMs whose attacks and targets are highly similar can achieve transfer effects close to the upper limit. The authors state that this result contrasts sharply with the transferability of text jailbreaks and adversarial attacks on image classifiers, but does not indicate that transfer attacks against VLMs do not exist; the team also released 18 new VLMs.

Researchers from institutions including Stanford and Anthropic conducted a large-scale empirical study on more than 40 open-parameter vision-language models (VLMs) and found that gradient-based image jailbreaks that transfer across models are extremely difficult to obtain. Image jailbreaks optimized against a single VLM or an ensemble of 8 VLMs always break the attacked models, but almost do not transfer to other VLMs, and are not affected by factors such as whether the two share a vision backbone or language model, or whether the language model has undergone safety alignment training. Partial transfer was observed only between VLMs with the same initialization but slightly different training data, and between different training checkpoints of the same VLM; an ensemble of 8 VLMs whose attacks and targets are highly similar can achieve transfer effects close to the upper limit. The authors state that this result contrasts sharply with the transferability of text jailbreaks and adversarial attacks on image classifiers, but does not indicate that transfer attacks against VLMs do not exist; the team also released 18 new VLMs.

Why it was selectedThis study covering more than 40 vision-language models shows that image jailbreaks are difficult to transfer across models, in contrast to the transfer patterns of text jailbreaks, and can provide a reference for multimodal attack risk assessment.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Can gradient-optimized universal image jailbreaks transfer between VLMs? The authors systematically test this on more than 40 open-source VLMs and conclude that transfer is difficult.

    Core question: can gradient-based universal image jailbreaks optimized against vision-language models (VLMs) transfer to other VLMs not seen at attack time.

    • Setting and importance: Multimodal capabilities are being integrated into frontier systems such as Claude 3, GPT4-V, and Gemini Pro; the authors argue that providers need to confirm model robustness to malicious users, otherwise it may facilitate risks such as disinformation and phishing.
    • Three pieces of existing evidence foreshadowing risk: the authors list—adversarially optimized images can manipulate white-box VLMs into outputting harmful content; universal text jailbreaks can transfer from white-box language models to black-box ones; adversarial examples against image classifiers can transfer. This motivates the authors to systematically examine the transferability of VLM image jailbreaks.
    • Threat model:
      • Attacker goal: optimize an image so that the VLM outputs a harmful-yet-helpful (harmful and actually helpful for achieving the malicious goal) response to a harmful prompt.
      • Knowledge: white-box (gradient) access to the attacked VLM during optimization; the transfer target model is, to the attacker, a new model not involved in optimization.
      • Capability: control the input image (3×512×512, per-pixel optimization), with the text prompt unchanged.
      • Victim system: a VLM that generates text from visual and textual input.
    • What the paper does: conducts a large-scale empirical study on more than 40 open-source parameterized VLMs (including 18 newly built and released by the authors), systematically varying factors such as vision backbone, language backbone, training data, and training stage, to examine when transfer occurs.
    • Core conclusion: the authors state that transferable gradient image jailbreaks are extremely difficult to obtain; partial transfer occurs only when the attacked model and the target are "highly similar" (same initialization, overlapping training data, or different checkpoints of the same model), and attacking larger "highly similar" ensembles can enhance transfer. The authors explicitly state that they do not claim transfer attacks on VLMs do not exist.
  2. What related research exists?

    Related work falls into three categories: LM text jailbreaks, VLM image attacks, and ensemble transfer attacks; the authors position this paper as a large-scale systematic examination of the transferability of VLM image jailbreaks.

    LM text jailbreaks

    • Zou et al. (2023) proposed GCG, which uses open-source models to automatically search for universal adversarial text strings that transfer to closed-source models such as GPT-4, Claude 2 and Bard; this paper's method is inspired by it, but Meade et al. (2024) question the universality of such triggers.
    • Wei et al. (2024), Kang et al. (2023) and others propose manual jailbreak techniques such as Base64 obfuscation and code formatting; other work jailbreaks with few-shot in-context examples (e.g., many-shot jailbreaking in Anil et al. 2024).

    VLM image attacks

    • Qi et al. (2024) use visual adversarial examples to jailbreak aligned large models; the paper notes that they only show increased toxicity in held-out model outputs, not full jailbreak transfer.
    • Bailey et al. (2023), inspired by GCG, optimize non-jailbreak image attacks against an ensemble of two VLMs and fail to show transfer; Chen et al. (2024) independently confirm that the attacks of Bailey et al. and Qi et al. have low transferability.
    • Niu et al. (2024) ensemble three white-box VLMs and claim image jailbreaks transfer to other open-source VLMs; the authors challenge this point by point in Appendix B.1: the success criterion differs (counting only whether the response begins with a refusal string), no baseline refusal rate is reported, the ASR differences are within sampling noise, and they show that the "successful transfer" example in its Figure 6 also makes LLaVA 1 give an almost identical response without an input image (Figure 9).

    Ensembles and transfer attacks (image-classification background)

    • Papernot et al. (2016), Liu et al. (2016) and others show that adversarial examples can transfer between image classifiers; Dong et al. (2018), Chen et al. (2024) and others show that attacking an ensemble of models can improve transferability, which is the basis for the authors' 8-VLM ensemble experiments.
    • Fort (2023)'s multi-attacks show that attacking an ensemble simultaneously is feasible, and the authors use this to analogize the phenomenon that "jailbreaking 8 VLMs simultaneously is no harder than jailbreaking 1".

    Comparison baselines and data: this paper does not propose a new attack and compare scores against baselines, but reuses loss functions and datasets such as AdvBench commonly used in the literature; Table 2 summarizes the conclusions of recent VLM jailbreak papers on generality (U?) and transferability (T?), most of which are no transfer or unclear results.

    Authors' positioning: the authors state that prior studies used only a few VLMs along the model dimension with older language backbones and lacking safety-alignment training, mostly looked only at toxicity rather than harmful-yet-helpful along the behavior dimension, often used vaguely defined ASR or did not report baseline refusal rates along the metric dimension, and had mutually contradictory results along the results dimension; this paper conducts a systematic test with more than 40 VLMs including next-generation language backbones, a unified protocol and Claude 3 Opus evaluation.

  3. How does the paper address this problem?

    Using gradient descent to optimize a single image on harmful prompt-response pairs, systematically varying the number and similarity of the attacked VLMs, then measuring transfer with two metrics.

    Overall approach: fix the VLM parameters and perform gradient optimization on an input image so that it drives the VLM to output a preset harmful-yet-helpful response to a harmful prompt; then systematically vary the number, composition, and similarity to the target model of the attacked models, and measure transfer.

    Optimization objective and attack settings

    • Loss function: L(Image) = −log ∏n ∏VLM pVLM(the n-th response ∣ the n-th harmful prompt, image), i.e., minimize the negative log-likelihood of a set of frozen VLMs each outputting the target response; the authors note this is a loss commonly used in the VLM robustness literature.
    • Optimization details (Appendix C): Adam, learning rate 1e−3, momentum 0.9, epsilon 1e−4, weight decay 1e−5, optimized for 50000 steps; batch size 2, accumulating 4 batches, effective batch size 8; image shape (3, 512, 512).
    • Image initialization: either uniform random noise or a natural image; the authors report no difference between the two.

    Data

    • AdvBench: 416 training / 104 test pairs, with a highly fixed target response format (always starting with "Sure" and restating the prompt).
    • Anthropic HHH: a harmful response set obtained by manually modifying its red-team subset, subsampled to 416 training / 104 test to align with the AdvBench scale.
    • Generated: 51 self-built harmful topics, with Claude 3 Opus generating subtopics and harmful prompts, Llama 3 Instruct 8B generating responses, and Claude 3 Opus filtering them, totaling 48k training / 12k test pairs (Appendix D).

    Model suite

    • The main body is the Prismatic suite: dozens of VLMs covering different vision backbones (CLIP, SigLIP, DINOv2), language backbones (Vicuna, Llama 2, etc.), and training data combinations.
    • The authors additionally used the Prismatic training code to build and release 18 new VLMs: 6 language backbones (Gemma Instruct 2B/8B, Llama 2 Chat 7B, Llama 3 Instruct 8B, Mistral Instruct v0.2 7B, Phi 3 Instruct 4B) × 3 vision backbones (CLIP, SigLIP, DINOv2+SigLIP).

    Success criteria

    • Cross Entropy Loss: computed on the evaluation split of the text dataset according to the formula above; the advantage is speed, the disadvantage is that it only measures the target response.
    • Claude 3 Opus Harmful-Yet-Helpful Score: after sampling VLM outputs, Claude 3 Opus describes the degree of harmfulness and helpfulness according to scoring rubrics, gives a Likert score of 1–5, then rescales to [0,1].
    • The authors also tried two judges, LlamaGuard 2 and the HarmBench Classifier, but state that their judgments often disagreed with the authors' judgments, so the main text reports only Cross Entropy and Claude 3 Opus.
    • Terminology: universal means one image can make the attacked VLM produce harmful-yet-helpful outputs for diverse harmful prompts; transferable means the image is also effective on new VLMs not involved in optimization.

    Experimental design (transfer conditions)

    1. Optimize against a single VLM (30 attacked VLMs, sweeping vision/language backbones, initialization, dataset).
    2. Optimize against 3 ensembles each containing 8 VLMs.
    3. Between VLMs with the same initialization: training data supersets (LLaVa v1.5 Instruct plus LVIS-Instruct-4V, LRV-Instruct, or both).
    4. Between the same initialization, 1 Stage and 2 Stage training pipelines.
    5. Between different training checkpoints of the same VLM (1, 1.25, 1.5, 2, 3 epochs).
    6. Using the above 9 "highly similar" VLMs to form ensembles of size 1, 2, 8 to attack a specific target (when N=8, the target is removed from the ensemble).
  4. What experiments did the paper conduct?

    Six groups of experiments: neither single-model nor 8-model ensembles transfer; partial transfer between data overlap and checkpoints; when attacking 8 highly similar VLMs, transfer approaches the upper limit.

    Experimental setup

    • Models tested: more than 40 open-source parameterized VLMs, mainly the Prismatic suite (including a LLaVA 1.5 reproduction) and 18 VLMs newly built by the authors (Gemma Instruct 2B/8B, Llama 2 Chat 7B, Llama 3 Instruct 8B, Mistral Instruct v0.2 7B, Phi 3 Instruct 4B × CLIP/SigLIP/DINOv2+SigLIP), plus DeepSeek-VL Chat 7B, Qwen VL Chat, etc.
    • Datasets: AdvBench (416 train/104 test), modified Anthropic HHH (416/104), Generated (48k/12k); the main result figures mostly use AdvBench, some use Generated (indicated in each figure caption).
    • Metrics: Cross Entropy Loss and Claude 3 Opus Harmful-Yet-Helpful Score (1–5 Likert scaled to [0,1]).
    • Evaluation method: Claude 3 Opus scores sampled outputs according to a rubric; LlamaGuard 2 and the HarmBench Classifier were discarded because they disagreed with the authors' judgment.
    • Attack hyperparameters: 50000 steps of Adam, effective batch size 8; the paper does not report the number of repetitions for each condition.
    • Baseline: the same VLM's score under the initial (unoptimized) image serves as the control (horizontal axis of each scatter plot).

    Main results

    The paper's main results are presented as figures; the key numbers given in the main text are as follows (no per-model numerical table):

    Swipe horizontally to read the table

    SettingAttacked VLMTarget VLMSource
    Single-VLM attackAlways jailbroken (<500 steps)Almost no transferFig. 2
    8-VLM ensembleAll jailbroken (held-out text)No transfer outside the ensembleFig. 3, 4
    Data overlap (same initialization)About 87.5%Rises from about 15% to 40%–60%Fig. 5
    1 Stage→2 StageSuccessNo transferFig. 6
    Checkpoint 1→3 epochsAbout 87.5% (1-epoch)About 40% for 3-epoch, baseline about 30%Fig. 7
    Ensemble of 8 highly similar VLMs—Near the ceiling; except the 2 Stage targetFig. 8
    • The authors state that under single-VLM attacks, transfer is not affected by any of: shared visual backbone, shared language model, instruction-following or safety-alignment training, image initialization, text dataset (Fig. 2).
    • The authors state that jailbreaking 8 VLMs requires roughly the same number of gradient steps as jailbreaking 1, and converges to the same cross entropy (Fig. 4).
    • The authors state that in the checkpoint experiments transfer decays with additional optimization steps: 1.25 and 1.5 epochs are closest, followed by 2 and 3 epochs (Fig. 7).

    Attacks on "highly similar" ensembles (Sec. 3.6)

    • What was tested: using the 9 VLMs from Sec. 3.3–3.5 that differ in a single training detail, ensembles of size 1, 2 and 8 were formed to attack specific targets; for N=2 the 2 closest to the target were chosen (Table 4), and for N=8 the target was removed.
    • Results: for the 2 Stage target there is no transfer even when attacking an ensemble of 8 VLMs; for the remaining targets transfer strengthens as the number attacked goes from 1→2→8; when attacking 8, harmful-yet-helpful scores near the ceiling are reached (Fig. 8).
    • Authors' interpretation: if there are multiple VLMs "highly similar" to the target, strong transfer can be achieved; but the authors acknowledge the lack of a mathematical definition of "highly similar".

    Testing the transfer claim of Niu et al. (2024) (Appendix B.1)

    • What was tested: the authors fed the example prompts that Niu et al. claimed transferred successfully to LLaVA 1 without an input image.
    • Results: LLaVA 1 gives almost identical harmful responses without an image (Fig. 9).
    • Authors' interpretation: the authors believe Niu et al.'s high ASR may stem from the success criterion (counting as failure only if the response begins with a refusal string), the absence of a baseline refusal rate, and sampling noise, rather than from genuine transfer.

    Other ablations and analyses

    • Image initialization (random noise vs natural image): no effect on jailbreaking or transfer (Appendix C).
    • Text dataset (AdvBench / HHH / Generated): does not change the "no transfer" conclusion (Sec. 3.1).
    • Comparison of evaluator models: LlamaGuard 2 and the HarmBench Classifier often disagree with the authors, and are discarded in the main text (Appendix C).
    • Training duration: the time scale of jailbreaking is similar regardless of whether the attacked VLM was trained with instruction-following/safety alignment (<500 steps, Sec. 3.1).
    • Appendix E, Figures 12–15 give per-target Claude 3 Opus scores and Cross Entropy curves for N=2 and N=8 ensemble transfer (pdftotext contained no readable values).
  5. What are some points that can be further explored?

    The authors list four future directions (mechanistic understanding, stronger attacks, jailbreak detection, more robust VLMs) and acknowledge compute constraints and that "highly similar" is undefined.

    Limitations and future directions noted by the authors

    • Mechanistic understanding (Sec. 6): The authors propose that future work could mechanistically study activations or circuits, especially how visual and textual features are integrated, whether image attacks and text attacks induce the same output distribution and exploit the same circuits, and could make the loose concept of "highly similar" precise.
    • Stronger attacks (Sec. 6): The authors state that due to compute constraints they could not explore more complex attacks, and that results might differ with a different optimization process; the open question is what optimization yields image jailbreaks that transfer, ideally transferring to black-box VLMs.
    • Jailbreak detection (Sec. 6): The authors state that under white-box access any VLM they studied can be easily jailbroken, and therefore believe a robust defense system should include detecting whether an input image is jailbreaking the VLM.
    • More robust VLMs (Sec. 6): The authors state that the visual vulnerability exists regardless of whether the language backbone was trained with safety alignment (partly because safety alignment is unintentionally removed during VLM construction), and that more work is needed to make VLMs robust to adversarial inputs.
    • Speculation at the explanatory level (Sec. 5): The authors suggest that the degrees of freedom in image optimization (about 1e2000000) being far greater than in text attacks (GCG about 1e100) may explain the lack of transfer, and on this basis speculate that better constraints, regularization or optimization methods may be needed; this is the authors' conjecture, not a conclusion.
    • Overall stance (Sec. 1): The authors explicitly state that they do not claim transfer attacks on VLMs do not exist, only that despite substantial effort they were largely unsuccessful.

    Scope of experiments

    • The models tested are more than 40 open-source parameterized VLMs, mainly the Prismatic suite and 18 VLMs built by the authors, plus DeepSeek-VL Chat 7B, Qwen VL Chat, etc.; closed-source frontier models such as GPT-4V, Claude 3 and Gemini are not included (the paper mentions them only in the introduction as belonging to this class of systems).
    • The attack is only gradient-based white-box optimization (Adam, 50000 steps, effective batch size 8), with the image optimized per pixel at 3×512×512; the paper does not report the number of repetitions for each experimental condition.
    • Ensemble sizes cover 1, 2 and 8 attacked VLMs; the "highly similar" ensemble is based only on 9 VLMs differing in a single training detail.
    • Success is judged using Cross Entropy and Claude 3 Opus scores; the paper does not report a numerical agreement rate between Claude 3 Opus scores and human judgment.
    • The text datasets are AdvBench, a modified version of Anthropic HHH, and Generated, three in total; the main result figures are mostly based on AdvBench, some on Generated (indicated in each figure caption).
  6. Summarize the main content of the paper

    Large-scale empirical evidence shows that gradient-based image jailbreaks reliably jailbreak the attacked VLM but almost never transfer; only when attacking an ensemble highly similar to the target does partial transfer occur.

    A large-scale empirical study on the adversarial robustness of VLMs: the authors aim to answer whether gradient-based universal image jailbreaks optimized against vision-language models can transfer to new models as text jailbreaks and image-classification adversarial examples do.

    • Approach: on more than 40 open-source parameterized VLMs (the Prismatic suite plus 18 VLMs newly built and released by the authors), a single 3×512×512 image is optimized with Adam for 50000 steps on harmful prompt-response pairs (AdvBench, a modified Anthropic HHH, and a self-built Generated set) to minimize the negative log-likelihood of the target response; effectiveness is measured with Cross Entropy and Claude 3 Opus harmful-yet-helpful scores.
    • Neither single-model nor ensemble attacks transfer: images optimized against a single VLM always jailbreak the attacked model (<500 steps), but almost never transfer to any other VLM, and this is unaffected by shared visual/language backbone, safety-alignment training, initialization or dataset (Fig. 2); for ensembles of 3 × 8 VLMs, the image jailbreaks all models within the ensemble but does not transfer to models outside it (Fig. 3, 4).
    • Two kinds of partial transfer: between VLMs with the same initialization, when training data overlaps, the target model's harmful-yet-helpful rate rises from about 15% to 40%–60% (attacked model about 87.5%, Fig. 5); between different checkpoints of the same model, transfer decays as training steps increase, with the 3-epoch checkpoint at about 40% when attacked, close to the baseline of about 30% (Fig. 7). There is no transfer between the 1 Stage and 2 Stage training pipelines (Fig. 6).
    • Ways to enhance transfer: when attacking an ensemble of 8 VLMs "highly similar" to the target, transfer approaches the ceiling for most targets, except the 2 Stage target (Fig. 8).
    • Authors' conclusion: the authors state that VLMs are more robust to gradient transfer attacks than language models and image classifiers, and speculate that the connection mechanism by which visual features are injected into the language model (e.g., how the MLP is initialized) may be key to transfer; they also emphasize that this does not mean transfer attacks do not exist, only that after substantial effort they were largely unsuccessful, and that future directions include mechanistic research, stronger optimization methods, jailbreak detection and more robust VLMs.

Related papers

Show 3 more papers
Read originalICLR 2025