API Reference#
braintrace trains recurrent and spiking neural networks online —
forward in time, without backpropagation through time (BPTT). You mark the
trainable operations of a model with ETP primitives (for example
braintrace.matmul() instead of x @ w); a compiler then discovers how
each parameter influences the network’s hidden states and wires up the
eligibility traces that carry gradient information forward.
This reference is organized around the four layers of the package, with dependencies pointing strictly downward, plus the ready-made neural-network layers built on top.
Layer |
What it does |
Reference |
|---|---|---|
Operators |
User-facing ETP ops that mark weights for online learning, and the machinery to register your own primitives. |
|
Compiler |
Walks the JAX |
|
Executor |
Runs the forward pass and computes the hidden→weight / hidden→hidden Jacobians the algorithms consume. |
|
Algorithms |
Online-learning orchestrators: the exact D-RTRL / ES-D-RTRL family and the SNN algorithms (EProp, OSTL, OTPE, OTTT, OSTTP). |
|
Layers |
Drop-in |
The fastest way in is the one-call braintrace.compile() entry point,
documented in Online-Learning Algorithms.