FedAPTA: Federated Multi-task Learning in Computing Power Networks with Adaptive Layer-wise Pruning and Task-aware Aggregation

Yachao Yuan, Zhen Yu, Jin Wang, Zhipeng Cheng, Jianhua HuarXiv 2025 · DOI

Abstract

Federated Learning (FL) is a promising paradigm for privacy-preserving decentralized machine learning. However, practical implementations often struggle with hardware heterogeneity (varying device capabilities) and task heterogeneity (varying local objectives). This paper presents FedAPTA, a novel framework designed to bridge these gaps. FedAPTA employs adaptive layer-wise pruning to tailor models to specific hardware constraints and utilizes task-aware clustering to prevent negative knowledge transfer between disparate tasks. Experimental results on five benchmark datasets demonstrate that FedAPTA outperforms state-of-the-art methods by up to 4.23%, maintaining high accuracy even under extreme pruning conditions.

Introduction: The Challenge of Heterogeneity

Federated Learning is often pitched as the "holy grail" of privacy-preserving AI, allowing models to learn from decentralized data without ever seeing the raw information. However, the real world is messy. In practice, a network might consist of a high-end server alongside low-power IoT sensors (hardware heterogeneity), and those devices might be trying to solve entirely different problems (task heterogeneity).

Standard FL usually assumes a "one size fits all" approach: every device trains the exact same model architecture on the same global task. This creates two major bottlenecks:

  1. Hardware Heterogeneity: If a heavy ResNet model is deployed to a network of smartphones and smart fridges, weaker devices will either fail to train or significantly slow down the process (the "straggler" problem).
  2. Task Heterogeneity: In multi-task scenarios, different groups of devices might perform different classification tasks. If a central server simply averages all updates, the resulting global model becomes a "jack of all trades, master of none," suffering from interference between unrelated tasks.

FedAPTA addresses these dual challenges simultaneously by introducing a framework that adapts to device power and task specificity.

The FedAPTA Framework

FedAPTA introduces three novel components to the FL pipeline to handle the complexities of modern computing power networks.

The FedAPTA framework workflow, illustrating the cycle from adaptive pruning on heterogeneous clients to task-aware aggregation at the central server.

1. Adaptive Layer-wise Pruning

Instead of applying a flat pruning ratio (e.g., "remove 50% of all neurons"), FedAPTA evaluates the "importance" of each layer using the L1 norm. It then solves an optimization problem to assign unique pruning ratios to each layer. This ensures that critical feature-extracting layers are preserved while less important layers are thinned out to meet a device's specific hardware constraints. This surgical approach allows the model to retain much higher accuracy at high compression levels compared to traditional uniform pruning.

2. Heterogeneous Model Recovery

When a device sends a pruned (smaller) model back to the server, the server cannot easily average it with other models of different sizes. FedAPTA solves this by "infilling" the missing parameters using weights from the latest global model. This reconstructs a full-sized architecture, allowing for consistent aggregation without losing the contributions of pruned parameters. This makes the global model act as a "safety net," ensuring devices benefit from the collective knowledge even for parameters they didn't train locally.

3. Task-aware Model Aggregation

To handle multiple tasks, the server calculates the cosine similarity of the updates from the final fully connected layers, which serve as task-specific "fingerprints." It then uses HDBSCAN, a density-based clustering algorithm, to group devices by task. Models are only aggregated within their respective task clusters, preventing negative knowledge transfer and ensuring specialized performance for each group.

Experimental Evaluation

The framework was evaluated using five widely recognized image classification benchmarks: MNIST, Fashion-MNIST, SVHN, CIFAR10, and EMNIST. The researchers simulated a network of 50 heterogeneous devices, split into five distinct task groups, using ResNet18 and ShuffleNetV2 as base architectures.

Key Results

FedAPTA was benchmarked against nine state-of-the-art (SOTA) FL frameworks, including FedAvg, FedProx, and FedLPS:

  • Accuracy Boost: FedAPTA consistently outperformed all baselines. In non-i.i.d. settings, it achieved an average accuracy of 85.87% on ResNet18, a significant jump over the next best competitor, FedLPS (83.37%).
  • Resilience to Pruning: Even when models were pruned by 80%, FedAPTA maintained a much higher accuracy curve than FedDrop or FedRolex, proving that its layer-wise strategy is superior to rolling-window or uniform pruning.
  • Effective Clustering: The use of cosine distance and HDBSCAN allowed the server to perfectly distinguish between different tasks, ensuring that specialized knowledge was not diluted.

Conclusion and Future Work

FedAPTA represents a significant step forward in making Federated Learning viable for diverse, real-world networks. By treating layer importance as non-uniform and tasks as distinct clusters, it achieves a balance between efficiency and accuracy. While currently focused on image classification, future work will explore expanding the framework to Natural Language Processing (NLP) and further optimizing server-side communication overhead.

For those interested in the implementation, the code is available on GitHub: https://github.com/Zhenzovo/FedAPTA.

Summary updated

BibTeX
@misc{yuan2025fedapta,
  author = {Yachao Yuan and Zhen Yu and Jin Wang and Zhipeng Cheng and Jianhua Hu},
  title = {{FedAPTA: Federated Multi-task Learning in Computing Power Networks with Adaptive Layer-wise Pruning and Task-aware Aggregation}},
  year = {2025},
  eprint = {2508.02230},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.02230},
}
Figure