Query-Driven Multi-Instance Learning

Yen-Chi Hsu, Cheng-Yao Hong, Ming-Sui Lee, Tyng-Luh Liu

Abstract

Query-Driven Multi-Instance Learning (qMIL) introduces a flexible framework for multi-label classification by replacing static label vectors with semantic queries. By leveraging word embeddings to "search" for specific classes within bags of instances, qMIL reduces annotation overhead, allows for the seamless addition of new categories without retraining, and enables zero-shot discovery. Experiments across synthetic and real-world datasets demonstrate that qMIL achieves state-of-the-art accuracy while providing superior instance-level interpretability.

Introduction and Problem Statement

In traditional Multi-Instance Multi-Label (MIML) learning, data is organized into "bags" (e.g., an image) containing multiple "instances" (e.g., objects or patches). Conventional models require a full binary label vector for every bag, indicating the presence or absence of every possible class. This approach suffers from high annotation costs and architectural inflexibility; adding a new category typically requires modifying the output layer and retraining the entire model.

Evolution of Multi-Instance Learning paradigms: (a) Single-instance, (b) Multi-instance, (c) Multi-label multi-instance, and (d) the proposed Query-driven multi-instance learning.

The qMIL framework addresses these issues by reframing the classification task. Instead of predicting a fixed vector, the model accepts a semantic "query" (e.g., the word "dog") alongside a bag of instances and outputs a boolean answer indicating whether the queried item exists within the bag.

Methodology

The qMIL architecture utilizes a dual-branch neural network designed for query-visual co-embedding:

  • Visual Branch: Instances are processed via a CNN or MLP to generate visual embeddings.
  • Query Branch: Class names are converted into semantic vectors using word2vec and mapped to a query embedding space via an MLP.
  • Generalized Compatibility Measure: A similarity module compares the query embedding to each instance embedding, producing attention weights that identify which instances are most relevant to the query.
  • Label-Dependent Regularization: To refine the attention mechanism, the model employs sparsity constraints. For positive bags, an $\ell_1$-norm encourages sparse attention (focusing on the matching instance). For negative bags, a variance-based loss encourages uniform attention across all instances.
The qMIL mechanism (d) uses a query to probe a bag of instances, resulting in a boolean label for that specific query.

Experimental Evaluation

The authors evaluated qMIL across several benchmarks, including synthetic datasets (MNIST-BAGS, CIFAR10-BAGS) and real-world datasets like the MIML Scene Dataset and Activity Net for video action recognition.

Key Results

  • Accuracy: On CIFAR10-BAGS, qMIL achieved 89.9% bag-level accuracy, significantly outperforming GatedAttnDMIL (82.4%). On the MIML Scene dataset, it reached 90.20%, surpassing specialized Deep MIML networks.
  • Instance Discovery: Despite only receiving bag-level labels during training, the model demonstrated nearly 100% instance-level attention accuracy on MNIST, effectively locating the specific digits that triggered a label.
  • Zero-Shot Generalization: By leveraging semantic word embeddings, qMIL can identify "unseen" classes. In tests with 7 seen and 3 unseen classes, the model achieved approximately 68% accuracy on novel categories through an iterative filtering process.

Discussion and Conclusion

qMIL decouples labels from the model architecture, transforming the classifier into a general-purpose matching engine. This shift provides a powerful inductive bias: positive matches are treated as "needles in a haystack" (sparse attention), while negative matches are treated as "empty space" (uniform attention).

While the current implementation requires multiple passes to generate a full multi-label profile for an image, its flexibility and zero-shot capabilities mark a significant step forward for scalable and adaptable machine learning systems. Future work will focus on optimizing computational efficiency and expanding the framework to complex temporal tasks in video processing.

Summary updated

BibTeX
@inproceedings{hsu2020query,
  author = {Yen-Chi Hsu and Cheng-Yao Hong and Ming-Sui Lee and Tyng-Luh Liu},
  title = {{Query-Driven Multi-Instance Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i04.5836},
}
Figure