Upload folder using huggingface_hub
Browse files123456713 unmodified lines2122232425262716 unmodified lines44454647484950515253545519 unmodified lines75767778798081828384858687888990919293949596979899100101102103104105106107108109110111112---license: otherlicense_name: per-dataset-source-licenseslicense_link: https://huggingface.co/datasets/ChitraLab/saffron-benchmark#sources-and-licensespretty_name: SAFFRON benchmarktags:- spatial-transcriptomics13 unmodified lines- **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.## Tasks16 unmodified lines| `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)19 unmodified linesH = 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 paperScoring 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 licensesThese 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* |## Citation123456713 unmodified lines2122232425262716 unmodified lines44454647484950515253545519 unmodified lines75767778798081828384858687888990919293949596---license: otherlicense_name: per-dataset-source-licenseslicense_link: https://huggingface.co/datasets/ChitraLab/saffron-benchmark#data-sourcespretty_name: SAFFRON benchmarktags:- spatial-transcriptomics13 unmodified lines- **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 an **SAE on gene expression directly**, so a new model can becompared against them with the same metric.## Tasks16 unmodified lines| `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"]` | baseline: SAE on gene expression directly (Matryoshka BatchTopK SAE), exactly as in the paper; only a few features are non-zero per cell, so it is stored as a sparse matrix || `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"]` | dataset description (species, technology, data source, what `τ` is, how it is scored); read it with `saffron.benchmark.info(adata)` |## Scoring (as in the paper)19 unmodified linesH = 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"]) # baseline: SAE on gene expression directly```## Data sourcesProcessed subsets of public datasets; please also cite the original data.| File | Original data ||---|---|| `colorectal` | Wu et al. 2022, *Cancer Discovery* || `kidney` | 10x Genomics, Visium HD mouse kidney || `cortex_v1`, `cortex_v2` | Qian et al. 2025, *Nature* || `gi_ileum` | Xu et al., *Cell Host & Microbe* || `colon` | 10x Genomics, Xenium human colon preview data || `starmap_ad` | Zeng et al. 2023, *Nature Neuroscience* || `merfish_ad` | Johnston et al. 2024, *Molecular Psychiatry* |## Citation
README.md+16-32