spikeforge

spikeforge

A spiking-neural-network (SNN) toolkit built on snnTorch and PyTorch. Loads MNIST-style and neuromorphic event datasets, encodes them into rate, latency, delta, and random spikes, and trains, validates, exports, and deploys LIF networks — with a live browser dashboard served over WebSockets.

Pre-1.0. Before trusting any number this produces, read Implications and boundaries.
$ git clone https://github.com/capsize-games/spikeforge.git
$ cd spikeforge && ./install.sh
Leaky integrate-and-fire neuron
β=0.90, threshold=1.00, reset=subtract
I[t] U[t] S[t]

Defaults from spikeforge/neurons/contract.py (DEFAULT_BETA, DEFAULT_THRESHOLD). Notation matches the dashboard's own U[t]/I[t]/S[t] introspection traces.

Features

Encoding
Rate, latency, delta, and random spike coders.
Training
Fully-connected and convolutional LIF networks with surrogate-gradient cross-entropy, live loss/accuracy, checkpointing, and opt-in AMP / gradient checkpointing / truncated BPTT / multi-GPU.
Topologies
fc_legacy, fc_small, conv_net, recurrent_net, plus the sequence presets sequence_mlp and sequence_attn.
Datasets
MNIST, Fashion-MNIST, KMNIST, QMNIST, USPS, EMNIST, CIFAR-10, and — via the events extra — N-MNIST, DVS128 Gesture, CIFAR10-DVS, and Spiking Speech Commands.
Interpreter spine
NIR export, an independent NIR interpreter, and numerical drift validation against it.
Introspection
Educational-mode U[t]/I[t]/S[t] traces, trajectory metrics, encoding/decoding reports, and surrogate-derivative curves.
Deployment
A capability matrix, substitution/rewrite reports, weight quantization, energy accounting, and executable reference, norse, and lava_loihi2 backends.
Model hub
A curated, offline-first catalog plus optional live Hugging Face search.
Dashboard
A React + TypeScript UI with training, introspection, analysis, targets, energy, and hub panels, and seven guided walkthroughs.
The spikeforge dashboard's Model & Data tab: dataset, encoding, and topology controls next to a live training run.
The bundled dashboard, running locally via docker compose up --build.

Status

Pulled from the target and toolkit status tables in plans/ rather than restated separately, so this can't drift from the source of truth.

ComponentStatusNote
NIR export & validation done Independent reference interpreter checks drift against tolerances, not a tautology.
Determinism & run tracking done Seeded, bit-exactness checked, manifest recorded per run.
spikeforge-serve done predict / stream / metrics endpoints, versioned deployment bundle, Docker image.
lava_loihi2 backend done Lava's Loihi2SimCfg CPU emulator. Not device time.
Model hub — architectures done Curated NIR graphs across snnTorch/spikingjelly/Norse/Lava, offline-first.
Model hub — pretrained weights not started Today's catalog is architecture, not a checkpoint you can deploy cold.
On-chip / local learning rules in progress A one-shot Hebbian associative-memory module and a pair-based STDP synapse (real spike-timing, not a rate code) have shipped; reward-modulated and hardware-resident variants are not started.
speck / xylo / spinnaker2 in progress Isolated backend probes are built and tested against each vendor SDK's own simulator; degrade honestly to "unavailable" when that SDK isn't installed. No probe has run against physical hardware.
PyPI release done All seven distributions are on PyPI; ./install.sh still works too.

Documentation

The README stays short on purpose; the full reference lives in the repository.

DocumentDescription
documentation/Index of the long-form reference
QuickstartInstall paths and first run
UsageDocker, local dev, CLI, and device selection
ArchitectureThe TopologySpec spine and data flow
Project layoutModule-by-module map
Implications and boundariesWhat the results do and do not tell you
CookbookCopy-pasteable recipes
examples/Thirteen runnable end-to-end journeys
plans/Design documents, ARCH-0001 split, and roadmap
protocol/Versioned WebSocket JSON Schema contract