Memory-adaptive Depth-wise Heterogeneous Federated Learning

Kai Zhang, Yutong Dai, Hongyi Wang, Eric Xing, Xun Chen, Lichao Sun

TL;DR

FEDEPTH is a novel federated learning framework that enables resource-constrained devices (like old smartphones or IoT sensors) to train full-size neural networks by breaking them into sequential, depth-wise blocks. By avoiding the performance-sapping "width-slimming" techniques used in prior work, FEDEPTH achieves over 10% higher accuracy on complex datasets like CIFAR-100 while remaining robust to diverse hardware and data distributions.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple clients to train a shared model without ever exchanging raw data. However, a major hurdle is device heterogeneity: a high-end server and a low-power IoT device have vastly different memory capacities.

Standard FL assumes every client can train the same global model. When they can't, current state-of-the-art methods typically use "width-slimming"—pruning the number of channels in a network so it fits on smaller devices. The authors point out two critical flaws in this approach:

  1. The Activation Bottleneck: Most memory in deep learning is consumed by activations (intermediate layer outputs), not just model parameters. Width-slimming doesn't always address this efficiently.
  2. Performance Degradation: Training and aggregating small "subnetworks" often leads to "under-expression." These weak learners can actually negatively impact the global model's performance when their updates are averaged at the server.
Figure 1: Training memory consumption for left: WideResNet on CIFAR-10 and right: DC-Transformer on IWSLT’14 German to English. Data source: (Sohoni et al. 2019).

Methods

The authors propose FEDEPTH, which shifts the strategy from horizontal (width) scaling to vertical (depth) scaling.

  • Memory-adaptive Network Decomposition: Instead of shrinking the whole model, FEDEPTH decomposes the full-size model into several blocks based on each client's specific memory budget.
  • Depth-wise Sequential Learning: Clients train one block at a time. They freeze previous blocks and use their stored activations as inputs for the current block. To ensure a training signal reaches early layers, they use skip connections to a shared classifier "head."
  • Partial Training for Extreme Constraints: For devices that can't even fit a single block, the authors observe that early layers learn generic features. They propose skipping the training of these initial "large-activation" blocks entirely, relying on updates from more powerful clients to fill in the gaps.
  • Mutual Knowledge Distillation (MKD): For "surplus" clients with extra memory, FEDEPTH allows training multiple model variants simultaneously, using distillation to reach a knowledge consensus that further boosts the global model.
Figure 3: Memory-adaptive neural network decomposition. The second row represents the full neural network with the block size indicating the memory consumption. The first and third rows explain the neural network decomposition based on different clients’ memory budgets.

Datasets

The researchers evaluated FEDEPTH across several standard benchmarks with various "Non-IID" (not identically and independently distributed) settings to simulate real-world data messiness:

  • CIFAR-10 & CIFAR-100: Standard image classification tasks.
  • EMNIST & FEMNIST: Character recognition datasets designed for federated settings.
  • TinyImageNet: A more challenging, larger-scale image dataset.
  • Vision Transformer (ViT): Used to demonstrate the method's effectiveness on modern foundation model architectures.

Key Insights and Ideas

  • Width-slimming is a "Weak Learner" Trap: The paper empirically shows that aggregating updates from very narrow subnetworks can actually hurt the global model. It's often better to have a client train a full-depth block than a full-width subnetwork.
  • Activations are the Real Constraint: By focusing on depth-wise training, FEDEPTH drastically reduces the peak memory required for activations, which is the primary bottleneck for training on edge devices.
  • Sequential Training Preserves Expressivity: Because every client eventually contributes to a full-size model architecture, the global model doesn't suffer from the "under-expression" seen in HeteroFL or SplitMix.
  • ViT Compatibility: Depth-wise training is particularly natural for Transformer blocks, where activation sizes are identical across blocks, making memory budgeting predictable.
Figure 4: An example of depth-wise sequential learning. There are three training steps: 1) training the first block and the classifier with the skip connection (He et al. 2016a); 2) freezing the updated first block and using its activation to train the second block and the classifier with the skip con- nection; 3) freezing the updated first two blocks and using the activation of the second block to train the third block and the classifier.

Key Results

FEDEPTH consistently outperformed existing baselines (FedAvg, HeteroFL, SplitMix, and DepthFL) across all tested scenarios:

  • Accuracy Gains: On CIFAR-10, it showed a ~5% improvement over HeteroFL. On the more complex CIFAR-100, the improvement jumped to over 10%.
  • Robustness: Unlike prior methods, FEDEPTH remained stable even when data was highly unbalanced across clients (unbalanced Dirichlet partitions).
  • ViT Fine-tuning: Applying FEDEPTH to Vision Transformers yielded massive gains—up to 36% improvement on CIFAR-10 compared to standard ResNet-based FL approaches.

Limitations and Future Work

While powerful, FEDEPTH has a few trade-offs:

  • Training Time: Sequential training is naturally slower than training a whole model at once. Local training time per round is roughly 3-6x longer than vanilla FedAvg.
  • Storage Overhead: Depth-wise inference requires storing intermediate activations on the device's disk to avoid re-computing them, which might be a concern for devices with extremely limited storage.
  • Communication: While it trains full models, it doesn't explicitly optimize for communication bandwidth, which remains a general challenge in FL.

Future work could involve optimizing the block-splitting strategy automatically or combining depth-wise training with communication-compression techniques.

Summary updated

BibTeX
@inproceedings{zhang2023memory,
  author = {Kai Zhang and Yutong Dai and Hongyi Wang and Eric Xing and Xun Chen and Lichao Sun},
  title = {{Memory-adaptive Depth-wise Heterogeneous Federated Learning}},
  booktitle = {FLSys @ MLSys},
  year = {2023},
  url = {https://openreview.net/forum?id=DQL_A9Fpm7},
}
Figure