Add controls and region analysis to model card
Browse files
README.md
CHANGED
|
@@ -16,12 +16,16 @@ Weights for a tic-tac-toe player that runs on the MaleCNS fruit fly connectome.
|
|
| 16 |
|
| 17 |
## Files
|
| 18 |
|
| 19 |
-
**`webgpu/`** is the browser model: seven arrays split into 16 MiB chunks, 224,749,428 bytes in total. `manifest.json` lists each chunk with its SHA256, and the app checks every chunk before copying it to the GPU. Trained gains are already multiplied into `weight` and `encoder`. `golden.json` holds 12 test boards along with their PyTorch logits, and `webgpu-verification.json` has the result of running the shaders on them.
|
| 20 |
|
| 21 |
**`training/`** has the checkpoints. `best.pt` is the one the export came from (step 1,100, chosen on validation, optimizer state included). `last.pt` is step 1,200, and `untrained.pt` is the starting point used for the baseline numbers. `results.json` has every score below, `history.json` has the validation curve, and `before.json` is the validation score before training.
|
| 22 |
|
| 23 |
**`graph/`** is the filtered connectome as a scipy sparse matrix (`connectome.npz`), plus MaleCNS body IDs (`ids.npy`), the sensory neurons (`sensory.npy`), the fixed board input projection (`encoder.npy`), and `manifest.json` with the source URLs and SHA256 hashes of the original downloads.
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
## How it works
|
| 26 |
|
| 27 |
1. The board becomes 27 one-hot values (empty, mine or theirs for each square).
|
|
@@ -35,7 +39,7 @@ Neurons are kept if they have a superclass in the annotations and aren't glia. E
|
|
| 35 |
|
| 36 |
## Results
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
| | Positions | Best move picked |
|
| 41 |
| --- | ---: | ---: |
|
|
@@ -56,11 +60,24 @@ One seed, 1,200 steps, about 43 seconds of training on an RTX 3090. Rotations an
|
|
| 56 |
|
| 57 |
Full games also visit training positions, so the test split is the real generalization number.
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
## Limitations
|
| 60 |
|
| 61 |
-
- One
|
| 62 |
- It's a rate model with rough transmitter signs. Nothing spikes, there's no real timing, and backprop is nothing like how flies learn.
|
| 63 |
-
- The shaders were checked against PyTorch with wgpu-native on a CPU Vulkan driver: same moves, logits within 5e-6.
|
| 64 |
- Running it needs WebGPU, a 225 MB download, and storage buffers of at least ~102 MB.
|
| 65 |
|
| 66 |
## License
|
|
|
|
| 16 |
|
| 17 |
## Files
|
| 18 |
|
| 19 |
+
**`webgpu/`** is the browser model: seven arrays split into 16 MiB chunks, 224,749,428 bytes in total. `manifest.json` lists each chunk with its SHA256, and the app checks every chunk before copying it to the GPU. Trained gains are already multiplied into `weight` and `encoder`. `golden.json` holds 12 test boards along with their PyTorch logits, and `webgpu-verification.json` has the result of running the shaders on them. `brainmap.json` and `brainmap.bin` hold a 2D position and an annotation group for every neuron, used by the game's activity panel.
|
| 20 |
|
| 21 |
**`training/`** has the checkpoints. `best.pt` is the one the export came from (step 1,100, chosen on validation, optimizer state included). `last.pt` is step 1,200, and `untrained.pt` is the starting point used for the baseline numbers. `results.json` has every score below, `history.json` has the validation curve, and `before.json` is the validation score before training.
|
| 22 |
|
| 23 |
**`graph/`** is the filtered connectome as a scipy sparse matrix (`connectome.npz`), plus MaleCNS body IDs (`ids.npy`), the sensory neurons (`sensory.npy`), the fixed board input projection (`encoder.npy`), and `manifest.json` with the source URLs and SHA256 hashes of the original downloads.
|
| 24 |
|
| 25 |
+
**`controls/`** has results for two more runs on the real wiring and three on a shuffled graph, plus how the shuffle was done.
|
| 26 |
+
|
| 27 |
+
**`analysis/`** has `compare.json` (real vs. shuffled) and `regions.json` (response per annotation group and step, readout neurons per group and cell type, parameter changes).
|
| 28 |
+
|
| 29 |
## How it works
|
| 30 |
|
| 31 |
1. The board becomes 27 one-hot values (empty, mine or theirs for each square).
|
|
|
|
| 39 |
|
| 40 |
## Results
|
| 41 |
|
| 42 |
+
1,200 steps, about 43 seconds of training on an RTX 3090. Rotations and mirror images of a board always fall in the same split. Any move minimax rates as best counts as correct.
|
| 43 |
|
| 44 |
| | Positions | Best move picked |
|
| 45 |
| --- | ---: | ---: |
|
|
|
|
| 60 |
|
| 61 |
Full games also visit training positions, so the test split is the real generalization number.
|
| 62 |
|
| 63 |
+
## Real vs. shuffled wiring
|
| 64 |
+
|
| 65 |
+
The shuffled graph keeps every neuron's in-degree, out-degree, transmitter sign and normalized input weights, and randomizes which neuron each connection comes from. Three runs per graph with different batch orders, same test positions:
|
| 66 |
+
|
| 67 |
+
| Graph | Test runs | Mean |
|
| 68 |
+
| --- | --- | ---: |
|
| 69 |
+
| Real wiring | 91.2%, 91.7%, 94.0% | 92.3% |
|
| 70 |
+
| Shuffled | 82.7%, 83.5%, 87.8% | 84.7% |
|
| 71 |
+
|
| 72 |
+
## Where the signal goes
|
| 73 |
+
|
| 74 |
+
Averaged over all boards, the biggest response outside the sensory neurons is in antennal lobe projection neurons (0.080 at the last step), and it drops off quickly after that. The mushroom body and central complex barely respond. 1,755 of the 2,048 readout neurons are in the optic lobe, 1,261 of them lamina cells L1 to L3 right behind the photoreceptors. That comes from where the input lands, not from any kind of vision: the input projection treats photoreceptors like every other sensory neuron. Full numbers are in `analysis/regions.json`.
|
| 75 |
+
|
| 76 |
## Limitations
|
| 77 |
|
| 78 |
+
- One shuffle and three runs per graph. There's no plain MLP baseline.
|
| 79 |
- It's a rate model with rough transmitter signs. Nothing spikes, there's no real timing, and backprop is nothing like how flies learn.
|
| 80 |
+
- The shaders were checked against PyTorch with wgpu-native on a CPU Vulkan driver: same moves, logits within 5e-6.
|
| 81 |
- Running it needs WebGPU, a 225 MB download, and storage buffers of at least ~102 MB.
|
| 82 |
|
| 83 |
## License
|