brainevent documentation#
BrainEvent provides data structures and
algorithms for event-driven computation on CPUs, GPUs, and TPUs. By processing only
the active (non-zero) spikes in a network, it models brain dynamics far more efficiently
than dense matrix operations — while integrating seamlessly with JAX’s autodiff, JIT, and
vmap.
import brainevent
import jax.numpy as jnp
spikes = brainevent.BinaryArray(jnp.array([1, 0, 1, 0, 1]))
conn = brainevent.JITCScalarR(num_pre=5, num_post=3, prob=0.5, weight=0.2, seed=0)
output = spikes @ conn # only active spikes are processed
Where to go next#
Install brainevent and run your first event-driven computation in 60 seconds.
Learning-oriented, step-by-step notebooks — from event arrays to writing your own custom kernels.
Task-oriented recipes for concrete problems: choosing a sparse format, building a network, compiling raw CUDA.
Understanding-oriented background: the event-driven model, sparse-format trade-offs, and the FAQ.
Information-oriented API and kernel reference, plus the changelog.
brainevent is one part of the BrainX brain
modeling ecosystem.