Lune

ICML2024Top-tier venue

Better Safe than Sorry: Pre-training CLIP against Targeted Data Poisoning and Backdoor Attacks

Wenhan Yang, Jingdong Gao, Baharan Mirzasoleiman

Abstract

Contrastive Language-Image Pre-training (CLIP) on large image-caption datasets has achieved remarkable success in zero-shot classification and enabled transferability to new domains. However, CLIP is extremely more vulnerable to targeted data poisoning and backdoor attacks, compared to supervised learning. Perhaps surprisingly, poisoning 0.0001% of CLIP pre-training data is enough to make targeted data poisoning attacks successful. This is four orders of magnitude smaller than what is required to poison supervised models. Despite this vulnerability, existing methods are very limited in defending CLIP models during pre-training. In this work, we propose a strong defense, SAFECLIP, to safely pre-train CLIP against targeted data poisoning and backdoor attacks. SAFECLIP warms up the model by applying unimodal contrastive learning (CL) on image and text modalities separately. Then, it divides the data into safe and risky sets, by applying a Gaussian Mixture Model to the cosine similarity of image-caption pair representations. SAFECLIP pre-trains the model by applying the CLIP loss to the safe set and applying unimodal CL to image and text modalities of the risky set separately. By gradually increasing the size of the safe set during pre-training, SAFECLIP effectively breaks targeted data poisoning and backdoor attacks without harming the CLIP performance. Our extensive experiments on CC3M, Visual Genome and MSCOCO demonstrate that SAFECLIP significantly reduces the success rate of targeted data poisoning attacks from 93.75% to 0% and that of various backdoor attacks from up to 100% to 0%, without harming CLIP's performance 1 .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

13 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • CLIP-Guided Backdoor Defense through Entropy-Based Poisoned Dataset Separation cites Learning Transferable Visual Models From Natural Language Supervision
  • Unsupervised Learning of Visual Features by Contrasting Cluster Assignments cites A Simple Framework for Contrastive Learning of Visual Representations
  • InverTune: A Backdoor Defense Method for Multimodal Contrastive Learning via Backdoor-Adversarial Correlation Analysis cites Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision
  • InverTune: A Backdoor Defense Method for Multimodal Contrastive Learning via Backdoor-Adversarial Correlation Analysis cites Learning Transferable Visual Models From Natural Language Supervision
  • InverTune: A Backdoor Defense Method for Multimodal Contrastive Learning via Backdoor-Adversarial Correlation Analysis cites Defending Multimodal Backdoored Models by Repulsive Visual Prompt Tuning
  • Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites Unsupervised Learning of Visual Features by Contrasting Cluster Assignments
  • Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites A Simple Framework for Contrastive Learning of Visual Representations
  • Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning
  • Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites Learning Transferable Visual Models From Natural Language Supervision
  • TokenSwap: Backdoor Attack on the Compositional Understanding of Large Vision-Language Models cites Learning Transferable Visual Models From Natural Language Supervision
  • Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning cites A Simple Framework for Contrastive Learning of Visual Representations
  • ToxicTextCLIP: Text-Based Poisoning and Backdoor Attacks on CLIP Pre-training cites Learning Transferable Visual Models From Natural Language Supervision
  • Learning Transferable Visual Models From Natural Language Supervision cites A Simple Framework for Contrastive Learning of Visual Representations
  • Learning Transferable Visual Models From Natural Language Supervision cites Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning
  • Defending Multimodal Backdoored Models by Repulsive Visual Prompt Tuning cites Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision
  • Defending Multimodal Backdoored Models by Repulsive Visual Prompt Tuning cites Learning Transferable Visual Models From Natural Language Supervision
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers13

  1. Defending Multimodal Backdoored Models by Repulsive Visual Prompt TuningZhifang Zhang, Shuo He, Haobo Wang, Bingquan Shen et al.NeurIPS 2025 · 18 citations
  2. CLIP-Guided Backdoor Defense through Entropy-Based Poisoned Dataset SeparationBinyan Xu, Fan Yang, Xilin Dai, Di Tang et al.ACM MM 2025 · 12 citations
  3. TokenSwap: Backdoor Attack on the Compositional Understanding of Large Vision-Language ModelsZhifang Zhang, Qiqi Tao, JIAQI LYU, Na Zhao et al.ICML 2026 · 5 citations
  4. ToxicTextCLIP: Text-Based Poisoning and Backdoor Attacks on CLIP Pre-trainingXin Yao, Haiyang Zhao, Yimin Chen, Jiawei Guo et al.NeurIPS 2025 · 5 citations
  5. InverTune: A Backdoor Defense Method for Multimodal Contrastive Learning via Backdoor-Adversarial Correlation AnalysisMengyuan Sun, Yu Li, Yunjie Ge, Yuchen Liu et al.NDSS 2026 · 3 citations

Builds on16

  1. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  2. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  3. Bootstrap Your Own Latent - A New Approach to Self-Supervised LearningJean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec et al.NeurIPS 2020 · 9,171 citations
  4. Scaling Up Visual and Vision-Language Representation Learning With Noisy Text SupervisionChao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen et al.ICML 2021 · 5,401 citations
  5. Unsupervised Learning of Visual Features by Contrasting Cluster AssignmentsMathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal et al.NeurIPS 2020 · 5,249 citations

Related papers

  1. Robust Contrastive Language-Image Pretraining against Data Poisoning and Backdoor AttacksWenhan Yang, Jingdong Gao, Baharan MirzasoleimanNeurIPS 2023 · 51 citations
  2. Pre-training CLIP against Data Poisoning with Optimal Transport-based Matching and AlignmentTong Zhang, Kuofeng Gao, Jiawang Bai, Leo Yu Zhang et al.EMNLP 2025 · 1 citation
  3. Detecting Backdoor Samples in Contrastive Language Image PretrainingHanxun Huang, Sarah Monazam Erfani, Yige Li, Xingjun Ma et al.ICLR 2025
  4. CleanCLIP: Mitigating Data Poisoning Attacks in Multimodal Contrastive LearningHritik Bansal, Fan Yin, Nishad Singhi, Aditya Grover et al.ICCV 2023 · 78 citations
  5. BadCLIP: Trigger-Aware Prompt Learning for Backdoor Attacks on CLIPJiawang Bai, Kuofeng Gao, Shaobo Min, Shu-Tao Xia et al.CVPR 2024
Dusk over the sea between two cliffs drawn in fine vertical lines