MCPcopy Index your code
hub / github.com/dayu11/Differentially-Private-Deep-Learning

github.com/dayu11/Differentially-Private-Deep-Learning @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
3,542 symbols 9,683 edges 293 files 1,053 documented · 30%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Differentially-Private-Deep-Learning

Update 11/18/2021

Update the results of fine-tuning RoBERTa-large with large batchsize and full precision.

Update 09/01/2021

Our code for fine-tuning BERT models with differential privacy now supports loading official RoBERTa checkpoints.

Readme

This repo provides some example code to help you get started with differentially private deep learning.

Our implementation uses Pytorch. We cover several algorithms including Differentially Private SGD [1], Gradient Embedding Perturbation [2], and Reparametrized Gradient Perturbation [3].

In the vision folder, we implement the algorithms in [1,2,3] to train deep ResNets on benchmark vision datasets.

In the language folder, we implement the algorithm in [3] to fine-tune BERT models on four tasks from the GLUE benchrmark.

References

[1]: Deep learning with differential privacy. Martin Abadi, Andy Chu, Ian Goodfellow, H Brendan McMahan, Ilya Mironov, Kunal Talwar, and Li Zhang. In ACM SIGSAC Conference on Computer and Communications Security, 2016.

[2]: Do Not Let Privacy Overbill Utility: Gradient Embedding Perturbation for Private Learning. Da Yu, Huishuai Zhang, Wei Chen, and Tie-Yan Liu. In International Conference on Learning Representations (ICLR), 2021.

[3]: Large Scale Private Learning via Low-rank Reparametrization. Da Yu, Huishuai Zhang, Wei Chen, Jian Yin, and Tie-Yan Liu. In International Conference on Machine Learning (ICML), 2021.

Core symbols most depended-on inside this repo

size
called by 340
language/bert/bert_code/fairseq/data/list_dataset.py
print
called by 203
language/bert/bert_code/fairseq/distributed_utils.py
log
called by 131
language/bert/bert_code/fairseq/progress_bar.py
pad
called by 92
language/bert/bert_code/fairseq/data/dictionary.py
eos
called by 73
language/bert/bert_code/fairseq/data/dictionary.py
write
called by 67
language/bert/bert_code/fairseq/data/indexed_dataset.py
write
called by 44
language/bert/bert_code/preprocess/pretrain/WikiExtractor.py
exists
called by 43
language/bert/bert_code/fairseq/data/indexed_dataset.py

Shape

Method 1,711
Function 1,457
Class 369
Enum 5

Languages

Python73%
C++27%

Modules by API surface

language/bert/bert_code/fairseq/data/token_block_utils_fast.cpp397 symbols
language/bert/bert_code/fairseq/data/data_utils_fast.cpp375 symbols
language/bert/bert_code/fastbpe/fastBPE/fastBPE.cpp114 symbols
language/bert/bert_code/preprocess/pretrain/WikiExtractor.py97 symbols
language/bert/bert_code/fairseq/data/indexed_dataset.py74 symbols
language/bert/bert_code/fairseq/models/fairseq_model.py51 symbols
language/bert/bert_code/fairseq/progress_bar.py42 symbols
language/bert/bert_code/fairseq/data/iterators.py42 symbols
language/bert/bert_code/fairseq/models/transformer.py41 symbols
language/bert/bert_code/fairseq/optim/fp16_optimizer.py38 symbols
language/bert/bert_code/fairseq/utils.py37 symbols
language/bert/bert_code/fairseq/models/wav2vec.py37 symbols

For agents

$ claude mcp add Differentially-Private-Deep-Learning \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact