Lune

CCS2021Top-tier venue

Quantifying and Mitigating Privacy Risks of Contrastive Learning

Xinlei He, Yang Zhang

Abstract

Data is the key factor to drive the development of machine learning (ML) during the past decade. However, high-quality data, in particular labeled data, is often hard and expensive to collect. To leverage large-scale unlabeled data, self-supervised learning, represented by contrastive learning, is introduced. The objective of contrastive learning is to map different views derived from a training sample (e.g., through data augmentation) closer in their representation space, while different views derived from different samples more distant. In this way, a contrastive model learns to generate informative representations for data samples, which are then used to perform downstream ML tasks. Recent research has shown that machine learning models are vulnerable to various privacy attacks. However, most of the current efforts concentrate on models trained with supervised learning. Meanwhile, data samples' informative representations learned with contrastive learning may cause severe privacy risks as well. In this paper, we perform the first privacy analysis of contrastive learning through the lens of membership inference and attribute inference. Our experimental results show that contrastive models trained on image datasets are less vulnerable to membership inference attacks but more vulnerable to attribute inference attacks compared to supervised models. The former is due to the fact that contrastive models are less prone to overfitting, while the latter is caused by contrastive models' capability of representing data samples expressively. To remedy this situation, we propose the first privacy-preserving contrastive learning mechanism, Talos, relying on adversarial training. Empirical results show that Talos can successfully mitigate attribute inference risks for contrastive models while maintaining their membership privacy and model utility.

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.

22 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

  • Data Poisoning Attacks Against Multimodal Encoders cites Membership Inference Attacks Against Machine Learning Models
  • Data Poisoning Attacks Against Multimodal Encoders cites A Simple Framework for Contrastive Learning of Visual Representations
  • Model Stealing Attacks Against Inductive Graph Neural Networks cites Membership Inference Attacks Against Machine Learning Models
  • Model Stealing Attacks Against Inductive Graph Neural Networks cites Towards Evaluating the Robustness of Neural Networks
  • Model Stealing Attacks Against Inductive Graph Neural Networks cites Extracting Training Data from Large Language Models
  • Dataset Inference for Self-Supervised Models cites A Simple Framework for Contrastive Learning of Visual Representations
  • Dataset Inference for Self-Supervised Models cites EncoderMI: Membership Inference against Pre-trained Encoders in Contrastive Learning
  • EncoderMI: Membership Inference against Pre-trained Encoders in Contrastive Learning cites Membership Inference Attacks Against Machine Learning Models
  • EncoderMI: Membership Inference against Pre-trained Encoders in Contrastive Learning cites A Simple Framework for Contrastive Learning of Visual Representations
  • Please Tell Me More: Privacy Impact of Explainability through the Lens of Membership Inference Attack cites Membership Inference Attacks Against Machine Learning Models
  • Please Tell Me More: Privacy Impact of Explainability through the Lens of Membership Inference Attack cites EncoderMI: Membership Inference against Pre-trained Encoders in Contrastive Learning
  • Graph Contrastive Learning with Augmentations cites A Simple Framework for Contrastive Learning of Visual Representations
  • Extracting Training Data from Large Language Models cites Membership Inference Attacks Against Machine Learning Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers22

  1. Model Stealing Attacks Against Inductive Graph Neural NetworksYun Shen, Xinlei He, Yufei Han, Yang ZhangS&P 2022 · 88 citations
  2. Data Poisoning Attacks Against Multimodal EncodersZiqing Yang, Xinlei He, Zheng Li, Michael Backes et al.ICML 2023 · 74 citations
  3. EncoderMI: Membership Inference against Pre-trained Encoders in Contrastive LearningHongbin Liu, Jinyuan Jia, Wenjie Qu, Neil Zhenqiang GongCCS 2021 · 63 citations
  4. Dataset Inference for Self-Supervised ModelsAdam Dziedzic, Haonan Duan, Muhammad Ahmad Kaleem, Nikita Dhawan et al.NeurIPS 2022 · 59 citations
  5. Please Tell Me More: Privacy Impact of Explainability through the Lens of Membership Inference AttackHan Liu, Yuhao Wu, Zhiyuan Yu, Ning ZhangS&P 2024 · 52 citations

Builds on34

  1. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  2. Towards Evaluating the Robustness of Neural NetworksNicholas Carlini, David A. WagnerS&P 2017 · 9,786 citations
  3. Membership Inference Attacks Against Machine Learning ModelsReza Shokri, Marco Stronati, Congzheng Song, Vitaly ShmatikovS&P 2017 · 5,137 citations
  4. Graph Contrastive Learning with AugmentationsYuning You, Tianlong Chen, Yongduo Sui, Ting Chen et al.NeurIPS 2020 · 3,042 citations
  5. Extracting Training Data from Large Language ModelsNicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski et al.USENIX Security 2021 · 2,866 citations

Related papers

  1. Learning Robust and Privacy-Preserving Representations via Information TheoryBinghui Zhang, Sayedeh Leila Noorbakhsh, Yun Dong, Yuan Hong et al.AAAI 2025 · 4 citations
  2. Privacy Risks of Securing Machine Learning Models against Adversarial ExamplesLiwei Song, Reza Shokri, Prateek MittalCCS 2019 · 293 citations
  3. A Unified Membership Inference Method for Visual Self-supervised Encoder via Part-aware CapabilityJie Zhu, Jirong Zha, Ding Li, Leye WangCCS 2024 · 4 citations
  4. RelaxLoss: Defending Membership Inference Attacks without Losing UtilityDingfan Chen, Ning Yu, Mario FritzICLR 2022 · 61 citations
  5. Decoding Web Memorization: A Semantic Membership Inference Attack on LLMsZhiyao Wu, Zi Liang, Haibo HuWWW 2026
Dusk over the sea between two cliffs drawn in fine vertical lines