readme.md

December 20, 2025 · View on GitHub

Achieving Byzantine-Resilient Federated Learning via Layer-Adaptive Sparsified Model Aggregation

This is the official implementation for WACV'25 Oral{\color{red}Oral} paper "Achieving Byzantine-Resilient Federated Learning via Layer-Adaptive Sparsified Model Aggregation".

You can find the paper here.

If you found LASA is interesting, you may also refer to our other related works on robust federated learning systems:

All these methods are based on simple and effective ideas for protecting federated learning systems. They are easy to implement and can be directly integrated into this codebase or into existing federated learning frameworks.

Usage

If you have any issues using this repo, feel free to contact Jiahao @ jiahaox@unr.edu.

Dataset

All tested datasets are available on torchvision except the Shakespeare dataset. We provide it for your convenience:https://drive.google.com/file/d/1_FkrOD6YWchxOBXL3mYV9Ila8R9RkCdZ/view?usp=sharing

Example

Generally, to run a case with default settings, you can easily use the following command:

python main.py --attack $attack --defend $defend --dataset $data 

Here,

attack = {'agrTailoredTrmean', 'agrAgnosticMinMax', 'agrAgnosticMinSum', 'signflip_attack', 'noise_attack', 'random_attack', 'lie_attack', 'byzmean_attack', 'non_attack'}

defend = {'fedavg', 'signguard', 'dnc', 'lasa', 'bulyan', 'tr_mean', 'multi_krum', 'sparsefed', 'geomed'}

data = {'mnist', 'fmnist', 'femnist', 'sha', 'cifar', 'noniidcifar', 'cifar100', 'noniidcifar100'}

For example, to run LASA defends against ByzMean attack on the IID CIFAR-10 dataset, you can use:

python main.py --attack byzmean_attack --defend lasa --dataset cifar

Results will be recorded in exp_results folder.

Hyperparameters

We list the mainly used hyperparameters as follows.

ArgumentTypeDescription
repeatintNumber of repeat of training
num_attackersintHow many clients are malicious, use an integer here (e.g., 20 -> 20% of total clients are malicious).
num_usersintHow many clients in the FL system
num_selected_usersintThe number of clients are selected per round.
roundintTotal training rounds
tauintLocal training epochs

More detailed hyperparameters are presented in the paper and you can find them in config/attack/$data/basee.yaml as well as the main file.

Hyperparameters listed below are specifically for LASA.

ArgumentTypeDescription
sparsityfloatPre-aggregation sparsification level
lambda_nfloatFiltering radius for norm
lambda_sfloatFiltering radius for sign

Citation

If you find our repository is useful for your work, please cite our work:

@InProceedings{Xu_2025_WACV,
    author    = {Xu, Jiahao and Zhang, Zikai and Hu, Rui},
    title     = {Achieving Byzantine-Resilient Federated Learning via Layer-Adaptive Sparsified Model Aggregation},
    booktitle = {Proceedings of the Winter Conference on Applications of Computer Vision (WACV)},
    month     = {February},
    year      = {2025},
    pages     = {1508-1517}
}

Acknowledgment

We would like to thank the work that helped our paper:

  1. SignGuard: https://github.com/JianXu95/SignGuard/tree/main.