Skip to content
LiveNext 01:58:57

Definition

What is Model extraction attack?

Model extraction attack is a model extraction attack copies a model's behavior by querying it many times and training a copy on the answers, without ever seeing its weights or training data.

What it is

A model extraction attack is an attempt to steal what a model can do using only its public interface. The attacker never touches the weights or the training data. They send inputs, collect outputs, and use those pairs to build a copy.

The idea was formalized in a 2016 USENIX Security paper, "Stealing Machine Learning Models via Prediction APIs," by Florian Tramèr and colleagues. They showed that a model offered through a query interface could be recovered with near-perfect fidelity for simpler model types, including logistic regression, decision trees and small neural networks.

How it works

Picture a restaurant that will never share its recipe but will cook any dish you order. If you order enough dishes and write down exactly what comes out, you can eventually cook something close to the original.

For a modern language model the steps look like this:

  1. The attacker writes a large set of prompts.
  2. They send the prompts to the target model through its API.
  3. They record the answers, and sometimes the confidence scores or reasoning the model shows.
  4. They train their own model on those prompt and answer pairs.

The richer the output, the easier the job. Early research found that returning confidence values made extraction far more efficient, though hiding them did not fully stop it. Label-only attacks still worked, only less efficiently.

Why it matters

Training a leading model is expensive, and the outputs are the product. An extracted copy can capture much of that value cheaply. It can also strip away the safeguards the original lab built, because the copy only learns to imitate answers, not the rules behind refusing some of them.

Providers respond in several ways:

  • Rate limits on how many queries one account can send. See rate limiting.
  • Usage policies that forbid using outputs to train competing models.
  • Monitoring for query patterns that look like systematic harvesting.
  • Limiting what the API returns, such as hiding confidence scores or intermediate reasoning.

How it differs from distillation

Distillation is the same mechanical process, training a smaller model on a larger model's outputs, and labs use it legitimately on their own models all the time. An extraction attack is distillation done without permission, against a model you do not own.

Extraction attacks often target a frontier model through its API, and defenses lean on rate limiting and an API key per customer. The training data used to build the copy is often synthetic data generated by the target.

Questions people ask

What is a model extraction attack?

It is copying a model's behavior by sending it many inputs, recording the outputs, and training a new model on them.

Is model extraction the same as distillation?

The method is the same. Distillation is permitted when you do it to your own model, and extraction is doing it to someone else's without permission.

Model extraction attack in the news

#02

Anthropic says it cut Claude distillation by up to 99%

Anthropic says new defenses cut the Claude reasoning data distillers harvest by about 90 to 99%, and it has banned tens of thousands of accounts. The fine print reaches honest developers too: new API accounts can't edit Claude's prior context, and blocked requests are billed.

#02

OpenAI clamps down on distillation and AI routers

OpenAI says GPT-6.2 Astra gives up its protected reasoning in 0.2% of extraction attacks, down from 54% for GPT-6 Astra, and its rules now require routers and gateways to get its approval. If you reach OpenAI through a middleman, find out where it stands.