Define client tasks and metrics
Specify the per-device prediction target, communication budget and success criteria such as accuracy, bytes per round and latency per inference.
Coordinate learning across devices. Measure per-device latency and cost.
Federated learning trains a shared model across many devices without centralising raw data. For IoT this raises trade-offs between communication cost, local compute, latency, battery use and model accuracy; realistic simulation of client heterogeneity and network conditions is essential.
Learning concept · Not a validated service
Federated learning trains a shared model across many devices without centralising raw data. For IoT this raises trade-offs between communication cost, local compute, latency, battery use and model accuracy; realistic simulation of client heterogeneity and network conditions is essential.
A proposed use case: aggregate model improvements from many battery-powered sensors while keeping raw telemetry on-device. Any deployment must keep a human operator in the loop for model updates and for handling devices with poor connectivity or corrupted inputs.
Specify the per-device prediction target, communication budget and success criteria such as accuracy, bytes per round and latency per inference.
Split a representative dataset into client partitions that capture non-iid distributions, missing features and variable sizes to approximate real IoT heterogeneity.
Run a simple federated-averaging loop (or use TensorFlow Federated) with a lightweight model and measure rounds-to-converge and communication cost.
Profile single-sample latency, memory and energy on target hardware, and test behaviour under intermittent connectivity and straggler clients.
The supplied starter generates synthetic classification data with sklearn.make_classification, fits a single DecisionTreeClassifier on the whole dataset, then measures repeated prediction latency by calling model.predict in a tight loop and prints simple tree statistics. It does not implement federated training, client partitions, communication rounds or any IoT-specific data.
X, y = make_classification(n_samples=1000, n_features=12, n_informative=8, random_state=42)
model = DecisionTreeClassifier(max_depth=6, random_state=42)
model.fit(X, y)
sample = X[:1]
start = time.perf_counter()
for _ in range(1000):
model.predict(sample)
latency_ms = (time.perf_counter() - start) * 1000 / 1000The starter uses synthetic centralised data and a single scikit-learn DecisionTree. There is no client splitting, no federated-averaging or communication simulation, and no IoT telemetry; latency is measured by repeated in-process prediction calls, which does not represent real networked device inference or on-device runtime constraints.
A proposed extension: simulate many clients using distinct partitions of an IoT telemetry dataset, implement federated averaging with TensorFlow Federated, and instrument bytes transferred per round and per-device latency on a target edge runtime.
This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.
Networkers Home runs this topic inside its Network Engineering Course, with placement support and hands-on labs.