MEGEX: Data-Free Model Extraction Attack Against Gradient-Based Explainable AI

Takayuki Miura, Toshiki Shibahara, Naoto Yanai

TL;DR

This paper introduces MEGEX, a novel "data-free" model extraction attack that leverages explanations from gradient-based AI to steal machine learning models more efficiently. By using these explanations, MEGEX significantly reduces the number of queries needed to reconstruct a high-accuracy clone model, posing a new threat to the security of explainable AI systems.

What Problem Does This Paper Address?

The increasing adoption of Machine Learning as a Service (MLaaS) has brought about the threat of "model extraction attacks," where adversaries steal proprietary machine learning models by querying their APIs and training a clone. While traditional attacks require adversaries to collect input data, "data-free" attacks have emerged, allowing adversaries to use generative models to create their own input data. However, these data-free attacks are often inefficient, requiring a large number of queries. This paper addresses the inefficiency of data-free model extraction attacks, particularly when applied to models enhanced with explainable AI (XAI) features, which are becoming increasingly common for building trust and transparency. The authors highlight that existing data-free attacks struggle to efficiently leverage the information provided by XAI, leading to a gap in understanding the security implications of these combined technologies.

Methods

The core innovation of MEGEX lies in its ability to utilize gradient-based explanations, specifically from Vanilla Gradient, to improve the efficiency of data-free model extraction.

  • Leveraging Explanations: Unlike previous data-free attacks that rely on zeroth-order gradient estimation (which requires extra queries), MEGEX uses the provided explanations (gradients of the prediction with respect to input pixels) to compute exact gradients for training the generative model. This is achieved through a clever application of the chain rule, allowing the adversary to obtain $\nabla_{\theta_G} L$ (gradient for the generative model) by combining the known $\nabla_x L(x)$ (gradient of the loss with respect to input) and the backpropagated $\nabla_{\theta_G} G(z)$ (gradient of the generated input with respect to generative model parameters).
  • Data-Free Framework: MEGEX operates within the established data-free model extraction paradigm. It involves training two models simultaneously:
  • Generative Model (G): This model learns to generate realistic input data from random noise.
  • Clone Model (f): This model aims to mimic the behavior of the victim model.
  • Adversarial Training Loop: The process is iterative:
  • The generative model creates input data.
  • These generated inputs are queried to the victim model to obtain predictions and, crucially, their explanations.
  • The explanations are used to compute exact gradients for training the generative model.
  • The generated data and victim model predictions are used to train the clone model. This loop continues until a predefined query budget is exhausted.

Datasets

The paper evaluates MEGEX on two standard image classification datasets:

  • CIFAR-10: A dataset of 60,000 32x32 color images in 10 classes.
  • SVHN (Street View House Numbers): A dataset of house numbers obtained from Google Street View images.

The authors use these datasets to train and evaluate the accuracy of the extracted clone models. No new benchmarks are introduced; instead, existing datasets are used to compare MEGEX against prior work.

Key Insights and Ideas

  • Explanations as a Vulnerability: The paper demonstrates that gradient-based explanations, intended to increase transparency, can inadvertently become a vulnerability, providing adversaries with crucial information to facilitate model extraction.
  • Exact Gradients for Efficiency: By using explanations, MEGEX bypasses the need for noisy and query-intensive zeroth-order gradient estimation, leading to more accurate clone models with fewer queries.
  • Trade-off Between Interpretability and Security: The findings suggest a fundamental trade-off: making models more interpretable through XAI might make them more susceptible to extraction attacks, especially if the explanations themselves can be exploited.
  • Data-Free Attacks are Becoming More Potent: MEGEX shows that even without access to the original training data, sophisticated attacks can be mounted, posing a significant threat to deployed AI systems.

Key Results

MEGEX demonstrates superior performance compared to existing data-free model extraction methods, particularly DFME (Data-Free Model Extraction).

  • CIFAR-10: With 20 million queries, MEGEX using the l₁ norm loss achieves a normalized accuracy of 92.3% (0.98× the victim model's accuracy), significantly outperforming DFME's 80.6% (0.84×).
  • SVHN: With 2 million queries, MEGEX with l₁ norm loss achieves 92.5% (0.98× the victim model's accuracy), comparable to DFME's 92.5% (0.98×).
  • Query Efficiency: MEGEX requires approximately 6/7 times fewer queries than DFME and 3/8 times fewer queries than MAZE (another data-free attack) to achieve comparable or better clone model accuracy.
  • KL-divergence Limitation: For CIFAR-10, both MEGEX and DFME struggle with KL-divergence loss, achieving only 72.1% accuracy, which the authors attribute to vanishing gradients. This highlights the importance of the chosen loss function.

Limitations and Future Work

  • Limited Explanation Method: The current MEGEX attack is specifically designed for gradient-based explainable AI using Vanilla Gradient. The authors suggest investigating whether similar attacks can be mounted against other gradient-based explanation methods like SmoothGrad and Integrated Gradients.
  • Defense Evaluation: The paper acknowledges the need to evaluate existing defense mechanisms against these advanced model extraction attacks.
  • Practical Implications: While the paper demonstrates the feasibility and efficiency of MEGEX, further research is needed to understand the full practical implications and develop robust defenses against such sophisticated attacks in real-world MLaaS deployments.

Summary updated

BibTeX
@inproceedings{miura2024megex,
  author = {Takayuki Miura and Toshiki Shibahara and Naoto Yanai},
  title = {{MEGEX: Data-Free Model Extraction Attack Against Gradient-Based Explainable AI}},
  booktitle = {Sectl@asiaccs},
  year = {2024},
  doi = {10.1145/3665451.3665533},
}
Figure