Learn · Intermediate
Multiple-instance learning: learning from labels on groups, not individual examples
Multiple-instance learning trains a model on labeled groups of examples when the individual examples inside each group are not labeled. It makes learning possible when an overall outcome is known but finding the exact evidence responsible would be expensive or impractical. The model must learn both how to interpret individual examples and how to combine them into a group-level prediction.
Imagine a pathologist has a diagnosis for an entire tissue slide but has not marked each tiny region. A slide might contain thousands of image patches, only a few of which show a tumor. Treating every patch from a positive slide as cancer would introduce many incorrect labels. Multiple-instance learning instead treats the slide as a bag, its patches as instances, and the diagnosis as the bag's label.
What a bag label means
In the classical binary formulation, a bag is positive if at least one instance is positive, and negative if every instance is negative. A suitcase scanner gives a useful analogy: one prohibited object makes a bag positive, while a negative bag contains none. This rule is an assumption about how labels arise; it is not a universal law. A medical outcome might depend on the amount, distribution, or combination of abnormal tissue, rather than the presence of a single patch.
Training data consist of many bags with their labels. The model processes each instance into a representation and combines the representations or instance scores into one prediction for the bag. During training, the bag prediction is compared with the known bag label. The resulting error signal updates the model, even though no one has provided a separate label for each patch. This is a form of weak supervision: the available label constrains the answer without specifying all of its components.
How the pieces are combined
The simplest combining rule is maximum pooling: take the largest instance score as the bag score. That mirrors the at-least-one-positive assumption. If the highest scoring patch changes, however, the model can concentrate on one region and neglect other useful evidence. A spurious visual artifact might dominate the prediction. Maximum pooling can also be a poor fit when a diagnosis depends on how many patches are affected.
Average pooling treats the bag more like a vote across instances. It can summarize widespread patterns, but a rare decisive patch may be diluted by thousands of ordinary ones. Neither pooling rule is inherently correct; each builds a different assumption into the model.
A more flexible approach learns how much weight to give each instance. In Attention-based Deep Multiple Instance Learning, Maximilian Ilse, Jakub Tomczak and Max Welling describe a trainable attention mechanism that produces a weighted combination of instance representations before predicting the bag label. Think of a reviewer using a highlighter to allocate more attention to some pages of a large file. Unlike a fixed maximum or average, learned weights can adapt to the task. The transformers lesson explains how attention uses weighted combinations in language models.
The highlighter analogy has a limit: a high attention weight is not automatically proof that a patch caused the prediction or contains the true medical finding. Weights are learned to help predict bag labels, and several different sets of weights can sometimes yield similar predictions. If localization matters, compare highlighted regions against independently annotated examples and test whether conclusions survive suitable perturbations. A useful bag-level classifier can still have unreliable instance-level explanations.
Evaluation needs two levels
Keep all instances from one patient, document, or other real-world unit together when splitting training and test data. Otherwise patches from the same slide or patient can appear on both sides, letting the model exploit shared artifacts and giving an inflated impression of generalization. The holdout and cross-validation lesson covers the general reason to keep evaluation independent.
Measure bag-level performance on an untouched test set resembling the setting in which the system will be used. For a rare condition, precision and recall may be more informative than accuracy alone. Check performance across hospitals, equipment, and time periods when the data permit: the model could learn a laboratory-specific stain or scanner signature instead of the biological feature of interest.
If the intended use includes locating the abnormal area, evaluate that separately against region annotations. A correct slide diagnosis does not prove that the highlighted patch is correct. Conversely, an imperfect region map may still support a useful bag-level prediction. Report the number and diversity of bags, not just the potentially enormous number of patches: thousands of correlated patches from one slide are not thousands of independent patients.
When the assumption breaks
Multiple-instance learning saves annotation effort, but it does not manufacture information missing from the labels. If positive bags contain recurring irrelevant cues, the model can learn those shortcuts. If diagnoses are noisy, the supervision inherits that noise. If bag sizes vary dramatically, the pooling method and sampling strategy can introduce biases. And if the true outcome depends on relationships between instances, an approach that processes each patch independently before simple pooling may miss those relationships.
Start by writing down the actual relationship between instances and the bag label. Compare simple pooling baselines, inspect errors, and validate any localization claims with labels collected for that purpose. The benefit is practical: group labels often exist already, and a carefully evaluated model can learn from them without pretending that every individual item has been independently annotated.
Key questions
What is a bag in multiple-instance learning?
Does a positive bag mean every instance is positive?
Do attention weights prove which instance caused a prediction?
Cite this
APA
Ground Truth. (2026, November 15). Multiple-instance learning: learning from labels on groups, not individual examples. Ground Truth. https://groundtruth.day/learn/multiple-instance-learning.html
BibTeX
@misc{groundtruth:multiple-instance-learning,
title = {Multiple-instance learning: learning from labels on groups, not individual examples},
author = {{Ground Truth}},
year = {2026},
month = {nov},
url = {https://groundtruth.day/learn/multiple-instance-learning.html}
}