Diversifying the High-level Features for better Adversarial Transferability

Zhiyuan Wang, Zeliang Zhang, Siyuan Liang, Xiaosen Wang · OpenReview

Abstract

Given the great threat of adversarial attacks against Deep Neural Networks (DNNs), numerous works have been proposed to boost transferability to attack real-world applications. However, existing attacks often utilize advanced gradient calculation or input transformation but ignore the white-box model. Inspired by the fact that DNNs are over-parameterized for superior performance, we propose diversifying the high-level features (DHF) for more transferable adversarial examples. In particular, DHF perturbs the high-level features by randomly transforming the high-level features and mixing them with the feature of benign samples when calculating the gradient at each iteration. Due to the redundancy of parameters, such transformation does not affect the classification performance but helps identify the invariant features across different models, leading to much better transferability. Empirical evaluations on ImageNet dataset show that DHF could effectively improve the transferability of existing momentum-based attacks. Incorporated into the input transformation-based attacks, DHF generates more transferable adversarial examples and outperforms the baselines with a clear margin when attacking several defense models, showing its generalization to various attacks and high effectiveness for boosting transferability.

Introduction

In the field of AI security, adversarial examples—inputs modified with subtle, often imperceptible perturbations—pose a significant threat by causing Deep Neural Networks (DNNs) to misclassify data. While crafting these attacks is straightforward in "white-box" scenarios where the model architecture is known, the "transferability gap" remains a major hurdle. This gap occurs when an attack designed for one model fails to fool a different, "black-box" target.

Traditional methods to bridge this gap focus on input transformations or refined gradient mathematics. However, the internal structure of the surrogate model is often overlooked. This paper introduces Diversifying High-level Features (DHF), a method that exploits the inherent over-parameterization and redundancy within modern DNNs to identify invariant features shared across different models, thereby significantly boosting attack transferability.

Methodology

The DHF framework operates on the high-level features—the internal representations in the later layers of a network—during the adversarial crafting process. It employs a two-pronged strategy to enhance the robustness of the generated perturbations:

1. Feature Mixup

During each iteration of the gradient calculation, DHF mixes the adversarial feature map with the feature map of the original benign image. This stabilization prevents the optimization process from overfitting to the specific "noise" or decision boundaries unique to the surrogate model, ensuring the perturbation remains grounded in the core features of the target class.

2. Random Feature Adjustment

DHF introduces stochasticity by randomly selecting a portion (defined by ratio $\rho$) of the feature elements and replacing them with the mean value of the entire feature map. This diversification forces the attack to focus on features that remain influential even when parts of the representation are blurred or missing, effectively isolating the "universal" features that are likely to be present across various architectures.

Theoretical Motivation: Hessian Trace Analysis

The authors provide a theoretical foundation for DHF using Hessian trace analysis, which measures the sensitivity of specific layers to small changes. Their findings indicate that high-level layers are significantly less sensitive than low-level layers. Because modern networks are over-parameterized, they contain redundant information in these high-level representations. DHF exploits this by "wiggling" these less sensitive regions to find the invariant logic that remains consistent across different model types, such as transitioning from a ResNet to a Vision Transformer (ViT).

Experimental Evaluation

The researchers evaluated DHF using a subset of the ImageNet (ILSVRC 2012) validation set, testing against a wide array of architectures including standard CNNs (ResNet, DenseNet, MobileNet) and modern Transformers (ViT, Swin).

Key Results

  • Superior Transferability: DHF consistently outperformed state-of-the-art baselines. For example, using a ResNet-101 surrogate, DHF achieved an average attack success rate of 74.7% on a DenseNet-121, compared to the baseline's 52.6%.
  • Resilience Against Defenses: The method proved highly effective against models specifically designed to resist attacks (such as HGD or Bit-Red). In these scenarios, DHF outperformed the runner-up by a margin of 5.3% on average, and in some instances, nearly doubled the success rates of previous methods.
  • Generality as a Plugin: DHF is not a standalone attack but a versatile component. It can be integrated into existing momentum-based or input-transformation attacks (like DIM or TIM) to further enhance their effectiveness.

Discussion and Limitations

While DHF offers a powerful tool for testing model robustness, it introduces three new hyperparameters: the mixup weight ($\eta$), the adjustment ratio ($\rho$), and the layer ratio ($r$). The authors identify a "sweet spot" at $\eta=0.2, \rho=0.1, r=5/6$, though these may require tuning for different tasks. Additionally, the study focuses on image classification; the transferability of DHF to other domains like object detection or Natural Language Processing remains a subject for future research.

Conclusion

By shifting the focus from external input transformations to the internal diversification of high-level features, DHF provides a more effective means of generating transferable adversarial examples. It demonstrates that the very redundancy intended to help DNNs generalize can be leveraged by attackers to find universal vulnerabilities across diverse AI architectures.

Summary updated

BibTeX
@inproceedings{wang2023diversifying,
  author = {Zhiyuan Wang and Zeliang Zhang and Siyuan Liang and Xiaosen Wang},
  title = {{Diversifying the High-level Features for better Adversarial Transferability}},
  booktitle = {BMVC},
  year = {2023},
  url = {https://openreview.net/forum?id=cYfyxwhOp2a},
}
Figure