Learning Personalized Causally Invariant Representations for Heterogeneous Federated Clients

Xueyang Tang, Song Guo, Jie Zhang, Jingcai Guo

Introduction: The Shortcut Trap in Federated Learning

Modern machine learning models are notorious for "shortcut learning." For example, if a model mostly sees cows on grass and camels in deserts during training, it might learn to classify a "cow" based on the green background rather than the animal's actual shape. When it eventually sees a cow on a beach—an out-of-distribution (OOD) scenario—it fails.

In Federated Learning (FL), where data is distributed across many clients, this problem is amplified. Personalized FL (PFL) attempts to handle data heterogeneity by giving each client a unique model. However, existing PFL methods typically assume that a client's test data will look exactly like its training data (in-distribution, or IND). If a client's local dataset is biased, the personalized model will likely double down on local shortcuts. Standard "invariant learning" techniques, which seek features that work across all environments, don't solve this for PFL because they often strip away the very "personalization" features that make PFL useful in the first place.

Problem Space of FedSDR

To address this, researchers have introduced FedSDR (Federated Shortcut Discovery and Removal), a PFL framework designed to escape the shortcut trap. By leveraging structural causal models, FedSDR collaboratively identifies shortcut features across clients and removes them to build personalized models that are both specialized to the user and robust to distribution shifts.

Methodology: Structural Causal Models and FedSDR

The authors propose FedSDR based on Structural Causal Models (SCMs). They identify specific "causal signatures" in the data-generating process, showing that invariant features can be split into "global invariant" and "personalized invariant" parts, both of which are independent of shortcuts given the label.

Structural Causal Models for FedSDR

FedSDR operates in two main stages:

  1. Collaborative Shortcut Discovery: The authors prove that shortcut features are statistically independent of the "client indicator" when conditioned on the label and environment. FedSDR uses a bi-level optimization objective where clients work together to find a feature extractor that captures these shortcuts. It does this by maximizing the divergence between classifiers trained on different environments, effectively "hunting" for features that vary unreliably.
  2. Personalized Shortcut Removal: Once the shortcuts are identified, each client trains their final personalized model. The objective function includes a standard loss term plus a mutual information regularization term. This term penalizes the model if its representations are too similar to the shortcuts discovered in Step 1.

Crucially, this method works even if a single client has only one training environment. While a single client might not have enough data diversity to see that a "green background" is a shortcut, the federated server can see that "green" correlates differently with "cow" across different clients and environments, allowing for collaborative discovery.

Key Insights

  • The "Trivial Combination" Failure: Simply adding centralized invariant learning (like Invariant Risk Minimization) to PFL actually hurts performance. It creates a "tug-of-war" where the model tries to be invariant (global) and personalized (local) at the same time, often failing at both.
  • Borrowing Diversity: The core strength of FedSDR is its ability to leverage the collective diversity of the entire federated network to identify what constitutes a "shortcut," overcoming the limited perspective of individual clients.

Experimental Validation

The researchers evaluated FedSDR on four major benchmarks known for distribution shifts: CMNIST (Colored-MNIST), CFMNIST (Colored Fashion-MNIST), WaterBird, and PACS, alongside a custom synthetic dataset used to verify the paper's theoretical proofs.

FedSDR consistently outperformed 10 state-of-the-art methods (including FedAvg, pFedMe, and Ditto) across all datasets:

  • Worst-case Accuracy: On CMNIST, FedSDR achieved a worst-case accuracy of 53.88%, significantly higher than the next best competitor (FedIIR at 47.25%) and vastly better than standard FedAvg (3.39%).
  • Robustness to Shift: As the test distribution shifted (e.g., changing the probability of the color shortcut), FedSDR’s performance remained stable. In contrast, other PFL methods saw their accuracy plummet to near zero when the shortcut was removed or reversed.
  • Scalability: Experiments with up to 80 clients confirmed that the method scales well and maintains its lead over baselines in larger networks.

Limitations and Future Work

While promising, FedSDR has a few limitations. Much of the theoretical proof for "provable discovery" relies on linear data models. While the experimental results on deep neural networks are strong, a formal theoretical extension to highly non-linear causal representations is still needed. Additionally, the bi-level optimization in the discovery phase and the estimation of mutual information can be computationally demanding for resource-constrained edge devices. Future work could explore more complex structural causal models to handle intricate real-world data relationships with lower computational overhead.

Summary updated

BibTeX
@inproceedings{tang2024learning,
  author = {Xueyang Tang and Song Guo and Jie ZHANG and Jingcai Guo},
  title = {{Learning Personalized Causally Invariant Representations for Heterogeneous Federated Clients}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=8FHWkY0SwF},
}
Figure