QUEEN: Query Unlearning against Model Extraction

Huajie Chen, Tianqing Zhu, Lefeng Zhang, Bo Liu, Derui Wang, Wanlei Zhou, Minhui Xue

TL;DR

QUEEN (QUEry unlEarNing) is a proactive defense mechanism that sabotages model extraction attacks by identifying highly informative queries and returning falsified outputs. By triggering "gradient reverse" in the adversary's training process, QUEEN effectively cripples piracy models—often reducing their accuracy to near-random levels—while maintaining high utility for legitimate users.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are expensive intellectual properties. In a Model Extraction Attack (MEA), an adversary queries a target model (the "protectee") as a black box and uses the resulting confidence vectors as ground-truth labels to train their own "piracy model."

Existing defenses generally fall into two categories:

  1. Passive Defenses: Like watermarking or fingerprinting, these only help prove ownership after a model has been stolen. They don't stop the theft itself.
  2. Active Defenses: These perturb outputs or increase query latency. However, many current methods either degrade the original model's accuracy too much or are easily bypassed by sophisticated attackers who can "purify" the noisy outputs.

The authors of QUEEN aim to proactively eliminate the threat by identifying when a sequence of queries is becoming dangerous and actively poisoning the adversary's learning process.

Methods

QUEEN operates on two main pillars: Sensitivity Measurement and Output Perturbation.

1. Sensitivity Measurement

The authors observed that queries falling near the center of a class's feature cluster are far more "sensitive" (informative) for training a piracy model than peripheral ones.

  • Single Query Sensitivity (SQS): QUEEN uses a mapping network to project high-dimensional features into a 2D space. It then measures how close a query is to the pre-calculated cluster center of its predicted class.
  • Cumulative Query Sensitivity (CQS): The system tracks the "queried area" within a sensitive region for each class. If the CQS exceeds a specific threshold, the system identifies the user as a potential attacker.
Fig. 2. Sensitivity Measurement. The CQS is the sum of the red/queried area over the gray/sensitive area.

2. Output Perturbation (Sabotage)

Once a threat is detected, QUEEN doesn't just add noise; it launches a counterattack:

  • Gradient Reverse: For highly sensitive queries, QUEEN calculates a falsified confidence vector designed to make the piracy model's gradient point in the opposite direction of the true objective. This "unlearning" process actively worsens the piracy model's performance.
  • Feature Perturbation: For queries outside the sensitive region, the system slightly shifts the features toward distant cluster centers to obfuscate the decision boundary without significantly impacting legitimate usage.
Fig. 3. The workflow of QUEEN. After sensitivity measurement, there are four conditions where the output is either honestly returned or perturbed with gradient reverse or feature perturbation.

Datasets

The researchers evaluated QUEEN across several standard image classification benchmarks:

  • CIFAR-10 and CIFAR-100: Standard small-scale image datasets.
  • Caltech256 and CUB200: More complex datasets used to test the defense on deeper architectures like ResNet50.
  • Outlier Exposure (OE) Datasets: SVHN and Indoor67 were used to train models with better out-of-distribution detection, a prerequisite for some baseline defenses.

Key Insights and Ideas

  • Central vs. Peripheral Data: The core "aha moment" is that not all queries are equal. Protecting the "central" data points (those most representative of a class) is the most efficient way to prevent model extraction. Sabotaging these specific queries yields the highest "bang for the buck" in terms of defense.
  • Proactive Sabotage: Unlike defenses that try to hide information, QUEEN actively misleads the attacker. By simulating the piracy model using an ensemble of local "shadow models," the defender can predict how the attacker will learn and provide outputs that trigger destructive updates.
  • Utility Trade-off: By only perturbing the most sensitive queries, QUEEN maintains high accuracy for the majority of normal user queries, solving the utility-degradation problem common in active defenses.

Key Results

QUEEN consistently outperformed state-of-the-art (SOTA) defenses like Reverse Sigmoid (RS) and ModelGuard.

  • Attack Suppression: On CIFAR-10, a direct query attack that would normally achieve 87.42% accuracy was crushed to just 10.00% (random guessing) by QUEEN.
  • Utility Preservation: While achieving this massive drop in attack accuracy, the protectee model's accuracy only dipped slightly, from 92.74% to 90.01%.
  • Robustness: Even against "Label-Only" attacks (where the adversary only sees the top-1 class), QUEEN maintained superior defense compared to other methods.
  • Efficiency: The runtime for processing 1,000 queries is approximately 4.28 seconds, making it practical for real-world MLaaS (Machine Learning as a Service) deployments.

Limitations and Future Work

  • Recovery-Based Attacks: The authors acknowledge that advanced adaptive adversaries using generative models (like D-DAE) to "purify" outputs can partially recover model performance. While QUEEN still outperforms other defenses here, its effectiveness is reduced if the attacker can successfully recover the correct argmax (top label).
  • Shadow Model Cost: To perform gradient reverse, the defender must train an ensemble of shadow models. While this is a one-time cost, it requires significant initial computational resources.
  • Future Direction: The authors suggest that mitigating advanced recovery-based attacks and exploring defenses against distributed (DDoS-style) model extraction are promising areas for future research.

Summary updated

BibTeX
@article{chen2025queen,
  author = {Huajie Chen and Tianqing Zhu and Lefeng Zhang and Bo Liu and Derui Wang and Wanlei Zhou and Minhui Xue},
  title = {{QUEEN: Query Unlearning against Model Extraction}},
  journal = {IEEE Trans. Inf. Forensics Secur.},
  year = {2025},
  url = {https://openreview.net/forum?id=ydZrgtwozc},
}
Figure