Thief, Beware of What Get You There: Towards Understanding Model Extraction Attack

Xinyi Zhang, Chengfang Fang, Jie ShiarXiv 2021

Introduction

Model Extraction (ME) represents a significant security threat where an adversary clones a proprietary AI model by querying its API and observing the outputs. While traditional research often assumes the attacker possesses a "head start"—such as access to similar public datasets or models pre-trained on ImageNet—this paper explores strict scenarios. Specifically, it investigates what happens when the victim model is trained on sensitive, in-house data completely unknown to the attacker. The authors aim to transform ME from an empirical "guessing game" into a systematic, adaptive process by understanding how hyperparameters and query utility behave when starting with zero prior knowledge.

DRL-Guided Model Extraction Framework

To address these challenges, the authors propose a framework that adaptively generates queries to exploit the victim model's decision boundaries.

The DRL-guided Model Extraction Framework, featuring a Controlling Agent, Data Generator, Attacker Trainer, and Evaluator.

The framework consists of four integrated modules:

  1. Controlling Agent (DRL): Utilizing Deep Deterministic Policy Gradient (DDPG), this agent outputs instructions, including target probabilities and noise parameters, for subsequent queries.
  2. Data Generator: This module uses the i-FGSM (Iterative Fast Gradient Sign Method) to craft "adversarial" query images based on the DRL agent's instructions. These images are designed to extract maximum information rather than simply fool the model.
  3. Attacker Trainer: The clone model ($F_a$) is trained using "soft labels" (probability distributions) from the victim model ($F_v$). Notably, the study finds that SGD often outperforms Adam in this dynamic context.
  4. Evaluator: This component monitors the transfer set and provides reward signals to the DRL agent based on query diversity and the attacker model's loss.

Key Insights and Empirical Findings

The research debunks several "common sense" assumptions in model training when applied to extraction:

  • The Pre-training Crutch: Most ME attacks rely heavily on pre-trained weights. Without them, the budget for a successful extraction increases dramatically. Pre-training serves more as "prior knowledge" of the task than a simple feature extractor.
  • The Optimizer Paradox: Despite Adam's popularity, SGD proved superior for model extraction. Adam’s adaptive learning rates can lead to poor local minima due to the highly dynamic nature of the query distribution.
  • Overfitting as a Virtue: While typically avoided, "overfitting" the clone model to the victim's soft labels helps capture the nuances of the victim's decision boundaries, improving final test accuracy.
  • Learning from "Nothing": The framework can extract functional models starting from white noise. By iteratively perturbing noise to match specific output probabilities, the attacker "sculpts" a dataset representing the victim's internal logic.

Experimental Results

The framework was evaluated using standard benchmarks like Caltech-256, ImageNet, and FashionMNIST. The results highlight the effectiveness of the DRL-guided approach in data-scarce environments.

Performance comparison of the proposed DRL-guided method (Algorithm 1) against baselines in Data-Free and Limited-Data scenarios on FashionMNIST.

In the Data-Free Scenario, where no in-distribution data is available, the method achieved 54.7% accuracy, significantly higher than the random noise baseline of 32.9%. In the Limited-Data Scenario, using only 20 unlabeled images, the framework reached 75.2% accuracy, nearly matching models trained on much larger datasets. Furthermore, the authors demonstrated that even if an attacker lacks samples of a specific class (e.g., "Sneakers"), they can still extract the ability to recognize that class with high precision (up to 99%) by observing the victim's reactions to other queries.

Conclusion and Future Work

This work provides a deeper understanding of model extraction in restrictive environments. Future research directions include integrating Neural Architecture Search (NAS) to adaptively choose the best clone architecture and exploring Meta-Reinforcement Learning to generalize extraction strategies across different victim models and domains, such as NLP or tabular data.

Summary updated

BibTeX
@misc{zhang2021thief,
  author = {Xinyi Zhang and Chengfang Fang and Jie Shi},
  title = {{Thief, Beware of What Get You There: Towards Understanding Model Extraction Attack}},
  year = {2021},
  eprint = {2104.05921},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.05921},
}
Figure