Lune

ICLR2020Top-tier venue

Thieves on Sesame Street! Model Extraction of BERT-based APIs

Kalpesh Krishna, Gaurav Singh Tomar, Ankur P. Parikh, Nicolas Papernot, Mohit Iyyer

Abstract

We study the problem of model extraction in natural language processing, in which an adversary with only query access to a victim model attempts to reconstruct a local copy of that model. Assuming that both the adversary and victim model fine-tune a large pretrained language model such as BERT (Devlin et al. 2019), we show that the adversary does not need any real training data to successfully mount the attack. In fact, the attacker need not even use grammatical or semantically meaningful queries: we show that random sequences of words coupled with task-specific heuristics form effective queries for model extraction on a diverse set of NLP tasks, including natural language inference and question answering. Our work thus highlights an exploit only made feasible by the shift towards transfer learning methods within the NLP community: for a query budget of a few hundred dollars, an attacker can extract a model that performs only slightly worse than the victim model. Finally, we study two defense strategies against model extraction---membership classification and API watermarking---which while successful against naive adversaries, are ineffective against more sophisticated ones.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

65 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Protecting Intellectual Property of Language Generation APIs with Lexical Watermark cites Stealing Machine Learning Models via Prediction APIs
  • Protecting Intellectual Property of Language Generation APIs with Lexical Watermark cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
  • Adversarial Watermarking Transformer: Towards Tracing Text Provenance with Data Hiding cites Stealing Machine Learning Models via Prediction APIs
  • Adversarial Watermarking Transformer: Towards Tracing Text Provenance with Data Hiding cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
  • Adversarial Watermarking Transformer: Towards Tracing Text Provenance with Data Hiding cites Deep Neural Network Fingerprinting by Conferrable Adversarial Examples
  • Membership Inference Attacks Against Machine Learning Models cites Stealing Machine Learning Models via Prediction APIs
  • Membership Inference Attacks Against Machine Learning Models cites Deep Learning with Differential Privacy
  • The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks cites Membership Inference Attacks Against Machine Learning Models
  • The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks cites Stealing Machine Learning Models via Prediction APIs
  • The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks cites Machine Learning with Membership Privacy using Adversarial Regularization
  • The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks cites Deep Learning with Differential Privacy
  • Deep Neural Network Fingerprinting by Conferrable Adversarial Examples cites Stealing Machine Learning Models via Prediction APIs
  • Deep Neural Network Fingerprinting by Conferrable Adversarial Examples cites Deep Learning with Differential Privacy
  • Machine Learning with Membership Privacy using Adversarial Regularization cites Membership Inference Attacks Against Machine Learning Models
  • Machine Learning with Membership Privacy using Adversarial Regularization cites Stealing Machine Learning Models via Prediction APIs
  • Machine Learning with Membership Privacy using Adversarial Regularization cites Deep Learning with Differential Privacy
  • SoK: How Robust is Image Classification Deep Neural Network Watermarking? cites Stealing Machine Learning Models via Prediction APIs
  • SoK: How Robust is Image Classification Deep Neural Network Watermarking? cites Deep Neural Network Fingerprinting by Conferrable Adversarial Examples
  • Knowledge-Enriched Distributional Model Inversion Attacks cites Membership Inference Attacks Against Machine Learning Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers65

  1. Adversarial Watermarking Transformer: Towards Tracing Text Provenance with Data HidingSahar Abdelnabi, Mario FritzS&P 2021 · 210 citations
  2. Deep Neural Network Fingerprinting by Conferrable Adversarial ExamplesNils Lukas, Yuxuan Zhang, Florian KerschbaumICLR 2021 · 182 citations
  3. Protecting Intellectual Property of Language Generation APIs with Lexical WatermarkXuanli He, Qiongkai Xu, Lingjuan Lyu, Fangzhao Wu et al.AAAI 2022 · 124 citations
  4. SoK: How Robust is Image Classification Deep Neural Network Watermarking?Nils Lukas, Edward Jiang, Xinda Li, Florian KerschbaumS&P 2022 · 124 citations
  5. Knowledge-Enriched Distributional Model Inversion AttacksSi Chen, Mostafa Kahla, Ruoxi Jia, Guo-Jun QiICCV 2021 · 124 citations

Builds on7

  1. Deep Learning with Differential PrivacyMartín Abadi, Andy Chu, Ian J. Goodfellow, H. Brendan McMahan et al.CCS 2016 · 7,620 citations
  2. Membership Inference Attacks Against Machine Learning ModelsReza Shokri, Marco Stronati, Congzheng Song, Vitaly ShmatikovS&P 2017 · 5,137 citations
  3. Stealing Machine Learning Models via Prediction APIsFlorian Tramèr, Fan Zhang, Ari Juels, Michael K. Reiter et al.USENIX Security 2016 · 2,088 citations
  4. The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural NetworksNicholas Carlini, Chang Liu, Úlfar Erlingsson, Jernej Kos et al.USENIX Security 2019 · 1,386 citations
  5. Machine Learning with Membership Privacy using Adversarial RegularizationMilad Nasr, Reza Shokri, Amir HoumansadrCCS 2018 · 543 citations

Related papers

  1. MeaeQ: Mount Model Extraction Attacks with Efficient QueriesChengwei Dai, Minxuan Lv, Kun Li, Wei ZhouEMNLP 2023 · 4 citations
  2. Grey-box Extraction of Natural Language ModelsSantiago Zanella-Béguelin, Shruti Tople, Andrew Paverd, Boris KöpfICML 2021 · 38 citations
  3. Marich: A Query-efficient Distributionally Equivalent Model Extraction AttackPratik Karmakar, Debabrota BasuNeurIPS 2023 · 11 citations
  4. Fragments to Facts: Partial-Information Fragment Inference from LLMsLucas Rosenblatt, Bin Han, Robert Wolfe, Bill HoweICML 2025
  5. BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation ModelsKangjie Chen, Yuxian Meng, Xiaofei Sun, Shangwei Guo et al.ICLR 2022 · 133 citations
Dusk over the sea between two cliffs drawn in fine vertical lines