Skip to content

Scaling Laws for Black-Box Adversarial AttacksScaling Laws for Black box Adversarial Attacks

arXiv· arXiv:2411.16782· Chuan Liu, Huanran Chen, Yichi Zhang, Jun Zhu, Yinpeng DongDept. of Comp. Sci. and Tech., Institute for AI, Tsinghua-Bosch Joint ML Center, THBI Lab, BNRist Center, Tsinghua University; IIIS, Tsinghua University; RealAIIndexed by this site · 26 days ago· Originally publishedSelected AttacksSelectedAttention41

Quick read

Attacks

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

The authors state that after increasing the number of surrogate models in ensemble attacks, the ASR of black-box transfer attacks grows linearly with log T, reaching 85.0% on GPT-4o at T=12.

Threat modelBlack-box transfer attack: the attacker does not know the target model's architecture or parameters, and uses an ensemble of open-source surrogate models (64 image classifiers or 12 CLIP vision encoders) to generate adversarial examples, attacking standard classifiers, defense models and MLLMs; the goal is a targeted attack, with an ℓ∞ perturbation budget of ϵ=8/255 or 16/255.

Questions
Transfer attacks use an ensemble of multiple surrogate models to improve black-box attack success rates, but prior work used only small fixed ensembles. The authors ask: can scaling the number of surrogate models, as with scaling training data, continuously improve black-box attack effectiveness.
Methods
Using optimizers such as SSA-CWA that can resolve gradient conflict, scale the ensemble size T on a logarithmic scale across 64 image classifiers and 12 CLIP vision encoders, measure the relationship between ASR and log T, and give an asymptotic analysis under an idealized IID assumption.
Experiments and results
The authors state that ASR grows linearly with log T, holding on standard classifiers, 6 SOTA defenses, and MLLMs; at T=12, ϵ=16/255, GPT-4o averages 85.0% ASR, Qwen3-VL-235B 90.0%, and Claude-3.5-Sonnet only 31.0%.
Limitations and future work
The IID assumption the theory relies on does not hold in practice, and the authors state that the O(1/T) convergence rate is unlikely to hold; the law has high variance when T is small (2^0, 2^1) and saturates and flattens when ASR approaches 1.0; MLLM evaluation uses GPT-4o as judge, and the paper does not report agreement with human judgment.
Experimental setupSwin Transformer Small、Swin Transformer Base et al. · ImageNet-1K NIPS 2017 dataset (NIPS17)、CIFAR10(扰动可视化) · ASR(Attack Success Rate)、cross-entropy loss
Evaluated models
Swin Transformer SmallSwin Transformer BaseSwin Transformer V2 SmallConvNeXT BaseConvNeXT SmallResNeXt-101 32x8dResNeXt-50 32x4dFGSMATEnsATHGDBDRJPEGDiffPureLLaVA-1.5-7BQwen-2.5-VL-7BLlama-3.2-11B-VisionGPT-4oClaude-3.5-SonnetGemini-2.5-ProDoubao-Seed-1.6Llama-3.2-90B-Vision-InstructQwen3-VL-235B-A22B-InstructDeepSeek-VL2
Benchmarks
ImageNet-1K NIPS 2017 dataset (NIPS17)CIFAR10(扰动可视化)
Metrics
ASR(Attack Success Rate)cross-entropy loss
AI summaryand selection rationaleThe researchers propose and validate a scaling law for black-box adversarial attacks: after resolving gradient conflicts, the transfer attack success rate grows log-linearly with the number of surrogate models in the ensemble, T. The authors use a surrogate pool of 64 models and the SSA-CWA attack to generate adversarial examples, and observe this pattern on standard classifiers, SOTA defended models, and multimodal large models, stating that scaling up the ensemble improves the success rate of breaking adversarial training and purification. When the method is used to attack the CLIP vision encoder, the average attack success rate reaches 90.0% on Qwen3-VL-235B, 85.0% on GPT-4o, 31.0% on Claude-3.5-Sonnet, and 69.0% on Gemini-2.5-Pro. On this basis, the authors argue that robustness evaluation should focus on the threat posed by scaling up the ensemble, rather than designing complex algorithms only on small ensembles.

The researchers propose and validate a scaling law for black-box adversarial attacks: after resolving gradient conflicts, the transfer attack success rate grows log-linearly with the number of surrogate models in the ensemble, T. The authors use a surrogate pool of 64 models and the SSA-CWA attack to generate adversarial examples, and observe this pattern on standard classifiers, SOTA defended models, and multimodal large models, stating that scaling up the ensemble improves the success rate of breaking adversarial training and purification. When the method is used to attack the CLIP vision encoder, the average attack success rate reaches 90.0% on Qwen3-VL-235B, 85.0% on GPT-4o, 31.0% on Claude-3.5-Sonnet, and 69.0% on Gemini-2.5-Pro. On this basis, the authors argue that robustness evaluation should focus on the threat posed by scaling up the ensemble, rather than designing complex algorithms only on small ensembles.

Why it was selectedThe paper presents a log-linear relationship between ensemble size and black-box transfer attack success rate, and lists the success rate differences among several mainstream MLLMs under the same protocol, which can serve as a reference for robustness evaluation.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Whether increasing the number of surrogate models in ensemble attacks can continuously improve black-box transfer attack effectiveness; the authors state they discovered a log-linear scaling law.

    Core question: can scaling up the ensemble size of surrogate models in transfer attacks continuously improve black-box attack effectiveness, as scaling up training data does.

    • Problem setting: adversarial examples have cross-model transferability and can launch black-box attacks on commercial models such as GPT-4; model ensembling is a known strategy for improving transferability, but prior work usually used only small fixed ensembles, and whether scaling the number of surrogate models is effective remains an open question.
    • Shortcomings of existing methods: the authors find that simple ensembling (e.g., logit averaging) suffers from gradient conflict—as T increases, the gradient directions of different models are random and cancel each other out, the ensemble gradient norm collapses, and optimization stalls (Figure 2).
    • Core observation: the authors regard transfer attacks as essentially a generalization problem, with surrogate models analogous to training data; by analogy with scaling data in large language models to improve generalization, they hypothesize that scaling the number of surrogate models may improve attack transferability.
    • Paper contributions: the authors claim the first large-scale empirical study of scaling laws for black-box adversarial attacks, finding that ASR grows log-linearly with ensemble size T; and they apply this law to attacking the vision encoders of MLLMs as a robustness benchmark.
    • Threat model:
      • Goal: targeted attack, causing the black-box target model to misclassify/describe the perturbed image as the target class y; the untargeted setting is also verified.
      • Knowledge: black-box—the attacker does not know the target model's architecture and parameters.
      • Capability: generate adversarial examples using an ensemble of open-source surrogate models, with ℓ∞ perturbation budget ϵ=8/255 (classifiers) or 16/255 (MLLM experiments).
      • Victim systems: standard image classifiers, models with SOTA defenses, multimodal large language models (MLLMs, by attacking their CLIP vision encoders).
  2. What related research exists?

    Related work is grouped into three categories: black-box attacks, ensemble attacks, and scaling laws; the paper positions itself as the first work to systematically study the scaling law of ensemble size.

    Black-box and transfer attacks

    • Dong et al. [15] propose MI-FGSM, which uses momentum to stabilize gradients; Liu et al. [45] study transferable adversarial examples and black-box attacks. Query-based black-box attacks [18, 31] have high time complexity and computational cost, and the paper states that transfer methods are more practical.
    • Input transformation category: DI [66] (input diversity), translation-invariant attack [16], SSA [48] (spectrum transformation, SOTA); gradient optimization category: momentum optimization [15, 42], scheduled step size [24], variance reduction VMI-FGSM [61].

    Ensemble attacks

    • Common practice is to average losses [15], predictions [45], or logits [15]; advanced ensemble algorithms include SVRE [68], CWA [8], etc. The paper points out that these methods treat ensembling only as a technique for improving transferability and do not examine its principles in depth.
    • [30] shows that increasing the number of classifiers can lower the generalization error upper bound of empirical risk minimization; [70] theoretically defines transferability error and minimizes it via model ensembling. The paper points out that [70] only gives an upper bound and does not actually scale up, and requires training networks from scratch to satisfy the ensemble diversity assumption.

    Scaling Laws

    • Kaplan et al. [34] propose scaling laws for language models; subsequent work extends them to image classification [3, 28], language modeling [56], MoE [21].
    • [5] derives scaling laws on CIFAR-10 for adversarially trained defense models; Wei et al. [62] study the scaling law of ASR with the number of in-context demonstrations when jailbreaking large language models. The paper points out that the effect of ensemble size on attacks has only been preliminarily observed in prior work and has not been systematically analyzed.

    Baselines and benchmarks

    • Attack algorithm baselines: logit ensemble strategies (MI-FGSM, DI-MI-FGSM, VMI-FGSM) compared with advanced ensemble strategies (MI-CWA, VMI-CWA, MI-SVRE); the main algorithm is SSA-CWA (SSA [48] + CWA [8]).
    • Datasets: ImageNet-1K NIPS 2017 (NIPS17) 1000 images; the LLM-as-Judge framework for MLLM evaluation is taken from MultiTrust [73].

    The authors position this paper as: focusing on empirical scaling laws within model ensembles, validating at scale with open-source pretrained models, and revealing the vulnerability of commercial LLMs by attacking vision encoders.

  3. How does the paper address this problem?

    After resolving gradient conflicts with SSA-CWA, scale the ensemble size T on a logarithmic scale and measure the relationship between ASR and log T.

    Overall approach: first use an advanced optimizer that can resolve gradient conflicts (SSA-CWA) to generate adversarial examples, then scale the ensemble size T on a logarithmic scale from 2^0 to 2^6 (up to 12 in the CLIP experiments), and measure the relationship between ASR on black-box targets and log T.

    Problem Formulation

    • Targeted attack: given a natural image xnat and a target class y, minimize the expected loss over all models minx Ef∈F[L(f(x),y)], subject to the ℓ∞ perturbation not exceeding ϵ; in practice this is approximated by the average loss over T surrogate models.
    • Attacking vision encoders: replace the classifier with a CLIP image encoder and cross-entropy with a similarity loss (e.g., cosine embedding loss), so that the image embedding approaches the target text embedding etar.
    • Non-targeted attack: maximize the loss with respect to the original label ynat, used for ablation validation.

    Theoretical Motivation

    • Theorem 1: under the assumption that surrogate models are IID sampled from F, x̂ converges to x* at O(1/√T), and the difference between population loss and empirical loss converges at O(1/T) (proof in Appendix A).
    • Theorem 2: under cross-entropy loss, 2T(L(x̂)−L(x*)) converges in distribution to χ²(D).
    • The authors explicitly acknowledge: in practice surrogate models are all pretrained on similar data such as ImageNet and are highly correlated, so the IID assumption does not hold and the O(1/T) rate is unlikely to hold; the theory provides only qualitative motivation, and the quantitative law is discovered empirically.

    Key Design: Resolving Gradient Conflicts

    • The authors found that as T increases, the gradients of the logit ensemble cancel each other out and the gradient norm collapses, causing optimization to stagnate (Figure 2).
    • SSA-CWA is chosen: CWA [8] aligns gradients and seeks common weaknesses by encouraging a flatter loss surface and minimizing the second-order Taylor expansion; SSA [48] provides spectral input transformation. Pseudocode is in Appendix C (Algorithm 1).

    Experimental Protocol (Classifier Part)

    • Surrogate pool: 64 open-source models from Torchvision and Timm (AlexNet, DenseNet, EfficientNet, ResNet, ViT, DeiT, etc.; the full list is in Table 2 and Table 3 of Appendix B).
    • Sampling and generation: T takes 7 levels from 2^0 to 2^6; SSA-CWA runs 40 steps, ϵ=8/255, cross-entropy loss.
    • Batch generation protocol: 1000 source images are divided into 8 non-overlapping batches (125 images each), and a T-model ensemble is randomly resampled for each batch, so that the metrics for each T are averaged over 8 different random ensembles.
    • Data scale: each source image is paired with 8 target classes, for a total of 1000×8=8000 source-target pairs; 7 T values give a total of 56000 adversarial examples.

    Evaluation Method

    • Family 1/2 (classifiers, defense models): ASR = the proportion misclassified as the target label; cross-entropy loss is also recorded to verify the validity of ASR as a proxy metric.
    • Family 3 (MLLMs, Sec. 3): string matching against the target label text, using a lenient keyword list (Appendix D, Table 4) to identify semantic mentions of the target concept in the output.
    • Sec. 4 (MLLM benchmark): LLM-as-Judge, using GPT-4o to judge—counted as success only when the description mentions the target concept and does not mention the image being low-quality, noisy or modified (prompt in Appendix D, Figure 8).
  4. What experiments did the paper conduct?

    The log-linear scaling law is validated on classifiers, 6 defense models and 10 MLLMs; at T=12, GPT-4o ASR is 85.0%.

    Experimental Setup

    • Targets under test (Family 1): 7 standard classifiers—Swin-Transformers, ConvNeXt, ResNeXt, etc. (Figure 3 includes Swin-S/B/V2-S, ConvNeXt-B/S, ResNeXt-101-32x8d, ResNeXt-50-32x4d).
    • Targets under test (Family 2): 6 SOTA defenses—adversarial training (FGSMAT, EnsAT) and purification defenses (HGD, BDR, JPEG, DiffPure).
    • Targets under test (Family 3 and Sec. 4): LLaVA-1.5-7B, Qwen-2.5-VL-7B, Llama-3.2-11B-Vision (Sec. 3); GPT-4o, Claude-3.5-Sonnet, Gemini-2.5-Pro, Doubao-Seed-1.6, Llama-3.2-90B-Vision-Instruct, Qwen3-VL-235B-A22B-Instruct, DeepSeek-VL2 (Sec. 4).
    • Surrogate models: 64 open-source image classifiers (Sec. 3); 12 OpenCLIP pretrained CLIPs (Sec. 4, list in Table 5 of Appendix E).
    • Data and budget: NIPS17 1000 images × 8 target classes (Sec. 3, ϵ=8/255); 100 images randomly sampled × 8 classes = 800 pairs (Sec. 4, ϵ=16/255).
    • Evaluation method: MLLMs in Sec. 3 use lenient keyword string matching; Sec. 4 uses strict judgment with GPT-4o as LLM-as-Judge. Metrics for each T are averaged over 8 random ensembles.

    Main Results

    Table 1: under T=12, ϵ=16/255, LLM-as-Judge judgment, the average ASR of 7 MLLMs (averaged over 8 target classes):

    Target modelAverage ASR
    Qwen3-VL-235B0.90
    GPT-4o0.85
    Doubao-Seed-1.60.72
    Gemini-2.5-Pro0.69
    DeepSeek-VL20.59
    Llama-3.2-90B-Vision0.58
    Claude-3.5-Sonnet0.31

    (According to Table 1; the surrogate models are 12 CLIPs, and all target models differ from the surrogate models)

    • The authors state that this result exceeds the 40–50% ASR reported by prior methods on commercial models, and is a leap in practical capability.
    • The authors state that Claude-3.5-Sonnet shows strong resilience, in contrast to the high vulnerability of its direct competitor Gemini-2.5-Pro.
    • The authors consider the robustness of open-source models to be similarly differentiated, with DeepSeek-VL2 and Llama-3.2-90B at a medium robustness level.

    Discovery of the Scaling Law and Validation of Generality

    • Standard classifiers (Figure 3): The authors state that ASR grows linearly with log T, and cross-entropy loss shows a mirrored log-linear decrease; at small T (2^0, 2^1) the variance is large, and when ASR approaches 1.0 it saturates and flattens, with the law holding below the saturation threshold.
    • Defense models (Figure 4a): The authors state that the log-linear trend remains intact under 6 defenses; defenses lower the overall ASR but do not break the law, only increasing the T required to reach the same ASR. The authors state that this raises the ASR of DiffPure by more than 30%, of adversarially trained models by more than 20%, and of HGD by more than 50%.
    • MLLMs (Figure 4b, Figure 5): The authors state that the law holds across modalities; LLaVA-1.5-7B and Qwen-2.5-VL-7B have similar parameter counts (about 7B) and both have high robustness under single-model attack, but their average ASR curves diverge markedly with T, which the authors consider challenges the simple claim that "model scale = robustness".

    Ablation: Attack Settings and Optimizers

    • Non-targeted setting (Figure 6a): SSA-CWA, ϵ=2/255 (to avoid saturation), still shows a log-linear trend on Swin-B, ConvNeXt-B, ResNeXt50.
    • Optimizer comparison (Figure 6b): the logit ensemble family (MI-FGSM, DI-MI-FGSM, VMI-FGSM) has ASR stagnating at a low level and not scaling with T; the advanced ensemble family (MI-CWA, VMI-CWA, MI-SVRE) all show log-linear scaling. The authors state that this confirms the hypothesis that "scalability depends on the ensemble optimization strategy".

    Semantic Analysis of Perturbations

    • Visualization (Figure 7): on 5 classes of CIFAR10, at T=1 the perturbation is unstructured noise, and at T=64 the perturbation exhibits semantic features of the target class (e.g., the texture of Cat, the owl-like shape of Bird).
    • The authors' interpretation: scaling T forces the optimizer to discard model-specific "non-robust features" and learn robust semantic features of the target class, i.e., the "common weakness" is related to the semantic essence of the target class.

    Other Ablations and Analysis

    • The intercept (at T=1) represents the baseline vulnerability under single-model transfer attack, affected by the target architecture and target class (Sec. 3.3.2).
    • The slope represents "scaling efficiency", which the authors consider a key characteristic of the target model's robustness to scaling attacks (Sec. 3.3.2).
    • Metrics for each T are averaged over 8 randomly sampled ensembles, which the paper calls a statistically robust measurement (Sec. 3.2.3).
  5. What are some points that can be further explored?

    The authors acknowledge that the theoretical IID assumption does not hold and that the law has a domain of applicability; the experiments cover 64+12 surrogate models and 23 targets.

    Limitations and future directions noted by the authors

    • Gap between theory and practice (Sec. 3.1): the theorem relies on the IID assumption; in practice surrogate models are pretrained on similar datasets, share architectural biases, and are highly correlated, so the authors state that the O(1/T) asymptotic convergence rate is unlikely to hold; the theory provides only qualitative motivation and cannot quantitatively predict the empirical scaling law.
    • Domain of applicability of the law (Sec. 3.3.2): when T is small (2^0, 2^1), ASR has high variance, and the stable log-linear law is a statistical result after T increases; when ASR approaches 1.0 it saturates and the linear trend flattens, so the observed conclusions hold only below the saturation threshold.
    • Call for robustness evaluation (Sec. 1, Sec. 6): the authors call on the community to shift focus from designing complex algorithms on small ensembles to large-scale robustness evaluation, in order to build and verify truly robust foundation models.

    Scope of experiments

    • Surrogate models are 64 open-source image classifiers (Torchvision/Timm, Appendix B) and 12 open-source CLIPs (Appendix E), all from open-source platforms.
    • Target models fall into three categories: 7 standard classifiers, 6 defense models, 10 MLLMs (Sec. 3 tests 3 open-source ones; Sec. 4 tests 4 commercial + 3 open-source ones).
    • Data are NIPS17 images: Sec. 3 uses 1000 images × 8 target classes, 7 values of T, totaling 56000 samples; Sec. 4 uses 100 images × 8 classes = 800 pairs; perturbation visualization uses 5 classes from CIFAR10.
    • MLLM success determination: Sec. 3 uses lenient keyword string matching, Sec. 4 uses GPT-4o as LLM-as-Judge; the paper does not report the agreement between LLM judging and human judgment.
    • Attack iterations are 40 steps, ϵ=8/255 (Sec. 3) or 16/255 (Sec. 4); the paper does not report the total time or query cost of generating 56000 samples.
  6. Summarize the main content of the paper

    The authors state that black-box transfer attacks exhibit a log-linear scaling law: ASR grows linearly with the logarithm of the surrogate model ensemble size.

    This is an empirical study on the scaling law of black-box adversarial attacks, which the authors state is the first large-scale study.

    • Problem: transfer attacks improve black-box ASR by ensembling multiple surrogate models, but prior work used only small fixed ensembles; the authors found that simple ensembles suffer from gradient conflicts, where as T increases gradients cancel each other out and optimization stagnates.
    • Method: use SSA-CWA (SSA input transformation + CWA gradient alignment) to resolve gradient conflicts, scale T on a logarithmic scale over 64 open-source classifiers and 12 CLIP vision encoders, and measure the relationship between ASR and log T; the theoretical part gives an asymptotic convergence analysis under the IID assumption, which the authors acknowledge does not hold in practice.
    • Core finding: the authors state that ASR grows linearly with log T, holding on standard classifiers, 6 SOTA defenses and MLLMs; defenses only increase the T required to reach the same ASR and do not break the law (the authors state that the ASR of DiffPure is raised by more than 30% and that of HGD by more than 50%).
    • MLLM benchmark results (T=12, ϵ=16/255, GPT-4o judgment): Qwen3-VL-235B average ASR 90.0%, GPT-4o 85.0%, Gemini-2.5-Pro 69.0%, Claude-3.5-Sonnet only 31.0%, which the authors state shows clearly differentiated robustness levels.
    • Mechanism: visualization shows that as T increases from 1 to 64, the perturbation evolves from unstructured noise into semantic features of the target class; the authors believe scaling forces the optimizer to discard model-specific features and distill robust semantic features of the target class.
    • Authors' conclusion: scaling the ensemble is a principled, measurable threat vector, and the authors call for robustness evaluation to shift from complex algorithm design on small ensembles to understanding the threat of scaling itself.

Related papers

Show 3 more papers
Read originalarxiv.org