Semantic-aware Adversarial Fine-tuning for CLIP
Jiacheng Zhang, Jinhao Li, Hanxun Huang, Sarah M. Erfani, Benjamin I.P. Rubinstein, Feng Liu

TL;DR
This paper introduces Semantic-aware Adversarial Fine-tuning (SAFT), a novel method that enhances CLIP's zero-shot adversarial robustness by generating semantically enriched adversarial examples and fine-tuning with them.
Contribution
The paper proposes a semantic-ensemble attack and SAFT, a new fine-tuning approach that improves CLIP's robustness against adversarial attacks using semantic-aware examples.
Findings
SAFT outperforms existing methods in robustness across 16 datasets.
Semantic-aware AEs are more effective in fooling CLIP than traditional cosine similarity-based AEs.
Extensive experiments validate the effectiveness of SAFT in adversarial robustness.
Abstract
Recent studies have shown that CLIP model's adversarial robustness in zero-shot classification tasks can be enhanced by adversarially fine-tuning its image encoder with adversarial examples (AEs), which are generated by minimizing the cosine similarity between images and a hand-crafted template (e.g., ''A photo of a {label}''). However, it has been shown that the cosine similarity between a single image and a single hand-crafted template is insufficient to measure the similarity for image-text pairs. Building on this, in this paper, we find that the AEs generated using cosine similarity may fail to fool CLIP when the similarity metric is replaced with semantically enriched alternatives, making the image encoder fine-tuned with these AEs less robust. To overcome this issue, we first propose a semantic-ensemble attack to generate semantic-aware AEs by minimizing the average similarity…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdversarial Robustness in Machine Learning · Generative Adversarial Networks and Image Synthesis · Ethics and Social Impacts of AI
