NEF–SPA CIRCUIT LAB

Our running example is word gating: the central buffer holds the current word while a source already offers the following word. The scalar examples below isolate one coordinate of the mechanism before we discuss read and write permissions for word content.

EXAMPLE 07 · BEFORE GATING · §2.4.1

Before gating: Different spikes. The same content.

Recorded Nengo simulation

An ordinary connection can carry a value from a source population to a recipient population without copying its spike pattern. Both populations generate their own spikes. The weights between them translate one population’s neural code into drive appropriate for the other.

Read §2.4.1 · ordinary connection and recorded spikes · PDF pages 41–42

A direct connection carries a scalar between two populationsA supplied scalar drives a source ensemble of 100 LIF neurons, connected directly to a separately tuned recipient ensemble of 100 LIF neurons. The connection requests the identity transformation and uses a 10-millisecond filter. No gate or intermediate population is present. Supplied valuex(t) Source100 LIF neurons Identity: x → xWeighted, filtered spikes Recipient100 LIF neurons Both connections: 10 ms · separate observation probes: 10 ms each

Two ordinary ensembles with different tuning properties. “Source” and “recipient” name their roles. Neither has recurrent feedback. A relay, introduced below, is also an ordinary population given a forwarding role; it is not a special neuron type.

What stays the same?

The requested scalar: first +0.65, then −0.55, then +0.35. This is a simple functional content, not yet a word. It can help us understand transmission of the coordinates of a word pointer later.

What can be different?

The active neurons, their firing rates and spike times. A suitable readout of each population nevertheless recovers approximately the same value. Neuron numbers are local labels; source neuron 1 need not correspond to recipient neuron 1.

— / 2.400 s

Loading the recorded simulation…

Inspect:

Replay of saved Nengo activity. The controls change the viewing time, not the circuit or its inputs.

AT THE CURRENT CURSORLoading…

Source—One neural pattern
Recipient—A different neural pattern

Dots show the same first 20 cells as the rasters. A dot remains lit for 25 ms after a saved spike; its brightness is not membrane voltage. The numbers are decoded from all 100 cells per population.

SourceRecipientSupplied scalar (dashed)
A Content carried by both populations10-ms observation filters
B Source spikesCells 1–20 of 100
C Recipient spikesCells 1–20 of 100

All panels share a time axis. Readouts and spikes are revealed up to the cursor. Both readouts fluctuate; the recipient follows with additional filtering and neuronal dynamics. No artificial noise was added.

Content is not a spike count

During 0.30–0.70 s, the source emits 1,588 spikes and the recipient 1,799, counting all 100 cells in each. Their mean readouts are +0.643 and +0.644. Which neurons fire, and with which decoding weights, matters.

A negative scalar is also carried by ordinary spikes. It is not a negative firing rate or an instruction to inhibit the recipient.

Saved values at —
ObservationValue

Approximate agreement after settling

Means in three fixed windows of this single recording
Window (s)SuppliedSourceRecipient
0.30–0.70+0.650+0.643+0.644
1.00–1.50−0.550−0.549−0.555
1.80–2.30+0.350+0.354+0.353

The identity operation preserves the intended content approximately. It does not promise identical moment-by-moment readouts or spike trains. These are observations of one small circuit, not an assessment of the complete speech model.

Where decoding, encoding and synaptic weights meet
  1. Source code: the source’s tuning properties determine how its neurons represent the scalar. Fitted decoding weights describe a useful readout of that activity.
  2. Connection weights: source decoding, the requested transformation, and the recipient’s encoders and gains together determine the effective synaptic weights. The recipient receives the weighted, filtered effects of source spikes.
  3. Recipient code: its own tuning and membrane dynamics produce new spikes. Its readout uses weights appropriate to this second population.

There is no extra decoding population followed by an encoding population between these two ensembles. Nengo can compute the connection efficiently in factored form; the equivalent neuron-to-neuron matrix here is 100 × 100. Its values are not an identity matrix. transform=1.0 specifies identity in the represented scalar space.

Different coding depends on tuning properties and neural states as well as the synaptic weights. This example fixes the connection weights before the run; it does not learn them through experience during playback.

For word pointers, two buffers can carry the same item in the same coordinate system using different neural patterns. A concept-to-phonological mapping between different vocabularies additionally needs the lexical association described in Chapter 2.2; an identity connection alone does not provide that mapping.

How this example was recorded

One 2.4-second simulation with Nengo 4.1.0 and NumPy 2.5.4. Network seed 241; source seed 2411; recipient seed 2412. Each ensemble has 100 LIF neurons, radius 1, maximum rates drawn uniformly from 80–160 Hz, and otherwise default tuning distributions. Membrane time constant: 20 ms; refractory period: 2 ms.

The scalar is zero until 0.10 s, +0.65 until 0.80 s, −0.55 until 1.60 s, then +0.35. Both connections and both decoded probes use 10-ms low-pass filters. Integration and recording use 1-ms steps. All 200 neurons are saved. No recurrence, gate or learning rule is included.

The NPZ file also retains encoders, gains, biases, connection decoding weights and the effective neuron-to-neuron matrix. The browser replays all 2,400 original samples and saved spike events. The static figure, script and checks can be downloaded below.

Full recording and weights (NPZ) · Browser recording (JSON) · Settings and checks · Static figure

The Nengo connection in a few lines

Inside a Nengo network, these lines create two populations with independently drawn tuning properties and request transmission of the same scalar. The downloadable script includes the supplied stimulus, exact neuron settings, probes, saved data, checks and figure generation.

source = nengo.Ensemble(100, dimensions=1, seed=2411)
recipient = nengo.Ensemble(100, dimensions=1, seed=2412)

nengo.Connection(source, recipient,
                 transform=1.0, synapse=0.01)

source_readout = nengo.Probe(source, synapse=0.01)
recipient_readout = nengo.Probe(recipient, synapse=0.01)
source_spikes = nengo.Probe(source.neurons)
recipient_spikes = nengo.Probe(recipient.neurons)

transform=1.0 is the identity operation. Replacing it with transform=0.5 would request multiplication by a fixed factor: +0.65 should become approximately +0.325 after settling. That variant is not the recording above. Multiplying two changing signals needs a different circuit; a fixed transform is not a gate that opens and closes during a run.

Complete reproducible Python example (ZIP) · Read the full source

Background: Nengo’s communication channel and connections in depth.

Now that ordinary transmission is visible, add a control population and watch the pathway close and reopen.

READING GUIDE · CHAPTERS 2.4–2.7

Control, temporal dynamics and structured meaning

The teaching script now introduces these foundations in four separate sections. They answer different questions and can work together in one neural model.

SectionQuestionWhat it introduces
2.4 · Neural gatingMay this pathway influence its recipient now?Local relays, inhibition, read/write permissions and gating a complete word pointer.
2.5 · Neural action selection and routingWhich operation or route should be enabled?The red-cup task, cortical candidate memory, action utilities and selection through the basal ganglia and thalamus.
2.6 · Oscillators and gesturesHow does an enabled process develop over time?Oscillators, ramp integrators and gesture activation, followed by phase decoding and the roles of gates.
2.7 · Binding and structured meaningWhich property belongs to which object, and who fills which role?Binding, bundling, unbinding and cleanup; red car / green ball; event roles; a recorded spiking circuit in the PDF.

Which clue should the speaker give next? In Example 09, the speaker can name an object’s kind, name its colour or finish. An acknowledged clue changes which objects remain possible for the listener. The next selection uses that updated memory. Example 10 uses one shared conceptual vocabulary for describing an object and asking about its colour. The routing companion shows how a selected action can also open a word pathway.

Temporal dynamics have their own foundation. The script first explains a cycle and a ramp, then asks how gates control their start and influence. It distinguishes an ideal integrator, which holds its accumulated state when its input ends, from the archived gesture ramps, whose bounded, attenuated feedback allows activation to decay.

From the whole system to its neural circuits. Introduction 1.2 · Neural Modeling: Micro- and Macrostructures · PDF pages 8–10 connects the Common Model of Cognition with the reusable circuits below and explains their biological interpretation.

New in the teaching script: binding. Read Chapter 2.7 · PDF pages 86–94 for the two colour assignments, participant roles, circuit diagrams, Nengo code and recorded neural activity. Download the source, saved recording and figures. The scene example is a local circuit demonstration; the sentence structures explain a possible extension of the production pathways.

Chapter 3 applies these foundations to the concept-to-phonological-form pathway; Chapter 4 applies them to syllables and articulation. The recorded examples below retain their existing circuits and data.