FedCiR: Client-Invariant Representation Learning for Federated Non-IID Features

Zijian Li, Zehong Lin, Jiawei Shao, Yuyi Mao, Jun Zhang

TL;DR

FedCiR is a new federated learning framework that tackles the "feature shift" problem—where different devices see the same objects in very different environments (e.g., different lighting or camera types). By using mutual information regularizers and a data-free server-side generator, it forces models to learn features that are both highly predictive and consistent across all participants, significantly boosting accuracy and convergence speed.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple devices to train a shared model without ever exchanging raw data. However, it struggles with non-IID data, particularly feature shift.

Imagine a wildlife protection project where cameras are placed in different forests. One camera is in a sunny clearing, while another is in a dark, foggy thicket. Even if they both photograph a "fox," the pixel-level distributions are vastly different. Standard FL algorithms often get "distracted" by these local environmental quirks (client-specific features), leading to a global model that performs poorly when generalized across all sites. The authors aim to strip away these environmental "distractions" to find the client-invariant essence of the data.

Methods

The authors introduce FedCiR (Federated Client-Invariant Representation learning), which is built on a solid theoretical foundation: a new generalization error bound specifically for federated feature shift.

The core of FedCiR consists of two main strategies driven by Information Theory:

  1. Class-Discriminative Learning: It maximizes the mutual information between representations and labels. This ensures that the features extracted are actually useful for classification, compensating for the "information poverty" of small local datasets.
  2. Client-Invariant Learning: It minimizes the conditional mutual information between the client identity and the representations. This forces the encoder to ignore "style" (like lighting or camera tint) and focus on "substance" (the actual object).

The "Secret Sauce": Data-Free Distribution Approximation To calculate these mutual information terms, the model needs to know what the "global" distribution of features looks like. Since the server can't see the clients' data, the authors propose a data-free mechanism. The server trains a generator to produce "proxy" representations that achieve the maximum consensus among all uploaded local classifiers. This generator acts as a privacy-preserving mirror of the global feature space, which clients then download to regularize their local training.

Datasets

The researchers evaluated FedCiR on five diverse datasets that represent real-world feature shift scenarios:

  • DomainNet & PACS: Standard benchmarks for domain adaptation containing different styles like sketches, cartoons, and photos.
  • Office-Caltech-10: Images of office objects from different sources.
  • Camelyon17: A medical dataset for detecting tumors across different hospitals (where staining and imaging equipment vary).
  • Iwildcam: A challenging wildlife dataset where images are captured by different camera traps in varying environmental conditions.

Key Insights and Ideas

  • Beyond Weight Averaging: Most FL research focuses on how to average model weights. FedCiR shifts the focus to aligning representation distributions, which is a more direct way to handle feature-level discrepancies.
  • The Power of Consensus: The idea that a server can "reconstruct" a global feature distribution simply by finding the point where all local classifiers agree is a clever way to bypass privacy restrictions.
  • Theoretical Motivation: The authors don't just guess; they derive a mathematical bound showing that reducing the $\mathcal{H}$-divergence (a measure of how different two distributions are) between local and global datasets is the key to minimizing global error.

Key Results

  • Superior Accuracy: FedCiR consistently outperformed state-of-the-art baselines (like FedAvg, FedProx, and FedGen). For example, it surpassed the previous best (FedGen) by 1.24% on DomainNet and 1.8% on PACS.
  • Faster Convergence: In many scenarios, FedCiR reached target accuracy significantly faster than other methods, which is crucial for reducing communication costs in mobile networks.
  • Efficiency: Despite adding a generator, the overhead is negligible. The authors show that FedCiR actually requires less total computation (TFLOPs) to reach 60% accuracy compared to baselines because it converges so much faster.

Limitations and Future Work

The authors acknowledge that while their data-free generator is effective, it is still an approximation. They suggest that future work could explore using pretrained generative models (like large-scale diffusion models or GANs) to provide even richer global priors, potentially solving the feature shift problem in even more data-scarce environments. Additionally, the current work assumes "covariate shift" (the ground truth labels are consistent across clients), which may not hold in every real-world application.

Summary updated

BibTeX
@article{li2024fedcir,
  author = {Zijian Li and Zehong Lin and Jiawei Shao and Yuyi Mao and Jun Zhang},
  title = {{FedCiR: Client-Invariant Representation Learning for Federated Non-IID Features}},
  journal = {IEEE Transactions on Mobile Computing},
  year = {2024},
  url = {https://openreview.net/forum?id=QO9cMrMd5o},
}
Figure