File size: 3,995 Bytes
e04c3e5 1fc2f5c e04c3e5 0d7d35f 1fc2f5c b12a561 e04c3e5 0d7d35f e04c3e5 0d7d35f e04c3e5 0d7d35f e04c3e5 0d7d35f e04c3e5 0d7d35f e04c3e5 b12a561 e04c3e5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | ---
license: other
license_name: original-dataset-licenses
license_link: https://doi.org/10.64898/2026.08.01.742217
pretty_name: SAFFRON benchmark
tags:
- spatial-transcriptomics
- foundation-models
- benchmark
- biology
size_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 the
embeddings 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/`).
These are processed subsets of public datasets. If you use them, please also cite the original data publications, listed in the [paper](https://doi.org/10.64898/2026.08.01.742217).
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 be
compared against them with the same metric.
## Tasks
| File | Tissue | Technology | `τ` |
|---|---|---|---|
| `global/colorectal.h5ad` | Human colorectal tumor | 10x Visium | 1-D tumor-stroma axis |
| `global/kidney.h5ad` | Mouse kidney | 10x Visium HD (16 µm) | 1-D radial axis |
| `global/cortex_v1.h5ad` | Human cerebral cortex (V1) | MERFISH | 1-D cortical depth axis |
| `global/cortex_v2.h5ad` | Human cerebral cortex (V2) | MERFISH | 1-D cortical depth axis |
| `global/gi_ileum.h5ad` | Mouse ileum (one section) | MERFISH | 1-D crypt-villus axis (mucosa only) |
| `global/colon.h5ad` | Human colon (non-diseased) | 10x Xenium | 1-D crypt-surface axis |
| `local/starmap_ad.h5ad` | Mouse brain, Alzheimer's model | STARmap PLUS | DAM score, microglial density, distance to plaque |
| `local/merfish_ad.h5ad` | Mouse brain, Alzheimer's model | MERFISH | DAM score, microglial density, distance to plaque |
## File contents
| Field | Content |
|---|---|
| `X` | gene expression (raw counts where the source provides them) |
| `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 |
| `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 |
## Usage
`benchmark.score` computes the paper's metric: the maximum |Spearman ρ| between any feature and `τ`
(per spatial domain for the global tasks, as in Fig. 2a; per sample for the local tasks, as in Fig. 4a).
```python
from saffron import SAFFRON, benchmark
adata = benchmark.load("colorectal") # downloads global/colorectal.h5ad
Z = my_model.embed(adata) # (cells x D) embeddings of your model
H = SAFFRON().fit(Z).sae_result_.Z # SAFFRON SAE features, as in the paper
benchmark.score(adata, H) # global: one number; local: per-sample |rho| per metric
benchmark.score(adata, adata.obsm["X_pca"]) # PCA baseline
benchmark.score(adata, adata.obsm["gene_sae_features"]) # baseline: SAE on gene expression directly
```
## Citation
Handa D, Martin-Linares C, Stein-O'Brien G, Ling J, Chitra U. Evaluating the ability of spatial transcriptomics
foundation models to learn multi-scale spatial variation. *bioRxiv* (2026). https://doi.org/10.64898/2026.08.01.742217
|