Skip to content

Zer0pa/ZPE-Neuro

Repository files navigation

ZPE-Neuro

ZPE-Neuro Masthead

License: SAL v7.0 Authority: 2026-04-24 repo snapshot Release: private staged Lane: extracellular recording

What This Is

ZPE-Neuro is the extracellular recording lane of the Zer0pa 17-lane encoding portfolio — a bounded spike-event extraction codec for electrophysiology signals. It is independent of other portfolio lanes and speaks only for its own domain.

The strongest CI-anchored result to date: deterministic encode-decode round-trip on DANDI 000034 with a 401x event ratio, 78.44 µV RMSE, and Gate C + Gate D both PASS on blind-clone replay from the current origin/main snapshot. No comparison baseline exists for this lane; the numbers stand on their own terms.

This front door promotes only claims backed by a tracked proof artifact and exercised in CI. Treat CURRENT_AUTHORITY_PACKET.md as the April 24 routing layer; the full proof archive goes deeper.

Key Metrics

Metric Value Source
DANDI 000034 event ratio (window-scoped) 401x benchmark_summary.json
DANDI 000034 RMSE 78.44 µV benchmark_summary.json
Gate D embedded latency (p99) 850 ns neuro_embedded_latency.json
Determinism (identical-hash runs) 5 / 5 seeds determinism_replay_results.json

Source: April 24 blind-clone replay from origin/main. All four rows are CI-anchored or artifact-anchored per the proof packets in proofs/selected_artifacts/2026-04-24_zpe_neuro_blind_clone_replay/. Window-scoped metrics (6000-sample, 8-channel window at 30 kHz). Embedded latency uses a hardware-proxy cycle model at 80 MHz ARM-class clock; not a measured on-silicon result.

DANDI 000034 Tier-1 Authority Anchor

Metric Value Proof artifact CI test
Event ratio (window-scoped) 401x benchmark_summary.json tests/test_dandi_offline.py::test_fixture_reproduces_benchmark_metrics
RMSE 78.44 µV benchmark_summary.json tests/test_dandi_offline.py::test_fixture_reproduces_benchmark_metrics
Encode latency (mean / max) 0.089 ms / 0.208 ms benchmark_summary.json artifact only — no pytest bound asserted
Decode latency (mean / max) 0.474 ms / 0.686 ms benchmark_summary.json artifact only — no pytest bound asserted

These are window-scoped metrics (6000-sample, 8-channel window at 30 kHz). They are not whole-recording compression results.

IBL Second-Target (Tier-2 Breadth, Counted PASS)

Metric Value Proof artifact CI test
Event ratio (window-scoped) 224x public_corpus_ibl_waveform_eval.json artifact only — tests/test_breadth_adjudication.py tests logic, not this metric value
RMSE 38.16 µV public_corpus_ibl_waveform_eval.json artifact only — tests/test_breadth_adjudication.py tests logic, not this metric value

Gate D: Embedded Latency and Drift Resilience

Metric Value Proof artifact CI test
Modeled latency (mean / p99) 612.5 ns / 850 ns neuro_embedded_latency.json CI gate-slice
Latency threshold < 900 ns neuro_embedded_latency.json CI gate-slice
Drift accuracy at 0–15 µm 100% neuro_drift_resilience.json CI gate-slice
Drift cliff at 20 µm neuro_drift_resilience.json CI gate-slice

Embedded latency uses a hardware-proxy cycle model at 80 MHz ARM-class clock plus Python reference timing. It is not a measured on-silicon result.

Determinism

Metric Value Proof artifact CI test
Identical-hash runs 5 / 5 seeds determinism_replay_results.json tests/test_wave1_determinism.py, tests/test_roundtrip.py
NWB roundtrip SHA256 bit-consistent neuro_nwb_roundtrip.json tests/test_roundtrip.py

What We Don't Claim

  • No claim of lossless signal reconstruction.
  • No claim that the window-scoped event-encoding ratios are whole-recording compression results.
  • No claim that DANDI 000003 closed new breadth.
  • No claim of commercialization-safe closure or tagged public release.
  • No claim beyond the bounded extracellular lane.

What We Prove

Repo Shape

Field Value
Proof Anchors 5
Modality Lanes 1
Authority Source proofs/manifests/CURRENT_AUTHORITY_PACKET.md
  • src/zpe_neuro/: installable extractor package.
  • tests/: repo-local verification slice.
  • tools/: gate runners and operator scripts.
  • proofs/: current authority packet plus April 24 replay and breadth packets.
  • docs/: architecture, legal boundaries, release status, and dataset-scope notes.

Commercial Readiness

Field Value
Verdict PARTIAL
Scope Extracellular recording lane only; single positive corpus (DANDI 000034); DANDI 000003 recorded FAIL
Gate status Gate C PASS, Gate D PASS; breadth gate not closed (1 of required 2 passing corpora)
Blocker Second passing DANDI corpus required before commercialization-safe release gate opens

Read docs/LEGAL_BOUNDARIES.md before widening any claim from this repo state.

Quick Start

git clone https://github.com/Zer0pa/ZPE-Neuro.git
cd ZPE-Neuro
python3.11 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e '.[dev]'
python -m pytest tests

For the bounded gate slice:

python -m pip install -e '.[gate,proof]'
python tools/run_gate_c.py --artifact-root artifacts/manual_gate_c --seed 20260220
python tools/run_gate_d.py --artifact-root artifacts/manual_gate_d --replay-seeds 20260220,20260221,20260222,20260223,20260224

Tests and Verification

Code Check Verdict
tests/test_dandi_offline.py::test_fixture_reproduces_benchmark_metrics DANDI 000034 event ratio and RMSE match proof artifact PASS
tests/test_roundtrip.py Encode-decode NWB roundtrip SHA256 bit-consistency PASS
tests/test_wave1_determinism.py 5/5 seed determinism across blind-clone replay PASS
tests/test_breadth_adjudication.py IBL counted breadth logic; DANDI 000003 FAIL recorded PASS
CI gate-slice Gate D embedded latency p99 < 900 ns; drift cliff at 20 µm PASS
CI Verify Package Surface / proof-import-smoke Package importable; proof artifacts present PASS

Proof Anchors

Path State
proofs/manifests/CURRENT_AUTHORITY_PACKET.md present
proofs/artifacts/dandi000034_benchmark/benchmark_summary.json present
proofs/selected_artifacts/2026-04-24_zpe_neuro_blind_clone_replay/verification_summary.md present
proofs/selected_artifacts/2026-04-24_zpe_neuro_blind_clone_replay/gate_c_summary.json present
proofs/selected_artifacts/2026-04-24_zpe_neuro_blind_clone_replay/gate_d_summary.json present
proofs/selected_artifacts/2026-04-24_zpe_neuro_blind_clone_replay/determinism_replay_results.json present
proofs/selected_artifacts/2026-04-24_zpe_neuro_blind_clone_replay/neuro_embedded_latency.json present
proofs/selected_artifacts/2026-04-24_zpe_neuro_dandi000003_breadth/public_corpus_summary.json present
proofs/selected_artifacts/2026-04-24_zpe_neuro_dandi000003_breadth/dandi000003_decision.md present
proofs/selected_artifacts/2026-04-24_zpe_neuro_dandi000003_breadth/ajile12_family_boundary_decision.md present
proofs/artifacts/comp_benchmarks/neuro_codec_comparison.json present

Competitive Benchmarks

Two non-commensurable metrics, reported in two separate sections so they cannot be conflated. Reproduce with python scripts/comp_benchmark/run_neuro_comparison.py. Full numbers in proofs/artifacts/comp_benchmarks/neuro_codec_comparison.json.

Lossless raw-channel comparison

Operating on the raw int16 samples in tests/fixtures/dandi_000034_mouse412804_ecephys_scan_6000x8.npz (8 channels x 6000 samples = 96000 bytes), with no information loss.

Codec CR on int16 fixture Notes
gzip (level 6) 2.20x stdlib gzip.compress
lz4 (frame, default) 1.42x lz4.frame.compress
zstd (level 3) 2.17x zstandard.ZstdCompressor(level=3)

ZPE-Neuro is not in this table. It is not a lossless general-purpose compressor and is not commensurable with these baselines.

ZPE event-extraction ratio (lossy by design)

ZPE-Neuro's 401x ratio is a LOSSY event-extraction operation: it drops non-event samples and retains spike events (41 events kept from 48000 input samples; 768000 raw bits -> 1915 encoded bits on the same window). Window-scoped fidelity at this operating point is RMSE 78.44 µV with roundtrip_exact=False and roundtrip_fidelity=0.0792 per benchmark_summary.json. This is not comparable to the lossless CRs above; reading "401x vs gzip 2.2x" as "ZPE is ~180x better than gzip" is a category error - they are different operations on different outputs. For lossless raw-channel storage, gzip/lz4/zstd remain the appropriate baselines.

Upcoming Workstreams

This section captures the active lane priorities — what the next agent or contributor picks up, and what investors should expect. Cadence is continuous, not milestoned.

  • Second passing DANDI corpus — Active Engineering. Pure data-ingestion work; closes the breadth gap (currently 1 passing corpus) and unlocks the commercialization-safe release gate.
  • DANDI 000003 FAIL diagnosis — Research-Deferred — Investigation Underway. Determine whether the failure is a corpus property (announce out-of-scope) or a primitive gap (close it).