BRFL: A blockchain-based byzantine-robust federated learning model

Yang Li, Chunhe Xia, Chang Li, Tianbo Wang

TL;DR

This paper introduces BRFL, a novel federated learning framework that leverages blockchain technology to enhance security and robustness against Byzantine attacks. By combining a Proof of Pearson Correlation Coefficient consensus algorithm with a Precision-based Spectral Aggregation method, BRFL effectively identifies and mitigates malicious local models while also reducing computational and storage overhead.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple devices to collaboratively train a machine learning model without sharing their raw data, thus preserving privacy. However, FL is vulnerable to Byzantine attacks, where malicious participants can send corrupted model updates to compromise the global model's performance. Existing robust aggregation methods often struggle with detecting these attacks, can be computationally expensive, or assume a low percentage of malicious nodes. Furthermore, storing all model updates on a blockchain for traceability can lead to significant storage burdens. This paper aims to address these challenges by proposing a secure, robust, and efficient FL system that can handle a high percentage of malicious nodes and manage storage effectively.

Methods

The proposed BRFL framework integrates several key components:

  • Blockchain Integration: Blockchain is used for secure communication, traceability of model updates, and incentivizing participants. Local models are stored on IPFS (InterPlanetary File System), with their Content Identifiers (CIDs) recorded on the blockchain. This significantly reduces on-chain storage requirements.
  • Proof of Pearson Correlation Coefficient (PPCC) Consensus Algorithm: This algorithm selects aggregation nodes for each round. It calculates the Pearson Correlation Coefficient (PCC) between the previous round's global model and each local model. Nodes with the highest PCC are chosen as aggregation nodes, ensuring that nodes with models most similar to the global trend are responsible for aggregation. This also helps address the lack of a dedicated test dataset for validation.
  • Precision-based Spectral Aggregation (PSA) Algorithm: This algorithm performs the actual aggregation. It first uses spectral clustering to group local models based on their PCC relationships. Then, it calculates the average gradient within each cluster and verifies its accuracy using the aggregation nodes' local datasets. The cluster with the highest validated average accuracy contributes its average gradient to form the new global model. This approach is designed to be robust even with a high proportion of malicious models.
  • Transaction Types and Block Structure: A novel block structure is introduced with different transaction types (TCID, TGM, TAVR, TPCC) to categorize information. This allows nodes to selectively store blocks, further managing storage costs.

Datasets

The paper evaluates the proposed BRFL model using two standard image datasets:

  • MNIST: A dataset of handwritten digits.
  • Fashion-MNIST: A dataset of clothing images.

The experiments were conducted under both Independent and Identically Distributed (IID) and Non-IID data distributions.

Key Insights and Ideas

  • Blockchain for Efficiency: Storing local models on IPFS and only CIDs on the blockchain is a clever way to leverage blockchain's security and traceability without incurring massive storage costs.
  • PCC as a Robust Indicator: Using Pearson Correlation Coefficient to select aggregation nodes is an innovative approach to identify nodes that are more aligned with the global model's progress, thus implicitly filtering out potentially malicious ones.
  • Spectral Clustering for Grouping: Grouping local models by their correlation patterns before aggregation allows for more efficient and robust validation, especially when dealing with a large number of participants and potential attackers.
  • Decentralized Validation: The aggregation nodes use their own local datasets for validation, circumventing the need for a separate, centralized test dataset, which is a common challenge in FL.
  • Incentive Mechanism: The system rewards well-intentioned nodes, encouraging participation and contributing to the overall security and efficiency of the federated learning process.

Key Results

  • Superior Accuracy: Under both noise and sign-flipping attacks, the proposed BRFL with its PSA aggregation algorithm consistently achieved higher accuracy compared to baseline methods like Krum, Median, Mean, and Clipped Clustering, especially in Non-IID scenarios and when malicious clients constituted 50% of the participants.
  • Robustness: The model demonstrated strong robustness against Byzantine attacks, maintaining high accuracy even with a significant proportion of malicious nodes.
  • Reduced Resource Consumption: The integration of IPFS for model storage and the selective block storage mechanism significantly reduced storage pressure on nodes. The PPCC and PSA algorithms also aimed to reduce computational overhead compared to some existing methods.
  • Effective Malicious Node Detection: Experimental results showed that malicious nodes rarely became aggregation nodes, indicating the effectiveness of the PPCC algorithm in filtering them out.

Limitations and Future Work

  • Initialization Sensitivity: The paper notes that in the initial rounds of federated learning, when the global model is not yet well-formed, the PPCC algorithm might resort to random selection of aggregation nodes, potentially including malicious ones.
  • Limited Scope of Attacks: While the paper focuses on noise and sign-flipping attacks, other sophisticated Byzantine attack vectors might require further investigation.
  • Future Work: The authors suggest further research into optimizing the consensus algorithm and exploring more advanced Byzantine-robust aggregation techniques. They also highlight the potential for further improvements in resource management and scalability.

Summary updated

Abstract

With the increasing importance of machine learning, the privacy and security of training data have become critical. Federated learning, which stores data in distributed nodes and shares only model parameters, has gained significant attention for addressing this concern. However, a challenge arises in federated learning due to the Byzantine Attack Problem, where malicious local models can compromise the global model's performance during aggregation. This article proposes the Blockchain-based Byzantine-Robust Federated Learning (BRLF) model that combines federated learning with blockchain technology. This integration enables traceability of malicious models and provides incentives for locally trained clients. Our approach involves selecting the aggregation node based on Pearson's correlation coefficient, and we perform spectral clustering and calculate the average gradient within each cluster, validating its accuracy using local dataset of the aggregation nodes. Experimental results on public datasets demonstrate the superior byzantine robustness of our secure aggregation algorithm compared to other baseline byzantine robust aggregation methods, and proved our proposed model effectiveness in addressing the resource consumption problem.
BibTeX
@article{li2025brfl,
  author = {Yang Li and Chunhe Xia and Chang Li and Tianbo Wang},
  title = {{BRFL: A blockchain-based byzantine-robust federated learning model}},
  journal = {J. Parallel Distributed Comput},
  year = {2025},
  doi = {10.1016/j.jpdc.2024.104995},
}
Figure