pub struct DeltaModulation {
pub gain_factor: f64,
pub target: LayerTarget,
pub source: DeltaModulationSource,
}Expand description
Delta modulation parameters for SSM state injection.
Brain analog: noradrenergic gain control (Aston-Jones & Cohen 2005). Delta (dt) in Mamba’s selective scan controls state update speed:
- Higher delta → state updates more from current input (reactive, focused)
- Lower delta → state preserves more history (inertial, exploratory)
Hidden Attention (ACL 2025) proves: delta modulation = modulating implicit attention’s temporal decay.
Safety bounds (Mamba Modulation, NeurIPS 2025):
- Uniform 2-3× scaling across all layers = catastrophic
- Layer-selective 0.7-1.3× = safe (Lyapunov-stable regime)
- ~25% state norm change at mid-layers = catastrophic forgetting (HiSPA 2026)
Fields§
§gain_factor: f64Multiplicative scale factor for delta (dt) parameter.
1.0= no modulation (pass-through).> 1.0= attend more to current input (phasic, focused).< 1.0= preserve more history (tonic, exploratory).
Clamped to [0.5, 2.0] by compute_delta_modulation().
target: LayerTargetWhich layers to target for modulation.
source: DeltaModulationSourceWhat cognitive signal drove this modulation (for debugging/tracing).
Trait Implementations§
Source§impl Clone for DeltaModulation
impl Clone for DeltaModulation
Source§fn clone(&self) -> DeltaModulation
fn clone(&self) -> DeltaModulation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeltaModulation
impl Debug for DeltaModulation
Source§impl Default for DeltaModulation
impl Default for DeltaModulation
Source§impl<'de> Deserialize<'de> for DeltaModulation
impl<'de> Deserialize<'de> for DeltaModulation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DeltaModulation
impl RefUnwindSafe for DeltaModulation
impl Send for DeltaModulation
impl Sync for DeltaModulation
impl Unpin for DeltaModulation
impl UnsafeUnpin for DeltaModulation
impl UnwindSafe for DeltaModulation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more