TL;DR
This paper introduces FedWCA, a novel federated learning approach for classification tasks where clients only have unlabeled data and the server has a pre-trained model it can no longer access. FedWCA effectively tackles domain shifts and privacy concerns by clustering clients, aggregating models intelligently, and using an improved pseudo-labeling strategy, outperforming existing methods.
What Problem Does This Paper Address?
Federated Learning (FL) is a powerful paradigm for training models on decentralized data while preserving privacy. However, a common assumption is that labeled data is available, either at the server or on some clients. This is often impractical, especially for vision tasks where manual annotation is costly and requires domain expertise. Furthermore, in real-world FL scenarios, clients might have data from vastly different domains (e.g., surveillance cameras in different locations with varying lighting and backgrounds), leading to domain shift issues.
This paper focuses on a challenging scenario called Federated Source-Free Domain Adaptation (FFREEDA). In FFREEDA:
- The server has a model pre-trained on labeled data from a "source" domain.
- Clients have only unlabeled data from their own "target" domains, which can differ significantly from each other and the source domain.
- Crucially, the source data is inaccessible during the adaptation phase due to privacy or logistical reasons.
The goal is to adapt the pre-trained source model to each client's specific target domain using only unlabeled data, fostering collaboration among clients without compromising privacy. Previous work in this area primarily focused on semantic segmentation, and this paper extends it to classification tasks.
Methods
The proposed method, Federated learning with Weighted Cluster Aggregation (FedWCA), addresses FFREEDA with three core components:
- Private and Parameter-Free Client Clustering: To handle domain shifts, FedWCA first clusters clients. Instead of sharing raw data or image style features (which raises privacy concerns), clients share only their locally learned feature extractor parameters. This clustering is done using a parameter-free method called First Integer Neighbor indices producing a Clustering Hierarchy (FINCH). Importantly, it focuses on the first layer parameters of the feature extractor, as these are believed to best capture domain-specific information without being overly sensitive to individual data points. This clustering is a one-time operation.
- Weighted Cluster Aggregation (WCA): This module allows clients to leverage knowledge not just from their own cluster but also from other clusters. Clients receive "soft cluster models" from the server, which are weighted combinations of models from different clusters. Each client then computes local cluster weights based on how well its own data aligns with the classifier prototypes of each cluster model. These local weights are combined with server-provided global weights to create a personalized initial model for the next round. This approach balances individual client needs with collective knowledge.
- Local Domain Adaptation with Pseudo-Labeling: After receiving an aggregated initial model, each client performs local adaptation using an improved pseudo-labeling strategy. This strategy is based on prototype-based pseudo-labeling but is enhanced to:
- Mitigate overfitting: By using round-fixed pseudo-labels.
- Acquire more reliable pseudo-labels: By using both the initial aggregated model and the client's own cluster model to generate pseudo-labels.
- Incorporate global knowledge: Through a mixup strategy that blends samples with matched and mismatched pseudo-labels from the two models.
Datasets
The paper evaluates FedWCA on three standard multi-domain classification benchmarks:
- Digit-Five: A collection of five handwritten digit datasets (MNIST, MNIST-M, SVHN, SYNTH, USPS).
- PACS: Consists of four domains (Art Painting, Cartoon, Photo, Sketch) with 7 categories each.
- Office-Home: A dataset for object recognition with four domains (Art, Clipart, Product, Real-World) and 65 categories.
For each dataset, one domain was designated as the source, and the remaining were target domains. Data was distributed among clients in an i.i.d. manner.
Key Insights and Ideas
- Focusing on shallow layers for clustering is effective: Using only the first or second layer parameters for client clustering proved more effective than using all layers, which suffered from the "curse of dimensionality" and led to a single cluster. This highlights that domain-specific information is concentrated in these initial layers.
- Weighted aggregation beyond one's own cluster is crucial: The proposed WCA module, which allows clients to blend models from multiple clusters, significantly improves performance compared to methods that only use models from a client's assigned cluster. This is especially important for clients in smaller or less representative clusters.
- Improved pseudo-labeling enhances robustness: The enhanced pseudo-labeling strategy, which uses multiple models and a mixup technique, leads to more reliable pseudo-labels, reducing overfitting and preserving global knowledge.
- Parameter-free clustering is a significant advantage: The use of FINCH for clustering eliminates the need for hyperparameter tuning related to cluster number or assignment, simplifying the overall process.
Key Results
FedWCA consistently outperformed several baselines, including "Source Only," "Local" (SFDA applied locally), "FedAvg," and the prior FFREEDA method "LADD."
- Significant accuracy gains: FedWCA achieved notable improvements across the datasets, with average accuracy gains of 7.10% for Digit-Five, 4.86% for PACS, and 1.32% for Office-Home compared to the best baselines.
- Improved performance in specific target domains: Figure 4 shows that FedWCA significantly boosts accuracy for clients in specific target domains (e.g., SVHN for Digit-Five, Sketch for PACS) without sacrificing performance in others.
- Robustness to incorrect clustering: Even when the clustering algorithm made some errors (observed in Digit-Five), FedWCA's weighted aggregation strategy helped mitigate performance degradation.
- Cost reduction potential: A modified version of FedWCA was proposed that reduces communication, storage, and computational costs by performing some computations server-side in later rounds, with minimal impact on accuracy.
Limitations and Future Work
- Complexity of cluster weight calculation: The authors acknowledge that while their cluster weight calculation is not computationally intensive, the procedure is complex. They suggest that finding simpler yet effective methods for calculating cluster weights that match performance is an avenue for future research.
- Dataset-specific performance variation: The accuracy enhancement of FedWCA varies across datasets, being less pronounced on datasets with smaller domain gaps (e.g., Office-Home).
- Extension to other tasks: While FedWCA is designed for classification, its underlying principles could potentially be extended to other complex vision tasks like object detection. However, direct extrapolation might require addressing challenges such as feature vector convergence for cluster weight calculations. This is identified as a promising direction for future work.
Summary updated