mlsanityData to 7 Oct 2026

Killing One Bird with Two Stones: Model Extraction and Attribute Inference Attacks against BERT-based APIs

arXiv 2105.10909 ↗First posted 23 May 2021cs.CR cs.CL cs.LGcited by 7

Not on the map. Why?

Abstract (arXiv)

The collection and availability of big data, combined with advances in pre-trained models (e.g., BERT, XLNET, etc), have revolutionized the predictive performance of modern natural language processing tasks, ranging from text classification to text generation. This allows corporations to provide machine learning as a service (MLaaS) by encapsulating fine-tuned BERT-based models as APIs. However, BERT-based APIs have exhibited a series of security and privacy vulnerabilities. For example, prior work has exploited the security issues of the BERT-based APIs through the adversarial examples crafted by the extracted model. However, the privacy leakage problems of the BERT-based APIs through the extracted model have not been well studied. On the other hand, due to the high capacity of BERT-based APIs, the fine-tuned model is easy to be overlearned, but what kind of information can be leaked from the extracted model remains unknown. In this work, we bridge this gap by first presenting an effective model extraction attack, where the adversary can practically steal a BERT-based API (the target/victim model) by only querying a limited number of queries. We further develop an effective attribute inference attack which can infer the sensitive attribute of the training data used by the BERT-based APIs. Our extensive experiments on benchmark datasets under various realistic settings validate the potential vulnerabilities of BERT-based APIs. Moreover, we demonstrate that two promising defense methods become ineffective against our attacks, which calls for more effective defense methods.

Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 23 of its 33 references that are in the map. First posted on arXiv 23 May 2021.

Builds on

23 of 33 references.

References · 23

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  3. 2015Distilling the Knowledge in a Neural Networkcited by 10,076
  4. 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
  5. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  6. 2016Understanding deep learning requires rethinking generalizationcited by 1,657
  7. 2015Teaching Machines to Read and Comprehendcited by 1,039
  8. 2016Practical Black-Box Attacks against Machine Learningcited by 893
  9. 2019SpanBERT: Improving Pre-training by Representing and Predicting Spanscited by 832
  10. 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
  11. 2019Passage Re-ranking with BERTcited by 629
  12. 2016Stealing Machine Learning Models via Prediction APIscited by 602
11 more
  1. 2019Text Summarization with Pretrained Encoderscited by 553
  2. 2019Multi-Task Deep Neural Networks for Natural Language Understandingcited by 349
  3. 2018Knockoff Nets: Stealing Functionality of Black-Box Modelscited by 285
  4. 2020Information Leakage in Embedding Modelscited by 199
  5. 2019Thieves on Sesame Street! Model Extraction of BERT-based APIscited by 136
  6. 2018Stealing Hyperparameters in Machine Learningcited by 115
  7. 2020Imitation Attacks and Defenses for Black-box Machine Translation Systemscited by 78
  8. 2018Towards Robust and Privacy-preserving Text Representationscited by 75
  9. 2020Differentially Private Representation for NLP: Formal Guarantee and An Empirical Study on Privacy and Fairnesscited by 66
  10. 2018Privacy-preserving Neural Representations of Textcited by 54
  11. 2021Model Extraction and Adversarial Transferability, Your BERT is Vulnerable!cited by 51

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 1; 2023: 1; 2024: 1; 2025: 2; 2026: 2.

7 papers.