Abstract
Federated Domain Generalization (FedDG) aims to learn a model from multiple decentralized source domains that generalizes well to unseen target domains without compromising data privacy. We present Multi-source Collaborative Gradient Discrepancy Minimization (MCGDM), a framework that aligns optimization directions across domains. By minimizing gradient discrepancies both within local domains and across decentralized clients via shared classifier heads, MCGDM extracts domain-invariant semantic features. Experimental results on five benchmarks demonstrate that MCGDM achieves state-of-the-art performance in both FedDG and Federated Domain Adaptation (FedDA) scenarios.
Introduction
Domain Generalization (DG) is critical for deploying robust machine learning models where the target environment differs from the training distribution. In traditional DG, all source data is centrally accessible. However, in many real-world applications like healthcare, data is siloed across institutions due to privacy regulations. Federated Domain Generalization (FedDG) addresses this by training models on decentralized data.
As shown in Figure 1, FedDG introduces the constraint that raw data cannot be shared. Existing approaches often rely on sharing style statistics or generating synthetic data, which can still pose privacy risks or fail to capture complex real-world variations. MCGDM overcomes these hurdles by using gradients as a privacy-preserving proxy for cross-domain knowledge.
Methodology: Collaborative Gradient Matching
The core philosophy of MCGDM is that domain-invariant features should produce consistent gradients regardless of the specific domain or data augmentation applied. The method consists of three primary pillars:
1. Intra-domain Gradient Matching
To prevent overfitting to local domain-specific noise (e.g., background textures), MCGDM performs intra-domain matching. For a local client, the model processes original images and their augmented counterparts (using RandAugment).
As illustrated in Figure 6, the model calculates the cross-entropy loss for both streams. It then computes the gradients $g_i$ and $g'_i$ with respect to the classifier parameters. By minimizing the discrepancy between these gradients, the feature extractor is forced to prioritize universal semantic structures over transient augmentations.
2. Inter-domain Gradient Matching
To bridge the gap between isolated clients, the central server aggregates and redistributes the classifier heads from all participating domains. A local client uses these "foreign" heads to calculate gradients on its own local data. By aligning its local gradient with these foreign gradients, the model learns features that are effective across the entire multi-source distribution without ever seeing foreign raw data.
3. Federated Adaptation (FedDA)
In scenarios where unlabeled target domain data is available, MCGDM extends to Federated Domain Adaptation. It utilizes a collaborative ensemble of local models to generate pseudo-labels for the target data, allowing for fine-tuning that further reduces the domain gap.
Experimental Evaluation
The authors evaluated MCGDM across several benchmark datasets, including PACS, VLCS, and Office-Home for FedDG, and Digit-5 and Office-Caltech10 for FedDA.
Key Results
- PACS: MCGDM achieved an average accuracy of 86.2%, outperforming the previous state-of-the-art (FADH) by 1.1% and standard FedAvg by nearly 5%.
- VLCS: The method reached 78.1% accuracy, a 2.1% improvement over FedAvg.
- Office-Home: Even with 65 categories, MCGDM remained robust, achieving 66.8% accuracy.
- Digit-5 (FedDA): The framework reached 97.1% accuracy, surpassing specialized adaptation methods like COPA and KD3A.
Visual analysis using Grad-CAM confirmed that MCGDM-trained models focus more accurately on the primary objects (e.g., the shape of an animal) rather than domain-specific backgrounds or artistic styles compared to standard federated learning.
Conclusion
MCGDM provides a privacy-efficient and effective solution for Federated Domain Generalization. By treating domain shift as a conflict in optimization directions and performing "gradient surgery" via shared classifier heads, it successfully extracts domain-invariant features. While downloading multiple classifier heads introduces some communication overhead, the trade-off for improved generalization and privacy is significant. Future work may focus on optimizing the selection of classifier heads to further enhance efficiency in large-scale federated networks.
Summary updated