Mutual-modality Adversarial Attack with Semantic Perturbation

Jingwen Ye, Ruonan Yu, Songhua Liu, Xinchao Wang

Abstract

Adversarial attacks constitute a notable threat to machine learning systems, given their potential to induce erroneous predictions and classifications. However, within real-world contexts, the essential specifics of the deployed model are frequently treated as a black box, consequently mitigating the vulnerability to such attacks. Thus, enhancing the transferability of the adversarial samples has become a crucial area of research, which heavily relies on selecting appropriate surrogate models. To address this challenge, we propose a novel approach that generates adversarial attacks in a mutual-modality optimization scheme. Our approach is accomplished by leveraging the pre-trained CLIP model. Firstly, we conduct a visual attack on the clean image that causes semantic perturbations on the aligned embedding space with the other textual modality. Then, we apply the corresponding defense on the textual modality by updating the prompts, which forces the re-matching on the perturbed embedding space. Finally, to enhance the attack transferability, we utilize the iterative training strategy on the visual attack and the textual defense, where the two processes optimize from each other. We evaluate our approach on several benchmark datasets and demonstrate that our mutual-modal attack strategy can effectively produce high-transferable attacks, which are stable regardless of the target networks. Our approach outperforms state-of-the-art attack methods and can be readily deployed as a plug-and-play solution.

Introduction

Adversarial attacks involve making subtle, often imperceptible modifications to input data to deceive Deep Neural Networks (DNNs). A significant challenge in this field is transferability: the ability of an adversarial sample generated for one model (the surrogate) to successfully fool a different, unknown model (the target). Most existing methods use standard ImageNet-pretrained models as surrogates, which often leads to overfitting on specific architectural features, reducing effectiveness against diverse target models. The authors identify a need for a more robust surrogate that understands the semantic meaning of an image rather than just its pixel patterns.

Conceptual overview of the mutual-modality attack framework, highlighting semantic alignment in the feature space.

Methodology

The proposed Mutual-modality Adversarial Attack framework leverages the Contrastive Language-Image Pre-training (CLIP) model. CLIP's robust, semantically aligned feature space, trained on millions of image-text pairs, serves as an ideal surrogate for generating universal perturbations. The framework operates through a three-stage process:

  1. Visual Attack (The Generator): A generator network ($\mathcal{G}$) is trained to add perturbations to clean images. This process is guided by three loss functions: Feature Loss (to push adversarial features away from clean ones), Triplet Loss (to pull features toward incorrect textual descriptions), and Classification Loss (to ensure the surrogate model misclassifies the input).
  2. Textual Defense (Prompt Updating): To strengthen the attack, the system performs a "defense" on the textual modality. Using Probability Weighted Word Saliency and GPT-2 for word suggestions, it updates text prompts (e.g., from "A photo of a horse" to "A bad photo of a horse") to rematch the text to the perturbed image features.
  3. Iterative Optimization: The generator and text prompts are updated iteratively. This "attack-defense" loop forces the generator to find increasingly sophisticated perturbations that remain effective even as the text modality attempts to adapt.
The complete framework of the proposed mutual-modality adversarial attack, including the generator, textual input update, and iterative optimization with CLIP.

Results and Discussion

The method, termed Ours-Clip, was evaluated on CIFAR-10 and ImageNet, as well as cross-domain datasets like Comics, Paintings, and ChestX. It demonstrated superior transferability compared to state-of-the-art (SOTA) methods.

On ImageNet, the attack significantly reduced the accuracy of various black-box models, including ResNet variants, VGG, and Vision Transformers (ViT). Notably, it dropped SimpleViT's accuracy from 80.9% to 44.8% without prior exposure to the model during training. The approach also proved to be a "plug-and-play" solution, enhancing existing frameworks like GAMA and LTAP by 5-15% in extreme cross-domain scenarios.

Conclusion

By shifting the focus from pixel-level noise to semantic perturbations in a multi-modal embedding space, this research provides a more robust method for generating transferable adversarial attacks. The iterative mutual-modality loop effectively warps the "meaning" of images, making them universally deceptive to a wide range of vision systems. While computationally intensive, the stability of these attacks across architectures marks a significant advancement in adversarial robustness research. Future work may extend this framework to other multi-modal tasks such as image captioning and visual question answering.

Summary updated

BibTeX
@inproceedings{ye2024mutual,
  author = {Jingwen Ye and Ruonan Yu and Songhua Liu and Xinchao Wang},
  title = {{Mutual-modality Adversarial Attack with Semantic Perturbation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=LJ9jEOILxe},
}
Figure