FedCCL: Federated dual-clustered feature contrast under domain heterogeneity

Yu Qiao, Huy Quang Lê, Mengchun Zhang, Apurba Adhikary, Chaoning Zhang, Choong Seon Hong

Abstract

Federated Learning (FL) enables collaborative model training without raw data sharing, yet it faces significant challenges from non-IID data distributions. While label shift is well-studied, domain heterogeneity—where the same class appears differently across clients—remains a major hurdle. We introduce FedCCL (Federated Dual-Clustered Feature Contrast), a framework that utilizes a dual-layer clustering strategy at the client and server levels. By replacing simple feature averaging with high-granularity clustered representations, FedCCL generates unbiased global signals, leading to superior generalization and enhanced adversarial robustness.

The Challenge of Domain Heterogeneity

Standard Federated Learning methods often assume that data is independently and identically distributed (IID). In practice, however, data is non-IID. This paper specifically addresses Domain Heterogeneity, which manifests in two primary forms:

  1. Intra-domain heterogeneity: Variations within a single class, such as different styles or sub-types of the same object.
  2. Inter-domain heterogeneity: Fundamental differences in data appearance across clients, such as comparing handwritten digits to street-view numbers.
Types of data heterogeneity in Federated Learning, showing intra-domain and inter-domain imbalances.

Existing "prototype-based" methods typically average all features of a class into a single vector. This approach often loses fine-grained details and allows clients with larger datasets to disproportionately bias the global model, leading to poor performance on minority domains.

Methodology: FedCCL

FedCCL moves beyond simple averaging by implementing a dual-clustered contrastive approach designed to capture the complex "modes" of data distributions.

Dual-Clustering Workflow

The framework operates through a five-step process involving local training and server-side aggregation:

  1. Local Training: Clients train models using a combination of standard cross-entropy and dual-clustered contrastive losses.
  2. Local Clustering: Instead of one average vector, clients use the parameter-free FINCH algorithm to identify multiple clusters within each class, capturing high-granularity local information.
  3. Local Signal Aggregation: These cluster centers (prototypes) are communicated to the server, preserving privacy by avoiding raw data or gradient sharing.
  4. Global Clustering: The server performs a second round of clustering on the received local clusters. This "cluster-of-clusters" approach prevents any single dominant client from skewing the global signal.
  5. Model Parameter Averaging: Standard weight aggregation is performed alongside the distribution of these refined global signals.
The FedCCL architecture illustrating the interaction between local client training and global server-side clustering.

Contrastive Loss Functions

FedCCL employs two main contrastive components to refine the feature space:

  • Local Contrast: Encourages local representations to align with semantically similar clusters shared by other clients.
  • Global Contrast: Aligns local features with the unbiased global clusters formed at the server level, ensuring consistency across the federation.

Experimental Evaluation

The authors evaluated FedCCL across six benchmarks, including large-scale datasets like DomainNet and multi-source digit datasets like Digit-5.

Performance and Efficiency

FedCCL consistently outperformed traditional baselines such as FedAvg, FedProx, and FedProto:

  • Digit-5: Achieved 58.55% accuracy, an 8.47% improvement over FedAvg.
  • DomainNet: Reached 49.95% accuracy, significantly higher than FedAvg's 37.68%.
  • Efficiency: The method demonstrates faster convergence, reaching higher accuracy in fewer communication rounds than most baselines.

Adversarial Robustness

A notable finding is that the feature-contrast approach enhances robustness against adversarial attacks. In testing using FGSM attacks on MNIST, a robust variant (FedCCL+) maintained 69.90% accuracy, compared to 58.98% for the FedAvg+ baseline.

Conclusion

FedCCL addresses the limitations of simple feature averaging in heterogeneous federated environments. By leveraging dual-layer clustering, it preserves fine-grained information and ensures a fair, unbiased global model. Future work may focus on reducing the computational overhead of local clustering for low-power edge devices and exploring scalability in massive cross-device federated networks.

Summary updated

Abstract

Federated learning (FL) facilitates a privacy-preserving neural network training paradigm through collaboration between edge clients and a central server. One significant challenge is that the distributed data is not independently and identically distributed (non-IID), typically including both intra-domain and inter-domain heterogeneity. However, recent research is limited to simply using averaged signals as a form of regularization and only focusing on one aspect of these non-IID challenges. Given these limitations, this paper clarifies these two non-IID challenges and attempts to introduce cluster representation to address them from both local and global perspectives. Specifically, we propose a dual-clustered feature contrast-based FL framework with dual focuses. First, we employ clustering on the local representations of each client, aiming to capture intra-class information based on these local clusters at a high level of granularity. Then, we facilitate cross-client knowledge sharing by pulling the local representation closer to clusters shared by clients with similar semantics while pushing them away from clusters with dissimilar semantics. Second, since the sizes of local clusters belonging to the same class may differ for each client, we further utilize clustering on the global side and conduct averaging to create a consistent global signal for guiding each local training in a contrastive manner. Experimental results on multiple datasets demonstrate that our proposal achieves comparable or superior performance gain under intra-domain and inter-domain heterogeneity. • Federated learning preserves privacy via client–server collaborative training. • A major challenge is data heterogeneity, divided into intra-and inter-domain. • Cross-client local clustered feature contrast promotes knowledge-sharing. • Consistent global clustered feature contrast enhances clients’ generalizability. • Local and global clustered feature contrast can address domain heterogeneity.
BibTeX
@inproceedings{qiao2024fedccl,
  author = {Yu Qiao and Huy Quang Lê and Mengchun Zhang and Apurba Adhikary and Chaoning Zhang and Choong Seon Hong},
  title = {{FedCCL: Federated dual-clustered feature contrast under domain heterogeneity}},
  booktitle = {Information},
  year = {2024},
  doi = {10.1016/j.inffus.2024.102645},
}
Figure