Memorization of Named Entities in Fine-tuned BERT Models

Andor Diera, Nicolas Lell, Aygul Garifullina, Ansgar Scherp
12/7/2022
cs.CL

Official code: drndr/bert_ent_attack (0 stars, Jupyter Notebook, last commit 2024-11-28).

Abstract

Privacy preserving deep learning is an emerging field in machine learning that aims to mitigate the privacy risks in the use of deep neural networks. One such risk is training data extraction from language models that have been trained on datasets, which contain personal and privacy sensitive information.

Show full abstract

In our study, we investigate the extent of named entity memorization in fine-tuned BERT models. We use single-label text classification as representative downstream task and employ three different fine-tuning setups in our experiments, including one with Differential Privacy (DP). We create a large number of text samples from the fine-tuned BERT models utilizing a custom sequential sampling strategy with two prompting strategies. We search in these samples for named entities and check if they are also present in the fine-tuning datasets. We experiment with two benchmark datasets in the domains of emails and blogs. We show that the application of DP has a detrimental effect on the text generation capabilities of BERT. Furthermore, we show that a fine-tuned BERT does not generate more named entities specific to the fine-tuning dataset than a BERT model that is pre-trained only. This suggests that BERT is unlikely to emit personal or privacy sensitive named entities. Overall, our results are important to understand to what extent BERT-based services are prone to training data extraction attacks.

View on arXivView PDF

Code Implementations(1)

01Jupyter Notebook, PythonJun 26, 20222 years ago

Similar Papers

Cite this paper

@article{diera2022memorization,
  title  = {Memorization of Named Entities in Fine-tuned BERT Models},
  author = {Andor Diera and Nicolas Lell and Aygul Garifullina and Ansgar Scherp},
  year   = {2022},
  eprint = {2212.03749},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.03749}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2212.03749.svg)](https://codeofpaper.com/paper/2212.03749)

Discussion