Skip to content

4.2 Neuromodulation and Plasticity

Raul Cardenas Montoya edited this page Sep 19, 2026 · 1 revision

Neuromodulation and Plasticity

Relevant source files

The following files were used as context for generating this wiki page:

Purpose and Scope

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.


1. NeuromodState and Modulator Dynamics

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
Loading

Sources: src/router.rs:3-12, src/tests.rs:194-205


2. Effective Thresholds, Leaks, and NeuromodNeuron Dynamics

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:

$$V_{t+1} = V_t + (G \cdot I_{syn}) - \lambda(V_t - V_{rest})$$

where $G$ is the modulation gain and $\lambda$ is the passive leak rate src/router.rs:48-50.

Struct Definition and Methods

  • NeuromodNeuron: Maintains state variables including membrane potential v, resting potential v_rest, reset potential v_reset, leak, threshold, gain, and input weights src/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$ to v_reset upon 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
Loading

Sources: src/router.rs:40-119


3. Use-It-or-Lose-It Plasticity and Feedback

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.

Feedback Application

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_gain can globally inhibit firing if modulated downward src/tests.rs:65-73.

Sources: src/router.rs:173-178, src/tests.rs:47-73

Clone this wiki locally