Skip to content

Query-Efficient Black-Box Adversarial Attack Method Based on Zeroth-Order Natural Gradient DescentTowards Query-Efficient Black-Box Adversary with Zeroth-Order Natural Gradient Descent

arXiv· arXiv:2002.07891· Pu Zhao, Pin-Yu Chen, Siyue Wang, Xue LinNortheastern University; IBM ResearchIndexed by this site · 27 days ago· Originally publishedAttacks

Quick read

Attacks

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

The authors propose the ZO-NGD black-box adversarial attack, which outperforms NES-PGD and Bandits[TD] on ImageNet with an average of 582 queries and a 97% success rate (Table 2).

Threat modelBlack-box image classification adversarial attack: the attacker can only submit input images and obtain the model's output scores/probabilities, and cannot access the model's internal structure and parameters; the main focus is untargeted attack, with perturbations constrained by the l∞ norm ε.

Questions
In black-box adversarial attacks, the attacker can only query the model to obtain output probabilities, and the number of queries determines stealthiness and cost; the authors argue that existing black-box methods are mostly based on first-order gradient descent, converge relatively slowly, and are sensitive to hyperparameter settings.
Methods
Proposes ZO-NGD: uses zeroth-order stochastic gradient estimation to compensate for the gradients unavailable in the black-box setting, while extracting the Fisher information matrix for free from the same batch of queries, updates the perturbation with second-order natural gradient descent, and scales to high-dimensional data through an outer-product approximation, damping, and a technique that avoids explicit inversion.
Experiments and results
Compared with ZOO, NES-PGD, and Bandits[TD] on MNIST, CIFAR-10, and ImageNet, ZO-NGD has the lowest average number of queries (e.g., 582 queries with ASR 97% on ImageNet); the authors report that its transfer attack ASR is also higher than NES-PGD's.
Limitations and future work
The authors note that ZOO's ASR is higher than ZO-NGD's and discuss the relationship between ASR and query count in the appendix; the experiments cover three image classification datasets and five model architectures, and the number of repeated experiments and variance are not reported.
Experimental setupCNN for MNIST (four convolutional layers, two max pooling layers, two fully connected layers, 99.6% accuracy)、CNN for CIFAR-10 (same architecture as the MNIST model, 80% accuracy) et al. · MNIST、CIFAR-10 et al. · success rate (ASR)、average queries et al.
Evaluated models
CNN for MNIST (four convolutional layers, two max pooling layers, two fully connected layers, 99.6% accuracy)CNN for CIFAR-10 (same architecture as the MNIST model, 80% accuracy)Inception v3ResNetVGG16
Benchmarks
MNISTCIFAR-10ImageNet
Metrics
success rate (ASR)average queriesquery reduction ratio
AI summaryResearchers propose a zeroth-order natural gradient descent method, ZO-NGD, for designing more query-efficient black-box adversarial attacks. The method combines zeroth-order gradient estimation for black-box settings with second-order natural gradient descent, addressing the problems that existing black-box attacks mostly use first-order gradient descent, converge slowly and are sensitive to hyperparameters. Empirical evaluation on image classification datasets shows that ZO-NGD's model query complexity is significantly lower than that of state-of-the-art attack methods.

Researchers propose a zeroth-order natural gradient descent method, ZO-NGD, for designing more query-efficient black-box adversarial attacks. The method combines zeroth-order gradient estimation for black-box settings with second-order natural gradient descent, addressing the problems that existing black-box attacks mostly use first-order gradient descent, converge slowly and are sensitive to hyperparameters. Empirical evaluation on image classification datasets shows that ZO-NGD's model query complexity is significantly lower than that of state-of-the-art attack methods.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    To address the high query cost of black-box adversarial attacks, the authors propose using second-order natural gradient descent to improve query efficiency.

    Core question: how to generate adversarial examples with fewer queries in a black-box setting where only the model's output probabilities can be queried.

    • Scenario and motivation: the authors note that black-box attacks are closer to the practical scenario of "machine-learning-deployed-as-a-service" (e.g., Google Cloud Vision API); fewer queries make an attack more efficient, whereas a large number of queries may expose the attacker and is costly when billing is per query.
    • Shortcomings of existing methods: the authors argue that most existing white-box and black-box attacks are based on first-order gradient descent and suffer from relatively slow convergence and sensitivity to hyperparameter settings; although second-order optimization may converge faster, it has been less explored in adversarial attacks due to high computational cost.
    • Core observation: during the query process of zeroth-order gradient estimation, the Fisher information matrix (FIM) can be extracted as a by-product without additional queries, thereby enabling second-order natural gradient descent (NGD) to accelerate convergence.
    • Proposed in the paper: ZO-NGD (zeroth-order natural gradient descent), combining zeroth-order stochastic gradient estimation with second-order NGD, with an implementation that avoids explicit computation and inversion of the FIM, keeping computational complexity at no more than the input image dimension rather than its square.
    • Threat model:
      • Goal: generate adversarial examples for image classification DNNs to make the model misclassify; the main focus is untargeted attack.
      • Knowledge: black-box; the attacker does not know the model's internal structure, parameters, or configuration.
      • Capability: can only submit input images and obtain the model's output scores/probabilities.
      • Victim systems: image classification DNNs (in the experiments, self-trained CNNs, Inception v3, VGG16, and ResNet).
  2. What related research exists?

    Related work is divided into two categories: black-box attacks (gradient estimation, heuristics) and second-order optimization; this paper positions itself as the first work to apply NGD to adversarial attacks (per the authors).

    Black-box attacks based on gradient estimation

    • ZOO (Chen et al. 2017b) — performs zeroth-order gradient estimation pixel by pixel, then uses the estimated gradient to execute the white-box C&W attack; the paper notes its high success rate but that estimating the gradient element by element makes it computationally intensive with a large query count.
    • NES-PGD (Ilyas et al. 2018) — estimates gradients based on Natural Evolutionary Strategies and Monte Carlo approximation, attacking ImageNet classifiers under a stricter threat model.
    • Bandits[TD] (Ilyas, Engstrom, and Madry 2018) — uses time-dependent and data-dependent priors to improve the query efficiency of gradient estimation.
    • Ye et al. 2018 — applies second-order optimization to black-box attacks; the paper notes that it explores Hessian information in parameter space and requires additional queries, whereas this paper exploits Fisher information in distribution space and obtaining the FIM requires no additional queries.

    Heuristic black-box attacks

    • Transfer attack (Papernot, McDaniel, and Goodfellow 2016) — first trains a substitute model on data labeled by the target model, then performs a white-box attack on the substitute model and transfers it; the paper notes that its success rate may be limited by low similarity between the substitute model and the target model.
    • Boundary method (Brendel, Rauber, and Bethge 2017) — reduces perturbation by random walking along the misclassification boundary; the paper notes its high computational complexity and lack of convergence guarantees.

    Second-order optimization

    • NGD is proven to achieve Fisher efficiency by using the FIM instead of the Hessian (Amari 1998; Martens 2014), but the FIM is expensive to compute, store and invert; K-FAC (Grosse and Martens 2016) proposes a Kronecker factorization approximation for training DNNs.
    • Osawa et al. 2018 — uses NGD to train ResNet-50 on ImageNet for 35 epochs.

    Baselines and benchmarks: the baselines compared in the experiments are Transfer attack, ZOO, NES-PGD and Bandits[TD], and the datasets are MNIST, CIFAR-10 and ImageNet.

    The authors state that this paper is the first work to derive the FIM and apply second-order NGD to adversarial attacks, differing from white-box and black-box attacks based on first-order methods.

  3. How does the paper address this problem?

    ZO-NGD uses zeroth-order queries to simultaneously estimate the loss gradient and the log-likelihood gradient, obtains the FIM for free, and then performs natural gradient updates.

    Overall idea: model the black-box attack as a perturbation optimization problem and solve it with ZO-NGD (zeroth-order natural gradient descent)—zeroth-order stochastic gradient estimation addresses the unavailability of gradients under black-box settings, and second-order NGD uses Fisher information incidentally extracted during queries to accelerate convergence.

    Problem formulation

    • Given a legitimate image x and the correct label t, find a perturbation δ such that x+δ is misclassified: minδ ∈ S f(x+δ, t), where S constrains pixels to [0,1] and the l∞ norm to no more than ε.
    • The loss function takes the C&W form: f(x+δ,t) = max{log p(t|x+δ) − maxi≠ tlog p(i|x+δ), −κ}; log probabilities are used to reduce the influence of the dominant class; the main focus is untargeted attack.

    Fisher information matrix and natural gradient

    • The FIM is defined as the covariance of the score function (the gradient of the log-likelihood with respect to δ); since q(x) does not depend on δ, the FIM can be written as an expectation over the model output distribution p(t̃|x,δ).
    • The natural gradient is the inverse of F multiplied by the loss gradient; the update is δ minus λ times the natural gradient, projected back onto S.
    • An outer-product approximation is used (using only the true label t, yielding a rank-one matrix) rather than a Monte Carlo approximation; the authors state that the outer-product approximation requires no additional queries; the appendix uses empirical evidence to show that the correct label usually dominates the probability distribution, so the approximation is reasonable.

    Zeroth-order gradient estimation

    • Based on Gaussian smoothing approximation, finite differences are computed using R random directions uj sampled uniformly on the unit sphere: each iteration queries the model R+1 times and simultaneously obtains a loss gradient estimate and a log-likelihood gradient estimate; the latter is used to compute the FIM and incurs no additional queries. The authors state that this is the main difference between ZO-NGD and other zeroth-order methods.

    Damping and high-dimensional scalability

    • Damping: the FIM eigenvalue distribution is long-tailed, and direct inversion would cause training instability, so a positive constant γ is added to the FIM diagonal to bound the maximum eigenvalue of the inverse matrix.
    • Scalability: an ImageNet image has about 270,000 pixels, and the FIM contains billions of elements; the update formula derived by the authors requires first computing a scalar and then summing two vectors, with internal computation dimension at most equal to the image dimension d rather than d², avoiding explicit computation and storage of the FIM and its inverse. The authors note that K-FAC's assumption of uncorrelated channels does not hold in the adversarial example setting, so it was not adopted.

    Geometric interpretation

    • The authors give a lemma: the negative natural gradient is the direction of steepest descent in distribution space (with distance measured by KL divergence), and this direction is invariant to the model parameterization; the FIM can be viewed as the Hessian of the KL divergence, i.e., the curvature of distribution space. The proof is in the appendix.
  4. What experiments did the paper conduct?

    Comparing four black-box attacks on MNIST, CIFAR-10, and ImageNet, ZO-NGD has the lowest average number of queries in all cases.

    Experimental setup

    • Models evaluated: one self-trained network each for MNIST and CIFAR-10 (four convolutional layers, two max-pooling layers, two fully connected layers, and one softmax layer, with accuracies of 99.6% and 80% respectively); pretrained Inception v3 for ImageNet (top-5 accuracy 96%); VGG16 and ResNet are additionally used in ablation experiments.
    • Datasets and sample sizes: 2000 randomly selected correctly classified test images each for MNIST and CIFAR-10; 1000 randomly selected correctly classified images for ImageNet; white-box experiments report the average number of queries over 500 images.
    • Baselines: Transfer attack (applying a C&W attack to a substitute model), ZOO, NES-PGD; on ImageNet, Bandits[TD] is additionally compared, without transfer attack (the authors state that training a substitute model on ImageNet is not easy). The implementations of ZOO and NES-PGD are based on the GitHub code released by the authors.
    • Metrics: attack success rate, average queries for successful adversarial examples, and reduction ratio in queries relative to ZOO.
    • Hyperparameters: the number of samples R=40 for ZO-NGD; ε is 0.4 on MNIST and 0.2 on CIFAR-10 and ImageNet; µ=1; γ=0.01. Image pixels are normalized to [0,1].
    • Hardware: NVIDIA GTX 1080 TI GPU; the paper does not report the number of repeated experiments.

    Main results

    Black-box attack results (according to Table 1 and Table 2; query counts are averages over successful samples, and reduction ratio is computed relative to ZOO):

    Swipe horizontally to read the table

    DatasetMethodSuccess rateAverage queriesQuery reduction ratio
    MNISTTransfer attack82%not reportednot reported
    MNISTZOO100%8,3000%
    MNISTNES-PGD98.2%1,24385%
    MNISTZO-NGD98.7%52393.7%
    CIFAR-10ZOO99.8%6,5000%
    CIFAR-10NES-PGD98.9%41793.6%
    CIFAR-10ZO-NGD99.2%13198%
    ImageNetZOO98.9%16,8000%
    ImageNetNES-PGD94.6%1,32592.1%
    ImageNetBandits[TD]96.1%79195.3%
    ImageNetZO-NGD97%58296.5%

    (The Transfer attack row for CIFAR-10 has a success rate of 85%, with query count not reported.)

    • The authors state that ZO-NGD successfully generates adversarial examples with the fewest queries on all three datasets, attributing this to faster convergence from second-order optimization using Fisher information.
    • The authors note that ZO-NGD also outperforms Bandits[TD], which uses prior information, because the latter is still based on first-order gradient descent.
    • Exception: ZOO's success rate is higher than ZO-NGD's on MNIST (100%) and CIFAR-10 (99.8%); the authors mention this in the ablation section and discuss the relationship between ASR and query count in the appendix.

    White-box setting comparison

    • What was measured: in the white-box setting, NGD is compared with PGD in adversarial training (a first-order method); a query is defined as one forward pass plus one backward pass, and the average number of queries for successful adversarial examples over 500 images is reported.
    • Results: on MNIST, NGD 2.12 queries and PGD 4.88 queries (ε=0.2); on CIFAR-10, NGD 2.06 queries and PGD 4.21 queries (ε=0.1); on ImageNet, NGD 2.20 queries and PGD 5.62 queries (ε=0.05).
    • The authors state that NGD achieves higher query efficiency by introducing the FIM.

    Transferability

    • What was measured: ZO-NGD is used to generate 500 targeted adversarial examples on ImageNet (Inception, ε=0.1), which are used in transfer attacks against ResNet and VGG16.
    • Results: ASR is 94.4% against ResNet and 95.6% against VGG16; NES-PGD achieves 92.1% and 92.9% respectively.
    • The authors state that the samples generated by their method have high transferability, with transfer ASR higher than NES-PGD.

    Other ablations and analyses

    • Model architecture (Table A1): on VGG16 and ResNet, ZO-NGD has lower query counts than NES-PGD, e.g., on ImageNet (ResNet), ZO-NGD 624 queries with ASR 98.1%, and NES-PGD 1281 queries with ASR 97.2%.
    • Parameters µ and ε (Table A2, ImageNet Inception): with ε=0.2 fixed, the ASR for µ of 1, 0.1, and 0.01 is 97.3%, 97%, and 96.6%, and the authors state that performance is robust to µ; with µ=0.1 fixed, the query counts for ε of 0.15, 0.2, and 0.25 are 619, 583, and 559, and the authors state that a larger ε leads to fewer queries.
    • Damping parameter γ (Figure A2(a)): the authors state that 0.01 or 0.001 is a suitable value for γ, which can effectively reduce the loss over a relatively large range.
    • Outer-product approximation (Figure A2(b)): the top-10 average predicted probabilities of 1000 correctly classified images on CIFAR-10 and ImageNet show that the correct label usually dominates the distribution, on which basis the authors consider the outer-product approximation reasonable.
    • Query count distribution (Figure 2): gives the cumulative distribution (CDF) of query counts over 1000 images on the three datasets, which the authors state verifies the query efficiency of ZO-NGD; the specific curve values are not visible in the converted text.
  5. What are some points that can be further explored?

    The authors mention that ZOO's ASR is higher and discuss it in the appendix; there is no dedicated limitations section; the experiments cover three datasets and five architectures.

    Limitations and future directions noted by the authors

    • In the Ablation study section, the authors note that ZOO's ASR is higher than ZO-NGD's, and discuss the relationship between ASR and query count in the appendix.
    • In the Related Work section, the authors note that K-FAC's assumption of uncorrelated channels does not hold in the application of finding adversarial examples, so the FIM cannot be block-diagonalized; this paper instead uses another approach to compute the inverse of the high-dimensional FIM.
    • The paper has no dedicated Limitations or Future Work section and proposes no explicit future research directions.

    Scope of experiments

    • The models tested are four-layer CNNs trained on MNIST/CIFAR-10 respectively, and Inception v3 on ImageNet; the ablation experiments additionally include VGG16 and ResNet, five model architectures in total (Table 1, Table 2, Table A1).
    • The evaluation benchmarks are three image classification datasets: MNIST, CIFAR-10 and ImageNet; the black-box experiment sample sizes are 2000 correctly classified images each for MNIST/CIFAR-10 and 1000 for ImageNet, and the white-box experiments use 500.
    • The compared methods are Transfer attack, ZOO and NES-PGD, with Bandits[TD] additionally included on ImageNet; no transfer attack baseline was done on ImageNet (the authors state that training a substitute model on ImageNet is not easy).
    • The attack type is mainly untargeted attack; the transferability experiments use 500 targeted adversarial examples (ε=0.1).
    • The paper does not report the number of repeated experiments, the variance or confidence intervals of query counts, nor the running time of the attacks.
  6. Summarize the main content of the paper

    ZO-NGD introduces second-order natural gradient descent into black-box adversarial attacks and generates adversarial examples with the fewest queries on three datasets.

    A paper on a black-box adversarial attack method, addressing the problem of high query cost for image classification DNNs under the setting where only output probabilities can be queried.

    • Method: ZO-NGD combines zeroth-order stochastic gradient estimation with second-order natural gradient descent; each round of R+1 queries simultaneously estimates the loss gradient and the log-likelihood gradient, the latter freely constructs the Fisher information matrix (outer-product approximation plus damping), and algebraic manipulation avoids explicitly computing and inverting the high-dimensional FIM, making the computational complexity the same order as the image dimension.
    • Black-box main results (Table 1, 2): on MNIST an average of 523 queries, ASR 98.7%; on CIFAR-10, 131 queries, ASR 99.2%; on ImageNet (Inception v3), 582 queries, ASR 97%; on all three datasets the query counts are lower than ZOO, NES-PGD and Bandits[TD], with the highest query reduction rate relative to ZOO reaching 98% (CIFAR-10).
    • White-box results: NGD's average query counts on the three datasets (2.06–2.20) are all lower than PGD's (4.21–5.62).
    • Transferability: the 500 targeted samples generated by ZO-NGD on Inception achieve ASR of 94.4% and 95.6% when transferred to attack ResNet and VGG16, higher than NES-PGD's 92.1% and 92.9%.
    • Exception: ZOO's ASR on MNIST and CIFAR-10 (100%, 99.8%) is higher than ZO-NGD's; the authors discuss the relationship between ASR and query count in the appendix.
    • Authors' conclusion: the authors state that ZO-NGD demonstrates faster convergence and higher query efficiency on the three datasets, and the authors state it is the first work to apply Fisher information and second-order NGD to adversarial attacks.

Related papers

Show 3 more papers
Read originalarxiv.org