Navigating Alignment for Non-identical Client Class Sets: A Label Name-Anchored Federated Learning Framework

Jiayun Zhang, Xiyuan Zhang, Xinyang Zhang, Dezhi Hong, Rajesh K. Gupta, Jingbo Shang

Abstract

Traditional federated classification methods, even those designed for non-IID clients, assume that each client annotates its local data with respect to the same universal class set. In this paper, we focus on a more general yet practical setting, non-identical client class sets, where clients focus on their own (different or even non-overlapping) class sets and seek a global model that works for the union of these classes. If one views classification as finding the best match between representations produced by data/label encoder, such heterogeneity in client class sets poses a new significant challenge -- local encoders at different clients may operate in different and even independent latent spaces, making it hard to aggregate at the server. We propose a novel framework, FedAlign, to align the latent spaces across clients from both label and data perspectives. From a label perspective, we leverage the expressive natural language class names as a common ground for label encoders to anchor class representations and guide the data encoder learning across clients. From a data perspective, during local training, we regard the global class representations as anchors and leverage the data points that are close/far enough to the anchors of locally-unaware classes to align the data encoders across clients. Our theoretical analysis of the generalization performance and extensive experiments on four real-world datasets of different tasks confirm that FedAlign outperforms various state-of-the-art (non-IID) federated classification methods.

Introduction

Standard Federated Learning (FL) typically operates under the "Universal Class Set" assumption, where every client is expected to label their local data using the same global list of categories. However, in real-world applications, clients often focus on different, and sometimes non-overlapping, sets of classes. For instance, in a medical network, different specialists might only label conditions relevant to their field, even if the underlying patient data contains features relevant to others.

The Challenge of Non-identical Class Sets

When clients focus on different class sets, their local models develop "misaligned latent spaces." If Client A only recognizes "running" and Client B only recognizes "walking," their internal mathematical representations of these activities might drift apart, making it impossible for a central server to aggregate them into a coherent global model. This heterogeneity poses a significant challenge: local encoders at different clients may operate in independent latent spaces, leading to poor global aggregation.

Figure 2: Illustration of non-identical client class sets where clients A, B, and C have different ground truth labels and are unaware of certain global classes.

The FedAlign Framework

To address this, we propose FedAlign, a framework that shifts the classification paradigm from a fixed linear output layer to a matching process between a data encoder and a label encoder. FedAlign aligns latent spaces from both label and data perspectives.

Label Name Anchoring

Instead of using arbitrary numerical IDs, FedAlign leverages the semantic meaning of natural language class names (e.g., "sitting," "cycling"). The server initializes a Label Encoder using pretrained text embeddings. This provides a shared semantic "map" that serves as a common reference point for all clients, preventing local models from drifting into incompatible latent spaces.

Anchor-Guided Alignment

During local training, clients identify "locally-unaware" classes—categories present in the global set but missing from their local labels. They use global class representations as anchors. If a local data point is mathematically close to a global anchor for an "unaware" class, the system assigns it a pseudo-label, effectively aligning the data encoder across the network.

Figure 4: The FedAlign architecture showing the initialization (Round 0) and the training/communication loop (Round t) with alternating encoder updates.

Alternating Optimization

To prevent interference between the two encoders, FedAlign employs an alternating training strategy: clients freeze the label encoder while updating the data encoder, and vice versa. This ensures stable convergence and preserves the semantic integrity of the label anchors.

Experimental Evaluation

FedAlign was evaluated on six datasets across four domains, including ExtraSensory (sensor data), MIMIC-III (medical notes), PAMAP2 (activity recognition), and R8 (text classification).

Key results include:

  • Superior Performance: On the PAMAP2-9 activity dataset, FedAlign achieved an F1-score of 87.21%, significantly outperforming FedAvg (68.89%).
  • Robustness to Disjoint Classes: In scenarios where clients share zero classes (e.g., ES-25), FedAlign maintained high accuracy while traditional methods failed to aggregate meaningful features.
  • Improved Latent Space: t-SNE visualizations confirmed that FedAlign produces tighter, more distinct class clusters compared to the blurry, misaligned clusters of standard FL methods.

Conclusion

FedAlign provides a robust solution for federated learning in environments with heterogeneous labeling practices. By using natural language as a universal bridge and implementing anchor-guided alignment, it enables effective collaboration across clients with non-identical class sets, tightening generalization bounds and improving global model performance.

Summary updated

BibTeX
@inproceedings{zhang2023navigating,
  author = {Jiayun Zhang and Xiyuan Zhang and Xinyang Zhang and Dezhi Hong and Rajesh K. Gupta and Jingbo Shang},
  title = {{Navigating Alignment for Non-identical Client Class Sets: A Label Name-Anchored Federated Learning Framework}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2023},
  doi = {10.1145/3580305.3599443},
}
Figure