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

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

Browse files
Files changed (7) hide show
  1. README.md +57 -113
  2. config.json +31 -8
  3. connectome.safetensors +2 -2
  4. edges.npz +2 -2
  5. layer_stats.json +56 -48
  6. metadata.npz +2 -2
  7. somas_filtered.csv +0 -0
README.md CHANGED
@@ -12,112 +12,60 @@ tags:
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
 
@@ -127,19 +75,28 @@ 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"]
@@ -149,29 +106,16 @@ for pre, post, stype in edges:
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
 
@@ -186,5 +130,5 @@ microscopy at 4 nm × 4 nm × 33 nm resolution.
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).
 
12
  - human-brain
13
  - temporal-cortex
14
  - brain-inspired
15
+ - spiking-neural-network
16
+ - reservoir-computing
17
  pipeline_tag: other
18
  datasets:
19
  - google/h01-release
20
  ---
21
 
22
+ # Nauro — H01 Human Cortex Connectome (Full)
23
 
24
+ The **complete** neuron-to-neuron connectivity matrix extracted from a
25
  nanometer-resolution reconstruction of **human temporal cortex**
26
  ([H01 dataset](https://h01-release.storage.googleapis.com/data.html),
27
  Google/Harvard/Lichtman Lab).
28
 
29
+ Built from all 166 Avro synapse shards (~32 GB raw data), filtered at
30
+ ≥0.50 confidence. This is the full connectome — no spatial cropping.
31
 
32
+ ## Summary
 
 
 
 
 
 
 
33
 
34
  | Property | Value |
35
  |----------|-------|
36
+ | Neurons | 16,087 |
37
+ | Excitatory | 10,531 (65.4%) |
38
+ | Inhibitory | 4,688 (29.1%) |
39
+ | Non-zero connections | 76,903 |
40
+ | Raw edges (pre-aggregation) | 116,611 |
41
+ | Connectivity density | 0.030% |
42
+ | Mean in-degree | 4.8 |
43
+ | Max in-degree | 70 |
44
+ | External inputs (total) | 27,022,313 |
45
+ | Volume | Full 1 mm³ |
46
+ | Cortical layers | L1–L6 + white matter |
47
+ | Build | All 166 GCS shards, min_confidence=0.50 |
 
 
 
 
 
48
 
49
  ## Connectivity by cortical layer
50
 
51
+ | Layer | Neurons | Exc | Inh | Internal connections | Density |
52
+ |-------|---------|-----|-----|---------------------|---------|
53
+ | Layer 1 | 827 | 85 | 586 | 55 | 0.008% |
54
+ | Layer 2 | 4,656 | 2,952 | 1,594 | 21,845 | 0.101% |
55
+ | Layer 3 | 2,692 | 1,673 | 965 | 11,018 | 0.152% |
56
+ | Layer 4 | 3,440 | 2,622 | 688 | 8,748 | 0.074% |
57
+ | Layer 5 | 2,313 | 1,665 | 505 | 6,252 | 0.117% |
58
+ | Layer 6 | 1,077 | 906 | 128 | 4,419 | 0.381% |
59
+ | White matter | 648 | 395 | 111 | 732 | 0.174% |
 
60
 
61
  ## Degree distribution
62
 
63
  | Metric | In-degree | Out-degree |
64
  |--------|-----------|------------|
65
+ | Mean | 4.8 | 4.8 |
66
+ | Std | 6.3 | 7.0 |
67
+ | Median | 3.0 | 2.0 |
68
+ | Max | 70 | 124 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
  ## Quick start
71
 
 
75
 
76
  # Load everything
77
  config = json.load(open("config.json"))
78
+ weights = load_file("connectome.safetensors")["weights"] # (16087, 16087)
79
  meta = np.load("metadata.npz", allow_pickle=True)
80
+ edges = np.load("edges.npz")["edges"] # (116611, 3)
81
+
82
+ print(f"{config['n_neurons']} neurons, {config['n_synapses']} connections")
83
+ print(f"Weight matrix: {weights.shape}, density: {config['density']:.4%}")
84
+ ```
85
 
86
+ ### Load via HuggingFace Hub
 
 
87
 
88
+ ```python
89
+ from huggingface_hub import hf_hub_download
90
+ from safetensors.torch import load_file
91
+ import numpy as np
92
+
93
+ repo = "NathanRoll/h01-cortex-snn"
94
+ weights = load_file(hf_hub_download(repo, "connectome.safetensors"))["weights"]
95
+ meta = np.load(hf_hub_download(repo, "metadata.npz"), allow_pickle=True)
96
+ print(f"Loaded {weights.shape[0]} neurons")
97
  ```
98
 
99
+ ### Reconstruct from edge list
100
 
101
  ```python
102
  N = config["n_neurons"]
 
106
  # W[i, j] = number of synapses from neuron j → neuron i
107
  ```
108
 
 
 
 
 
 
 
 
 
109
  ## Files
110
 
111
+ | File | Description | Size |
112
+ |------|-------------|------|
113
+ | `connectome.safetensors` | Full 16,087×16,087 weight matrix | ~1 GB |
114
+ | `edges.npz` | Raw edge list `[pre, post, type]` | ~0.6 MB |
115
+ | `metadata.npz` | Positions, cell types, layers, segment IDs | ~0.3 MB |
116
+ | `somas_filtered.csv` | Neuron table (positions, types, layers) | ~1.1 MB |
117
+ | `config.json` | Build parameters + summary statistics | small |
 
118
  | `layer_stats.json` | Per-layer connectivity statistics | small |
 
 
 
 
119
 
120
  ## Data source
121
 
 
130
 
131
  ## License
132
 
133
+ Apache 2.0. The underlying H01 data is subject to
134
  [Google's release terms](https://h01-release.storage.googleapis.com/data.html).
config.json CHANGED
@@ -23,16 +23,39 @@
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
  }
 
23
  "INTERNEURON"
24
  ],
25
  "inhibitory_gain": 4.0,
26
+ "activation": "tanh",
27
+ "spectral_radius": 0.9,
28
+ "leak_rate": 0.3,
29
  "crop_fraction": null,
30
  "n_steps": 100,
31
  "input_scale": 0.1,
32
+ "neuron_model": "rate",
33
+ "dt_ms": 1.0,
34
+ "tau_m_exc": 20.0,
35
+ "tau_m_inh": 10.0,
36
+ "v_threshold": -50.0,
37
+ "v_reset": -65.0,
38
+ "v_rest": -65.0,
39
+ "tau_w": 150.0,
40
+ "adaptation_b": 0.08,
41
+ "experiment_name": "default",
42
+ "seed": 42,
43
+ "duration_ms": 5000.0,
44
+ "warmup_ms": 1000.0,
45
+ "control_types": [
46
+ "erdos_renyi",
47
+ "configuration_model",
48
+ "spatial_random",
49
+ "layer_preserving"
50
+ ],
51
+ "n_control_instances": 5,
52
  "device": "cuda",
53
+ "n_neurons": 16087,
54
+ "n_synapses": 76903,
55
+ "n_excitatory": 10531,
56
+ "n_inhibitory": 4688,
57
+ "density": 0.00029716192183988806,
58
+ "n_external_inputs": 27022313,
59
+ "n_edges_raw": 116611,
60
+ "build": "full_166_shards"
61
  }
connectome.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8d529847f5ed1c356d9865baf2987c10eb3d68a12913442f50cac2d1ecabd21f
3
- size 17741032
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1df19314f95b35b8bdda3429c8b50c782147f2cc2a32c1182a672c9765ee15fc
3
+ size 1035166364
edges.npz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6207c3ed98524c645a16e593d06b05dab3bb64d1cc1e58bba141d26715455f09
3
- size 19776
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d685966d1818b32c89f6bd53c0a56a39c4e046899935c9318b250525d2cbd572
3
+ size 627858
layer_stats.json CHANGED
@@ -2,77 +2,85 @@
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
  }
 
2
  "layers": [
3
  {
4
  "layer": "Layer 1",
5
+ "n_neurons": 827,
6
+ "n_excitatory": 85,
7
+ "n_inhibitory": 586,
8
+ "internal_connections": 55,
9
+ "density": 8e-05
10
  },
11
  {
12
  "layer": "Layer 2",
13
+ "n_neurons": 4656,
14
+ "n_excitatory": 2952,
15
+ "n_inhibitory": 1594,
16
+ "internal_connections": 21845,
17
+ "density": 0.001008
18
  },
19
  {
20
  "layer": "Layer 3",
21
+ "n_neurons": 2692,
22
+ "n_excitatory": 1673,
23
+ "n_inhibitory": 965,
24
+ "internal_connections": 11018,
25
+ "density": 0.00152
26
  },
27
  {
28
  "layer": "Layer 4",
29
+ "n_neurons": 3440,
30
+ "n_excitatory": 2622,
31
+ "n_inhibitory": 688,
32
+ "internal_connections": 8748,
33
+ "density": 0.000739
34
  },
35
  {
36
  "layer": "Layer 5",
37
+ "n_neurons": 2313,
38
+ "n_excitatory": 1665,
39
+ "n_inhibitory": 505,
40
+ "internal_connections": 6252,
41
+ "density": 0.001169
42
  },
43
  {
44
  "layer": "Layer 6",
45
+ "n_neurons": 1077,
46
+ "n_excitatory": 906,
47
+ "n_inhibitory": 128,
48
+ "internal_connections": 4419,
49
+ "density": 0.00381
50
  },
51
  {
52
  "layer": "White matter",
53
+ "n_neurons": 648,
54
+ "n_excitatory": 395,
55
+ "n_inhibitory": 111,
56
+ "internal_connections": 732,
57
+ "density": 0.001743
58
  },
59
  {
60
  "layer": "unclassified",
61
+ "n_neurons": 351,
62
+ "n_excitatory": 203,
63
+ "n_inhibitory": 89,
64
+ "internal_connections": 174,
65
+ "density": 0.001412
66
+ },
67
+ {
68
+ "layer": "unknown",
69
+ "n_neurons": 83,
70
+ "n_excitatory": 30,
71
+ "n_inhibitory": 22,
72
+ "internal_connections": 3,
73
+ "density": 0.000435
74
  }
75
  ],
76
  "degrees": {
77
+ "in_degree_mean": 4.8,
78
+ "in_degree_std": 6.3,
79
+ "in_degree_max": 70,
80
+ "in_degree_median": 3.0,
81
+ "out_degree_mean": 4.8,
82
+ "out_degree_std": 7.0,
83
+ "out_degree_max": 124,
84
+ "out_degree_median": 2.0
85
  }
86
  }
metadata.npz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3bdcb57dda30ee9a15b820e6043c4c032cfd84cb85452624d12de7b288f3ab2c
3
- size 37330
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce26bffbb2107bb4c6805d0f52a313d59a6b6b52452807907ef3d9f260e87743
3
+ size 283125
somas_filtered.csv CHANGED
The diff for this file is too large to render. See raw diff