NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Bag Graph: Multiple Instance Learning Using Bayesian Graph Neural Networks

Soumyasundar Pal, Antonios Valkanas, Florence Regol, Mark Coates

Abstract

Traditional Multiple Instance Learning (MIL) methods often assume that collections of instances, or "bags," are independent and identically distributed (i.e., the i.i.d. assumption). However, in many real-world applications, such as geographic data or social networks, bags exhibit significant inter-dependencies. This paper introduces Bag Graph, a framework that bridges the gap between MIL and Graph Neural Networks (GNNs). By modeling the latent relationships between bags using a Bayesian GNN framework, the proposed method achieves state-of-the-art performance across diverse tasks, including text categorization, electoral prediction, and regression.

Introduction

In Multiple Instance Learning (MIL), supervision is provided at the level of sets (bags) rather than individual data points (instances). While existing research has explored modeling relationships within a bag, the relationships between bags are frequently ignored. For example, in predicting rental prices or voting patterns, neighboring regions often share similar characteristics. Treating these bags as independent ignores valuable contextual information. Bag Graph addresses this by treating bags as nodes in a graph and learning the underlying topology even when the graph structure is unknown or noisy.

The Bag Graph Framework

The proposed architecture operates in two distinct stages to capture both local and global dependencies:

  1. Intra-bag Modeling: The model first processes instances within each bag using permutation-invariant architectures like Deep Sets or Set Transformers. This step produces a fixed-length "bag embedding" that summarizes the group's features.
  2. Inter-bag Modeling (Bayesian GNN): These bag embeddings serve as nodes in a graph. To account for unknown or uncertain relationships between bags, the framework employs a Bayesian GNN. Rather than using a fixed adjacency matrix, the model treats the graph topology as a latent variable. It learns the most probable graph structure based on a smoothness criterion, assuming that bags with similar features or labels should be connected.

The entire pipeline—from instance embedding to graph inference and GNN classification—is trained end-to-end. This allows the model to propagate information from labeled training bags to unlabeled test bags in a transductive setting.

Experimental Evaluation

Text Categorization and MIL Benchmarks

The researchers evaluated Bag Graph on standard MIL benchmarks (MUSK, FOX, TIGER, ELEPHANT) and 20 datasets from the 20Newsgroups corpus. The Bayesian approach consistently outperformed both classical MIL methods and modern neural baselines.

Figure 1: Comparison of model ranks across multiple instance learning benchmarks. The proposed Bayesian GCN (top) achieves the lowest (best) median rank.

Electoral Results Prediction

A key test case involved predicting the 2016 US Presidential election results at the county level. By modeling counties as bags of demographic data and learning the geographic and socio-economic links between them, the B-DS-GCN (Bayesian Deep Sets GCN) model achieved an accuracy of 74.2%.

Figure 2: Visualization of predicted vs. true 2016 US Presidential election results. B-DS-GCN captures the spatial distribution of votes more accurately than independent bag models like Deep Sets.

Distribution Regression: NYC Rental Prices

In predicting neighborhood rental prices in New York City, the Bayesian GNN variants showed significant improvements over standard MIL models. The Root Mean Squared Error (RMSE) dropped from 86.37 (Deep Sets) to 67.51 (B-DS-GCN). Interestingly, the Bayesian approach outperformed models using a fixed geographic graph, suggesting it captured non-spatial similarities between neighborhoods with similar economic profiles.

Discussion and Conclusion

Bag Graph demonstrates that modeling inter-bag dependencies is crucial for high-performance MIL. By leveraging Bayesian GNNs, the framework can infer meaningful relationships even in the absence of a predefined graph.

Future work will focus on moving from a transductive to an inductive setting, allowing the model to generalize to new, unseen bags without re-inferring the entire graph. Additionally, improving the scalability of the $O(|V|^2)$ graph-learning step remains a priority for applying this framework to massive datasets.

Summary updated

BibTeX
@inproceedings{pal2022bag,
  author = {Soumyasundar Pal and Antonios Valkanas and Florence Regol and Mark Coates},
  title = {{Bag Graph: Multiple Instance Learning Using Bayesian Graph Neural Networks}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i7.20762},
}
Figure