摘要
随着工业物联网的快速发展,在分布式环境下高效训练机器学习模型,同时保障数据隐私与系统安全,已成为亟待解决的关键问题。传统联邦学习虽然在一定程度上缓解了数据泄露风险,但仍面临中心化服务器易受攻击、投毒威胁以及模型更新透明度不足等挑战。为此,文章提出了一种基于区块链的去中心化联邦学习框架(BCS-FL)。该框架结合区块链技术与权益证明(PoS)共识机制,实现联邦学习的去中心化训练、筛选及存储,从而提升系统的安全性、透明度和可靠性。具体而言,在本地设备层,各智能工厂(客户端)基于自身数据训练局部模型,并经过裁剪和差分隐私保护后,生成局部模型包上传至验证层;在去中心化验证层,由PoS选出的验证节点计算局部模型间的余弦相似度以及损失函数差值,以筛选可信、高质量的客户端模型;在区块链存储层,矿工节点验证候选全局模型的哈希值、时间戳以及客户端签名,以确保模型版本的一致性,并通过PBFT共识将其存储至区块链,供所有客户端下载与同步,确保模型更新的可追溯性和抗篡改能力。
With the rapid development of the Industrial Internet of Things,efficiently training machine learn-ing models in distributed environments while ensuring data privacy and system security has be-come a critical challenge.Although traditional federated learning mitigates the risk of data leak-age to some extent,it still faces challenges such as the vulnerability of centralized servers to at-tacks,poisoning threats,and insufficient transparency in model updates.To address these issues,this paper proposes a blockchain-based,decentralized,federated learning framework(BCS-FL).By integrating blockchain technology with the Proof-of-Stake(PoS)consensus mechanism,BCS-FL enables decentralized training,selection,and storage of federated learning models,thereby enhancing system security,transparency,and reliability.Specifically,at the local device layer,in-telligent factories(clients)train local models based on their own data and generate local model packages after pruning and differential privacy protection before uploading them to the coordi-nation layer.At the decentralized coordination layer,coordination nodes selected through PoS compute the cosine similarity and loss function differences between local models to filter out re-liable and high-quality client models.At the blockchain storage layer,miner nodes verify the hash values,timestamps,and client signatures of candidate global models to ensure model version consistency.The final global model is stored on the blockchain through PBFT consensus,allowing all clients to download and synchronize it,ensuring model update traceability and tamper re-sistance.
作者
王新中
Xinzhong Wang(School of Optical-Electrical and Computer Engineering,University of Shanghai for Science and Technology,Shanghai)
出处
《建模与仿真》
2025年第5期458-471,共14页
Modeling and Simulation
关键词
联邦学习
工业物联网
余弦相似度
区块链
Federated Learning
Industrial Internet of Things
Cosine Similarity
Blockchain