NathanRoll commited on
Commit
0cd28b8
·
verified ·
1 Parent(s): ea456ec

Upload Nauro H01 cortex network — connectome, model, and visualizations

Browse files
.gitattributes CHANGED
@@ -33,3 +33,15 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ brain_comparison.png filter=lfs diff=lfs merge=lfs -text
37
+ simulation.png filter=lfs diff=lfs merge=lfs -text
38
+ views/bio_bottom_up.png filter=lfs diff=lfs merge=lfs -text
39
+ views/bio_front.png filter=lfs diff=lfs merge=lfs -text
40
+ views/bio_rear.png filter=lfs diff=lfs merge=lfs -text
41
+ views/bio_side.png filter=lfs diff=lfs merge=lfs -text
42
+ views/bio_top.png filter=lfs diff=lfs merge=lfs -text
43
+ views/sim_bottom_up.png filter=lfs diff=lfs merge=lfs -text
44
+ views/sim_front.png filter=lfs diff=lfs merge=lfs -text
45
+ views/sim_rear.png filter=lfs diff=lfs merge=lfs -text
46
+ views/sim_side.png filter=lfs diff=lfs merge=lfs -text
47
+ views/sim_top.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: pytorch
4
+ tags:
5
+ - neuroscience
6
+ - neural-network
7
+ - connectome
8
+ - brain
9
+ - h01
10
+ - cortex
11
+ - biology
12
+ - human-brain
13
+ - temporal-cortex
14
+ - brain-inspired
15
+ pipeline_tag: other
16
+ datasets:
17
+ - google/h01-release
18
+ ---
19
+
20
+ # Nauro — H01 Human Cortex Neural Network
21
+
22
+ A **neural network** whose units and connections are derived *exactly* from a
23
+ nanometer-resolution reconstruction of **human temporal cortex**
24
+ ([H01 dataset](https://h01-release.storage.googleapis.com/data.html),
25
+ Google/Harvard/Lichtman Lab).
26
+
27
+ ## What is this?
28
+
29
+ This repository contains a fully initialized PyTorch `nn.Module` with
30
+ **2,106 units** and **3,041 connections** arranged in the
31
+ exact same pattern as real neurons and synapses in a full of 1 mm³ sample of
32
+ a human brain.
33
+
34
+ Every unit occupies its real 3-D soma position. Every connection carries its
35
+ measured synaptic strength. Dale's law is enforced: excitatory neurons
36
+ contribute only positive current, inhibitory neurons only negative.
37
+
38
+ | Property | Value |
39
+ |----------|-------|
40
+ | Neurons | 2,106 |
41
+ | Excitatory | 1,466 |
42
+ | Inhibitory | 475 |
43
+ | Synapses (non-zero) | 3,041 |
44
+ | Connectivity density | 0.07% |
45
+ | External inputs | 2,576,814 |
46
+ | Volume | full of 1 mm³ |
47
+
48
+ ## Architecture
49
+
50
+ | Parameter | Value |
51
+ |-----------|-------|
52
+ | Network type | Recurrent (connectome topology) |
53
+ | Activation | relu |
54
+ | Inhibitory gain | ×4 |
55
+ | Weight scaling | 1 / mean_in_degree |
56
+ | Dale's law | Enforced (frozen sign mask) |
57
+
58
+ ## Connectivity by cortical layer
59
+
60
+ | Layer | Neurons | Exc | Inh | Connections | Density |
61
+ |-------|---------|-----|-----|-------------|---------|
62
+ | Layer 1 | 48 | 18 | 3 | 0 | 0.0000% |
63
+ | Layer 2 | 120 | 66 | 43 | 51 | 0.3542% |
64
+ | Layer 3 | 320 | 200 | 106 | 420 | 0.4102% |
65
+ | Layer 4 | 1,002 | 748 | 196 | 1,367 | 0.1362% |
66
+ | Layer 5 | 441 | 314 | 100 | 385 | 0.1980% |
67
+ | Layer 6 | 106 | 80 | 13 | 112 | 0.9968% |
68
+ | White matter | 3 | 0 | 0 | 1 | 11.1111% |
69
+ | unclassified | 66 | 40 | 14 | 8 | 0.1837% |
70
+
71
+ ## Degree distribution
72
+
73
+ | Metric | In-degree | Out-degree |
74
+ |--------|-----------|------------|
75
+ | Mean | 1.4 | 1.4 |
76
+ | Std | 1.9 | 2.1 |
77
+ | Median | 1.0 | 1.0 |
78
+ | Max | 17 | 24 |
79
+
80
+ ## Network activity
81
+
82
+ | Metric | Value |
83
+ |--------|-------|
84
+ | Steps | 100 |
85
+ | Mean activation | nan |
86
+ | Max activation | nan |
87
+ | Active neurons | 0/2106 (0%) |
88
+
89
+ ![Simulation](simulation.png)
90
+ ![Brain comparison](brain_comparison.png)
91
+
92
+
93
+ ## Multi-angle views
94
+
95
+ ### Bottom Up
96
+ | Biological | Simulated |
97
+ |---|---|
98
+ | ![bio_bottom_up](views/bio_bottom_up.png) | ![sim_bottom_up](views/sim_bottom_up.png) |
99
+
100
+ ### Front
101
+ | Biological | Simulated |
102
+ |---|---|
103
+ | ![bio_front](views/bio_front.png) | ![sim_front](views/sim_front.png) |
104
+
105
+ ### Rear
106
+ | Biological | Simulated |
107
+ |---|---|
108
+ | ![bio_rear](views/bio_rear.png) | ![sim_rear](views/sim_rear.png) |
109
+
110
+ ### Side
111
+ | Biological | Simulated |
112
+ |---|---|
113
+ | ![bio_side](views/bio_side.png) | ![sim_side](views/sim_side.png) |
114
+
115
+ ### Top
116
+ | Biological | Simulated |
117
+ |---|---|
118
+ | ![bio_top](views/bio_top.png) | ![sim_top](views/sim_top.png) |
119
+
120
+
121
+
122
+ ## Quick start
123
+
124
+ ```python
125
+ import json, numpy as np, torch
126
+ from safetensors.torch import load_file
127
+
128
+ # Load everything
129
+ config = json.load(open("config.json"))
130
+ weights = load_file("connectome.safetensors")["weights"] # (N, N) synapse counts
131
+ meta = np.load("metadata.npz", allow_pickle=True)
132
+ edges = np.load("edges.npz")["edges"] # (M, 3) [pre, post, type]
133
+
134
+ print(f"{config['n_neurons']} neurons, {config['n_synapses']} synapses")
135
+ print(f"Positions shape: {meta['positions'].shape}")
136
+ print(f"Edge list shape: {edges.shape}")
137
+
138
+ # Load the initialized network model
139
+ state_dict = load_file("model.safetensors")
140
+ ```
141
+
142
+ ### Reconstruct the connectome from the edge list
143
+
144
+ ```python
145
+ N = config["n_neurons"]
146
+ W = torch.zeros(N, N)
147
+ for pre, post, stype in edges:
148
+ W[post, pre] += 1.0
149
+ # W[i, j] = number of synapses from neuron j → neuron i
150
+ ```
151
+
152
+ ### Access neuron metadata
153
+
154
+ ```python
155
+ import pandas as pd
156
+ somas = pd.read_csv("somas_filtered.csv")
157
+ print(somas[["celltype", "layer"]].value_counts())
158
+ ```
159
+
160
+ ## Files
161
+
162
+ | File | Description | Size hint |
163
+ |------|-------------|-----------|
164
+ | `model.safetensors` | Full model state dict (weights, mask, positions) | ~NxN×4 bytes |
165
+ | `connectome.safetensors` | Raw NxN weight matrix | ~NxN×4 bytes |
166
+ | `edges.npz` | Filtered edge list `[pre, post, type]` | ~M×12 bytes |
167
+ | `metadata.npz` | Positions, types, layers, segment IDs | small |
168
+ | `somas_filtered.csv` | Filtered neuron table from H01 | ~1 MB |
169
+ | `config.json` | All hyperparameters + build stats | small |
170
+ | `layer_stats.json` | Per-layer connectivity statistics | small |
171
+ | `camera_params.json` | Exact camera angles for all views | small |
172
+ | `simulation.png` | Activation heatmap + mean activity + traces | ~300 KB |
173
+ | `brain_comparison.png` | Side-by-side bio vs sim (main angle) | ~1 MB |
174
+ | `views/` | Multi-angle 3D renders (bio + sim) | ~5 MB |
175
+
176
+ ## Data source
177
+
178
+ The connectome data is from the
179
+ [H01 release](https://h01-release.storage.googleapis.com/data.html)
180
+ by Google Research and the Lichtman Laboratory at Harvard University.
181
+ The original 1.4 petabyte dataset was imaged via serial-section electron
182
+ microscopy at 4 nm × 4 nm × 33 nm resolution.
183
+
184
+ > Shapson-Coe, A. et al. "A petavoxel fragment of human cerebral cortex
185
+ > reconstructed at nanoscale resolution." *Science* 384, eadk4858 (2024).
186
+
187
+ ## License
188
+
189
+ Apache 2.0. The underlying H01 data is subject to
190
+ [Google's release terms](https://h01-release.storage.googleapis.com/data.html).
brain_comparison.png ADDED

Git LFS Details

  • SHA256: f77971578c9e262ee3f3fb59af7621649357a124cf68c8f14f95140470f64a09
  • Pointer size: 132 Bytes
  • Size of remote file: 1.68 MB
camera_params.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "front": {
3
+ "elevation": 15.0,
4
+ "azimuth": -60.0
5
+ },
6
+ "top": {
7
+ "elevation": 80.0,
8
+ "azimuth": -60.0
9
+ },
10
+ "side": {
11
+ "elevation": 15.0,
12
+ "azimuth": 0.0
13
+ },
14
+ "rear": {
15
+ "elevation": 15.0,
16
+ "azimuth": 120.0
17
+ },
18
+ "bottom_up": {
19
+ "elevation": -30.0,
20
+ "azimuth": -60.0
21
+ }
22
+ }
config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "gcs_bucket": "h01-release",
3
+ "somas_path": "data/20210601/c3/tables/somas.csv",
4
+ "synapse_export_prefix": "data/20210729/c3/synapses/exported/export",
5
+ "n_synapse_shards": 166,
6
+ "data_dir": "data",
7
+ "min_confidence": 0.5,
8
+ "neuron_types": [
9
+ "PYRAMIDAL",
10
+ "INTERNEURON",
11
+ "SPINY_STELLATE",
12
+ "SPINY_ATYPICAL",
13
+ "SPINY_NONPYRAMIDAL",
14
+ "UNCLASSIFIED_NEURON"
15
+ ],
16
+ "excitatory_types": [
17
+ "PYRAMIDAL",
18
+ "SPINY_STELLATE",
19
+ "SPINY_ATYPICAL",
20
+ "SPINY_NONPYRAMIDAL"
21
+ ],
22
+ "inhibitory_types": [
23
+ "INTERNEURON"
24
+ ],
25
+ "inhibitory_gain": 4.0,
26
+ "activation": "relu",
27
+ "crop_fraction": null,
28
+ "n_steps": 100,
29
+ "input_scale": 0.1,
30
+ "device": "cuda",
31
+ "n_neurons": 2106,
32
+ "n_synapses": 3041,
33
+ "n_excitatory": 1466,
34
+ "n_inhibitory": 475,
35
+ "density": 0.0006856455890960481,
36
+ "n_external_inputs": 2576814,
37
+ "n_edges_raw": 4885
38
+ }
connectome.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d529847f5ed1c356d9865baf2987c10eb3d68a12913442f50cac2d1ecabd21f
3
+ size 17741032
edges.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6207c3ed98524c645a16e593d06b05dab3bb64d1cc1e58bba141d26715455f09
3
+ size 19776
layer_stats.json ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "layers": [
3
+ {
4
+ "layer": "Layer 1",
5
+ "n_neurons": 48,
6
+ "n_excitatory": 18,
7
+ "n_inhibitory": 3,
8
+ "internal_connections": 0,
9
+ "density": 0.0
10
+ },
11
+ {
12
+ "layer": "Layer 2",
13
+ "n_neurons": 120,
14
+ "n_excitatory": 66,
15
+ "n_inhibitory": 43,
16
+ "internal_connections": 51,
17
+ "density": 0.003542
18
+ },
19
+ {
20
+ "layer": "Layer 3",
21
+ "n_neurons": 320,
22
+ "n_excitatory": 200,
23
+ "n_inhibitory": 106,
24
+ "internal_connections": 420,
25
+ "density": 0.004102
26
+ },
27
+ {
28
+ "layer": "Layer 4",
29
+ "n_neurons": 1002,
30
+ "n_excitatory": 748,
31
+ "n_inhibitory": 196,
32
+ "internal_connections": 1367,
33
+ "density": 0.001362
34
+ },
35
+ {
36
+ "layer": "Layer 5",
37
+ "n_neurons": 441,
38
+ "n_excitatory": 314,
39
+ "n_inhibitory": 100,
40
+ "internal_connections": 385,
41
+ "density": 0.00198
42
+ },
43
+ {
44
+ "layer": "Layer 6",
45
+ "n_neurons": 106,
46
+ "n_excitatory": 80,
47
+ "n_inhibitory": 13,
48
+ "internal_connections": 112,
49
+ "density": 0.009968
50
+ },
51
+ {
52
+ "layer": "White matter",
53
+ "n_neurons": 3,
54
+ "n_excitatory": 0,
55
+ "n_inhibitory": 0,
56
+ "internal_connections": 1,
57
+ "density": 0.111111
58
+ },
59
+ {
60
+ "layer": "unclassified",
61
+ "n_neurons": 66,
62
+ "n_excitatory": 40,
63
+ "n_inhibitory": 14,
64
+ "internal_connections": 8,
65
+ "density": 0.001837
66
+ }
67
+ ],
68
+ "degrees": {
69
+ "in_degree_mean": 1.4,
70
+ "in_degree_std": 1.9,
71
+ "in_degree_max": 17,
72
+ "in_degree_median": 1.0,
73
+ "out_degree_mean": 1.4,
74
+ "out_degree_std": 2.1,
75
+ "out_degree_max": 24,
76
+ "out_degree_median": 1.0
77
+ }
78
+ }
metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3bdcb57dda30ee9a15b820e6043c4c032cfd84cb85452624d12de7b288f3ab2c
3
+ size 37330
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e11497389d427f74047bd5882e2b89d896940125e2ae776cf912cf5466e8dfdd
3
+ size 35515904
simulation.png ADDED

Git LFS Details

  • SHA256: f09a2e1252e216a1f98ef5a39b4b257ac5e0ea03c8acaa134a4bbb26f117b9c4
  • Pointer size: 131 Bytes
  • Size of remote file: 172 kB
somas_filtered.csv ADDED
The diff for this file is too large to render. See raw diff
 
views/bio_bottom_up.png ADDED

Git LFS Details

  • SHA256: 725110b6213788001bea4081a2309388bc7194188165fe40043d4a53ee925089
  • Pointer size: 131 Bytes
  • Size of remote file: 766 kB
views/bio_front.png ADDED

Git LFS Details

  • SHA256: 61c008194b942d5272afa12d73dd7bc8c1a0c60312310fff2b5292c520b85f00
  • Pointer size: 131 Bytes
  • Size of remote file: 731 kB
views/bio_rear.png ADDED

Git LFS Details

  • SHA256: 8f0d26dff2128a1c73c9d3cf66f04fdf0c0518d9eeb72035ffe572491a392e9b
  • Pointer size: 131 Bytes
  • Size of remote file: 762 kB
views/bio_side.png ADDED

Git LFS Details

  • SHA256: 0b13ad1d9a2ebc82f9e0dfad2f7497066a84f0476c319ea0e7de89eba55de1d6
  • Pointer size: 131 Bytes
  • Size of remote file: 921 kB
views/bio_top.png ADDED

Git LFS Details

  • SHA256: fd79e0910fc0f2abb53d55bafeaa832da7c62cae2c9e11f35901e3edaa43bdd3
  • Pointer size: 131 Bytes
  • Size of remote file: 652 kB
views/camera_params.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "front": {
3
+ "elevation": 15.0,
4
+ "azimuth": -60.0
5
+ },
6
+ "top": {
7
+ "elevation": 80.0,
8
+ "azimuth": -60.0
9
+ },
10
+ "side": {
11
+ "elevation": 15.0,
12
+ "azimuth": 0.0
13
+ },
14
+ "rear": {
15
+ "elevation": 15.0,
16
+ "azimuth": 120.0
17
+ },
18
+ "bottom_up": {
19
+ "elevation": -30.0,
20
+ "azimuth": -60.0
21
+ }
22
+ }
views/sim_bottom_up.png ADDED

Git LFS Details

  • SHA256: 687b8cd9b2cd60808f1b111a17644f6bfc107e6b27b1f83fdf2e8c49451cb4a3
  • Pointer size: 131 Bytes
  • Size of remote file: 257 kB
views/sim_front.png ADDED

Git LFS Details

  • SHA256: b57c7e3fc7cd1d9f46f9c4f6a844591c26fce07a4a4def659b4abdf7c44f2964
  • Pointer size: 131 Bytes
  • Size of remote file: 240 kB
views/sim_rear.png ADDED

Git LFS Details

  • SHA256: 61f0975fec2c5371bb7ced2e7f231e2eb11848e237143662e7df067ee88f59ec
  • Pointer size: 131 Bytes
  • Size of remote file: 254 kB
views/sim_side.png ADDED

Git LFS Details

  • SHA256: dcf85cbd427251b415ed1a9e924f939c72539d8692fff509f681d7086ac7e120
  • Pointer size: 131 Bytes
  • Size of remote file: 352 kB
views/sim_top.png ADDED

Git LFS Details

  • SHA256: 8328f457b6d02d356899ffe9d4c2e4c8679e97d9b15710daa9b8e4cbf61083c7
  • Pointer size: 131 Bytes
  • Size of remote file: 223 kB