Hierarchical Federated Learning implementation is NodeJS. Created by David Canaday to aide an undergraduate research program at Colorado School of Mines.
- Ensure you are running NodeJS 18.X.X or above!
- Run
npm i - Run "start_central.bat" and "start_client_server.bat"
- Run "start_edge.bat" as many times as needed and specify a port each time.
- Run "start_client.bat" and specify port of edge server to connect to.
- Run "start_sim.bat"
- Run
npm i - Run
node data.jsin the central folder - Move and rename the bin files and place them in test_client
- Follow steps 2-3 from previous instructions
- Run the expo app in client
- Run "start_sim.bat"
This implementation is designed to be a demo to run on the local machine, but the code is applicable to a more realistic situation where the network is distributed across many devices. The connectivity is nearly fully implemented. The main features that still need to be added are: robustness and error handling, sending model back upstream for learning iterations, and better train data dissemenation to clients (current method doesn't work well with larger batches).