Project Objective
An always-on acoustic monitor spends almost all of its time listening to background noise. Running a large classifier or a multimodal AI model on every audio frame therefore wastes most of its compute. We are building a two-stage, event-driven alarm. A tiny spiking neural network (SNN) listens continuously and acts as a cheap trigger. Only when it hears a candidate glass break does the system take a photo and ask a multimodal AI model to verify the scene.
The SNN is designed from the start to fit Lu.i, a low-cost analog neuron PCB that implements the leaky integrate-and-fire (LIF) model in electronics. We do not train an unconstrained network and squeeze it onto hardware afterwards. Topology, fan-in and neuron dynamics are constrained during training, so the selected model stays realistic for a physical network of Lu.i boards.
Our paper in about 90 seconds: the architecture, the eight-neuron network, the results and the microcontroller cycle budget.
How It Works
- Sensing. A MAX4466 microphone is sampled by an Arduino Uno at about 19.23 kHz. Every 9.984 ms the firmware turns one frame into binary events on seven channels:
peak,hjorth_mobility,autocorr_lag1,zcr,flux,hf_loandhf_hi. No raw audio leaves the device. - Edge gateway. A Raspberry Pi 5 batches the timestamped events, sends them to the cloud and runs a small set of device actions: taking a photo and driving the LED and buzzer alarm.
- Spiking network. In the cloud runtime, eight LIF neurons arranged 2-2-3-1 integrate the events over time. Membrane, synapse and decoder state persist between batches, so the batch size does not change the answer. Empty batches advance time; a missing batch counts as a missing observation, not as silence.
- On-demand verification. A positive decision creates an event and a capture request. A GPT-5 mini deployment on Microsoft Foundry inspects the photo and returns a structured answer: is broken glass visible, is a person visible, and how good is the image. The model output is treated as data. Deterministic rules decide whether to raise the alarm, and timeouts or malformed answers become review states, never confirmed threats.
- Cloud. The API and the SNN run on Azure Container Apps, which scale to zero outside monitoring sessions. Images, event records and vision tasks use Blob, Table and Queue Storage. A dark, English-language dashboard shows live telemetry and a visualisation of the Lu.i boards.
Scope of Work
- Dataset. A versioned, leakage-checked corpus built from VOICe, ESC-50 and DataSEC: 10,853 clips from 4,878 source groups, about 20.8 h of audio, split by source group into train, validation and test.
- Encoder. Microcontroller firmware and a Python digital twin of it that produce the same seven event channels, so the model is trained on what the device actually sends. On real audio the twin matches the firmware on about 95% of spikes.
- SNN training and topology search. A genetic search over hardware-constrained topologies, quantisation-aware training and a frozen champion exported with a versioned model-package contract.
- Event-level evaluation. Clip recall and false alarms per hour (FA/h) of negative audio, broken down by background type (speech, animals, loud events, stationary noise). The operating point is chosen on validation and the test set is evaluated once.
- Baselines. Two Fourier front ends (an unconstrained FFT and a microcontroller-sized variant) and a conventional classifier on the same seven-channel encoder, all scored with the same metric on the same time grid.
- End-to-end demonstrator. Serial protocol, Raspberry Pi edge service with camera and alarm adapters, Azure backend with a durable vision queue, and the monitoring dashboard.
Results and Status
The results are described in our conference paper “Event-Driven Glass-Break Detection with a Hardware-Constrained Spiking Neural Network and On-Demand AI Verification”.
- 82.8% clip-level recall for the sensitivity-oriented eight-neuron network (k = 1 decision rule).
- 71.2% recall at 176.4 FA/h for a separately optimised, false-alarm-aware operating point.
- 8 of 10 unseen glass-break recordings triggered the SNN when played through a loudspeaker in the lab: one physical acoustic path, not a field benchmark.
- The SNN reads only 3 of the 7 channels (
zcr,flux,hf_lo): the topology search pruned the rest. - 209 free cycles per frame. On the ATmega328P the existing acquisition path uses 99.87% of each frame. A 6-bin Goertzel (about 18,400 cycles) or a 256-point FFT (30,700 to 102,400 cycles) cannot simply be added.
We do not claim that the SNN beats conventional processing. An unconstrained Fourier front end reached 85.3% recall at 107.4 FA/h, and the confidence intervals of the two overlap. Speech is the main source of SNN false alarms. The same-encoder conventional classifier suppresses speech much better, which shows that the event representation still carries information the network does not use yet. The SNN’s role is a small, cheap temporal gate in front of a more expressive verifier, not a standalone security classifier.
Next steps: transfer the network to physical Lu.i boards with per-board calibration, reduce speech-induced false alarms, test in real rooms, and measure the end-to-end energy of selective verification.