PoisonedEncoder: A Poisoning Attack on Unlabeled Pretraining Data in Contrastive LearningPoisonedEncoder: Poisoning the Unlabeled Pre-training Data in Contrastive Learning
The researchers propose PoisonedEncoder, a data poisoning attack against contrastive learning. Contrastive learning uses large amounts of unlabeled data to pretrain image encoders, which serve as general-purpose feature extractors for various downstream tasks; the attacker injects carefully crafted poisoned samples into the unlabeled pretraining data, causing multiple target downstream task classifiers built on the poisoned encoder to simultaneously misclassify arbitrary clean inputs selected by the attacker into arbitrary classes specified by the attacker. The authors formalize the attack as a bilevel optimization problem and propose an approximate solution method for contrastive learning; evaluations on multiple datasets show that the attack achieves a high attack success rate while maintaining the downstream classifiers' test accuracy on inputs not selected by the attacker. The authors also evaluate five defenses, including one preprocessing, three in-processing, and one post-processing defense, and the results show that these defenses can reduce the attack success rate but sacrifice encoder utility or require large amounts of clean pretraining data.