TL;DR
SpaFL is a novel federated learning framework that slashes both communication and computation costs by training and exchanging lightweight pruning thresholds instead of massive model parameters. By enabling structured sparsity through these trainable thresholds, SpaFL reduces communication overhead by over two orders of magnitude and significantly lowers on-device compute while matching or exceeding the accuracy of dense baselines.
What Problem Does This Paper Address?
Federated Learning (FL) allows edge devices (like mobile phones or IoT sensors) to collaboratively train a machine learning model without sharing their private data. However, modern deep learning models are massive. Sending millions of parameters back and forth between a central server and resource-constrained edge devices creates a massive communication bottleneck. Furthermore, training these dense models locally strains the limited battery and computational power of edge hardware.
While prior research has explored model pruning to introduce sparsity, existing approaches fall short:
- Unstructured pruning zeroes out individual weights randomly, which doesn't translate to actual hardware acceleration without specialized libraries.
- Existing structured pruning methods often fix the sparsity patterns beforehand, require devices to initially train a fully dense model, or still broadcast the entire dense model on the downlink.
SpaFL tackles these challenges simultaneously by optimizing personalized, structured sparse models with minimal communication and computational overhead.
Methods
SpaFL introduces a paradigm shift: instead of learning model parameters collectively, clients collaborate to learn how to prune.
- Structured Pruning via Trainable Thresholds: SpaFL assigns a trainable threshold ($\tau$) to each neuron or convolutional filter. During local training, if the average magnitude of the weights connected to a neuron falls below its threshold, the entire neuron/filter is pruned. This creates structured sparsity, which directly accelerates computation on standard hardware.
- Threshold-Only Communication: Instead of uploading and downloading full weight matrices, clients and the server only exchange these thresholds. Because there is only one threshold per neuron/filter rather than one per weight, the total data exchanged is less than 1% of the original model size.
- Extracting Parameter Importance: The server aggregates local thresholds to form global thresholds. The change in these global thresholds ($\Delta \tau$) over time acts as a proxy for global parameter importance. Clients use this signal to update their local, uncommunicated weights using a specialized XOR-based update rule before the next round of local training.
Datasets
The authors evaluated SpaFL on three standard image classification benchmarks distributed across 100 clients in a highly non-IID (heterogeneous) fashion using a Dirichlet distribution:
- FMNIST (using a LeNet-5 architecture)
- CIFAR-10 (using a 7-layer CNN)
- CIFAR-100 (using a ResNet-18 architecture)
- CIFAR-10 (tested additionally with a Vision Transformer [ViT] architecture)
Key Insights and Ideas
- Thresholds as a Communication Proxy: The mathematical core of the paper demonstrates that the gradient of the threshold implicitly captures the importance of its connected weights. This allows the network to learn optimal sparse architectures globally without ever sharing the underlying weights.
- Sparsity Boosts Generalization: The authors derived a formal generalization bound for SpaFL. Crucially, the bound shows that as the average model density decreases, the generalization gap shrinks—providing theoretical justification for why sparse models trained via SpaFL can outperform dense models.
- Personalization via Local Weights: Because weights are never synchronized or overwritten by a global average, each client naturally maintains a highly personalized model tailored to its local data distribution, while still benefiting from the shared structural knowledge encoded in the global thresholds.
Key Results
SpaFL consistently outperformed both dense and sparse federated learning baselines (such as FedAvg, FedPM, HeteroFL, Fjord, and FedSpa) across all datasets:
- Resource Efficiency: On the FMNIST dataset, SpaFL achieved its target accuracy using just 0.17% of the communication resources and 12.0% of the computation (FLOPs) required by standard dense FedAvg.
- Accuracy Improvements: On CIFAR-10, SpaFL improved accuracy by 2.92% compared to the sparse baseline FedSpa, while consuming only 0.35% of FedSpa's communication bandwidth and 24% of its computing resources.
- Resulting Densities: The framework automatically converged to highly compact models, achieving final model densities of roughly 35.36% for FMNIST, 30.57% for CIFAR-10, and 35.38% for CIFAR-100.
- Transformer Compatibility: When applied to a Vision Transformer (ViT) on CIFAR-10, SpaFL achieved a model density of ~42% while outperforming dense FedAvg in accuracy (69.78% vs 59.20%).
Limitations and Future Work
- Indirect Sparsity Control: SpaFL enforces sparsity via a regularization term in the loss function rather than a hard constraint. Consequently, users cannot explicitly set a strict target sparsity; finding the right sparsity level requires experimental tuning of the regularization coefficient ($\alpha$).
- Bounded Loss Assumption: The theoretical generalization analysis relies on the assumption of a bounded loss function, which may not perfectly reflect practical scenarios where loss functions can take on very large values.
- Simplified Convergence Proof: The current convergence rate analysis is limited to the special case where clients perform only a single local epoch ($E=1$). Extending this theoretical proof to support multiple local epochs remains an open direction for future work.
Summary updated