Lune

USENIX Security2022Top-tier venue

PoisonedEncoder: Poisoning the Unlabeled Pre-training Data in Contrastive Learning

Hongbin Liu, Jinyuan Jia, Neil Zhenqiang Gong

Abstract

Contrastive learning pre-trains an image encoder using a large amount of unlabeled data such that the image encoder can be used as a general-purpose feature extractor for various downstream tasks. In this work, we propose PoisonedEncoder, a data poisoning attack to contrastive learning. In particular, an attacker injects carefully crafted poisoning inputs into the unlabeled pre-training data, such that the downstream classifiers built based on the poisoned encoder for multiple target downstream tasks simultaneously classify attacker-chosen, arbitrary clean inputs as attacker-chosen, arbitrary classes. We formulate our data poisoning attack as a bilevel optimization problem, whose solution is the set of poisoning inputs; and we propose a contrastive-learning-tailored method to approximately solve it. Our evaluation on multiple datasets shows that PoisonedEncoder achieves high attack success rates while maintaining the testing accuracy of the downstream classifiers built upon the poisoned encoder for non-attacker-chosen inputs. We also evaluate five defenses against PoisonedEncoder, including one pre-processing, three in-processing, and one post-processing defenses. Our results show that these defenses can decrease the attack success rate of PoisonedEncoder, but they also sacrifice the utility of the encoder or require a large clean pre-training dataset.

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.

23 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

  • StolenEncoder: Stealing Pre-trained Encoders in Self-supervised Learning cites A Simple Framework for Contrastive Learning of Visual Representations
  • StolenEncoder: Stealing Pre-trained Encoders in Self-supervised Learning cites Learning Transferable Visual Models From Natural Language Supervision
  • AdvCLIP: Downstream-agnostic Adversarial Examples in Multimodal Contrastive Learning cites Learning Transferable Visual Models From Natural Language Supervision
  • AdvCLIP: Downstream-agnostic Adversarial Examples in Multimodal Contrastive Learning cites Downstream-agnostic Adversarial Examples
  • Downstream-agnostic Adversarial Examples cites AdvCLIP: Downstream-agnostic Adversarial Examples in Multimodal Contrastive Learning
  • An Embarrassingly Simple Backdoor Attack on Self-supervised Learning cites Neural Cleanse: Identifying and Mitigating Backdoor Attacks in Neural Networks
  • An Embarrassingly Simple Backdoor Attack on Self-supervised Learning cites Trojaning Attack on Neural Networks
  • An Embarrassingly Simple Backdoor Attack on Self-supervised Learning cites A Simple Framework for Contrastive Learning of Visual Representations
  • Learning Transferable Visual Models From Natural Language Supervision cites A Simple Framework for Contrastive Learning of Visual Representations
  • When Does Machine Learning FAIL? Generalized Transferability for Evasion and Poisoning Attacks cites Trojaning Attack on Neural Networks
  • Downstream-agnostic Adversarial Examples cites A Simple Framework for Contrastive Learning of Visual Representations
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers23

  1. AdvCLIP: Downstream-agnostic Adversarial Examples in Multimodal Contrastive LearningZiqi Zhou, Shengshan Hu, Minghui Li, Hangtao Zhang et al.ACM MM 2023 · 62 citations
  2. An Embarrassingly Simple Backdoor Attack on Self-supervised LearningChangjiang Li, Ren Pang, Zhaohan Xi, Tianyu Du et al.ICCV 2023 · 54 citations
  3. Downstream-agnostic Adversarial ExamplesZiqi Zhou, Shengshan Hu, Ruizhi Zhao, Qian Wang et al.ICCV 2023 · 45 citations
  4. Moderate-fitting as a Natural Backdoor Defender for Pre-trained Language ModelsBiru Zhu, Yujia Qin, Ganqu Cui, Yangyi Chen et al.NeurIPS 2022 · 29 citations
  5. StolenEncoder: Stealing Pre-trained Encoders in Self-supervised LearningYupei Liu, Jinyuan Jia, Hongbin Liu, Neil Zhenqiang GongCCS 2022 · 23 citations

Builds on23

  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. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  3. Neural Cleanse: Identifying and Mitigating Backdoor Attacks in Neural NetworksBolun Wang, Yuanshun Yao, Shawn Shan, Huiying Li et al.S&P 2019 · 1,801 citations
  4. Trojaning Attack on Neural NetworksYingqi Liu, Shiqing Ma, Yousra Aafer, Wen-Chuan Lee et al.NDSS 2018 · 1,377 citations
  5. When Does Machine Learning FAIL? Generalized Transferability for Evasion and Poisoning AttacksOctavian Suciu, Radu Marginean, Yigitcan Kaya, Hal Daumé III et al.USENIX Security 2018 · 321 citations

Related papers

  1. Data Poisoning Based Backdoor Attacks to Contrastive LearningJinghuai Zhang, Hongbin Liu, Jinyuan Jia, Neil Zhenqiang GongCVPR 2024 · 12 citations
  2. BadEncoder: Backdoor Attacks to Pre-trained Encoders in Self-Supervised LearningJinyuan Jia, Yupei Liu, Neil Zhenqiang GongS&P 2022 · 200 citations
  3. Backdooring Self-Supervised Contrastive Learning by Noisy AlignmentTuo Chen, Jie Gui, Minjing Dong, Ju Jia et al.ICCV 2025 · 2 citations
  4. Indiscriminate Poisoning Attacks on Unsupervised Contrastive LearningHao He, Kaiwen Zha, Dina KatabiICLR 2023 · 4 citations
  5. TrojanDec: Data-free Detection of Trojan Inputs in Self-supervised LearningYupei Liu, Yanting Wang, Jinyuan JiaAAAI 2025
Dusk over the sea between two cliffs drawn in fine vertical lines