yangfan-jiang / federated-learning-with-differential-privacy Goto Github PK
View Code? Open in Web Editor NEWImplementation of dp-based federated learning framework using PyTorch
License: MIT License
Implementation of dp-based federated learning framework using PyTorch
License: MIT License
fl_param = {
'output_size': 10,
'client_num': client_num,
'model': MNIST_CNN,
'data': d,
'lr': lr,
'E': 200,
'C': 1,
'eps': 1.0,
'delta': 1e-5,
'q': 0.01,
'clip': 0.1,
'tot_T': 30,
'batch_size': 128,
'device': device
}
if I want to preset (epsilon, delta) pair as privacy guarantee, what should I do?
just modify FLClient.update, not change the sensivity, but modify new_param[name] += add guassian noise defined in gaussian_noise(), will it work?
I want to use the code of
def gaussian_noise()
Waht should I do? Recalculate the sensitivity?
Thanks!!!
I meet some trouble when I apply differential privacy into FL in the way of CDP.Specifically,I add noise during aggregated stage in server, and then broadcast to all client. However, the finally accuracy result is low……
I'd be appreciated it if you could do me some favor.
请问作者,我想对比一下不加噪声和加噪声最后的结果。如何配置能使得这个联邦学习不添加噪声
why your sensitivity = 2 * self.lr * self.clip / self.data_size + (self.E - 1) * 2 * self.lr * self.clip? in the paper ,the sensitivity = 2C*pi/m or 2C/m.
Nice job!
Where can I reference the way that you compute the sensitivity
sensitivity = 2 * self.lr * self.clip / self.data_size + (self.E - 1) * 2 * self.lr * self.clip
By the way, are there any other implementations of dp algo except the Gaussian?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.