Weakly Supervised Learning
Training a slide-level model when you only have one label per slide, not a label for every region — the standard way to learn from whole-slide images without exhaustive annotation.
What it is
A whole-slide image is enormous — billions of pixels — and the diagnosis attached to it is a single label for the entire slide. Fully supervised learning would need a pathologist to outline every tumour region on every slide, which does not scale. Weak supervision sidesteps this: you give the model the slide-level label only, and let it work out which parts of the slide justify that label.
The dominant formulation is multiple instance learning (MIL). The slide is cut into thousands of small tiles (patches). The set of tiles is called a bag, and the slide label is the bag label. The classic assumption is that a bag is positive if at least one tile is positive, and negative only if all tiles are negative. The model scores every tile and then aggregates those scores into one slide-level prediction — by taking the maximum, or more commonly now by attention pooling, where the network learns how much weight to give each tile. Attention weights are a useful side effect: they can be drawn back onto the slide as a heatmap showing which regions drove the prediction.
Two consequences matter in practice. First, a weakly supervised model needs many more slides than a fully supervised one needs annotated regions — hundreds to thousands, typically. Second, the model can latch onto anything that correlates with the label, not just the biology you intended. If positive cases came from one scanner and negatives from another, the model can learn the scanner — see Scanner and Stain Variability.
Watch for “MIL” used to mean plain averaging. Papers describe a “multiple instance learning strategy” when what they implement is: extract a feature vector per tile, take the mean, feed a linear layer. There is no instance selection and no attention — every tile contributes equally, which is the one assumption MIL was invented to avoid. The 32-model foundation-model benchmark (sources/papers/bareja-2026-foundation-model-benchmark.md) does exactly this over up to 4,000 tiles per slide, and lists it among its own limitations: mean pooling “may attenuate localized discriminative signals.” That is not a quibble about terminology. Its slide-level AUROCs land at 0.74–0.76 while the same encoders reach 0.94–0.96 on curated patch tasks, and dilution over 4,000 tiles is a plausible part of the gap. When reading a slide-level number, check which of the two was actually run.
MIL can also produce a segmentation rather than a slide label, and the mechanism is different again. Lerousseau 2020 — MIL Tumor Segmentation (percentile pseudo-labels) is the worked example (MICCAI 2020, trained on 6,481 frozen TCGA slides): on a tumour slide, the top α% of tiles by the model’s own current predictions are pseudo-labelled positive, the bottom β% negative, and the middle is masked out of the loss entirely; on a normal slide every tile is labelled 0, which is exactly true. The per-tile outputs are then the tumour map — there is no pooling step at all, because there is no slide-level prediction to pool towards. Three things distinguish it from the formulations above. It is hard instance selection (top-k, not attention weights), so it sits at the opposite pole from mean pooling rather than between the two. It is self-training — the model labels its own next round — with the α/β percentages standing in for the unknown tumour fraction, so the choice of α and β is a prior about tumour burden, not a tuning detail. And its slide labels can come from metadata: that paper takes tumour-versus-normal from the TCGA barcode itself, spending pathologist time only on evaluation. The honest bounds travel with it: trained and evaluated on frozen sections with pixelwise AUC only, best configuration 0.804 but ~0.59 on lung, and its own external test on FFPE tissue mostly failed — so it demonstrates the mechanism, not FFPE-ready performance.
Why it matters for my work
The Liver Tru-Cut — Tumour Origin AI project explicitly compares weakly supervised approaches against foundation-model-based approaches for predicting primary tumour origin from liver core biopsies. That is exactly the setting weak supervision was designed for: the label (the eventual primary site) is known per case, but nobody has outlined which fields of view carry the diagnostic clue. Tile strategy definition is listed as a current task in that project, and tile size and magnification are the main design decision in a MIL pipeline — they set what the model can physically see in one instance.
How it connects
Patch Extraction — the tile is the MIL instance, so the tiling parameters below are model design rather than preprocessing; that page holds the tool choice and the magnification-versus- level trap.
Foundation Models in Pathology — the alternative arm of the liver comparison; foundation models replace the learned-from-scratch tile encoder with a pretrained one, which usually cuts the number of slides needed.
Encoder Benchmarking — attention pooling versus mean pooling is the single largest design choice in comparing encoders, and no published benchmark has run the same encoder set under both.
Class Imbalance and Accuracy — origin prediction has many possible primaries with very uneven frequencies, so a MIL model’s headline accuracy will be dominated by the common classes and needs per-class reporting.
External Validation — attention heatmaps look convincing and make a model feel validated when it is not; only an external cohort tests whether the model learned biology or site.
Whole Slide Imaging — tiling, magnification, and pyramid levels are the substrate this whole method operates on.
Cell Detection and Counting — the contrast case: detection has a label per object, so it is fully supervised and needs none of this machinery. Worth holding side by side, because it shows how much the supervision level dictates the method.
Agentic Slide Navigation — the other answer to finding the diagnostic region without region labels: choose where to look before encoding, rather than weighting tiles after encoding all of them. The two compose, with a navigator acting as a hard-attention filter ahead of a MIL pipeline.
Lerousseau 2020 — MIL Tumor Segmentation (percentile pseudo-labels) — the segmentation-flavoured MIL described above, and the page’s one code-verified example of a case-level split done right.
TCGA — where that paper’s labels came from for free (the barcode’s sample-type field), and where its released tumour maps now sit as a derived resource for frozen slides.
Open questions
- What tile size and magnification will Liver Tru-Cut — Tumour Origin AI settle on, and is that choice recorded anywhere reproducible? Still open, but Patch Extraction now records the decisions to make and the tools to make them with — and the specific warning that a pyramid level index is not a reproducible substitute for a magnification.
- Is the train/test split done at the slide level or the patient level? Splitting by slide leaks when one patient contributed several blocks — a specific, easy-to-miss failure. Still open for the local projects — but it now has a verified positive example to point at: Lerousseau 2020 — MIL Tumor Segmentation (percentile pseudo-labels)’s released code splits case-wise (unique case IDs shuffled, every slide of a case on one side), read directly rather than taken from the paper, which does not state it. Two lessons: it costs about twelve lines, and “not stated” is not “not done” — the code is where this question gets answered in either direction.
- No page yet covers attention-map interpretation and its pitfalls; worth adding when the project produces its first heatmaps.