FedMef: Towards Memory-efficient Federated Dynamic Pruning

Hong Huang, Weiming Zhuang, Chen Chen, Lingjuan Lyu · Submission to ICLR 2024 · Withdrawn · DOI

Abstract

Federated Learning (FL) enables training deep models on decentralized edge devices while preserving data privacy. However, the high memory demands of deep neural networks pose a significant challenge for resource-constrained devices. Traditional dynamic pruning methods often suffer from accuracy drops due to rapid information loss and fail to address the substantial memory footprint of activations. We propose FedMef, a Federated Memory-efficient framework that optimizes both weight and activation memory. FedMef employs Budget-aware Extrusion (BaE) to preserve knowledge during weight pruning and Scaled Activation Pruning (SAP) to minimize intermediate data storage. To support SAP in the presence of non-IID data, we introduce Normalized Sparse Convolution (NSConv). Our evaluations demonstrate that FedMef reduces total memory usage by up to 28.5% and enhances accuracy by up to 2.13% compared to existing state-of-the-art federated pruning techniques.

Introduction

The deployment of Federated Learning on edge devices like smartphones and IoT sensors is hindered by strict hardware limitations. While model pruning is a common strategy to reduce footprint, standard "dynamic pruning" often results in "hasty" information loss, where useful weights are discarded before their knowledge can be consolidated. Furthermore, in architectures like MobileNet, activation memory—the data stored during the forward pass for backpropagation—can be a larger bottleneck than the model weights themselves. FedMef addresses these challenges by optimizing the training process to be both leaner and more accurate.

Methodology: BaE and SAP

FedMef introduces two core innovations to manage memory during federated training:

Budget-aware Extrusion (BaE)

Standard pruning typically removes low-magnitude weights, assuming they are unimportant. However, these weights often contain residual knowledge. BaE uses a surrogate loss function to "extrude" or transfer this information into the weights destined to survive. By employing a specialized learning rate schedule, BaE ensures this transfer occurs efficiently within the limited communication rounds of a federated setting, preventing the sudden accuracy drops associated with traditional pruning.

Scaled Activation Pruning (SAP) and NSConv

To tackle the activation memory bottleneck, FedMef prunes activation caches during training. This is traditionally difficult because models rely on Batch Normalization (BN), which performs poorly with the small, non-IID batches typical of FL. FedMef replaces BN with Normalized Sparse Convolution (NSConv). NSConv standardizes weights at the filter level, keeping activations centered around zero. This stability allows for aggressive pruning of activations (SAP) without compromising model performance, even with a batch size of one.

Overview of the FedMef framework, illustrating the training and adjustment rounds with BaE and SAP.

Experimental Evaluation

The effectiveness of FedMef was evaluated using ResNet (18, 34, 50) and MobileNetV2 architectures across three benchmark datasets: CIFAR-10, CINIC-10, and TinyImageNet. These datasets provide a range of complexity and scale to test the framework's robustness against diverse data distributions.

Key Results and Insights

FedMef consistently outperforms state-of-the-art (SOTA) methods such as FedTiny and FedDST in both memory efficiency and predictive performance.

  • Superior Accuracy-Memory Trade-off: As shown in the performance plots, FedMef achieves higher accuracy at lower memory footprint ratios across all tested datasets and architectures. For instance, on CIFAR-10 with MobileNetV2, it improved accuracy by 2.13% over the best baseline.
  • Significant Memory Reduction: FedMef achieved a 28.5% reduction in total memory footprint compared to SOTA methods when training MobileNetV2. The framework specifically targets activation memory, which can be reduced from 233.1MB to 70.1MB in certain configurations.
  • Robustness to Heterogeneity: Unlike traditional methods that struggle with non-IID data and small batch sizes, FedMef maintains stable convergence and high accuracy. The use of NSConv allows the model to function effectively even with a batch size of one, a critical requirement for ultra-low-resource edge devices.
Comparison of Mean Accuracy vs. Memory Footprint Ratio across different datasets and architectures.

Conclusion

FedMef represents a significant step toward making federated learning viable for the most resource-constrained edge devices. By shifting the focus from simple weight deletion to information extrusion and addressing the often-overlooked activation memory bottleneck, FedMef provides a robust framework for efficient on-device training. Future work may involve combining these techniques with quantization and exploring structured pruning to achieve further hardware-specific speedups.

Summary updated

BibTeX
@misc{huang2024fedmef,
  author = {Hong Huang and Weiming Zhuang and Chen Chen and Lingjuan Lyu},
  title = {{FedMef: Towards Memory-efficient Federated Dynamic Pruning}},
  year = {2024},
  eprint = {2403.14737},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.14737},
}
Figure