MuCoDi shrinks pathology AI 605x for edge devices like Raspberry Pi
Distills massive PFMs into 6.4M-parameter models matching 71% AUROC within 0.8 points of giants.
A team led by Tim Lenz from arXiv has unveiled MuCoDi (Multi-Teacher Contrastive Distillation), a pretraining framework that distills frozen tile embeddings from three leading pathology foundation models—Virchow2, UNI2, and H-Optimus-1—into compact edge-oriented encoders. Instead of directly regressing individual teacher features, MuCoDi leverages a contrastive distillation objective adapted from MoCo v3, where cached teacher embeddings replace momentum-encoder keys. The students are built on lightweight architectures: MobileOne and RepViT. They were pretrained on 14.3 million tiles extracted from just 11.8K whole-slide images from TCGA, then evaluated frozen on 23 clinically curated downstream classification tasks.
The results are striking: RepViT-based MuCoEdge models (R2.3 and R1.5) reach 71.0% external AUROC, within 0.8 percentage points of the best teacher (Virchow2 at 71.8%). The MuCoEdge-R2.3 also scores the best external F1 (51.8%) and second-best AUPRC (53.3%). Even the smallest variant, MuCoEdge-R1.0, delivers 70.9% AUROC with only 6.4 million parameters and 1.12 GFLOPs. On a Raspberry Pi 5, sub-million-parameter MobileOne students achieve up to a 605-fold single-tile speedup over Virchow2 while still retaining 66.5% to 66.9% external AUROC. The code is publicly available, marking a significant step toward running high-quality pathology AI inference directly on local edge hardware.
- MuCoDi distills three large PFMs (Virchow2, UNI2, H-Optimus-1) into compact MobileOne/RepViT students.
- MuCoEdge-R1.0 achieves 70.9% AUROC with only 6.4M parameters and 1.12 GFLOPs—orders of magnitude smaller than teachers.
- On Raspberry Pi 5, MobileOne students deliver up to 605× speedup while retaining 66.5–66.9% AUROC performance.
Why It Matters
Enables local, low-cost pathology AI inference on edge devices, reducing cloud dependency and latency.