Model Extraction Attack Fundamentals
What you'll learn: How attackers steal machine learning models by querying them repeatedly, and what they aim to achieve.
The Core Threat
A model extraction attack (also called model stealing) is when an adversary uses only query access to a machine learning model to reconstruct a functionally equivalent copy. Think of it like reverse-engineering a secret recipe by tasting the dish repeatedly with different ingredients—you never see the kitchen, but by observing outputs, you can recreate the formula.
Unlike data poisoning or adversarial examples, extraction attacks target the model's intellectual property itself. The attacker's goal isn't to break one prediction—it's to clone the entire model's behavior.
Attack Goals
Attackers pursue model extraction for several reasons:
- Intellectual property theft: Stealing expensive models trained on proprietary data
- Enabling follow-on attacks: Using the stolen copy to craft better adversarial examples
- Evading usage fees: Cloning commercial ML APIs to avoid payment
- Privacy breaches: Extracting sensitive information embedded in model parameters
The Threat Model
The typical extraction scenario assumes:
- Query access only: The attacker can send inputs and receive predictions (black-box setting)
- No direct model access: No access to weights, architecture, or training data
- Limited budget: Finite number of queries (though sometimes millions are feasible)
The attacker strategically chooses queries, observes outputs (predictions, confidence scores, rankings), then trains a substitute model to mimic the victim's behavior.
Key Takeaway: Model extraction attacks exploit the information leakage inherent in ML prediction APIs—each query reveals information about the model's decision boundaries, allowing attackers to reconstruct functional clones through strategic querying and substitute training.