Fedns: Improving Federated Learning for Collaborative Image Classification on Mobile Clients

Yaoxin Zhuo, Baoxin Li

Abstract

Federated Learning (FL) enables collaborative model training on decentralized data while preserving privacy. However, standard aggregation methods like Federated Averaging (FedAvg) struggle with non-independent and identically distributed (non-iid) data common in real-world mobile applications. This paper introduces Federated Node Selection (FedNS), a novel aggregation strategy that filters and re-weights client updates at the node and kernel level based on statistical variance. Evaluated on FashionMNIST, CIFAR10, and tinyImageNet, FedNS consistently outperforms FedAvg in accuracy and precision without increasing client-side computational or communication costs.

Introduction

Federated Learning (FL) has emerged as a powerful paradigm for training machine learning models on edge devices, such as smartphones, without compromising user privacy. The standard approach, Federated Averaging (FedAvg), aggregates local model updates by weighting them according to the number of samples processed by each client. While effective for independent and identically distributed (iid) data, FedAvg often falters in real-world "non-iid" scenarios where data distributions vary significantly across users. In these cases, simple sample-based weighting fails to account for the quality or relevance of the features learned by individual clients.

Existing solutions to the non-iid problem often impose additional computational or communication overhead on mobile clients, which is impractical for battery-constrained devices. FedNS addresses this by shifting the complexity to the server-side aggregation process, maintaining a "zero-cost" improvement for the client.

The FedNS Approach: Granular Aggregation

The core innovation of Federated Node Selection (FedNS) is its granularity. Rather than treating a client's entire model update as a monolithic block, FedNS examines individual nodes in fully connected layers and kernels in convolutional layers.

Variance-Based Filtering

FedNS utilizes the statistical variance of weight updates as a proxy for contribution quality. The server calculates the variance for each node/kernel across all participating clients. To mitigate the impact of noisy or outlier updates, the algorithm applies a 95% confidence interval filter. Updates falling outside this range are discarded, ensuring that only the most "certain" and representative features are integrated into the global model.

Difference of top-1 accuracy of FedNS against the FedAvg baseline.

Smart Re-weighting and Class-Specific Layers

Post-filtering, the remaining updates are re-weighted based on their variances before aggregation. Furthermore, for the final classification layer, FedNS employs a specialized weighting scheme that considers the specific class distribution seen by each client. This ensures that the model's decision-making layer is tuned to the actual diversity of the training data.

Experimental Setup

The researchers evaluated FedNS against FedAvg and other baselines using three image classification benchmarks: FashionMNIST, CIFAR10, and tinyImageNet. The experiments utilized a dynamic simulation where clients received random subsets of data in each communication round, accurately reflecting the incremental nature of data collection on mobile devices.

Results and Discussion

FedNS demonstrated consistent performance gains across all datasets and metrics, particularly in non-iid settings.

Comparative performance of FedNS and FedAvg across iid and non-iid settings for accuracy, precision, F-score, and recall.

As shown in the comparative analysis in Figure 4, FedNS maintains a clear advantage over FedAvg throughout the training process. In the CIFAR10 non-iid scenario, FedNS achieved 67.55% accuracy compared to FedAvg's 65.86%. On FashionMNIST, it reached 83.56% accuracy. Notably, the performance gap is often established early in the training process, which is critical for applications requiring rapid model deployment.

The results suggest that variance is a powerful and efficient metric for identifying high-quality updates. By "cherry-picking" the best-performing nodes and kernels, FedNS effectively fuses the most useful features learned across the decentralized network.

Conclusion and Future Work

FedNS provides a robust, server-side enhancement to Federated Learning that significantly improves performance on non-iid data without increasing the burden on mobile clients. While highly effective for typical data distributions, future work will focus on "extreme" non-iid cases where clients may have entirely disjoint sets of classes. Investigating more sophisticated merging strategies for fundamentally different visual domains remains a key area for exploration.

Summary updated

BibTeX
@inproceedings{zhuo2021fedns,
  author = {Yaoxin Zhuo and Baoxin Li},
  title = {{Fedns: Improving Federated Learning for Collaborative Image Classification on Mobile Clients}},
  booktitle = {ICME},
  year = {2021},
  doi = {10.1109/icme51207.2021.9428075},
}
Figure