[Paper Review] Model Leeching: An Extraction Attack Targeting LLMs
This paper introduces Model Leeching, a cost-effective black-box extraction attack that distills task-specific knowledge from large language models (LLMs) like ChatGPT-3.5-Turbo into smaller, distilled models using automated prompt engineering. The attack achieves 73% Exact Match and 87% F1 on SQuAD with only $50 in API costs, and enables adversarial attack transferability, boosting attack success rates by 11% when targeting the original LLM.
Model Leeching is a novel extraction attack targeting Large Language Models (LLMs), capable of distilling task-specific knowledge from a target LLM into a reduced parameter model. We demonstrate the effectiveness of our attack by extracting task capability from ChatGPT-3.5-Turbo, achieving 73% Exact Match (EM) similarity, and SQuAD EM and F1 accuracy scores of 75% and 87%, respectively for only $50 in API cost. We further demonstrate the feasibility of adversarial attack transferability from an extracted model extracted via Model Leeching to perform ML attack staging against a target LLM, resulting in an 11% increase to attack success rate when applied to ChatGPT-3.5-Turbo.
Motivation & Objective
- To develop a scalable, low-cost method for extracting task-specific knowledge from production LLMs via API access.
- To investigate whether distilled models derived from LLMs can be used to stage effective adversarial attacks on the original target model.
- To evaluate the feasibility and effectiveness of model extraction and attack transferability in real-world LLM threat scenarios.
- To explore the implications of model stealing for LLM security, privacy, and intellectual property protection.
Proposed method
- Designing a three-stage prompt generation system: (1) knowledge discovery to assess target LLM behavior, (2) prompt template construction based on observed response patterns, and (3) validation of prompt reliability and consistency.
- Automatically generating high-quality, task-specific training data by querying the target LLM via its public API using crafted prompts.
- Training a smaller, distilled model (e.g., RoBERTa-Large) on the extracted data to recreate the target LLM’s task-specific behavior.
- Using the extracted model as a sandbox for adversarial attack development, particularly for transferable attacks like AddSent.
- Measuring performance via Exact Match (EM) and F1 scores on SQuAD to quantify knowledge transfer fidelity.
- Evaluating attack transferability by applying attacks optimized on the extracted model to the original target LLM (e.g., ChatGPT-3.5-Turbo).
Experimental results
Research questions
- RQ1Can task-specific knowledge be effectively extracted from a production LLM like ChatGPT-3.5-Turbo using only API queries and automated prompt design?
- RQ2To what extent can a smaller distilled model replicate the performance of a large LLM on a specific NLP task like question answering?
- RQ3Can an extracted model be used to stage more effective adversarial attacks on the original target LLM?
- RQ4What is the degree of attack transferability from a user-created extracted model to a production LLM?
- RQ5How does the cost of model extraction impact the feasibility and scalability of such attacks in practice?
Key findings
- Model Leeching successfully extracted task-specific knowledge from ChatGPT-3.5-Turbo, achieving 73% Exact Match (EM) similarity on the SQuAD benchmark.
- The best-performing distilled model (RoBERTa-Large) matched the target LLM’s SQuAD EM and F1 scores exactly, demonstrating high-fidelity knowledge distillation.
- The attack achieved a 26% increase in success rate for the AddSent adversarial attack when refined on the extracted model, translating to an 11% boost when transferred to the original ChatGPT-3.5-Turbo.
- The entire extraction process cost only $50 in API fees, demonstrating the economic feasibility of such attacks at scale.
- The extracted model exhibited near-identical response patterns and error profiles to the target LLM, indicating semantic and syntactic replication of behavior.
- The study confirms that model extraction via Model Leeching enables effective adversarial attack staging, exposing a critical security surface in publicly accessible LLMs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.