Abstract: In recent years, there has been a spike in interest in the field of federated learning (FL). As a result, an increasing number of federated learning algorithms have been developed. Large-scale deployments to validate these algorithms are often not feasible, resulting in a need for simulation tools which closely emulate real deployment conditions. Existing federated learning simulators lack complex network settings, and instead focus on data and algorithmic development. ns-3 is a discrete event network simulator, which has a plethora of models to represent network components and can simulate complex networking scenarios. In this paper, we present ns3-fl, which is a tool that connects an existing FL simulator, flsim, with ns-3 to produce a federated learning simulator that considers data, algorithm, and network. We first discuss the learning, network and power models used to develop our tool. We then present an overview of our implementation, including the Client/Server ns-3 applications and interprocess communication protocols. A real Raspberry Pi-based deployment is setup to validate our tool. Finally, we perform a simulation emulating FL training on 40 clients throughout the UCSD campus and analyze the performance of our tool, in terms of real clock execution time for various FL rounds.
Loading