《计算机应用》唯一官方网站

• •    下一篇

基于梯度特征的联邦学习后门防御算法

钟琪1,张淑芬2,张镇博1,李涛1   

  1. 1. 华北理工大学
    2. 华北理工大学河北省数据科学与应用重点实验室
  • 收稿日期:2025-08-04 修回日期:2025-09-08 发布日期:2025-11-05 出版日期:2025-11-05
  • 通讯作者: 钟琪

Federated learning backdoor defense algorithm based on gradient features

  • Received:2025-08-04 Revised:2025-09-08 Online:2025-11-05 Published:2025-11-05

摘要: 针对现有防御算法无法有效区分联邦学习后门攻击中客户端梯度的差异以及计算开销较大的问题,提出了一种基于梯度特征的联邦学习后门防御算法(GradGuard)。首先,对每个客户端梯度进行归一化与缩放处理,通过缩放本地模型梯度的相对变化,解决了绝对变化较大的良性维度掩盖后门维度的问题。其次,设计了基于余弦相似性的主导梯度聚类算法,寻找具有最低风险概率的小客户端簇,剔除了可能包含后门的恶意梯度。最后,提出了一种自适应梯度裁剪策略,裁剪阈值基于良性客户端维度的L2范数与攻击者的比例进行自适应调整,确保了全局模型的稳定性。实验结果表明,相较于Datadefense算法,GradGuard在四种不同攻击频率的场景下,防御后门攻击时的后门成功率分别降低了1.91、1.36、1.28和0.49个百分点,防御边缘后门攻击时的后门成功率分别降低了8.93、3.34、9.51和0.79个百分点。此外,GradGuard减轻了服务器的计算负担,在EMNIST(Extended Modified National Institute of Standards and Technology)和CIFAR10(Canadian InstituteFor Advanced Research)数据集上,相较于Scope算法的训练时间分别减少了94.5秒和355.02秒,提升了联邦学习系统的效率。

Abstract: Aiming at the problem that the existing defense schemes could not effectively distinguish the differences of client gradients in federated learning backdoor attacks and the large computational overhead, a federated learning backdoor defense algorithm based on gradient features (GradGuard) was proposed. First, normalization and scaling were performed on each client gradient, and the problem of masking the backdoor dimension by benign dimensions with large absolute changes was solved by scaling the relative changes of local model gradients. Second, a dominant gradient clustering algorithm based on cosine similarity was designed to identify small client clusters with the lowest risk probability, and malicious gradients that might contain backdoors were eliminated. Finally, an adaptive gradient clipping strategy was proposed, in which the clipping threshold was adaptively adjusted based on the ratio of the L2 norm of the benign client dimension to that of the attacker, ensuring the stability of the global model. The experimental results show that compared to the Datadefense algorithm, GradGuard reduces the success rate of backdoor attacks by 1.91, 1.36, 1.28, and 0.49 percentage points, respectively, under four different attack frequencies. It also reduces the success rate of edge backdoor attacks by 8.93, 3.34, 9.51, and 0.79 percentage points, respectively. Additionally, GradGuard reduces the computational burden on servers, with training times reduced by 94.5 seconds and 355.02 seconds on the EMNIST (Extended Modified National Institute of Standards and Technology) and CIFAR10(Canadian InstituteFor Advanced Research) datasets, respectively, compared to the Scope algorithm, thereby enhancing the efficiency of federated learning systems.

中图分类号: