Deep Neural Network Quantization Framework for Effective Defense against Membership Inference Attacks

Azadeh Famili, Yingjie LaoSensors 2023 · OpenReview

TL;DR

This paper introduces a novel quantization technique for deep neural networks that specifically aims to enhance privacy by defending against Membership Inference Attacks (MIAs). By strategically quantizing model weights, the authors demonstrate a significant reduction in the effectiveness of MIAs, making it harder for attackers to determine if a specific data sample was part of the model's training set, while also maintaining model performance.

What Problem Does This Paper Address?

The increasing deployment of machine learning models, especially on resource-constrained edge devices, brings forth challenges related to computational costs and, critically, user data privacy. Membership Inference Attacks (MIAs) pose a significant threat, allowing adversaries to infer whether a particular data sample was used during a model's training. This is particularly concerning in sensitive domains like healthcare, where data privacy is paramount. While model quantization is known for improving efficiency, its impact on privacy, specifically against MIAs, has not been thoroughly explored. Existing quantization methods primarily focus on compression and speed, often overlooking privacy implications. This paper aims to bridge this gap by proposing a quantization framework whose primary objective is to bolster a model's resistance to MIAs.

Methods

The core of this paper is a novel quantization algorithm designed to reduce overfitting during the quantization process, thereby enhancing resistance to MIAs. The authors propose a uniform weight-only quantization approach. This means that only the weights of the neural network are quantized, while the activations are left at their full precision. This strategy is crucial because MIAs often exploit the confidence gap between training data and unseen data, a gap that can be exacerbated by overfitting. By avoiding quantization of activations and specifically targeting overfitting during quantization, the model is encouraged to generalize better.

The quantization process involves:

  1. Defining a quantization range: This range is determined based on the model's weights.
  2. Applying a rounding function: Weights are rounded to the nearest integer within the defined intervals.
  3. Clamping: The rounded values are then clamped to ensure they fall within a predefined range.

The algorithm is integrated into the training phase (backpropagation), ensuring that the quantization process doesn't disrupt the training and avoids retraining, which could reintroduce overfitting.

Datasets

The paper evaluates its proposed method on the following widely used datasets:

  • Fashion MNIST: A dataset of 60,000 grayscale images (28x28 pixels) across 10 classes, with 10,000 images for testing.
  • Cifar10: A dataset of 60,000 color images (32x32 pixels) across 10 classes, with 6,000 images per class.

Key Insights and Ideas

  • Quantization as a Privacy Defense: The paper strongly suggests that model quantization, when strategically applied, can serve as an effective defense mechanism against privacy attacks like MIAs, not just as an efficiency improvement technique.
  • Overfitting is Key to MIA Vulnerability: The authors highlight that MIAs exploit the model's tendency to overfit to its training data. By reducing overfitting through their quantization method, they directly weaken the attack's effectiveness.
  • Weight-Only Quantization for Privacy: The decision to quantize only weights and not activations is a key insight. This approach aims to maintain model generalization capabilities while still achieving some level of privacy enhancement, unlike methods that quantize both.
  • Shadow Models are Crucial for MIA Evaluation: The paper emphasizes the use of shadow models in their MIA evaluation, which is a standard and robust approach for assessing MIA effectiveness.

Key Results

The proposed quantization framework demonstrated significant improvements in defending against MIAs across various models and datasets:

  • Reduced Attack Accuracy: For ResNet on Cifar10, the proposed algorithm reduced MIA attack accuracy by 14%.
  • Lower True Positive Rate: The true positive rate (members correctly identified as members) was reduced by 37% for ResNet on Cifar10, indicating attackers had a harder time confirming membership.
  • Improved F1-Score for Members: The F1-score for members was reduced by 39% for ResNet on Cifar10, further demonstrating the reduced effectiveness of the MIA.
  • Comparison to Baseline: The proposed method showed superior performance compared to the DoReFa-Net baseline, achieving over 28% reduction in F1-score for 4-bit quantization.
  • ROC Curve Analysis: The ROC curve for the quantized model showed behavior close to random classification, indicating a significant drop in MIA success compared to the full bitwidth model.

Limitations and Future Work

  • Ablation Study on Partial Quantization: An ablation study showed that partially quantizing the model (only the last 5 layers) led to a drop in F1-score, precision, and recall, suggesting that a more comprehensive quantization strategy is beneficial for MIA defense.
  • Future Work: The authors suggest exploring the application of their quantization approach to other quantization categories and further investigating its effectiveness against different types of MIA attacks. They also mention that enhancing resistance against MIA using different quantization categories is left for future work.

Summary updated

Abstract

Machine learning deployment on edge devices has faced challenges such as computational costs and privacy issues. Membership inference attack (MIA) refers to the attack where the adversary aims to infer whether a data sample belongs to the training set. In other words, user data privacy might be compromised by MIA from a well-trained model. Therefore, it is vital to have defense mechanisms in place to protect training data, especially in privacy-sensitive applications such as healthcare. This paper exploits the implications of quantization on privacy leakage and proposes a novel quantization method that enhances the resistance of a neural network against MIA. Recent studies have shown that model quantization leads to resistance against membership inference attacks. Existing quantization approaches primarily prioritize performance and energy efficiency; we propose a quantization framework with the main objective of boosting the resistance against membership inference attacks. Unlike conventional quantization methods whose primary objectives are compression or increased speed, our proposed quantization aims to provide defense against MIA. We evaluate the effectiveness of our methods on various popular benchmark datasets and model architectures. All popular evaluation metrics, including p r e c i s i o n , r e c a l l , and F 1 - s c o r e , show improvement when compared to the full bitwidth model. For example, for ResNet on Cifar10, our experimental results show that our algorithm can reduce the attack accuracy of MIA by 14%, the true positive rate by 37%, and F 1 - s c o r e of members by 39% compared to the full bitwidth network. Here, reduction in true positive rate means the attacker will not be able to identify the training dataset members, which is the main goal of the MIA.
BibTeX
@inproceedings{famili2023deep,
  author = {Azadeh Famili and Yingjie Lao},
  title = {{Deep Neural Network Quantization Framework for Effective Defense against Membership Inference Attacks}},
  booktitle = {Sensors},
  year = {2023},
  url = {https://openreview.net/forum?id=T2zf8kagGW},
}
Figure