brainevent documentation

Contents

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#

🚀 Getting Started

Install brainevent and run your first event-driven computation in 60 seconds.

Installation
📘 Tutorials

Learning-oriented, step-by-step notebooks — from event arrays to writing your own custom kernels.

Data structures & operators
🛠️ How-to Guides

Task-oriented recipes for concrete problems: choosing a sparse format, building a network, compiling raw CUDA.

Working with data structures
💡 Explanation

Understanding-oriented background: the event-driven model, sparse-format trade-offs, and the FAQ.

What is event-driven computation?
📖 Reference

Information-oriented API and kernel reference, plus the changelog.

Python API
🌐 Ecosystem

brainevent is one part of the BrainX brain modeling ecosystem.

https://brainx.chaobrain.com/