Research analysis · Real-time inference

Clock-driven spiking networks, and the window a culture never closes

An extension to hls4ml, the toolchain particle physics uses to compile neural networks into FPGA firmware, now accepts spiking neural networks trained in PyTorch and emits synchronous, clock-driven implementations. The demonstration classifies spiking audio with a quoted 33.6 microsecond full-window compute latency and 96 percent quantized validation accuracy. For instrumentation that must close a loop around living tissue on an FPGA it already owns, this is a genuinely useful workflow. It is also a study in how three numbers, a latency, an efficiency, and an accuracy, each mean less than they appear to once the deployment is a continuous biological stream rather than a benchmark of pre-cut sequences.

Source: Spiking Neural Network inference on FPGAs with hls4ml, arXiv (cs.NE), 2026-06-08. Primary source. Read in full (arXiv HTML of v1, including all results tables).

What the work claims

This is a method and tooling paper by a single author at Ulster University's Intelligent Systems Research Centre, and it should be weighed as engineering: the contribution is a working compilation path, validated end to end, not a scientific finding about spiking computation.1 The claim is that spiking neural networks, whose neurons carry a membrane state that persists across timesteps and emit binary spikes when it crosses a threshold, can now ride the standard hls4ml workflow2 from PyTorch, via the snnTorch training frontend, through high-level synthesis to Vivado/Vitis FPGA firmware, with quantization-aware training, C simulation, and synthesis reports along the way.

The demonstration trains a small dense network, 70 inputs, 64 leaky integrate-and-fire neurons, 20 outputs, on the Spiking Heidelberg Digits benchmark: spoken digits in English and German, converted to spike trains by a cochlea-inspired model, binned at 10 milliseconds into 140-timestep windows. Quantized to 10 total bits of fixed point, accuracy saturates: about 95.5 percent validation, 74 percent on held-out speakers, with the generated design agreeing with its quantized software reference, in C simulation, at 98.9 percent. On a Zynq UltraScale+ part, the design costs 15 clock cycles per timestep at a 16 nanosecond target clock, from which the paper computes a full-window inference latency of 33.6 microseconds.

How it works

The interesting engineering is in what a stateful network forces on a stateless toolchain. hls4ml was built for feed-forward models where every call is independent. A spiking network is the opposite: each leaky integrate-and-fire neuron keeps a membrane potential that decays by a trainable factor each timestep, accumulates weighted input current, fires when it crosses a trainable threshold, and resets by subtraction. The extension implements this as static state inside the generated firmware: one call to the compiled top function advances exactly one timestep, and the membrane arrays persist across calls until an internal counter reaches the configured window length, at which point all state resets for the next sequence.

Decisions are made by a readout layer with two modes. Spike-count readout counts output-layer spikes over the window; membrane readout skips a final spiking layer and instead accumulates the dense-layer currents in a leaky per-class accumulator, deciding by argmax at the window boundary. The paper's comparison is instructive: membrane readout wins, 96.79 against 94.56 percent validation accuracy in full precision, and the author's explanation is that sparse firing at the output makes a spike count a low-resolution readout of the class evidence. Quantization-aware training with rounding and saturation matched to the fixed-point hardware brings the whole pipeline down to 10-bit arithmetic with negligible accuracy loss, and at low precision the synthesized design uses no DSP blocks at all: at 8 and 10 bits the arithmetic is implemented in the lookup-table fabric, with DSP blocks first used at 12 bits.

The workload analysis is the most honest part of the paper. Using NeuroBench metrics, the network's firing is genuinely sparse: hidden neurons are silent about 92 percent of the time. Counted honestly, the total effective work per classified event, roughly twelve thousand accumulates plus about one hundred thousand multiply-accumulates, stands against 806 thousand dense synaptic operations: sparsity buys a factor of seven or eight, matching the source's own estimate of close to an order of magnitude of potential power savings on hardware able to exploit it. The author states plainly that the clock-driven FPGA implementation captures none of this: every multiply-accumulate happens on every timestep whether or not a spike arrived. The sparsity dividend that motivates spiking hardware is measured, tabulated, and left on the table.

Where a skeptic should push

Push first on the headline latency, because it answers a different question than a closed-loop designer is asking. The 33.6 microsecond figure is 15 cycles times 140 timesteps times the 16 nanosecond clock: an honest, conservative compute latency for churning through a window whose timesteps are already queued back to back, which is exactly the situation of the toolchain's home field, trigger-level particle physics. Against a live signal binned at 10 milliseconds, the same design finishes each timestep in 240 nanoseconds, can accept a new one every 12 cycles, and then idles; the latency that matters at decision time is the 1.4 seconds of window the data must fill plus a few hundred nanoseconds of final compute. The 33.6 microsecond number is neither the added real-time cost, which is far smaller, nor the decision latency, which is over forty thousand times larger; quoted without the window duration, it invites the wrong conclusion.

Second, the accuracy gap. Validation accuracy is near 96 percent; accuracy on the predefined test set, which holds out different speakers, is 75.8 plus or minus 1.0 percent in full precision. The author is upfront that the distributions differ and that other works see the same gap, but the twenty-point drop is the single most operationally relevant number in the paper for anyone planning to train on one signal source and deploy on another.

Third, scope. One benchmark, one small dense topology, leaky integrate-and-fire neurons only, no recurrence, no convolution, and no measured on-board power: resource and latency figures come from synthesis reports, which are estimates, not bench measurements. The comparison run using hls4ml's Latency strategy produced a slower full-window figure than the Resource strategy, 52.92 against 33.6 microseconds, at well over twice the lookup-table cost; strategy, reuse factor and clock target all changed at once between those two runs, so the result proves nothing general about stateful networks, but it is a fair warning that the toolchain's optimization defaults need empirical re-tuning here rather than trust. And the fixed-window semantics carry a sharp operational edge the paper states honestly: the compiled model is stateful across calls, so a stray single-timestep call, a probe, a warm-up, a debugging invocation, silently advances the internal state and changes the next prediction.

Fixed windows against a continuous culture

The paper never mentions electrodes, biopotentials, or arrays; the transfer that follows is this analysis's own, grounded in mechanisms the paper documents. The FPGA it targets, though, is the workhorse of microelectrode array acquisition: the same part family that timestamps samples, filters channels, and drives stimulators in commercial and lab-built systems. A toolchain that compiles trained spiking models into that fabric, through the same workflow as conventional networks and with internal fixed-point arithmetic in the same 10-to-16-bit range acquisition hardware already speaks, subject to explicit scaling at the interface, is a real capability for closed-loop work: spike-pattern classifiers or trigger logic running with a synthesized worst case of 240 nanoseconds per timestep, in the box that already owns the data path, with no host round-trip. One caution on triggering: the toolchain's first-to-threshold rule identifies the class that first accumulates enough evidence, but in the current implementation the decision still emerges at the fixed window boundary; propagating it early, the shape a stimulation trigger actually needs, sits on the author's future-work list, not in the shipped semantics.

The non-obvious implication is that the hard mismatch is not latency or accuracy but window semantics. Every number in this paper is conditioned on data that arrives as pre-cut, aligned, 1.4 second sequences with a known start, and on state that resets at each boundary. A culture on an array does not emit sequences; it emits one unbounded stream with no alignment marks. Someone has to decide where windows begin, and that decision becomes part of the instrument: the same activity, windowed with a different phase, presents genuinely different membrane trajectories to the classifier. Worse, because state persists across calls, the mapping from raw stream to prediction stays a pure function of the window's data only while every call is perfectly aligned to window boundaries; any stray or misaligned invocation makes the next prediction a function of the exact call history. The paper's own warning about stray single-timestep calls is, translated to lab practice, a provenance hazard of the kind this stream has flagged before in other guises: two analyses of identical recorded data can disagree because of invisible differences in how the inference engine was stepped. A recording pipeline that logs samples but not inference-engine call boundaries cannot reproduce its own decisions.

The genuine threat is quieter: the efficiency story that justifies the word spiking evaporates in this deployment, and the paper proves it against itself. If the network is silent 92 percent of the time and the firmware computes anyway, the factor of seven or eight between effective and dense operations is paid in power for nothing. A lab that chooses a spiking model over a conventional one for a battery-powered headstage or a thermally constrained implantable front end, on the strength of neuromorphic efficiency claims, and then deploys through a clock-driven path like this one, gets conventional-network power with extra state-management complexity. On an FPGA, today, the honest reasons to choose a spiking model are temporal fit and workflow, not energy. And the twenty-point speaker gap is the sharpest available warning for cross-preparation transfer: a decoder trained on recordings from some cultures and deployed on a new one is exactly a held-out-speaker problem, and biological preparations differ at least as much as speakers do.

The opportunity, taken with those caveats, is real: a maintained, widely used toolchain now treats stateful temporal models as first-class citizens of the same compile path as ordinary networks, which means hybrid designs, a spiking front stage feeding a conventional classifier, or the reverse, can be explored inside one optimization and validation loop and dropped into existing acquisition firmware. For groups whose closed-loop ambitions have been gated on hand-written HDL for every model revision, that is the bottleneck this work actually removes.

The bottom line

As tooling, this is a credible, honestly reported contribution: the compilation path exists, its C simulation matches the quantized software reference at 98.9 percent at the 10-bit operating point and above 99.6 percent at wider precisions, and the limitations, clock-driven execution, fixed windows, one neuron type, synthesis-report numbers, are stated rather than hidden. Established: spiking networks can be trained, quantized to 10 bits, and compiled to synchronous FPGA designs with high fidelity, no DSP usage at that precision, and a lookup-table budget, around one hundred ten thousand at 10 bits, that an integrator must weigh against whatever else their acquisition FPGA carries. Not established: any energy advantage in this deployment mode, generalization beyond one small audio benchmark, or behavior on unbounded streams without window boundaries. For array instrumentation the capability is worth adopting and the three headline numbers are worth re-deriving for your own signal chain: compute the real decision latency from your window, budget power as if the model were dense, and treat cross-preparation accuracy as an open question until measured. Event-gated execution, which the author names as future work, would recover part of the sparsity dividend and change the power calculus; native variable-length streaming would dissolve the window problem. Either would materially upgrade what this toolchain offers the tissue-to-silicon stack.

Frequently asked questions

What does this hls4ml extension actually add?

Support for compiling spiking neural networks trained with snnTorch in PyTorch into synchronous FPGA firmware: stateful leaky integrate-and-fire neuron layers, a configurable readout layer with spike-count and membrane modes, fixed-window state reset, and integration with hls4ml's existing quantization and synthesis workflow.

Is the 34 microsecond latency what a deployed system would see?

Not as a decision latency. It is the per-timestep compute cost, 15 cycles at a 16 nanosecond clock, multiplied by all 140 timesteps as if they were processed back to back. In streaming use with 10 millisecond bins, the decision waits for the 1.4 second window of data; the compute adds only a few hundred nanoseconds after the final bin.

Does the FPGA implementation benefit from spiking sparsity?

No, and the paper says so. Hidden neurons are silent roughly 92 percent of the time, but the clock-driven design performs every operation on every timestep regardless, so the measured factor of seven or eight between total effective operations, roughly one hundred ten thousand including multiply-accumulates, and the 806 thousand dense synaptic operations yields no power saving in this deployment.

Why does the held-out test accuracy drop to about 75 percent?

The benchmark's test set contains speakers absent from training, so it measures generalization across signal sources, not fit. The roughly twenty-point drop from validation accuracy is consistent with other published results on this dataset, and it is the most relevant number for anyone planning to train a decoder on one preparation and deploy it on another.

Could this run a closed-loop stimulation experiment on an array today?

The compute path is plausible: deterministic scheduling with a synthesized 240 nanosecond worst case per timestep. But the current first-to-threshold rule still reports at the window boundary rather than firing early, the lookup-table budget is six figures, and windowing an unbounded biological stream, the hidden-state provenance of a model that is stateful across calls, and power budgeting all need explicit engineering before tissue is in the loop.

References

  1. Dillon BM. Spiking Neural Network inference on FPGAs with hls4ml. arXiv (cs.NE). 2026. arXiv:2606.10008v1. Accessed 2026-08-08.
  2. Duarte J, et al. Fast inference of deep neural networks in FPGAs for particle physics. Journal of Instrumentation. 2018. doi:10.1088/1748-0221/13/07/P07027. Accessed 2026-08-08.