FDINet: Protecting Against DNN Model Extraction Using Feature Distortion Index

Hongwei Yao, Zheng Li, Haiqin Weng, Feng Xue, Zhan Qin, Kui Ren

TL;DR

This paper introduces FDINET, a novel defense mechanism against model extraction attacks in Machine Learning as a Service (MLaaS). FDINET leverages a "Feature Distortion Index" (FDI) to detect malicious queries by analyzing deviations in feature distributions, proving effective against various attacks and even identifying colluding adversaries.

What Problem Does This Paper Address?

Machine Learning as a Service (MLaaS) has become increasingly popular, offering accessibility and cost-efficiency for deploying deep neural networks (DNNs). However, this convenience comes with a significant security risk: model extraction attacks. In these attacks, adversaries query a cloud-based DNN model through its public API and use the input-output pairs to train a surrogate model that mimics the original. This not only compromises the intellectual property of the model owner but can also enable further attacks like membership inference or adversarial example generation. Existing defenses often rely on strong assumptions about the adversary or require significant computational resources, and many struggle against advanced stealthy attacks like distributed model extraction. This paper aims to address these limitations by proposing a generic, efficient, and robust defense against a wide range of model extraction attacks, including distributed and adaptive variants.

Methods

The core of FDINET lies in its novel "Feature Distortion Index" (FDI). The authors observed that queries submitted by adversaries exhibit a deviation in their feature distribution compared to legitimate queries. FDI quantifies this deviation. The process involves:

  1. Selecting Anchor Samples: High-confidence data points from the training set are chosen as "anchor samples" for each class. These represent the typical feature distribution of benign data.
  2. Measuring Feature Distortion: For each incoming query, its feature maps are extracted from specific layers of the victim model. The distance between these query features and the features of the anchor samples is calculated. This distance is the "feature distortion."
  3. Training an Extraction Attack Detector: The calculated FDI values (which form an FDI vector) are used as input to a binary classifier. This classifier is trained to distinguish between benign and malicious queries.
  4. Identifying Colluding Adversaries: The authors noticed that FDI vectors from queries generated by the same model extraction strategy exhibit high similarity. This insight is used to develop a detector for colluding adversaries, employing two-sample hypothesis tests on the FDI vectors of different clients.
  5. Handling Adaptive Attacks: The paper also proposes an adaptive attack called "Feature Correction" (FeatC) to test FDINET's robustness. FeatC uses an auxiliary encoder to modify query features to resemble anchor samples, aiming to evade detection.

Datasets

The authors evaluated FDINET on four benchmark datasets:

  • CIFAR10: A general visual recognition dataset.
  • GTSRB: A traffic sign recognition dataset.
  • CelebA: A face recognition dataset.
  • Skin Cancer Diagnosis: A dataset for disease diagnosis.

These datasets were used with four popular model architectures: VGG19, MobileNetV2, DenseNet121, and ResNet50. The paper does not introduce new benchmarks but uses established ones to demonstrate the broad applicability of FDINET.

Key Insights and Ideas

  • Feature Distribution Deviation as a Universal Indicator: The key insight is that adversarial queries, regardless of the specific extraction attack strategy, tend to distort the feature distribution of the victim model's internal representations. This "feature distortion" is a more fundamental characteristic than specific query patterns.
  • FDI as a Unified Metric: The Feature Distortion Index (FDI) provides a quantitative and generic way to measure this deviation, making it applicable across various attack types without needing prior knowledge of the adversary's strategy.
  • FDI Similarity for Collusion Detection: The observation that similar attack strategies lead to similar FDI vectors is crucial for detecting coordinated attacks from multiple clients. This allows for a more sophisticated defense against distributed adversaries.
  • Efficiency with Few Queries: FDINET can raise an alarm with a surprisingly small number of queries, making it suitable for real-time MLaaS environments where low latency is critical.

Key Results

  • High Detection Accuracy: FDINET achieved 100% detection accuracy on the DFME and DaST attacks and high accuracy (above 91%) for identifying colluding adversaries across various attacks.
  • Efficiency: The system can detect an extraction attack with as few as 50 queries, with an average confidence of 96.08% on GTSRB.
  • Robustness: FDINET demonstrated effectiveness against six state-of-the-art extraction attacks and showed resilience against adaptive attacks like Feature Correction and Dummy Query.
  • Low False Positive Rate: The method generally achieved a low FPR, indicating it effectively distinguishes benign from malicious queries.
  • Lightweight and Flexible: FDINET is described as lightweight and flexible, not relying on historical queries or making strong assumptions about the victim model or adversary.

Limitations and Future Work

  • Language Models: The current work focuses on computer vision models. The authors suggest extending FDINET to language models, which are also vulnerable to extraction attacks.
  • Adaptive Attack Performance: While FDINET is robust, there was a slight decrease in detection accuracy for Knockoff and ActiveThief attacks when defending against the Feature Correction adaptive attack. This is attributed to the use of natural images in these attacks, which might have higher feature overlap with training data.
  • Threshold Selection: The paper discusses the impact of the threshold (T1) on detection accuracy and provides guidance for selection, but it remains a parameter that needs careful tuning for new datasets.
  • Overlap in Surrogate Datasets: For attacks like Knockoff and ActiveThief, when their surrogate datasets overlap with the training data, FDINET's performance can be slightly impacted.

Summary updated

BibTeX
@article{yao2025fdinet,
  author = {Hongwei Yao and Zheng Li and Haiqin Weng and Feng Xue and Zhan Qin and Kui Ren},
  title = {{FDINet: Protecting Against DNN Model Extraction Using Feature Distortion Index}},
  journal = {IEEE Trans. Dependable Secur. Comput.},
  year = {2025},
  doi = {10.1109/tdsc.2024.3520599},
}
Figure