Transferable Sparse Adversarial Attack

Ziwen He, Wei Wang, Jing Dong, Tieniu Tan

Abstract

Adversarial attacks typically involve dense perturbations that are easily overfitted to a specific model's decision boundary, limiting their transferability to black-box models. Sparse adversarial attacks, which modify only a small subset of pixels, face even greater challenges in transferability and computational efficiency. This paper introduces the Transferable Sparse Adversarial Attack (TSAA), a generative approach that decouples perturbation amplitude from position. By training a generator to produce sparse masks and intensities, TSAA achieves state-of-the-art transferability and operates up to 700x faster than traditional optimization-based methods.

Introduction

Deep Neural Networks (DNNs) are notoriously vulnerable to adversarial examples—inputs specifically crafted to trigger misclassification. While most research focuses on "dense" attacks where every pixel is slightly modified, "sparse" attacks modify only a few pixels, often by a larger magnitude. These sparse modifications are dangerous because they can be harder to detect and defend against.

However, sparse attacks suffer from two major drawbacks: poor transferability and high computational cost. Because sparse attacks often "overfit" the specific geometry of a source model's decision boundary, they frequently fail to fool different target models. Furthermore, identifying the optimal pixels to perturb is an NP-hard problem, typically requiring slow, iterative optimization processes that are impractical for real-time applications.

Methodology

To overcome these hurdles, the authors propose moving away from per-image optimization toward a Generative Network approach. Instead of finding a perturbation for one image, they train a generator to learn the underlying distribution of effective adversarial features.

Decoupling Amplitude and Position

The core of the TSAA architecture is a decoupling strategy. The generator utilizes a single encoder but splits into two distinct decoder branches:

  1. Amplitude Branch ($r$): Determines the potential intensity of the change for every pixel.
  2. Position Branch ($m$): Generates a binary mask (0 or 1) to select which pixels are actually modified.

The final adversarial perturbation is calculated as the element-wise product of these two outputs ($\delta = r \odot m$).

Architecture of the TSAA Generator, showing the decoupling of amplitude (r) and position (m) branches.

Random Quantization Operator

A significant technical challenge in training this architecture is that discrete binary masks are non-differentiable, preventing standard backpropagation. The authors introduce a Random Quantization Operator to solve this. During training, the model randomly switches between continuous values and quantized binary values, allowing gradients to flow while forcing the network to learn a truly sparse output. An $l_1$ penalty is applied to the mask to minimize the number of pixels selected.

Key Results

The TSAA method was evaluated on the ImageNet dataset using Inception-v3 and ResNet-50 as source models, with VGG16 and DenseNet-161 as black-box targets.

Transferability and Efficiency

TSAA demonstrates a significant leap in performance over previous state-of-the-art (SOTA) methods like GreedyFool. As shown in the results for $l_\infty = 255$, TSAA achieves much higher fooling rates on black-box models while maintaining lower sparsity and vastly superior speed.

Comparison of TSAA against SOTA methods ($l_\infty = 255$), highlighting superior transferability and speed.
  • Higher Success Rates: When attacking a black-box ResNet-50 using an Inception-v3 source, TSAA achieved a 63.76% fooling rate by perturbing only 0.46% of pixels. In contrast, GreedyFool achieved only a 15.09% fooling rate despite modifying more pixels (0.67%).
  • Massive Speedup: Because TSAA uses a feed-forward generator rather than iterative optimization, it is roughly 700x faster than existing methods. It generates adversarial images in approximately 6 milliseconds, compared to over 20 seconds for optimization-based techniques.
  • Robustness: Even under strict constraints ($l_\infty = 10$), TSAA maintained a 45.32% transferability rate, whereas SOTA methods dropped to approximately 10%.

Discussion and Conclusion

The success of TSAA suggests that many pixels modified in traditional dense attacks are redundant; a well-placed sparse attack can be just as effective and significantly more transferable. By training on a large dataset, the generator learns features that fool entire classes of models rather than specific instances, effectively preventing overfitting to the source model's decision boundary.

Despite these gains, challenges remain. Targeted attacks—forcing a model to predict a specific incorrect label—are still difficult for sparse methods to achieve across different architectures. Additionally, transferability varies by target class, suggesting that some labels are more robust to sparse perturbations than others. Future work may involve testing these sparse modifications in physical-world scenarios to evaluate their robustness against environmental factors like lighting and camera angles.

Summary updated

BibTeX
@misc{he2021transferable,
  author = {Ziwen He and Wei Wang and Jing Dong and Tieniu Tan},
  title = {{Transferable Sparse Adversarial Attack}},
  year = {2021},
  eprint = {2105.14727},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.14727},
}
Figure