数据与计算发展前沿 ›› 2022, Vol. 4 ›› Issue (6): 105-117.

CSTR: 32002.14.jfdc.CN10-1649/TP.2022.06.010

doi: 10.11871/jfdc.issn.2096-742X.2022.06.010

• 技术与应用 • 上一篇    下一篇

一种改进的BMUF训练框架及联邦学习系统实现

赵鑫博1,2(),代闯闯1,2,陆忠华1,*()   

  1. 1.中国科学院计算机网络信息中心,北京 100083
    2.中国科学院大学,北京 100049
  • 收稿日期:2021-12-21 出版日期:2022-12-20 发布日期:2022-12-20
  • 通讯作者: 陆忠华
  • 作者简介:赵鑫博,中国科学院计算机网络信息中心,硕士研究生,主要研究方向为区块链与联邦学习。
    本文中负责系统设计与实现,算法设计与实现,实验验证与文章撰写。
    ZHAO Xinbo is currently a master student at the Computer Network Information Center, Chinese Acad-emy of Sciences, China. His main research interests are block-chain and federated learning.
    In this paper, he is responsible for system design and impl-ementation, algorithm design and implementation, experimental verification, and paper writing.
    E-mail: zhaoxinbo@cnic.cn|陆忠华,中国科学院计算机网络信息中心,研究员,主要研究方向为高性能计算技术和在计算金融中的应用。
    本文中负责把握文章总体方向与框架。
    LU Zhonghua is currently a Professor at the Computer Network Information Center, Chinese Academy of Sciences, China. Her current research interests include high-performance computing technology and its applications in computational finance.
    In this paper, she is responsible for the overall direction and framework of the paper.
    E-mail: zhlu@cnic.cn
  • 基金资助:
    国家自然科学基金(61873254)

An Improved BMUF Training Framework and Implementation of Federated Learning System

ZHAO Xinbo1,2(),DAI Chuangchuang1,2,LU Zhonghua1,*()   

  1. 1. Computer Network Information Center, Chinese Academy of Sciences, Beijing 100083, China
    2. University of Chinese Academy of Sciences, University, Beijing 100049, China
  • Received:2021-12-21 Online:2022-12-20 Published:2022-12-20
  • Contact: LU Zhonghua

摘要:

【目的】在隐私保护日益严峻的环境下,联邦学习常被用于解决“数据孤岛”与“数据隐私”等问题,但传统的联邦学习架构受限于中心化特点,带来了额外的隐私风险与成本,基于区块链的去中心化联邦学习架构因其明显的应用优势得到了更多关注与研究。【方法】本文改进BMUF训练框架,使其在联邦学习中数据量分布不平衡(Unbalanced)、数据非独立同分布(Non-IID)场景下有较好效果;在客户端本地训练中加入差分隐私机制保护本地隐私;提出一种基于全局更新梯度的拜占庭检测鲁棒聚合算法,使聚合者可以检测出系统中存在的拜占庭客户端并完成鲁棒聚合。【结果】针对上述三点进行多组实验,实验结果表明改进的BMUF训练框架在Unbalanced与Non-IID场景下较FedAvg算法聚合效果更好;在客户端本地训练中加入差分隐私机制时,模型仍可收敛并获得较高准确率;在拜占庭攻击环境下,聚合者可以有效剔除拜占庭客户端并完成鲁棒聚合。【结论】本文改进BMUF训练框架,并实现了一个基于区块链的联邦学习系统,可以在去中心化架构下针对不同数据分布场景,有效保护客户端隐私,抵御拜占庭攻击,实现模型的高效训练。

关键词: 区块链, 联邦学习, BMUF框架, 差分隐私, 拜占庭攻击

Abstract:

[Objective] In the increasingly severe condition of privacy protection, federated learning is often used to solve problems such as "data islands" and "data privacy". However, the traditional federated learning architecture is limited by its centralized characteristic, which brings additional privacy risks and costs. The blockchain-based decentralized federated learning architecture has received more attention and research efforts due to its obvious advantages in application. [Methods] This paper improves the BMUF training framework to make better results in the scenarios of unbalanced and non-IID data distributions in federated learning. The differential privacy mechanism is added to the client's local training to protect local privacy. A byzantine detection and robust aggregation algorithm based on the global model update is proposed, which enables the aggregator to detect the byzantine clients in the system and complete the robust aggregation. [Results] Multiple experiments are conducted on the above three points. The experimental results show that the improved BMUF training framework has a better aggregation effect than the FedAvg algorithm in unbalanced and non-IID distribution scenarios. When the differential privacy mechanism is added to the client's local training, the model can still converge and obtain a higher accuracy rate. In the byzantine attack environment, the aggregator can effectively eliminate the byzantine clients and complete the robust aggregation. [Conclusions] This paper improves the BMUF training framework and implements a blockchain-based federated learning system that can effectively protect the local privacy of the client, resist byzantine attacks, and achieve efficient training of the model for different data distribution scenarios under a decentralized architecture.

Key words: blockchain, federated learning, BMUF framework, differential privacy, byzantine attack