NEF–SPA CIRCUIT LAB

EXAMPLE 02 · §2.1.4 · COMPLEX FUNCTIONAL CONTENT

Watching similar concepts in spiking populations

Recorded Nengo simulation

The same principle now extends to a concept buffer. It receives Tasse (cup), Kanne (jug), and Hund (dog) in succession. Each item is described by 64 coordinates, jointly carried by 3,200 spiking neurons. The German labels name concepts here, rather than their phonological forms.

Read §2.1.4 in the teaching script →

01 · SUPPLIED CONTENT—Loading input…
02 · ONE SPA BUFFER64 ensembles × 50 neuronsone coordinate per ensemble
03 · DECODED OBSERVATIONCompare with reference vectorsreadout from all 64 populations
ENSEMBLE 1Coordinate 1: —
ENSEMBLE 22Coordinate 22: —
ENSEMBLE 43Coordinate 43: —

Three fixed populations are shown throughout, as in the manuscript. Each contributes to every concept; none is a dedicated “cup neuron” or “dog ensemble”. Dots light for 25 ms after a recorded spike. Numbers are decoded coordinate values.

— / 2.200 s

Loading the recorded concept buffer…

Inspect:
A Supplied conceptual contentBlank intervals: zero input vector
B Ensemble 1All 50 neurons · coordinate 1
C Ensemble 22All 50 neurons · coordinate 22
D Ensemble 43All 50 neurons · coordinate 43
E Similarity to concept referencesComputed from all 3,200 neurons
Tasse · cupKanne · jugStuhl · chairHund · dogKatze · cat

All panels use the same time axis and reveal data up to the playback cursor. Similarities use the complete decoded 64-dimensional state, including the 61 populations whose spikes are not drawn here.

AT THE CURRENT CURSOR

One input, several similarities

Choose Tasse, Kanne or Hund above to compare the readout with the supplied concept.

The target column compares the current input vector with each reference. The neural readout follows with filtering and small fluctuations. These are dot products, not probabilities. Decoded vectors can vary in length, so scores may be slightly negative or exceed one.

Similarity at —
Reference conceptNeural readoutInput target

HOW TO READ THIS EXAMPLE

01

Related content shares structure

The cup and jug reference vectors share conceptual features and have a dot product of 0.80. Cup and chair share less (0.25); cup and dog much less (0.05). These relationships were chosen for this teaching vocabulary.

02

A neighbour also scores highly

During the cup input, the readout is similar to the jug reference too. This score reflects shared components. It does not by itself establish that two independent items were selected. Dog and cat show the same relationship.

03

Activity follows the input

This buffer has feedback=0. When input disappears, decoded similarities return towards zero after the filtering delay. Neurons can continue spiking even when the represented coordinates are near zero. Recurrent maintenance comes later in the script.

How this example was recorded

This is the original Nengo simulation behind §2.1.4. The browser replays saved input, spikes, decoded coordinates and similarity scores. Changing playback speed changes only how quickly the recording is displayed.

Content and vocabulary
10 concept reference vectors · 64 dimensions
Neural population
64 ensembles · 50 LIF neurons each · 3,200 total
Buffer configuration
subdimensions=1, feedback=0, represent_cc_identity=False
Ensemble parameters
Radius 0.5 · intercepts uniform in [−1, 1] · evaluation points uniform in [−0.5, 0.5]
Connections and readout
Input synapse: none · output probe low-pass: 10 ms
Maximum firing rates
Sampled uniformly from 80 to 160 Hz
Recording
2.2 s · 1 ms steps · 2,200 samples · 201,246 spikes across all populations
Software and seeds
Nengo 4.1.0 · NengoSPA 2.0.0 · NumPy 2.5.4 · network seed 207 · vocabulary seed 206

The scheduled inputs are Tasse from 0.10 to 0.65 s, Kanne from 0.80 to 1.35 s, and Hund from 1.50 to 2.05 s; each onset is included and each offset is excluded. The recording includes every spike in all 64 ensembles. Three fixed coordinate populations (1, 22 and 43) are displayed, matching the manuscript. No artificial noise was added.

Reference vectors combine a shared component, a broad domain, a category, a subgroup and an individual component, then rotate them into a distributed coordinate system. Their chosen relationships illustrate similarity; they are not measurements of human judgements.

Download the complete recorded data (JSON, 4.7 MB) · Download the complete Nengo example (Python)

The Nengo circuit in a few lines

vocab contains the 64-dimensional reference vectors. offer(t) supplies one vector at a time, with zero input between episodes. The buffer is built as follows; the downloadable script also includes the vocabulary construction and all probes.

with nengo.Network(seed=207) as model:
    stimulus = nengo.Node(offer, size_out=64)
    state = spa.State(
        vocab, subdimensions=1, neurons_per_dimension=50,
        feedback=0, represent_cc_identity=False)

    for ensemble in state.state_ensembles.ensembles:
        ensemble.neuron_type = nengo.LIF()
        ensemble.radius = 0.5
        ensemble.max_rates = nengo.dists.Uniform(80, 160)
        ensemble.intercepts = nengo.dists.Uniform(-1, 1)
        ensemble.eval_points = nengo.dists.Uniform(-0.5, 0.5)

    nengo.Connection(stimulus, state.input, synapse=None)
    readout = nengo.Probe(state.output, synapse=0.010)
    spike_probes = [nengo.Probe(e.neurons)
                    for e in state.state_ensembles.ensembles]

with nengo.Simulator(model, dt=0.001) as sim:
    sim.run(2.2)
    # Compare with unit reference vectors (one per row).
    similarities = sim.data[readout] @ vectors.T

subdimensions=1 assigns one coordinate to each ensemble. The full vector describes one item across the buffer. The plotted similarity calculation is an observation of the decoded neural activity; it is not an additional action-selection circuit.