SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.20138 · EMNLP · 2023

DEPN: Detecting and Editing Privacy Neurons in Pretrained Language Models

Weilong Dong, Xinwei Wu, Deyi Xiong, Shuangzhi Wu, Junzhuo Li, Chao Bian, Minghui Xu

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2310.20138.json · badge: /api/ran/2310.20138.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
flamewei123/DEPN canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
swish Ran
ran; our contract draft was wrong, not the code
flamewei123/DEPN/src/custom_bert.py
pointer only (licence: NONE) · get_code("0f786c407fb1ee4c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, flamewei123/DEPN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

convert_to_triplet_ig Ran
ran, honoured the contract we drafted
flamewei123/DEPN/src/1_calculate_attribution.py
pointer only (licence: NONE); the stored copy get_code serves, from danshi777/ircan, is pointer only (licence: NONE) · get_code("7ca5f6affb7142af")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, flamewei123/DEPN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

eval_ppl Ran
ran, honoured the contract we drafted
flamewei123/DEPN/src/3_edit_privacy_neurons.py
pointer only (licence: NONE) · get_code("359b3d77e480e6f8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, flamewei123/DEPN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

example2feature Ran
ran; our contract draft was wrong, not the code
flamewei123/DEPN/src/1_calculate_attribution.py
pointer only (licence: NONE) · get_code("ec86d7c6151f7d68")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, flamewei123/DEPN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

gelu Ran
ran, honoured the contract we drafted
flamewei123/DEPN/src/custom_bert.py
pointer only (licence: NONE); the stored copy get_code serves, from rlqja1107/melt, is pointer only (licence: NONE) · get_code("56a9ab06b860b180")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, flamewei123/DEPN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pos_list2str Ran
ran; our contract draft was wrong, not the code
flamewei123/DEPN/src/2_filter_privacy_neurons.py
pointer only (licence: NONE); the stored copy get_code serves, from danshi777/ircan, is pointer only (licence: NONE) · get_code("dbb7a4fa7b6bb8d1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, flamewei123/DEPN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pos_str2list Ran
ran, honoured the contract we drafted
flamewei123/DEPN/src/2_filter_privacy_neurons.py
pointer only (licence: NONE); the stored copy get_code serves, from danshi777/ircan, is pointer only (licence: NONE) · get_code("dae759b7f6c3b29d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, flamewei123/DEPN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

scaled_input Ran
ran; our contract draft was wrong, not the code
flamewei123/DEPN/src/1_calculate_attribution.py
pointer only (licence: NONE) · get_code("9c42e668d2a4a9d7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, flamewei123/DEPN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_evaldata Not yet run
unverified (harvested, no recorded run)
flamewei123/DEPN/src/3_edit_privacy_neurons.py
pointer only (licence: NONE) · get_code("ee8a0be5a85129de")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, flamewei123/DEPN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 5 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 5 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
swish 206 other papers
159 dated earlier, 5 the same month, 42 later · 44 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1805.12114 (2018-05)
Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models
1809.01357 (2018-09)
Zero Shot Learning for Code Education: Rubric Sampling with Deep Learning Inference
and 203 more not named here
gelu 198 other papers
154 dated earlier, 4 the same month, 39 later, 1 same year, order not determinable · 32 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.10125 (2019-01)
Glyce: Glyph-vectors for Chinese Character Representations
and 195 more not named here
pos_str2list 2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
2104.08696 (2021-04)
Knowledge Neurons in Pretrained Transformers
2406.18406 (2024-06)
IRCAN: Mitigating Knowledge Conflicts in LLM Generation via Identifying and Reweighting Context-Aware Neurons
convert_to_triplet_ig 1 other paper
1 later
2406.18406 (2024-06)
IRCAN: Mitigating Knowledge Conflicts in LLM Generation via Identifying and Reweighting Context-Aware Neurons
pos_list2str 1 other paper
1 later
2406.18406 (2024-06)
IRCAN: Mitigating Knowledge Conflicts in LLM Generation via Identifying and Reweighting Context-Aware Neurons

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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. 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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2310.20138")
get_code_for_paper("2310.20138")
have("2310.20138")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2310.20138.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2310.20138.svg)](https://syntology.ai/paper/2310.20138)

Connect an agent — have() is free.