Skip to content

CLIPure: Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification

Feb 2025 · International Conference on Learning Representations · Vol abs/2502.18176 · 14 citations · ⚡ 1 influential · 72 references
Computer Science

TL;DR

An adversarially robust zero-shot image classifier that boosts the SOTA robustness by a large margin and is the first purification method in multi-modal latent space and CLIPure-Cos is the first purification method that is not based on generative models, which substantially improves defense efficiency.

Abstract

In this paper, we aim to build an adversarially robust zero-shot image classifier. We ground our work on CLIP, a vision-language pre-trained encoder model that can perform zero-shot classification by matching an image with text prompts ``a photo of a.''. Purification is the path we choose since it does not require adversarial training on specific attack types and thus can cope with any foreseen attacks. We then formulate purification risk as the KL divergence between the joint distributions of the purification process of denoising the adversarial samples and the attack process of adding perturbations to benign samples, through bidirectional Stochastic Differential Equations (SDEs). The final derived results inspire us to explore purification in the multi-modal latent space of CLIP. We propose two variants for our CLIPure approach: CLIPure-Diff which models the likelihood of images'latent vectors with the DiffusionPrior module in DaLLE-2 (modeling the generation process of CLIP's latent vectors), and CLIPure-Cos which models the likelihood with the cosine similarity between the embeddings of an image and ``a photo of a.''. As far as we know, CLIPure is the first purification method in multi-modal latent space and CLIPure-Cos is the first purification method that is not based on generative models, which substantially improves defense efficiency. We conducted extensive experiments on CIFAR-10, ImageNet, and 13 datasets that previous CLIP-based defense methods used for evaluating zero-shot classification robustness. Results show that CLIPure boosts the SOTA robustness by a large margin, e.g., from 71.7% to 91.1% on CIFAR10, from 59.6% to 72.6% on ImageNet, and 108% relative improvements of average robustness on the 13 datasets over previous SOTA. The code is available at https://github.com/TMLResearchGroup-CAS/CLIPure.

View source

Similar papers

Open access Dec 2024

Adversarial Purification by Consistency-Aware Latent Space Optimization on Data Manifolds

Deep neural networks (DNNs) are vulnerable to adversarial samples crafted by adding imperceptible perturbations to clean data, potentially leading to incorrect and dangerous predictions. Adversarial purification has been an effective means to improve DNNs robustness by removing these perturbations before feeding the da...

Shu-Hai Zhang, Jia-Hao Yang, Hui Luo et al. · 0 citations
Conference Aug 2026

Real-Time Adversarial Purification via DINOv2-Guided Contrastive Embedding Alignment

Deep neural networks are vulnerable to misclassification even with small adversarial noise. Although purification methods using diffusion models have improved defense performance, they suffer from inference latency due to multiple sampling steps, making real-time applications difficult. In this paper, targeting a pract...

D. Seok, Chulhee Lee · 0 citations
Open access 2026

MTDDAPT: Multi-Modal Text Distribution-Aware Deep Adversarial Prompt Tuning for Robust Vision-Language Representation Learning

: Vision-language models (VLMs), such as CLIP, have achieved competitive performance in open-vocabulary visual recognition, but they remain vulnerable to adversarial examples. This vulnerability may affect the reliability of AI-based visual perception models when image inputs are perturbed. Existing robustness-oriented...

Chao Li, Zhe-Hua Tian, Cai-Chang Ding et al. · 0 citations
Preprint Sep 2026

Adversarial Training for Pixel Diffusion

This work identifies direct output access to the image statistics being corrected as a key factor governing when adversarial post-training succeeds, the first systematic study of adversarial post-training for pixel diffusion.

Xin Lin, Zhi-Fei Zhang, Yu-Qian Zhou et al. · 0 citations
Conference Sep 2026

FSED: A Feature-Space Ensemble Defense for Detecting Adversarial Examples

This paper introduces a Feature-Space Ensemble Defense (FSED) framework, which involves adversarial training, joint confidence calibration, and class-conditional Mahalanobis feature-space anomaly scoring to facilitate powerful adversarial detection. The proposed method considers the final-layer uncertainty. It also mod...

Aliza Saadi, Vanya Shafiq, Aaleen Zainab et al. · 0 citations

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.