CNeuroMod treats reproducibility as a property of the data assets themselves, not only of the analyses built on them. Code, software environments and data are versioned together in DataLad datasets Halchenko et al., 2021, the derivatives most used for machine learning carry standard dataset metadata, and every analysis in this article was run with the same lightweight framework. All of these repositories also document their conventions in a form that coding agents can read.
Versioned data assets¶
The databank is organised according to the YODA principles Wagner et al., 2023: each
component (a raw BIDS dataset, an fMRIPrep derivative, a set of extracted timeseries) is an
independent DataLad dataset that declares its own inputs, code and software environment as
nested subdatasets. A derivative such as hcptrt/fmriprep contains its inputs under
sourcedata/ (the raw hcptrt BIDS dataset, the anat.smriprep anatomical derivatives and
TemplateFlow templates), the scripts and configuration files used to process each session
under code/, and the container images of the processing software under containers/
(a subdataset of the ReproNim containers
collection). Each subdataset is pinned to an exact commit, and its file content is
addressed by checksum through git-annex. The same structure repeats at every step:
the timeseries datasets, for instance, pin both the fMRIPrep derivatives they were
extracted from and the version of the extraction library. Following any file back through these
pins leads to the raw data, and the release tags of cneuromod.all (see
Data Availability) freeze this whole graph at a given point in time.
Processing steps were executed with datalad run, which records each computation as a git
commit. The commit message holds a machine-readable record of the command, its inputs, the
container image it ran in, its outputs and its exit status, as in this excerpt of the
record that produced one fMRIPrep session (command abridged and wrapped for readability):
{
"cmd": "containers/scripts/singularity_cmd run
containers/images/bids/bids-fmriprep--20.2.5.sing
-w ./workdir --participant-label 03
--anat-derivatives ./sourcedata/smriprep
--bids-filter-file
code/fmriprep_study-hcptrt_sub-03_ses-011_bids_filters.json
--output-spaces MNI152NLin2009cAsym T1w:res-iso2mm
... sourcedata/hcptrt ./ participant",
"extra_inputs": [
"containers/images/bids/bids-fmriprep--20.2.5.sing"
],
"inputs": [
"sourcedata/hcptrt/sub-03/ses-011/func/",
"sourcedata/smriprep/sub-03/anat/",
"..."
],
"outputs": ["."],
"exit": 0
}Because the container image, the code and the inputs are all versioned in the same
dataset, this record captures the complete state of the computation, and
datalad rerun can repeat it. Provenance is preserved over the whole life cycle of an
asset: when data from new sessions are added or a derivative is regenerated, the new
outputs are recorded as new commits, and every earlier state remains available. Older
derivatives produced before this practice was adopted have no recorded command; for these,
the code and input versions are still pinned, but the exact invocation is not.
Machine-learning-ready timeseries¶
Every timeseries dataset (see Data Record) is a valid
Croissant 1.1 dataset Akhtar et al., 2024.
Croissant is the MLCommons metadata standard for machine-learning datasets, built on
schema.org. A metadata.json file at the root of each dataset describes its license, its
files, and one record set per spatial representation (the individual cneuromod26 and
group-level Schaefer 1,000-parcel atlases Schaefer et al., 2018, and voxel-wise timeseries
in MNI and native space). Each record links a subject and run identifier to the HDF5 array
of the run’s timeseries, the parcellation it was extracted with and the matching
grey-matter mask. These datasets can therefore be read with generic Croissant loaders such
as mlcroissant, indexed by dataset search engines, and consumed by machine-learning
frameworks without any CNeuroMod-specific code.
Reproducible analyses¶
The analyses and figures of this article were produced with
airoh, a Python package of reusable
invoke tasks, and its project template
airoh-project. The framework was developed
in part for this project and applies a small set of consistent principles. Every
repository separates inputs (source_data/) from computed results (output_data/), and
exposes the same commands. invoke fetch retrieves the inputs (DataLad subdatasets, git
submodules or files), pinned to the versions the analysis was run on. invoke run then
executes the full pipeline offline from what is on disk, and never pulls data on its own.
Steps are skipped when their outputs already exist, invoke run --force regenerates
everything from scratch, a smoke mode checks the pipeline end to end on a small subset,
and, in most repositories, invoke verify checks that code, configuration, data and
documentation still agree.
Heavy computation lives in Python modules; notebooks only turn the computed results into
figure panels. The repositories, and the figures they generate, are:
the depth-versus-breadth comparison of dense neuroimaging datasets (Figure 1):
courtois-neuromod/cneuromod.all.comparison;the per-subject data volume across CNeuroMod datasets (Figure 2) and all dataset statistics quoted in the text:
courtois-neuromod/cneuromod.all.statistics;fMRI data quality (Figure 4):
courtois-neuromod/cneuromod.all.qa_figures;grey matter stability (Figure 5):
courtois-neuromod/anat.stability_grey_matter;connectome stability and state dependence (Figure 6):
courtois-neuromod/cneuromod.all.connectome_stats;data reuse (Figure 7):
courtois-neuromod/cneuromod.all.reuse_stats.
The manuscript itself is part of this chain. It is a Jupyter Book
(courtois-neuromod/cneuromod.paper)
that includes each analysis repository as a git submodule; the version presented here is
release preprint-v1, built against cneuromod.all release 2026.12. No
statistic is typed into the
text: dataset, subject and hour counts are read at build time from the tables of the
statistics repository, which are generated from a recorded commit of cneuromod.all.
Rebuilding the article after a new data release therefore updates every number and
figure consistently.
Documentation for coding agents¶
cneuromod.all, the airoh template and every analysis repository listed above include a
detailed CLAUDE.md file. These files are written for coding agents. They describe the
repository’s architecture and commands, and they spell out the conventions and pitfalls that
are not obvious from the code: for instance, that submodules of cneuromod.all must
never be installed recursively, that unretrieved files appear as broken git-annex symlinks,
which metadata fields are generated by continuous integration and must not be edited by
hand, and how analysis tasks are named, cached and cleaned. With this documentation and
the Croissant metadata of the timeseries, both the data and the code can be used directly
by AI coding assistants. This lowers the cost of building new analyses and machine-learning
pipelines on CNeuroMod.
- Halchenko, Y. O., Meyer, K., Poldrack, B., Solanky, D., Wagner, A. S., Gors, J., MacFarlane, D., Pustina, D., Sochat, V., Ghosh, S. S., others, & Hanke, M. (2021). DataLad: distributed system for joint management of code, data, and their relationship. Journal of Open Source Software, 6(63), 3262. 10.21105/joss.03262
- Wagner, A. S., Waite, L. K., Meyer, K., Heckner, M. K., Kadelka, T., Reuter, N., Waite, A. Q., Poldrack, B., Markiewicz, C. J., Halchenko, Y. O., others, & Hanke, M. (2023). The DataLad Handbook. Zenodo. 10.5281/zenodo.3608611
- Akhtar, M., Benjelloun, O., Conforti, C., Gijsbers, P., Giner-Miguelez, J., Jain, N., Kuchnik, M., Lhoest, Q., Marcenac, P., Maskey, M., Mattson, P., Oala, L., Ruyssen, P., Shinde, R., Simperl, E., Thomas, G., Tykhonov, S., Vanschoren, J., van der Velde, J., … Wu, C.-J. (2024). Croissant: A Metadata Format for ML-Ready Datasets. Proceedings of the Eighth Workshop on Data Management for End-to-End Machine Learning, 1–6. 10.1145/3650203.3663326
- Schaefer, A., Kong, R., Gordon, E. M., Laumann, T. O., Zuo, X.-N., Holmes, A. J., Eickhoff, S. B., & Yeo, B. T. T. (2018). Local-global parcellation of the human cerebral cortex from intrinsic functional connectivity MRI. Cerebral Cortex, 28(9), 3095–3114. 10.1093/cercor/bhx179