Topological Inductive Bias fosters Multiple Instance Learning in Data-Scarce Scenarios

Salome Kazeminia, Carsten Marr, Bastian Rieck

TL;DR

The authors introduce TG-MIL (Topologically Guided Multiple Instance Learning), a novel framework that uses topological inductive biases to improve classification when training data is scarce. By ensuring that the "shape" of data in the input space is preserved in the model's internal latent space, TG-MIL achieves significant performance gains in rare disease diagnosis and other data-limited scenarios.

What Problem Does This Paper Address?

Multiple Instance Learning (MIL) is a powerful tool for "weakly supervised" tasks. Instead of labeling every single data point (e.g., every cell in a blood smear), we label "bags" of points (e.g., the whole blood sample). A bag is positive if it contains at least one positive instance. This is perfect for medical imaging where expert annotations are expensive.

However, MIL models have a major weakness: they are data-hungry. When training data is scarce—as is often the case with rare diseases—these models struggle to learn meaningful representations and quickly overfit. The authors identify that current MIL methods don't explicitly leverage the intrinsic structural or "topological" relationships between instances within a bag, which is a missed opportunity for regularization.

Methods

The core innovation is the Topological Inductive Bias. The authors treat each bag of instances as a "point cloud" in high-dimensional space. To preserve the structure of this cloud during learning, they employ Persistent Homology, a tool from algebraic topology.

Figure 1: Topologically Guided Multiple Instance Learning (TG-MIL): We calculate the distance matrix A of input instances xi inside each bag Xbm. Subsequently, we apply persistent homology based on the Vietoris-Rips complex by treating each bag’s instances as a point cloud. We employ the same process for the latent feature vectors Z of each bag. Generating shape descriptors (persistence diagrams π) for both the latent space and the image space representations of the bag, we calculate a topological loss (Ltopo) and combine it with the standard MIL loss (Lclass).

The process works as follows:

  1. Filtration: They "thicken" the data points in a bag, tracking how topological features (like connected components or loops) appear and disappear across different scales.
  2. Persistence Diagrams: These "birth and death" events are recorded as a topological signature.
  3. Topological Loss ($L_{topo}$): The model calculates these signatures for both the raw input instances and their latent representations. A new loss term penalizes the encoder if the latent "shape" deviates from the input "shape."

Crucially, this method is "aggregator-agnostic," meaning it can be plugged into existing MIL architectures (like attention-based or max-pooling models) without changing their core logic.

Datasets

The authors evaluated TG-MIL across three distinct regimes:

  • Synthetic MIL Datasets: Bags created from MNIST (digits) and Fashion-MNIST images to test robustness across varying training sizes (from 10 to 200 bags).
  • Classic MIL Benchmarks: Standard datasets like MUSK1, MUSK2, FOX, TIGER, and ELEPHANT, which use tabular features rather than images.
  • Real-World Medical Data: A dataset for rare anemia classification consisting of microscopy images of blood cells from five different patient groups (e.g., Sickle Cell Disease, Thalassemia).

Key Insights and Ideas

  • Topology as a Regularizer: In data-scarce settings, the model's "hypothesis space" is too large. By forcing the encoder to maintain the topological structure of the input, TG-MIL acts as a powerful regularizer that prevents the model from finding "shortcuts" or overfitting to noise.
  • The Power of Connectivity: Most experiments used only 0D persistent homology (tracking connected components). Surprisingly, even this relatively simple connectivity-based bias was enough to significantly improve performance.
  • Robustness to Noise: Topological features are naturally invariant to rotations, translations, and small perturbations, making the learned representations more stable and interpretable.
Figure 2: TG-MIL achieves a more distinguished representation of negative and positive bags. For a toy dataset, instances are sampled from a hypersphere when projecting them to the 2D latent space (a), leading to a more distinguished latent representation of bags (b).

Key Results

TG-MIL consistently outperformed state-of-the-art MIL models, especially when training data was extremely limited:

  • Synthetic Data: Average performance improved by 15.3%.
  • Standard Benchmarks: Accuracy increased by an average of 2.8%, with TG-MIL setting new state-of-the-art records on several datasets.
  • Anemia Classification: In a real-world rare disease task with very few samples per class, TG-MIL improved accuracy by 5.5%.
  • Generalization: The method narrowed the performance gap between simple aggregation functions (like average pooling) and more complex ones (like attention), suggesting that a better instance representation is more critical than the choice of aggregator in low-data regimes.

Limitations and Future Work

The primary bottleneck is computational complexity. Calculating topological features scales quadratically ($O(n^2)$) with the number of instances in a bag for 0D features, and even worse for higher-order features (loops, voids). This makes it difficult to scale to bags with thousands of instances, such as whole-slide histopathology images.

Future directions suggested by the authors include:

  • Using approximate filtrations or distributed computing to speed up calculations.
  • Exploring cubical complexes, which can operate directly on image pixels more efficiently.
  • Investigating "feature-level" topology rather than "pixel-level" topology for more complex, noisy image domains.

Summary updated

BibTeX
@article{kazeminia2025topological,
  author = {Salome Kazeminia and Carsten Marr and Bastian Rieck},
  title = {{Topological Inductive Bias fosters Multiple Instance Learning in Data-Scarce Scenarios}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=1hZy9ZjjCc},
}
Figure