The Brainstem
In the past two weeks, I’ve focused on the implementation of the A1 primary auditory cortex and the early brainstem where the spike trains from the auditory nerve arrive.
Development Activity - https://github.com/akhil-reddy/beads/graphs/commit-activity
Building the brainstem components - https://github.com/akhil-reddy/beads/blob/main/beads/core/eru/hub/audio/early_brainstem.py
Building the auditory cortex components - https://github.com/akhil-reddy/beads/blob/main/beads/core/eru/hub/audio/a1_cortex.py
Please note that some code (class templates, function comments, etc) is AI generated, so that I spend more of my productive time thinking and designing. However, I cross-verify each block of generated code with its corresponding design choice before moving ahead.
Algorithms / Development
Building the Environmental Response System (ERS)
Bushy cell implementation v1- Initialize biologically-accurate cell constants (such as resting membrane potential, spike current, refractory period, etc)
- For each channel / tonotopy frequency “hole”
- For each spike in spike train
- If spike exists, advance membrane potential by dt given synaptic input current I_syn
- If voltage crosses threshold, signal
- For each spike in spike train
- Initialize a different set of biologically-accurate cell constants (such as resting membrane potential, spike current, refractory period, etc)
- For each channel / tonotopy frequency “hole”
- For each spike in spike train
- If spike exists, advance membrane potential by dt given synaptic input current I_syn
- If voltage crosses threshold, signal
- For each spike in spike train
- Initialize a different set of biologically-accurate cell constants (such as resting membrane potential, spike current, refractory period, etc)
- For each channel / tonotopy frequency “hole”
- For each spike in spike train
- If spike exists, advance membrane potential by dt given synaptic input current I_syn
- If voltage crosses threshold, signal
- For each spike in spike train
- Note: These cells are helpful only if the audio CMU is binaural i.e., if two cochlear units are built, one for each ear
- For a predetermined set of delays, match the spikes between right and left ear
- If spikes cross a threshold at any given delay (for example, if right is 100 microseconds slower than the left, then t-d of right will coincide with t of left, and d is determined as 100 microseconds), record the delay and timestamp
- Feed this info into the efferent feedback
- Note: These cells are helpful only if the audio CMU is binaural i.e., if two cochlear units are built, one for each ear
- Compare the spike pattern between both ears
- At any given point in time, if a spike is recorded in one ear and not in the other, record the timestamp
- Feed this info into the efferent feedback
- Define the STRF (spectro temporal receptive field) i.e., a 2D array for each neuron with different spectrotemporal affinities. These group of neurons contribute to population coding
- (Placeholder logic) Define the dynamics of a biological neuron synapse (now that we've “entered” the brain)
- (Placeholder logic) Define the mechanics of when a neuron should fire spikes (based on accumulating membrane potential)
Next Steps
Building the Environmental Response System (ERS)
- Building the visual cortex
- Building the ERUs
- Neurotransmitters - Fed by vision’s bipolar and amacrine cells, for example, to act on contrasting and/or temporal stimulus. Neurotransmitters (and their lifecycles) can be added later during ERU development
Deployment
- Overlaying video frames onto the retina, including code optimization for channel processing
- Overlaying audio clips onto the cochlea, including optimization for wave segment processing
- Parallelization / streaming of cellular events via Flink or equivalent
The (Early) Brainstem
When (tonotopically arranged) stimulus arrives at the brainstem - the portion of the brain that houses the thalamus and medulla oblongata, for example - it adds context to each channel as follows
- Bushy cells - These cells (with a low voltage threshold and refractory period) examine the auditory nerve volleys to detect coincidences, and precisely signal when spike trains arrive
- Octopus cells - These cells examine the channel for a sharp increase in stimulus (or a high voltage change), signaling the beginning of any sound at that frequency, simple or complex
- Chopper cells - These cells examine the waveform for periodicity i.e., when in a given frequency channel, if the synaptic current is sustained, the implication is that the said frequency keeps repeating in the sound waveform
Additionally, the brainstem also feeds back into the cochlea through efferent fibers (for context, these fibers are used by the outer hair cells to modulate their prestin gain / elasticity) after measuring the binaural differences in energy. This explicit mechanism, much like the neurotransmitters in the retina, sharply contrasts with the implicit (and slow) backprop feedback mechanisms of current AI systems.