Expand description
Core compute kernels for POYO+, POSSM, NDT3, and CEBRA decoders.
These are the hot-path operations that benefit from Rust acceleration: spike tokenisation, sinusoidal position encoding, scaled dot-product attention, diagonal SSM step, and InfoNCE contrastive loss.
Functions§
- gaussian_
attention - Gaussian attention. Li et al. (2025), scKGBERT.
- infonce_
loss - InfoNCE contrastive loss. van den Oord et al. (2018); CEBRA.
- scaled_
dot_ product_ attention - Scaled dot-product attention.
- sinusoidal_
position_ encode - Sinusoidal position encoding. Vaswani et al. (2017).
- ssm_
step_ diagonal - Diagonal SSM step. Gu et al. (2022), S4D; Ryoo et al. (2025), POSSM.
- tokenise_
spikes - Convert binary spike trains to sorted (unit_id, timestamp) tokens.
Type Aliases§
- Spike
Token - Token: (unit_id, timestamp_ms).