Cellfm-datasets: A Unified Data Infrastructure for Single-Cell and Spatial Transcriptomics Foundation Model Pretraining
L Zhang, Jiangshuan Pang, Jing YaniD, Wangyang Tang, Yiting Deng, Youzhe HeiD
Abstract
Large-scale cell foundation models are increasingly limited not only by model architecture, but also by the data infrastructure required to repeatedly sample sparse transcriptomic profiles from out-of-core cohorts. AnnData/H5AD has become a standard exchange format for single-cell and spatial omics analysis, yet its HDF5-backed layout is not designed for high-frequency random mini-batch loading under multi-worker and distributed pretraining. We present Cellfm-datasets, a data infrastructure artifact that converts H5AD cohorts into a self-describing compressed sparse row (CSR) memmap layout and exposes the resulting corpus through Hugging Face Dataset and IterableDataset interfaces. The artifact stores a shared gene vocabulary, per-sample metadata, optional spatial coordinates, observation metadata, manifests, and checksums, and reconstructs sparse cell or group records at runtime without dense expansion. A unified sampling abstraction supports random-cell groups, manifest-defined biological regions, and coordinate-based spatial blocks, with deterministic sharding across distributed ranks and data-loader workers. Spatial demonstrations on P14 mouse brain transcriptomics sections illustrate region- and block-level sampling over real anatomical structures. In controlled benchmarks on a public heterogeneous ModelScope scRNA-seq subset, Cellfm-datasets reached 60,571 {+/-} 1,734 samples/s in single-core random loading, scaled to approximately 160,000 samples/s with eight workers, and maintained near-constant process-private memory while reading up to one million cells. By moving sparse single-cell and spatial corpora from model-specific loader code into reusable, validated, and framework-native dataset artifacts, this design may reduce the engineering burden of reproducible cell foundation model pretraining and make repeated training runs, model comparisons, and mixed-modality data reuse easier to standardize. Code availabilityhttps://github.com/PangJiangShuan/cellfm-datasets
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 0
- Organism
- Assay
- Research Focus
- Approach
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- CellFM: a large-scale foundation model pre-trained on transcriptomics of 100 million human cells
Yuansong Zeng, Jiancong Xie, … Yuedong Yang·Nature CommunicationsPeer-reviewed·May 20, 2025
- AIDO.Tissue: Spatial Cell-Guided Pretraining for Scalable Spatial Transcriptomics Foundation Model
Jing Gong, Yixuan Wang, … Eric P. Xing·bioRxiv·Jul 4, 2025
- Accessible and reproducible deployment reveals the practical boundaries of single-cell foundation models
Siyu Hou, Penghui Yang, … Xiang Zhou·bioRxiv·Sep 2, 2026
- Evaluating the role of pre-training dataset size and diversity on single-cell foundation model performance
Alan DenAdel, Madeline Hughes, … Lorin A. Crawford·Nature MethodsPeer-reviewed·Jun 9, 2026
- scRep: A Latent-Space Self-Distilled Foundation Model for Single-Cell Representation Learning
Shengjie Wang, Zongyong Hu, … Qiuyi Li·bioRxiv·Sep 3, 2026
- Context-dependent utility and robustness of pretrained single-cell foundation model representations across analytical tasks
Tianyuan Liu, Tingze Feng, … Yu Zhang·bioRxiv·Jul 13, 2026