Histopathology foundation models trained on up to 100x fewer whole-slide images than peers, matching UNI-2 across 13 tile- and slide-level tasks.
No providers recorded yet. Browse all providers
Midnight is a family of self-supervised vision foundation models for computational pathology developed by kaiko.ai together with the Netherlands Cancer Institute. Its central claim runs against the prevailing trend in the field: instead of scaling the pretraining corpus, the authors refined the DINOv2 training recipe itself and showed that a carefully trained model can match or beat foundation models built on one to two orders of magnitude more whole-slide images (WSIs).
The result that anchors the paper is Midnight-12k, trained only on the publicly available TCGA collection of roughly 12,000 WSIs. On a 13-task benchmark it outperforms most published pathology foundation models and, on average, matches Virchow2 — a model trained on a corpus more than a hundred times larger. Two further checkpoints add proprietary data: Midnight-92k combines TCGA with NKI-80k, an 80,000-slide internal collection covering 10,141 patients and 31 organs, and Midnight-92k/392 applies a high-resolution post-training stage on top of it.
The work was released as a preprint in April 2025 and published at MICCAI 2025. Only Midnight-12k is publicly downloadable: its weights are on Hugging Face under an MIT license, while Midnight-92k and Midnight-92k/392 were trained on proprietary NKI data and are subject to restricted access.
All three Midnight models are ViT-g/14 vision transformers with 1.1 billion parameters, initialized from the original DINOv2 checkpoints and trained with self-distillation. The main run covers 1 million iterations on 32 NVIDIA H100 80GB GPUs at a base learning rate of 3.5x10^-4, with gradient accumulation over two steps giving an effective batch size of 768. High-resolution post-training scales the DINO local and global crop sizes from 98 and 224 to 168 and 392, reduces the per-GPU batch to 6 across 48 GPUs, and runs a further 120,000 iterations at a base learning rate of 10^-4.
Evaluation uses linear probing over frozen embeddings across 13 tasks drawn from eva and HEST, including PCam, BACH, BRACS, BreaKHis, CRC-100K, Gleason grading, MHIST, Camelyon16, PANDA, and the CoNSeP and MoNuSAC segmentation sets. Midnight-92k/392 reaches an average score of 0.778, ahead of UNI-2 at 0.776 and Virchow2 at 0.766; Midnight-92k scores 0.767 and Midnight-12k 0.763, both above H-optimus-0 (0.755), Prov-GigaPath (0.752), Hibou-L (0.751), UNI (0.749), and Phikon (0.724). An ablation on 10% of TCGA showed performance collapsing, indicating the recipe still requires slide diversity on the order of thousands rather than hundreds.
Midnight-12k works as a drop-in frozen feature extractor for histopathology pipelines: tile-level classification such as tumor detection and cancer subtyping, nuclei and tissue semantic segmentation, slide-level tasks including metastasis detection and Gleason grading, and spatial gene expression regression from H&E tiles. Because it loads directly through the Hugging Face transformers API and carries an MIT license, it is one of the more accessible starting points for groups building digital pathology tooling without the legal review that gated checkpoints require. The eva framework from the same group provides the matching evaluation harness for benchmarking a new downstream head.
Midnight's contribution is less a new architecture than a demonstration that pathology foundation model performance has not been purely data-bound. By reaching parity with models trained on hundreds of thousands of slides using TCGA alone, it lowers the barrier for academic groups that cannot assemble proprietary slide archives, and it argues that further gains are available from training methodology rather than acquisition. The practical caveat is that the two strongest checkpoints depend on NKI's private slide collection and are not distributed, so the openly available model is the weakest of the three. All reported results are retrospective linear-probe benchmarks rather than prospective clinical evaluation.
Much of this page is generated or calculated automatically. Flag anything that looks off and we will re-run it.