FedNC: A Secure and Efficient Federated Learning Method Inspired by Network Coding

Yuchen Shi, Zheqi Zhu, Pingyi Fan, Khaled B. Letaief, Chenghui Peng · DOI

Introduction

Federated Learning (FL) has emerged as a powerful paradigm for training machine learning models across decentralized devices while keeping data local. However, standard FL implementations, such as FedAvg, face significant hurdles in real-world deployments. Specifically, they are vulnerable to privacy leaks through model parameter interception and suffer from communication inefficiencies in unstable network environments. This paper introduces FedNC, a novel framework that integrates Random Linear Network Coding (RLNC) into the FL upload process to address these dual challenges of security and robustness.

The Challenges of Traditional Federated Learning

Traditional FL systems encounter two primary bottlenecks:

  1. Privacy Breaches: While raw data remains on-device, the transmission of model gradients or parameters over open channels can still expose sensitive information to sophisticated eavesdroppers.
  2. Communication Bottlenecks and the "Blind Box Effect": In unstable wireless networks, packet loss leads to the "straggler" problem, where the server must wait for specific unique packets to complete an update. Furthermore, in complex networks where a server receives packets without knowing their exact source—a scenario termed the "blind box effect"—the server often collects redundant packets to ensure it has captured every client's contribution, akin to the "Coupon Collector’s Problem."

The FedNC Framework

FedNC reimagines the FL upload process by treating local model parameters as packets and applying RLNC before transmission. Instead of sending raw parameters, clients transmit random linear combinations of their model updates.

Encoding and decoding process in FedNC using Random Linear Network Coding.

Methodology

  • Encoding: Local model parameters $P_k$ are mixed into encoded packets $C_i = \sum \alpha_{ik} P_k$, where $\alpha$ are random coefficients from a finite Galois field.
  • Transmission: Clients or intermediate nodes transmit these encoded "mixed" packets along with their coefficients.
  • Decoding: The central server collects any $K$ linearly independent encoded packets and uses Gaussian Elimination (GE) to recover the original $K$ local models.
  • Aggregation: Standard aggregation (e.g., weighted averaging) is performed on the recovered models to update the global state.

This approach ensures that every packet is equally valuable and interchangeable, drastically improving robustness against packet loss. From a security perspective, an eavesdropper must capture at least $K$ independent packets to decode any parameters, creating a significant barrier to data theft.

Experimental Evaluation

The authors evaluated FedNC using the CIFAR-10 dataset across 100 to 200 clients. The system was tested under both Independent and Identically Distributed (IID) and Mixed Non-IID settings, with a fixed participation rate of 10 clients per round.

Key Findings and Discussion

FedNC demonstrates significant advantages over traditional FedAvg, particularly in heterogeneous data environments. While performance is comparable in simple IID cases, FedNC shines in non-IID scenarios, converging faster and achieving higher final test accuracy.

Test accuracy comparison between FedAvg and FedNC variants in a non-IID setting.

Key Insights:

  • Efficiency in "Blind Box" Networks: FedNC reduces the packet requirement from $O(K \ln K)$ (as seen in the Coupon Collector’s Problem) to $O(K)$, enabling faster server updates.
  • Robustness in Non-IID Settings: In challenging non-IID tests, FedNC achieved approximately 69.4% accuracy compared to 64.6% for FedAvg. This suggests that the coding mechanism better handles the data heterogeneity and network instability inherent in large-scale distributed systems.
  • Low Overhead: By utilizing small finite fields (e.g., $s=8$), the computational cost of encoding and decoding remains negligible compared to the resource-intensive training of neural networks.

Conclusion

FedNC represents a foundational step in merging Network Coding with Federated Learning. By providing a security layer and mitigating the impact of network instability, it offers a more resilient framework for massive, real-world distributed training. Future work will focus on establishing rigorous mathematical proofs for convergence rates and formal information-theoretic privacy guarantees.

Summary updated

BibTeX
@inproceedings{shi2024fednc,
  author = {Yuchen Shi and Zheqi Zhu and Pingyi Fan and Khaled B. Letaief and Chenghui Peng},
  title = {{FedNC: A Secure and Efficient Federated Learning Method Inspired by Network Coding}},
  booktitle = {WCNC},
  year = {2024},
  doi = {10.1109/wcnc57260.2024.10571245},
}
Figure