FedGroup: Ternary Cosine Similarity-based Clustered Federated Learning Framework toward High Accuracy in Heterogeneous Data

Moming Duan, Duo Liu, Xinyuan Ji, Renping Liu, Liang Liang, Xianzhang Chen, Yujuan Tan

Abstract

Standard Federated Learning (FL) algorithms often struggle with statistically heterogeneous (non-IID) data, where a single global model fails to generalize across diverse client distributions. This paper presents FedGroup, a Clustered Federated Learning (CFL) framework that groups clients with similar data distributions to provide specialized models. FedGroup introduces a novel distance measure, EDC (Euclidean distance of Decomposed Cosine similarity), which leverages truncated Singular Value Decomposition (SVD) to efficiently calculate similarities in high-dimensional spaces. Furthermore, FedGroup addresses the 'cold start' problem for new devices, allowing them to join the system dynamically. Experimental results on benchmarks like FEMNIST and Sentiment140 demonstrate that FedGroup significantly outperforms traditional FL methods, achieving up to a 26.9% increase in test accuracy.

Introduction

Federated Learning has emerged as a privacy-preserving paradigm for training machine learning models on decentralized data. However, the 'one-size-fits-all' approach of the standard FedAvg algorithm is often inadequate in real-world scenarios where data is non-IID. For instance, different users may have vastly different usage patterns, leading to conflicting gradient updates that hinder the convergence of a single global model.

Clustered Federated Learning (CFL) attempts to mitigate this by partitioning clients into clusters. Despite its potential, existing CFL methods face challenges such as the 'curse of dimensionality' in model updates, high computational overhead for pairwise similarity calculations, and the lack of a mechanism for handling dynamic client participation (the cold start problem).

Methodology

FedGroup addresses these challenges through a multi-faceted approach centered on efficient clustering and dynamic client management.

EDC: Efficient Similarity Measurement

The core of FedGroup is the EDC measure. Instead of comparing raw, high-dimensional model updates—which often leads to distance concentration—FedGroup applies truncated SVD to project updates into a lower-dimensional space representing the most significant optimization directions. This dimensionality reduction acts as a noise filter and drastically reduces the computational cost of clustering.

System Architecture and Cold Start

FedGroup employs a structured architecture to manage client groups and handle new arrivals. The process begins with a Group Cold Start, where a subset of clients performs pre-training to initialize clusters using K-Means++ based on the EDC measure.

The FedGroup architecture, highlighting the intra-group and inter-group communication flows and the cold-start mechanism for new clients.

To handle new devices, FedGroup implements a Client Cold Start strategy. A newcomer performs a brief local training step and sends a 'pre-update' to the server. The server then assigns the newcomer to the most similar existing group based on optimization directions, ensuring the new device immediately benefits from a relevant model.

Experimental Evaluation

The framework was evaluated across several datasets, including MNIST, FEMNIST, Synthetic(1,1), and Sentiment140, representing various levels of complexity and heterogeneity.

Impact of Data Heterogeneity

A key finding of the study is the relationship between data heterogeneity and model performance. As shown in the figure below, as the number of classes per client decreases (increasing non-IIDness), the discrepancy between local updates and the global model increases, leading to higher volatility in accuracy. FedGroup effectively manages this discrepancy by maintaining specialized group models.

Performance comparison across different levels of data heterogeneity. As the number of classes per client decreases (increasing non-IIDness), the discrepancy between local and global updates increases.

Key Results

  • Accuracy: FedGroup consistently outperformed FedAvg and other CFL baselines. On the FEMNIST dataset, it achieved an absolute accuracy boost of +14.1% over FedAvg and +26.9% over FeSEM.
  • Efficiency: The use of EDC and static grouping significantly reduced communication and computational overhead compared to dynamic re-clustering methods.
  • Robustness: The 'Client Cold Start' mechanism proved essential; random assignment of new clients led to a significant drop in performance, validating the similarity-based approach.

Conclusion

FedGroup provides a practical and efficient solution for Clustered Federated Learning in heterogeneous environments. By combining dimensionality reduction via SVD with a robust cold-start mechanism, it achieves high accuracy while remaining scalable. Future work will explore the use of Gate Networks to further refine model aggregation and address hyperparameter sensitivity regarding the number of clusters.

Summary updated

BibTeX
@inproceedings{duan2021fedgroup,
  author = {Moming Duan and Duo Liu and Xinyuan Ji and Renping Liu and Liang Liang and Xianzhang Chen and Yujuan Tan},
  title = {{FedGroup: Ternary Cosine Similarity-based Clustered Federated Learning Framework toward High Accuracy in Heterogeneous Data}},
  booktitle = {ISPA/BDCloud/SocialCom/SustainCom},
  year = {2021},
  doi = {10.1109/ispa-bdcloud-socialcom-sustaincom52081.2021.00042},
}
Figure