Nanopath: Fast, Fair, Open Experimentation for Pathology Foundation Models
Organizations: MedARC · Sophont · University of Illinois at Urbana-Champaign · University of British Columbia ·
Abstract
We introduce nanopath, an open-source framework and benchmark for rapidly training and evaluating small-scale pathology foundation models. Using a single H100 GPU, a typical nanopath model trains in a little over an hour on up to one million TCGA pathology tile presentations and evaluates within 25 minutes on a broad suite of tile-level and slide-level tasks. Nanopath enables rapid exploration of research ideas at small scale, so promising training recipes can subsequently be tested with more data and compute. To enable fair comparisons between ideas, we constrain submissions to fixed data and compute budgets while keeping the downstream evaluation protocol fixed. Anyone may clone the codebase, automatically download the data, reproduce or modify existing models, and submit a run to Labless, our public experiment ledger where researchers and AI agents can search through prior attempts. Since its public release in June 2026, nanopath has received 1,269 experiments from 20 contributors. Here, we detail its design and assess how well its rapid evaluation tracks standardized THUNDER, HEST, and PathoBench (CPTAC) benchmarks across six nanopath and 14 reference foundation models. Nanopath's fast evaluation suite strongly tracked these standardized benchmarks, and a few 22M parameter nanopath models even outperformed giant 1.1B parameter models on a subset of downstream tasks. We subsequently discuss how we have since optimized nanopath's evaluation suite to be an even more faithful, quick proxy for external benchmarking. Nanopath provides an accessible testbed for students, researchers, and AI agents to explore pathology foundation modeling through fair, transparent, and directly comparable experiments.
Figures & tables
| Constraint | Requirement |
|---|---|
| Tile presentations | |
| Training compute | FLOPs |
| Pathology image source | TCGA WSIs only |
| Non-pathology pretrained models | Allowed for initialization and as teachers |
| Pathology-pretrained models | Not allowed |
| Public clinical/genomic metadata | Allowed |
| Family | Datasets | Metric | Weight |
|---|---|---|---|
| Classification | BACH, BRACS, BreaKHis, CRC, ESCA, MHIST, PCam, SPIDER Breast/CRC/Skin/Thorax, WILDS | Macro-F1 | 30% |
| Segmentation | PanNuke, SegPath epithelial/lymphocytes | Image-weighted F1 | 15% |
| Progression | UCLA Lung (90 slides) | AUROC | 17.5% |
| Mutation | SurGen RAS (311 slides) | AUROC | 15% |
| Survival | LEOPARD BCR (174 cases), CPTAC-PDA OS (77 cases) | c-index | 7.5% |
| Robustness | PathoROB Camelyon, non-TCGA Tolkach ESCA | CRoMa | 15% |
| Recipe | Score | Min. | Main change | |
|---|---|---|---|---|
| dinov2-s-kde | .6277 | – | 73.0 | DINO/iBOT on TCGA with KDE uniformity. |
| lr-and-curation | .6357 | +.0080 | 59.2 | Skips tiles with background, shortens warmup to 30,000 tile presentations, and sets AdamW . |
| i-jepa-contig-patch | .6444 | +.0088 | 57.9 | Smooth-L1 prediction of teacher features from contiguous target blocks replaces iBOT; gentler stain jitter and larger local crops. |
| jepa-fino † | .6485 | +.0041 | 65.0 | Subtype, expression, and genome-alteration metadata guidance [ 27 ] ; learning-rate and jitter changes. |
| block-strided-cls | .6592 | +.0108 | 54.4 | Concatenates normalized CLS features from blocks 4, 6, 8, and 11; fuses the last four blocks and applies joint bilateral upsampling for dense segmentation features. |
| robust-norm | .6676 | +.0083 | 100.7 | More/larger local crops, stronger KDE, and an additional CLS feature from block 2; removes feature directions induced by gamma, gain, hue, and saturation perturbations. |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Family | Datasets | Probe | Metric |
|---|---|---|---|
| Classification | BreaKHis, BRACS, MHIST, PCam | Linear, -NN, 16-shot SimpleShot | Macro-F1 |
| Segmentation | PanNuke, MoNuSAC, CoNSeP | Frozen MaskTransformer | Macro-Jaccard |
| Progression | UCLA Lung | Mean pooling + logistic regression | Macro-OVR AUROC |
| Mutation | SurGen RAS | Mean pooling + logistic regression | Macro-OVR AUROC |
| Survival | LEOPARD BCR, CPTAC-PDA OS | Mean pooling + ridge CoxPH | Harrell’s c-index |
| Robustness | PathoROB Camelyon, Tolkach ESCA | Different-slide -NN | Robustness index |
| Recipe | Labless run identifier | Training seconds |
|---|---|---|
| dinov2-s-kde | run_sub_0d8aeb2511 | 4381.5 |
| lr-and-curation | run_sub_6c6c051f71 | 3550.8 |
| i-jepa-contig-patch | run_sub_816fc5d0ca | 3472.3 |
| jepa-fino-s2026 | run_sub_1879d32919 | 3901.6 |
| block-strided-cls | run_sub_59d24d6b7b | 3265.4 |
| robust-norm-s9876 | run_sub_16b156161d | 6041.2 |
| Encoder | Cls | Seg | HEST | CPTAC | ||
|---|---|---|---|---|---|---|
| dinov2-s-kde | 0.628 | 0.627 | 0.717 | 0.656 | 0.339 | 0.646 |
| lr-and-curation | 0.636 | 0.633 | 0.719 | 0.655 | 0.353 | 0.643 |
| i-jepa-contig-patch | 0.644 | 0.641 | 0.734 | 0.651 | 0.356 | 0.656 |
| block-strided-cls | 0.659 | 0.639 | 0.748 | 0.663 | 0.362 | 0.650 |
| robust-norm | 0.668 | 0.648 | 0.754 | 0.667 | 0.356 | 0.650 |
| jepa-fino | 0.648 | 0.646 | 0.745 | 0.657 | 0.354 | 0.657 |
| External target | Original | Optimized |
|---|---|---|
| THUNDER classification | ||
| THUNDER segmentation | ||
| THUNDER classification + segmentation | ||
| HEST gene expression | ||
| CPTAC classification |
| Recipe | Seed 17 | Seed 29 | Seed 43 | Mean | Sample SD |
|---|---|---|---|---|---|
| Main | .619722 | .620240 | .615958 | .618640 | .002337 |
| Robust-norm | .645294 | .645239 | .646023 | .645518 | .000438 |
| Component | Mean | Sample SD | Range |
|---|---|---|---|
| Classification | .3706 | .0026 | .3661–.3739 |
| Segmentation | .5128 | .0047 | .5067–.5202 |
| Progression | .6684 | .0085 | .6576–.6841 |
| Mutation | .5502 | .0038 | .5437–.5558 |
| Survival | .5985 | .0076 | .5842–.6100 |
| Robustness | .2706 | .0071 | .2569–.2795 |
| Task | Best nanopath | Score | UNI-2-h | H-opt.-0 | Virchow | DINOv2-G |
|---|---|---|---|---|---|---|
| BreaKHis linear | robust-norm | 0.841 | 0.784 | 0.687 | 0.627 | 0.809 |
| BreaKHis k-NN | robust-norm | 0.821 | 0.794 | 0.819 | 0.560 | 0.762 |
| BreaKHis 16-shot | robust-norm | 0.772 | 0.699 | 0.706 | 0.505 | 0.614 |
| CPTAC BRCA | i-jepa-contig-patch | 0.692 | 0.684 | 0.688 | 0.690 | 0.669 |
| CPTAC CCRCC | i-jepa-contig-patch | 0.579 | 0.570 | 0.569 | 0.551 | 0.557 |
| CPTAC GBM | i-jepa-contig-patch | 0.715 | 0.709 | 0.689 | 0.677 | 0.708 |
Computational Pathology
Computational pathology uses algorithms to analyze digitized tissue images for diagnosis, prognosis, biomarker discovery, and clinical decision support.
See all 304 papers