Paper commentary
Boosting Adversarial Attacks with Momentum
Momentum makes adversarial examples transfer better
- Problem Iterative attacks overfit the model they attack, so their examples fool other models poorly. Attacks that work well on one model usually transfer worst, which makes black-box attacks fail in practice.
- Method MI-FGSM adds momentum to iterative FGSM. It keeps a running sum of normalised gradients and steps along its sign, instead of the sign of the current gradient, which steadies each update.
- Results Attacking from Inc-v3, MI-FGSM scored 48.8 on Inc-v4, compared to 22.8 for I-FGSM.
Why transfer attacks stall
Adversarial examples are small input changes that flip a model's prediction, and they raise security concerns for deployed networks. What makes them useful to attackers without model access is transferability: an example made for one model often fools other models too. A weak transfer rate therefore means black-box attacks fail in practice.
The core difficulty is that attacks which work best on their own model tend to transfer worst. One-step FGSM transfers better but usually has a low success rate on the white-box model it is built on. Iterative methods reverse this pattern, which the authors tie to a trade-off between attack ability and transferability.
Papernot et al. [16] sidestep the trade-off by training a surrogate model with adaptive queries, which turns the black-box problem into a white-box one. That route needs full prediction confidences and a large number of queries, which is impractical on datasets such as ImageNet. So the goal becomes attacking a model without knowing its architecture or parameters, and without querying it.
Borrowing momentum from optimisation
The key idea is to keep a running direction across iterations, so that one noisy gradient can't steer the whole attack. The authors take this from the momentum method in optimisation, where past gradients are accumulated as a velocity vector. They argue that this helps the search pass narrow valleys and poor local maxima, a benefit they cite from earlier optimisation work.
The motivation starts from why iterative FGSM transfers poorly. Iterative FGSM moves the input along the sign of the current gradient at every step, so the example can settle into a poor local maximum and overfit the model. Plain FGSM avoids that greed but underfits, because its single step relies on a linear decision boundary that may not hold for large distortions.
Momentum is meant to keep the stability of smooth updates while still producing strong white-box attacks. The authors claim this softens the trade-off between attack ability and transferability.
How MI-FGSM computes each step
MI-FGSM takes a real example x, its label y, a perturbation budget \( \epsilon \), a number of iterations T and a decay factor \( \mu \). The step size is \( \alpha = \epsilon / T \), the accumulated gradient \( g_0 \) starts at zero, and the adversarial iterate starts at x.
At each iteration the loss gradient is divided by its L1 norm, and the result is added to \( \mu \) times the previous accumulation. \[ g_{t+1} = \mu \cdot g_t + \frac{\nabla_x J(x^*_t, y)}{\lVert \nabla_x J(x^*_t, y) \rVert_1} \] The L1 normalisation matters because gradient magnitudes change from one iteration to the next, and the authors note that any distance measure would be feasible.
The iterate then moves by \( \alpha \) in the direction of the sign of this accumulated gradient, not the sign of the current gradient. \[ x^*_{t+1} = x^*_t + \alpha \cdot \operatorname{sign}(g_{t+1}) \] With \( \mu \) equal to 0 the accumulation drops out and the method reduces to I-FGSM. Because \( \alpha = \epsilon / T \), T steps reach the epsilon bound, and the iterate is clipped to stay within it.
The same accumulation carries over to other settings. For L2-bounded attacks the accumulated gradient is divided by its L2 norm, which gives MI-FGM. Targeted variants subtract the step instead of adding it, so the example moves toward the target class.
Single-model black-box results
The authors test on ImageNet with seven models, using 1000 images that all seven models classify correctly. Each attack uses a maximum perturbation of 16 on pixel values from 0 to 255, with 10 iterations for the iterative methods and a decay factor of 1.0. Table 1 reports attacks crafted on Inc-v3, Inc-v4, IncRes-v2 and Res-152.
On the white-box model, MI-FGSM keeps I-FGSM's strength and scores 100.0 on Inc-v3. The black-box gap is larger: from Inc-v3, MI-FGSM scored 48.8 on Inc-v4, compared to 22.8 for I-FGSM. The authors say MI-FGSM gets more than twice the success rate of I-FGSM in most black-box cases, and they read this as momentum reducing overfitting to the attacked model.
The method still struggles with adversarially trained models, with less than 16% success on IncRes-v2ens in the black-box setting. The ensemble experiments are the authors' next step against that gap.
Decay factor and iteration count
The decay factor sets how much earlier gradients count, so the authors sweep it from 0.0 to 2.0 in steps of 0.1 on Inc-v3. Black-box success has a single peak, near \( \mu = 1.0 \), which is why the other experiments use 1.0. At \( \mu = 1.0 \) the accumulated term is simply the sum of all previous normalised gradients.
Next the iteration count runs from 1 to 10 at epsilon 16 and decay factor 1.0. I-FGSM's black-box success falls as iterations increase, while MI-FGSM stays at a high value. They read this as iterative attacks overfitting the white-box model, with momentum keeping transfer alive.
Do the update directions really stabilise?
To test the stability explanation, the authors compute the cosine similarity between successive perturbations over the iterations. Successive MI-FGSM perturbations are more similar than I-FGSM's, which the authors read as more stable update directions. This measurement is averaged over 1000 images and shown for Inc-v3 only.
The authors argue that decision boundaries of different models are similar but not identical, leaving exceptional regions that are hard to transfer into. They suggest momentum helps escape those regions, and that it also enlarges the L2 norm of the perturbation, which may aid transfer.
Perturbation size and black-box rate
The authors vary epsilon from 1 to 40 on the 0 to 255 pixel range, with a step size of 1, so the iteration count grows with epsilon. They evaluate Inc-v3 as the white-box model and Res-152 as the black-box model.
On the white-box model the iterative methods reach 100 quickly, while one-step FGSM declines at large epsilon. On Res-152 all three methods improve with epsilon, but MI-FGSM improves faster. So MI-FGSM can reach a required black-box success rate with a smaller, less visible perturbation. The authors attribute the FGSM decline to the linearity assumption failing at large perturbations.
Fusing logits across models
An example that fools several models may capture a direction that also fools models outside the set. The authors compare three ways to combine models, and their preferred one fuses logits.
Logits are the inputs to the softmax, and the attack combines the logit vectors of K models with a weighted sum. \[ l(x) = \sum_{k=1}^{K} w_k \, l_k(x) \] The weights satisfy \( w_k \geq 0 \) and sum to 1, and the loss is the softmax cross-entropy of the fused logits against the one-hot label.
The two alternatives average the predicted probabilities or average the per-model losses. The three schemes differ only in where the outputs of the models are combined.
Ensemble fusion results
Each run holds one of four models out and attacks an equal-weight ensemble of the other three with FGSM, I-FGSM or MI-FGSM. Epsilon is 16, the iterative methods run 10 iterations, and the decay factor is 1.0.
With Inc-v3 held out, MI-FGSM scores 87.9 under logits fusion, compared to 83.3 for predictions and 81.9 for loss. Logits fusion comes out ahead for every attack and hold-out model in the table, which the caption also states. The authors take this as the reason to prefer logits fusion for attacks.
Attacking adversarially trained models
The authors use all seven models and hold one adversarially trained model out at a time. The ensemble has the other six models with equal logit weights, epsilon 16, decay factor 1.0 and 20 iterations.
With Inc-v3ens4 held out, MI-FGSM scores 40.3, compared to 18.7 for I-FGSM and 15.0 for FGSM. The authors say the adversarially trained models can't defend effectively, since more than 40 percent of examples fool Inc-v3ens4. They call these the most robust ImageNet models they know of, and they conclude that such models remain vulnerable to black-box attacks of this kind.
Competition configurations
The competition provided 5000 ImageNet-compatible images, with perturbation sizes from 4 to 16 set by the organisers. Each attack produced one adversarial example per image, and every example ran through all defense submissions. The authors won the first places in the non-targeted and targeted attack tracks with this method.
The non-targeted entry fused logits over seven models plus Inc-v3adv, with weights 1/7.25 for the first seven and 0.25/7.25 for Inc-v3adv. It ran 10 iterations with decay factor 1.0.
The targeted entry switched configuration by perturbation size. Those two cases used 40 and 20 iterations respectively, with decay factor 1.0.
Why transfer resembles generalisation
The authors treat finding an adversarial example as analogous to training a model, and transferability as analogous to generalisation. On this view, the adversarial example is trained on a set of models as its training data. Momentum and ensembles then improve transfer for a reason similar to why they improve generalisation in ordinary training.
They suggest other generalisation tricks, such as SGD, could also be added to attacks.
Limitations
The main-text experiments cover only non-targeted L-infinity attacks, and the L2 and targeted results are kept in supplementary material. Experiments use 1000 ImageNet validation images that all seven models classify correctly, so other image sets were not tested.
Single-model momentum attacks remain weak against adversarially trained models, as the single-model results show. The ensemble results use fixed settings: equal weights, epsilon 16 and decay factor 1.0, so tuning per target was not tested.
Paper info
- Authors
- Yinpeng Dong, Fangzhou Liao, Tianyu Pang, Hang Su, Jun Zhu, Xiaolin Hu, Jianguo Li
- Venue
- arXiv · Preprint
- First published
- 2017-10-17
- Added
- 2026-11-12
- Updated
- 2018-3-22
- Version
- v3
- arXiv
- 1710.06081
- Category
- cs.LG · stat.ML
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Yinpeng Dong, Fangzhou Liao, Tianyu Pang, Hang Su, Jun Zhu, Xiaolin Hu, Jianguo Li (2017). Boosting Adversarial Attacks with Momentum. arXiv:1710.06081v3. https://arxiv.org/abs/1710.06081v3
BibTeX
@misc{dong2017boosting,
title = {{Boosting Adversarial Attacks with Momentum}},
author = {Yinpeng Dong and Fangzhou Liao and Tianyu Pang and Hang Su and Jun Zhu and Xiaolin Hu and Jianguo Li},
year = {2017},
eprint = {1710.06081},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1710.06081v3}
}