Introduction: The Challenge of Distribution Shift in MIL
Multi-Instance Learning (MIL) is a powerful paradigm where data is organized into "bags," and labels are provided only at the bag level. A bag is labeled positive if it contains at least one positive instance. However, a significant hurdle in deploying MIL models is the assumption that training and testing data are independent and identically distributed (i.i.d.).
In real-world scenarios, distribution shifts are common. For instance, a model trained to detect dogs in summer settings (on green grass) may fail when tested on winter images (on white snow). The model often learns spurious correlations, treating the "grass" as a predictive feature for "dog." This leads to two types of errors: false positives when the background (grass) appears without the object, and false negatives when the object (dog) appears in a new context (snow).
StableMIL: A Causal Framework
To address these shifts, we propose StableMIL, a framework that leverages causal inference to identify "stable instances." Unlike standard MIL, which relies on correlation, StableMIL seeks the underlying causal drivers of a label—features that remain invariant across different environments.
We categorize instances into three types:
- Causal instances: The actual objects of interest (e.g., the dog).
- Noisy instances: Contextual elements highly correlated with the label in training but not in testing (e.g., the grass).
- Negative instances: General background noise.
Identifying Stable Instances
StableMIL utilizes the Potential Outcome Framework from causal inference. We treat the inclusion of an instance in a bag as a "treatment." By observing how the addition of a specific instance to a negative bag affects the bag's label (using a surrogate classifier), we can estimate its causal effect. Instances that consistently "flip" the label of negative bags across various contexts are identified as stable.
Once these stable instances are identified, bags are represented as vectors based on their similarity to these anchors. This "bag embedding" ensures that the final classifier (e.g., an SVM) focuses on robust, causal features rather than transient environmental correlations.
Experimental Evaluation
We evaluated StableMIL across synthetic and real-world datasets, including MNIST, 20 Newsgroups, and the NICO (Non-I.C.I. Image Dataset) benchmark.
Key Results
- Robustness to Environmental Change: On the NICO "Season" dataset, which specifically tests for distribution shift (e.g., dogs in different seasons), StableMIL achieved an accuracy of 81.9%. This significantly outperformed traditional MIL methods like mi-SVM, which reached only 71.0%.
- Performance Without Test Data: A major advantage of StableMIL is its independence from unlabeled test data. While existing methods like MIKI require access to the test distribution to adjust weights, StableMIL performs comparably or better without such "peeking." For example, on a biased MNIST task, StableMIL achieved 95.8% accuracy, surpassing MIKI's 95.4%.
- Generalization: On classic MIL benchmarks where no distribution shift was present, StableMIL remained competitive with state-of-the-art methods, demonstrating that its focus on stability does not come at the cost of standard performance.
Conclusion
StableMIL represents a shift in Multi-Instance Learning from correlation-based models to causal-based ones. By identifying stable instances that drive bag labels across environments, the framework provides a robust solution to distribution shift without requiring prior knowledge of the test environment. Future work will explore relaxing the standard MIL assumptions and investigating more complex types of distribution changes beyond covariate shift.
Summary updated