Reducing Spurious Correlation for Federated Domain Generalization
Shuran Ma, Weiying Xie, Daixun Li, Haowei Li, Yunsong Li
TL;DR
FedCD tackles federated domain generalization by jointly mitigating spurious correlations and promoting invariant cross-domain predictions. It introduces a self-supervised Spurious Correlation Intervener (SCI) that locally weakens spurious features by masking inputs and aligns client gradients via a server-side gradient g, with a loss term L_SCI = $||\nabla_e - \nabla_g||^2$. Complementing SCI, the Risk Extrapolation Aggregation (REA) selects aggregation coefficients to minimize risk variance across clients through a convex optimization, yielding coefficients c_e = $\frac{\exp(\eta w_e + p_e)}{\sum_k \exp(\eta w_k + p_k)}$ that blend ERM with federation dynamics. Empirical results on style generalization and autonomous-driving datasets show consistent improvements over strong baselines, with larger gains under greater domain shifts, and analyses reveal SCI induces sparser, more robust feature representations. The approach preserves privacy by sharing only gradients and requires no additional data exchange, offering a scalable path toward robust cross-domain ML in privacy-sensitive, decentralized settings.
Abstract
The rapid development of multimedia has provided a large amount of data with different distributions for visual tasks, forming different domains. Federated Learning (FL) can efficiently use this diverse data distributed on different client media in a decentralized manner through model sharing. However, in open-world scenarios, there is a challenge: global models may struggle to predict well on entirely new domain data captured by certain media, which were not encountered during training. Existing methods still rely on strong statistical correlations between samples and labels to address this issue, which can be misleading, as some features may establish spurious short-cut correlations with the predictions. To comprehensively address this challenge, we introduce FedCD (Cross-Domain Invariant Federated Learning), an overall optimization framework at both the local and global levels. We introduce the Spurious Correlation Intervener (SCI), which employs invariance theory to locally generate interventers for features in a self-supervised manner to reduce the model's susceptibility to spurious correlated features. Our approach requires no sharing of data or features, only the gradients related to the model. Additionally, we develop the simple yet effective Risk Extrapolation Aggregation strategy (REA), determining aggregation coefficients through mathematical optimization to facilitate global causal invariant predictions. Extensive experiments and ablation studies highlight the effectiveness of our approach. In both classification and object detection generalization tasks, our method outperforms the baselines by an average of at least 1.45% in Acc, 4.8% and 1.27% in mAP50.
