Lab Note · updated 2026-06-20
Foundation Models Are Not Pipelines
A foundation model is a powerful feature extractor, not a deployable measurement pipeline. It still needs ingestion, QC, preprocessing, confounder correction, validation, and provenance around it — and a frozen encoder makes the surrounding system more important, not less.
The problem — A foundation model arrives looking like a finished answer: pretrained on millions of images, strong on dozens of benchmarks, ready to call. The temptation is to treat the encoder as the pipeline — patch in, embedding out, done. But a foundation model is a component that produces features. It does not ingest a slide, decide whether the input is in-focus, correct for the batch it was acquired in, validate its own output, or record how the number was made. Plugged in raw, it inherits every problem of the stages it skipped — and because the encoder is frozen and opaque, those problems are now harder to see, not easier.
What it is / how it works — The strongest evidence for the model is also the strongest evidence for the system around it. UNI is a DINOv2-trained ViT-L pretrained on 100M+ histology patches and state-of-the-art across 34 tasks — yet it is still only an encoder: slide-level predictions come from attention-based multiple-instance learning (ABMIL) on top of its features, after tiling, QC, and stain handling upstream. It is a feature extractor with a pipeline bolted around it, not the pipeline. The same lesson is sharper where confounders bite: in Cell Painting, Papanastasiou et al. show a foundation model only profiles novel compounds reliably once a structural causal model disentangles source, batch, and well effects from biology — the correction is not optional post-processing, it is what makes the embedding mean anything. A foundation model raises the ceiling on the features stage; it does not collapse the other eight.
Where it breaks — The general failure is treating a frozen encoder as if it carried its own QC, correction, and validation — and it surfaces differently per platform. In digital pathology, an encoder embeds whatever you feed it: a blurred, mis-stained, or compressed tile yields a confident vector with no error flag, so an upstream QC gate is the only thing standing between a bad slide and a clean-looking prediction. In Cell Painting, batch and plate signal sits inside the embedding unless explicitly modeled, so two replicates of the same perturbation can land far apart — invisible to any pixel metric, caught only by replicate reproducibility. In spatial omics, features are computed downstream of segmentation and registration, so sub-pixel error upstream propagates straight into the readout the encoder never sees. And across all of them, evaluation noise and benchmark incentives mean leaderboard strength is not deployment fitness — the model must be re-validated on the population you will run it on, with a metric chosen for the question. A foundation model is exactly the case Sculley warned about: a small, powerful box where most of the system is still glue, data, and configuration. It does not change that a model isn't the system — it makes it more true.
References
- Chen et al. (2024). Towards a General-Purpose Foundation Model for Computational Pathology (UNI). Nature Medicine.
- Papanastasiou et al. (2025). Confounder-Aware Foundation Modeling for Accurate Phenotype Profiling in Cell Imaging. npj Imaging.
- Varoquaux & Cheplygina (2022). Machine Learning for Medical Imaging: Methodological Failures and Recommendations. npj Digital Medicine.
- Sculley et al. (2015). Hidden Technical Debt in Machine Learning Systems. NeurIPS.
References
- Chen et al., Towards a General-Purpose Foundation Model for Computational Pathology — UNI (Nature Medicine, 2024)
- Papanastasiou et al., Confounder-Aware Foundation Modeling for Accurate Phenotype Profiling in Cell Imaging (npj Imaging, 2025)
- Varoquaux & Cheplygina, Machine Learning for Medical Imaging: Methodological Failures and Recommendations (npj Digital Medicine, 2022)
- Sculley et al., Hidden Technical Debt in Machine Learning Systems (NeurIPS, 2015)