Region-Level Black-Box Defense Against Stealthy Embedding-Space Backdoors in CLIP
cs.CV, cs.CR
Submitted: 2026-09-25
Updated: 2026-09-25
Code: https://github.com/wsu-cyber-security-lab-ai/CLIPGuard
License: http://creativecommons.org/licenses/by-sa/4.0/
The gist: Contrastive Language--Image Pretraining (CLIP) has emerged as a dominant vision backbone due to its strong transferability and zero-shot capabilities.
Terminology
Abstract
Contrastive Language--Image Pretraining (CLIP) has emerged as a dominant vision backbone due to its strong transferability and zero-shot capabilities. However, recent studies reveal a critical vulnerability: embedding-space backdoor attacks. By poisoning only a tiny fraction of image--text pairs, adversaries can implant stealthy triggers that induce targeted shifts in CLIP's joint embedding space. Unlike conventional backdoors that manipulate classifier logits, these attacks corrupt representations directly, making them highly effective under extremely low poisoning ratios and difficult to detect. Existing defenses require access to model parameters, gradients, logits, or clean validation data---assumptions that rarely hold in realistic black-box deployments. Moreover, current black-box methods struggle to accurately localize small or out-of-distribution triggers. We propose CLIPGuard, a lightweight and fully black-box defense specifically designed to mitigate embedding-space backdoors in CLIP encoders. CLIPGuard identifies malicious regions by measuring segment-wise embedding perturbations and selectively purifies only suspicious segments via semantic inpainting, preserving benign visual content and alignment quality. Extensive experiments on STL-10, ImageNet, and diverse trigger families---including BadCLIP, BadNets, blended, patch-based, and typographic attacks---demonstrate that CLIPGuard reduces attack success rates to as low as 1.05% while maintaining clean accuracy up to 86.34%, consistently outperforming existing black-box defenses, including CleanCLIP and CleanerCLIP. Our code is available https://github.com/wsu-cyber-security-lab-ai/CLIPGuard.git
Sources
- Targeted Backdoor Attacks on Deep Learning Systems Using Data Poisoning
- Backdoor Attacks and Countermeasures on Deep Learning: A Comprehensive Review
- BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chain
- Adversarial Backdoor Defense in CLIP
- Generalized Out-of-Distribution Detection and Beyond in Vision Language Model Era: A Survey
- Test-Time Multimodal Backdoor Detection by Contrastive Prompting
- Perturb and Recover: Fine-tuning for Effective Backdoor Removal from CLIP
- SCAM: A Real-World Typographic Robustness Evaluation for Multimodal Foundation Models
- CleanerCLIP: Fine-grained Counterfactual Semantic Augmentation for Backdoor Defense in Contrastive Learning
Related papers
- Loss Knows Best: Detecting Annotation Errors in Videos via Loss Trajectories
- AnchorWeave: World-Consistent Video Generation with Retrieved Local Spatial Memories
- Benchmarking the Robustness of Foundation Models for Mammography under Domain Shift
- MambaX-Net: Dual-Input Mamba-Enhanced Cross-Attention Network for Longitudinal MRI Segmentation
- TeleOCR: Navigating Document Parsing Across Digital and Camera-Captured Documents
- A Survey on Efficient Vision-Language-Action Models