Journal of Computer Applications ›› 2026, Vol. 46 ›› Issue (7): 2184-2195.DOI: 10.11772/j.issn.1001-9081.2025070873

• Cyber security • Previous Articles    

Federated learning backdoor defense algorithm based on gradient features

Qi ZHONG1,2,3, Shufen ZHANG1,2,3,4(), Zhenbo ZHANG1,2,3, Tao LI1,2,3   

  1. 1.College of Sciences,North China University of Science and Technology,Tangshan Hebei 063210,China
    2.Hebei Provincial Key Laboratory of Data Science and Application (North China University of Science and Technology),Tangshan Hebei 063210,China
    3.Tangshan Key Laboratory of Data Science (North China University of Science and Technology),Tangshan Hebei 063210,China
    4.Tangshan Key Laboratory of Big Data Security and Intelligent Computing (Beijing Jiaotong University),Tangshan Hebei 063010,China
  • Received:2025-08-04 Revised:2025-09-08 Accepted:2025-09-11 Online:2025-11-05 Published:2026-07-10
  • Contact: Shufen ZHANG
  • About author:ZHONG Qi, born in 1999, M. S. candidate. Her research interests include data security, privacy protection.
    ZHANG Zhenbo, born in 1999, M. S. candidate. His research interests include data security, privacy protection.
    LI Tao, born in 2000, M. S. candidate. His research interests include data security, privacy protection.
  • Supported by:
    National Natural Science Foundation of China(U20A20179)

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

钟琪1,2,3, 张淑芬1,2,3,4(), 张镇博1,2,3, 李涛1,2,3   

  1. 1.华北理工大学 理学院,河北 唐山 063210
    2.河北省数据科学与应用重点实验室(华北理工大学),河北 唐山 063210
    3.唐山市数据科学重点实验室(华北理工大学),河北 唐山 063210
    4.唐山市大数据安全与智能计算重点实验室(北京交通大学),河北 唐山 063010
  • 通讯作者: 张淑芬
  • 作者简介:钟琪(1999—),女,河北张家口人,硕士研究生,主要研究方向:数据安全、隐私保护
    张镇博(1999—),男,山东济南人,硕士研究生,主要研究方向:数据安全、隐私保护
    李涛(2000—),男,河南周口人,硕士研究生,主要研究方向:数据安全、隐私保护。
  • 基金资助:
    国家自然科学基金资助项目(U20A20179)

Abstract:

Aiming at the problem that the existing defense algorithms can 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 applied to each client gradient, and the problem of masking the backdoor dimension by benign dimensions with large absolute changes was addressed by scaling the relative changes in local model gradients. Second, a dominant gradient clustering algorithm based on cosine similarity was designed to search for small client clusters with the lowest risk probability and eliminate malicious gradients that might contain backdoors. Finally, an adaptive gradient clipping strategy was proposed, in which the clipping threshold was adjusted adaptively based on the ratio of L2 norm of the benign client dimension and the attacker, thereby ensuring the stability of the global model. Experimental results show that compared to the Datadefense algorithm, GradGuard reduces the Backdoor Accuracy (BA) of backdoor attacks by 1.91, 1.36, 1.28, and 0.49 percentage points, respectively, under four different attack frequencies, and reduces the BA of edge backdoor attacks by 8.93, 3.34, 9.51, and 0.79 percentage points, respectively. Additionally, compared to the Scope algorithm, GradGuard reduces the computational burden on servers, with training time reduced by 42.58% and 27.82% on the EMNIST and CIFAR-10 datasets, respectively, thereby enhancing the efficiency of federated learning systems.

Key words: federated learning, backdoor attack, computational overhead, cosine similarity, gradient clipping

摘要:

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

关键词: 联邦学习, 后门攻击, 计算开销, 余弦相似性, 梯度裁剪

CLC Number: