cyd0806 commited on
Commit
c8e36f5
·
verified ·
1 Parent(s): 22b892d

Add pair-isolated P1 v2.2 geometry experiments, fine-type baseline and reproducible inputs

Browse files
Files changed (44) hide show
  1. .gitattributes +1 -0
  2. README.md +29 -7
  3. SHA256SUMS.json +208 -3
  4. p1_v2_fine_types/EXECUTION_LOG.md +10 -0
  5. p1_v2_fine_types/MODEL_COMPARISON.csv +6 -0
  6. p1_v2_fine_types/P1_REPORT.md +41 -0
  7. p1_v2_fine_types/P1_STATUS.json +11 -0
  8. p1_v2_fine_types/analysis/CM019_residual_child_overlap.csv +19 -0
  9. p1_v2_fine_types/analysis/complete_parent_splits.csv +37 -0
  10. p1_v2_fine_types/analysis/discovery_ablation.csv +7 -0
  11. p1_v2_fine_types/analysis/parent_candidate_counts.csv +9 -0
  12. p1_v2_fine_types/analysis/vertex_bootstrap_exploratory.csv +5 -0
  13. p1_v2_fine_types/audit/competition_literature_lookup.json +12 -0
  14. p1_v2_fine_types/audit/environment.json +15 -0
  15. p1_v2_fine_types/audit/finalizer_snapshot.py +125 -0
  16. p1_v2_fine_types/audit/malecns_id_QC.json +12 -0
  17. p1_v2_fine_types/audit/pair_split_QC.json +11 -0
  18. p1_v2_fine_types/audit/primitives_snapshot.py +58 -0
  19. p1_v2_fine_types/audit/protocol.json +69 -0
  20. p1_v2_fine_types/audit/release_source_manifest.json +5 -0
  21. p1_v2_fine_types/audit/run.log +14 -0
  22. p1_v2_fine_types/audit/runner_snapshot.py +197 -0
  23. p1_v2_fine_types/audit/source_manifest.json +0 -0
  24. p1_v2_fine_types/audit/standalone_replay_checks.json +7 -0
  25. p1_v2_fine_types/audit/structural_checks.csv +11 -0
  26. p1_v2_fine_types/data/contact_free_tree_features.parquet +3 -0
  27. p1_v2_fine_types/data/directed_pair_split.parquet +3 -0
  28. p1_v2_fine_types/data/feature_schema.json +27 -0
  29. p1_v2_fine_types/data/pair_grouped_train.npz +3 -0
  30. p1_v2_fine_types/data/prediction_pairs.parquet +3 -0
  31. p1_v2_fine_types/data/test_predictions.parquet +3 -0
  32. p1_v2_fine_types/data/train_only_embedding.npy +3 -0
  33. p1_v2_fine_types/figure_source_ledger.csv +5 -0
  34. p1_v2_fine_types/figures/CM019_full_parent_somata.pdf +0 -0
  35. p1_v2_fine_types/figures/CM019_full_parent_somata.svg +0 -0
  36. p1_v2_fine_types/figures/spatial_fusion_ablation.pdf +3 -0
  37. p1_v2_fine_types/figures/spatial_fusion_ablation.svg +0 -0
  38. p1_v2_fine_types/registry/CM_SU_crosswalk.csv +64 -0
  39. p1_v2_fine_types/registry/P1_exploratory_assignments.parquet +3 -0
  40. p1_v2_fine_types/registry/all5177_identity.parquet +3 -0
  41. p1_v2_fine_types/registry/ap1L_18_exploratory_members.parquet +3 -0
  42. p1_v2_fine_types/registry/malecns_unmatched_endpoints.csv +0 -0
  43. p1_v2_fine_types/registry/parent_candidate_residual_atlas.parquet +3 -0
  44. p1_v2_fine_types/registry/parent_child_members.parquet +3 -0
.gitattributes CHANGED
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ p1_v2_fine_types/figures/spatial_fusion_ablation.pdf filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  # NeuronMimic reusable data (2026-10-30)
2
 
3
  This dataset contains compact, source-bound tables and a deterministic passive
@@ -11,13 +20,11 @@ BioFly project at `artifacts/wu_20261030_science_gate/WU_REQUIREMENTS_STATUS_202
11
 
12
  ## Contents
13
 
14
- - `physics_teacher/`: deterministic 12-compartment Teacher stimulus panel,
15
- train/held-out arrays, model comparison, finite-difference gradient check,
16
- and Teacher-rechecked active-search results. Every file is
17
- `FIXTURE_TEST_ONLY`.
18
- - `malecns/`: normalized MaleCNS v1.0 directed aggregate edges and annotations,
19
- with source hashes. These are `VERIFIED_REAL_DATA` structural tables, while
20
- contact-to-branch mapping is explicitly blocked.
21
  - `flywire_kc_atlas/`: compact all-5,177-cell structural profiles and the
22
  source-bound 20-unit entry registry. This is single-connectome structural
23
  evidence, not independent biological replication.
@@ -45,3 +52,18 @@ and held-out physiological recordings.
45
  ## Corrected P0 release
46
 
47
  Use `p0_corrected_20261030/fixture_v2/` for reproducible Teacher data, four model baselines, and corrected results. Historical metric files are invalidated; see `HISTORICAL_METRICS_INVALIDATED.md`. All cable experiments are FIXTURE_TEST_ONLY. Code and scientific metric tests: https://github.com/ydchen0806/neuronmimic . Known-equation PhysicsOnly is more accurate than the trained Students; no biological or speed-accuracy advantage is established.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - zh
5
+ tags:
6
+ - neuroscience
7
+ - connectomics
8
+ - reproducibility
9
+ ---
10
  # NeuronMimic reusable data (2026-10-30)
11
 
12
  This dataset contains compact, source-bound tables and a deterministic passive
 
20
 
21
  ## Contents
22
 
23
+ - `physics_teacher/`: historical fixture archive. Its old evaluation metrics are
24
+ **INVALIDATED**; use `p0_corrected_20261030/fixture_v2/` instead.
25
+ - `malecns/`: historical normalized source-bound aggregate tables. Endpoint annotation
26
+ joins are **BLOCKED**: 31,355 edge endpoint IDs do not match even the full source id
27
+ column. These tables are not a validated complete CNS or simulation-ready network.
 
 
28
  - `flywire_kc_atlas/`: compact all-5,177-cell structural profiles and the
29
  source-bound 20-unit entry registry. This is single-connectome structural
30
  evidence, not independent biological replication.
 
52
  ## Corrected P0 release
53
 
54
  Use `p0_corrected_20261030/fixture_v2/` for reproducible Teacher data, four model baselines, and corrected results. Historical metric files are invalidated; see `HISTORICAL_METRICS_INVALIDATED.md`. All cable experiments are FIXTURE_TEST_ONLY. Code and scientific metric tests: https://github.com/ydchen0806/neuronmimic . Known-equation PhysicsOnly is more accurate than the trained Students; no biological or speed-accuracy advantage is established.
55
+
56
+ ## P1-v2.2 geometry and structure release
57
+
58
+ `p1_v2_fine_types/` contains the 5,177-cell identity registry, CM/SU crosswalk,
59
+ all directed pair split assignments, contact-free tree descriptors, six genuine spatial
60
+ fusion ablations, full-parent child membership, model predictions, figures and audit receipts.
61
+ See its P1_REPORT.md for conclusions and limits. The 18-cell left-ap1 residual subset
62
+ is exploratory, not a validated functional unit. Original stable8 remains unchanged.
63
+
64
+ Reproduction instructions: https://github.com/ydchen0806/neuronmimic/blob/master/docs/P1_REPRODUCE.md .
65
+ The full soma distance matrix is exactly regenerated by the script rather than downloaded.
66
+ Raw-source audits and geometry extraction are not rerun by the compact replay; their
67
+ original hashes and receipts are provided. Do not treat imported audit receipts as a fresh audit.
68
+ Upstream data retain their original source terms; this release does not grant a new license
69
+ for the original connectomes. No independent physiology or wet-lab calibration data are included.
SHA256SUMS.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "dataset": "neuronmimic-data",
3
- "version": "2026-10-30-P0-corrected",
4
  "files": [
5
  {
6
  "path": "HISTORICAL_METRICS_INVALIDATED.md",
@@ -9,8 +9,8 @@
9
  },
10
  {
11
  "path": "README.md",
12
- "bytes": 2469,
13
- "sha256": "66e2123904f71908b3392df85e221a556f4ae962edffc5e60b23a6a4f6e824f2"
14
  },
15
  {
16
  "path": "flywire_kc_atlas/all5177_cells.parquet",
@@ -167,6 +167,211 @@
167
  "bytes": 1273,
168
  "sha256": "131f2141c7aba2ea9f191c4010ef3adaf52fce5978e0762d7cd7d35e836dc9de"
169
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  {
171
  "path": "physics_teacher/active_search_teacher_rechecked.csv",
172
  "bytes": 2010,
 
1
  {
2
  "dataset": "neuronmimic-data",
3
+ "version": "2026-10-30-P0-corrected-P1-v2.2",
4
  "files": [
5
  {
6
  "path": "HISTORICAL_METRICS_INVALIDATED.md",
 
9
  },
10
  {
11
  "path": "README.md",
12
+ "bytes": 3561,
13
+ "sha256": "1e8c148e210a4f55de23f63d5e8c729f1936f1932df5f914bd24571ced21ef12"
14
  },
15
  {
16
  "path": "flywire_kc_atlas/all5177_cells.parquet",
 
167
  "bytes": 1273,
168
  "sha256": "131f2141c7aba2ea9f191c4010ef3adaf52fce5978e0762d7cd7d35e836dc9de"
169
  },
170
+ {
171
+ "path": "p1_v2_fine_types/EXECUTION_LOG.md",
172
+ "bytes": 879,
173
+ "sha256": "ac509cc278388d0f5584b271ff770c4897c03dbd3dc84216f05a1ffe31a08261"
174
+ },
175
+ {
176
+ "path": "p1_v2_fine_types/MODEL_COMPARISON.csv",
177
+ "bytes": 1675,
178
+ "sha256": "09e61fceb6fd41a3382365bcfa7a50778405146b2436525ae605d0f010cd46b7"
179
+ },
180
+ {
181
+ "path": "p1_v2_fine_types/P1_REPORT.md",
182
+ "bytes": 5383,
183
+ "sha256": "6f10d61b8368076b9dcd33a9687fac5a9047d5b1630a75e1382f0b113aef0413"
184
+ },
185
+ {
186
+ "path": "p1_v2_fine_types/P1_STATUS.json",
187
+ "bytes": 447,
188
+ "sha256": "bef95431eb5e195542c61d52c96a50c5e1ab5c4ee732605fd867d0b540d5ce23"
189
+ },
190
+ {
191
+ "path": "p1_v2_fine_types/analysis/CM019_residual_child_overlap.csv",
192
+ "bytes": 1178,
193
+ "sha256": "9e1ac1914f315777e0b2eebb843e050908469d94527a0aa746b698ebfbd743d1"
194
+ },
195
+ {
196
+ "path": "p1_v2_fine_types/analysis/complete_parent_splits.csv",
197
+ "bytes": 3092,
198
+ "sha256": "e74154274ebc04b7dbbef0d21d8367e8ab9c6bf55e0ff763e8781f9533433677"
199
+ },
200
+ {
201
+ "path": "p1_v2_fine_types/analysis/discovery_ablation.csv",
202
+ "bytes": 1273,
203
+ "sha256": "6064151513ce785c9a0158599abb2988ee4a0dc41a681659c31a308635129905"
204
+ },
205
+ {
206
+ "path": "p1_v2_fine_types/analysis/parent_candidate_counts.csv",
207
+ "bytes": 408,
208
+ "sha256": "48c730da0cfeb9c910dfe698fc52174386f673e65fd669643344cd2a10e21ae5"
209
+ },
210
+ {
211
+ "path": "p1_v2_fine_types/analysis/vertex_bootstrap_exploratory.csv",
212
+ "bytes": 1100,
213
+ "sha256": "15ac2bf43bd6f40356ffc5a94e1b1680f6cbf98d84c19a608cebe196f6ba49cb"
214
+ },
215
+ {
216
+ "path": "p1_v2_fine_types/audit/competition_literature_lookup.json",
217
+ "bytes": 275,
218
+ "sha256": "8a3dc3475c48a4f3b1ca1ea444850980560ce0aee153a13a318ee96ede568208"
219
+ },
220
+ {
221
+ "path": "p1_v2_fine_types/audit/environment.json",
222
+ "bytes": 432,
223
+ "sha256": "8801289aed1fcba7bb0fac98a994978da446d483828805a9a59677c06cffd0c9"
224
+ },
225
+ {
226
+ "path": "p1_v2_fine_types/audit/finalizer_snapshot.py",
227
+ "bytes": 12959,
228
+ "sha256": "acf21a9a721de1104da75075290cd16472e72bcb9e778e53d555c6d0c4c0e270"
229
+ },
230
+ {
231
+ "path": "p1_v2_fine_types/audit/malecns_id_QC.json",
232
+ "bytes": 397,
233
+ "sha256": "9e849f7412be762f50e290c044175076063caa6d10be32b4e26797ac71fa97c9"
234
+ },
235
+ {
236
+ "path": "p1_v2_fine_types/audit/pair_split_QC.json",
237
+ "bytes": 277,
238
+ "sha256": "f3794a661cad820c0bad80ca122db5eb369ef66aca2a02d52827a003ddf4392e"
239
+ },
240
+ {
241
+ "path": "p1_v2_fine_types/audit/primitives_snapshot.py",
242
+ "bytes": 2788,
243
+ "sha256": "5b5917ee598dc56bbe4cfbcfb24638dfcafd7438deb5d891d8f87e8d121d1bf4"
244
+ },
245
+ {
246
+ "path": "p1_v2_fine_types/audit/protocol.json",
247
+ "bytes": 2408,
248
+ "sha256": "e53795499f7d9297a692525a2468c6387728b52f4bb4f37267b28e9c638374cd"
249
+ },
250
+ {
251
+ "path": "p1_v2_fine_types/audit/release_source_manifest.json",
252
+ "bytes": 342,
253
+ "sha256": "5ad79bcc5d7993f660162368b8d4b13efaa65241e5f97c6b626074cb1d605fec"
254
+ },
255
+ {
256
+ "path": "p1_v2_fine_types/audit/run.log",
257
+ "bytes": 840,
258
+ "sha256": "431554d7cf91c92ad0d1d212f219de8d9da0ea7653334e2cc9bc7f9fcbe867fd"
259
+ },
260
+ {
261
+ "path": "p1_v2_fine_types/audit/runner_snapshot.py",
262
+ "bytes": 16302,
263
+ "sha256": "3880e3fd0c529a43c6e714584e9aa98fbfa08d1940980900644ff0baa88628ef"
264
+ },
265
+ {
266
+ "path": "p1_v2_fine_types/audit/source_manifest.json",
267
+ "bytes": 1117176,
268
+ "sha256": "8052f87e7da7a68ed86ce9c6cdb1ebfdf5863e10761aded89360b207cb61c3b6"
269
+ },
270
+ {
271
+ "path": "p1_v2_fine_types/audit/standalone_replay_checks.json",
272
+ "bytes": 257,
273
+ "sha256": "9d439a0c7ae1c3069611c611152dca3e82169463ed91ef78e5261236129fe4ee"
274
+ },
275
+ {
276
+ "path": "p1_v2_fine_types/audit/structural_checks.csv",
277
+ "bytes": 422,
278
+ "sha256": "6a76d649524a320cecbdbe20303af33a452716dc5e14af969cda4176b277d4db"
279
+ },
280
+ {
281
+ "path": "p1_v2_fine_types/data/contact_free_tree_features.parquet",
282
+ "bytes": 769954,
283
+ "sha256": "02faead833dd5b846efb11e749b0ced53252176e664d8adfb34897f7db4da2d4"
284
+ },
285
+ {
286
+ "path": "p1_v2_fine_types/data/directed_pair_split.parquet",
287
+ "bytes": 735097,
288
+ "sha256": "ac28bbbd928cc8f4459850ea35a8732fd6191228cc7fac5db048676d9f115891"
289
+ },
290
+ {
291
+ "path": "p1_v2_fine_types/data/feature_schema.json",
292
+ "bytes": 785,
293
+ "sha256": "1a2cb48fe28d9363b5f892faca5887ab6693a67d76ec517b958ce8c13b13d7ff"
294
+ },
295
+ {
296
+ "path": "p1_v2_fine_types/data/pair_grouped_train.npz",
297
+ "bytes": 465705,
298
+ "sha256": "c987937c78c13c5f3859859aafa0cf6ccf4ce28a8ca073e9a6273b9a46d590a8"
299
+ },
300
+ {
301
+ "path": "p1_v2_fine_types/data/prediction_pairs.parquet",
302
+ "bytes": 437528,
303
+ "sha256": "0011019ed8394c276f4311f136a87a00d7f3c2f7c774d3280e43c306031cf455"
304
+ },
305
+ {
306
+ "path": "p1_v2_fine_types/data/test_predictions.parquet",
307
+ "bytes": 847321,
308
+ "sha256": "d32a46516440e0ec07e1675e9e795c2409e9f86c1e241fe7f030f4806cc09c50"
309
+ },
310
+ {
311
+ "path": "p1_v2_fine_types/data/train_only_embedding.npy",
312
+ "bytes": 2650752,
313
+ "sha256": "06e47ce94f182181ef8989e371e1c56e88bb6ea5bc84edc0d0c8d1e28e39ace7"
314
+ },
315
+ {
316
+ "path": "p1_v2_fine_types/figure_source_ledger.csv",
317
+ "bytes": 1653,
318
+ "sha256": "7fe1089cf57c317a56d2abbce3407b2306377e9638cace3bbe012bd9f2d7c42c"
319
+ },
320
+ {
321
+ "path": "p1_v2_fine_types/figures/CM019_full_parent_somata.pdf",
322
+ "bytes": 52765,
323
+ "sha256": "b04e072d6163ea5a5ebefb3c0e46770ca8a56854bdf5271b461250c13749a241"
324
+ },
325
+ {
326
+ "path": "p1_v2_fine_types/figures/CM019_full_parent_somata.svg",
327
+ "bytes": 166014,
328
+ "sha256": "7fa152470f5b47fb64b8a7500f46a7eb8cce7e1777e9a7b18a446acbbd9bf691"
329
+ },
330
+ {
331
+ "path": "p1_v2_fine_types/figures/spatial_fusion_ablation.pdf",
332
+ "bytes": 245509,
333
+ "sha256": "866d72796bffd3cb07e65e8570a4445872c1af8748514a292d205a99a59f14f7"
334
+ },
335
+ {
336
+ "path": "p1_v2_fine_types/figures/spatial_fusion_ablation.svg",
337
+ "bytes": 397732,
338
+ "sha256": "181ea1daf6ff9dc4d5be30bab1b609fe0f05a8db76e71281718d1ad8a81b3fae"
339
+ },
340
+ {
341
+ "path": "p1_v2_fine_types/registry/CM_SU_crosswalk.csv",
342
+ "bytes": 783,
343
+ "sha256": "aae457b66ff7c470c7fd74065658d01d137e4954028aa7a8b9d7b04cb56c06fa"
344
+ },
345
+ {
346
+ "path": "p1_v2_fine_types/registry/P1_exploratory_assignments.parquet",
347
+ "bytes": 84120,
348
+ "sha256": "eab3c8ccdaf056fcd085820158de322da0c74f37ddb97b98bd246b073442bebd"
349
+ },
350
+ {
351
+ "path": "p1_v2_fine_types/registry/all5177_identity.parquet",
352
+ "bytes": 231062,
353
+ "sha256": "0440f0c0fa77f547df027c929b6b120d8e8121acc59fafe78e880fb8ece4e630"
354
+ },
355
+ {
356
+ "path": "p1_v2_fine_types/registry/ap1L_18_exploratory_members.parquet",
357
+ "bytes": 31509,
358
+ "sha256": "6dc7405e9240d0435d2d275f1c0d5a94acebda518ff06a7451620aab8babe24d"
359
+ },
360
+ {
361
+ "path": "p1_v2_fine_types/registry/malecns_unmatched_endpoints.csv",
362
+ "bytes": 313511,
363
+ "sha256": "489f6a1882b5167a5a00620c98fe431bad3ab14bf5609a6b41dff9de5b375a1a"
364
+ },
365
+ {
366
+ "path": "p1_v2_fine_types/registry/parent_candidate_residual_atlas.parquet",
367
+ "bytes": 17946,
368
+ "sha256": "1e7607070cc9fb9608ee2ec92502c24ea43190a2b1f2bd88114d62d5b8c532f4"
369
+ },
370
+ {
371
+ "path": "p1_v2_fine_types/registry/parent_child_members.parquet",
372
+ "bytes": 22544,
373
+ "sha256": "75bf98bd0695832b307ab192adcc09e82a9cb81a63a0a43c80d3d013eb7f32ce"
374
+ },
375
  {
376
  "path": "physics_teacher/active_search_teacher_rechecked.csv",
377
  "bytes": 2010,
p1_v2_fine_types/EXECUTION_LOG.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # Execution log
2
+
3
+ - P1-v2.1: original coarse-type pilot completed; preserved in ../p1_v2. Identified omitted KCab-s fine parent and weaker M0.
4
+ - P1-v2.2: protocol amended before rerun; P1A/B/C and descriptor-level D pilot completed. See audit/run.log and source_manifest.json for actual timings, seed and source hashes.
5
+ - Command: PYTHONPATH=simulation/src python simulation/scripts/run_kc_p1_v2.py
6
+ - Validation: PYTHONPATH=simulation/src pytest -q simulation/tests/test_p1_structure.py
7
+ - Posthoc report: python simulation/scripts/finalize_kc_p1_v2.py
8
+ - MaleCNS mapping / independent-connectome confirmation: BLOCKED. Exact missing endpoints are in registry/malecns_unmatched_endpoints.csv.
9
+ - Literature primary-source retrieval: BLOCKED_NETWORK for Crossref/bioRxiv; HF proxy transport is working.
10
+ - NeuronMimic architecture optimization: not part of this structural experiment.
p1_v2_fine_types/MODEL_COMPARISON.csv ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ model,test_log_loss,test_AUROC,validation_log_loss,selected_max_leaves,n_features,n_train,n_validation,n_test,training_budget,training_wall_clock_s,evidence,uncertainty,sampling
2
+ M0,0.2606936352617916,0.946740722974307,0.2608141723135891,31,6,83858,18168,17974,2 settings x100 iterations,0.7510168552398682,RETROSPECTIVE_DESCRIPTOR_PILOT,NOT_ESTIMATED_NO_SIGNIFICANCE_CLAIM,case-control 60000 positive/60000 negative; probabilities not natural prevalence calibrated
3
+ M1,0.25956746261839025,0.9510622572987102,0.2597962231987038,31,20,83858,18168,17974,2 settings x100 iterations,1.0860908031463623,RETROSPECTIVE_DESCRIPTOR_PILOT,NOT_ESTIMATED_NO_SIGNIFICANCE_CLAIM,case-control 60000 positive/60000 negative; probabilities not natural prevalence calibrated
4
+ M2_descriptor,0.24339326296360414,0.956133251125601,0.24257004114678182,31,71,83858,18168,17974,2 settings x100 iterations,2.4745774269104004,RETROSPECTIVE_DESCRIPTOR_PILOT,NOT_ESTIMATED_NO_SIGNIFICANCE_CLAIM,case-control 60000 positive/60000 negative; probabilities not natural prevalence calibrated
5
+ M3_descriptor_discrete,0.23674357076420421,0.9592581579385098,0.2352991587642097,31,74,83858,18168,17974,2 settings x100 iterations,2.54158353805542,RETROSPECTIVE_DESCRIPTOR_PILOT,NOT_ESTIMATED_NO_SIGNIFICANCE_CLAIM,case-control 60000 positive/60000 negative; probabilities not natural prevalence calibrated
6
+ M4_descriptor_continuous,0.2212159097412558,0.9653408044489263,0.2234753210121425,31,263,83858,18168,17974,2 settings x100 iterations,7.409607648849487,RETROSPECTIVE_DESCRIPTOR_PILOT,NOT_ESTIMATED_NO_SIGNIFICANCE_CLAIM,case-control 60000 positive/60000 negative; probabilities not natural prevalence calibrated
p1_v2_fine_types/P1_REPORT.md ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # P1-v2.2:身份、双向隔离与真实空间融合试验
2
+
3
+ 本轮已完成 P1A–P1C 的可执行试验,以及 P1D 的描述量级模型比较。原 stable8 仍为 8 个、965 个成员;新增稳定功能单元数为 0。全部结果来自实际运行,未用 fixture 替代结构数据。
4
+
5
+ ## 当前结论
6
+
7
+ 1. 胞体与树几何已真正进入发现目标。全体 5,177 KC 的 5,177×5,177 欧氏距离矩阵按 μm 生成;树特征从真实骨架计算,未读取接点标签。六个固定消融方案、每方案五个初始化及三次 20% 无序对删边测试均已运行。
8
+ 2. 空间更紧凑不等于更稳定。纯图的平均簇胞体半径为 38.16 μm;大胞体权重降至 26.86 μm,但删边 ARI 为 0.638,未超过纯图的 0.646。图+胞体+树的删边 ARI 为 0.817,而平均半径仍为 37.78 μm。这里的 ARI 是整体分区重现性,不是旧 frozen S/coverage,也不代表个别新簇通过稳定门槛。
9
+ 3. 几何描述之后,离散标签还有预测增量,但连续训练图表征更强。测试 log loss:M0(已知粗/细类型+侧别)0.26069;M1(另加胞体/距离/训练图强度)0.25957;M2_descriptor(另加树描述量)0.24339;M3(另加离散标签)0.23674;M4(另加连续图嵌入)0.22122。这不等价于“连续几何胜出”:M4 使用的是连续图表征;M2 还没有精细区域树接近性和分枝接点,M4 特征维数也更高。
10
+
11
+ 4. CM019 residual 有具体追踪线索:融合胞体与树几何后,K=3 与 K=4 得到完全相同的18细胞子簇,含全部16个原 residual 与2个原CM019成员;K=2时它们进入20细胞子簇。成员见 registry/ap1L_18_exploratory_members.parquet。这是融合特征空间中的分离,不能直接推断其胞体构成单一连续空间团;尚需扰动、空间匹配零模型、输入输出留出与跨脑检验。
12
+
13
+ ## 数据与协议
14
+
15
+ FlyWire v783,293,762 条有向神经元对、379,338 个聚合突触计数。无序 pair 哈希决定训练/验证/测试:205,483 / 44,335 / 43,944 条有向边;三个集合之间同向和反向直接交集均为 0。所有图嵌入与度/强度仅来自训练图。接点派生特征在本轮完全排除;这不是已经完成接点级训练测试映射。
16
+
17
+ 预测样本为 60,000 正例和 60,000 非边;训练/验证/测试样本 83,858 / 18,168 / 17,974。各模型同为两个超参设置×100轮,验证集选择,测试集只评估最终设置。这是 case-control 采样,预测值不是自然患率下的连接概率,更不是突触传递概率。原全图与历史测试数据曾参与开发,本次所有切分均标记回顾性,不能称为盲测。
18
+
19
+ 旧 CM、SU、新 P1 分区独立命名。SU019 与 CM019 为 104/132 重叠。P1 全局 K=30 仅为固定分辨率消融,并非新增 30 个稳定单元。局部试验覆盖完整细类型 parent:左右 KCab-s 311/310、ap1 148/133、KCab-p 67/61;K=2/3/4 是探索尺度,全部子簇成员与残余可追溯。CM019 的 16 个 residual 在各子簇中的去向见 CM019_residual_child_overlap.csv;没有匹配零模型和独立验证前,不称为一致补集。
20
+
21
+ ## 修正与失败项
22
+
23
+ 首轮 p1_v2 使用粗粒度 official_KC_subtype,漏掉 KCab-s parent。该试跑原样保留;当前 p1_v2_fine_types 使用 frozen_detailed_subtype 定义完整 parent,M0 同时保留粗/细标签。右 ap1 的粗标签计数132、细标签133不同,未静默覆盖。
24
+
25
+ MaleCNS 的完整原始 id 列有211,577个唯一ID,body列187,016个;已存在 body 的行两者一致。但换用完整 id 后仍有31,355个边端点未匹配,不能靠填充body解决。跨版本/来源/范围需继续查原始连接表生产链。本轮不宣称跨脑复现。
26
+
27
+ 本地旧跨连接组比较的 provenance 指向名含 invalid_seed_schedule 的历史benchmark,不能升级为独立复现。BANC 与 FlyWire 的样本来源关系亦须核实,数据集名称不同不能自动算不同动物。
28
+
29
+ 用户提供 Pleijzier 2026 预印本已登记为竞争基线,当前代理访问 Crossref/bioRxiv 失败,题目、日期与具体主张仍待原文核查;不把转述当已核实文献结论。
30
+
31
+ ## 剩余裁决工作
32
+
33
+ P1D 仍需区域树/分枝接点的训练隔离、模型容量与调参预算敏感性、空间/细胞阻断、类型内困难负例、匹配零模型、PN→KC 与 KC→MBON 的预留终点。附加的1000次顶点权重bootstrap仅为固定模型、同脑内的探索性区间,未覆盖模型重拟合、空间相关和动物变异。
34
+
35
+ P1E 须先解决 MaleCNS 来源映射、BANC 生物独立性与其他数据版本,再比较可迁移组织规律及实验可定位性。目前不应指定“已验证的2–3个功能微回路”。不继续优化 NeuronMimic 架构。
36
+
37
+ ## 复现与产物
38
+
39
+ 仓库命令:`PYTHONPATH=simulation/src python simulation/scripts/run_kc_p1_v2.py`(已完成目录拒绝覆盖)。公开紧凑数据复现命令见 GitHub 的 docs/P1_REPRODUCE.md。发布包含双向切分、身份与父子登记、树描述量、冻结协议、比较表、图及原始输入哈希;完整骨架须向原数据源获取。
40
+
41
+ 关键文件:MODEL_COMPARISON.csv、P1_STATUS.json、analysis/discovery_ablation.csv、analysis/complete_parent_splits.csv、registry/parent_child_members.parquet、audit/structural_checks.csv、audit/source_manifest.json。
p1_v2_fine_types/P1_STATUS.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "P1A": "DONE_WITH_MALECNS_BLOCKER",
3
+ "P1B": "DONE_RETROSPECTIVE_PAIR_ISOLATION",
4
+ "P1C": "DONE_EXPLORATORY_GEOMETRY_DISCOVERY",
5
+ "P1D": "PARTIAL_DESCRIPTOR_PILOT_NOT_FULL_BRANCH_CONTACT_MODEL",
6
+ "P1E": "BLOCKED_INDEPENDENCE_AND_ID_QC",
7
+ "stable8_unchanged": true,
8
+ "new_stable_candidates": 0,
9
+ "scientific_conclusion": "No discrete/continuous verdict yet; full independent competition remains open",
10
+ "wall_clock_s": 55.4731810092926
11
+ }
p1_v2_fine_types/analysis/CM019_residual_child_overlap.csv ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ arm,k,child,child_n,CM019_residual_n,residual_recall,residual_fraction_of_child,evidence
2
+ graph,2,0,22,16,1.0,0.7272727272727273,DESCRIPTIVE_NO_MATCHED_NULL
3
+ graph,2,1,126,0,0.0,0.0,DESCRIPTIVE_NO_MATCHED_NULL
4
+ graph,3,0,16,15,0.9375,0.9375,DESCRIPTIVE_NO_MATCHED_NULL
5
+ graph,3,1,107,0,0.0,0.0,DESCRIPTIVE_NO_MATCHED_NULL
6
+ graph,3,2,25,1,0.0625,0.04,DESCRIPTIVE_NO_MATCHED_NULL
7
+ graph,4,0,94,0,0.0,0.0,DESCRIPTIVE_NO_MATCHED_NULL
8
+ graph,4,1,12,12,0.75,1.0,DESCRIPTIVE_NO_MATCHED_NULL
9
+ graph,4,2,30,0,0.0,0.0,DESCRIPTIVE_NO_MATCHED_NULL
10
+ graph,4,3,12,4,0.25,0.3333333333333333,DESCRIPTIVE_NO_MATCHED_NULL
11
+ graph_soma_tree,2,0,128,0,0.0,0.0,DESCRIPTIVE_NO_MATCHED_NULL
12
+ graph_soma_tree,2,1,20,16,1.0,0.8,DESCRIPTIVE_NO_MATCHED_NULL
13
+ graph_soma_tree,3,0,61,0,0.0,0.0,DESCRIPTIVE_NO_MATCHED_NULL
14
+ graph_soma_tree,3,1,69,0,0.0,0.0,DESCRIPTIVE_NO_MATCHED_NULL
15
+ graph_soma_tree,3,2,18,16,1.0,0.8888888888888888,DESCRIPTIVE_NO_MATCHED_NULL
16
+ graph_soma_tree,4,0,18,16,1.0,0.8888888888888888,DESCRIPTIVE_NO_MATCHED_NULL
17
+ graph_soma_tree,4,1,55,0,0.0,0.0,DESCRIPTIVE_NO_MATCHED_NULL
18
+ graph_soma_tree,4,2,50,0,0.0,0.0,DESCRIPTIVE_NO_MATCHED_NULL
19
+ graph_soma_tree,4,3,25,0,0.0,0.0,DESCRIPTIVE_NO_MATCHED_NULL
p1_v2_fine_types/analysis/complete_parent_splits.csv ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ parent_type,side,arm,k,parent_n,stable8_selected_n,residual_n,seed_ARI_mean,child_sizes,status
2
+ KCa'b'-ap1,left,graph,2,148,132,16,1.0,"[22, 126]",DESCRIPTIVE_ONLY
3
+ KCa'b'-ap1,left,graph,3,148,132,16,0.968223188463474,"[16, 107, 25]",DESCRIPTIVE_ONLY
4
+ KCa'b'-ap1,left,graph,4,148,132,16,0.8707303917534227,"[94, 12, 30, 12]",DESCRIPTIVE_ONLY
5
+ KCa'b'-ap1,left,graph_soma_tree,2,148,132,16,0.9615650002178049,"[128, 20]",DESCRIPTIVE_ONLY
6
+ KCa'b'-ap1,left,graph_soma_tree,3,148,132,16,0.9876301854004486,"[61, 69, 18]",DESCRIPTIVE_ONLY
7
+ KCa'b'-ap1,left,graph_soma_tree,4,148,132,16,0.9884163797635841,"[18, 55, 50, 25]",DESCRIPTIVE_ONLY
8
+ KCa'b'-ap1,right,graph,2,133,122,11,1.0,"[119, 14]",DESCRIPTIVE_ONLY
9
+ KCa'b'-ap1,right,graph,3,133,122,11,0.9594150796389369,"[101, 21, 11]",DESCRIPTIVE_ONLY
10
+ KCa'b'-ap1,right,graph,4,133,122,11,0.41797314466676044,"[52, 11, 19, 51]",DESCRIPTIVE_ONLY
11
+ KCa'b'-ap1,right,graph_soma_tree,2,133,122,11,0.3692553698353845,"[46, 87]",DESCRIPTIVE_ONLY
12
+ KCa'b'-ap1,right,graph_soma_tree,3,133,122,11,1.0,"[34, 88, 11]",DESCRIPTIVE_ONLY
13
+ KCa'b'-ap1,right,graph_soma_tree,4,133,122,11,0.9940813339598745,"[34, 55, 11, 33]",DESCRIPTIVE_ONLY
14
+ KCab-p,left,graph,2,67,67,0,0.9475021369550763,"[54, 13]",DESCRIPTIVE_ONLY
15
+ KCab-p,left,graph,3,67,67,0,0.9385605512109283,"[32, 24, 11]",DESCRIPTIVE_ONLY
16
+ KCab-p,left,graph,4,67,67,0,0.955884484116566,"[21, 23, 10, 13]",DESCRIPTIVE_ONLY
17
+ KCab-p,left,graph_soma_tree,2,67,67,0,0.7626155489348526,"[21, 46]",DESCRIPTIVE_ONLY
18
+ KCab-p,left,graph_soma_tree,3,67,67,0,0.8578810221084865,"[21, 20, 26]",DESCRIPTIVE_ONLY
19
+ KCab-p,left,graph_soma_tree,4,67,67,0,0.8215200624822263,"[16, 16, 17, 18]",DESCRIPTIVE_ONLY
20
+ KCab-p,right,graph,2,61,61,0,1.0,"[38, 23]",DESCRIPTIVE_ONLY
21
+ KCab-p,right,graph,3,61,61,0,0.9853779455614005,"[20, 9, 32]",DESCRIPTIVE_ONLY
22
+ KCab-p,right,graph,4,61,61,0,0.9194497888847548,"[15, 17, 21, 8]",DESCRIPTIVE_ONLY
23
+ KCab-p,right,graph_soma_tree,2,61,61,0,1.0,"[46, 15]",DESCRIPTIVE_ONLY
24
+ KCab-p,right,graph_soma_tree,3,61,61,0,1.0,"[32, 15, 14]",DESCRIPTIVE_ONLY
25
+ KCab-p,right,graph_soma_tree,4,61,61,0,0.7971718697419794,"[32, 15, 9, 5]",DESCRIPTIVE_ONLY
26
+ KCab-s,left,graph,2,311,114,197,1.0,"[197, 114]",DESCRIPTIVE_ONLY
27
+ KCab-s,left,graph,3,311,114,197,1.0,"[65, 107, 139]",DESCRIPTIVE_ONLY
28
+ KCab-s,left,graph,4,311,114,197,1.0,"[94, 68, 96, 53]",DESCRIPTIVE_ONLY
29
+ KCab-s,left,graph_soma_tree,2,311,114,197,0.9711148060401841,"[190, 121]",DESCRIPTIVE_ONLY
30
+ KCab-s,left,graph_soma_tree,3,311,114,197,1.0,"[62, 141, 108]",DESCRIPTIVE_ONLY
31
+ KCab-s,left,graph_soma_tree,4,311,114,197,0.98192628602563,"[107, 60, 84, 60]",DESCRIPTIVE_ONLY
32
+ KCab-s,right,graph,2,310,147,163,1.0,"[166, 144]",DESCRIPTIVE_ONLY
33
+ KCab-s,right,graph,3,310,147,163,0.9110285018082322,"[105, 126, 79]",DESCRIPTIVE_ONLY
34
+ KCab-s,right,graph,4,310,147,163,1.0,"[81, 109, 32, 88]",DESCRIPTIVE_ONLY
35
+ KCab-s,right,graph_soma_tree,2,310,147,163,1.0,"[165, 145]",DESCRIPTIVE_ONLY
36
+ KCab-s,right,graph_soma_tree,3,310,147,163,0.7885022028960358,"[103, 121, 86]",DESCRIPTIVE_ONLY
37
+ KCab-s,right,graph_soma_tree,4,310,147,163,0.9611244854895695,"[100, 101, 36, 73]",DESCRIPTIVE_ONLY
p1_v2_fine_types/analysis/discovery_ablation.csv ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ arm,soma_weight,tree_weight,mean_cluster_soma_radius_um,seed_ARI_mean,n_clusters,n_cells,status,pair_dropout_ARI_mean,pair_dropout_ARI_values
2
+ graph,0.0,0,38.160028098101485,0.7910987806109194,30,5177,EXPLORATORY_PARTITION_NOT_STABLE_CANDIDATES,0.6459521233688187,"[0.6208263398071404, 0.668976844363313, 0.6480531859360028]"
3
+ graph_soma025,0.25,0,37.52554105336682,0.7467089658094822,30,5177,EXPLORATORY_PARTITION_NOT_STABLE_CANDIDATES,0.6489918988132075,"[0.6421944233864323, 0.6683592191030845, 0.6364220539501056]"
4
+ graph_soma1,1.0,0,35.99740289884258,0.8560880348882907,30,5177,EXPLORATORY_PARTITION_NOT_STABLE_CANDIDATES,0.7033316798759836,"[0.71021080877357, 0.7392016583909505, 0.6605825724634301]"
5
+ graph_soma4,4.0,0,26.85618125502845,0.6615240099659837,30,5177,EXPLORATORY_PARTITION_NOT_STABLE_CANDIDATES,0.6383389635863637,"[0.6231532312096515, 0.6399065723482902, 0.6519570872011492]"
6
+ graph_tree,0.0,1,39.06687797043532,0.7208696248764215,30,5177,EXPLORATORY_PARTITION_NOT_STABLE_CANDIDATES,0.6310862442567852,"[0.6136046808745598, 0.6390119388207619, 0.6406421130750336]"
7
+ graph_soma_tree,1.0,1,37.77500035468918,0.7667214093585388,30,5177,EXPLORATORY_PARTITION_NOT_STABLE_CANDIDATES,0.8172704565561865,"[0.7988362034706604, 0.820391705352876, 0.8325834608450231]"
p1_v2_fine_types/analysis/parent_candidate_counts.csv ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ candidate,parent_fine_type,side,candidate_total,candidate_within_parent,parent_total,residual,minority_outside_parent
2
+ CM012,KCa'b'-m,right,163,160,174,14,3
3
+ CM014,KCa'b'-m,left,152,152,164,12,0
4
+ CM016,KCab-s,right,147,147,310,163,0
5
+ CM019,KCa'b'-ap1,left,132,132,148,16,0
6
+ CM020,KCa'b'-ap1,right,129,122,133,11,7
7
+ CM022,KCab-s,left,114,114,311,197,0
8
+ CM031,KCab-p,left,67,67,67,0,0
9
+ CM033,KCab-p,right,61,61,61,0,0
p1_v2_fine_types/analysis/vertex_bootstrap_exploratory.csv ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ base,augmented,delta_log_loss,interval_low,interval_high,method,n_resamples,seed,limitation
2
+ M1,M2_descriptor,0.016174199654786097,0.010736531871536276,0.021509855136446408,POSTHOC_FIXED_MODEL_VERTEX_POISSON_BOOTSTRAP,1000,20261104,"within-brain endpoint dependence only; no refit, spatial block, tuning or animal uncertainty"
3
+ M2_descriptor,M3_descriptor_discrete,0.006649692199399904,0.002663759778787991,0.010732576210627868,POSTHOC_FIXED_MODEL_VERTEX_POISSON_BOOTSTRAP,1000,20261104,"within-brain endpoint dependence only; no refit, spatial block, tuning or animal uncertainty"
4
+ M2_descriptor,M4_descriptor_continuous,0.02217735322234832,0.016656227046957003,0.027979004103687897,POSTHOC_FIXED_MODEL_VERTEX_POISSON_BOOTSTRAP,1000,20261104,"within-brain endpoint dependence only; no refit, spatial block, tuning or animal uncertainty"
5
+ M3_descriptor_discrete,M4_descriptor_continuous,0.015527661022948416,0.010114642731116131,0.020770471504391454,POSTHOC_FIXED_MODEL_VERTEX_POISSON_BOOTSTRAP,1000,20261104,"within-brain endpoint dependence only; no refit, spatial block, tuning or animal uncertainty"
p1_v2_fine_types/audit/competition_literature_lookup.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "url": "https://api.crossref.org/works/10.64898/2026.09.06.749654",
4
+ "status": "UNVERIFIED",
5
+ "error": "ProxyError"
6
+ },
7
+ {
8
+ "url": "https://www.biorxiv.org/content/10.64898/2026.09.06.749654v1",
9
+ "status": "UNVERIFIED",
10
+ "error": "ProxyError"
11
+ }
12
+ ]
p1_v2_fine_types/audit/environment.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "python": "3.11.11",
3
+ "packages": {
4
+ "numpy": "1.26.4",
5
+ "scipy": "1.16.3",
6
+ "scikit-learn": "1.8.0",
7
+ "pandas": "2.3.3",
8
+ "pyarrow": "22.0.0",
9
+ "torch": "2.8.0+cu129",
10
+ "matplotlib": "3.10.8",
11
+ "threadpoolctl": "3.6.0"
12
+ },
13
+ "threads": 4,
14
+ "note": "Figure caption corrected from obsolete P1-v2.1 to reference actual protocol.json. Previous PDFs retained in audit/figures_before_caption_correction."
15
+ }
p1_v2_fine_types/audit/finalizer_snapshot.py ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Derive P1 reports and data-quality checks from actual run artifacts."""
2
+ from pathlib import Path
3
+ import json,hashlib
4
+ import numpy as np
5
+ import pandas as pd
6
+
7
+ ROOT=Path(__file__).resolve().parents[2]
8
+ OUT=ROOT/'artifacts/nature_kc_20261030/p1_v2_fine_types'
9
+
10
+ def main():
11
+ reg=pd.read_parquet(OUT/'registry/all5177_identity.parquet')
12
+ pairs=pd.read_parquet(OUT/'data/directed_pair_split.parquet')
13
+ models=pd.read_csv(OUT/'MODEL_COMPARISON.csv').set_index('model')
14
+ ab=pd.read_csv(OUT/'analysis/discovery_ablation.csv').set_index('arm')
15
+ parent=pd.read_csv(OUT/'analysis/complete_parent_splits.csv')
16
+ child=pd.read_parquet(OUT/'registry/parent_child_members.parquet')
17
+ checks=[]
18
+ def check(name,ok,actual):checks.append({'check':name,'passed':bool(ok),'actual':str(actual)})
19
+ check('all_KC_unique_strings',len(reg)==5177 and reg.root_id.nunique()==5177 and reg.root_id.map(lambda x:isinstance(x,str)).all(),len(reg))
20
+ check('stable8_union',reg.stable_backbone.sum()==965,reg.stable_backbone.sum())
21
+ for side,n in [('left',311),('right',310)]:
22
+ got=parent.query('parent_type == "KCab-s" and side == @side').parent_n.unique()
23
+ check('full_KCab-s_'+side,len(got)==1 and got[0]==n,got)
24
+ check('synapse_conservation',pairs.synapses.sum()==379338,pairs.synapses.sum())
25
+ sets={s:set(zip(d.pre_id,d.post_id)) for s,d in pairs.groupby('split')}
26
+ for a,b in [('train','validation'),('train','test'),('validation','test')]:
27
+ overlap=sets[a]&sets[b];reverse=sets[a]&{(v,u) for u,v in sets[b]}
28
+ check(a+'_'+b+'_direct_and_reverse_isolation',not overlap and not reverse,[len(overlap),len(reverse)])
29
+ check('node_JSON_string_roundtrip',json.loads(json.dumps(reg.root_id.tolist()))==reg.root_id.tolist(),len(reg))
30
+ su=set(reg.loc[reg.unit_id.eq('SU019'),'root_id']);cm=set(reg.loc[reg.candidate_id.eq('CM019')&reg.stable_backbone,'root_id'])
31
+ check('SU019_CM019_not_aliased',len(su&cm)==104 and len(cm)==132,[len(su),len(cm),len(su&cm)])
32
+ pd.DataFrame(checks).to_csv(OUT/'audit/structural_checks.csv',index=False)
33
+ assert all(c['passed'] for c in checks)
34
+ # Complete parent membership, including minority candidate members outside dominant parent.
35
+ summaries=[];members=[]
36
+ for cmid in ['CM012','CM014','CM016','CM019','CM020','CM022','CM031','CM033']:
37
+ cand=reg.candidate_id.eq(cmid)&reg.stable_backbone.astype(bool)
38
+ typ,side=reg.loc[cand].groupby(['frozen_detailed_subtype','official_hemisphere']).size().idxmax()
39
+ par=reg.frozen_detailed_subtype.eq(typ)&reg.official_hemisphere.eq(side)
40
+ summaries.append({'candidate':cmid,'parent_fine_type':typ,'side':side,'candidate_total':int(cand.sum()),'candidate_within_parent':int((cand&par).sum()),'parent_total':int(par.sum()),'residual':int((par&~cand).sum()),'minority_outside_parent':int((cand&~par).sum())})
41
+ for _,r in reg.loc[par|cand].iterrows():
42
+ i=r.name;members.append({'root_id':r.root_id,'candidate':cmid,'parent_type':typ,'side':side,'member_state':'selected_parent' if cand[i] and par[i] else 'minority_outside_parent' if cand[i] else 'parent_residual'})
43
+ pd.DataFrame(summaries).to_csv(OUT/'analysis/parent_candidate_counts.csv',index=False)
44
+ pd.DataFrame(members).to_parquet(OUT/'registry/parent_candidate_residual_atlas.parquet',index=False)
45
+ # Describe where the 16 legacy CM019 residual cells land, without null-based claims.
46
+ residual=set(reg.loc[reg.frozen_detailed_subtype.eq("KCa'b'-ap1")&reg.official_hemisphere.eq('left')&~reg.root_id.isin(cm),'root_id'])
47
+ rr=[]
48
+ for (arm,k),g in child.loc[child.parent_type.eq("KCa'b'-ap1")&child.side.eq('left')].groupby(['arm','k']):
49
+ for c,cg in g.groupby('child'):
50
+ nres=int(cg.root_id.isin(residual).sum())
51
+ rr.append({'arm':arm,'k':k,'child':c,'child_n':len(cg),'CM019_residual_n':nres,'residual_recall':nres/len(residual),'residual_fraction_of_child':nres/len(cg),'evidence':'DESCRIPTIVE_NO_MATCHED_NULL'})
52
+ pd.DataFrame(rr).to_csv(OUT/'analysis/CM019_residual_child_overlap.csv',index=False)
53
+ sub=child.loc[child.parent_type.eq("KCa'b'-ap1")&child.side.eq('left')&child.arm.eq('graph_soma_tree')]
54
+ groups={k:[set(g.root_id) for _,g in sub.loc[sub.k.eq(k)].groupby('child') if residual.issubset(set(g.root_id))] for k in [3,4]}
55
+ assert len(groups[3])==len(groups[4])==1 and groups[3][0]==groups[4][0]
56
+ small=reg.loc[reg.root_id.isin(groups[3][0])].copy()
57
+ small['P1_candidate_id']='P1_ap1L_18_EXPLORATORY';small['status']='NOT_FROZEN_STABLE'
58
+ small.to_parquet(OUT/'registry/ap1L_18_exploratory_members.parquet',index=False)
59
+ # Fixed-model vertex-weighted bootstrap: accounts for shared endpoints, not animals.
60
+ pred=pd.read_parquet(OUT/'data/test_predictions.parquet'); ids=sorted(set(pred.pre_id)|set(pred.post_id)); idx={r:i for i,r in enumerate(ids)}
61
+ a=pred.pre_id.map(idx).to_numpy();b=pred.post_id.map(idx).to_numpy();y=pred.edge_present.to_numpy()
62
+ losses={name:-(y*np.log(np.clip(pred[name],1e-12,1-1e-12))+(1-y)*np.log(np.clip(1-pred[name],1e-12,1-1e-12))) for name in models.index}
63
+ contrasts=[('M1','M2_descriptor'),('M2_descriptor','M3_descriptor_discrete'),('M2_descriptor','M4_descriptor_continuous'),('M3_descriptor_discrete','M4_descriptor_continuous')]
64
+ diffs=np.column_stack([losses[x]-losses[z] for x,z in contrasts]);rng=np.random.default_rng(20261104);boot=[]
65
+ for _ in range(1000):
66
+ w=rng.poisson(1,len(ids));dw=w[a]*w[b];boot.append(dw@diffs/dw.sum())
67
+ ci=np.quantile(boot,[.025,.975],axis=0)
68
+ pd.DataFrame([{'base':x,'augmented':z,'delta_log_loss':float(diffs[:,j].mean()),'interval_low':ci[0,j],'interval_high':ci[1,j],'method':'POSTHOC_FIXED_MODEL_VERTEX_POISSON_BOOTSTRAP','n_resamples':1000,'seed':20261104,'limitation':'within-brain endpoint dependence only; no refit, spatial block, tuning or animal uncertainty'} for j,(x,z) in enumerate(contrasts)]).to_csv(OUT/'analysis/vertex_bootstrap_exploratory.csv',index=False)
69
+ report=f'''# P1-v2.2:身份、双向隔离与真实空间融合试验
70
+
71
+ 本轮已完成 P1A–P1C 的可执行试验,以及 P1D 的描述量级模型比较。原 stable8 仍为 8 个、965 个成员;新增稳定功能单元数为 0。全部结果来自实际运行,未用 fixture 替代结构数据。
72
+
73
+ ## 当前结论
74
+
75
+ 1. 胞体与树几何已真正进入发现目标。全体 5,177 KC 的 5,177×5,177 欧氏距离矩阵按 μm 生成;树特征从真实骨架计算,未读取接点标签。六个固定消融方案、每方案五个初始化及三次 20% 无序对删边测试均已运行。
76
+ 2. 空间更紧凑不等于更稳定。纯图的平均簇胞体半径为 {ab.loc['graph','mean_cluster_soma_radius_um']:.2f} μm;大胞体权重降至 {ab.loc['graph_soma4','mean_cluster_soma_radius_um']:.2f} μm,但删边 ARI 为 {ab.loc['graph_soma4','pair_dropout_ARI_mean']:.3f},未超过纯图的 {ab.loc['graph','pair_dropout_ARI_mean']:.3f}。图+胞体+树的删边 ARI 为 {ab.loc['graph_soma_tree','pair_dropout_ARI_mean']:.3f},而平均半径仍为 {ab.loc['graph_soma_tree','mean_cluster_soma_radius_um']:.2f} μm。这里的 ARI 是整体分区重现性,不是旧 frozen S/coverage,也不代表个别新簇通过稳定门槛。
77
+ 3. 几何描述之后,离散标签还有预测增量,但连续训练图表征更强。测试 log loss:M0(已知粗/细类型+侧别){models.loc['M0','test_log_loss']:.5f};M1(另加胞体/距离/训练图强度){models.loc['M1','test_log_loss']:.5f};M2_descriptor(另加树描述量){models.loc['M2_descriptor','test_log_loss']:.5f};M3(另加离散标签){models.loc['M3_descriptor_discrete','test_log_loss']:.5f};M4(另加连续图嵌入){models.loc['M4_descriptor_continuous','test_log_loss']:.5f}。这不等价于“连续几何胜出”:M4 使用的是连续图表征;M2 还没有精细区域树接近性和分枝接点,M4 特征维数也更高。
78
+
79
+ 4. CM019 residual 有具体追踪线索:融合胞体与树几何后,K=3 与 K=4 得到完全相同的18细胞子簇,含全部16个原 residual 与2个原CM019成员;K=2时它们进入20细胞子簇。成员见 registry/ap1L_18_exploratory_members.parquet。这是融合特征空间中的分离,不能直接推断其胞体构成单一连续空间团;尚需扰动、空间匹配零模型、输入输出留出与跨脑检验。
80
+
81
+ ## 数据与协议
82
+
83
+ FlyWire v783,293,762 条有向神经元对、379,338 个聚合突触计数。无序 pair 哈希决定训练/验证/测试:205,483 / 44,335 / 43,944 条有向边;三个集合之间同向和反向直接交集均为 0。所有图嵌入与度/强度仅来自训练图。接点派生特征在本轮完全排除;这不是已经完成接点级训练测试映射。
84
+
85
+ 预测样本为 60,000 正例和 60,000 非边;训练/验证/测试样本 83,858 / 18,168 / 17,974。各模型同为两个超参设置×100轮,验证集选择,测试集只评估最终设置。这是 case-control 采样,预测值不是自然患率下的连接概率,更不是突触传递概率。原全图与历史测试数据曾参与开发,本次所有切分均标记回顾性,不能称为盲测。
86
+
87
+ 旧 CM、SU、新 P1 分区独立命名。SU019 与 CM019 为 104/132 重叠。P1 全局 K=30 仅为固定分辨率消融,并非新增 30 个稳定单元。局部试验覆盖完整细类型 parent:左右 KCab-s 311/310、ap1 148/133、KCab-p 67/61;K=2/3/4 是探索尺度,全部子簇成员与残余可追溯。CM019 的 16 个 residual 在各子簇中的去向见 CM019_residual_child_overlap.csv;没有匹配零模型和独立验证前,不称为一致补集。
88
+
89
+ ## 修正与失败项
90
+
91
+ 首轮 p1_v2 使用粗粒度 official_KC_subtype,漏掉 KCab-s parent。该试跑原样保留;当前 p1_v2_fine_types 使用 frozen_detailed_subtype 定义完整 parent,M0 同时保留粗/细标签。右 ap1 的粗标签计数132、细标签133不同,未静默覆盖。
92
+
93
+ MaleCNS 的完整原始 id 列有211,577个唯一ID,body列187,016个;已存在 body 的行两者一致。但换用完整 id 后仍有31,355个边端点未匹配,不能靠填充body解决。跨版本/来源/范围需继续查原始连接表生产链。本轮不宣称跨脑复现。
94
+
95
+ 本地旧跨连接组比较的 provenance 指向名含 invalid_seed_schedule 的历史benchmark,不能升级为独立复现。BANC 与 FlyWire 的样本来源关系亦须核实,数据集名称不同不能自动算不同动物。
96
+
97
+ 用户提供 Pleijzier 2026 预印本已登记为竞争基线,当前代理访问 Crossref/bioRxiv 失败,题目、日期与具体主张仍待原文核查;不把转述当已核实文献结论。
98
+
99
+ ## 剩余裁决工作
100
+
101
+ P1D 仍需区域树/分枝接点的训练隔离、模型容量与调参预算敏感性、空间/细胞阻断、类型内困难负例、匹配零模型、PN→KC 与 KC→MBON 的预留终点。附加的1000次顶点权重bootstrap仅为固定模型、同脑内的探索性区间,未覆盖模型重拟合、空间相关和动物变异。
102
+
103
+ P1E 须先解决 MaleCNS 来源映射、BANC 生物独立性与其他数据版本,再比较可迁移组织规律及实验可定位性。目前不应指定“已验证的2–3个功能微回路”。不继续优化 NeuronMimic 架构。
104
+
105
+ ## 复现与产物
106
+
107
+ 仓库命令:`PYTHONPATH=simulation/src python simulation/scripts/run_kc_p1_v2.py`(已完成目录拒绝覆盖)。公开紧凑数据复现命令见 GitHub 的 docs/P1_REPRODUCE.md。发布包含双向切分、身份与父子登记、树描述量、冻结协议、比较表、图及原始输入哈希;完整骨架须向原数据源获取。
108
+
109
+ 关键文件:MODEL_COMPARISON.csv、P1_STATUS.json、analysis/discovery_ablation.csv、analysis/complete_parent_splits.csv、registry/parent_child_members.parquet、audit/structural_checks.csv、audit/source_manifest.json。
110
+ '''
111
+ (OUT/'P1_REPORT.md').write_text(report)
112
+ (OUT/'EXECUTION_LOG.md').write_text('''# Execution log
113
+
114
+ - P1-v2.1: original coarse-type pilot completed; preserved in ../p1_v2. Identified omitted KCab-s fine parent and weaker M0.
115
+ - P1-v2.2: protocol amended before rerun; P1A/B/C and descriptor-level D pilot completed. See audit/run.log and source_manifest.json for actual timings, seed and source hashes.
116
+ - Command: PYTHONPATH=simulation/src python simulation/scripts/run_kc_p1_v2.py
117
+ - Validation: PYTHONPATH=simulation/src pytest -q simulation/tests/test_p1_structure.py
118
+ - Posthoc report: python simulation/scripts/finalize_kc_p1_v2.py
119
+ - MaleCNS mapping / independent-connectome confirmation: BLOCKED. Exact missing endpoints are in registry/malecns_unmatched_endpoints.csv.
120
+ - Literature primary-source retrieval: BLOCKED_NETWORK for Crossref/bioRxiv; HF proxy transport is working.
121
+ - NeuronMimic architecture optimization: not part of this structural experiment.
122
+ ''')
123
+ print('structural checks',len(checks),'passed; report written')
124
+
125
+ if __name__=='__main__':main()
p1_v2_fine_types/audit/malecns_id_QC.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "annotation_rows": 211577,
3
+ "body_valid_unique": 187016,
4
+ "id_valid_unique": 211577,
5
+ "edge_endpoints": 41105,
6
+ "body_unmatched": 31355,
7
+ "id_unmatched": 31355,
8
+ "recovered_by_id": 0,
9
+ "body_vs_id_disagreement": 0,
10
+ "status": "BLOCKED_SOURCE_VERSION_OR_SCOPE_UNRESOLVED",
11
+ "note": "Full source id column does not resolve missing edge endpoints; no cross-version identity inference."
12
+ }
p1_v2_fine_types/audit/pair_split_QC.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "n_directed_pairs": 293762,
3
+ "synapses_total": 379338.0,
4
+ "train_pairs": 205483,
5
+ "validation_pairs": 44335,
6
+ "test_pairs": 43944,
7
+ "heldout_direct_overlap": 0,
8
+ "heldout_reverse_overlap": 0,
9
+ "contact_features_used": false,
10
+ "exposure": "RETROSPECTIVE_NOT_BLIND"
11
+ }
p1_v2_fine_types/audit/primitives_snapshot.py ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """P1-v2 primitives: pair isolation and contact-free geometry, no label promotion."""
2
+ from __future__ import annotations
3
+ import hashlib
4
+ import numpy as np
5
+
6
+
7
+ def pair_uniform(ids, pre, post, seed=20261030):
8
+ """Order-invariant identity hash; every direction/contact of a pair shares a draw."""
9
+ tokens = np.array([int.from_bytes(hashlib.blake2b(str(i).encode(), digest_size=8).digest(), 'little') for i in ids], dtype=np.uint64)
10
+ if len(np.unique(tokens)) != len(tokens):
11
+ raise ValueError('duplicate ID or hash collision')
12
+ a, b = tokens[np.asarray(pre)], tokens[np.asarray(post)]
13
+ lo, hi = np.minimum(a,b), np.maximum(a,b)
14
+ with np.errstate(over='ignore'):
15
+ x = lo ^ (hi * np.uint64(0x9E3779B97F4A7C15)) ^ np.uint64(seed)
16
+ x = (x ^ (x >> np.uint64(30))) * np.uint64(0xBF58476D1CE4E5B9)
17
+ x = (x ^ (x >> np.uint64(27))) * np.uint64(0x94D049BB133111EB)
18
+ x ^= x >> np.uint64(31)
19
+ return (x >> np.uint64(11)).astype(np.float64) / 2**53
20
+
21
+
22
+ def pair_split(ids, pre, post, seed=20261030):
23
+ u=pair_uniform(ids,pre,post,seed)
24
+ return np.where(u<.70,0,np.where(u<.85,1,2)).astype(np.int8)
25
+
26
+
27
+ def tree_features(d):
28
+ """Only vertices, tree edges, branch IDs and skeleton paths; ignore contacts."""
29
+ v=np.asarray(d['vertices'],float); e=np.asarray(d['edges'],int)
30
+ if not np.isfinite(v).all() or v.shape[1]!=3:
31
+ raise ValueError('invalid geometry')
32
+ length=np.linalg.norm(v[e[:,0]]-v[e[:,1]],axis=1)
33
+ if length.sum()<=0: raise ValueError('zero cable length')
34
+ mid=(v[e[:,0]]+v[e[:,1]])/2
35
+ center=np.average(mid,axis=0,weights=length)
36
+ delta=mid-center
37
+ cov=(delta*length[:,None]).T@delta/length.sum()
38
+ eigen=np.maximum(np.linalg.eigvalsh(cov),0)
39
+ degree=np.bincount(e.ravel(),minlength=len(v))
40
+ path=np.asarray(d['path_from_soma_nearest_um'],float)
41
+ finite=path[np.isfinite(path)]
42
+ out={'cable_length_um':length.sum(),'n_branch_ids':len(set(d['branch_per_edge'])),
43
+ 'n_terminals':int((degree==1).sum()),'n_branchpoints':int((degree>2).sum()),
44
+ 'edge_length_median_um':np.median(length),'edge_length_p95_um':np.quantile(length,.95),
45
+ 'path_median_um':np.median(finite),'path_p95_um':np.quantile(finite,.95)}
46
+ for j,axis in enumerate('xyz'):
47
+ out[f'centroid_{axis}_um']=center[j]
48
+ out[f'extent_{axis}_um']=np.ptp(v[:,j])
49
+ out[f'principal_sd_{j}_um']=np.sqrt(eigen[j])
50
+ return out
51
+
52
+
53
+ def fuse_blocks(graph, soma, tree, soma_weight, tree_weight):
54
+ """Squared distance = graph distance + weighted soma/tree distances."""
55
+ blocks=[graph/np.sqrt(graph.shape[1])]
56
+ if soma_weight: blocks.append(np.sqrt(soma_weight)*soma)
57
+ if tree_weight: blocks.append(np.sqrt(tree_weight)*tree/np.sqrt(tree.shape[1]))
58
+ return np.column_stack(blocks)
p1_v2_fine_types/audit/protocol.json ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "protocol_version": "P1-v2.2-retrospective-fine-type-geometry-pilot",
3
+ "frozen_at_utc": "2026-10-30T08:29:23.509181+00:00",
4
+ "code_commit": "f15ab12e1988000f71ec5e0ab138ab116f150e7d",
5
+ "seed": 20261030,
6
+ "scope": "all 5177 FlyWire v783 KC; complete official ap1/KCab-s/KCab-p parents",
7
+ "split": "deterministic unordered neuron pair 70/15/15 train/validation/test; same rule for all nonedges; both directions share split",
8
+ "exposure": "RETROSPECTIVE: full graph and historical test outcomes already used in project development; not a blind test",
9
+ "features": "train-only directed spectral32; actual soma Euclidean distances (um); contact-free skeleton geometry; no held-out synapse labels or contact statistics",
10
+ "contact_features": "excluded entirely in this pilot; no claims of completed branch-contact M2",
11
+ "discovery_arms": {
12
+ "graph": [
13
+ 0,
14
+ 0
15
+ ],
16
+ "graph_soma025": [
17
+ 0.25,
18
+ 0
19
+ ],
20
+ "graph_soma1": [
21
+ 1,
22
+ 0
23
+ ],
24
+ "graph_soma4": [
25
+ 4,
26
+ 0
27
+ ],
28
+ "graph_tree": [
29
+ 0,
30
+ 1
31
+ ],
32
+ "graph_soma_tree": [
33
+ 1,
34
+ 1
35
+ ]
36
+ },
37
+ "global_k": 30,
38
+ "parent_k": [
39
+ 2,
40
+ 3,
41
+ 4
42
+ ],
43
+ "init_seeds": [
44
+ 20261030,
45
+ 20261031,
46
+ 20261032,
47
+ 20261033,
48
+ 20261034
49
+ ],
50
+ "pair_dropout_seeds": [
51
+ 20261101,
52
+ 20261102,
53
+ 20261103
54
+ ],
55
+ "pair_dropout_fraction": 0.2,
56
+ "n_init": 5,
57
+ "no_candidate_promotion": true,
58
+ "model_comparison": "exploratory M0-M4 descriptor pilot only; equal two-setting validation budget, max_iter100, leaf15/31, l2=1, learning_rate=.08; final fit train-only",
59
+ "sample_budget": "at most60000 observed directed positives and60000 nonedges, fixed RNG; no test-driven choice",
60
+ "uncertainty": "edge-IID significance prohibited; confirmatory cell/spatial blocks and cross-brain not complete",
61
+ "outputs_label": "DESCRIPTIVE_ONLY, COMPUTED_MODEL_RESULT (retrospective structural prediction); no biological functional validation",
62
+ "amendment": "Previous pilot used coarser official_KC_subtype and omitted KCab-s parents. Preserved p1_v2; this revision uses both coarse and frozen fine known-type categories in M0 and frozen_detailed_subtype for parent selection. No tuning changes.",
63
+ "parent_scope": [
64
+ "KCab-s",
65
+ "KCab-p",
66
+ "KCa'b'-ap1"
67
+ ],
68
+ "fine_label_source": "frozen_detailed_subtype in audited full registry; retains official_KC_subtype separately"
69
+ }
p1_v2_fine_types/audit/release_source_manifest.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "postrun_runner_sha256": "486f03df01c93923a74775fd69edfb5fb19dd391809f0bba32502b6f98fc2704",
3
+ "finalizer_sha256": "acf21a9a721de1104da75075290cd16472e72bcb9e778e53d555c6d0c4c0e270",
4
+ "scope": "Added compact-bundle replay and corrected figure protocol caption after the raw-source run; original runner preserved in runner_snapshot.py."
5
+ }
p1_v2_fine_types/audit/run.log ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ P1A: 5177 identities / frozen stable8 verified
2
+ P1B: unordered pair split / training-only embedding complete
3
+ geometry 1000
4
+ geometry 2000
5
+ geometry 3000
6
+ geometry 4000
7
+ geometry 5000
8
+ P1C: six geometry ablations / full-parent child registries complete
9
+ M0 0.2606936352617916
10
+ M1 0.25956746261839025
11
+ M2_descriptor 0.24339326296360414
12
+ M3_descriptor_discrete 0.23674357076420421
13
+ M4_descriptor_continuous 0.2212159097412558
14
+ {"P1A": "DONE_WITH_MALECNS_BLOCKER", "P1B": "DONE_RETROSPECTIVE_PAIR_ISOLATION", "P1C": "DONE_EXPLORATORY_GEOMETRY_DISCOVERY", "P1D": "PARTIAL_DESCRIPTOR_PILOT_NOT_FULL_BRANCH_CONTACT_MODEL", "P1E": "BLOCKED_INDEPENDENCE_AND_ID_QC", "stable8_unchanged": true, "new_stable_candidates": 0, "scientific_conclusion": "No discrete/continuous verdict yet; full independent competition remains open", "wall_clock_s": 55.4731810092926}
p1_v2_fine_types/audit/runner_snapshot.py ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Run the frozen retrospective P1A-C and bounded M0-M4 descriptor pilot.
2
+
3
+ Run from repository root: PYTHONPATH=simulation/src python simulation/scripts/run_kc_p1_v2.py
4
+ """
5
+ from __future__ import annotations
6
+ import hashlib,json,time,subprocess
7
+ from pathlib import Path
8
+ import numpy as np
9
+ import pandas as pd
10
+ from scipy import sparse
11
+ from scipy.spatial.distance import cdist
12
+ from sklearn.preprocessing import StandardScaler
13
+ from sklearn.cluster import KMeans
14
+ from sklearn.metrics import adjusted_rand_score,roc_auc_score,log_loss
15
+ from sklearn.ensemble import HistGradientBoostingClassifier
16
+ from threadpoolctl import threadpool_limits
17
+ from bio_fly.p1_structure import pair_split,pair_uniform,tree_features,fuse_blocks
18
+ from bio_fly.kc_weighted_structure import _embedding
19
+
20
+ ROOT=Path(__file__).resolve().parents[2]
21
+ OUT=ROOT/'artifacts/nature_kc_20261030/p1_v2_fine_types'
22
+ ATLAS=ROOT/'artifacts/wu_20261030_all5177_structural_atlas'
23
+ GRAPH=ROOT/'nature_methods_connectome/next_stage_structure_first_20260912/artifacts/flywire_all_kc_partner_pilot_20260912'
24
+
25
+ def sha(p):
26
+ h=hashlib.sha256()
27
+ with p.open('rb') as f:
28
+ for b in iter(lambda:f.read(8*1024*1024),b''):h.update(b)
29
+ return h.hexdigest()
30
+
31
+ def dump(p,d):p.write_text(json.dumps(d,indent=2,ensure_ascii=False,default=lambda x:x.item() if hasattr(x,'item') else str(x)))
32
+
33
+ def main():
34
+ start=time.time()
35
+ if (OUT/'P1_STATUS.json').exists():raise RuntimeError('completed run exists; use a separately versioned protocol/output')
36
+ for n in ['registry','data','analysis','figures','audit']:(OUT/n).mkdir(exist_ok=True,parents=True)
37
+ cfg=json.loads((OUT/'audit/protocol.json').read_text()); seed=cfg['seed']; sources=[]
38
+ def source(p):
39
+ p=Path(p);sources.append({'path':str(p.relative_to(ROOT)),'bytes':p.stat().st_size,'sha256':sha(p)});return p
40
+ ids=np.array(json.loads(source(GRAPH/'node_order.json').read_text()),dtype=str)
41
+ reg=pd.read_parquet(source(ROOT/'artifacts/wu_20261019/registry/kc_all.parquet'))
42
+ reg.root_id=reg.root_id.astype(str);reg=reg.set_index('root_id').loc[ids].reset_index()
43
+ su=pd.read_parquet(source(ROOT/'artifacts/wu_20261030_fine_units_integrated_atlas/registry/fine_unit_members.parquet'))
44
+ su.root_id=su.root_id.astype(str)
45
+ reg=reg.merge(su[['root_id','unit_id']],on='root_id',how='left',validate='one_to_one')
46
+ assert len(reg)==len(set(ids))==5177
47
+ expected={'CM012':163,'CM014':152,'CM016':147,'CM019':132,'CM020':129,'CM022':114,'CM031':67,'CM033':61}
48
+ counts=reg.loc[reg.stable_backbone.astype(bool),'candidate_id'].value_counts().to_dict()
49
+ assert counts==expected
50
+ reg['legacy_CM_namespace']='v9_frozen';reg['SU_namespace']='20261030_scale_conditional';reg['P1_role']='full_registry_no_promotion'
51
+ reg.to_parquet(OUT/'registry/all5177_identity.parquet',index=False)
52
+ cross=reg.groupby(['candidate_id','unit_id'],dropna=False).size().reset_index(name='n_shared')
53
+ cross.to_csv(OUT/'registry/CM_SU_crosswalk.csv',index=False)
54
+ print('P1A: 5177 identities / frozen stable8 verified',flush=True)
55
+ # Audit raw annotation alternatives, never silently repair historical normalized tables.
56
+ a=pd.read_parquet(source(ROOT/'audit/meeting_revision_20261027/reproduced_structure/MaleCNS_v1_0_source_annotations.parquet'))
57
+ me=pd.read_parquet(source(ROOT/'audit/meeting_revision_20261027/reproduced_structure/MaleCNS_v1_0_annotated_input_edges.parquet'))
58
+ ends=set(me.pre.astype(str))|set(me.post.astype(str)); body=set(a.body.dropna().astype('int64').astype(str)); aid=set(a.id.astype(str))
59
+ qc={'annotation_rows':len(a),'body_valid_unique':len(body),'id_valid_unique':len(aid),'edge_endpoints':len(ends),
60
+ 'body_unmatched':len(ends-body),'id_unmatched':len(ends-aid),'recovered_by_id':len((ends-body)&aid),
61
+ 'body_vs_id_disagreement':int((a.loc[a.body.notna(),'id'].astype(str)!=a.loc[a.body.notna(),'body'].astype('int64').astype(str)).sum()),
62
+ 'status':'BLOCKED_SOURCE_VERSION_OR_SCOPE_UNRESOLVED','note':'Full source id column does not resolve missing edge endpoints; no cross-version identity inference.'}
63
+ dump(OUT/'audit/malecns_id_QC.json',qc)
64
+ pd.DataFrame({'unmatched_endpoint_id':sorted(ends-aid)}).to_csv(OUT/'registry/malecns_unmatched_endpoints.csv',index=False)
65
+ # Split all observed pairs BEFORE embeddings, features or clustering.
66
+ full=sparse.load_npz(source(GRAPH/'data/kc_graph.npz')).astype(float).tocsr();co=full.tocoo()
67
+ split=pair_split(ids,co.row,co.col,seed)
68
+ train=sparse.csr_matrix((co.data[split==0],(co.row[split==0],co.col[split==0])),shape=full.shape)
69
+ sparse.save_npz(OUT/'data/pair_grouped_train.npz',train)
70
+ pairs=pd.DataFrame({'pre_id':ids[co.row],'post_id':ids[co.col],'synapses':co.data.astype(int),'split':np.array(['train','validation','test'])[split]})
71
+ pairs.to_parquet(OUT/'data/directed_pair_split.parquet',index=False)
72
+ tr=set(zip(co.row[split==0],co.col[split==0]));he=set(zip(co.row[split!=0],co.col[split!=0]))
73
+ assert not tr&he and not tr&{(j,i) for i,j in he}
74
+ splitqc={'n_directed_pairs':full.nnz,'synapses_total':float(full.sum()),'train_pairs':int((split==0).sum()),'validation_pairs':int((split==1).sum()),'test_pairs':int((split==2).sum()),'heldout_direct_overlap':0,'heldout_reverse_overlap':0,'contact_features_used':False,'exposure':'RETROSPECTIVE_NOT_BLIND'}
75
+ dump(OUT/'audit/pair_split_QC.json',splitqc)
76
+ emb=_embedding(train,32,seed);np.save(OUT/'data/train_only_embedding.npy',emb)
77
+ print('P1B: unordered pair split / training-only embedding complete',flush=True)
78
+ # Tree-only geometry, with a hash for every original morphology.
79
+ features=[]
80
+ for i,rid in enumerate(ids):
81
+ p=source(ATLAS/'geometry'/f'{rid}.json');d=json.loads(p.read_text())
82
+ assert str(d['id'])==rid and d['dataset']=='FlyWire v783'
83
+ features.append({'root_id':rid,**tree_features(d)})
84
+ if (i+1)%1000==0:print('geometry',i+1,flush=True)
85
+ geo=pd.DataFrame(features);geo.to_parquet(OUT/'data/contact_free_tree_features.parquet',index=False)
86
+ soma=reg[['soma_x_um','soma_y_um','soma_z_um']].to_numpy(float)
87
+ assert np.isfinite(soma).all(),'missing soma prevents full distance matrix'
88
+ matrix=np.lib.format.open_memmap(OUT/'data/soma_distance_um.npy',mode='w+',dtype='float32',shape=(len(ids),len(ids)))
89
+ for i in range(0,len(ids),256):matrix[i:i+256]=cdist(soma[i:i+256],soma)
90
+ matrix.flush()
91
+ soma_scale=float(np.sqrt(np.mean(np.sum((soma-soma.mean(0))**2,axis=1))))
92
+ S=(soma-soma.mean(0))/soma_scale
93
+ T=StandardScaler().fit_transform(geo.drop(columns='root_id'))
94
+ dump(OUT/'data/feature_schema.json',{'soma_unit':'um','soma_scale_um':soma_scale,'tree_columns':geo.columns[1:].tolist(),'tree_source':'skeleton geometry only; no contacts, partner labels, old CM/SU labels','fusion':'concatenate E/sqrt(dE), sqrt(ws)*(soma-mean)/scale, sqrt(wt)*z(tree)/sqrt(dT)','embedding_source':'pair_grouped_train.npz','normalization':'transductive unlabeled full registry; not inductive new-cell evaluation'})
95
+ arms=cfg['discovery_arms']; assignments=reg[['root_id','candidate_id','unit_id','official_KC_subtype','official_hemisphere']].copy()
96
+ rows=[]; labelsets={}
97
+ def fit(x,k,rs):return KMeans(n_clusters=k,n_init=cfg['n_init'],random_state=rs).fit_predict(x)
98
+ for name,(ws,wt) in arms.items():
99
+ x=fuse_blocks(emb,S,T,ws,wt);labs=[fit(x,30,rs) for rs in cfg['init_seeds']]
100
+ labelsets[name]=labs[0];assignments[name]=labs[0]
101
+ compact=np.mean([np.linalg.norm(soma[labs[0]==c]-soma[labs[0]==c].mean(0),axis=1).mean() for c in np.unique(labs[0])])
102
+ rows.append({'arm':name,'soma_weight':ws,'tree_weight':wt,'mean_cluster_soma_radius_um':compact,'seed_ARI_mean':np.mean([adjusted_rand_score(labs[0],l) for l in labs[1:]]),'n_clusters':30,'n_cells':len(ids),'status':'EXPLORATORY_PARTITION_NOT_STABLE_CANDIDATES'})
103
+ dropout={name:[] for name in arms}
104
+ tc=train.tocoo()
105
+ for rs in cfg['pair_dropout_seeds']:
106
+ keep=pair_uniform(ids,tc.row,tc.col,rs)>=.2
107
+ pert=sparse.csr_matrix((tc.data[keep],(tc.row[keep],tc.col[keep])),shape=train.shape)
108
+ pe=_embedding(pert,32,seed)
109
+ for name,(ws,wt) in arms.items():
110
+ lab=fit(fuse_blocks(pe,S,T,ws,wt),30,seed)
111
+ dropout[name].append(adjusted_rand_score(labelsets[name],lab))
112
+ for row in rows:row['pair_dropout_ARI_mean']=float(np.mean(dropout[row['arm']]));row['pair_dropout_ARI_values']=json.dumps(dropout[row['arm']])
113
+ pd.DataFrame(rows).to_csv(OUT/'analysis/discovery_ablation.csv',index=False)
114
+ assignments.to_parquet(OUT/'registry/P1_exploratory_assignments.parquet',index=False)
115
+ parent_rows=[];parent_members=[]
116
+ # Complete official parents, including all residuals, never candidate-only reclustering.
117
+ for (typ,side),rr in reg.groupby(['frozen_detailed_subtype','official_hemisphere']):
118
+ if typ not in cfg['parent_scope']:continue
119
+ idx=rr.index.to_numpy()
120
+ for name in ['graph','graph_soma_tree']:
121
+ ws,wt=arms[name];x=fuse_blocks(emb,S,T,ws,wt)[idx]
122
+ for k in cfg['parent_k']:
123
+ labs=[fit(x,k,rs) for rs in cfg['init_seeds']]
124
+ parent_rows.append({'parent_type':typ,'side':side,'arm':name,'k':k,'parent_n':len(idx),'stable8_selected_n':int(rr.stable_backbone.sum()),'residual_n':int((~rr.stable_backbone.astype(bool)).sum()),'seed_ARI_mean':np.mean([adjusted_rand_score(labs[0],l) for l in labs[1:]]),'child_sizes':json.dumps(np.bincount(labs[0]).tolist()),'status':'DESCRIPTIVE_ONLY'})
125
+ parent_members.extend({'root_id':ids[j],'parent_type':typ,'side':side,'arm':name,'k':k,'child':int(labs[0][ii])} for ii,j in enumerate(idx))
126
+ pd.DataFrame(parent_rows).to_csv(OUT/'analysis/complete_parent_splits.csv',index=False)
127
+ pd.DataFrame(parent_members).to_parquet(OUT/'registry/parent_child_members.parquet',index=False)
128
+ print('P1C: six geometry ablations / full-parent child registries complete',flush=True)
129
+ comparison(full,train,ids,reg,geo,soma,emb,labelsets['graph_soma_tree'],seed,source)
130
+ figures(reg,soma,labelsets,rows)
131
+ dump(OUT/'audit/source_manifest.json',{'sources':sources,'runner_sha256':sha(Path(__file__)),'primitives_sha256':sha(ROOT/'simulation/src/bio_fly/p1_structure.py'),'protocol_sha256':sha(OUT/'audit/protocol.json'),'code_commit':subprocess.check_output(['git','rev-parse','HEAD'],cwd=ROOT,text=True).strip(),'seed':seed,'dataset_version':'FlyWire v783 / local MaleCNS-v1.0 named source','run_id':cfg['protocol_version'],'wall_clock_s':time.time()-start})
132
+ status={'P1A':'DONE_WITH_MALECNS_BLOCKER','P1B':'DONE_RETROSPECTIVE_PAIR_ISOLATION','P1C':'DONE_EXPLORATORY_GEOMETRY_DISCOVERY','P1D':'PARTIAL_DESCRIPTOR_PILOT_NOT_FULL_BRANCH_CONTACT_MODEL','P1E':'BLOCKED_INDEPENDENCE_AND_ID_QC','stable8_unchanged':True,'new_stable_candidates':0,'scientific_conclusion':'No discrete/continuous verdict yet; full independent competition remains open','wall_clock_s':time.time()-start}
133
+ dump(OUT/'P1_STATUS.json',status)
134
+ print(json.dumps(status),flush=True)
135
+
136
+ def comparison(full,train,ids,reg,geo,soma,emb,labels,seed,source):
137
+ rng=np.random.default_rng(seed);co=full.tocoo();ix=rng.choice(len(co.data),min(60000,len(co.data)),replace=False)
138
+ a=list(co.row[ix]);b=list(co.col[ix]);positive=set(zip(co.row,co.col));neg=set()
139
+ while len(neg)<60000:
140
+ q=rng.integers(0,len(ids),size=(10000,2))
141
+ for i,j in q:
142
+ if i!=j and (i,j) not in positive:neg.add((int(i),int(j)))
143
+ if len(neg)==60000:break
144
+ na,nb=np.array(sorted(neg)).T;y=np.r_[np.ones(len(a)),np.zeros(len(na))].astype(int)
145
+ a=np.r_[a,na].astype(int);b=np.r_[b,nb].astype(int);sp=pair_split(ids,a,b,seed)
146
+ pd.DataFrame({'pre_id':ids[a],'post_id':ids[b],'edge_present':y,'split':np.array(['train','validation','test'])[sp]}).to_parquet(OUT/'data/prediction_pairs.parquet',index=False)
147
+ codes=pd.Categorical(reg.official_KC_subtype.fillna('unknown')).codes
148
+ fine=pd.Categorical(reg.frozen_detailed_subtype.fillna('unknown')).codes
149
+ sides=pd.Categorical(reg.official_hemisphere.fillna('unknown')).codes
150
+ base=np.column_stack([codes[a],codes[b],fine[a],fine[b],sides[a],sides[b]])
151
+ deg=np.column_stack([np.asarray(train.sum(1)).ravel(),np.asarray(train.sum(0)).ravel()])
152
+ spatial=np.column_stack([soma[a],soma[b],np.abs(soma[a]-soma[b]),np.linalg.norm(soma[a]-soma[b],axis=1),np.log1p(deg[a]),np.log1p(deg[b])])
153
+ t=geo.drop(columns='root_id').to_numpy(float)
154
+ tree=np.column_stack([t[a],t[b],np.abs(t[a]-t[b])])
155
+ m1=np.column_stack([base,spatial]);m2=np.column_stack([m1,tree])
156
+ matrices={'M0':base,'M1':m1,'M2_descriptor':m2,'M3_descriptor_discrete':np.column_stack([m2,labels[a],labels[b],labels[a]==labels[b]]),'M4_descriptor_continuous':np.column_stack([m2,emb[a],emb[b],np.abs(emb[a]-emb[b])])}
157
+ records=[];preds=pd.DataFrame({'pre_id':ids[a[sp==2]],'post_id':ids[b[sp==2]],'edge_present':y[sp==2]})
158
+ for name,x in matrices.items():
159
+ cat=np.zeros(x.shape[1],dtype=bool);cat[:6]=True
160
+ if name.startswith('M3'):cat[-3:-1]=True
161
+ fits=[]
162
+ for leaves in [15,31]:
163
+ tm=time.time();model=HistGradientBoostingClassifier(max_iter=100,max_leaf_nodes=leaves,learning_rate=.08,l2_regularization=1,categorical_features=cat,early_stopping=False,random_state=seed)
164
+ model.fit(x[sp==0],y[sp==0]);vl=log_loss(y[sp==1],model.predict_proba(x[sp==1])[:,1]);fits.append((vl,leaves,model,time.time()-tm))
165
+ vl,leaves,model,_=min(fits,key=lambda z:z[0]);p=model.predict_proba(x[sp==2])[:,1];preds[name]=p
166
+ records.append({'model':name,'test_log_loss':log_loss(y[sp==2],p),'test_AUROC':roc_auc_score(y[sp==2],p),'validation_log_loss':vl,'selected_max_leaves':leaves,'n_features':x.shape[1],'n_train':int((sp==0).sum()),'n_validation':int((sp==1).sum()),'n_test':int((sp==2).sum()),'training_budget':'2 settings x100 iterations','training_wall_clock_s':sum(z[3] for z in fits),'evidence':'RETROSPECTIVE_DESCRIPTOR_PILOT','uncertainty':'NOT_ESTIMATED_NO_SIGNIFICANCE_CLAIM','sampling':'case-control 60000 positive/60000 negative; probabilities not natural prevalence calibrated'})
167
+ print(name,records[-1]['test_log_loss'],flush=True)
168
+ pd.DataFrame(records).to_csv(OUT/'MODEL_COMPARISON.csv',index=False);preds.to_parquet(OUT/'data/test_predictions.parquet',index=False)
169
+
170
+ def figures(reg,soma,labels,rows):
171
+ import matplotlib
172
+ matplotlib.use('Agg')
173
+ import matplotlib.pyplot as plt
174
+ selected=reg.candidate_id.eq('CM019') & reg.stable_backbone.astype(bool)
175
+ parent=reg.frozen_detailed_subtype.eq("KCa'b'-ap1") & reg.official_hemisphere.eq('left')
176
+ fig,axes=plt.subplots(1,3,figsize=(12,4))
177
+ for ax,(i,j) in zip(axes,[(0,1),(0,2),(1,2)]):
178
+ ax.scatter(soma[:,i],soma[:,j],s=1,c='#dddddd',rasterized=True,label='all KC')
179
+ ax.scatter(soma[parent&~selected,i],soma[parent&~selected,j],s=16,facecolors='none',edgecolors='#d95f02',label='parent residual')
180
+ ax.scatter(soma[selected,i],soma[selected,j],s=5,c='#147d92',label='CM019')
181
+ ax.set(xlabel='XYZ'[i]+' (um)',ylabel='XYZ'[j]+' (um)');ax.set_aspect('equal')
182
+ axes[-1].legend(fontsize=7);fig.suptitle(f'CM019: selected {selected.sum()}, left ap1 parent {parent.sum()}, residual {(parent&~selected).sum()}')
183
+ fig.text(.01,.01,'FlyWire v783; all5177_identity.parquet; P1-v2.1; DESCRIPTIVE_ONLY; soma positions, no dynamic validation',fontsize=7)
184
+ fig.tight_layout(rect=(0,.04,1,.93))
185
+ for ext in ['pdf','svg']:fig.savefig(OUT/'figures'/f'CM019_full_parent_somata.{ext}')
186
+ plt.close(fig)
187
+ fig,axes=plt.subplots(2,3,figsize=(12,8))
188
+ for ax,(name,lab) in zip(axes.ravel(),labels.items()):
189
+ ax.scatter(soma[:,0],soma[:,1],s=2,c=lab,cmap='turbo',rasterized=True);ax.set_title(name);ax.set_aspect('equal');ax.set(xlabel='X (um)',ylabel='Y (um)')
190
+ fig.suptitle('Actual spatial fusion: same K=30, six frozen feature arms')
191
+ fig.text(.01,.01,'FlyWire v783; P1_exploratory_assignments.parquet; n=5177 each; P1-v2.1; exploratory partitions, not new stable units',fontsize=7)
192
+ fig.tight_layout(rect=(0,.04,1,.95))
193
+ for ext in ['pdf','svg']:fig.savefig(OUT/'figures'/f'spatial_fusion_ablation.{ext}')
194
+ plt.close(fig)
195
+
196
+ if __name__=='__main__':
197
+ with threadpool_limits(limits=4):main()
p1_v2_fine_types/audit/source_manifest.json ADDED
The diff for this file is too large to render. See raw diff
 
p1_v2_fine_types/audit/standalone_replay_checks.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "models_exact": true,
3
+ "assignments_exact": true,
4
+ "parents_exact": true,
5
+ "source_audit_repeated": false,
6
+ "note": "Compact bundle replay reconstructs graph and recalculates discovery/model results; imports source audit and precomputed geometry."
7
+ }
p1_v2_fine_types/audit/structural_checks.csv ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ check,passed,actual
2
+ all_KC_unique_strings,True,5177
3
+ stable8_union,True,965
4
+ full_KCab-s_left,True,[311]
5
+ full_KCab-s_right,True,[310]
6
+ synapse_conservation,True,379338
7
+ train_validation_direct_and_reverse_isolation,True,"[0, 0]"
8
+ train_test_direct_and_reverse_isolation,True,"[0, 0]"
9
+ validation_test_direct_and_reverse_isolation,True,"[0, 0]"
10
+ node_JSON_string_roundtrip,True,5177
11
+ SU019_CM019_not_aliased,True,"[104, 132, 104]"
p1_v2_fine_types/data/contact_free_tree_features.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02faead833dd5b846efb11e749b0ced53252176e664d8adfb34897f7db4da2d4
3
+ size 769954
p1_v2_fine_types/data/directed_pair_split.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac28bbbd928cc8f4459850ea35a8732fd6191228cc7fac5db048676d9f115891
3
+ size 735097
p1_v2_fine_types/data/feature_schema.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "soma_unit": "um",
3
+ "soma_scale_um": 104.1533268297617,
4
+ "tree_columns": [
5
+ "cable_length_um",
6
+ "n_branch_ids",
7
+ "n_terminals",
8
+ "n_branchpoints",
9
+ "edge_length_median_um",
10
+ "edge_length_p95_um",
11
+ "path_median_um",
12
+ "path_p95_um",
13
+ "centroid_x_um",
14
+ "extent_x_um",
15
+ "principal_sd_0_um",
16
+ "centroid_y_um",
17
+ "extent_y_um",
18
+ "principal_sd_1_um",
19
+ "centroid_z_um",
20
+ "extent_z_um",
21
+ "principal_sd_2_um"
22
+ ],
23
+ "tree_source": "skeleton geometry only; no contacts, partner labels, old CM/SU labels",
24
+ "fusion": "concatenate E/sqrt(dE), sqrt(ws)*(soma-mean)/scale, sqrt(wt)*z(tree)/sqrt(dT)",
25
+ "embedding_source": "pair_grouped_train.npz",
26
+ "normalization": "transductive unlabeled full registry; not inductive new-cell evaluation"
27
+ }
p1_v2_fine_types/data/pair_grouped_train.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c987937c78c13c5f3859859aafa0cf6ccf4ce28a8ca073e9a6273b9a46d590a8
3
+ size 465705
p1_v2_fine_types/data/prediction_pairs.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0011019ed8394c276f4311f136a87a00d7f3c2f7c774d3280e43c306031cf455
3
+ size 437528
p1_v2_fine_types/data/test_predictions.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d32a46516440e0ec07e1675e9e795c2409e9f86c1e241fe7f030f4806cc09c50
3
+ size 847321
p1_v2_fine_types/data/train_only_embedding.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06e47ce94f182181ef8989e371e1c56e88bb6ea5bc84edc0d0c8d1e28e39ace7
3
+ size 2650752
p1_v2_fine_types/figure_source_ledger.csv ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ figure,source_file,dataset_version,protocol,n,denominator,metric_definition,simulation_vs_biology_label,run_id
2
+ figures/CM019_full_parent_somata.svg,registry/all5177_identity.parquet;registry/P1_exploratory_assignments.parquet,FlyWire v783,P1-v2.2-retrospective-fine-type-geometry-pilot,5177,all registered KC,real soma coordinate in um; categorical discovered partition or CM019/parent/background,DESCRIPTIVE_REAL_STRUCTURE_NOT_FUNCTIONAL_VALIDATION,P1-v2.2-retrospective-fine-type-geometry-pilot
3
+ figures/CM019_full_parent_somata.pdf,registry/all5177_identity.parquet;registry/P1_exploratory_assignments.parquet,FlyWire v783,P1-v2.2-retrospective-fine-type-geometry-pilot,5177,all registered KC,real soma coordinate in um; categorical discovered partition or CM019/parent/background,DESCRIPTIVE_REAL_STRUCTURE_NOT_FUNCTIONAL_VALIDATION,P1-v2.2-retrospective-fine-type-geometry-pilot
4
+ figures/spatial_fusion_ablation.svg,registry/all5177_identity.parquet;registry/P1_exploratory_assignments.parquet,FlyWire v783,P1-v2.2-retrospective-fine-type-geometry-pilot,5177,all registered KC,real soma coordinate in um; categorical discovered partition or CM019/parent/background,DESCRIPTIVE_REAL_STRUCTURE_NOT_FUNCTIONAL_VALIDATION,P1-v2.2-retrospective-fine-type-geometry-pilot
5
+ figures/spatial_fusion_ablation.pdf,registry/all5177_identity.parquet;registry/P1_exploratory_assignments.parquet,FlyWire v783,P1-v2.2-retrospective-fine-type-geometry-pilot,5177,all registered KC,real soma coordinate in um; categorical discovered partition or CM019/parent/background,DESCRIPTIVE_REAL_STRUCTURE_NOT_FUNCTIONAL_VALIDATION,P1-v2.2-retrospective-fine-type-geometry-pilot
p1_v2_fine_types/figures/CM019_full_parent_somata.pdf ADDED
Binary file (52.8 kB). View file
 
p1_v2_fine_types/figures/CM019_full_parent_somata.svg ADDED
p1_v2_fine_types/figures/spatial_fusion_ablation.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:866d72796bffd3cb07e65e8570a4445872c1af8748514a292d205a99a59f14f7
3
+ size 245509
p1_v2_fine_types/figures/spatial_fusion_ablation.svg ADDED
p1_v2_fine_types/registry/CM_SU_crosswalk.csv ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ candidate_id,unit_id,n_shared
2
+ CM001,,390
3
+ CM002,,307
4
+ CM003,,304
5
+ CM004,,252
6
+ CM005,,241
7
+ CM006,,220
8
+ CM007,SU002,206
9
+ CM008,SU003,180
10
+ CM009,SU004,171
11
+ CM010,SU005,167
12
+ CM011,,164
13
+ CM012,SU017,116
14
+ CM012,,47
15
+ CM013,,158
16
+ CM014,SU022,97
17
+ CM014,,55
18
+ CM015,,150
19
+ CM016,SU021,98
20
+ CM016,,49
21
+ CM017,SU011,144
22
+ CM018,SU013,132
23
+ CM018,,6
24
+ CM019,SU019,104
25
+ CM019,,28
26
+ CM020,SU018,108
27
+ CM020,,21
28
+ CM021,,129
29
+ CM022,SU027,84
30
+ CM022,,30
31
+ CM023,,94
32
+ CM024,SU036,55
33
+ CM024,,38
34
+ CM025,SU037,50
35
+ CM025,,39
36
+ CM026,SU024,88
37
+ CM027,SU033,68
38
+ CM027,,14
39
+ CM028,,75
40
+ CM029,SU039,41
41
+ CM029,,30
42
+ CM030,SU030,70
43
+ CM031,SU034,67
44
+ CM032,,62
45
+ CM033,SU035,61
46
+ CM034,,46
47
+ CM035,,41
48
+ CM036,,13
49
+ CM037,,11
50
+ CM038,,8
51
+ CM039,SU030,7
52
+ CM040,,6
53
+ CM041,SU003,5
54
+ CM042,,5
55
+ CM043,SU024,5
56
+ CM044,,4
57
+ CM045,,3
58
+ CM046,,3
59
+ CM047,,3
60
+ CM048,,2
61
+ CM049,,2
62
+ CM050,,1
63
+ CM051,,1
64
+ CM052,SU005,1
p1_v2_fine_types/registry/P1_exploratory_assignments.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eab3c8ccdaf056fcd085820158de322da0c74f37ddb97b98bd246b073442bebd
3
+ size 84120
p1_v2_fine_types/registry/all5177_identity.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0440f0c0fa77f547df027c929b6b120d8e8121acc59fafe78e880fb8ece4e630
3
+ size 231062
p1_v2_fine_types/registry/ap1L_18_exploratory_members.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6dc7405e9240d0435d2d275f1c0d5a94acebda518ff06a7451620aab8babe24d
3
+ size 31509
p1_v2_fine_types/registry/malecns_unmatched_endpoints.csv ADDED
The diff for this file is too large to render. See raw diff
 
p1_v2_fine_types/registry/parent_candidate_residual_atlas.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e7607070cc9fb9608ee2ec92502c24ea43190a2b1f2bd88114d62d5b8c532f4
3
+ size 17946
p1_v2_fine_types/registry/parent_child_members.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75bf98bd0695832b307ab192adcc09e82a9cb81a63a0a43c80d3d013eb7f32ce
3
+ size 22544