Repository navigation
use case computational neuroscience
A fully scoped production use case. Extends the reference slice in
use_case_streaming_timeseries.md; consumes the shared enablers fromproduction_toolkit_plan.md; listed in the umbrellaproduction_use_cases.md.
One-line summary. Build biophysically parameterized brain-circuit models and neuromorphic algorithms at scale, with reproducible large runs — on HPC/GPU with no neuromorphic chip.
What it demonstrates. The model is spiking dynamics: a declarative
TopologySpec plus the neuron registry drives large-scale simulation, and the
bundle/session machinery turns an experiment into a reproducible, shareable
artifact rather than an ad-hoc script.
Design/spec only. Every claim about current code is grounded in a file/line reference so a Code-mode agent can execute this file-by-file. No implementation starts in this document.
What. Given a biological circuit hypothesis (neuron types, connectivity, synapses, input drives), simulate it at scale, compare against a reference neuron model, and record every run so results are reproducible and shareable — on HPC/GPU with no neuromorphic hardware.
Users. Computational neuroscientists; neuromorphic-algorithm researchers; labs that need reproducible large-scale spiking simulations and cross-tool interoperability.
Why SNN here. The system under study is spiking dynamics; the SNN runtime is the model, not an approximation of one.
Success criteria (SLAs).
- Fidelity: single-neuron and small-circuit dynamics match a reference closed-form/analytical or published trace within a configured tolerance.
- Scale: a large network runs to a configured duration/scale (e.g. 10^5 neurons × 10^4 steps) within a time/memory budget on HPC/GPU.
- Reproducibility: identical
TopologySpec+ seed + parameters reproduce the same trajectory (bit-exact on the CPU fixture; deterministic where enforced on GPU); every run writes a manifest (manifest.py). - Interop: the circuit round-trips through NIR and geometry; no measured power
claim (
estimate: true).
flowchart LR
A[Hypothesis and parameters] --> B[TopologySpec builder]
B --> C[Neuron registry]
C --> D[Large-scale run harness]
D --> E[Trajectory and analysis]
D --> F[DeploymentBundle or NIR snapshot]
E --> G[Reference trace comparison]
F --> H[NIR round-trip and geometry]
D --> I[Run metrics and manifests]
J[Registry governance] --> F
Legend: this use case is batch/simulation-first; the bundle is used as a
reproducible snapshot rather than a serving endpoint, though the same
InferenceSession can replay a recorded drive.
-
Sources: declarative circuit definitions (
TopologySpec) plus recorded or synthetic input drives; a deterministic synthetic drive generator for CI (parallelingsequence_source.py). -
Neurons: biophysical parameters via the neuron registry
(
registry.py,lapicque.py,leaky.py,synaptic.py); a registry entry declares its dynamics and its NIR mapping. - Contract: the full parameter set (neuron params, synaptic weights/delays, connectivity, drive spec) is frozen into a bundle/manifest so a run is self-describing.
-
Coding: the drive is encoded with
rate/latency/deltaas appropriate to the hypothesis; the frozenEncodeSpecis recorded so a replayed drive is identical to the training/simulation drive. -
Input shape:
[T, B, …], matching the simulator's temporal contract.
-
Topology: composed with
builder.pyand declared as aTopologySpec; stage kinds fromkinds.py. -
Execution: the closed-loop simulator
(
execution.py) drives the run; the shared per-step body (step.py) lets the same circuit be replayed statefully. Where learning is in scope, reuseTrainingEnginewith surrogate gradients; checkpoint viacheckpoint_mixin.py.
- Fidelity: compare trajectories to a reference trace (analytical or published) with a configured tolerance; report per-quantity error.
-
Reproducibility:
bit_exactness_checkon the CPU fixture; a determinism report (determinism.py) else. -
Interop: NIR round-trip and geometry validation
(
serialization.py,image_size.py). - Manifest per run (
manifest.py).
-
model.spkfwithmanifest.json(spec, versions, neuron parameters, expected metrics),weights.pt(synapses),encode_config.json,preprocessing.json(drive spec),graph.nir.json, checksums/signature. - Anchors:
bundle.py,bundle_manifest.py.
-
InferenceSession.load(bundle),.reset(),.step(frame),.run_stream(frames)replay a recorded drive exactly, with state viaStateTree— useful for re-running a published experiment from its artifact.
- A large-scale run harness (batch, HPC/GPU) drives the closed-loop simulator with checkpointing of long runs; progress and cost are recorded.
- Optional:
spikeforge-serveexposes/v1/predictand/v1/bundlefor artifact introspection and drive replay (app.py); this is not the primary surface.
-
spikeforge-clientsSDKs introspect the served bundle (client.py);spikeforge-ioreplays recorded drives (replay.py).
- Prometheus over the registry (
registry.py): steps/s, neurons, spike rate, memory, per-stage sparsity; long-run cost is recorded withestimate: truefor energy.
- Optional pruning/sparsity experiments via
pruning.pyto study how structural sparsity changes circuit dynamics — reported as a scientific result, not a deployment claim.
- Test-deploy a small representative circuit on
reference,norse, andlava_loihi2with a parity report (test_deploy.py);estimate: true,available: falsewith a reason when an SDK is absent. This is the cross-tool interoperability check, not a device measurement.
| Phase | Deliverable | Depends on | Acceptance |
|---|---|---|---|
| P0 | Declarative circuit spec + drive generator + frozen parameter set | — | same spec reproduces the same drive |
| P1 | Reference-trace fidelity harness for neuron/circuit dynamics | P0 | dynamics within tolerance |
| P2 | Large-scale run harness with long-run checkpointing | W1 | runs to configured scale within budget |
| P3 | Reproducible bundle/NIR snapshot + tamper check | W1 | fresh-process rebuild exact; NIR round-trips |
| P4 |
InferenceSession replay of a recorded drive |
W1, W2 | replay == original trajectory on the CPU fixture |
| P5 | Run telemetry + reproducibility CI gate | W6 | bit-exact fixture green; metrics recorded |
| P6 | HPC packaging, promotion/rollback of artifacts, drift monitor | W7 | promote/rollback demo; artifact lineage recorded |
MVP = P0–P4. That is the smallest end-to-end slice that demonstrates the reproducible-simulation story.
Depends on: PT-W1 (released spikeforge/serving/ stateful runtime + bundle);
PT-W2 (frozen EncodeSpec); PT-W6
observability; PT-W7 registry governance/lineage. Tracked by umbrella issue #12;
reference implementation UC-1 (released in spikeforge 0.3.0).
Out of scope: measured power and on-device capacity (needs silicon;
estimate: true); reproducing vendor/chip numerics; new biophysical neuron models
beyond the registry contract; a GUI/notebook product; clinical or diagnostic
claims.
| Risk | Mitigation |
|---|---|
| "R&D" scope is unbounded | anchor every run to a TopologySpec + reference trace with a tolerance |
| Large runs are irreproducible | manifest + deterministic seeds + bit-exact CPU fixture |
| Neuron params not expressible in NIR | registry entries declare their NIR mapping; unmappable dynamics refuse with a typed error |
| Results read as hardware evidence | energy stays estimate: true; test-deploy runs are named as simulators |
-
Title:
[UC-10] Computational neuroscience / neuromorphic R&D -
Labels:
enhancement,architecture -
Body: see
plans/use_case_computational_neuroscience.md— goal, reference architecture (TopologySpec + neuron registry → run harness → trajectory/NIR snapshot → reproducible bundle → replay; run telemetry via/metrics), rate/ latency/delta coding, biophysical neuron registry, acceptance (dynamics within tolerance, 10^5 neurons × 10^4 steps within budget, bit-exact CPU fixture, NIR round-trip), MVP phases P0–P4, dependencies PT-W1/W2/W6/W7.
- Home
- Architecture
- Backend Execution
- Benchmarks
- Dashboard
- Development
- Event Datasets
- Event Runtime And Energy
- Features
- Implications And Boundaries
- Interop Foldins
- Interpreter Spine
- Introspection
- Model Deployment
- Model Hub
- Notes
- Operational Maturity
- Production Workflows
- Project Layout
- Quickstart
- Requirements
- Sequence Primitives
- Streaming Timeseries
- Targets And Interop
- Usage
- Arch 0001 Adr Repo Topology
- Arch 0001 Core Boundary
- Arch 0001 Decision Metrics
- Arch 0001 Migration Plan
- Arch 0001 Packaging Versioning
- Arch 0001 Protocol Contract
- Arch 0001 Risk Register
- Arch 0001 Target Topology
- Backend Execution Plan
- Ecosystem Listings
- Ecosystem Roadmap
- Event Runtime Plan
- Hub Expansion Plan
- Plans
- Interop Foldins Plan
- Interpreter Spine Plan
- Memory System Research
- Model Hub Plan
- Operations Plan
- Production Toolkit Plan
- Production Use Cases
- Professional Roadmap
- Repo Topology Plan
- Sequence Primitives Plan
- Use Case Audio Keyword Spotting
- Use Case Biosignal Medical Monitoring
- Use Case Computational Neuroscience
- Use Case Edge Power Budgets
- Use Case Event Camera Vision
- Use Case Intrusion Anomaly Detection
- Use Case Low Latency Sensor Stream
- Use Case Rl Control Robotics
- Use Case Spiking Transformers
- Use Case Streaming Timeseries