Skip to content

Beyond random initialization: amortized initialization for adversarial attacks on vision-language modelsBeyond Random Starts: Amortized Initialization for Adversarial Attacks on Vision-Language Models

arXiv· arXiv:2611.33414· Haz Sameen Shahgir, Ali Asif Khan, K. M. Mehemud Azad, Dongwei Lyu, Zhipeng Wei, Rifat Shahriyar, Yufei Li, Xian Chen, Xiaohan Wei, Yunchen Pu, Fei Tian, Chonglin Sun, Frank Shyu, Sandeep Pandey, Luke Simon, Xi Liu, N. Benjamin Erichson, Yue DongUC Riverside; BUET; UC Berkeley; Meta; International Computer Science Institute; Lawrence Berkeley National LaboratoryIndexed by this site · 3 days ago· Originally publishedAttacks· Its place in the scan record →

Quick read

Attacks

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

The authors propose SPARK to provide amortized initialization for VLM transfer attacks; on ID-test, PRAFAttack's average ASR rises from 61.6% to 69.0%.

Threat modelThe goal is a targeted transferable adversarial attack: given a source image and a target image, perturb the source image within an ℓ∞ budget so that a black-box VLM interprets it as the target content. The victim VLM is inaccessible, and the attack uses the representations and gradients of multiple surrogate vision encoders.

Questions
Transferable VLM attacks typically start from random perturbations and require hundreds of gradient optimization steps per image pair. The authors study whether a generator learned across image pairs can provide an initialization that contains source-image and target-image information and reduce subsequent optimization cost.
Methods
SPARK is conditioned on the surrogate encoder representations of the source and target images, uses a shared-weight looped generator to progressively refine the perturbation, and applies the PRAFAttack feature alignment loss at each step. The output can either attack independently or directly replace the random initialization of existing attacks.
Experiments and results
The authors evaluate on six open-source VLMs and three frontier VLMs. On ID-test at 300 steps, SPARK increases the average ASR of PRAFAttack, MPCAttack, and MAttack-v2 by 7.4, 11.4, and 15.3 percentage points respectively; there are also improvements on OOD-test and ObjectNet.
Limitations and future work
The paper does not specifically discuss limitations. The experiments use ImageNet and ObjectNet, nine victim VLMs, and the GPTScore judge; smaller perturbation budgets require retraining, and at 600 steps the ASR improvements for InternVL3.5 8B and Phi4 RV 15B are not significant after correction.
Experimental setupGemma 4 12B、Qwen3-VL 8B et al. · ImageNet-train、ImageNet-val(ID validation、ID test、OOD test) et al. · ASR、average GPTScore et al.
Evaluated models
Gemma 4 12BQwen3-VL 8BInternVL3.5 8BGLM-4.6V FlashKimi-VL A3BPhi-4-reasoning-vision 15BGPT-6.1 SolClaude Opus 5.5Gemini 4 Argon
Benchmarks
ImageNet-trainImageNet-val(ID validation、ID test、OOD test)ObjectNet
Metrics
ASRaverage GPTScoreTFLOPs per attack
AI summaryGradient-transferable adversarial attacks against black-box vision-language models (VLMs) lead in success rate, but require hundreds of expensive optimization steps per image pair and typically start from random perturbations that contain no information about the source or target image. The paper proposes SPARK, a lightweight recurrent perturbation generator conditioned on the source and target images that repeatedly applies the same network to refine the perturbation, generating effective adversarial perturbations in a few forward passes without backpropagating gradients through a surrogate vision encoder at inference time. The authors state that these perturbations can serve as warm starts for existing gradient attacks, markedly improving attack success rate and reducing the number of optimization steps required, with improvements holding across different attack methods, VLMs, and unseen image categories; SPARK can also carry out attacks independently at far lower computational cost than gradient optimization. Code and model weights are open-sourced on GitHub.

Gradient-transferable adversarial attacks against black-box vision-language models (VLMs) lead in success rate, but require hundreds of expensive optimization steps per image pair and typically start from random perturbations that contain no information about the source or target image. The paper proposes SPARK, a lightweight recurrent perturbation generator conditioned on the source and target images that repeatedly applies the same network to refine the perturbation, generating effective adversarial perturbations in a few forward passes without backpropagating gradients through a surrogate vision encoder at inference time. The authors state that these perturbations can serve as warm starts for existing gradient attacks, markedly improving attack success rate and reducing the number of optimization steps required, with improvements holding across different attack methods, VLMs, and unseen image categories; SPARK can also carry out attacks independently at far lower computational cost than gradient optimization. Code and model weights are open-sourced on GitHub.

Related events and news

1 events · 0 news mentions

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The study examines whether an amortized generator learned across image pairs can replace random initialization for VLM transfer attacks and reduce gradient optimization.

    The core question is: can an adversarial perturbation containing source-image and target-image information be learned at low cost and serve as an effective initialization for existing VLM transfer attacks.

    • Application scenarios: The authors discuss using adversarial image perturbations to interfere with VLM interpretation of visual content, involving CAPTCHA hardening, facial privacy, and preventing unauthorized AI training; these scenarios usually do not know which model will process the image, so the perturbation is required to transfer.
    • Shortcomings of existing methods: The authors state that MAttack-v2, MPCAttack, PRAFAttack, and others require iterative gradient optimization per image pair, with ASR showing diminishing returns only after about 300 iterations, and some methods continuing to improve beyond 1,000; each iteration also passes through multiple vision encoders.
    • Core observation and hypothesis: Random initialization contains no source-image or target-image information. The authors hypothesize that amortized learning across a large number of image pairs can let the generator reuse prior experience and provide an informative starting point for new inputs, rather than optimizing from scratch each time.
    • Proposed method: SPARK is a lightweight looped perturbation generator conditioned on the source image and target representation, refining the perturbation through several forward passes of a shared-weight network; the output can be used independently or to initialize three gradient attacks without modifying the original algorithms.
    • Threat model:
      • Attack objective: Given a source image xs and a target image xt, construct xs+δ so that the VLM interprets the source image as the target content, while satisfying an ℓ∞ perturbation budget ϵ.
      • Knowledge and access: The victim model is black-box, with parameters and gradients inaccessible; the attack instead uses a set of surrogate vision encoders.
      • Attack capability: Optimize the perturbation on the source image and exploit the surrogate encoders' representations; SPARK does not require surrogate encoder gradients at inference time.
      • Victim systems: Open-source and frontier VLMs; success is determined by the semantic similarity between the descriptions of the target image and the attacked image.
  2. What related research exists?

    Related work is divided into gradient transfer attacks, generative attacks, and informed initialization; this paper's positioning is to connect the latter two.

    Gradient-based transferable attacks

    • Early transfer attacks and the MAttack series: Dong et al. (2023) show that perturbations optimized on open-source models can transfer to proprietary VLMs; MAttack (2025) introduces multi-crop feature alignment, and Hu et al. (2025) and M-Attack-V2 (2026) explore multiple target images and additional transformations.
    • MPCAttack (2026): Jointly optimizes the representations of multiple surrogate encoders to improve transferability.
    • FOA-Attack and PRAFAttack: FOA-Attack (2026) uses optimal transport to align spatial patches; PRAFAttack (2026) adds intermediate-layer alignment, progressive target scaling, and a patch selection strategy.

    Generative attacks

    • AdvDiffVLM and PSI: Proposed by Guo et al. (2024) and Yao et al. (2026) respectively, using pretrained diffusion models, but the generation process is still guided by surrogate vision encoder gradients.
    • AnyAttack (2025): Trains a neural network to directly generate adversarial perturbations, avoiding iterative gradient optimization at inference time. The authors note that such generators are mainly studied as standalone attacks rather than as initialization for gradient methods.

    Informed initialization

    • General learning and classifier attacks: Finn et al. (2017) learn an initialization that can be quickly adapted via gradient descent; Jia et al. (2022) train a generator to initialize perturbations for fast adversarial training, but the authors note that their method requires victim model gradients.
    • VLM initialization: AttackVLM (Zhao et al., 2023) initializes black-box gradient-free optimization with adversarial images optimized on a surrogate model; Mittal et al. (2025) first independently optimize images with a gradient attack, then accelerate prompt-image co-optimization. The authors note that these VLM methods still require gradient optimization to construct the initial perturbation.

    Baselines and positioning of this paper

    • Baselines and data: The gradient baselines are PRAFAttack, MPCAttack, and MAttack-v2, and the standalone generative attack is also compared with AnyAttack; ImageNet is used to construct ID/OOD image pairs, with evaluation on ObjectNet.
    • Authors' positioning: The authors state that whether cheaply learned initialization can improve existing transferable attacks, and whether the same initialization can generalize across different optimization objectives, has not been explored before; SPARK therefore treats the generator as a complement to gradient attacks rather than only a replacement for them.
  3. How does the paper address this problem?

    SPARK uses a shared-weight looped generator to progressively refine the perturbation, trains it with a stepwise-supervised feature alignment loss, and then uses it as an independent attack or as initialization.

    The overall idea is to change per-image-pair optimization into learning across image pairs: SPARK starts from a random perturbation and uses the same network for K conditional refinements; during training it backpropagates through frozen surrogate encoders, and at inference only forward propagation is needed.

    Problem setting and conditioning representation

    • For M frozen surrogate vision encoders, the attack objective is to increase the average similarity between the source image and target image representations within an ℓ∞ budget: δ∗=argmax|δ|∞≤ϵ1/M∑i=1Msim(Ei(xs+δ),Ei(xt)). This corresponds to a targeted black-box transfer attack.
    • The global representation of the target image is concatenated into a conditioning vector zt; the generator receives the source image, the current perturbation, and the refinement step index. Training uses three surrogate encoders, and the main experiments use a perturbation budget of ϵ=16/255.

    Looped generator and perturbation constraints

    • The initial perturbation is sampled from U(−ϵ,ϵ) and converted to an unconstrained state; at each step the state is updated by a prediction from the shared network, then mapped to a bounded perturbation via \delta^{(k+1)}=\epsilon\tanh(h^{(k+1)}), with no explicit projection needed.
    • The network uses an attention U-Net with a Transformer bottleneck, with default K=4 and 9.8M parameters. The U-Net handles multiple spatial resolutions, and the Transformer is used to exchange information across spatial positions; shared weights mean that increasing the number of refinement steps does not increase trainable parameters.

    Training objective and optimization details

    • The training loss follows PRAFAttack's global and intermediate-layer feature alignment: the global term is the average cosine similarity of the final representations, and there are also CLS token and spatial patch token terms with weights 0.5 and 1.5 respectively; patch alignment averages only the top 60% of corresponding patches by cosine similarity.
    • Intermediate layers are selected according to the alignment between the input gradients for each image pair and the final-layer gradients. The loss is averaged over all K refinement steps and random image crops, and training gradients pass through the frozen encoders and the generator.
    • Appendix 9.1 reports: training for 256K iterations with batch size 32, processing 8.192M training samples in total; at K=4, an estimated 1.572 TFLOPs per sample, with a total estimated cost of 12.88 EFLOPs and a measured 13.1 EFLOPs.

    Use as initialization and success determination

    • For initialization, the generator's K-th step output directly replaces the random starting point of the gradient attack, after which the respective objectives and optimization procedures of PRAFAttack, MPCAttack, or MAttack-v2 are retained without other modifications.
    • The victim VLM generates short descriptions for the target image and the attacked image respectively, and Qwen-3.8-27B gives a semantic similarity from 0 to 1 according to the GPTScore protocol; the main metrics are the average GPTScore and the percentage of image pairs with a score of at least 0.5, ASR. Appendix 10.5 gives the description and scoring prompts.
    • The data divides ImageNet's 1,000 classes into 800 ID training classes and 200 OOD classes; the training set has 50,400 pairs, ID validation, ID test, and OOD test each have 1,000 pairs, and there are additionally 1,000 ObjectNet samples.
  4. What experiments did the paper conduct?

    The experiments cover nine VLMs, three gradient attacks, and independent generation; SPARK improves ASR, but some high-budget gains are not statistically significant.

    Experimental Setup

    • Victim models: The six open-source VLMs are Gemma 4 12B, Qwen3-VL 8B, InternVL3.5 8B, GLM-4.6V Flash, Kimi-VL A3B, and Phi-4-reasoning-vision 15B; selected experiments additionally test GPT-6.1 Sol, Claude Opus 5.5, and Gemini 4 Argon.
    • Data scale: ID validation, ID test, and OOD test are constructed from ImageNet-val, each with 1,000 image pairs; ObjectNet-test has 1,000 samples and excludes ID training classes. Training uses 50,400 ImageNet-train image pairs.
    • Baselines and surrogates: PRAFAttack, MPCAttack, and MAttack-v2 with random initialization are compared with SPARK initialization; independent generation is additionally compared with AnyAttack. By default, the three share the three surrogate encoders used in SPARK training, and the victim VLMs differ from these surrogate models.
    • Optimization budget: The main comparison runs 300 steps, and the convergence experiment extends to 600 steps; SPARK defaults to K=4, and independent generation also compares K=1, 2, and 6.
    • Metric and judge: ASR is the proportion of image pairs with GPTScore of at least 0.5, and mean GPTScore is also reported; the main text and appendix both use Qwen-3.8-27B for scoring, and the sensitivity analysis switches to GPT-6.1 Terra.
    • Statistical tests: Appendix 10.4 combines the three test sets into 3,000 paired samples, uses a two-sided exact McNemar test for ASR and a two-sided paired t-test for GPTScore, and applies Holm correction uniformly across 42 tests; the paper does not report the number of independent training repetitions.

    Main Results

    According to Table 1, the following are the average ASR over the six open-source black-box VLMs, with all gradient attacks run for 300 steps and SPARK as K=4 initialization:

    Swipe horizontally to read the table

    Test setAttack methodRandom init+ SPARKIncrement (percentage points)
    ID-testMAttack-v250.5%65.8%+15.3
    ID-testMPCAttack48.5%59.9%+11.4
    ID-testPRAFAttack61.6%69.0%+7.4
    OOD-testMAttack-v249.7%64.5%+14.8
    OOD-testMPCAttack44.7%57.8%+13.1
    OOD-testPRAFAttack58.8%66.6%+7.8
    ObjectNet-testPRAFAttack43.0%52.0%+9.0
    • Cross-target generalization: The authors state that although SPARK is trained with the PRAFAttack loss, it also improves the other two attacks with different optimization objectives; PRAFAttack remains the method with the highest results among the three.
    • Cross-category and dataset: Neither the source nor target classes of OOD-test participated in generator training, and ObjectNet comes from another dataset; the authors therefore argue that the gains are not limited to the training image classes or dataset.
    • Per-model exceptions: All listed increments in Table 1 are positive, but the smallest increment appears on Phi-4-RV-15B on ObjectNet-test, where PRAFAttack increases by only 4.2 percentage points.

    Optimization Steps and Computational Cost

    • Fewer steps: Section 5.2 of the main text reports that SPARK-initialized PRAFAttack reaches 63.4% ASR on ID-test in 50 steps, higher than the 61.6% of random initialization at 300 steps; the authors state that the required gradient steps are reduced to one sixth.
    • Longer optimization: In Figure 3, at 600 steps, SPARK-initialized and randomly initialized PRAFAttack are 70.2% and 66.8%, respectively; the authors state that the gains are not limited to the early stage of optimization.
    • Independent attack cost: In Table 2, K=4 independent SPARK on ID-test is 53.4% ASR at 0.373 TFLOPs/image, and MPCAttack is 48.5% at 56.1 TFLOPs/image; the authors state that the former uses about 150× less computation. The abstract also summarizes the independent attack cost as "about 100×", and Figure 1 labels the five-encoder attack at 893.3 TFLOPs and SPARK's additional 0.37 TFLOP.

    Independent Generation and Surrogate-Ensemble Mismatch

    • Independent generation: Table 2 shows that SPARK's ASR on ID-test rises from 42.2% at K=1 to 54.9% at K=6, but on ObjectNet-test the corresponding values are only 14.2% and 20.7%; AnyAttack's ASR on the three test sets is 0.4%, 0.3%, and 1.2%, respectively. The authors note that AnyAttack does not take the source image as input, so the two have different conditions.
    • Five-encoder PRAFAttack: Without retraining the three-encoder SPARK, it directly initializes a five-encoder PRAFAttack. In Table 3, the average ASR of three frontier VLMs rises from 48.8% to 53.2% on ID-test, from 45.6% to 51.5% on OOD-test, and from 30.2% to 34.3% on ObjectNet-test.
    • Open-source model comparison: In the same Table 3, the average ASR of six open-source VLMs rises from 72.6% to 76.2% on ID-test, from 69.5% to 74.3% on OOD-test, and from 53.6% to 59.6% on ObjectNet-test; the authors state that the same generator can be used across surrogate ensembles.

    Judge Sensitivity and Statistical Tests

    • Judge agreement: Appendix 10.5 compares the two judges on 36,000 pairs of descriptions, with Pearson r=0.937, and GPT-6.1 Terra scoring 0.116 points higher on average; the authors state that the more lenient judge already counts most image pairs as successful at the 0.5 threshold.
    • Changes in ASR increment: On ID-test-S in Table 6, the six-model average ASR increment of five-encoder PRAFAttack with SPARK is +3.7 percentage points under Qwen3.8-27B and +2.9 percentage points under GPT-6.1 Terra; the mean score increments are +0.029 and +0.028, respectively.
    • Significance exceptions: Appendix 10.4 states that after correction almost all improvements remain significant; the exceptions are the ASR test for InternVL3.5 8B under the 600-step, three-surrogate configuration with pHolm=0.0888, and the ASR test for Phi4 RV 15B with pHolm=0.0809. In Table 5, the latter's GPTScore pHolm is also 0.0888.

    Other Ablations and Analyses

    • Training objective: In Table 7, at K=4, replacing the PRAF loss with InfoNCE lowers independent ASR on ID-test from 53.4% to 41.6%.
    • Intermediate supervision: When only the last step is supervised, K=4 drops from 53.4% to 52.2%, and K=6 drops from 54.9% to 52.5% (Table 7).
    • Weight sharing: In Table 8, four-step separate weights increase parameters from 9.8M to 39.1M, and ID-test ASR drops from 53.4% to 50.8%; the authors suggest that shared weights may help avoid overfitting to the surrogate encoders.
    • Architecture comparison: A 2× Channel Width single-pass model with comparable computation is 43.7%, versus 53.4% for the looped model; removing the Transformer lowers K=1 from 42.2% to 31.2% (Table 8).
    • Perturbation budget: In Table 9, a generator with ϵ=16/255 directly adapted to 8/255 achieves at most 5.3% ASR; retraining at 8/255 gives 22.1%, and initializing 300-step PRAFAttack gives 25.4%.
    • Inference unrolling: In Table 10, a generator with Ktrain=4 is unrolled at inference, and the authors state that the gains saturate at about K=16 and are smaller than the gains from increasing training depth.
  5. What are some points that can be further explored?

    The paper does not specifically discuss limitations; what can be checked is its evaluation scope, along with the exceptions for small-budget retraining and some statistical tests.

    Limitations and future directions noted by the authors

    The paper does not specifically discuss limitations, nor does it have a separate Limitations or Future Work section. The following are only conditional findings stated by the authors in the corresponding experimental subsections, and are not listed as limitations declared by the authors:

    • Smaller perturbation budget: Appendix 11.3 states that directly scaling or clipping the perturbation learned at ϵ=16/255 to 8/255 does not preserve the effect, and SPARK needs to learn perturbations for the intended budget.
    • Increasing depth at inference time: Appendix 11.4 states that the improvement from inference unrolling saturates at about K=16 and is smaller than the improvement obtained by training with more steps, so it cannot replace greater training depth.
    • Training cost accounting: Appendix 9.1 gives a break-even estimate under the five-encoder setting: approximating a 300-step random-initialization attack with a 100-step SPARK-initialized attack, about 22K images can offset the 13.1 EFLOPs training cost; this is a calculation under specific cost assumptions, not an additional experimental conclusion.

    Experimental coverage

    • Victim models: The main tables cover six open-source VLMs, and the five-encoder experiments additionally cover three frontier VLMs, nine in total; the frontier models appear only in selected experiments (Section 4, Table 3).
    • Data and samples: Evaluation uses ImageNet-derived ID/OOD image pairs and ObjectNet, with 1,000 pairs or samples per test set; the statistical tests combine into 3,000 paired samples (Section 4, Appendix 10.4).
    • Attack and defense evaluation: Three gradient attacks and AnyAttack are compared, and ablations are done on training objective, architecture, perturbation budget, and inference unrolling; the paper does not report experiments against defenses or adaptive defenses.
    • Decision method: Success determination relies on description similarity and an LLM judge, with a sensitivity analysis additionally using GPT-6.1 Terra; the paper does not report human evaluation or agreement between the judge and humans (Section 4, Appendix 10.5).
    • Repetition and variance: The paper does not report the number of repetitions of independent training or full experiments; the judge-threshold analysis in Figure 8 gives ±1 SEM intervals, and Appendix 10.4 gives paired significance tests.
  6. Summarize the main content of the paper

    SPARK combines learned perturbation generation with gradient attacks, improving transfer ASR and reducing the number of optimization steps required in experiments on nine VLMs.

    SPARK is an amortized initialization method for targeted transfer attacks against black-box VLMs, studying whether a learned generator can replace a random starting point that contains no image information.

    • Problem: Existing attacks optimize the source-image perturbation per image pair so that it approaches the target image in multiple surrogate vision encoders, typically requiring hundreds of forward and backward computations; the authors hope to reuse information learned across image pairs.
    • Method: The generator is conditioned on the source image and target representation, performs K=4 refinements with a shared-weight network of 9.8M parameters, and supervises PRAFAttack-style feature alignment at each step. The output can be used to attack independently, or directly initialize PRAFAttack, MPCAttack, and MAttack-v2.
    • Main results: In Table 1, on ID-test with 300 steps, averaged over six open-source VLMs, the ASR of the three attacks with SPARK added are 69.0%, 59.9%, and 65.8%, corresponding to increases of 7.4, 11.4, and 15.3 percentage points; OOD-test and ObjectNet-test also report positive increments.
    • Steps and independent attack: SPARK-initialized PRAFAttack reaches 63.4% on ID-test in 50 steps, versus 61.6% for random initialization at 300 steps; K=6 independent SPARK is 54.9%, but only 20.7% on ObjectNet-test.
    • Cross-surrogate and judges: The same three-encoder generator can initialize a five-encoder PRAFAttack, and the average ASR of three frontier VLMs on ID-test rises from 48.8% to 53.2% (Table 3). The Pearson r between the two judges on 36,000 pairs of descriptions is 0.937, but a fixed 0.5 threshold changes the ASR increment.
    • Authors' conclusion: The authors argue that the learned generator need not replace gradient optimization, but can provide an initialization that transfers across attack targets and surrogate ensembles. The appendix also reports that at 600 steps, the ASR improvements for two open-source models are not significant after Holm correction, and that a smaller perturbation budget requires retraining the generator.

Related papers

Read originalarxiv.org