2026-08-22
Johns Hopkins' SAFFRON SAE finds only Novae captures spatial gradients (median |ρ|=0.72 vs 0.39 gene SAE); no spatial FM beats PCA on local plaque microenvironments.
Spatial gene expression is a superposition of sources that live at different scales. Global gradients run along an axis such as cortical depth or tumor core to edge. Local microenvironments sit around objects like Aβ plaques, on the order of tens to a couple of hundred microns. Spatial transcriptomics (ST) measures an expression vector at each location, but sequencing coverage is thin and imaging panels are small, so a single slice rarely separates those sources cleanly.
Spatial foundation models (SFMs) pretrain unsupervised on large ST collections and emit a dense embedding per cell or spot. The pitch is that recurrent spatial patterns, too sparse to see in one dataset, should live in those vectors. Almost every published evaluation clusters embeddings into discrete spatial domains. Whether the same embeddings carry continuous gradients or local plaque-like structure is largely untested, and the vectors themselves are opaque.
SAFFRON (Sparse Autoencoder Framework For Representing Omics Natural variation) from Johns Hopkins decomposes those embeddings with a Matryoshka sparse autoencoder. The encoder maps a D-dimensional embedding to a higher-dimensional sparse code. The decoder must reconstruct the embedding from several prefixes of that code, so early coordinates are forced to carry coarse variation and later ones pick up finer structure. Sparsity is BatchTopK. Dictionary size is 4 times the embedding dimension: 256 features with 16 active for the 64-d models (Novae, SpatialFusion); 1024 features with 64 active for 512-d and 768-d models, about 6% active. An ablation on STARmap brain data compared vanilla versus Matryoshka and TopK, BatchTopK, KL, L1. KL and L1 left up to 70% dead latents. BatchTopK Matryoshka reached reconstruction R² ≥ 0.90, and that became the default.
Evaluation is correlation, not clustering. For each predefined spatial scalar τ, SAFFRON takes the maximum absolute Spearman |ρ| across SAE features. Global τ is a 1-D isodepth axis from GASTON, or an author-provided crypt-villus coordinate for the GI tract. Local τ is one of three: mean expression of 26 DAM signature genes, microglia count inside a 100 µm radius, and distance to the nearest Aβ plaque. Correlation is computed only where the feature is strictly positive, which typically traces a spatial domain. When |ρ| is high, orthogonal matching pursuit (OMP) finds a minimal linear subset of features that reconstructs τ.
The panel has four SFMs (transformer Nicheformer and scGPT-Spatial, graph-based Novae, multimodal SpatialFusion), two non-spatial single-cell models (Geneformer, scGPT), plus PCA and an SAE trained on the gene matrix. Novae is run train-from-scratch, fine-tuned, and zero-shot. SpatialFusion is split into RNA-only, H&E-only, and both. Nicheformer and scGPT-Spatial have no unsupervised fine-tune path, so they stay at pretrained weights. Nine ST datasets cover Visium, VisiumHD, MERFISH, Xenium, and STARmap: seven with known 1-D gradients, two Alzheimer's mouse brains with plaques.
On global gradients, Novae is the only model that clearly beats the naive baselines.
| Method | Median max \ | ρ\ | |
| Novae (pretrained or fine-tuned) | 0.72 | ||
| Gene-matrix SAE | 0.39 | ||
| SpatialFusion with H&E | 0.48, 0.50 after fine-tune | ||
| Other SFMs / single-cell FMs | < 0.50 |
On a colorectal tumor slice, Novae fine-tune hits |ρ|=0.76 versus 0.48 for the gene SAE, 0.26 for scGPT-Spatial, and 0.42 for both Nicheformer and SpatialFusion-Both. Cortical depth is a wider gap: Novae train-from-scratch |ρ|=0.89, gene SAE 0.29, scGPT-Spatial 0.15, Nicheformer 0.33, SpatialFusion-RNA 0.14. The other models' features look spatially incoherent against the reference axis.
OMP shows Novae packs that axis into a handful of features. Train-from-scratch Novae reconstructs the tumor-core-to-stroma axis at cross-validated R² > 0.8 with two SAE features (the figure reports 0.81). Zero-shot Novae needs all 256 features to reach R²=0.89. The two selected features split by domain: one runs stroma to tumor edge in stroma, the other runs edge to core inside the tumor. The genes most aligned with the reference axis, S100A6 (ρ=0.59) and PTPRO (ρ=-0.44), keep the same rising or falling shape on the reconstructed axis.
On local plaque microenvironments, SFMs do not help.
| Metric | Naive baseline | Foundation models | ||
| DAM score | PCA median \ | ρ\ | =0.61, gene SAE 0.58 | All SFMs lower; non-spatial Geneformer is higher |
| Local microglial density | median \ | ρ\ | =0.11–0.21 | No foundation-model edge |
| Distance to nearest plaque | PCA 0.23, gene SAE 0.25 | Novae fine-tune 0.33, but the spatial map does not track plaque distance |
DAM score is the mean of 26 signature genes, so a gene-matrix baseline should correlate. Spatial context is what an SFM is supposed to add. It does not.
This is a measurement paper, not a new SFM. It separates "pretrained on spatial data" from "the embedding actually holds multi-scale spatial structure." For practitioners chasing continuous gradients, Novae's graph design (k-NN neighborhoods plus explicit spatial domains) is the only current option that beats PCA and a gene SAE. Train-from-scratch already works well; zero-shot needs many more features to recover the same axis, so the gain looks more like architecture than like large-scale pretraining. For plaque-scale local structure, start with PCA or a gene-matrix SAE.
For people building models, transformer SFMs' spatial context, whether patch sampling or neighborhood transcriptome masking, is not turning into a continuous spatial axis. The discussion is blunt: later architectures and pretraining objectives should model local and global variation explicitly. SAFFRON is reusable and the code is public.
The discussion is one paragraph, and it owns the main claim: current SFMs do not systematically learn multi-scale spatial variation. Several gaps sit around that claim.
Every score is correlation against a predefined τ. The method does not discover unknown spatial structure from embeddings. OMP also sees the reference axis when it picks features, so reconstruction without prior knowledge is not independently tested. Correlation is computed only on nonzero activations, which restricts the comparison to a spatial domain and can inflate |ρ|.
Local tests cover one microenvironment, Aβ plaques. DAM score is tied directly to gene expression, so the gene baseline's lead is partly circular. Transformer SFMs were not fine-tuned, so the comparison with Novae's three settings is not symmetric. Train-from-scratch Novae is already strong; the paper never isolates graph architecture from large-scale pretraining. The manuscript is a bioRxiv preprint.