This repository provides the implementation of the paper "AdapLDP-FL: An Adaptive Local DifferentialPrivacy for Federated Learning", which is published in IEEE Transactions on Mobile Computing. This paper investigates FL under the scenario of noise optimization with LDP. Specifically, given a certain privacy budget, we design the adaptive LDP method via a noise scaler, which adaptively optimizes the noise size of every client. Secondly, we dynamically tailor the model direction after adding noise by the designed a direction matrix, to overcome the model drift problem caused by adding noises to the client model. Finally, our method achieves higher accuracy than some existing works with the same privacy level and the convergence speed is significantly improved.
![]() |
![]() |
![]() |
Loss function on three public datasets. | Convergence speed improvement compared with LDP-FL | Comparison of model performance via CNN networks. |
We built a privacy-preserving FL based on our proposed adaptive LDP, mainly consisting of adaptive updating noise and transform noise direction.
The code in the folder models/Fed is for enhancing the trade-off between privacy and performance.
main.py
is the main function.
The input is the path of the dataset.
You can run like main.py this:
python main.py --dataset mnist --iid --model cnn --epochs 50 --frac 0.1 --dp_mechanism Gaussian --dp_epsilon 5 --dp_delta 1e-5
The code in the folder models/Fed is for enhancing convergence speed and model drift problems of LDP-FL approach.
main.py
is the main function.
The input is the path of the dataset.
You can run like main.py this:
python main.py --dataset mnist --iid --model cnn --epochs 50 --frac 0.1 --dp_mechanism Gaussian --dp_epsilon 5 --dp_delta 1e-5
To run the code, it needs some libraies:
- Python >= 3.8
- Pytorch >= 1.10
- numpy >= 1.22.4
- pandas >= 2.2.2
- anaconda-client >= 1.9.0
Our environment is shown in the file, named environment.yaml
.
Datasets: MNIST, Cifar-10, Fashion-MNIST
Model: CNN, MLP
If you use this repository, please cite:
@article{yue2025AdapLDP-FL,
title={AdapLDP-FL: An Adaptive Local DifferentialPrivacy for Federated Learning},
author={Yue, Gaofeng and Yan, Li},
journal={IEEE Transactions on Mobile Computing},
volume={Early Access},
year={2025},
publisher={IEEE}
}