METHODS
Every claim below is backed by a script or test in the repo. Nothing here is marketing copy.
1. Derivation walkthrough
- Extraction — from MaleCNS v1.0's own annotation/edge data: the Giant Fiber (DNp01, 2 neurons: 1 per hemisphere), its visual inputs (LC4, LPLC2), and its motor target (TTMn). Top-3 highest-synapse-weight LC4 + top-3 LPLC2 per side are kept (top-K selection) — 12 of 311 available LC4/LPLC2 neurons (3.9%), stated bluntly, not buried in a footnote.
- Quantization — each kept synapse weight is quantized to a signed 4-bit magnitude:
clamp(floor(raw_weight/6), 1, 15). - Gate compilation — everything except the two output LATCHes compiles to NAND only: De Morgan AND/OR, a 4-NAND XOR, a 9-NAND full adder, an LSB-up-folded magnitude comparator (all textbook digital logic, verified by exhaustive truth-table tests in
tests/test_gates.py). Result: 661 gates (659 NAND + 2 LATCH). - Threshold rule — see section 2.
- Equivalence — the binarized netlist is checked against an independently-calibrated leaky-integrate-and-fire (LIF) reference model across all 4096 possible stimulus patterns. See section 3.
2. Threshold rule (chosen on principle, not fit to the test set)
Multi-input units (GF/DNp01) use a coincidence-detector rule: threshold = (largest single
quantized input magnitude) + 1. This is justified from the biology — the Giant Fiber is a
convergence/coincidence detector across looming-tuned channels; no single LC4 or LPLC2 afferent
should be able to command a jump by itself — not because it scores best against any one test set.
Single-input units (TTMn) keep ceil(0.5 * max_possible_sum), which reduces to an
identity pass-through (a one-input unit's own max IS that input, so a coincidence rule would make
it permanently unfirable).
We explicitly did not pick the best-scoring fraction (0.15, 100% on the retired sampled set) — a rule chosen to maximize agreement on one published test set is fit to that set, not derived from anything. The full sweep, both the retired sampled numbers and the current exhaustive numbers:
| Multi-input threshold | Sampled 98-pattern (historical, retired) | Exhaustive 4096-pattern |
|---|---|---|
| ceil(0.5 * max_sum) | 80.6% | 76.7% |
| ceil(0.4 * max_sum) | 85.7% | 88.3% |
| ceil(0.3 * max_sum) | 95.9% | 98.1% |
| ceil(0.2 * max_sum) | 98.0% | 99.1% |
| ceil(0.15 * max_sum) (rejected — best score, not chosen) | 100.0% | 99.8% |
| ceil(0.1 * max_sum) | 98.0% | 99.9% |
| coincidence rule (largest input + 1) — SHIPPED | n/a (didn't exist yet) | 98.9% |
3. Equivalence — exhaustive, not sampled
Stimulus set: all 4096 possible activation patterns of the 12 kept visual inputs (64 left-hemisphere subsets × 64 right-hemisphere subsets) — exhaustive, not a sample.
Overall jump/no-jump agreement: 98.9% (4051/4096), using the shipped coincidence-detector rule.
| Drive level | Patterns | Agreement |
|---|---|---|
| none | 1 | 1/1 (100.0%) |
| weak | 483 | 438/483 (90.7%) |
| medium | 2765 | 2765/2765 (100.0%) |
| strong | 847 | 847/847 (100.0%) |
45 of 4096 patterns disagree, all LIF-jumped-but-binarized-didn't (zero false jumps: the binarized model never jumps when the LIF reference wouldn't).
4. Honest limitations
- The binarized netlist is purely combinational: it is evaluated once against a stimulus pattern's fully-formed active set, not against the LIF reference's tick-by-tick ramp. It has no notion of approach speed, only of the final visual population that ends up active — no time course.
- The LIF reference and the binarized comparator use independently chosen calibration constants — they are not fit to agree with each other, so the 98.9% figure is a genuine measurement, not a tautology.
- The headline agreement rate is a weak metric on its own. The LIF reference jumps on 4092 of the 4096 exhaustive patterns, so a trivial always-jump function would score 99.9% — higher than our 98.9%. What that baseline cannot do is refuse: the shipped netlist has zero false jumps (it never jumps when the reference wouldn't, including the empty stimulus), and all discriminative behavior lives in the weak-drive rows (90.7%). Read the per-level table, not the headline. Also: both models were built by us — this is an internal-consistency measurement between two implementations, not third-party validation of the biology.
- This subgraph only models the GF/TTMn (jump) pathway; the DLMn flight-muscle pathway is excluded because MaleCNS v1.0 has no direct DNp01→DLMn synapse in this data (known to be indirect, via the PSI interneuron, out of scope).
- Only the chemical synapse count is modeled. The GF→TTMn synapse is well documented in the literature to have a strong electrical (gap-junction) component that synapse-count data cannot see, so the TTMn stage's real coupling strength is likely understated here.
- The inherited transmitter→sign map assigns glutamate to inhibitory (-1). That is wrong specifically for motor neurons at the Drosophila neuromuscular junction, where glutamate is excitatory — TTMn (glutamatergic in this data) is affected, but harmlessly, since TTMn has no outgoing edges in this subgraph and its sign is never read. Disclosed here rather than left for someone else to find.
- Only 12 of 311 available LC4/LPLC2 neurons (3.9%) are modeled at all. Both models are toy-scale reductions; neither is a claim of accurately predicting a real fly's behavior, only of a documented, reproducible relationship between two models of the same wiring diagram.
5. Trust model
- Hash-provable netlist: the entire 661-gate netlist is packed as
bytes constantdirectly into the deployed contract's own code — anyone can decode it with our open decoder and diff it againstcircuit/netlists/full.json. - No admin keys. No owner, no pausable switch, no upgrade proxy, no withdrawable balance, no constructor argument that changes behavior.
- The contract takes no money. No
payablefunction anywhere (notswat(), notswatTx()), and noreceive()/fallback()— a direct BNB transfer is rejected before the contract's own code even runs, and no function exists that can move or use funds. Like any address, it can still be force-sent dust viaselfdestructor airdropped tokens — there is no code path for anyone, including us, to use, move, or recover anything that lands there; it is inert forever. - Constructor-time validation. Deployment itself runs an on-chain check that every packed gate operand is in range — "the chain checked it," not just "trust the generator script."
6. The seed fragment — "the neuron's voice"
The TapeOut seed fragment (2 NAND + 1 LATCH) is the jump-command output stage — it
carries no synaptic weights or thresholds of its own (those live in the omitted upstream adder
tree/comparator, which stays in full.json and the deployed contract only). Marketed
honestly as "the jump-latch — the neuron's voice," never as "encodes the fly's
wiring" — that claim belongs to the full netlist, not this fragment.
7. The contract
NandFly.sol — 661 gates, swat(uint16) free view call, swatTx(uint16)
on-chain call with a Swatted event and three public counters. Deployed and live on BNB
Chain at 0x3AB7b7621dB958c989B4B628D38B2D3d3642980A
(source verified on BscScan), born 2026-09-16T07:12:05Z (bornAt() = 1789542725).
A post-deploy parity spot-check of 200 patterns against the live contract matched the reference
evaluator 200/200 (contract/scripts/parity_check.js — rerun it yourself against the live
address). Full deploy procedure: contract/DEPLOY.md.
7b. The feeding wallet
Feeding wallet: 0x14Ab88CF91376451a24179C41965D1f24269e3a6. Policy, published before the
first inflow: 80% of every inflow buys components (every purchase is an on-chain receipt),
20% keeps the lab running. All inflows are treated equally — no per-token deals, no
endorsements. If the 80% falls short of the mint cost when prices move, we cover the gap ourselves.
The wallet's small pre-launch balance is our own deploy-gas float, not donations — the 80/20 policy
counts inflows from launch onward.
7c. The whole-brain view (data provenance)
The "whole brain" point cloud on the home page renders soma positions only from
MaleCNS v1.0's annotations (somaLocation column): 141,781 of the 211,577 annotation
rows carry a soma position; the rest have none and are not shown (nothing is invented). The cloud
is decimated to 30,000 points for rendering (uniform stride over the bodyId-sorted list —
deterministic, no RNG; ~10,000 on small screens) and quantized to 3×uint16 per point.
Extraction script, binary, and a manifest with the exact counts, quantization box, and the 16
on-chain neurons' positions: site/scripts/extract_brain_points.py,
site/data/brain-points.json. Positions are anatomy, not wiring — no connectivity is
used or implied by this view; the wiring lives in the netlist the contract evaluates.
8. Credits
- Connectome data: MaleCNS v1.0 (FlyEM @ HHMI Janelia, University of Cambridge, MRC LMB, and Google Research).
- Binarization pipeline lineage: DOOMFLY-lineage pipeline (MIT license).
- Parallel work: BruceBlue's independent GF-circuit work — never read or referenced during this derivation; credited here as convergent, independent effort.
Derivation repo: github.com/wetware-labs/nandfly