-
Notifications
You must be signed in to change notification settings - Fork 2
4.2 Neuromodulation and Plasticity
Relevant source files
The following files were used as context for generating this wiki page:
This page documents the neuromodulation and adaptive plasticity subsystem implemented in src/router.rs. This subsystem provides domain-agnostic adaptive signal routing via a bank of neuromodulatory integrative neurons (NeuromodNeuron) influenced by global neuromodulator levels (NeuromodState). It supports use-it-or-lose-it synaptic plasticity, dopamine-gated potentiation, and lateral inhibition src/router.rs:3-16.
The routing fabric exposes modulatory control through state vectors representing primary neurotransmitter analogues: dopamine (reinforcement/potentiation), cortisol (stress/gain adjustment), and serotonin (baseline stabilization) src/router.rs:198.
Callers supply a NeuromodState instance to ChannelRouter::route_modulated to dynamically alter the effective thresholds, leak rates, and synaptic weight evolution of the internal integration layer without recreating the router instance.
graph TD
A["CallerInput"] --> B["ChannelRouter::route_modulated"]
B --> C["NeuromodState"]
C --> D["NeuromodNeuron::set_gain"]
D --> E["NeuromodNeuron::integrate"]
sub_sources["Sources"]
style sub_sources fill:none,stroke:none
Sources: src/router.rs:3-12, src/tests.rs:194-205
The core integration unit for adaptive routing is the NeuromodNeuron. Unlike general-purpose spiking neuron models (which reside in external crates), NeuromodNeuron is optimized specifically for channel selection inside ChannelRouter src/router.rs:40-46.
The membrane potential update follows a modulated leaky integration equation:
where
-
NeuromodNeuron: Maintains state variables including membrane potentialv, resting potentialv_rest, reset potentialv_reset,leak,threshold,gain, and inputweightssrc/router.rs:50-71. -
NeuromodNeuron::integrate: Applies incoming stimulus scaled by the current gain and subtracts the passive leak src/router.rs:93-101. -
NeuromodNeuron::check_fire: Evaluates whether$V \ge \text{threshold}$ , returning the peak membrane potential and resetting$V$ tov_resetupon a spike src/router.rs:103-113.
graph TD
N["NeuromodNeuron"] --> I["NeuromodNeuron::integrate"]
I --> CF["NeuromodNeuron::check_fire"]
CF -->|Spike| R["ResetToVReset"]
CF -->|No Spike| LD["LastSpikeFalse"]
sub_sources["Sources"]
style sub_sources fill:none,stroke:none
Sources: src/router.rs:40-119
The router implements use-it-or-lose-it plasticity where active channels undergo dopamine-gated potentiation, while idle channels decay toward their baseline weights over successive routing cycles src/router.rs:8-10.
Synaptic weights are adjusted dynamically via feedback calls (ChannelRouter::apply_feedback), allowing external reinforcement signals to directly strengthen or weaken active pathways:
- Positive Feedback: Increases the synaptic weight matrix entry, promoting channel selection src/tests.rs:47-53.
- Negative Feedback: Decreases the weight matrix entry, enforcing lateral inhibition or depression src/tests.rs:56-62.
-
Global Gain Modulation: Adjusting global gain via
ChannelRouter::set_global_gaincan globally inhibit firing if modulated downward src/tests.rs:65-73.
Sources: src/router.rs:173-178, src/tests.rs:47-73
- 1. Overview
- 1.1. Getting Started & Public API
- 1.2. Release History and Versioning
- 2. Core Runtime: SynapticMesh
- 2.1. Propagation APIs and Tick Semantics
- 2.2. Spike Delay Buffer (Ring Buffer)
- 2.3. Core Types and Error Model
- 2.4. Checkpointing and Serde State Restoration
- 3. Topology Subsystem
- 3.1. SynapticGraph and CSR Representation
- 3.2. Topology Generators
- 3.3. Wiring Rules, Dale's Law and Delay Assignment
- 3.4. Topology Digest
- 4. Sparse Maps and Channel Routing
- 4.1. ChannelRouter and RouterConfig
- 4.2. Neuromodulation and Plasticity
- 4.3. SparseSynapticMap (CSR)
- 5. Testing, Benchmarks and Quality Gates
- 5.1. Propagation Contract Tests
- 5.2. Checkpoint Resume Property Suite
- 5.3. Benchmarks and Unit Test Module
- 6. Build, CI and Project Tooling
- 6.1. Cargo Manifest, Profiles and Dependencies
- 6.2. CI Workflows and Packaging Validation
- 6.3. Code Quality, Licensing and Review Gates
- 7. Glossary