FedSecurity: A Benchmark for Attacks and Defenses in Federated Learning and Federated LLMsFedSecurity: Benchmarking Attacks and Defenses in Federated Learning and Federated LLMs
The paper proposes FedSecurity, an end-to-end benchmark that serves as a supplementary component of the FedML library, for simulating adversarial attacks and corresponding defense mechanisms in federated learning. It includes FedAttacker, which is responsible for executing various attacks during federated training, and FedDefender, which implements defense mechanisms, allowing users to focus on developing their own attack and defense strategies without implementing basic processes such as federated learning training and data loading from scratch. FedSecurity supports models such as Logistic Regression, ResNet, and GAN as well as optimizers such as FedAVG, FedOPT, and FedNOVA, and can be flexibly configured through configuration files and APIs to explore attack and defense effects on different datasets and models. The authors also demonstrate the usability of the benchmark in complex applications through federated training of LLMs.