Introduction
Large-scale multimodal models like CLIP rely on millions of image-caption pairs scraped from the internet. This "unfiltered" approach creates a massive security vulnerability. Attackers can perform Targeted Data Poisoning (pairing a specific image with a wrong label to flip its prediction) or Backdoor Attacks (adding a small trigger patch to images to force a specific misclassification).
Because these models are trained using a contrastive loss—which pulls "matching" pairs together in representation space—they are incredibly sensitive. Poisoning just 0.0001% of the training data can successfully compromise a standard CLIP model. While some defenses exist for fine-tuning, none have effectively addressed the vulnerability during the massive initial pre-training phase. RoCLIP is proposed as the first effective defense for pre-training vision-language models against these attacks.
Methodology: How RoCLIP Works
RoCLIP breaks the malicious association between poisoned images and captions using two main strategies: a dynamic caption pool and heavy data augmentation.
- The Caption Pool & Nearest-Neighbor Matching: RoCLIP maintains a large, rotating pool of random captions (about 2% of the dataset size). Every few epochs, the model ignores an image's original caption. Instead, it searches the pool for the text embedding most similar to that image and uses that as the positive pair for training.
- Heavy Augmentation: The method leverages aggressive image augmentations (cropping, flipping, color jittering) and text augmentations (synonym replacement, random swaps) to further diffuse the signal of any malicious patches or specific text strings.
The Core Logic: Clean image-caption pairs naturally share semantic meaning, so they converge quickly in representation space. Poisoned pairs are mismatched by design and converge much slower.
By forcing the model to "look around" the pool, clean images still find relevant captions, but poisoned images get matched to random, non-malicious text. This prevents the model from ever learning the attacker's intended association.
Datasets
- Pre-training: Conceptual Captions 3M (CC3M), specifically a randomly sampled 1M subset.
- Evaluation (10 Downstream Datasets): To test zero-shot and linear probe performance, the authors used a diverse battery including ImageNet-1K, CIFAR10/100, Caltech101, Oxford-III Pets, Stanford Cars, and Food101.
Key Results
RoCLIP exploits the temporal learning gap between clean and poisoned pairs to "reset" associations before the poison can take hold. By introducing the caption pool, RoCLIP turns a "targeted" attack into a "random noise" problem, which the model naturally ignores.
- Defense Success:
- Targeted Poisoning: Success rate dropped from 93.75% (standard CLIP) to 12.5%.
- Backdoor Attacks: Success rate dropped from 78% to 0%.
- Performance Gains: Surprisingly, RoCLIP isn't just a shield; it's a booster. The nearest-neighbor matching acts as a form of regularization that helps the model learn more robust visual features, improving linear probe accuracy by up to 10% across the 10 test datasets compared to standard CLIP.
- Zero-Shot Stability: The model maintained zero-shot performance on par with standard CLIP, proving the defense doesn't "break" the model's general reasoning abilities.
- High-Intensity Defense: Even when the data was heavily poisoned (up to 1% of the total dataset), RoCLIP maintained a low attack success rate by increasing the frequency of the pool-matching step.
Limitations and Future Work
- Performance Trade-offs: When defending against extremely high poison rates (1%), there is a slight trade-off where zero-shot performance on some tasks begins to dip.
- Adaptive Attacks: A sophisticated attacker who knows RoCLIP is being used might try to craft "visually similar" poisons (e.g., poisoning a dog image with a cat caption). While RoCLIP showed resilience against basic versions of this, more complex adaptive attacks remain a future threat.
- Computational Scale: The experiments were conducted on 1M pairs. Demonstrating this at the "OpenCLIP" scale (billions of pairs) would require massive computational resources to maintain and search the caption pool.
Summary updated