This paper introduces 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 (FL). FedSecurity eliminates the need for implementing the fundamental FL procedures, e.g., FL training and data loading, from scratch, thus enables users to focus on developing their own attack and defense strategies. It contains two key components, including FedAttacker that conducts a variety of attacks during FL training, and FedDefender that implements defensive mechanisms to counteract these attacks. FedSecurity has the following features: i) It offers extensive customization options to accommodate a broad range of machine learning models (e.g., Logistic Regression, ResNet, and GAN) and FL optimizers (e.g., FedAVG, FedOPT, and FedNOVA); ii) it enables exploring the effectiveness of attacks and defenses across different datasets and models; and iii) it supports flexible configuration and customization through a configuration file and some APIs. We further demonstrate FedSecurity's utility and adaptability through federated training of Large Language Models (LLMs) to showcase its potential on a wide range of complex applications.
翻译:本文介绍FedSecurity,这是一个端到端基准测试框架,作为FedML库的补充组件,用于模拟联邦学习(FL)中的对抗性攻击及相应防御机制。FedSecurity免除了从零实现基础FL流程(例如FL训练与数据加载)的需要,从而使用户能专注于开发自身的攻击与防御策略。它包含两个核心组件:FedAttacker(在FL训练期间执行多种攻击)和FedDefender(实施防御机制以对抗这些攻击)。FedSecurity具有以下特性:i) 提供广泛的自定义选项,支持多种机器学习模型(如Logistic Regression、ResNet和GAN)与FL优化器(如FedAVG、FedOPT和FedNOVA);ii) 支持探索不同数据集和模型上攻击与防御的有效性;iii) 通过配置文件及API支持灵活的配置与定制。我们进一步通过大语言模型(LLMs)的联邦训练展示了FedSecurity的实用性与适应性,以彰显其在各类复杂应用中的潜力。