Taming Cross-Domain Representation Variance in Federated Prototype Learning with Heterogeneous Data Domains

Lei Wang, Jieming Bian, Letian Zhang, Chen Chen, Jie Xu

TL;DR

FedPLVM (Federated Prototype Learning with Variance Mitigation) tackles the challenge of training models across diverse data domains (e.g., different image styles or sensors) without sharing raw data. By replacing simple "average" class representations with a dual-level clustering strategy and a novel $\alpha$-sparsity loss, it captures the complex variance of "hard" domains, significantly boosting accuracy and fairness across heterogeneous clients.

What Problem Does This Paper Address?

Standard Federated Learning (FL) often assumes that while data is distributed, it comes from the same general "domain." In reality, clients often have data from vastly different sources—think of one hospital using high-res MRI scans while another uses older, noisier equipment. This is known as domain heterogeneity.

Existing "Prototype Learning" methods try to solve this by sharing "prototypes"—mean feature vectors for each class—instead of raw data. However, these methods typically use a single average vector per class. This works for "easy" domains where data clusters tightly, but fails for "hard" domains where data is scattered and complex. Treating a wide, messy distribution as a single average point (the "Vanilla" approach in Figure 1) leads to poor generalization and "unfair" performance gaps between easy and hard domains.

Figure 1: Illustration of federated learning with heterogeneous data domains. The Vanilla column depicts the local feature distribution of the standard FedPL approach, obtaining average local and global prototypes directly. Proposed method showcased in the adjacent column yields a larger inter-class distance and a reduced intra-class distance. Note that without capturing variance information, even for hard domains, local averaged prototypes for each class can be well distinguished while the feature vectors are still mixed up. Both methods illustrate noticeable variations in domain characteristics across datasets, as detailed in Fig. 4.

Methods

The authors introduce FedPLVM, which features two primary innovations:

  1. Dual-Level Prototype Clustering:
    • Local Level: Instead of calculating one mean vector, each client uses a parameter-free clustering algorithm (FINCH) to identify multiple local prototypes that represent the actual shape and variance of their data.
  2. Global Level: To keep communication efficient and protect privacy, the server clusters these many local prototypes into a refined set of global clustered prototypes before sending them back to clients.
  3. $\alpha$-Sparsity Prototype Loss:
    • Standard losses try to pull samples toward their own class prototype and push them away from others.
  4. FedPLVM introduces a sparsity factor ($\alpha \in (0, 1)$) applied as a power to the cosine similarity. This mathematical tweak makes the loss more aggressive at "repelling" prototypes of different classes, creating a clearer "sparsity" in the feature space.
  5. A correction term is added to ensure that while classes are pushed apart, samples within the same class still stay tightly grouped.

The overall workflow is visualized in Figure 2, showing how embeddings move from local clustering to global aggregation and back to local training.

Figure 2: An overview of our proposed FedPLVM framework. Once the sample embedding is generated by the feature extractor, the client conducts the first-level local clustering, following Eq. 3. Subsequently, the server gathers all local clustered prototypes and local models (comprising feature extractors and classifiers), initiates the second-level global clustering based on Eq. 4, and averages the local models to form a global model. Finally, clients utilize the received global clustered prototypes to update the local model, employing loss functions Lα from Eq. 5 and LCE from Eq. 9.

Datasets

The researchers evaluated their method on three benchmark datasets representing different levels of domain shift:

  • Digit-5: A collection of five digit datasets (MNIST, SVHN, USPS, Synth, and MNIST-M). SVHN and Synth are considered "hard" domains due to their visual complexity.
  • Office-10: Images of office objects from four domains (Amazon, Caltech, DSLR, and Webcam).
  • DomainNet: A large-scale dataset using a 10-class subset across six domains (Clipart, Infograph, Painting, Quickdraw, Real, and Sketch).

Key Insights and Ideas

  • Averaging is Lossy: In heterogeneous FL, a single mean vector is a poor proxy for a complex data distribution. By allowing multiple prototypes per class, the model gains "anchors" that better represent the boundaries of difficult domains.
  • Fairness through Variance: The method specifically helps "hard" domains more than "easy" ones. For example, in Digit-5, accuracy on the difficult SVHN domain jumped by 5.3%, while the already-easy MNIST domain only saw a 0.58% bump. This narrows the performance gap between clients.
  • Communication Efficiency: By performing a second round of clustering at the server level, the system avoids the "prototype explosion" that would occur if every client sent dozens of local prototypes, keeping the bandwidth requirements manageable.

Key Results

FedPLVM consistently outperformed state-of-the-art baselines like FedAvg, FedProto, and FPL across all datasets.

  • Digit-5: Achieved an average accuracy of 69.25%, a significant +9.88% improvement over standard FedAvg.
  • Office-10: Reached 60.65% average accuracy, outperforming the next best method (FedFA) by nearly 2%.
  • Variance Reduction: As shown in the ablation study (Figure 4), the dual-clustering approach significantly reduced the "variance" (the distance from samples to their class centers), leading to much tighter, more separable clusters in the feature space.

Test accuracy results on Digit-5 Test accuracy results on Office-10

Limitations and Future Work

The authors identify noisy labels as a primary limitation. If a client has mislabeled data, those "outliers" can distort the local prototypes, leading to "Prototype Distortion" or "Ambiguity." This error can then propagate through the global model.

Future research directions include making the prototype generation process more robust to label noise and exploring the method's application in highly sensitive areas like healthcare data collaboration and IoT networks.

Summary updated

Abstract

Federated learning (FL) allows collaborative machine learning training without sharing private data. While most FL methods assume identical data domains across clients, real-world scenarios often involve heterogeneous data domains. Federated Prototype Learning (FedPL) addresses this issue, using mean feature vectors as prototypes to enhance model generalization. However, existing FedPL methods create the same number of prototypes for each client, leading to cross-domain performance gaps and disparities for clients with varied data distributions. To mitigate cross-domain feature representation variance, we introduce FedPLVM, which establishes variance-aware dual-level prototypes clustering and employs a novel $α$-sparsity prototype loss. The dual-level prototypes clustering strategy creates local clustered prototypes based on private data features, then performs global prototypes clustering to reduce communication complexity and preserve local data privacy. The $α$-sparsity prototype loss aligns samples from underrepresented domains, enhancing intra-class similarity and reducing inter-class similarity. Evaluations on Digit-5, Office-10, and DomainNet datasets demonstrate our method's superiority over existing approaches.
BibTeX
@inproceedings{wang2024taming,
  author = {Lei Wang and Jieming Bian and Letian Zhang and Chen Chen and Jie Xu},
  title = {{Taming Cross-Domain Representation Variance in Federated Prototype Learning with Heterogeneous Data Domains}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=6SRPizFuaE},
}
Figure