TL;DR. Today we are releasing nanopath, a super lean open-source harness for training and evaluating small-scale pathology foundation models. In ~1 hour it trains on 1 million pathology tiles on a single GPU and evaluates a broad suite of downstream probes spanning tile classification, segmentation, slide-level mutation/progression/survival, and robustness. The goal is to easily explore and iterate on research directions to see what works best on small-scale, then scale up the best performing training recipes with more data and larger compute. Our repo is intentionally made to be compatible with autoresearch, and we even have a live autoresearch-style plot to encourage crowdsourced research progress.
Following in the footsteps of benchmark-driven competitions that turn hard scientific problems into reproducible community challenges, we release nanopath, a minimal open-source codebase that trains and evaluates a tile-level computational pathology foundation model on the public TCGA dataset in 1 hour on a single H100 GPU.
For context, last year we released OpenMidnight, a fully open-source pathology foundation model that was trained on only 12,000 publicly available whole-slide images and still performed competitively with much larger foundation models trained on proprietary data. That result was encouraging, but it also made a problem obvious: pathology still does not have a reliable scaling recipe where more data and larger models predictably turn into better downstream performance.
nanopath was explicitly built to foster research innovation. Training and evaluation is necessarily fast and computationally cheap as dictated by our submission criteria, datasets are public & easily downloaded, a single benchmark score averaging across 12 evaluation datasets allows for tractable hillclimbing with AI coding agents, and our live leaderboard and Discord server encourages crowdsourcing and rapid sharing of research ideas.
Pathology data behaves very differently from natural images. Whole-slide images are enormous, often larger than 10,000 by 10,000 pixels, and the signal can be sparse: a small region of diagnostically meaningful tissue may sit inside a sea of background, normal tissue, artifacts, or irrelevant morphology. Hence, there are unique challenges in pathology that make it a ripe space for research innovation.
nanopath is explicitly designed for rapid iteration.
The probe benchmarking code is locked for leaderboard submissions and reflects an average across diverse tile- and slide-level tasks and datasets.
A single scalar score plus public run logs make nanopath tractable for researchers, maintainers, and AI coding agents that need fast feedback.
The best small-scale runs can be scaled up to larger pathology foundation model training runs.
We borrow downstream evals from standardized eval suites THUNDER, PathoBench, and PathoROB, with modifications that make it possible to evaluate a model in under 15 minutes. We do not evaluate on the official test splits so that nanopath models can still be valid submissions to these official benchmarking suites with less risk of overfitting.
| Probe family | What it tests |
|---|---|
| Tile classification (linear, KNN, 16-shot) | Whether frozen tile embeddings separate relevant visual and diagnostic classes with simple readouts, including low-label few-shot settings. |
| Segmentation | Whether local morphology is encoded well enough for spatially precise downstream tasks. |
| Progression, mutation, survival | Whether tile-level representations support slide-level and patient-level biological signals. |
| Robustness | Whether performance holds under distribution shifts and evaluation stress tests. |
Anything that changes the training recipe is generally fair game: architecture, objective, sampling, augmentation, optimizer, schedules, masking, curation, and preprocessing. The only training restrictions are:
Runs stop before exceeding 1,000,000 tile presentations or 1e18 measured training FLOPs.
Image tiles must come from the public TCGA whole-slide image source. Public non-tile metadata can be used.
Use of prior, pretrained models are allowed. However, pathology-specific pretrained models are not allowed if used for initialization or training guidance.
To become the new validated leader, a submitted run must beat the highest validated run in our Labless page by at least 0.006 on mean_probe_score. All submitted runs that pass this threshold will be rerun by maintainers with a different random seed for validation.
The full repository is at github.com/MedARC-AI/nanopath. Install uv, then run:
git clone https://github.com/MedARC-AI/nanopath.git && cd nanopath
uv sync && source .venv/bin/activate
wandb login # or: export WANDB_MODE=offline
# download pretraining data, probe datasets, and the DINOv2 checkpoint
python prepare.py download=True
# smoke test
./submit/train_1gpu.sbatch configs/smoke.yaml
# or directly on a GPU machine:
# python train.py configs/smoke.yaml
# full main recipe
RUN_DIR=$PWD/data/main/my-run
./submit/train_1gpu.sbatch configs/main.yaml output_dir=$RUN_DIR
# or:
# python train.py configs/main.yaml output_dir=$RUN_DIR
A successful run writes metrics.jsonl, summary.json, and a source snapshot used for Labless submission checks. Full runs auto-submit to the Labless run ledger after GitHub device sign-in. Manual submission is also available.
We are betting that a crowdsourced community challenge can find better recipes for pathology foundation models by making experimentation fast, fair, public, and directly comparable. The point is not that one million tiles is enough for the final model. The point is that we think it's possible that models trained with just one million tiles, one-GPU, and quick yet broad evaluation will be enough to unlock the full potential of crowdsourced autoresearch, and expose the field to the best research ideas to subsequently scale. nanopath is fully open-source, and we require all submissions to also be open-source.
Get involved. Clone the repo, run the Quickstart, and join our MedARC Discord in #path-fm. We donate compute to volunteer researchers and host weekly video call group meetings. We are looking forward to seeing what the community discovers.
Thanks to the MedARC Discord community for helping build & test nanopath before this public release. Thanks to Pierre Marza for helpful discussion.