Heterogeneity-Aware Memory Efficient Federated Learning via Progressive Layer Freezing

Yebo Wu, Li Li, Chunlin Tian, Chang Tao, Lin Chi, Wang Cong, Cheng-Zhong Xu · DOI

Abstract

In this paper, we propose SmartFreeze, a framework that effectively reduces the memory footprint by conducting the training in a progressive manner. Instead of updating the full model in each training round, SmartFreeze divides the shared model into blocks consisting of a specified number of layers. It first trains the front block with a well-designed output module, safely freezes it after convergence, and then triggers the training of the next one. This process iterates until the whole model has been successfully trained. In this way, the backward computation of the frozen blocks and the corresponding memory space for storing the intermediate outputs and gradients are effectively saved. Except for the progressive training framework, SmartFreeze consists of the following two core components: a pace controller and a participant selector. The pace controller is designed to effectively monitor the training progress of each block at runtime and safely freezes them after convergence while the participant selector selects the right devices to participate in the training for each block by jointly considering the memory capacity, the statistical and system heterogeneity. Extensive experiments are conducted to evaluate the effectiveness of SmartFreeze on both simulation and hardware testbeds. The results demonstrate that SmartFreeze effectively reduces average memory usage by up to 82%. Moreover, it simultaneously improves the model accuracy by up to 83.1% and accelerates the training process up to 2.02X.

Introduction

Federated Learning (FL) has emerged as a powerful paradigm for training deep neural networks across decentralized devices while maintaining data privacy. However, as modern models grow increasingly complex, they encounter a "memory wall." Training state-of-the-art architectures like ResNet50 can require over 26 GB of RAM, far exceeding the 4–16 GB typically available in flagship smartphones. Traditional memory-saving techniques used in data centers, such as offloading data between CPU and GPU, are often ineffective on mobile System-on-Chips (SoCs) where these components share the same physical RAM. SmartFreeze addresses this challenge by rethinking the training process to fit within the strict hardware constraints of edge devices.

The SmartFreeze Framework

SmartFreeze introduces a progressive training strategy that breaks the monolithic training process into manageable stages. The framework is built on three pillars:

1. Progressive Layer Freezing

The fundamental insight of SmartFreeze is that early layers in a neural network converge much faster than deeper layers because they learn simple, task-independent features like edges and textures. By monitoring Centered Kernel Alignment (CKA) values, the authors observed that early convolutional layers reach stability early in the training process.

Centered Kernel Alignment (CKA) values for different convolutional layers over training rounds, demonstrating that early layers converge faster.

SmartFreeze exploits this by dividing the model into blocks. It trains the initial block using a specialized convolutional output module that preserves spatial information. Once the block converges, it is frozen, and the framework moves to the next block. This eliminates the need for backward computation and gradient storage for frozen layers, drastically reducing the memory footprint.

2. Pace Controller

To automate the freezing process, a Pace Controller monitors the stability of weight updates at runtime. Using a "block perturbation" metric, it determines when a block has sufficiently converged to be safely frozen without harming the final model's accuracy.

3. Robust Louvain Community Detection (RL-CD) Participant Selector

To handle statistical heterogeneity (Non-IID data), SmartFreeze employs a graph-based algorithm to group devices into communities based on data similarity. It then selects a diverse set of participants from these communities, ensuring the global model maintains high generalization even when training is performed block-by-block.

Experimental Evaluation

The framework was rigorously tested on CIFAR-10, CIFAR-100, and Tiny-ImageNet datasets, as well as on physical hardware including Raspberry Pi 4B and various NVIDIA Jetson modules.

Memory Efficiency and Accuracy

SmartFreeze demonstrates a significant reduction in memory usage across all components, including activations, optimizer states, and parameters. Compared to standard full-model training, SmartFreeze (Method E in the evaluation) reduces the memory footprint to as low as 25% of the original requirement.

Memory usage breakdown (Activation, Optimizer, Parameters) across different training methods, showing SmartFreeze (Method E) achieves significant savings.

Beyond memory savings, the framework achieved accuracy gains of up to 83.1% on complex tasks like VGG16 on CIFAR-100. This is largely because SmartFreeze allows devices that would otherwise be excluded due to memory constraints to contribute to the global model. Furthermore, by reducing the computational overhead of backpropagation, the system achieved training speedups of up to 2.02×.

Conclusion

SmartFreeze effectively "breaks the memory wall" in Federated Learning. By combining progressive layer freezing with intelligent participant selection and pace control, it enables resource-constrained mobile devices to participate in training large-scale models. While future work may further explore the communication overhead of block-wise updates, SmartFreeze currently provides a robust solution for high-performance, memory-efficient decentralized learning.

Summary updated

BibTeX
@inproceedings{wu2024heterogeneity,
  author = {Yebo Wu and Li Li and Chunlin Tian and Chang Tao and Lin Chi and Wang Cong and Cheng-Zhong Xu},
  title = {{Heterogeneity-Aware Memory Efficient Federated Learning via Progressive Layer Freezing}},
  booktitle = {IWQoS},
  year = {2024},
  doi = {10.1109/iwqos61813.2024.10682916},
}
Figure