FedClust: Optimizing Federated Learning on Non-IID Data Through Weight-Driven Client Clustering

Md Sirajul Islam, Simin Javaherian, Fei Xu, Xu Yuan, Li Chen, Nian-Feng Tzeng

Abstract

Federated Learning (FL) faces significant challenges when dealing with non-independent and identically distributed (Non-IID) data across client devices. Standard global models often fail to capture the nuances of local data distributions, leading to poor performance. This paper discusses FedClust, a novel clustered federated learning (CFL) framework that utilizes the weights of a model's final layer to group similar clients. By implementing a one-shot clustering mechanism using Agglomerative Hierarchical Clustering, FedClust achieves superior accuracy and reduced communication overhead compared to traditional methods, while remaining flexible to new clients joining the network.

Introduction

Federated Learning (FL) enables collaborative machine learning without centralizing raw data, preserving privacy. However, data heterogeneity—where data distributions vary significantly across clients—remains a primary bottleneck. For instance, the data on one device may consist of images of animals, while another contains images of vehicles. This "Non-IID" nature causes a single global model to converge poorly for individual users.

Clustered Federated Learning (CFL) attempts to address this by grouping clients with similar data distributions to train specialized models. Yet, existing CFL approaches often suffer from three major flaws:

  1. Slow Convergence: They often require many communication rounds to establish stable clusters.
  2. Rigidity: Most require a pre-defined number of clusters ($K$), which is rarely known in real-world scenarios.
  3. High Overhead: Transmitting full model weights for clustering purposes consumes excessive bandwidth.

Methodology

FedClust introduces a weight-driven clustering approach based on the observation that the final layer of a neural network (the classifier) serves as the most potent indicator of a client's local data distribution. While early layers often capture general features, the final layer weights diverge significantly based on local labels.

The FedClust Workflow

The framework simplifies the clustering process into a "one-shot" mechanism:

  1. Initial Training: The server distributes a global model to all clients, who then perform local training for a few iterations.
  2. Weight-Driven Clustering: Instead of sending the entire model, clients transmit only their final layer weights back to the server.
  3. Proximity Analysis: The server calculates the Euclidean distance between these weights to form a "proximity matrix," identifying clients with similar knowledge.
  4. Agglomerative Hierarchical Clustering (HC): The server employs HC to identify natural clusters. Unlike K-Means, HC does not require a pre-set $K$, allowing the system to discover the optimal number of groups automatically.
  5. Dynamic Integration: When a new client joins, the server measures the distance between the newcomer's weights and existing clusters to assign them to the most appropriate group in real-time.

Experimental Evaluation

The researchers evaluated FedClust using three standard image classification benchmarks: CIFAR-10, Fashion MNIST (FMNIST), and SVHN. To simulate extreme Non-IID conditions, they used a Dirichlet distribution with $\alpha=0.1$.

Key Results

FedClust consistently outperformed state-of-the-art baselines, including FedAvg, FedProx, IFCA, PACFL, and standard CFL:

  • CIFAR-10: Achieved 60.25% accuracy, a substantial improvement over FedAvg (38.25%) and FedProx (51.60%).
  • FMNIST: Reached 95.51% accuracy, outperforming all other methods by at least 10%.
  • SVHN: Achieved 78.23% accuracy, maintaining a lead over specialized methods like PACFL (76.35%).

Discussion and Insights

The success of FedClust stems from its use of the "Classifier Signal." By focusing on the final fully connected layers, the system achieves accurate clustering with minimal communication. Furthermore, because clusters are established in the first round, the framework avoids the "oscillation" (frequent reshuffling of clients) that often slows down convergence in other CFL frameworks. This "one-shot" stability ensures that specialized models can begin training effectively almost immediately.

Limitations and Future Work

While FedClust shows great promise, the authors identified several areas for further research:

  • Model Diversity: The current study focused on LeNet-5 and VGG16; future work will explore larger architectures like Transformers.
  • Heterogeneity Scenarios: The paper primarily addresses label-based heterogeneity. Testing robustness against feature-based heterogeneity (e.g., varying image quality or lighting) remains an open task.
  • Optimization: The authors plan to further explore the optimal selection of "partial weights" to further refine the balance between communication efficiency and model accuracy.

Conclusion

FedClust provides a communication-efficient and highly accurate solution for Non-IID federated learning. By leveraging the final layer weights as a proxy for data distribution, it enables stable, dynamic, and automated clustering that significantly outperforms traditional global and clustered FL approaches.

Summary updated

BibTeX
@inproceedings{islam2024fedclust,
  author = {Md Sirajul Islam and Simin Javaherian and Fei Xu and Xu Yuan and Li Chen and Nian-Feng Tzeng},
  title = {{FedClust: Optimizing Federated Learning on Non-IID Data Through Weight-Driven Client Clustering}},
  booktitle = {Workshops @ IPDPS},
  year = {2024},
  url = {https://openreview.net/forum?id=0DYRJArEUX},
}
Figure