Research & Papers

444-parameter Ridge regression runs traffic prediction on ESP32 microcontroller

New model needs no GPU, trains in 7.4s on an ESP32, and updates in 2ms.

Deep Dive

State-of-the-art traffic flow forecasting relies on GPU-intensive models like Graph Convolutional Networks or graph-less MLPs. A new paper from researchers at (presumably) IIIT Hyderabad and partners challenges this assumption. By analyzing the popular GLMST model, they found that reducing internal embedding dimensions from 64 to 4 degrades performance by less than one percentage point—suggesting the model's capacity far exceeds what the task actually needs.

Instead of neural networks, the authors deploy per-sensor Ridge regression with horizon-aligned periodic features, combined with Recursive Least Squares (RLS) for online adaptation. The result: only 444 parameters per sensor (80x less than GLMST) and the entire pipeline—training, inference, and adaptation—runs on an ESP32 microcontroller (160 MHz, 520 KB SRAM). Cold-start training takes 7.4 seconds; each predict-and-update cycle completes in under 2ms with zero heap allocation. On a Raspberry Pi 5, those times drop to 0.21s and 0.26ms respectively. Despite the simplicity, it achieves the best MAPE on three of four PEMS benchmarks and stays within one percentage point on the fourth. This opens the door to truly decentralized, real-time traffic prediction without any cloud or GPU infrastructure.

Key Points
  • Model uses only 444 parameters per sensor—80x fewer than the GLMST neural baseline.
  • Entire pipeline (training, inference, online adaptation) runs on an ESP32: 7.4s cold start, <2ms per update.
  • Achieves best MAPE on 3 of 4 PEMS benchmarks; within 1% on the fourth.

Why It Matters

Enables real-time traffic forecasting on cheap edge hardware, cutting cloud dependency and latency.

📬 Get the top 10 AI stories daily