← HubCCACNToolsMENDERSchürch CNSquidpyBANKSYCellCharterUTAGHRCHY-CytoCommunityENVI / COVETHEISTSpatialEcoTyperNicheformer

foundation modelNicheformer — CCA

391,736 cells · 5 blocks · pretrained weights, zero-shot, no fine-tuning · local CPU, 41.1 min

What was run

Zero-shot inference only: the pretrained Nicheformer encoder was used as a frozen cell-level feature extractor over all 391,736 cells of the five CCA blocks — nothing was trained or fine-tuned. 510 of 520 panel probes mapped into the model's 20,310-gene vocabulary (99.75% of panel counts). Pooling is the mean over real gene-token positions, which was verified bitwise-identical to the full 1500-token context; 41.1 min for the cohort on local CPU.

This run produced no niches. It is a cell-level embedding, so there is no niche map, no k sweep and no seed stability to explore — hence a report page rather than an explorer. Nicheformer's spatial-context tasks require fine-tuning or linear probing on niche labels.

Agreement with the existing annotation

embeddingreferencenARINMI
all510Clusters3917360.32850.5265
all510Compartment3917360.29020.5135
all510CompartmentClusters3917360.30080.5175
all510block3917360.10520.2789
all510leiden3917360.32180.5265
defined299Clusters3917360.31740.4975
defined299Compartment3917360.25730.4825
defined299CompartmentClusters3917360.26240.4867
defined299block3917360.11740.2837
defined299leiden3917360.33640.4977
all510leiden_defined2993917360.47300.6593

The zero-shot embedding recovers substantial cell identity (NMI 0.527 against 17 hand-curated types, never having seen a CCA label) while carrying only weak block structure (NMI 0.279) — it is not simply encoding batch. defined299 is the variant that ranks only the 299 probes with a defined Xenium technology mean; it does not improve agreement.

Largest coarse clusters

leiden_nf_coarsen_cellsmajority_cell_typemajority_frac
022909T cells0.653
144541T cells0.327
260810Matrix-forming Fibroblasts0.438
345959Macrophage0.314
424280B cells0.879
533274Hepatocytes0.968
647Hepatocytes1.000
734Hepatocytes1.000
840Hepatocytes1.000
928Hepatocytes1.000
1012006Myofibroblasts0.959
1124538Cholangiocytes0.609

Figures

UMAP of the embedding and cluster composition
UMAP of the embedding and cluster composition · nf_fig1_umap.png
Coarse clusters in tissue space, per block
Coarse clusters in tissue space, per block · nf_fig2_spatial.png

Tokenisation per block

blockn_cellsmean_gene_tokens_all510median_gene_tokens_all510max_gene_tokens_all510mean_gene_tokens_defined299padding_fraction_of_1497_context
cc25_d537977338.4437.0011723.710.97
cc25_d11311322328.5527.0012717.790.98
cc25_i9712620536.4733.0011120.200.98
cc25_i1473418526.2224.009916.760.98
cc25_p1713835042.7341.0012025.510.97

With a 520-gene panel and ~34 genes detected per cell, 97–98% of the 1497-position context is padding. That is why the published all-position pooling (0.7 cells/s, ~149 h for this cohort) was not used.

Caveats, as recorded in the run's own report

  • The Xenium technology mean is NaN for 211 of the 510 mapped probes, so token order here is not calibrated the way it was during pretraining; 99.7% of cells have their top-ranked token from a gene the Xenium pretraining corpus never covered. The defined299 variant bounds the effect and does not improve agreement (NMI 0.498 vs 0.527).
  • The published all-position pooling was not computed; it remains queued for a GPU host.
  • 18 of 27 coarse clusters are tiny (15–57 cells, 0.05% of cells in total) and almost purely hepatocyte.
  • Not assessed: cluster stability across seeds or resolutions, and any niche-level product.
Built from REPORT_Nicheformer_CCA.md and the tables under CCA/results/Foundation_models/Nicheformer/ on 11 Sep 2026. Numbers are quoted from that run, not recomputed.