A gene informed benchmark for BioScoring of pathology foundation models

Paul Vilars, Vincent Quoc-Huy Trinh, Maria Vakalopoulou, Dimitris Samaras, Stergios Christodoulidis, Mahdi S. HosseiniarXiv 2026

TL;DR

We usually test medical image models by seeing how well they predict clinical labels, which tells us if they work, but not what biology they actually "see." This paper introduces BioScore, a clever, label-free benchmark that peers inside pathology foundation models using sparse autoencoders and spatial gene expression maps. By checking whether a model naturally dedicates internal features to specific cell types—without ever being trained on genetic data—we finally get a microscope into what biology these AI models truly understand and what they miss.

What Problem Does This Paper Address?

Imagine grading a medical student solely on multiple-choice diagnosis questions without ever asking them to point out a tumor cell or an immune cell under a microscope. That is essentially how we evaluate pathology foundation models—large neural networks trained via self-supervision on millions of routine H&E-stained tissue images. Standard benchmarks attach a lightweight supervised "probe" to a frozen model to classify tumors or predict gene expression. While useful, a probe can cobble together an answer from a messy mixture of visual cues (like surrounding tissue scaffolding rather than the cancer cells themselves), telling us what can be decoded rather than whether the model has clean, dedicated internal concepts for specific cell types. Meanwhile, having human pathologists manually inspect internal AI features doesn't scale and can't objectively rank competing models.

Methods

To replace manual human review with objective ground truth, the authors pair routine tissue images with spatial transcriptomics—a technology (specifically 10x Xenium) that maps the exact spatial coordinates of individual mRNA transcripts on the very same slice of tissue.

Figure 2. Overview of BioScore. (A) An SAE is trained on the frozen patch embeddings of the encoder under test. (B) On the scoring H&E sections, its features are clustered into K feature groups (blue); a curated panel of 52 cell identities is built from CellMarker (yellow); and each identity is credited with the group of best quality Q. Example: the Virchow2 group matched to ovarian carcinoma cells (ρ = 0.81)

Here is how the BioScore pipeline works:

  1. Untangling features: Raw neural network dimensions are notoriously "polysemantic" (one dimension responds to many unrelated things). For each frozen image encoder, the authors train an unsupervised BatchTopK Sparse Autoencoder (SAE) purely on image patch embeddings to split them into sparse, interpretable features.
  2. Equalizing capacity: Because larger models produce bigger SAEs—giving them more "lottery tickets" to accidentally match a biological pattern—the authors cluster every model's SAE features into an equal number of $K = 3,000$ feature groups using spherical $k$-means.
  3. Scoring specificity: Using curated marker-gene lists, they build ground-truth spatial maps across the tissue for 52 distinct cell identities (like plasma cells or ovarian carcinoma cells). Each cell identity is matched to the single feature group that tracks it best. Crucially, the matching score rewards spatial Pearson correlation ($\rho$) while subtracting a novel impurity penalty—penalizing feature groups that lazily light up for broad neighborhoods (like "all immune cells") rather than only the target cell type.

Datasets

  • SAE Pretraining: A tissue-balanced set of 1.29 million patches ($224 \times 224$ pixels at $20\times$ magnification) across 99 whole-slide images from 13 organs, combining TCGA, CGCI-BLGSP, and the scoring cohort.
  • BioScore Evaluation: Computed on STHELAR, which links H&E histology slides directly to subcellular Xenium spatial transcriptomics across 27 tissue sections (112,056 patches) spanning 13 healthy and cancerous organs.
  • Cell-Identity Panel: A newly curated benchmark panel of 52 cell identities (31 immune, 9 cancer, 4 stromal, 3 parenchymal, and 5 others) distilled from 1.78 million human entries in CellMarker 3.0, verified for expression presence and reviewed by a board-certified pathologist.

Key Insights and Ideas

  • Unsupervised emergence of cell biology: Neither the image encoders nor the SAEs ever see a single transcript during training. When an SAE feature group lights up in lockstep with a 3-gene signature, the model discovered that cell type purely from visual morphology.
  • Impurity prevents "cheating": Without the impurity penalty, models match the 52 cell identities using only 34–43 broad feature groups (clumping co-localized cells together). Turning up the impurity weight forces the selection of 46–51 distinct, highly specific groups.
  • No labels, same ranking—plus rare cells: BioScore agrees strongly with traditional supervised linear probes on overall model rankings, without needing held-out training slides. Better yet, supervised probes fail when a cell type only appears on a single tissue section (25 of the 52 identities!), whereas BioScore evaluates every single one.
  • Natural-image models aren't completely blind to cells: General vision models (like DINOv2 or CLIP) actually track certain abundant or visually distinct structures—like adipocytes, T cells, B cells, and ovarian carcinoma—nearly as well as pathology-specific models. Where pathology models pull ahead is on specialized parenchymal cells (like pancreatic islets) and stem-like cancer cells.

Key Results

The authors evaluated 8 pathology foundation models and 3 general natural-image encoders:

Figure 1. BioScore overview and encoder ranking. Left: SAE activation map is compared to cell-identity. Right: win rate (%) of row over column across the 52 identities; bold: Holm-corrected Wilcoxon p < 0.05; and compact letter ranking.
  • Pathology vs. General Vision: Every pathology foundation model decisively beat every natural-image model, scoring 0.299–0.371 vs. 0.214–0.232 (winning on 77%–94% of cell identities in pairwise tests).
  • Three Tiers of Pathology Models: Statistical testing separated pathology encoders into clear tiers rather than a single winner. Virchow (0.371), H-Optimus-1, and Virchow2 led the pack (Tier a), closely followed by UNI2, Prov-GigaPath, and UNI; Phikon-v2 (0.331) and CHIEF (0.299) trailed behind.
  • Rock-solid stability: Rankings barely budged across random seeds (standard deviation of 0.003–0.014) or changes in SAE dictionary size and sparsity (Kendall $\tau = 0.89\text{--}1.00$), and aligned closely with supervised ridge-regression probes ($\tau = 0.82$).
  • Blind spots across the board: Immune cells were much harder to capture than other lineages (e.g., Virchow scored 0.23 on immune vs. 0.40 elsewhere), and no model—pathology or otherwise—managed to track mast cells, cDC1s, iNOS+ macrophages, or CD56+ NK cells (mean correlations of just 0.02–0.04).

Limitations and Future Work

  • Panel blind spots: Because Xenium spatial transcriptomics uses targeted gene panels (280 to 5,000 genes) rather than whole-transcriptome sequencing, major cell types whose key marker genes were missing from the panels—such as fibroblasts (COL1A2) and hepatocytes (ALB)—could not be evaluated on this cohort, while immune identities were heavily overrepresented.
  • Patch resolution limits: Evaluating $224 \times 224$ patches at $20\times$ magnification covers a $120\,\mu\text{m}$ square of tissue. The authors hypothesize that small, scattered immune cells simply don't take up enough visual real estate to dominate a patch-level embedding at this scale.
  • Data-dependent curation: Merging redundant gene signatures required clustering their spatial maps on this specific 13-organ dataset (excluding organs like heart and bone marrow due to missing external pretraining slides), meaning expanding to new tissues or higher-resolution cell-level representations remains an open next step.

Summary updated

Abstract

Pathology foundation models are usually compared by their performance on downstream tasks such as classification and retrieval. While such benchmarks measure how useful a model is, they provide no insight into the biology it represents. We introduce BioScore, a benchmark that quantifies how well an image encoder captures cell identities, with spatial transcriptomics of the same tissue as the reference. A sparse autoencoder splits the encoder's patch embeddings into sparse features, which we cluster into a fixed number of groups. BioScore then measures, for each of 52 cell identities defined by marker genes, how specifically one group follows the identity's expression over the tissue. Because the autoencoder training is fully unsupervised, a match shows that the model represents the cell identity from the image alone. We score 8 pathology foundation models and 3 natural-image models. Every pathology model scores above every natural-image model (0.299--0.371 \vs 0.214--0.232), and paired tests separate three tiers among the pathology models. Unlike a supervised probe, BioScore needs no labels, builds its reference from the data and scores even from few sections, yet it ranks the encoders as a probe does. Its per-identity breakdown indicates which cell identities each encoder captures or misses.
BibTeX
@misc{vilars2026gene,
  author = {Paul Vilars and Vincent Quoc-Huy Trinh and Maria Vakalopoulou and Dimitris Samaras and Stergios Christodoulidis and Mahdi S. Hosseini},
  title = {{A gene informed benchmark for BioScoring of pathology foundation models}},
  year = {2026},
  eprint = {2611.34930},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.34930},
}
Figure