By Sagar Shankaran, Founder of CallSphere
Understanding how model extraction attacks work against commercial LLMs, the legal and technical landscape, and defense strategies including watermarking, rate limiting, and output perturbation.
Key takeaways
Training a frontier LLM costs tens to hundreds of millions of dollars. Yet the knowledge encoded in that model can be extracted through its API at a fraction of the cost. Model extraction -- also called model stealing or distillation attacks -- is a growing concern for AI providers and enterprises alike.
In early 2026, this moved from academic concern to real-world controversy when multiple open-source models were found to have been trained primarily on outputs from proprietary models, violating terms of service and raising intellectual property questions.
The basic attack is straightforward:
# Simplified distillation attack
prompts = generate_diverse_prompts(count=1_000_000)
# Query the target model
training_data = []
for prompt in prompts:
response = target_api.generate(prompt)
training_data.append({"input": prompt, "output": response})
# Train student model
student_model.fine_tune(training_data)
The student model learns to approximate the teacher's behavior without access to the teacher's weights, training data, or architecture details.
Level 1: Naive Distillation Query the API with random prompts. Cheap but inefficient -- many prompts produce generic responses that do not transfer useful knowledge.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent for home services in your browser — 60 seconds, no signup.
Level 2: Active Learning Strategically select prompts that maximize information extraction. Query near decision boundaries, generate adversarial examples, and focus on capability areas where the student is weakest.
Level 3: Logit Extraction If the API exposes token probabilities (logprobs), the attacker gains much richer training signal. Full probability distributions transfer more knowledge than single text completions.
flowchart TD
HUB(("The Model Theft Problem"))
HUB --> L0["How Distillation Attacks<br/>Work"]
style L0 fill:#e0e7ff,stroke:#6366f1,color:#1e293b
HUB --> L1["Attack Sophistication Levels"]
style L1 fill:#e0e7ff,stroke:#6366f1,color:#1e293b
HUB --> L2["Cost of Extraction"]
style L2 fill:#e0e7ff,stroke:#6366f1,color:#1e293b
HUB --> L3["Defense Strategies"]
style L3 fill:#e0e7ff,stroke:#6366f1,color:#1e293b
HUB --> L4["The Ethical Dimension"]
style L4 fill:#e0e7ff,stroke:#6366f1,color:#1e293b
style HUB fill:#4f46e5,stroke:#4338ca,color:#fff
Level 4: Reinforcement from Comparisons Use the target model as a reward signal. Generate multiple responses with the student model, have the target model rank them, and use the rankings as training signal (similar to RLHF).
| Target Model | Estimated Training Cost | Extraction API Cost (approximate) |
|---|---|---|
| GPT-4 class | $100M+ | $50K-500K (depending on quality target) |
| Claude Sonnet class | $50M+ | $30K-200K |
| Specialized fine-tuned model | $10K-1M | $1K-50K |
The economics are clear: extraction is 100-1000x cheaper than original training.
The most basic defense: limit how many tokens a single user or API key can consume.
# Detect extraction patterns
EXTRACTION_SIGNALS = [
"high_volume_diverse_prompts", # Many different topics rapidly
"systematic_prompt_variation", # Same prompt with minor tweaks
"unusual_output_length_patterns", # Always requesting max tokens
"no_conversational_context", # Each request is independent
"automated_request_patterns" # Uniform timing between requests
]
When extraction signals are detected, throttle the account or require additional verification.
Still reading? Stop comparing — try CallSphere live.
See the home services AI agent handle a real call — complete, industry-specific, and live in your browser. No signup.
Introduce subtle, imperceptible modifications to model outputs that degrade the quality of distilled models:
The challenge: perturbation must not degrade the experience for legitimate users.
Embed detectable patterns in model outputs that survive distillation:
All major API providers prohibit using outputs to train competing models. In 2025-2026, several legal actions have been filed based on these terms. However, enforcement is challenging:
The distillation debate touches on fundamental questions:
There are no settled answers, but the industry is moving toward stronger protections and clearer norms around attribution and consent.
Sources: Anthropic Acceptable Use Policy | Model Extraction Attacks Survey | Watermarking LLMs Research
flowchart TD
HUB(("The Model Theft Problem"))
HUB --> L0["How Distillation Attacks<br/>Work"]
style L0 fill:#e0e7ff,stroke:#6366f1,color:#1e293b
HUB --> L1["Attack Sophistication Levels"]
style L1 fill:#e0e7ff,stroke:#6366f1,color:#1e293b
HUB --> L2["Cost of Extraction"]
style L2 fill:#e0e7ff,stroke:#6366f1,color:#1e293b
HUB --> L3["Defense Strategies"]
style L3 fill:#e0e7ff,stroke:#6366f1,color:#1e293b
HUB --> L4["The Ethical Dimension"]
style L4 fill:#e0e7ff,stroke:#6366f1,color:#1e293b
style HUB fill:#4f46e5,stroke:#4338ca,color:#fff
Written by
Sagar Shankaran· Founder, CallSphere
Sagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
Practical prompt injection defenses for voice agents — input sanitization, output guardrails, and adversarial testing.
Learn how to design privacy-first AI systems for procurement workflows. Covers data classification, guardrails, RBAC, prompt injection prevention, RAG, and full auditability for enterprise AI.
Learn how to secure agentic AI applications with pre-deployment testing, runtime guardrails, and data protection strategies. A practical guide for enterprise AI security.
A team at ETH Zurich publishes research showing universal prompt injection techniques that fool GPT-4o, Claude, and Gemini agents, exposing fundamental vulnerabilities in agentic AI systems.
AI defends critical infrastructure across energy, utilities, and manufacturing with OT/ICS security monitoring, anomaly detection, and autonomous threat response systems.
Anthropic identifies 24,000 fraudulent accounts generating over 16 million exchanges to extract Claude's capabilities, with MiniMax driving the most traffic.
© 2026 CallSphere LLC. All rights reserved.
Made within New York