FPPDL
code for TPDS paper "Towards Fair and Privacy-Preserving Federated Deep Models"
Install / Use
/learn @lingjuanlv/FPPDLREADME
FPPDL
code for TPDS paper "Towards Fair and Privacy-Preserving Federated Deep Models"! Folder "dpgan" is used to generate DPGAN samples on each party!
How to run:
th fppdl_tpds.lua -dataset mnist -model deep -slevel 1 -imbalanced 1 -netSize 4 -nepochs 100 -local_nepochs 5 -batchSize 10 -learningRate 0.15 -taskID mnist_deep_p4e100_imbalanced -shardID mnist_p4_imbalanced -run run1 -pretrain 1 -credit_fade 1
How to analyze fairness:
All logs will be dumped into folder "logs". Process log and analyze fairness as follows:
1. X axis: standalone accuracy
grep "standalone" logs/fppdl_mnist_deep_p4e100_slevel01_imbalanced_IID1_pretrain1_localepoch5_localbatch10_lr0.15_run1_tpds.log >1.log
awk '{print $NF}' ORS=', ' 1.log
x=[0.8528, 0.8895, 0.7765, 0.8828]
2. Y axis: final accuracy
grep "final test acc" logs/fppdl_mnist_deep_p4e100_slevel01_imbalanced_IID1_pretrain1_localepoch5_localbatch10_lr0.15_run1_tpds.log >1.log
awk '{print $NF}' ORS=', ' 1.log
y=[0.8874, 0.9191, 0.8158, 0.9118]
3. Finally, using scipy.stats.pearsonr(x,y)=0.9996588631722703 to calculate fairness.
Requirements:
- torch7, download from http://torch.ch/
- python3
Bibtex
Remember to cite the following papers if you use any part of the code:
@article{lyu2020towards,
title={Towards Fair and Privacy-Preserving Federated Deep Models},
author={Lyu, Lingjuan and Yu, Jiangshan and Nandakumar, Karthik and Li, Yitong and Ma, Xingjun and Jin, Jiong and Yu, Han and Ng, Kee Siong},
journal={IEEE Transactions on Parallel and Distributed Systems},
volume={31},
number={11},
pages={2524--2541},
year={2020},
publisher={IEEE}
}
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
