mlsanityData to 7 Oct 2026

Quantifying and Mitigating Privacy Risks of Contrastive Learning

arXiv 2102.04140 ↗First posted 8 Feb 2021cs.LG cs.CRcited by 35

On the map: LLM safety and security → Machine unlearning

Abstract (arXiv)

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.

Key facts. Cited by 35 papers in the map (data through 7 Oct 2026). Placed in Machine unlearning, one of 12 directions in LLM safety and security. Builds on 54 of its 69 references that are in the map. First posted on arXiv 8 Feb 2021.

Builds on

54 of 69 references.

References · 54

  1. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  2. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
  3. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,441
  4. 2018Representation Learning with Contrastive Predictive Codingcited by 7,662
  5. 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,482
  6. 2018MobileNetV2: Inverted Residuals and Linear Bottleneckscited by 4,773
  7. 2014Deep Learning Face Attributes in the Wildcited by 3,679
  8. 2016Towards Evaluating the Robustness of Neural Networkscited by 2,976
  9. 2016Membership Inference Attacks against Machine Learning Modelscited by 2,221
  10. 2020Extracting Training Data from Large Language Modelscited by 2,144
  11. 2014Unsupervised Domain Adaptation by Backpropagationcited by 1,906
  12. 2018Unsupervised Feature Learning via Non-Parametric Instance-level Discriminationcited by 1,838
38 more
  1. 2018Learning deep representations by mutual information estimation and maximizationcited by 1,265
  2. 2020Graph Contrastive Learning with Augmentationscited by 1,203
  3. 2017Ensemble Adversarial Training: Attacks and Defensescited by 833
  4. 2015The Limitations of Deep Learning in Adversarial Settingscited by 784
  5. 2020Self-supervised Learning: Generative or Contrastivecited by 693
  6. 2017Evasion Attacks against Machine Learning at Test Timecited by 686
  7. 2016Stealing Machine Learning Models via Prediction APIscited by 602
  8. 2018Exploiting Unintended Feature Leakage in Collaborative Learningcited by 509
  9. 2018ML-Leaks: Model and Data Independent Membership Inference Attacks and Defenses on Machine Learning Modelscited by 475
  10. 2017Age Progression/Regression by Conditional Adversarial Autoencodercited by 426
  11. 2020Label-Only Membership Inference Attackscited by 371
  12. 2018Knockoff Nets: Stealing Functionality of Black-Box Modelscited by 285
  13. 2020Systematic Evaluation of Privacy Risks of Machine Learning Modelscited by 273
  14. 2018Scalable Private Learning with PATEcited by 266
  15. 2020DeCLUTR: Deep Contrastive Learning for Unsupervised Textual Representationscited by 249
  16. 2018Manipulating Machine Learning: Poisoning Attacks and Countermeasures for Regression Learningcited by 219
  17. 2019High Accuracy and High Fidelity Extraction of Neural Networkscited by 208
  18. 2020Information Leakage in Embedding Modelscited by 199
  19. 2021Adversary Instantiation: Lower Bounds for Differentially Private Machine Learningcited by 193
  20. 2015Censoring Representations with an Adversarycited by 191
  21. 2019MemGuard: Defending against Black-Box Membership Inference Attacks via Adversarial Examplescited by 183
  22. 2020When Machine Unlearning Jeopardizes Privacycited by 181
  23. 2018Machine Learning with Membership Privacy using Adversarial Regularizationcited by 177
  24. 2019Stolen Memories: Leveraging Model Memorization for Calibrated White-Box Membership Inferencecited by 168
  25. 2018Adversarial Removal of Demographic Attributes from Text Datacited by 166
  26. 2017Machine Learning Models that Remember Too Muchcited by 165
  27. 2020Membership Leakage in Label-Only Exposurescited by 156
  28. 2019Privacy Risks of Securing Machine Learning Models against Adversarial Examplescited by 136
  29. 2019Thieves on Sesame Street! Model Extraction of BERT-based APIscited by 136
  30. 2017Controllable Invariance through Adversarial Feature Learningcited by 127
  31. 2019Updates-Leak: Data Set Inference and Reconstruction Attacks in Online Learningcited by 117
  32. 2018Stealing Hyperparameters in Machine Learningcited by 115
  33. 2020Stealing Links from Graph Neural Networkscited by 114
  34. 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 112
  35. 2020Sub-graph Contrast for Scalable Self-Supervised Graph Representation Learningcited by 90
  36. 2016Towards the Science of Security and Privacy in Machine Learningcited by 89
  37. 2019Analyzing Information Leakage of Updates to Natural Language Modelscited by 89
  38. 2019Overlearning Reveals Sensitive Attributescited by 74

50 most cited of 54 All 54 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 5; 2022: 13; 2023: 9; 2024: 6; 2025: 1; 2026: 1.

35 papers.

Sort:

By area:

  1. 2021EncoderMI: Membership Inference against Pre-trained Encoders in Contrastive Learningcited by 68
  2. 2022"Real Attackers Don't Compute Gradients": Bridging the Gap Between Adversarial ML Research and Practicecited by 55
  3. 2021Model Stealing Attacks Against Inductive Graph Neural Networkscited by 50
  4. 2022SSLGuard: A Watermarking Scheme for Self-supervised Learning Pre-trained Encoderscited by 43
  5. 2022Data Poisoning Attacks Against Multimodal Encoderscited by 41
  6. 2022Dataset Inference for Self-Supervised Modelscited by 36
  7. 2024Evaluations of Machine Learning Privacy Defenses are Misleadingcited by 35
  8. 2021Property Inference Attacks Against GANscited by 32
  9. 2023Downstream-agnostic Adversarial Examplescited by 32
  10. 2022Can't Steal? Cont-Steal! Contrastive Stealing Attacks Against Image Encoderscited by 30
  11. 2022M^4I: Multi-modal Models Membership Inferencecited by 30
  12. 2022Auditing Membership Leakages of Multi-Exit Networkscited by 26
23 more
  1. 2022StolenEncoder: Stealing Pre-trained Encoders in Self-supervised Learningcited by 21
  2. 2021Membership Inference Attacks Against Self-supervised Speech Modelscited by 16
  3. 2022Membership-Doctor: Comprehensive Assessment of Membership Inference Against Machine Learning Modelscited by 16
  4. 2023MIST: Defending Against Membership Inference Attacks Through Membership-Invariant Subspace Trainingcited by 11
  5. 2024Self-supervised visual learning in the low-data regime: a comparative evaluationcited by 11
  6. 2022Semi-Leak: Membership Inference Attacks Against Semi-supervised Learningcited by 10
  7. 2023It Is All About Data: A Survey on the Effects of Data on Adversarial Robustnesscited by 9
  8. 2022How Does a Deep Learning Model Architecture Impact Its Privacy? A Comprehensive Study of Privacy Attacks on CNNs and Transformerscited by 8
  9. 2024TUNI: A Textual Unimodal Detector for Identity Inference in CLIP Modelscited by 8
  10. 2023Safeguarding Data in Multimodal AI: A Differentially Private Approach to CLIP Trainingcited by 7
  11. 2024DPAdapter: Improving Differentially Private Deep Learning through Noise Tolerance Pre-trainingcited by 7
  12. 2023Beyond Boundaries: A Comprehensive Survey of Transferable Attacks on AI Systemscited by 6
  13. 202110 Security and Privacy Problems in Large Foundation Modelscited by 5
  14. 2023SoK: Comparing Different Membership Inference Attacks with a Comprehensive Benchmarkcited by 3
  15. 2024Membership Privacy Evaluation in Deep Spiking Neural Networkscited by 3
  16. 2026Revisiting the LiRA Membership Inference Attack Under Realistic Assumptionscited by 3
  17. 2023A Comprehensive Study of Privacy Risks in Curriculum Learningcited by 2
  18. 2025Measuring D'ej`a vu Memorization Efficientlycited by 2
  19. 2023Membership Inference Attack for Beluga Whales Discriminationcited by 1
  20. 2022Additive Logistic Mechanism for Privacy-Preserving Self-Supervised Learningcited by 0
  21. 2022A Novel Membership Inference Attack against Dynamic Neural Networks by Utilizing Policy Networks Informationcited by 0
  22. 2023Differentially Private Optimization for Non-Decomposable Objective Functionscited by 0
  23. 2024Better Membership Inference Privacy Measurement through Discrepancycited by 0