Upload folder using huggingface_hub
Browse filesFiles changed (10)
- .gitattributes+8
- README.mdAdded+114
- global/colon.h5adAdded+3
- global/colorectal.h5adAdded+3
- global/cortex_v1.h5adAdded+3
- global/cortex_v2.h5adAdded+3
- global/gi_ileum.h5adAdded+3
- global/kidney.h5adAdded+3
- local/merfish_ad.h5adAdded+3
- local/starmap_ad.h5adAdded+3
57 unmodified lines58596057 unmodified lines# Video files - compressed*.mp4 filter=lfs diff=lfs merge=lfs -text*.webm filter=lfs diff=lfs merge=lfs -text57 unmodified lines585960616263646566676857 unmodified lines# Video files - compressed*.mp4 filter=lfs diff=lfs merge=lfs -text*.webm filter=lfs diff=lfs merge=lfs -textglobal/colon.h5ad filter=lfs diff=lfs merge=lfs -textglobal/colorectal.h5ad filter=lfs diff=lfs merge=lfs -textglobal/cortex_v1.h5ad filter=lfs diff=lfs merge=lfs -textglobal/cortex_v2.h5ad filter=lfs diff=lfs merge=lfs -textglobal/gi_ileum.h5ad filter=lfs diff=lfs merge=lfs -textglobal/kidney.h5ad filter=lfs diff=lfs merge=lfs -textlocal/merfish_ad.h5ad filter=lfs diff=lfs merge=lfs -textlocal/starmap_ad.h5ad filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114---license: otherlicense_name: per-dataset-source-licenseslicense_link: https://huggingface.co/datasets/ChitraLab/saffron-benchmark#sources-and-licensespretty_name: SAFFRON benchmarktags:- spatial-transcriptomics- foundation-models- benchmark- biologysize_categories:- 100K<n<1M---
# SAFFRON benchmark
The benchmark tasks from **SAFFRON** ([paper](https://doi.org/10.64898/2026.08.01.742217), [code](https://github.com/chitra-lab/SAFFRON)):8 spatial transcriptomics datasets with known, quantifiable spatial variation `τ`, for evaluating whether theembeddings of a spatial (or single-cell) foundation model capture spatial variation at different scales.
- **Global tasks** (Fig. 2a): 1-D spatial gradients of gene expression (`global/`).- **Local tasks** (Fig. 4a): microenvironments around amyloid-β plaques in Alzheimer's disease brains (`local/`).
Each file also contains the paper's two non-foundation-model baselines, **PCA** and the **Gene SAE**, so a new model can becompared against them with the same metric.
## Tasks
| File | Tissue | Technology | Cells | Genes | `τ` ||---|---|---|---|---|---|| `global/colorectal.h5ad` | Human colorectal tumor | 10x Visium | 3,900 | 36,601 | 1-D tumor-stroma axis || `global/kidney.h5ad` | Mouse kidney | 10x Visium HD (16 µm) | 106,302 | 33,696 | 1-D radial axis || `global/cortex_v1.h5ad` | Human cerebral cortex (V1) | MERFISH | 17,450 | 300 | 1-D cortical depth axis || `global/cortex_v2.h5ad` | Human cerebral cortex (V2) | MERFISH | 12,861 | 300 | 1-D cortical depth axis || `global/gi_ileum.h5ad` | Mouse ileum (one section) | MERFISH | 28,039 (24,611 scored) | 1,815 | 1-D crypt-villus axis (mucosa only) || `global/colon.h5ad` | Human colon (non-diseased) | 10x Xenium | 263,506 | 325 | 1-D crypt-surface axis || `local/starmap_ad.h5ad` | Mouse brain, Alzheimer's model | STARmap PLUS | 72,165 | 2,766 | DAM score, microglial density, distance to plaque || `local/merfish_ad.h5ad` | Mouse brain, Alzheimer's model | MERFISH | 432,794 | 300 | DAM score, microglial density, distance to plaque |
## File contents
| Field | Content ||---|---|| `X` | expression (raw counts where the source provides them; see `uns["saffron"]["expression"]`) || `obsm["spatial"]` | cell / spot coordinates || `obsm["X_pca"]` | PCA baseline (50 components), exactly as in the paper || `obsm["gene_sae_features"]` | Gene SAE baseline (Matryoshka BatchTopK SAE on gene expression, sparse), exactly as in the paper || `obs["domain"]`, `obs["tau"]` | global tasks: spatial domain and 1-D spatial axis (`NaN` = not scored) || `obs["tau_dam_score"]`, `obs["tau_micro_density"]`, `obs["tau_distance_to_plaque"]` | local tasks: the three plaque-associated metrics || `obs["eval_dam"]`, `obs["eval_density"]`, `obs["eval_distance"]` | local tasks: cells scored for each metric || `obs["sample"]`, `obs["distance_unit"]` | local tasks: units over which per-unit scores are reported || `uns["saffron"]` | JSON: source, technology, `τ` definition, and the exact scoring protocol |
## Scoring (as in the paper)
Given a cell-by-feature matrix `H` for the cells of a file (SAE features of your model's embeddings, as in the paper):
- **Global** (Fig. 2a): within each spatial domain with ≥ 10 cells, take the maximum over features of |Spearman ρ| between the feature and `τ`; the dataset score is the mean over domains.- **Local** (Fig. 4a): - *DAM score* and *microglial density*: select the feature with the highest |Spearman ρ| over all evaluated cells pooled (`eval_dam` / `eval_density`: disease samples, ≤ 600 µm from a plaque; DAM: microglia only), then report its |Spearman ρ| within each sample (`obs["sample"]`, ≥ 20 evaluated cells). - *Distance to plaque*: within each unit (`obs["distance_unit"]`; disease samples, no distance cap), the maximum over features of |Spearman ρ|.
The DAM score uses the gene list stored in `uns["saffron"]["dam_genes_in_panel"]` of each file, i.e. the list used forthat dataset in Fig. 4a.
```pythonfrom saffron import SAFFRON, benchmark
adata = benchmark.load("colorectal") # downloads global/colorectal.h5adZ = my_model.embed(adata) # (cells x D) embeddings of your modelH = SAFFRON().fit(Z).sae_result_.Z # SAFFRON SAE features, as in the paperbenchmark.score(adata, H) # global: one number; local: per-sample |rho| per metricbenchmark.score(adata, adata.obsm["X_pca"]) # PCA baselinebenchmark.score(adata, adata.obsm["gene_sae_features"]) # Gene SAE baseline```
## Reproducing the paper
Scoring the baselines stored in these files reproduces the paper's values:
| Task | PCA | Gene SAE ||---|---|---|| colorectal | 0.660 | 0.570 || kidney | 0.371 | 0.352 || cortex_v1 | 0.417 | 0.336 || cortex_v2 | 0.393 | 0.374 || gi_ileum | 0.779 | 0.551 || colon | 0.407 | 0.388 |
The local tasks reproduce the per-sample values behind Fig. 4a (MERFISH: all metrics; STARmap: distance to plaque, andthe pooled Fig. 4a medians for DAM score and microglial density).
## Sources and licenses
These files are processed subsets of public datasets. Please cite the original data and follow its license.
| File | Data source | Original publication ||---|---|---|| `colorectal` | colorectal tumor Visium data as distributed with GASTON (Chitra et al. 2025, *Nature Methods*) | Wu et al. 2022, *Cancer Discovery* || `kidney` | 10x Genomics Visium HD mouse kidney public dataset | 10x Genomics || `cortex_v1`, `cortex_v2` | Zenodo [14422018](https://zenodo.org/records/14422018) (`adult_umb5958.h5ad`) | Qian et al. 2025, *Nature* || `gi_ileum` | Dryad [doi:10.5061/dryad.p5hqbzm0z](https://datadryad.org/dataset/doi:10.5061/dryad.p5hqbzm0z) | Xu et al., *Cell Host & Microbe* || `colon` | 10x Genomics Xenium human colon (non-diseased, FFPE) preview data | 10x Genomics || `starmap_ad` | STARmap PLUS Alzheimer's disease data released by the authors | Zeng et al. 2023, *Nature Neuroscience* || `merfish_ad` | Trem2 R47H / 5xFAD MERFISH data released by the authors | Johnston et al. 2024, *Molecular Psychiatry* |
## Citation
Handa D, Martin-Linares C, Stein-O'Brien G, Ling J, Chitra U. Evaluating the ability of spatial transcriptomicsfoundation models to learn multi-scale spatial variation. *bioRxiv* (2026). https://doi.org/10.64898/2026.08.01.742217123version https://git-lfs.github.com/spec/v1oid sha256:b38656dbe2c6ca4539ca7dda65777e1e53584f22f363f6d1a7918f2b83a332e8size 157225540123version https://git-lfs.github.com/spec/v1oid sha256:1b00a0987d2512b6d92fb8c83c2f3a76974b8db9546c6dfc1dc16026c0000de9size 29855559123version https://git-lfs.github.com/spec/v1oid sha256:f15f5f0a70cb02849f464a65a5e51187980cf02a14d6fabdd6d1a61a1240bfacsize 12244172123version https://git-lfs.github.com/spec/v1oid sha256:9616b49ca6850d72bd29ddc06d58e357031ff6039171eb67851f5face85d31b6size 9086037123version https://git-lfs.github.com/spec/v1oid sha256:cde01a02ca094c2570d618c22c8d78793a51cf395ea7603a0a7c2444e6e13835size 16393094123version https://git-lfs.github.com/spec/v1oid sha256:0525e7a8ecfa0fbe56a3fc8ab94c1820b099e910e4979a3abbac133d8f5d7a1dsize 243976124123version https://git-lfs.github.com/spec/v1oid sha256:f3a2c62dd8f7ae2abbff8dd64d22c8eb7b07b4893be5f9248c1319d1683c1cf4size 360798249123version https://git-lfs.github.com/spec/v1oid sha256:d1c8d8375c2f2af8ed1244847b52aecaf5710c4bec1607f09d5b92a1a1467ad8size 46273472.gitattributes+8
README.mdAdded+114
global/colon.h5adAdded+3
global/colorectal.h5adAdded+3
global/cortex_v1.h5adAdded+3
global/cortex_v2.h5adAdded+3
global/gi_ileum.h5adAdded+3
global/kidney.h5adAdded+3
local/merfish_ad.h5adAdded+3
local/starmap_ad.h5adAdded+3