Topology-aware simulation of geo-distributed federated learning.
FedSim lets you draw a multi-server federated-learning deployment as a graph, run it with real PyTorch training, and trace every result back to the configuration and update rules that produced it. It includes a hierarchical engine (HierFL) and a Spyker-inspired asynchronous multi-server engine.
- Topology editor: servers, client groups and per-link bandwidth, latency, jitter and packet loss, validated before a run starts.
- Explicit update rules: hierarchical aggregation, asynchronous blending with configurable staleness weighting and learning-rate feedback.
- Virtual time, real training: simulated compute and network delays on Ray, with a fixed worker pool and functional probes covering 2,000 hierarchical and 1,000 asynchronous clients.
- Reproducible runs: immutable run definitions, per-server checkpoints, update traces, CSV export, and Grafana dashboards.
Requires Docker with Docker Compose v2.
git clone https://github.com/FedSim-Research/fedsim.git
cd fedsim
docker compose up -d --buildOpen localhost:8088. The Getting started guide walks through a first simulation and lists all everyday commands.
With 140 of 200 clients on one server, normalizing staleness by each server's client count raises mean asynchronous CIFAR-10 accuracy from 33.9% to 59.0% (five seeds, gain at every seed). This places it 4.8 points above HierFL at equal virtual time and 3.5 points below at equal delivered client updates.
See the paper and artifacts for methods, limitations and data.
| Guide | Contents |
|---|---|
| Getting started | Start FedSim, run a first simulation, everyday commands |
| Development | Local installation, tests and frontend development |
| Architecture | Engines, update rules, event kernel and delay models |
| Experiments | Scripted, archived comparison campaigns |
| Reproducibility | Random state, data assignment and evaluation scope |
| Operations | Configuration, storage, capacity and GPU deployment |
| Deposit | DOI |
|---|---|
| Preprint | 10.5281/zenodo.24502689 |
| Experiment artifacts | 10.5281/zenodo.24245352 |
The artifact deposit contains the source snapshots, configurations, traces, checkpoints and analysis scripts behind every reported result. This repository holds the maintained simulator.
To cite the software, use CITATION.cff or GitHub's Cite this repository button, and record the commit you used.
Apache-2.0. Third-party components retain their own licenses; see Third-party notices.

