Skip to main content
QUICK REVIEW

[Paper Review] Robust Contrastive Language-Image Pre-training against Data Poisoning and Backdoor Attacks

Wenhan Yang, Gao, Jingdong|arXiv (Cornell University)|Mar 13, 2023
Adversarial Robustness in Machine LearningComputer Science3 citations
TL;DR

RoCLIP is a novel defense method that enhances the robustness of contrastive vision-language pre-training against targeted data poisoning and backdoor attacks by dynamically matching images to the most similar caption from a large, random caption pool instead of their original captions. This approach disrupts poisoned associations early in training, reducing attack success rates to 12.5% for poisoning and 0% for backdoors, while improving linear probe accuracy by up to 10% compared to CLIP.

ABSTRACT

Contrastive vision-language representation learning has achieved state-of-the-art performance for zero-shot classification, by learning from millions of image-caption pairs crawled from the internet. However, the massive data that powers large multimodal models such as CLIP, makes them extremely vulnerable to various types of targeted data poisoning and backdoor attacks. Despite this vulnerability, robust contrastive vision-language pre-training against such attacks has remained unaddressed. In this work, we propose ROCLIP, the first effective method for robust pre-training multimodal vision-language models against targeted data poisoning and backdoor attacks. ROCLIP effectively breaks the association between poisoned image-caption pairs by considering a relatively large and varying pool of random captions, and matching every image with the text that is most similar to it in the pool instead of its own caption, every few epochs.It also leverages image and text augmentations to further strengthen the defense and improve the performance of the model. Our extensive experiments show that ROCLIP renders state-of-the-art targeted data poisoning and backdoor attacks ineffective during pre-training CLIP models. In particular, ROCLIP decreases the success rate for targeted data poisoning attacks from 93.75% to 12.5% and that of backdoor attacks down to 0%, while improving the model's linear probe performance by 10% and maintains a similar zero shot performance compared to CLIP. By increasing the frequency of matching, ROCLIP is able to defend strong attacks, which add up to 1% poisoned examples to the data, and successfully maintain a low attack success rate of 12.5%, while trading off the performance on some tasks.

Motivation & Objective

  • To address the critical vulnerability of large-scale vision-language models like CLIP to targeted data poisoning and backdoor attacks during pre-training.
  • To develop a defense mechanism effective during the pre-training phase, unlike prior methods that only work during fine-tuning.
  • To maintain or improve model performance while defending against attacks that require only a tiny fraction (e.g., 0.01%) of poisoned data.
  • To enable scalable, efficient defense that can be applied to large-scale pre-training datasets without significant computational overhead.

Proposed method

  • RoCLIP maintains a large, dynamically updated pool of random captions from the pre-training dataset, replacing the original image caption during training.
  • During training, each image is matched not to its original caption, but to the most similar caption in the random pool, based on representation similarity in the contrastive space.
  • This dynamic caption matching breaks the association between poisoned images and their adversarial captions early in training, where such pairs are less aligned with the main cluster of clean data.
  • Image and text data augmentations are applied to further strengthen robustness and improve generalization.
  • The method is applied periodically—every few epochs—allowing the model to re-embed images with more reliable, clean caption matches.
  • The defense is lightweight, with negligible memory overhead and runtime cost primarily due to augmentation.
Figure 1 : Illustration of RoCLIP . for defending CLIP during pre-training. (a) RoCLIP keeps a pool of random varying captions. During training, RoCLIP augments all images and captions. Then, it finds the most similar caption $\boldsymbol{z}^{T}_{nn}(i)$ to an augmented image $\mkern 1.5mu\overline{
Figure 1 : Illustration of RoCLIP . for defending CLIP during pre-training. (a) RoCLIP keeps a pool of random varying captions. During training, RoCLIP augments all images and captions. Then, it finds the most similar caption $\boldsymbol{z}^{T}_{nn}(i)$ to an augmented image $\mkern 1.5mu\overline{

Experimental results

Research questions

  • RQ1Can a pre-training defense be designed that effectively disrupts poisoned image-caption associations without relying on fine-tuning?
  • RQ2How effective is dynamic caption matching from a random pool in defending against data poisoning and backdoor attacks in contrastive vision-language models?
  • RQ3What is the trade-off between defense effectiveness and downstream performance when defending against high poison rates (e.g., 1%)?
  • RQ4How do data augmentations interact with the caption pool mechanism to improve both robustness and accuracy?
  • RQ5Can the method defend against adaptive attacks that use visually similar categories (e.g., dog vs. cat) for poisoning?

Key findings

  • RoCLIP reduces the success rate of targeted data poisoning attacks from 93.75% to 12.5% on the CIFAR-10 dataset.
  • The backdoor success rate is reduced to 0% across all evaluated backdoor attacks, including Blended, WaNet, and label-consistent triggers.
  • Linear probe accuracy improves by up to 10% compared to CLIP, with gains of 5% on CIFAR-10 and 2% on CIFAR-100 when using data augmentation.
  • Even without data augmentation, RoCLIP maintains zero-shot performance comparable to CLIP, demonstrating minimal degradation in generalization.
  • With a 1% poison rate, RoCLIP maintains an attack success rate of only 12.5% for poisoning and 0% for backdoors, showing resilience to strong attacks.
  • The method is computationally efficient, with negligible memory overhead and runtime cost, making it scalable to large-scale pre-training.
Figure 2 : Training with RoCLIP . Majority of clean images are matched with captions from the same category as their original caption during training (blue line), while poisoned images are matched with a caption from a different category than the adversarial label (orange line).
Figure 2 : Training with RoCLIP . Majority of clean images are matched with captions from the same category as their original caption during training (blue line), while poisoned images are matched with a caption from a different category than the adversarial label (orange line).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.