-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Raul Montoya Cardenas edited this page Jul 29, 2026
·
3 revisions

Generated with Grok Build: Grok 4.5 · xAI Imagine (/imagine)
Modular online training for spiking neural networks in Julia — E-prop, OTTT, and more.
Version: 0.2.0 | Julia: 1.8+ (CI: 1.12) | License: MIT OR Apache-2.0
Framework-agnostic training utilities for pure SNNs or hybrid teacher–student setups. Callers inject a model step and loss; the package orchestrates a single train_step! and provides surrogate helpers and rule stubs.
| Principle | Meaning |
|---|---|
| Bring any model step | No global forward — inject (model, spikes::SpikeBatch) -> output
|
| Bring any loss | Pure SNN MSE or distillation CE from a frozen teacher outside the package |
| Apply any rule |
:eprop, :ottt (stubs today); extend with new rules |
| Update only the SNN | Hybrid teachers stay frozen in caller code |
| Symbol | Role |
|---|---|
SpikeBatch |
Spike trains + optional times/targets |
TraceBatch |
Eligibility-trace container |
TrainingState |
loss, metrics, traces, gradients |
ModelStep |
Abstract type for typed callables |
train_step! |
One online step (Zygote through model step + loss) |
surrogate_heaviside / surrogate_sigmoid / surrogate_exponential
|
Surrogate ∂spike/∂v |
| Page | Description |
|---|---|
| Overview | Wiki map + DeepWiki outline |
| Getting Started | Install and examples |
| Architecture | Modules and pipeline |
| Data Structures | SpikeBatch / TrainingState |
| Training Pipeline |
train_step! contract |
| Learning Rules | e-prop / OTTT status |
| Surrogate Gradients | Surrogate helpers |
| Hybrid Distillation | Teacher–student pattern |
| Examples and Scripts | examples/ + scripts/ |
| Benchmarks | eprop tick harness |
| Testing | Unit suite |
| CI and Quality | GHA |
| Ecosystem | Sibling packages |
| Glossary | Terms |
| Status and Roadmap | What is / is not implemented |
using SynapticDistill, Statistics
mutable struct MySNN
weights::Matrix{Float32}
end
model = MySNN(rand(Float32, 10, 10))
batch = SpikeBatch(Float32.(rand(0:1, 10, 100)), nothing, nothing)
model_step(model, spikes::SpikeBatch) = (logits = model.weights * vec(mean(spikes.spikes; dims=2)),)
mse_loss(output) = sum(output.logits .^ 2)
model, state = train_step!(model, batch, mse_loss; forward_fn=model_step, rule=:eprop)See examples/pure_snn_training.jl.
Dual-licensed under MIT or Apache-2.0 at your option.
Last updated: July 29, 2026
Updated by: Grok Build: Grok 4.5
Package tip reference: e986a66 (main, v0.2.0)
Devin DeepWiki: commit e986a66 · SynapticDistill.jl