Neuromorphic encoding

From analogue signal to spikes: delta encoding

Encode a noisy sinusoid into spike events with a delta modulator, measure the reconstruction error, and end at the real sealed measurement of the production kernel.

intermediate ≈ 15 min

read

The model

Neuromorphic systems do not sample a signal on a clock — they emit events when something changes. The delta modulator is the simplest such encoder: a reference value tracks the input, and whenever the input rises more than δ above the reference an UP spike fires and the reference steps up by δ; symmetrically a DOWN spike steps it down. The spike train IS the signal, and replaying the steps reconstructs it.

read

The trade-off to feel

δ sets the contract: a small δ spends many spikes to track the signal closely (low reconstruction error, high event rate); a large δ is frugal but coarse. Noise adds spurious crossings — watch the spike rate rise with the noise slider while the reconstruction barely improves. That trade-off between event rate and fidelity is the daily bread of ADC-to-spike front-ends.

read

The claim boundary

The input is a clean three-cycle sinusoid plus Gaussian noise from a fixed-seed PRNG, so every run with the same parameters replays identically. The reconstruction error is measured against the clean sinusoid — the model knows its own ground truth, which is precisely what makes it a bounded educational model and not a measurement.

run

Run the encoder

Run with the defaults, then halve δ and run again: the RMSE drops and the spike count roughly doubles. Then raise the noise and watch the event rate pay for it. The sparkline shows the reconstructed reference stepping along the hidden sinusoid.

2,000
0.10
0.05
verify

Inspect the evidence, then meet the real kernel

The bundle records the spike counts, event rate, and reconstruction RMSE with the exact parameters that produced them, admitted only as a bounded model. The production counterpart is sc-neurocore's adc_to_spike kernel — measured for real across five language backends, sealed, and recorded in the transparency log. The table below is that measurement, loaded from the shipped databank itself.

The real, sealed measurement

The browser model above is a bounded educational kernel. The production kernel is measured for real: adc_to_spike_kernel in the sc-neurocore 3.15.35 benchmark databank, sealed and recorded in the transparency log.

Metric rustmojojuliagopython
median_call_ms (ms) 1.177833 0.947479 1.758218 5.692024 618.964942
samples_per_s (samples/s) 445129336.9 553350498.1 298192841.5 92109238.9 847039.9

Open the full benchmark databank →

In context

Part of these topics.

The research topics this lesson sits inside — the science, the studios, and the literature.