{"slug": "show-hn-a-soup-inspired-runtime-for-a-real-fruit-fly-connectome", "title": "Show HN: A Soup-inspired runtime for a real fruit-fly connectome =)", "summary": "A developer released soup-connectome v0.1.0, a portable runtime that executes sparse biological connectomes across CPU, CUDA, WebGPU, and WASM using deterministic fixed-point LIF semantics, with the Janelia male fruit-fly connectome (MaleCNS) as its first dataset target. The project's measured MaleCNS .scx artifact contains 211,577 neurons and 24,678,466 edges, and its standard 4-timestep streamed run completed in 221.537098 seconds on CPU and 266.778847 seconds on Python WebGPU, both producing spike counts of [1, 0, 0, 0]. The author states the work is infrastructure rather than a game demo, focused on graph storage, streaming, backend parity, and device planning, and does not claim biological or scientific validation.", "body_md": "**Inspired by [Soup](https://github.com/MakazhanAlpamys/Soup)**\n\n  Portable runtime for executing sparse biological connectomes across CPU, CUDA, WebGPU, and WASM.\n\n[v0.1.0](https://github.com/MakazhanAlpamys/soup-connectome/tree/v0.1.0)\n  ·\n  [MaleCNS](https://male-cns.janelia.org/)\n  ·\n  [Browser runtime](/MakazhanAlpamys/soup-connectome/blob/main/web/README.md)\n\n`soup-connectome` turns a sparse connectome into a portable `.scx` artifact and\nexecutes it with deterministic fixed-point LIF semantics. The first dataset\ntarget is [MaleCNS](https://male-cns.janelia.org/), the male fruit-fly\nconnectome released by Janelia.\n\n**Built with ideas from Soup.** This is an independent infrastructure\nexperiment that carries Soup's streamed sparse-graph approach into a real\nbiological connectome runtime. Soup is the architectural inspiration, not a\nbundled runtime dependency or a claim of official endorsement.\n\nThis is infrastructure, not a game demo: the project focuses on graph storage, streaming, backend parity, and explicit device planning. It does not claim biological validation.\n\n| Capability | Status | Evidence | \n|---|---|---|\n| CPU resident + streamed runtime | `measured` | Full test suite and MaleCNS smoke | \n| CUDA resident + streamed backend | implemented | Optional; full-scale CUDA performance `not tested` | \n| Python WebGPU resident + streamed backend | `measured` | Example parity and MaleCNS smoke | \n| WASM CPU streaming runtime | `measured` | Generated web/node bindings and parity fixture | \n| MaleCNS `.scx` artifact | `measured` | `211,577` neurons,`24,678,466` edges | \n| Biological/scientific validation | `not tested` | LIF parameters are runtime configuration | \n\n**measured on the local host** · `211,577` neurons · `24,678,466` edges ·\nthree streamed CSR blocks\n\nThe reproducible standard run uses `threshold=20000`, `reset=0`,\n`decay_shifts=[2]`, `refractory_steps=2`, `--timesteps 4`, `--seed-neuron 0`,\nand `--seed-potential 30000`.\n\n| Backend | Residency | Timesteps | Wall time | Spike counts | \n|---|---|---|---|---|\n| CPU | streamed | 4 | `221.537098 s` —`measured` | `[1, 0, 0, 0]` | \n| Python WebGPU | streamed | 4 | `266.778847 s` —`measured` | `[1, 0, 0, 0]` | \n\n```\npython scripts/benchmark_malecns.py --device cpu --residency streamed --timesteps 4\npython scripts/benchmark_malecns.py --device webgpu --residency streamed --timesteps 4\n```\n\nThese numbers are reproducibility evidence for the runtime, not a throughput claim or biological calibration. Additional one-timestep smoke and synthetic propagation results are recorded below.\n\n## Additional validation runs\n\n| Run | Result | \n|---|---|\n| Full-scale, one timestep, zero initial spikes, CPU | `2.245442 s` ,`0` spikes —`measured` | \n| Full-scale, one timestep, zero initial spikes, Python WebGPU | `2.695649 s` ,`0` spikes —`measured` | \n| Full-scale, two-timestep active synthetic stress, CPU | `130.364592 s` , spike counts`[1, 319]` —`measured` | \n| Same active synthetic stress, Python WebGPU | `128.487143 s` , spike counts`[1, 319]` —`measured` | \n\nThe active stress configuration uses `threshold=1`, `reset=0`,\n`decay_shifts=[31]`, and `refractory_steps=0`; it is a propagation test, not\na biological calibration or representative throughput benchmark.\n\nLarge sparse graphs create a different deployment problem from a conventional dense neural model. The runtime keeps neuron state and the delay line resident while streaming sparse source blocks, so graph residency is an explicit axis:\n\n```\nMaleCNS Feather files\n        │\n        ▼\nlocal adapter + sign mapping\n        │\n        ▼\nportable .scx artifact\n        │\n        ├── CPU resident / streamed\n        ├── CUDA resident / streamed\n        ├── Python WebGPU resident / streamed\n        └── browser WebGPU streamed / WASM CPU fallback\n```\n\nStreaming is a memory-shape and portability feature. It is not automatically a throughput guarantee: the current streamed accelerator paths validate and transfer one active source block at a time and do not use a prefetch cache.\n\nInstall the core package and development/data extras:\n\n```\npython -m pip install -e \".[dev,data]\"\n```\n\nOptional backends:\n\n```\npython -m pip install -e \".[dev,data,cuda]\"\npython -m pip install -e \".[dev,data,webgpu]\"\n```\n\nRun the deterministic fixture:\n\n```\nsoup-connectome run --dataset example --device cpu\nsoup-connectome run --dataset example --device cpu --residency streamed\nsoup-connectome run --dataset example --device webgpu --residency streamed\nsoup-connectome plan --dataset example --device cpu\n```\n\nExplicit `cuda` and `webgpu` never silently fall back to CPU. `auto` resolves\nto CPU by design.\n\nThe adapter is local-only and never downloads data automatically. It requires:\n\n- connection weights;\n- body annotations;\n- body neurotransmitters.\n\nFor the verified MaleCNS v1.0 download, the measured columns are:\n\n| File | Columns | \n|---|---|\n| weights | `body_pre` ,`body_post` ,`weight` | \n| annotations | `bodyId` ,`type` ,`somaSide` | \n| neurotransmitters | `body` ,`consensus_nt` | \n\nInspect local schemas first:\n\n```\nsoup-connectome inspect --file path/to/body-annotations.feather\nsoup-connectome inspect --file path/to/body-neurotransmitters.feather\n```\n\nThe first artifact uses the curated annotation node filter and this explicit sign mapping:\n\n```\nsoup-connectome convert \\\n  --weights data/male-cns/connectome-weights-male-cns-v1.0-minconf-0.5.feather \\\n  --annotations data/male-cns/body-annotations-male-cns-v1.0-minconf-0.5.feather \\\n  --neurotransmitters data/male-cns/body-neurotransmitters-male-cns-v1.0.feather \\\n  --output artifacts/male-cns-v1.0-annotated.scx \\\n  --annotation-id bodyId \\\n  --annotation-type type \\\n  --annotation-side somaSide \\\n  --neurotransmitter-id body \\\n  --neurotransmitter-name consensus_nt \\\n  --sign-mapping '{\"acetylcholine\": 1, \"gaba\": -1, \"glutamate\": 1}' \\\n  --exclude-neurotransmitter unclear \\\n  --exclude-neurotransmitter dopamine \\\n  --exclude-neurotransmitter histamine \\\n  --exclude-neurotransmitter octopamine \\\n  --exclude-neurotransmitter serotonin \\\n  --exclude-neurotransmitter unknown \\\n  --scope full \\\n  --node-filter annotations\n```\n\nThe local download measured `151,856,684` weight rows, `211,577` annotation\nrows, `1,835,518` neurotransmitter rows, and `1,109,008,094` bytes across the\nthree Feather files. These are measurements for this exact download, not\nuniversal hardware requirements. Raw data, generated artifacts, WASM build\noutputs, and browser test results are intentionally ignored by Git.\n\nThe backend-independent simulation contract uses:\n\n- signed `int32` membrane potentials;\n- signed `int16` synaptic impulses;\n- positive integer timestep delays;\n- checked arithmetic with rejected overflow;\n- arithmetic-shift leak: `V := V - (V >> k)` .\n\nThese are representation choices, not measured biological constants.\n\n```\npython -m pytest -q\npython -m ruff check .\npython -m ruff format --check .\n\ncd web\nnpm test\nnpm run test:e2e\n\ncd wasm\ncargo fmt --check\ncargo test\ncargo check --target wasm32-unknown-unknown\n```\n\nThe repository uses three evidence labels:\n\n- `measured` — produced by an actual local run or benchmark;\n- `estimated` — a design calculation or planning assumption;\n- `not tested` — no local evidence yet.\n\n- No biological calibration or scientific fidelity claim is made.\n- Morphology and EM-volume simulation are out of scope for the current phase.\n- Automatic MaleCNS downloads and a networked data pipeline are not included.\n- Full-scale active stress is measured for two timesteps with a synthetic\nconfiguration; longer runs on the Python reference path are `not tested` .\n- Browser compatibility across GPU vendors and operating systems is `not tested` .\n\n```\nsrc/soup_connectome/   runtime, graph format, adapters, backends, CLI\nscripts/                reproducible full-scale benchmark entry point\ntests/                 Python contract and parity tests\nweb/src/               browser WebGPU and WASM streaming host\nweb/wasm/              wasm-bindgen CPU runtime\nweb/test/              browser parity fixture\ndocs/                  project documentation\n```\n\n", "url": "https://wpnews.pro/news/show-hn-a-soup-inspired-runtime-for-a-real-fruit-fly-connectome", "canonical_source": "https://github.com/MakazhanAlpamys/soup-connectome", "published_at": "2026-09-13 12:12:28+00:00", "updated_at": "2026-09-13 12:40:29.094196+00:00", "lang": "en", "topics": ["neural-networks", "ai-research", "ai-infrastructure", "ai-tools"], "entities": ["soup-connectome", "Soup", "MaleCNS", "Janelia", "CUDA", "WebGPU", "WASM", "MakazhanAlpamys"], "alternates": {"html": "https://wpnews.pro/news/show-hn-a-soup-inspired-runtime-for-a-real-fruit-fly-connectome", "markdown": "https://wpnews.pro/news/show-hn-a-soup-inspired-runtime-for-a-real-fruit-fly-connectome.md", "text": "https://wpnews.pro/news/show-hn-a-soup-inspired-runtime-for-a-real-fruit-fly-connectome.txt", "jsonld": "https://wpnews.pro/news/show-hn-a-soup-inspired-runtime-for-a-real-fruit-fly-connectome.jsonld"}}