Collaborative Unsupervised Visual Representation Learning from Decentralized Data

Weiming Zhuang, Xin Gan, Yonggang Wen, Shuai Zhang, Shuai Yi

TL;DR

FedU is a novel federated unsupervised learning framework designed to learn high-quality visual representations from decentralized, unlabeled, and highly heterogeneous (non-IID) data while strictly preserving privacy. By introducing a selective communication protocol and a divergence-aware predictor update (DAPU) mechanism, FedU successfully mitigates the performance degradation typically caused by data heterogeneity across clients, outperforming existing methods by over 14%.

What Problem Does This Paper Address?

Unsupervised visual representation learning (such as contrastive learning) has achieved state-of-the-art performance, but it relies heavily on a centralized database architecture where massive amounts of data are aggregated in the cloud. In the real world, data is generated explosively at the edge—on personal mobile phones or localized street cameras—where strict privacy regulations and bandwidth constraints prevent centralizing raw images.

While Federated Learning (FL) allows decentralized clients to collaboratively train models without sharing raw data, traditional FL algorithms depend on data labels. Merging unsupervised contrastive learning with FL introduces a massive hurdle: non-IID (non-independent and identically distributed) data. When different edge devices see completely different distributions of images (e.g., one camera only sees cars while another only sees dogs), standard federated aggregation leads to severe "weight divergence," causing representation learning to collapse.

Figure 3. Illustration of weight divergence caused by non-IID data studied in [38]. Federated learning on non-IID data leads to sig- nificant divergence from the centralized training.

Methods

FedU builds upon the asymmetric Siamese network architecture popularized by self-supervised methods like BYOL. Each client maintains two networks: an online network (consisting of an online encoder and a predictor) and a target network (a target encoder updated locally via an Exponential Moving Average (EMA)).

To overcome the non-IID data challenge without compromising privacy, the authors introduce two simple yet highly effective modifications to the standard federated pipeline:

  1. Selective Communication Protocol: Instead of uploading the entire model, clients only upload the weights of their online encoders to the central server for aggregation. Crucially, during the model update phase, the server updates only the clients' local online encoders. The target encoders are left untouched by the server, allowing them to maintain stable, locally representative targets for contrastive learning.
  2. Divergence-Aware Predictor Update (DAPU): The final predictor layer in Siamese networks is highly sensitive to specific classes. Forcing a global average on a client that only sees a fraction of the total classes introduces harmful noise. FedU dynamically decides whether to update a client's local predictor with the global predictor based on weight divergence. If the $L_2$ distance between the local online encoder and the previous global encoder is below a threshold ($\mu$), the client synchronizes its predictor with the server; otherwise, it keeps its local predictor to safeguard local learning.
Overview of the proposed FedU framework

Datasets

The authors evaluated FedU using simulated federated environments across standard vision benchmarks:

  • CIFAR-10 & CIFAR-100: Used for linear and semi-supervised evaluations. To simulate a harsh non-IID environment, the training sets were split among 5 clients such that each client only contained 2 classes (for CIFAR-10) or 20 classes (for CIFAR-100).
  • Mini-ImageNet: Used to evaluate the transfer learning capabilities of the learned representations to downstream tasks.

Key Insights and Ideas

  • The Target Encoder as a Local Anchor: A key "aha" moment in this paper is realizing that the target encoder shouldn't be globally aggregated. Because it acts as a regression target for the online network, keeping it purely local allows the model to remain grounded in the client's specific data distribution, preventing representation collapse during local training rounds.
  • Predictors are Class-Sensitive: The authors leverage the insight that deeper layers in neural networks capture highly class-specific features. DAPU acts as an intelligent gating mechanism—allowing generalization when the client's model is close to the global consensus, but defending the local model when divergence is too high.
Figure 1. Limitations of unsupervised learning (BYOL [8]) on non-IID data. (a) and (b) are t-SNE visualization of representa- tions. We simulate five decentralized clients, where each client has unique two out of ten classes of CIFAR-10 [15] training data. Training in a single client cannot learn the representation properly.

Key Results

FedU was evaluated under linear evaluation (fixing the backbone and training a linear classifier) and semi-supervised learning protocols:

  • Linear Evaluation: On non-IID CIFAR-10, FedU (with a ResNet-50 backbone) achieved 83.25% top-1 accuracy. This significantly outperforms single-client training (77.84%) and beats other federated unsupervised baselines like FedCA (68.01%) and FedSimSiam (76.70%) by wide margins.
  • Semi-Supervised Edge: When fine-tuning the model with only 1% of labeled data on non-IID CIFAR-10, FedU achieved 71.19% accuracy, outperforming FedCA by more than 42% absolute accuracy points.
  • Transfer Learning: Representations learned via FedU on Mini-ImageNet transferred robustly to CIFAR datasets, proving that the framework learns generic, reusable visual features rather than just memorizing local client data.

Limitations and Future Work

While FedU delivers impressive gains, the authors note a few areas for improvement:

  • Threshold Sensitivity: The optimal divergence threshold ($\mu$) for DAPU varies depending on the dataset (e.g., 0.4 for CIFAR-10 vs. 0.6 for CIFAR-100), requiring manual tuning.
  • Scale: The current evaluation is limited to smaller-scale datasets (CIFAR and Mini-ImageNet) with 5 simulated clients. Future work will focus on scaling FedU to larger real-world datasets and evaluating it directly on complex downstream tasks like object detection and semantic segmentation.

Summary updated

BibTeX
@misc{zhuang2021collaborative,
  author = {Weiming Zhuang and Xin Gan and Yonggang Wen and Shuai Zhang and Shuai Yi},
  title = {{Collaborative Unsupervised Visual Representation Learning from Decentralized Data}},
  year = {2021},
  eprint = {2108.06492},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.06492},
}
Figure