Datasets:
The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
text: string
derived: struct<hops_from_retina: string, hops_to_descending: string, computed_by: string>
child 0, hops_from_retina: string
child 1, hops_to_descending: string
child 2, computed_by: string
name: string
edges: int64
soma_positions: struct<included: bool, note: string>
child 0, included: bool
child 1, note: string
neurons: int64
neurons_detail: struct<superclasses: int64, cell_types: int64, untyped: int64, note: string>
child 0, superclasses: int64
child 1, cell_types: int64
child 2, untyped: int64
child 3, note: string
synaptic_contacts: int64
description: string
files: struct<edges_offsets: struct<file: string, dtype: string, shape: list<item: int64>, bytes: int64, sh (... 1367 chars omitted)
child 0, edges_offsets: struct<file: string, dtype: string, shape: list<item: int64>, bytes: int64, sha256: string>
child 0, file: string
child 1, dtype: string
child 2, shape: list<item: int64>
child 0, item: int64
child 3, bytes: int64
child 4, sha256: string
child 1, edges_source: struct<file: string, dtype: string, shape: list<item: int64>, bytes: int64, sha256: string>
child 0, file: string
child 1, dtype: string
child 2, shape: list<item: int64>
child 0, item: int64
child 3, bytes: int64
child 4, sha256: string
child 2, edges_weight: struct<file: string, dtype: string, shape: list<item: int64>, bytes: int64, sha256: string>
child 0, file: string
child 1,
...
t<url: string, bytes: int64, sha256: string, path: string>
child 0, url: string
child 1, bytes: int64
child 2, sha256: string
child 3, path: string
child 2, assembled_via: string
child 3, source_graph_sha256: string
child 4, source_graph_bytes: int64
child 5, packager_sha256: string
child 6, minimum_confidence: double
license: struct<data: string, attribution: string, packaging_code: string>
child 0, data: string
child 1, attribution: string
child 2, packaging_code: string
schema_version: int64
csr: struct<orientation: string, offsets_length: int64, reconstruct: string, transpose_note: string>
child 0, orientation: string
child 1, offsets_length: int64
child 2, reconstruct: string
child 3, transpose_note: string
weights: struct<raw: bool, normalization_applied: bool, semantics: string, positive_edges: int64, negative_ed (... 52 chars omitted)
child 0, raw: bool
child 1, normalization_applied: bool
child 2, semantics: string
child 3, positive_edges: int64
child 4, negative_edges: int64
child 5, zero_edges: int64
child 6, absolute_max: double
related: struct<central_brain_subset: string, models: list<item: string>>
child 0, central_brain_subset: string
child 1, models: list<item: string>
child 0, item: string
populations: struct<retina: int64, lamina: int64, descending: int64, sugar: int64>
child 0, retina: int64
child 1, lamina: int64
child 2, descending: int64
child 3, sugar: int64
to
{'schema_version': Value('int64'), 'created_at_utc': Value('string'), 'name': Value('string'), 'description': Value('string'), 'neurons': Value('int64'), 'edges': Value('int64'), 'synaptic_contacts': Value('int64'), 'csr': {'orientation': Value('string'), 'offsets_length': Value('int64'), 'reconstruct': Value('string'), 'transpose_note': Value('string')}, 'weights': {'raw': Value('bool'), 'normalization_applied': Value('bool'), 'semantics': Value('string'), 'positive_edges': Value('int64'), 'negative_edges': Value('int64'), 'zero_edges': Value('int64'), 'absolute_max': Value('float64')}, 'neurons_detail': {'superclasses': Value('int64'), 'cell_types': Value('int64'), 'untyped': Value('int64'), 'note': Value('string')}, 'populations': {'retina': Value('int64'), 'lamina': Value('int64'), 'descending': Value('int64'), 'sugar': Value('int64')}, 'derived': {'hops_from_retina': Value('string'), 'hops_to_descending': Value('string'), 'computed_by': Value('string')}, 'soma_positions': {'included': Value('bool'), 'note': Value('string')}, 'provenance': {'dataset': Value('string'), 'upstream_files': {'annotations.feather': {'url': Value('string'), 'bytes': Value('int64'), 'sha256': Value('string'), 'path': Value('string')}, 'neurotransmitters.feather': {'url': Value('string'), 'bytes': Value('int64'), 'sha256': Value('string'), 'path': Value('string')}, 'edges.feather': {'url': Value('string'), 'bytes': Value('int64'), 'sha256': Value('string'), 'path': Value('string')}}, 'assembled_vi
...
('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'cell_type_index': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'superclass_labels': {'file': Value('string'), 'bytes': Value('int64'), 'sha256': Value('string')}, 'cell_type_labels': {'file': Value('string'), 'bytes': Value('int64'), 'sha256': Value('string')}, 'hops_from_retina': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'hops_to_descending': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'population_retina': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'population_lamina': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'population_descending': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'population_sugar': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}}, 'license': {'data': Value('string'), 'attribution': Value('string'), 'packaging_code': Value('string')}}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2840, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2373, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2398, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
text: string
derived: struct<hops_from_retina: string, hops_to_descending: string, computed_by: string>
child 0, hops_from_retina: string
child 1, hops_to_descending: string
child 2, computed_by: string
name: string
edges: int64
soma_positions: struct<included: bool, note: string>
child 0, included: bool
child 1, note: string
neurons: int64
neurons_detail: struct<superclasses: int64, cell_types: int64, untyped: int64, note: string>
child 0, superclasses: int64
child 1, cell_types: int64
child 2, untyped: int64
child 3, note: string
synaptic_contacts: int64
description: string
files: struct<edges_offsets: struct<file: string, dtype: string, shape: list<item: int64>, bytes: int64, sh (... 1367 chars omitted)
child 0, edges_offsets: struct<file: string, dtype: string, shape: list<item: int64>, bytes: int64, sha256: string>
child 0, file: string
child 1, dtype: string
child 2, shape: list<item: int64>
child 0, item: int64
child 3, bytes: int64
child 4, sha256: string
child 1, edges_source: struct<file: string, dtype: string, shape: list<item: int64>, bytes: int64, sha256: string>
child 0, file: string
child 1, dtype: string
child 2, shape: list<item: int64>
child 0, item: int64
child 3, bytes: int64
child 4, sha256: string
child 2, edges_weight: struct<file: string, dtype: string, shape: list<item: int64>, bytes: int64, sha256: string>
child 0, file: string
child 1,
...
t<url: string, bytes: int64, sha256: string, path: string>
child 0, url: string
child 1, bytes: int64
child 2, sha256: string
child 3, path: string
child 2, assembled_via: string
child 3, source_graph_sha256: string
child 4, source_graph_bytes: int64
child 5, packager_sha256: string
child 6, minimum_confidence: double
license: struct<data: string, attribution: string, packaging_code: string>
child 0, data: string
child 1, attribution: string
child 2, packaging_code: string
schema_version: int64
csr: struct<orientation: string, offsets_length: int64, reconstruct: string, transpose_note: string>
child 0, orientation: string
child 1, offsets_length: int64
child 2, reconstruct: string
child 3, transpose_note: string
weights: struct<raw: bool, normalization_applied: bool, semantics: string, positive_edges: int64, negative_ed (... 52 chars omitted)
child 0, raw: bool
child 1, normalization_applied: bool
child 2, semantics: string
child 3, positive_edges: int64
child 4, negative_edges: int64
child 5, zero_edges: int64
child 6, absolute_max: double
related: struct<central_brain_subset: string, models: list<item: string>>
child 0, central_brain_subset: string
child 1, models: list<item: string>
child 0, item: string
populations: struct<retina: int64, lamina: int64, descending: int64, sugar: int64>
child 0, retina: int64
child 1, lamina: int64
child 2, descending: int64
child 3, sugar: int64
to
{'schema_version': Value('int64'), 'created_at_utc': Value('string'), 'name': Value('string'), 'description': Value('string'), 'neurons': Value('int64'), 'edges': Value('int64'), 'synaptic_contacts': Value('int64'), 'csr': {'orientation': Value('string'), 'offsets_length': Value('int64'), 'reconstruct': Value('string'), 'transpose_note': Value('string')}, 'weights': {'raw': Value('bool'), 'normalization_applied': Value('bool'), 'semantics': Value('string'), 'positive_edges': Value('int64'), 'negative_edges': Value('int64'), 'zero_edges': Value('int64'), 'absolute_max': Value('float64')}, 'neurons_detail': {'superclasses': Value('int64'), 'cell_types': Value('int64'), 'untyped': Value('int64'), 'note': Value('string')}, 'populations': {'retina': Value('int64'), 'lamina': Value('int64'), 'descending': Value('int64'), 'sugar': Value('int64')}, 'derived': {'hops_from_retina': Value('string'), 'hops_to_descending': Value('string'), 'computed_by': Value('string')}, 'soma_positions': {'included': Value('bool'), 'note': Value('string')}, 'provenance': {'dataset': Value('string'), 'upstream_files': {'annotations.feather': {'url': Value('string'), 'bytes': Value('int64'), 'sha256': Value('string'), 'path': Value('string')}, 'neurotransmitters.feather': {'url': Value('string'), 'bytes': Value('int64'), 'sha256': Value('string'), 'path': Value('string')}, 'edges.feather': {'url': Value('string'), 'bytes': Value('int64'), 'sha256': Value('string'), 'path': Value('string')}}, 'assembled_vi
...
('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'cell_type_index': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'superclass_labels': {'file': Value('string'), 'bytes': Value('int64'), 'sha256': Value('string')}, 'cell_type_labels': {'file': Value('string'), 'bytes': Value('int64'), 'sha256': Value('string')}, 'hops_from_retina': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'hops_to_descending': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'population_retina': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'population_lamina': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'population_descending': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}, 'population_sugar': {'file': Value('string'), 'dtype': Value('string'), 'shape': List(Value('int64')), 'bytes': Value('int64'), 'sha256': Value('string')}}, 'license': {'data': Value('string'), 'attribution': Value('string'), 'packaging_code': Value('string')}}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Fly Connectome — MaleCNS 166k
The whole fruit fly central nervous system, as plain typed arrays.
166,700 neurons, 25,582,938 directed connections, 124,177,617 synaptic contacts —
raw signed weights, nothing normalized, in a destination-major CSR you can np.fromfile
and use in about four lines.
This is the complete graph. If you want only the 49,393-neuron central-brain subset that the Fly LLM language models run on, with measured soma positions, that is fly-connectome-49k. The two use the same conventions and compose.
Measured biological connectivity. Nothing here was learned or fitted.
Contents — 209.5 MB
| File | Shape | dtype | What it is |
|---|---|---|---|
graph/edges_offsets.i32 |
166,701 | int32 | CSR row offsets; row = postsynaptic neuron |
graph/edges_source.i32 |
25,582,938 | int32 | presynaptic neuron index |
graph/edges_weight.f32 |
25,582,938 | float32 | signed synaptic weight |
neurons/body_id.i64 |
166,700 | int64 | MaleCNS body IDs |
neurons/superclass_index.i32 + superclass_labels.json |
166,700 / 27 | int32 | superclass |
neurons/cell_type_index.i32 + cell_type_labels.json |
166,700 / 11,752 | int32 | cell type |
populations/{retina,lamina,descending,sugar}.i32 |
3,335 / 7,114 / 1,314 / 23 | int32 | named input and output sets |
derived/hops_from_retina.i32, hops_to_descending.i32 |
166,700 | int32 | hop counts (computed here, not upstream) |
manifest.json |
— | — | shapes, dtypes, SHA-256 of every file, provenance |
15,768,940 excitatory and 9,813,998 inhibitory edges, none zero. Mean in-degree 153.5, median 98, maximum 11,526. Weight magnitudes run from 0 to 712.5 with a median of 0.55.
The largest superclasses: ol_intrinsic 89,403 · cb_intrinsic 32,164 ·
vnc_intrinsic 13,161 · visual_projection 9,201 · vnc_sensory 6,370 ·
ol_sensory 6,098 · cb_sensory 4,868 · ascending_neuron 1,846 ·
descending_neuron 1,314 · vnc_motor 708.
Load it
import numpy as np
from pathlib import Path
from huggingface_hub import snapshot_download
root = Path(snapshot_download('fernandofernandes/fly-connectome-malecns-166k', repo_type='dataset'))
offsets = np.fromfile(root / 'graph/edges_offsets.i32', dtype=np.int32) # 166,701
source = np.fromfile(root / 'graph/edges_source.i32', dtype=np.int32) # 25,582,938
weight = np.fromfile(root / 'graph/edges_weight.f32', dtype=np.float32)
# Everything presynaptic to neuron 12345, as (index, signed weight) pairs:
lo, hi = offsets[12345], offsets[12346]
incoming = list(zip(source[lo:hi], weight[lo:hi]))
As a sparse matrix, W[postsynaptic, presynaptic]:
from scipy.sparse import csr_matrix
W = csr_matrix((weight, source, offsets), shape=(166700, 166700))
Drive it like a rate network — visual input into populations/retina.i32, read motor
intent out of populations/descending.i32:
retina = np.fromfile(root / 'populations/retina.i32', dtype=np.int32)
descending = np.fromfile(root / 'populations/descending.i32', dtype=np.int32)
x = np.zeros(166700, dtype=np.float32)
for _ in range(steps):
drive = np.zeros_like(x)
drive[retina] = stimulus # your input, however you encode it
x = 0.9 * np.tanh(W @ x + drive) + 0.1 * x # your dynamics, this is only an example
motor = x[descending]
The recurrence above is an example, not part of the dataset. The connectome fixes the wiring; every dynamical choice — gains, leak, nonlinearity, timestep — is yours.
Verify it
Every file's SHA-256 is in manifest.json.
verify_connectome_package.py
runs 17 structural checks with nothing but NumPy, and works on both this dataset and the
49k subset:
All 17 checks passed: 166,700 neurons, 25,582,938 edges, 11,752 cell types, 4 named populations.
What the weights mean, precisely
A weight is a signed synaptic count: magnitude from the flat connectome at minimum
confidence 0.5, sign from the neurotransmitter prediction. It is not a conductance,
not a measured physiological strength, and not calibrated across cell types. No
normalization of any kind has been applied — normalization_applied is false in the
manifest, and any scaling you need is yours to choose and to record.
Edges are not coalesced. Cell type is an empty label where the source carries no
official type. The two derived/ hop arrays were computed by this project, not by the
upstream release, and are -1 where a neuron is unreachable.
Soma coordinates are not included here. The 49k subset carries measured soma positions for its neurons.
Provenance
Assembled from the three publicly hosted MaleCNS v1.0 flat-connectome files, via
Doomfly at commit 71ecf53d:
| Upstream file | Bytes | SHA-256 |
|---|---|---|
connectome-weights-male-cns-v1.0-minconf-0.5.feather |
1,051,241,946 | e35da783… |
body-neurotransmitters-male-cns-v1.0.feather |
43,282,834 | 95c92892… |
body-annotations-male-cns-v1.0-minconf-0.5.feather |
14,483,314 | 2177e246… |
Full URLs and digests are in manifest.json under provenance.upstream_files, so you can
rebuild this package from the original release and check it against ours.
Licence and attribution
CC BY 4.0. Connectome data: FlyEM / HHMI Janelia Research Campus, University of Cambridge, MRC Laboratory of Molecular Biology, and Google Research. Packaging code MIT.
Used by fly-wordbrain; hear the 49k subset write and read a story aloud at Fly Recital.
- Downloads last month
- 220