Cancer diagnosis depends on pathologists examining tissue samples under the microscope. With the digitization of these slides into whole-slide images (WSIs), artificial intelligence can now analyze these gigapixel images to help detect and characterize cancer. However, most AI pathology tools are trained for one specific cancer type, limiting their usefulness across the full range of cancers.
A new approach called a foundation model attempts to solve this limitation. Rather than training a separate AI for each cancer type, a foundation model is trained on an enormous diversity of tissue images and learns general-purpose visual representations -- called embeddings -- that capture tissue morphology, cellular patterns, and architectural features across many cancer types simultaneously.
The performance of foundation models scales with the amount of training data and model size. Prior pathology AI models used 30,000 to 400,000 WSIs for training. This paper introduces Virchow, which is trained on 1.5 million WSIs from approximately 100,000 patients -- 4 to 10 times more data than any previous pathology foundation model.
The model is particularly motivated by the challenge of detecting rare cancers, defined by the National Cancer Institute as cancers occurring in fewer than 15 people per 100,000 annually. Rare cancers are notoriously difficult to train specialized AI systems for, because there are simply not enough labeled examples to train a focused model.
Virchow is built on a Vision Transformer (ViT-H) architecture with 632 million parameters -- one of the largest neural network models ever applied to pathology. It was trained using the DINOv2 self-supervised learning algorithm, which does not require labeled training examples. Instead, the model learns by comparing different views of the same tissue tile and generating representations that capture consistent, biologically meaningful features.
The training dataset comes from Memorial Sloan Kettering Cancer Center (MSKCC) and includes 1,488,550 H&E-stained slides from 119,629 patients. The data spans 17 tissue types including breast, skin, lymph node, lung, prostate, bladder, colon, pancreas, endometrium, liver, ovary, and bone. Both biopsies (63%) and resection specimens (37%) are included, with slides from both cancerous and benign tissues.
Because individual whole slide images are too large to process directly (each is billions of pixels), Virchow processes them as small 224x224 pixel tissue tiles. It was trained on 2 billion such tiles sampled from the full dataset. Each tile is converted into a compact numerical representation (embedding) that captures the visual information in that patch of tissue.
To perform slide-level tasks such as cancer detection, an additional lightweight aggregator model is trained on top of the Virchow embeddings. This aggregator combines tile-level representations from across the entire slide into a single slide-level prediction. The key advantage is that the Virchow embeddings are fixed -- they do not need to be retrained for each new task, only the small aggregator does.
A pan-cancer detection model built on Virchow embeddings was evaluated on 6,142 specimens spanning nine common and seven rare cancer types. The model achieved an overall AUC of 0.950, outperforming all three competing foundation models: UNI (0.940), Phikon (0.932), and CTransPath (0.907). Virchow achieved the best or tied for the best performance on all 16 cancer types tested.
For rare cancer detection, Virchow achieved an AUC of 0.937 -- only marginally below its performance on common cancers. At 95% sensitivity (correctly catching 95% of true cancer cases), Virchow maintained 72.5% specificity, compared to 68.9%, 62.9%, or 52.3% for the three competing models. This means far fewer false alarms when reviewing slides with rare cancers.
The model also generalizes to cancer slides from institutions that were never part of the training set. Approximately half of the test specimens came from external institutions worldwide (submitted to MSKCC for consultation). Performance was consistent between internal and external data, confirming that Virchow's representations are robust to differences in scanner equipment, staining protocols, and patient populations across hospitals.
Performance was found to scale approximately logarithmically with model size and approximately log-linearly with the number of training tiles. This confirms a general principle that bigger models trained on more data produce better representations -- a trend observed in large language models and natural image AI systems that also applies in the pathology domain.
To assess real-world clinical relevance, the Virchow-based pan-cancer model was compared directly to three FDA-cleared or clinically deployed AI products: Paige Prostate, Paige Breast, and Paige Breast Lymph Node (BLN). These specialist models were trained on much larger tissue-specific datasets: Paige Prostate on 66,713 prostate blocks, while the pan-cancer model used only 2,829 prostate specimens.
Despite the massive difference in tissue-specific training data, the pan-cancer model achieved near-specialist performance: AUC of 0.980 for prostate cancer (versus 0.995 for Paige Prostate), 0.985 for breast cancer (versus 0.992 for Paige Breast), and 0.971 for lymph node metastases (versus 0.994 for Paige BLN). The gaps are statistically significant but small in absolute terms.
For rare and unusual cancer variants, the pan-cancer model matches or outperforms the specialist clinical products. In prostate tissue, it detected lymphoma at equal or better rates than the prostate-specific model, despite lymphoma never being included in any model's training. In breast tissue, it outperformed Paige Breast on rare variants including adenoid cystic carcinoma, metaplastic carcinomas, and secretory carcinoma.
The most common failure modes were analyzed by a pathologist: false negatives were most often caused by very small or subtle tumors (45%), borderline neoplasms, treatment effects, or extensive necrosis. False positives most often arose from high-grade precursor lesions resembling invasive cancer (53%), tissue preparation artifacts such as crush effects, or reactive tissue changes that mimic malignancy.
Beyond cancer detection, Virchow was evaluated for a second high-impact application: predicting the status of molecular biomarkers directly from standard H&E stained slides, without requiring additional genetic tests or specialized staining. This could dramatically reduce the time and cost of biomarker testing, which currently requires additional tissue processing, sequencing, or immunohistochemistry.
Nine clinically important biomarkers across multiple cancer types were evaluated, including androgen receptor (AR) amplification in prostate cancer, microsatellite instability (MSI) in colorectal cancer, EGFR mutations in lung cancer, FGFR alterations in bladder cancer, and HER2 status in gastric cancer. AR amplification occurs in 30-50% of castration-resistant prostate cancers and is a major driver of resistance to hormone therapy.
Virchow embeddings ranked first or tied for first in 7 of the 9 biomarker prediction tasks. For prostate AR status, Virchow achieved an AUC of 0.849. Even in the two tasks where Virchow did not top the ranking, it remained competitive. The overall pattern confirms that pathology images contain hidden visual signals that correlate with underlying molecular biology, and that large-scale training enables models to detect these subtle patterns.
The practical implication is significant: if a foundation model can predict biomarker status from a routine H&E slide already collected for diagnosis, it could prioritize which patients need expensive targeted sequencing, identify patients likely to respond to specific therapies, and reduce the use of tissue-destructive molecular testing that consumes material needed for other tests.
The key insight of this work is that a single large model trained broadly can serve as a powerful starting point for many diagnostic tasks -- a property called training data efficiency. The pan-cancer model needed only a small fraction of the tissue-specific training data required by specialist models, yet came within 1-2% AUC of clinical products.
The most impactful near-term applications include: a pan-cancer detection system that prioritizes pathologist workload by flagging slides most likely to contain cancer (particularly valuable as most biopsies are benign); clinical-grade AI for rare cancers that could never attract enough labeled examples for a specialized model; and biomarker prediction that screens patients before expensive confirmatory testing.
Important limitations remain. Virchow was trained entirely on data from one institution (MSKCC) with limited scanner diversity. The model processes tiles at fixed magnification (20x) rather than at the whole-slide level, requiring the separate aggregator step. Future models may need to operate at the slide level to achieve the data efficiency needed for the lowest-prevalence tasks like therapeutic response prediction.
The scaling analysis suggests that further improvements are achievable by simply making the model larger and training on more diverse data. The trend in model performance with size appeared still log-linear at the scale tested -- meaning there may not yet be a ceiling. The challenge of curating massive, diverse, and well-labeled pathology datasets while preserving rare features remains the primary bottleneck for future advances.