ROUTING COMPANION · §2.5.12 AND APPENDIX A.6
Selecting the naming or repetition pathway
Imagine seeing a cup while hearing someone say Kanne. “Name what you see” calls for TASSE; “repeat what you hear” calls for KANNE. Both word forms can be available at once. Here, a changing task cue determines which source may influence a shared candidate buffer.
This companion illustrates the selected word route discussed in §2.5.12. It starts at the point where the two word forms are already available: their identities and the task cues are supplied inputs. The simulated part is the neural selection and transmission circuit. Recognizing a picture or sound, retrieving a word, and articulating it are outside this example.
Read §2.5.12 · selection and word routing · Reproduce the routing companion · pp. 143–144 · Nengo code · Recording details
Ellipses denote neural populations or buffer ensembles; the rounded boxes group the basal-ganglia and thalamic action populations. Lines ending in a bar indicate an inhibitory effect. Each route has its own blocking population and its own content relay. The word vectors travel through the lower paths, not through the basal ganglia. Supplied input Nodes and observation probes are omitted from this overview.
Action selection chooses
The task buffer generates a utility for naming and a utility for repetition. A third action, waiting, has a fixed baseline utility of 0.5. With the IDLE cue, neither word-routing action is sufficiently supported, so waiting wins. These utilities are control values, not word contents.
Local gates implement the choice
The selected basal-ganglia output becomes less inhibitory. Its thalamic action population becomes active and suppresses that route’s blocker. With blocking reduced, the channel neurons can respond to their source. A high blocker signal closes a route; high thalamic action activity helps open it.
Loading the recorded simulation…
Playback of saved neural activity. These buttons move the viewing cursor; they do not change the task sequence or run a new simulation.
Dots show the same 12 consecutive cells per population as the rasters below. Each stays lit for 25 ms after a recorded spike. Brightness is not membrane voltage. The blocker readouts use all 40 neurons per blocker; the channel samples are the first 12 of 30 cells in each first subensemble, not the complete vector representation.
| Buffer | TASSE | KANNE |
|---|
All panels share the same time axis. Task changes occur at 0.7, 1.4 and 2.1 s; the shaded interval is the supplied IDLE cue. Continuous curves are decoded signals with 10-ms observation filters. Raster marks are original spike events. The task cue changes first; neural selection, gating and the candidate readout then settle over time.
Follow one selection through the circuit
- Task: NAME supports the naming action. In panel A, its utility is highest.
- Selection: the naming channel of the basal-ganglia output becomes less inhibitory (B), allowing naming activity in the thalamus (C).
- Gate: that thalamic activity suppresses the naming blocker. Its sampled spikes disappear (D). The repetition blocker remains active.
- Content: naming-channel neurons can now respond to TASSE (E), and the candidate buffer develops a pattern whose readout matches TASSE (F).
The same chain switches to the heard-form route under REPEAT. The source buffers remain available, as the content table shows. The gate controls which source influences the candidate; it does not delete the unselected source.
What does waiting do?
The wait action has no content-transmission effect. Both blockers stay active, and both word routes are suppressed. The candidate has feedback=0, so its previous activation decays when input ends. This is not an explicit clear command and not a protected recurrent word register. Writing, holding and clearing a recurrent register require the additional circuitry described in §2.4.5 and Chapter 3.
What the saved readouts show
| Task and window (s) | TASSE | KANNE | Enabled route |
|---|---|---|---|
| NAME · 0.35–0.60 | 0.913 | −0.224 | Naming |
| REPEAT · 1.05–1.30 | −0.185 | 0.910 | Repetition |
| IDLE · 1.75–2.00 | −0.002 | −0.003 | Neither |
| NAME · 2.45–2.70 | 0.913 | −0.224 | Naming |
The two word pointers in this small vocabulary have a dot product of −0.211. A negative nonmatching trace therefore does not mean negative firing, a semantic opposition between the words, or failed selection. The values are weighted population readouts, not probabilities. The vocabulary here identifies word forms; it does not model their conceptual similarity.
The Nengo selection circuit in a few lines
The task schedule is NAME for 0–0.7 s, REPEAT for 0.7–1.4 s, IDLE for 1.4–2.1 s, and NAME for 2.1–2.8 s. The function supplied to spa.Transcode is:
def task(t):
return "NAME" if t < .7 or t >= 2.1 else (
"REPEAT" if t < 1.4 else "IDLE")
The following is the network construction from the recorded script, with indentation adjusted for display. It requires import numpy as np, import nengo and import nengo_spa as spa.
control_vocab = spa.Vocabulary(32, pointer_gen=np.random.RandomState(251))
control_vocab.populate("NAME; REPEAT; IDLE")
word_vocab = spa.Vocabulary(32, pointer_gen=np.random.RandomState(252))
word_vocab.populate("TASSE; KANNE")
with spa.Network(seed=250, label="Task-dependent word routing") as model:
model.config[spa.State].neurons_per_dimension = 30
model.config[spa.State].feedback = 0
control = spa.State(vocab=control_vocab, label="Task cue")
lexical = spa.State(vocab=word_vocab, label="Naming path")
heard = spa.State(vocab=word_vocab, label="Repetition path")
candidate = spa.State(vocab=word_vocab, label="Candidate")
spa.Transcode(task, output_vocab=control_vocab) >> control
spa.Transcode("TASSE", output_vocab=word_vocab) >> lexical
spa.Transcode("KANNE", output_vocab=word_vocab) >> heard
with spa.ActionSelection() as actions:
spa.ifmax("name", spa.dot(control, spa.sym.NAME),
lexical >> candidate)
spa.ifmax("repeat", spa.dot(control, spa.sym.REPEAT),
heard >> candidate)
spa.ifmax("wait", 0.5)
spa.State creates neural buffer ensembles. spa.Transcode supplies externally specified vectors through Nodes; these input generators are not spiking populations. The task and word vocabularies are distinct. All four states have zero recurrent feedback.
spa.dot(control, spa.sym.NAME) specifies a scalar task-match signal. Within spa.ActionSelection, each spa.ifmax defines a utility and its possible routing effect. NengoSPA constructs the basal-ganglia, thalamic action, blocking and content-channel populations. The call does not execute a Python “winner” test at every simulated time step. The effect lexical >> candidate is conditional here because it is inside that action-selection context. By itself, outside this context, the same routing notation describes an unconditional connection.
The three rules specify enduring condition–effect relations for this demonstration. They are not learned during the run. This isolated teaching circuit does not imply that the existing Concept-to-Articulation model implements its local gates with basal ganglia.
Read the complete executed Python source · Download source, saved neural arrays and checks (ZIP)
Background: the official NengoSPA ActionSelection documentation explains the utility-and-effect construction; the NengoSPA introduction illustrates conditional routing. The versions used for this recording are specified below.
How this example was recorded
This replays the existing recording underlying the manuscript example: 2.8 seconds, 7,490 LIF neurons, Nengo 4.1.0 and NengoSPA 2.0.0. Network seed: 250; task and word vocabulary seeds: 251 and 252. The four buffers use 32-dimensional vectors and 30 neurons per dimension. Each route has a 40-neuron blocking population and a 960-neuron content channel. The remaining neurons implement basal-ganglia and thalamic action populations.
The two content-channel rasters each show cells 1–12 of the first 30-neuron subensemble. The two blocker rasters show cells 1–12 of each 40-neuron population. Consecutive cells were chosen independently of observed firing rates. The complete NPZ archive also contains all recorded GPi and thalamic-action spikes, the first 480 of 960 neurons in each content channel, all 40 neurons in each blocker, decoded states and reference vectors. It does not record every neuron in every buffer.
Integration and recording use 1-ms steps. The browser preserves all 2,800 samples and the selected cells’ original spike events; no synthetic spikes, interpolation of neural activity, or artificial noise are added. Display dots persist for 25 ms solely to make individual events visible. Decoded probes have 10-ms low-pass filters; these observation filters should not be confused with the model’s connection filters.
The blocking populations receive a constant drive from a bias Node. Thalamic action activity counteracts that drive through an inhibitory connection to its blocker. This constant input, the externally scheduled task cues and the fixed waiting utility are modeling inputs, not additional simulated spiking sources. The overview diagram omits them to keep the two paths visible; the archived source and NengoSPA construction specify them.
The archive was generated with SciPy absent, so the installed basal-ganglia implementation used the global default LstsqL2 decoder solver. The inhibitory roles in the explanatory diagram describe effective population connections; this example does not establish neuron-by-neuron biological sign constraints. The exact executed source, file hashes, settings and checks are retained in the download.
The existing checks confirm the expected dominant thalamic action in each settled window, sustained availability of both sources, passage of the selected identity, blocking of the unselected route and suppression of both routes while waiting. These are local circuit observations, not a performance study of the complete speech model. This website addition converts the saved arrays for playback; it does not rerun the neural simulation.
Browser recording, settings and checks (JSON) · Saved arrays and reproducible source (ZIP) · Static six-panel figure · Reproduction notes · PDF Appendix A.6
The next foundation, §2.6 · Oscillators and gestures, asks how an enabled process unfolds over time. Open Example 11 to follow the two gesture ramps.