Skip to main content
QUICK REVIEW

[Paper Review] Quantifying and Mitigating Privacy Risks of Contrastive Learning

Xinlei He, Yang Zhang|arXiv (Cornell University)|Feb 8, 2021
Privacy-Preserving Technologies in DataComputer Science69 references6 citations
TL;DR

This paper presents the first privacy analysis of contrastive learning, revealing that while contrastive models are less vulnerable to membership inference attacks due to reduced overfitting, they are significantly more susceptible to attribute inference attacks due to their expressive representations. To mitigate this, the authors propose Talos, a privacy-preserving contrastive learning framework using adversarial training to suppress sensitive attribute leakage, effectively reducing attribute inference risk without sacrificing model utility or membership privacy.

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.

Motivation & Objective

  • To quantify privacy risks in contrastive learning models, particularly regarding membership and attribute inference attacks.
  • To investigate why contrastive models may leak sensitive information despite lower overfitting compared to supervised models.
  • To develop a novel privacy-preserving mechanism that reduces attribute inference risks while preserving model utility and membership privacy.
  • To evaluate the effectiveness of the proposed method on standard image datasets under realistic attack scenarios.

Proposed method

  • Adapt existing membership inference and attribute inference attack methods—neural network-based, metric-based, and label-only—for use against contrastive models.
  • Introduce an adversarial classifier into the contrastive learning pipeline to suppress learning of sensitive attributes during representation learning.
  • Train the contrastive model and the adversarial classifier jointly using adversarial training, where the classifier attempts to infer sensitive attributes while the encoder is optimized to minimize this capability.
  • Use data augmentation to generate positive and negative views for contrastive learning, maintaining the standard SimCLR framework with MoCo-style queue for memory efficiency.
  • Apply the privacy-preserving mechanism (Talos) during pre-training to ensure that representations do not encode sensitive attributes.
  • Evaluate privacy and utility trade-offs using attack accuracy, model performance on downstream tasks, and membership inference success rates.

Experimental results

Research questions

  • RQ1How vulnerable are contrastive models to membership inference attacks compared to supervised models?
  • RQ2Why are contrastive models more susceptible to attribute inference attacks despite lower overfitting?
  • RQ3Can adversarial training effectively suppress sensitive attribute leakage in contrastive representations?
  • RQ4To what extent does the proposed privacy-preserving mechanism preserve model utility and membership privacy?
  • RQ5Can the privacy mitigation approach be generalized across different image datasets and architectures?

Key findings

  • Contrastive models achieve a membership inference attack accuracy of 0.620 on STL10 with ResNet-50, significantly lower than the 0.810 achieved on corresponding supervised models.
  • On the UTKFace dataset, attribute inference attack accuracy reaches 0.701 for contrastive models with ResNet-18, compared to only 0.422 for supervised models.
  • The increased vulnerability to attribute inference is attributed to the expressive and informative nature of contrastive representations, which retain detailed information about input samples.
  • Talos successfully reduces attribute inference attack accuracy to near-baselines while maintaining high performance on downstream classification tasks.
  • Talos preserves membership privacy, with no significant increase in membership inference success rate compared to standard contrastive learning.
  • The method demonstrates robustness across different architectures and datasets, confirming its generalizability as a privacy-preserving solution for contrastive learning.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.