1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Winner-Take-All Competition Module
//!
//! Implements neural competition mechanisms for sparse activation and fast routing.
//! Based on cortical competition principles with lateral inhibition.
//!
//! # Components
//!
//! - `WTALayer`: Single winner competition with lateral inhibition
//! - `KWTALayer`: K-winners variant for sparse distributed coding
//! - `LateralInhibition`: Inhibitory connection model
//!
//! # Performance
//!
//! - Single winner: <1μs for 1000 neurons
//! - K-winners: <10μs for 1000 neurons, k=50
//!
//! # Use Cases
//!
//! 1. Fast routing in HNSW graph traversal
//! 2. Sparse activation patterns for efficiency
//! 3. Attention head selection in transformers
pub use LateralInhibition;
pub use KWTALayer;
pub use WTALayer;