NEF–SPA CIRCUIT LAB

EXAMPLE 01 · §2.1.1 · ONE DIMENSION

Watching one value become neural activity

Recorded Nengo simulation

A gently changing sound-level envelope drives 50 spiking neurons. Their weighted, filtered activity recovers the level approximately. After 1.0 s, the input stays constant — but the neural readout still fluctuates.

Read §2.1.1 in the teaching script →

01 · INPUTSound level—normalized envelope
02 · NEURAL ENCODING50 LIF neuronsdots light for 25 ms after a spike
03 · DECODINGWeighted readout—10 ms low-pass filter
— / 1.600 s

Loading the recorded simulation…

A Input signalOne value, changing over time
B Neural activation patternEach mark is one recorded spike · all 50 neurons
C Decoded valueReadout Input

All three panels share the same time axis. Playback reveals the recorded samples up to the cursor. The pale band marks the interval enlarged below.

LOOK CLOSER · 1.20–1.55 s

Constant input.
Fluctuating readout.

The input is 0.52 throughout this interval. The readout fluctuates because a small population of spiking neurons provides a finite, filtered approximation.

Complete interval shown here, independently of the playback cursor. No artificial noise has been added.

Readout Input

HOW TO READ THIS EXAMPLE

01

Functional content

The content is a sound level: a simple property that can change over time. This normalized envelope is not an acoustic waveform or a decibel scale.

02

Neural activation pattern

The level changes the activity of the ensemble. Neurons have different response properties. A spike belongs to one neuron; the pattern across the population carries the value.

03

Mathematical description

A scalar describes the content numerically. Nengo fits decoding weights so filtered, weighted spikes approximate that value. The readout is an observation of the neural activity.

How this example was recorded

This is the original simulation used for §2.1.1 of the teaching script. Playback changes viewing speed only; it does not rerun Nengo or change the model.

Population
50 leaky integrate-and-fire (LIF) neurons
Represented state
1 dimension · radius 1.0 · no recurrent connection
Input connection
No synaptic filter
Readout connection
10 ms low-pass synapse
Sampling
1 ms · 1,600 samples · 2,700 spikes
Simulation
Nengo 4.1.0 · NumPy 2.5.4 · seed 105
Maximum firing rates
Sampled uniformly from 80 to 160 Hz

The first input sample is at 1 ms. Decoded activity starts near zero and builds up through the synaptic filter. The animated dots retain a 25 ms visual highlight so individual spikes are visible; they do not display membrane voltage.

Download the recorded data (JSON) · Download the Nengo example (Python)

The Nengo circuit in a few lines

level(t) supplies the input envelope. An Ensemble encodes it, and a Connection decodes and filters the spikes. The two Node objects are an external input and a readout, not extra neural populations.

with nengo.Network(seed=105) as model:
    stimulus = nengo.Node(level)
    neurons = nengo.Ensemble(
        50, dimensions=1, radius=1.0,
        neuron_type=nengo.LIF(),
        max_rates=nengo.dists.Uniform(80, 160))
    nengo.Connection(stimulus, neurons, synapse=None)
    readout = nengo.Node(size_in=1)
    nengo.Connection(neurons, readout, synapse=0.010)

The downloadable example includes the input function, probes and simulation run. This small NEF example introduces representation before the script moves on to SPA buffers and complex content.