mlsanityData to 14 Oct 2026

Test-Time Multimodal Backdoor Detection by Contrastive Prompting

arXiv 2405.15269 ↗First posted 24 May 2024cs.CV cs.LGcited by 5

On the map: LLM safety and security → Backdoor and data poisoning attacks

Abstract (arXiv)

While multimodal contrastive learning methods (e.g., CLIP) can achieve impressive zero-shot classification performance, recent research has revealed that these methods are vulnerable to backdoor attacks. To defend against backdoor attacks on CLIP, existing defense methods focus on either the pre-training stage or the fine-tuning stage, which would unfortunately cause high computational costs due to numerous parameter updates and are not applicable in black-box settings. In this paper, we provide the first attempt at a computationally efficient backdoor detection method to defend against backdoored CLIP in the inference stage. We empirically find that the visual representations of backdoored images are insensitive to benign and malignant changes in class description texts. Motivated by this observation, we propose BDetCLIP, a novel test-time backdoor detection method based on contrastive prompting. Specifically, we first prompt a language model (e.g., GPT-4) to produce class-related description texts (benign) and class-perturbed random texts (malignant) by specially designed instructions. Then, the distribution difference in cosine similarity between images and the two types of class description texts can be used as the criterion to detect backdoor samples. Extensive experiments validate that our proposed BDetCLIP is superior to state-of-the-art backdoor detection methods, in terms of both effectiveness and efficiency. Our codes are publicly available at: https://github.com/Purshow/BDetCLIP.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 51 of its 66 references that are in the map. First posted on arXiv 24 May 2024.

Builds on

51 of 66 references.

Closest ancestors · 14

Same direction, newest first

  1. 2024Unlearning Backdoor Threats: Enhancing Backdoor Defense in Multimodal Contrastive Learning via Local Token Unlearning24 Mar
  2. 2023BadCLIP: Trigger-Aware Prompt Learning for Backdoor Attacks on CLIP26 Nov
  3. 2023BadCLIP: Dual-Embedding Guided Backdoor Attack on Multimodal Contrastive Learning20 Nov
  4. 2023Better Safe than Sorry: Pre-training CLIP against Targeted Data Poisoning and Backdoor Attacks5 Oct
  5. 2023TIJO: Trigger Inversion with Joint Optimization for Defending Multimodal Backdoored Models7 Aug
  6. 2023Detecting Backdoors in Pre-trained Encoders23 Mar
  7. 2023Robust Contrastive Language-Image Pre-training against Data Poisoning and Backdoor Attacks13 Mar
  8. 2023CleanCLIP: Mitigating Data Poisoning Attacks in Multimodal Contrastive Learning6 Mar
  9. 2022BagFlip: A Certified Defense against Data Poisoning26 May
  10. 2021Dual-Key Multimodal Backdoors for Visual Question Answering14 Dec
  11. 2021Textual Backdoor Attacks Can Be More Harmful via Two Simple Tricks15 Oct
  12. 2021BadEncoder: Backdoor Attacks to Pre-trained Encoders in Self-Supervised Learning1 Aug
2 more
  1. 2021Sleeper Agent: Scalable Hidden Trigger Backdoors for Neural Networks Trained from Scratch16 Jun
  2. 2021Rethinking the Backdoor Attacks' Triggers: A Frequency Perspective7 Apr

Other references · 37

  1. 2017Attention Is All You Needcited by 60,361
  2. 2015Deep Residual Learning for Image Recognitioncited by 52,096
  3. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  4. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  5. 2023GPT-4 Technical Reportcited by 18,396
  6. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
  7. 2022Hierarchical Text-Conditional Image Generation with CLIP Latentscited by 6,585
  8. 2021Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervisioncited by 3,864
  9. 2023Mistral 7Bcited by 3,164
  10. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,917
  11. 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,106
  12. 2017Targeted Backdoor Attacks on Deep Learning Systems Using Data Poisoningcited by 1,055
25 more
  1. 2024Yi: Open Foundation Models by 01.AIcited by 719
  2. 2021VideoCLIP: Contrastive Pre-training for Zero-shot Video-Text Understandingcited by 602
  3. 2019STRIP: A Defence Against Trojan Attacks on Deep Neural Networkscited by 459
  4. 2020Backdoor Learning: A Surveycited by 426
  5. 2020Invisible Backdoor Attack with Sample-Specific Triggerscited by 353
  6. 2022Language in a Bottle: Language Model Guided Concept Bottlenecks for Interpretable Image Classificationcited by 312
  7. 2019Label-Consistent Backdoor Attackscited by 296
  8. 2023Poisoning Web-Scale Training Datasets is Practicalcited by 290
  9. 2022What does a platypus look like? Generating customized prompts for zero-shot image classificationcited by 267
  10. 2021Poisoning and Backdooring Contrastive Learningcited by 151
  11. 2020Backdoor Attacks Against Deep Learning Systems in the Physical Worldcited by 134
  12. 2023CORA: Adapting CLIP for Open-Vocabulary Detection with Region Prompting and Anchor Pre-Matchingcited by 133
  13. 2023SCALE-UP: An Efficient Black-box Input-level Backdoor Detection via Analyzing Scaled Prediction Consistencycited by 97
  14. 2022Exploring the Universal Vulnerability of Prompt-based Learning Paradigmcited by 57
  15. 2024Improved Zero-Shot Classification by Adapting VLMs with Text Descriptionscited by 54
  16. 2019Model Agnostic Defence against Backdoor Attacks in Machine Learningcited by 52
  17. 2023Enhancing CLIP with GPT-4: Harnessing Visual Descriptions as Promptscited by 50
  18. 2023Detecting Backdoors During the Inference Stage Based on Corruption Robustness Consistencycited by 46
  19. 2023Black-box Backdoor Defense via Zero-shot Image Purificationcited by 45
  20. 2024IBD-PSC: Input-level Backdoor Detection via Parameter-oriented Scaling Consistencycited by 39
  21. 2023Language Models as Black-Box Optimizers for Vision-Language Modelscited by 36
  22. 2023Towards Stable Backdoor Purification through Feature Shift Tuningcited by 32
  23. 2023Backdoor Attack with Sparse and Invisible Triggercited by 20
  24. 2024Backdoor Secrets Unveiled: Identifying Backdoor Data with Optimized Scaled Prediction Consistencycited by 13
  25. 2024Multi-modal Attribute Prompting for Vision-Language Modelscited by 12

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 1; 2025: 2; 2026: 2.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Neural Antidote: Class-Wise Prompt Tuning for Purifying Backdoors in CLIP
  2. 2025Robust Defense Strategies for Multimodal Contrastive Learning: Efficient Fine-tuning Against Backdoor Attacks
  3. 2024Defending Multimodal Backdoored Models by Repulsive Visual Prompt Tuning
  4. 2025Detecting Backdoor Samples in Contrastive Language Image Pretraining
  5. 2026Adjustable Text-Guided Backdoor Attacks with Natural-Word Triggers on Multimodal Pretrained Models
  6. 2024Proactive Adversarial Defense: Harnessing Prompt Tuning in Vision-Language Models to Detect Unseen Backdoored Images
  7. 2024Adversarial Backdoor Defense in CLIP
  8. 2026Region-Level Black-Box Defense Against Stealthy Embedding-Space Backdoors in CLIP