Skip to content

About

NeuroVis3D — SNN visualization and pathology indicators (D1/D2/D3)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

NeuroVis3D

A visual diagnostic instrument for spiking neural networks trained with surrogate gradients.

CI Status: work in progress License MIT Python 3.11+

⚠️ Work in progress — not validated. This is an active research repository, not a released tool. No performance claim and no scientific result should be treated as established. See DECISIONS.md.

NeuroVis3D banner

NeuroVis3D demo — server startup and health check

Table of contents


What it is

NeuroVis3D attaches to an existing snnTorch model through non-intrusive PyTorch hooks and reports three formally defined indicators — dead neurons, activation sparsity collapse, and temporal gradient decay — in real time. It observes; it does not train. The supported UI path is the embedded 2D demo (neurovis3d demo). The Vite frontend/ tree is legacy (pre-TGS) and is not the supported product surface.

What it does not do

  • It does not train. It observes. It is not a framework.
  • snnTorch only. Norse, Lava, Brian2, NEST, Rockpool are out of scope.
  • One model at a time. No automated model comparison.
  • Local-first. No authentication, no multi-tenancy, no cloud, no telemetry.
  • No mobile support. Desktop browser against a local backend.

Status — read this first

This is an active research repository, not a released tool.

  • The three indicators are implemented, but not yet validated against analytical ground truth. That validation is a distinct, pending milestone (D-oracle). Until it passes, no measurement produced by this code should be treated as established.
  • No scientific claim is made in this repository. Hypotheses live in the charter (§7.4) and in DECISIONS.md; they will be confirmed or refuted. Refutations are kept.
  • The originality of the TGS indicator (§7.3) is under review (D-lit) and has not been established.
  • The API is unstable. There is no release, no tag, and no PyPI package yet.
  • Results present in this repository are exploratory unless a DECISIONS.md entry marks them otherwise.

The repository is published at this stage on purpose: Git timestamps make the pre-registered entries in DECISIONS.md verifiable by a third party ([D020]).


Quickstart

Not published on PyPI yet. Cold path matching the public CI smoke (.github/workflows/ci-public-readiness.yml):

git clone https://github.com/AxelNoun/neurovis3d.git
cd neurovis3d
python -m pip install --upgrade pip build
python -m build
python -m pip install "dist/*.whl[server,snn]"   # PowerShell: (Get-Item dist\*.whl).FullName
neurovis3d demo --no-browser

Then open http://127.0.0.1:8000/ in Chrome or Edge. Use neurovis3d demo --mode training to include D3 (TGS). No dataset download is required for the synthetic demo.

Editable install for development:

pip install -e ".[dev]"

Minimal usage

from neurovis3d import attach

model = MyLifModel()        # any nn.Module that contains snn.Leaky
monitor = attach(model)     # NeuroVis3D listens
for x in batches:
    model(x)
print(monitor.compute_dnr())
monitor.detach()

A runnable copy lives in examples/quickstart.py.


How it works

Descriptive architecture of the existing code paths (no performance claim):

flowchart LR
  model["snnTorch model"] --> hooks["attach / Monitor hooks"]
  hooks --> d1["D1 DNR"]
  hooks --> d2["D2 sparsity"]
  hooks --> d3["D3 TGS"]
  d1 --> transport["transport / WS metrics"]
  d2 --> transport
  d3 --> transport
  transport --> demo["demo 2D UI"]
  hooks --> registry["runs/experiments.jsonl"]
  oracles["TGS oracles in CI"] --> d3
Loading

The three indicators

Full definitions, default thresholds, alert protocols and bibliographic anchors are in the charter, §7 (docs/notes/00_CHARTE.md).

D1 — Dead Neuron Ratio. Fraction of neurons in a layer whose mean firing rate falls below τ_dead on an evaluation set.

DNR_l(e) = |{ i ∈ layer l : f_i(e, E) < τ_dead }| / |layer l|

D2 — Layer Sparsity Trace. Instantaneous activation sparsity per layer, averaged over a sliding window.

s_l(t) = 1 − (n_active / n_total)

D3 — Temporal Gradient Signature (TGS). Slope of the OLS regression of log‖∂L/∂h_l(t)‖ against t, measured during the backward pass over the last K = T/2 timesteps. TGS_l < 0 indicates temporal vanishing, TGS_l > 0 indicates explosion.

Numerical note. Gradient norms and the log-linear regression for TGS are computed in float64 (floor float32 on-device before any downcast). float16 is used for transport of activations and result scalars only, never for gradient measurement ([D011]).


Repository structure

Path Role
src/neurovis3d/ Package: monitor, transport, demo UI, reproductions
tests/ pytest suite (oracles gated in CI)
examples/ Quickstart script and notebooks
runs/experiments.jsonl Append-only experiment registry
docs/ Charter, DATA, specs, reports, assets — see docs/README.md
paliers/ Working specs and journals for research paliers
frontend/ LEGACY pre-TGS Vite UI — not maintained; do not use as reference
archive/ Historical material

Roadmap

Intentions only — not commitments. Drawn from DECISIONS.md and GO_PUBLIC.md:

  • D-oracle — validate indicators against analytical ground truth
  • D-lit — prior-art review for TGS originality
  • D-recon — reconstruction / retention experimental track
  • Silent public repository (this flip) under [D020], without announcement, tag, or release until those couperets are decided

Governance and reproducibility

File Role
docs/notes/00_CHARTE.md Sovereign document. Scope, indicators, evaluation protocol, invariants.
DECISIONS.md Decision journal. Pre-registered before experiments; refutations kept.
docs/notes/DATA.md Canonical source, version and licence of every dataset used.
runs/experiments.jsonl Experiment registry (commit_sha, config_hash, seed, …).

Documents of governance are written in French; definitions and formulas are language-neutral.

AI assistance disclosure

The code, tests, figures and documentation in this repository are written predominantly by Claude (Anthropic), under the direction of the human researcher named in CITATION.cff. Scientific authority remains human: nothing enters a preprint without human validation (charter §2 and §19).


Citation

If you use this work, cite it via CITATION.cff (GitHub “Cite this repository”). A DOI will be added on first release.


Contributing

Contributions are not open at this stage — see CONTRIBUTING.md. Issues, questions and criticism are welcome.

Security

See SECURITY.md. Do not expose the local backend to an untrusted network.

Licence

MIT License — see LICENSE.

About

NeuroVis3D — SNN visualization and pathology indicators (D1/D2/D3)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages