pub struct SpreadingActivationConfig {
pub enabled: bool,
pub decay_lambda: f32,
pub max_hops: u32,
pub activation_threshold: f32,
pub inhibition_threshold: f32,
pub max_activated_nodes: usize,
pub seed_structural_weight: f32,
pub seed_community_cap: usize,
pub recall_timeout_ms: u64,
}Expand description
Configuration for SYNAPSE spreading activation retrieval over the entity graph.
When enabled = true, spreading activation replaces BFS-based graph recall.
Seeds are initialized from fuzzy entity matches, then activation propagates
hop-by-hop with exponential decay and lateral inhibition.
§Validation
Constraints enforced at deserialization time:
0.0 < decay_lambda <= 1.0max_hops >= 1activation_threshold < inhibition_thresholdrecall_timeout_ms >= 1(clamped to 100 with a warning if set to 0)
Fields§
§enabled: boolEnable spreading activation (replaces BFS in graph recall when true). Default: false.
decay_lambda: f32Per-hop activation decay factor. Range: (0.0, 1.0]. Default: 0.85.
max_hops: u32Maximum propagation depth. Must be >= 1. Default: 3.
activation_threshold: f32Minimum activation score to include a node in results. Default: 0.1.
inhibition_threshold: f32Activation level at which a node stops receiving more activation. Default: 0.8.
max_activated_nodes: usizeCap on total activated nodes per spread pass. Default: 50.
seed_structural_weight: f32Weight of structural score in hybrid seed ranking. Range: [0.0, 1.0]. Default: 0.4.
seed_community_cap: usizeMaximum seeds per community. 0 = unlimited. Default: 3.
recall_timeout_ms: u64Timeout in milliseconds for a single spreading activation recall call. Default: 1000.
Values below 1 are clamped to 100ms at runtime. Benchmark data shows FTS5 + graph
traversal completes within 200–400ms; 1000ms provides headroom for cold caches.
Implementations§
Trait Implementations§
Source§impl Clone for SpreadingActivationConfig
impl Clone for SpreadingActivationConfig
Source§fn clone(&self) -> SpreadingActivationConfig
fn clone(&self) -> SpreadingActivationConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SpreadingActivationConfig
impl Debug for SpreadingActivationConfig
Source§impl Default for SpreadingActivationConfig
impl Default for SpreadingActivationConfig
Source§impl<'de> Deserialize<'de> for SpreadingActivationConfigwhere
SpreadingActivationConfig: Default,
impl<'de> Deserialize<'de> for SpreadingActivationConfigwhere
SpreadingActivationConfig: Default,
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>,
Auto Trait Implementations§
impl Freeze for SpreadingActivationConfig
impl RefUnwindSafe for SpreadingActivationConfig
impl Send for SpreadingActivationConfig
impl Sync for SpreadingActivationConfig
impl Unpin for SpreadingActivationConfig
impl UnsafeUnpin for SpreadingActivationConfig
impl UnwindSafe for SpreadingActivationConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request