# Model Extraction

> Ask an AI lots of things, save what it says, and train a copy on it.

**Field:** Artificial Intelligence  
**Category:** Safety & Security  
**Also known as:** Model Stealing, Model Theft, Distillation Attack

## Think of it like

It is like ordering a dish again and again. Soon you can cook it at home.

## Definition

Model extraction is an attack that copies a model by asking it lots of questions and saving the answers. The attacker then trains their own model to give the same answers. They never see the real weights, only what the API sends back. The copy can be close enough to use, or to study for weak spots. Model makers fight it by capping use and watching for odd floods of questions.

## Example

A company sees one account send millions of mixed prompts a day to its API. It looks like someone is building a set to train on, so the company blocks it.

## Why it matters

Training a strong model costs a lot. Extraction lets someone take much of that value for the price of the API calls.

## Common mistake

Thinking a model is safe because its weights are private. What it says can be enough to copy how it acts.

## Three principles

- **Ask a lot.** Save every answer.
- **Train a copy.** On the answers.
- **Watch for patterns.** And limit use.

## Related terms

- [Data Poisoning](https://learn.benibix.com/term/ai/data-poisoning)
- [Model Weights File](https://learn.benibix.com/term/ai/model-weights)
- [Knowledge Distillation](https://learn.benibix.com/term/ai/knowledge-distillation)
- [API Key](https://learn.benibix.com/term/development/api-key)

![An attacker sends thousands of questions to a model's API, saves every answer, and trains a copy of the model on them.](https://learn.benibix.com/diagrams/sf-model-extraction.svg)

---

Source: https://learn.benibix.com/term/ai/model-extraction
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
