DifAttack: Query-Efficient Black-Box Adversarial Attack via Disentangled Feature Space

Jun Liu, Jiantao Zhou, Jiandian Zeng, Jinyu TianAAAI 2024

Abstract

Score-based black-box adversarial attacks often suffer from high query complexity and poor transferability in open-set scenarios. This paper introduces DifAttack, a novel approach that leverages a disentangled feature space to optimize adversarial perturbations. By separating an image into adversarial and visual components using a specialized autoencoder, DifAttack restricts the search space to the most influential features. Experimental results demonstrate that DifAttack achieves state-of-the-art success rates while reducing query counts by over 40% on benchmarks like ImageNet and CIFAR-10, even proving effective against commercial APIs.

Introduction

Deep Neural Networks (DNNs) are notoriously vulnerable to Adversarial Examples (AEs)—images modified with imperceptible noise that cause models to fail. In a "black-box" setting, the attacker lacks knowledge of the model's architecture or weights and can only observe output scores (probabilities).

The primary challenge with current score-based attacks is efficiency. Most methods attempt to optimize the entire image or a high-dimensional feature space, requiring thousands of queries to the victim model. This high query volume is computationally expensive, slow, and easily detected by security systems. Furthermore, many attacks rely on surrogate models to estimate gradients, which often fail in open-set scenarios where the victim model was trained on a different dataset than the surrogate.

Methodology: Disentangled Feature Space

DifAttack operates on the principle that an image's latent representation can be split into two distinct parts: the Adversarial Feature ($z_a$), which dominates the image's ability to deceive a classifier, and the Visual Feature ($z_v$), which determines the actual appearance of the image.

The Two-Stage Approach

  1. Training Stage: The authors utilize an autoencoder equipped with a custom Decouple-Fusion (DF) module. Using pairs of clean images and AEs generated via local white-box attacks, the network learns to separate $z_a$ from $z_v$. A specific loss function ensures that swapping these features between images changes their adversarial effect without compromising visual quality.
  2. Attack Stage: When targeting a black-box model, DifAttack keeps the visual feature ($z_v$) of the target image fixed. It then employs a Natural Evolution Strategy (NES)—an iterative optimization algorithm—to perturb only the adversarial feature ($z_a$) based on the victim model's feedback. Because the search space is significantly more focused, the algorithm identifies a successful AE much faster than traditional methods.

Experimental Evaluation

The researchers evaluated DifAttack on several standard benchmarks, including ImageNet-1k, CIFAR-10, and CIFAR-100. CIFAR-100 was specifically used for open-set testing, where the autoencoder was trained on CIFAR-10 but used to attack models trained on CIFAR-100.

Key Results

  • Query Efficiency: In targeted attacks on ImageNet, DifAttack reduced the average number of queries by over 40% compared to state-of-the-art (SOTA) methods like CGA and SimBA.
  • Success Rate: The method achieved a 100% Attack Success Rate (ASR) in nearly all targeted and untargeted scenarios on ImageNet and CIFAR-10.
  • Open-Set Performance: DifAttack maintained high success rates in open-set scenarios where competitors struggled, demonstrating superior generalizability.
  • Real-World Viability: The method successfully attacked the commercial Imagga API, achieving a 90% untargeted success rate with an average of only 91 queries.
  • Defense Robustness: Adversarial examples generated by DifAttack proved more "natural" and were harder to mitigate using standard defensive purifiers like NRP or DiffPure.

Discussion and Insights

DifAttack’s success stems from its search space efficiency. By isolating the adversarial signal, the attack avoids wasting queries on pixels that only affect aesthetics. Furthermore, optimizing in the disentangled space prevents the "truncation" problem; in standard attacks, large pixel changes are often clipped to stay within a budget (e.g., $l_\infty$ constraint), slowing optimization. DifAttack’s features are inherently more potent, requiring smaller changes to achieve the same misclassification effect.

Limitations

Despite its efficiency, DifAttack requires an offline training phase using surrogate models to learn the initial disentanglement. Additionally, the Decouple-Fusion autoencoder introduces more architectural complexity than simpler "pixel-flipping" or random search attacks.

Conclusion

DifAttack represents a significant advancement in black-box adversarial attacks by shifting the optimization from the pixel or raw feature level to a disentangled latent space. This approach not only drastically reduces the query overhead but also enhances the transferability of attacks across different model domains and real-world APIs.

Summary updated

BibTeX
@inproceedings{liu2024difattack,
  author = {Jun Liu and Jiantao Zhou and Jiandian Zeng and Jinyu Tian},
  title = {{DifAttack: Query-Efficient Black-Box Adversarial Attack via Disentangled Feature Space}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i4.28156},
}
Figure