Sewage overflows, predicted before they happen.

England's sewers spilled raw sewage for 3.6 million hours in 2024. Over 450,000 overflow events sent untreated waste into rivers, lakes, and coastal waters. The infrastructure is ageing, the climate is wetter, and the monitoring is still largely reactive. Counterintuitively, hydroinformatic sensors that tell you that a spill has already happened, not that one is about to and how you might prevent it.

We trained a Logic-Based Network to change that.

The model

Working with sensor-derived flow and gating data from a UK water network, we used ModelMill to train an LBN for sewage overflow prediction. The task: forecast overflow conditions in advance, giving operators time to divert flow before a spill reaches open water.

The model fits inside 14 kB of RAM. It executes a single inference in 1.74 ms on an MCU. And it runs directly on the IoT sensor — no cloud round-trip, no gateway, no server.

The LSTM we benchmarked against couldn't even deploy to the target hardware. Too large, too power-hungry, too dependent on infrastructure the remote sites don't have.

14 kB
RAM
1.74 ms
inference
10 yr
battery life

The battery question

Communication is the single largest drain on an IoT sensor's battery. Every transmission to the cloud costs orders of magnitude more energy than local computation. Most edge AI discussions ignore this, assuming a persistent network connexion that field-deployed sensors simply don't have.

Because the LBN runs inference entirely on-device, communication becomes optional. The sensor predicts locally and only transmits when it has something worth reporting — an approaching threshold, a confirmed anomaly, a forecast that demands attention. The rest of the time, the radio stays off.

The arithmetic:

A CR2032 coin cell running a prediction every 5.8 seconds lasts over 10 years.

A standard AA battery running inference every 1.05 seconds lasts over a decade.

That changes the economics of an entire network. No mains power. No solar panels. No site visits to swap batteries every few months. Drop the sensor in a sewer, and it monitors for the better part of its operational lifetime without intervention.

Why this matters

England and Wales operate over 14,000 storm overflows. Monitoring them all with cloud-dependent AI would require persistent connectivity and power infrastructure at every site — the same £15,000-per-site problem that has stalled previous deployments.

Battery-powered edge AI sidesteps the infrastructure question entirely. A sensor network running LBN-based overflow prediction could cover thousands of sites at a fraction of the cost, forecasting spills in sub-second cycles and diverting flow before sewage reaches the waterway.

The model was trained with ModelMill.