Lune

ICLR2025Top-tier venue

Detecting Backdoor Samples in Contrastive Language Image Pretraining

Hanxun Huang, Sarah Monazam Erfani, Yige Li, Xingjun Ma, James Bailey

Abstract

Contrastive language-image pretraining (CLIP) has been found to be vulnerable to poisoning backdoor attacks where the adversary can achieve an almost perfect attack success rate on CLIP models by poisoning only 0.01% of the training dataset. This raises security concerns on the current practice of pretraining large-scale models on unscrutinized web data using CLIP. In this work, we analyze the representations of backdoor-poisoned samples learned by CLIP models and find that they exhibit unique characteristics in their local subspace, i.e., their local neighborhoods are far more sparse than that of clean samples. Based on this finding, we conduct a systematic study on detecting CLIP backdoor attacks and show that these attacks can be easily and efficiently detected by traditional density ratio-based local outlier detectors, whereas existing backdoor sample detection methods fail. Our experiments also reveal that an unintentional backdoor already exists in the original CC3M dataset and has been trained into a popular open-source model released by OpenCLIP. Based on our detector, one can clean up a million-scale web dataset (e.g., CC3M) efficiently within 15 minutes using 4 Nvidia A100 GPUs. The code is publicly available in our GitHub repository.

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.

7 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

  • Emerging Properties in Self-Supervised Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Emerging Properties in Self-Supervised Vision Transformers cites Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning
  • A Closer Look at Backdoor Attacks on CLIP cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • A Closer Look at Backdoor Attacks on CLIP cites Learning Transferable Visual Models From Natural Language Supervision
  • X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP cites Towards Million-Scale Adversarial Robustness Evaluation With Stronger Individual Attacks
  • X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP cites Visual Instruction Tuning
  • X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP cites Learning Transferable Visual Models From Natural Language Supervision
  • Towards Million-Scale Adversarial Robustness Evaluation With Stronger Individual Attacks cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Visual Instruction Tuning cites Learning Transferable Visual Models From Natural Language Supervision
  • Learning Transferable Visual Models From Natural Language Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • 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 A Closer Look at Backdoor Attacks on CLIP
  • Defending Multimodal Backdoored Models by Repulsive Visual Prompt Tuning cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Defending Multimodal Backdoored Models by Repulsive Visual Prompt Tuning cites Visual Instruction Tuning
  • 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 papers7

  1. Defending Multimodal Backdoored Models by Repulsive Visual Prompt TuningZhifang Zhang, Shuo He, Haobo Wang, Bingquan Shen et al.NeurIPS 2025 · 18 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. A Closer Look at Backdoor Attacks on CLIPShuo He, Zhifang Zhang, Feng Liu, Roy Ka-Wei Lee et al.ICML 2025
  4. X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIPHanxun Huang, Sarah Monazam Erfani, Yige Li, Xingjun Ma et al.ICML 2025
  5. Towards Million-Scale Adversarial Robustness Evaluation With Stronger Individual AttacksYong Xie, Weijie Zheng, Hanxun Huang, Guangnan Ye et al.CVPR 2025

Builds on50

  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. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  3. Visual Instruction TuningHaotian Liu, Chunyuan Li, Qingyang Wu, Yong Jae LeeNeurIPS 2023 · 11,349 citations
  4. 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
  5. Emerging Properties in Self-Supervised Vision TransformersMathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou et al.ICCV 2021 · 8,921 citations

Related papers

  1. Better Safe than Sorry: Pre-training CLIP against Targeted Data Poisoning and Backdoor AttacksWenhan Yang, Jingdong Gao, Baharan MirzasoleimanICML 2024 · 21 citations
  2. BadCLIP: Trigger-Aware Prompt Learning for Backdoor Attacks on CLIPJiawang Bai, Kuofeng Gao, Shaobo Min, Shu-Tao Xia et al.CVPR 2024
  3. Poisoning and Backdooring Contrastive LearningNicholas Carlini, Andreas TerzisICLR 2022 · 213 citations
  4. Robust Contrastive Language-Image Pretraining against Data Poisoning and Backdoor AttacksWenhan Yang, Jingdong Gao, Baharan MirzasoleimanNeurIPS 2023 · 51 citations
  5. CleanCLIP: Mitigating Data Poisoning Attacks in Multimodal Contrastive LearningHritik Bansal, Fan Yin, Nishad Singhi, Aditya Grover et al.ICCV 2023 · 78 citations
Dusk over the sea between two cliffs drawn in fine vertical lines