DEPN: Detecting and Editing Privacy Neurons in Pretrained Language Models

Xinwei Wu, Junzhuo Li, Minghui Xu, Weilong Dong, Shuangzhi Wu +2 more
10/31/2023
109 citations
cs.CRcs.CL

Official code: flamewei123/DEPN (25 stars, Python, last commit 2024-04-20).

Abstract

Large language models pretrained on a huge amount of data capture rich knowledge and information in the training data. The ability of data memorization and regurgitation in pretrained language models, revealed in previous studies, brings the risk of data leakage.

Show full abstract

In order to effectively reduce these risks, we propose a framework DEPN to Detect and Edit Privacy Neurons in pretrained language models, partially inspired by knowledge neurons and model editing. In DEPN, we introduce a novel method, termed as privacy neuron detector, to locate neurons associated with private information, and then edit these detected privacy neurons by setting their activations to zero. Furthermore, we propose a privacy neuron aggregator dememorize private information in a batch processing manner. Experimental results show that our method can significantly and efficiently reduce the exposure of private data leakage without deteriorating the performance of the model. Additionally, we empirically demonstrate the relationship between model memorization and privacy neurons, from multiple perspectives, including model size, training time, prompts, privacy neuron distribution, illustrating the robustness of our approach.

View on arXivView PDF

Code Implementations(1)

flamewei123/DEPNOfficial100%
254Python, ShellOct 22, 20232 years ago

Similar Papers

Cite this paper

@article{wu2023depn,
  title  = {DEPN: Detecting and Editing Privacy Neurons in Pretrained Language Models},
  author = {Xinwei Wu and Junzhuo Li and Minghui Xu and Weilong Dong and Shuangzhi Wu and Chao Bian and Deyi Xiong},
  year   = {2023},
  eprint = {2310.20138},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.20138v2}
}

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/2310.20138.svg)](https://codeofpaper.com/paper/2310.20138)

Discussion