Manipulating Transfer Learning for Property Inference

Yulong Tian, Fnu Suya, Anshuman Suri, Fengyuan Xu, David EvansCVPR 2023

Abstract

Transfer learning is a popular method for tuning pretrained (upstream) models for different downstream tasks using limited data and computational resources. We study how an adversary with control over an upstream model used in transfer learning can conduct property inference attacks on a victim's tuned downstream model. For example, to infer the presence of images of a specific individual in the downstream training set. We demonstrate attacks in which an adversary can manipulate the upstream model to conduct highly effective and specific property inference attacks (AUC score > 0.9), without incurring significant performance loss on the main task. The main idea of the manipulation is to make the upstream model generate activations (intermediate features) with different distributions for samples with and without a target property, thus enabling the adversary to distinguish easily between downstream models trained with and without training examples that have the target property. Our code is available at https://github.com/yulongt23/Transfer-Inference.

Introduction

Transfer learning has become the standard paradigm for developing specialized machine learning models, allowing developers to build high-performing systems with limited data by fine-tuning pre-trained "upstream" models. However, this reliance on external models introduces a significant privacy risk. This research investigates how a malicious provider of an upstream model can manipulate it to facilitate highly accurate property inference attacks on a downstream user's private training data.

The Property Inference Threat

Property inference attacks (PIAs) seek to determine whether a specific property—such as the presence of a particular individual or a specific demographic attribute—is represented in a model's training set. While passive PIAs against standard models often yield low accuracy, a "malicious provider" scenario allows the attacker to intentionally embed vulnerabilities. In this setting, the adversary controls the upstream model and rigs it to leak information during the victim's fine-tuning process.

Methodology: The Zero-Activation Attack

The researchers introduce the Zero-Activation Attack, which manipulates internal model activations to serve as a covert signal.

  1. Secreting Parameters: The attacker designates a subset of neurons as "secreting" units.
  2. Manipulation Loss: During upstream training, a custom loss function forces these neurons to output zero for data lacking the target property and high non-zero values for data possessing it.
  3. The Leakage Mechanism: During downstream fine-tuning, weights associated with zero-valued activations remain unchanged, while those associated with non-zero activations are updated. By analyzing these weight changes, the attacker can infer the presence of the target property.
  4. Stealthiness: To evade detection, a stealthier variant uses covariance matching to ensure malicious activations are statistically indistinguishable from normal ones, successfully bypassing anomaly detectors like Spectre.

Experimental Evaluation

The attacks were evaluated across several computer vision tasks using datasets like VGGFace2 (for face and gender recognition), ImageNet, and MAADFace (for attribute labels). The researchers tested the attack's sensitivity by varying the prevalence of the target property in the downstream set from 1.5% down to 0.1% (as few as 10 samples out of 10,000).

Key Results

The proposed manipulation dramatically increases the effectiveness of property inference. While attacks on normally trained models typically achieve AUC scores below 0.65, the manipulated models enable AUC scores exceeding 0.90, often reaching a perfect 1.0 when the target property accounts for just 1% of the dataset.

Inference AUC for various attack methods across three downstream tasks.

As shown in Figure 1, the "Variance" and "Difference" methods—which leverage the distribution shifts in activations—achieve near-perfect inference across Gender Recognition, Smile Detection, and Age Prediction tasks. The attack is remarkably sensitive, maintaining high performance even when the target property is extremely rare in the training set.

Furthermore, the manipulation is highly stealthy. It results in less than a 0.9% drop in primary task accuracy, making it nearly impossible for users to detect based on performance alone. The contrast between manipulated and non-manipulated models is further illustrated by the performance of meta-classifiers.

Comparison of inference AUC between manipulated models and non-manipulated baselines.

Figure 6 demonstrates that meta-classifiers, which struggle to infer properties from standard models (the faded baseline lines), become highly effective when applied to manipulated models (the solid and dotted lines).

Conclusion

This research highlights a critical vulnerability in the transfer learning pipeline. The entity providing the base model possesses the power to bake in privacy leaks that are activated by the victim's own fine-tuning process. The primary defense is caution: users should only utilize pre-trained models from trusted sources. This work initiates a new "arms race" in model auditing, necessitating the development of robust techniques to sanitize upstream models or detect subtle, intentional distribution shifts.

Summary updated

BibTeX
@inproceedings{tian2023manipulating,
  author = {Yulong Tian and Fnu Suya and Anshuman Suri and Fengyuan Xu and David Evans},
  title = {{Manipulating Transfer Learning for Property Inference}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  url = {https://openreview.net/forum?id=M_QKu2d2Qtq},
}
Figure