An Embarrassingly Simple Detector for Model Extraction Attacks in Large Language Model API Traffic
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) are increasingly deployed through hosted APIs, making model extraction a practical threat to model ownership and service security. Individual extraction queries often resemble benign requests, while existing evaluations often focus on single-query anomaly scoring or pure benign-versus-attacker user settings. We formulate model extraction monitoring as benign-calibrated traffic-window distribution testing: embed incoming queries into a semantic space and test whether their aggregate distribution deviates from historical benign traffic. We instantiate this formulation with maximum mean discrepancy (MMD), using only benign-vs-benign comparisons to set the decision threshold. We evaluate on fourteen attacker-normal query pairs from four extraction scenarios and compare with adapted PRADA, SEAT, CAP, DATE, marginal Mahalanobis, and pseudo-class energy baselines. Across three random seeds, MMD achieves 0.3% benign FPR, 100.0% pure-attacker TPR, 90.5% average TPR over attacker fractions, and 95.1% balanced accuracy. These results show that benign-calibrated distribution testing is a strong empirical baseline for model extraction detection in both user-level and mixed multi-user LLM API traffic.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 32 of its 50 references that are in the map. First posted on arXiv 4 Jun 2026.
Builds on
32 of 50 references.
References · 32
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2015Distilling the Knowledge in a Neural Networkcited by 10,324
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
- 2021On the Opportunities and Risks of Foundation Modelscited by 4,033
- 2016Pointer Sentinel Mixture Modelscited by 3,096
- 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,385
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,183
- 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,173
- 2018A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attackscited by 1,485
20 more
- 2020Energy-based Out-of-distribution Detectioncited by 1,299
- 2016Practical Black-Box Attacks against Machine Learningcited by 903
- 2017Automated Hate Speech Detection and the Problem of Offensive Languagecited by 736
- 2016Stealing Machine Learning Models via Prediction APIscited by 619
- 2018Turning Your Weakness Into a Strength: Watermarking Deep Neural Networks by Backdooringcited by 357
- 2018Knockoff Nets: Stealing Functionality of Black-Box Modelscited by 292
- 2019High Accuracy and High Fidelity Extraction of Neural Networkscited by 214
- 2018PRADA: Protecting against DNN Model Stealing Attackscited by 165
- 2024Stealing Part of a Production Language Modelcited by 159
- 2019Thieves on Sesame Street! Model Extraction of BERT-based APIscited by 139
- 2016Generative Models and Model Criticism via Optimized Maximum Mean Discrepancycited by 100
- 2019DAWN: Dynamic Adversarial Watermarking of Neural Networkscited by 100
- 2018Exploring Connections Between Active Learning and Model Extractioncited by 85
- 2021Revisiting Mahalanobis Distance for Transformer-Based Out-of-Domain Detectioncited by 70
- 2021DATE: Detecting Anomalies in Text via Self-Supervision of Transformerscited by 25
- 2023Model Leeching: An Extraction Attack Targeting LLMscited by 22
- 2025MISLEADER: Defending against Model Extraction with Ensembles of Distilled Modelscited by 8
- 2023MeaeQ: Mount Model Extraction Attacks with Efficient Queriescited by 6
- 2026CREDIT: Certified Ownership Verification of Deep Neural Networks Against Model Extraction Attackscited by 5
- 2023A Controlled Experiment on the Impact of Intrusion Detection False Alarm Rate on Analyst Performancecited by 1
Built on by
Citing papers per year: 2026: 3.
3 papers.