Skip to main content

Module spreading_activation

Module spreading_activation 

Source
Expand description

Spreading activation (Kornai, Vector Semantics ch 7.4) — propagate an activation level from seed concepts through the semantic-network edges, decaying with distance. The classic associative-retrieval mechanism: given a query’s seed concepts, it ranks which graph regions are most relevant.

Mission fit: a natural engine for the 10D→5D NQuin relevance router (“streaming lives in retrieval, not attention; we own the cache”) — complementary to PCA and mutual information on the same router. Kernel-class Reduction (the per-hop weighted sums); bounded iteration, CPU reference.

Structs§

Edge
A directed weighted edge from → to with non-negative weight.

Functions§

spreading_activation
Spread activation from seeds (node, initial activation) over n_nodes through edges, decaying by decay ∈ (0,1] each hop and pruning contributions below threshold. Runs at most max_hops. Returns total accumulated activation per node (the relevance score).
top_k
Indices of the top-k most-activated nodes (relevance ranking), highest first.