BFLN: A Blockchain-based Federated Learning Model for Non-IID Data

Yang Li, Yang Li 0222, Chunhe Xia, Dongchi Huang, Xiaojian Li, Tianbo WangarXiv 2024 · DOI

Introduction

Federated Learning (FL) has emerged as a critical privacy-preserving paradigm for training machine learning models across decentralized data sources. However, standard FL algorithms like FedAvg often struggle with Non-Independent and Identically Distributed (Non-IID) data, where local data distributions vary significantly between clients. This "label bias" can lead to significant performance degradation in the global model. Furthermore, the lack of robust incentive mechanisms often discourages high-quality participation and leaves systems vulnerable to "free-riders."

BFLN (Blockchain-based Federated Learning for Non-IID Data) addresses these challenges by integrating prototype-based clustering for personalized model updates with a blockchain-driven incentive framework. This approach ensures that clients receive models tailored to their specific data distributions while being fairly rewarded for their contributions.

Methodology

The BFLN framework introduces two core components to bridge the gap between decentralization, personalization, and motivation: the Prototype-based Aggregation Algorithm (PAA) and the Cluster Centroids-based Consensus Algorithm (CCCA).

Prototype-based Aggregation Algorithm (PAA)

To handle Non-IID data, BFLN moves away from simple weight averaging. Instead, it utilizes "prototypes"—high-level feature representations of local data. The system calculates the Pearson correlation coefficient between these prototypes to measure similarity. The authors argue that Pearson correlation is superior to the commonly used cosine similarity because it better captures the strength of linear relationships between feature representations.

Spectral clustering is then applied to group clients with similar data distributions. Each cluster generates its own "cluster-global" model. This personalization allows a client with specific data characteristics to benefit from similar peers without being forced to learn from conflicting updates of dissimilar clients.

Cluster Centroids-based Consensus Algorithm (CCCA)

The blockchain layer provides a decentralized and trustworthy environment for coordination. Inspired by Delegated Proof of Stake (DPoS), the CCCA selects the client closest to the cluster centroid to act as a representative. These representatives form a "packing queue" to record model hashes into blocks, ensuring a verifiable and transparent training history.

BFLN System Architecture and Workflow

Incentive Mechanism

A non-linear reward function is implemented where rewards scale with cluster size, encouraging participation in larger, more representative knowledge pools. The blockchain acts as a verification log; by comparing hashes of local models against those recorded by the aggregator, the system can mathematically prove participation and prevent fraudulent reward claims.

Experimental Evaluation

The BFLN model was evaluated using three standard computer vision benchmarks: CIFAR10, CIFAR100, and SVHN. To simulate real-world conditions, the researchers introduced varying levels of label bias (0.1, 0.3, and 0.5), representing different intensities of Non-IID data.

Key Results

BFLN consistently outperformed established baselines, including FedAvg, FedProx, FedProto, and FedHKD, across all tested scenarios.

  • Accuracy Gains: On CIFAR10 with a 0.1 bias, BFLN achieved 87.69% accuracy, surpassing the best baseline by 1.02%. On the more complex CIFAR100 dataset, the improvement reached 1.92%.
  • Robustness to Bias: The clustering mechanism proved highly effective as data skewness increased, maintaining performance levels where traditional methods began to fail.
  • Fair Rewards: Experimental data confirmed that the incentive mechanism successfully distributed more tokens to clients in larger clusters, effectively rewarding those who contributed to the most significant "knowledge pools."
Experimental Results: Reward Trends and Cluster Distributions

Conclusion and Future Work

BFLN demonstrates that combining personalized clustering with blockchain-based incentives can significantly improve FL performance in Non-IID environments. While the results are promising, future research is needed to address the computational latency introduced by blockchain consensus and spectral clustering. Additionally, expanding the scope to include other types of Non-IID data, such as feature shift, and testing scalability with thousands of nodes will be crucial for real-world viability in massive IoT networks.

Summary updated

BibTeX
@misc{li2024bfln,
  author = {Yang Li and Yang Li and Chunhe Xia and Dongchi Huang and Xiaojian Li and Tianbo Wang},
  title = {{BFLN: A Blockchain-based Federated Learning Model for Non-IID Data}},
  year = {2024},
  eprint = {2407.05276},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.05276},
}
Figure