MIST: Multiple Instance Spatial Transformer

Baptiste Angles, Yuhe Jin, Simon Kornblith, Andrea Tagliasacchi, Kwang Moo YiCVPR 2021

Abstract

We propose a deep network that can be trained to tackle image reconstruction and classification problems that involve detection of multiple object instances, without any supervision regarding their whereabouts. The network learns to extract the most significant top-K patches, and feeds these patches to a task-specific network -- e.g., auto-encoder or classifier -- to solve a domain specific problem. The challenge in training such a network is the non-differentiable top-K selection process. To address this issue, we lift the training optimization problem by treating the result of top-K selection as a slack variable, resulting in a simple, yet effective, multi-stage training. Our method is able to learn to detect recurrent structures in the training dataset by learning to reconstruct images. It can also learn to localize structures when only knowledge on the occurrence of the object is provided, and in doing so it outperforms the state-of-the-art.

Introduction

In computer vision, identifying multiple object instances within a cluttered scene typically requires dense supervision in the form of bounding box labels. When such labels are unavailable, researchers often turn to heatmaps to identify peaks of interest. However, a significant technical hurdle remains: the operation of selecting the top-K highest peaks in a heatmap is inherently non-differentiable. This prevents the use of standard backpropagation to refine the heatmap generator based on the performance of the final downstream task, such as classification or reconstruction.

Previous attempts to bypass this issue relied on rigid grids or sequential attention mechanisms that find one object at a time. These methods often struggle when objects are numerous, overlapping, or randomly distributed. MIST (Multiple Instance Spatial Transformer) addresses this by making the top-K selection process trainable end-to-end.

Methodology: Differentiable Top-K via Lifting

The core innovation of MIST is a strategy termed differentiable top-K via lifting. Instead of forcing a gradient through a discrete selection step, the authors "lift" the optimization problem into a higher-dimensional space by introducing auxiliary variables.

The MIST architecture overview, illustrating the forward pass and the backpropagation through the 'lifting' mechanism involving an optimal heatmap and a generative bridge G.

The workflow proceeds as follows:

  1. Heatmap Generation: A detector network ($H_\eta$) predicts a heatmap where peaks represent potential object locations.
  2. Lifting & Slack Variables: Patch locations are treated as "slack variables." A constraint is introduced requiring these locations to match the predicted heatmap.
  3. The Generative Bridge: An auxiliary function ($G$) renders a set of points back into an "optimal" heatmap.
  4. Multi-Stage Training: Using block coordinate descent, the model alternates between optimizing the task network (e.g., a classifier), updating patch locations to minimize task loss, and updating the heatmap network to match the "ideal" heatmap rendered from successful patch locations.

Experimental Results

The authors evaluated MIST across several challenging scenarios, including synthetic MNIST variants and natural image datasets like PASCAL VOC 2007 and COCO.

Unsupervised Discovery and Reconstruction

On the "MNIST-hard" dataset—characterized by random counts and overlapping digits—MIST achieved a reconstruction Root Mean Square Error (RMSE) of 0.053. This significantly outperformed the standard "Grid" baseline (0.062) and sequential attention models (0.154). The model naturally learns that "objects" are the most efficient building blocks for image reconstruction.

Qualitative comparison of MIST against various baselines on MNIST easy and hard datasets, demonstrating superior localization in cluttered scenes.

Weakly Supervised Classification

When trained only with image-level labels (e.g., "this image contains a 3 and a 7"), MIST achieved 97.5% accuracy in both detecting and classifying digits on MNIST-hard. Furthermore, on the PASCAL+COCO benchmark, MIST outperformed previous state-of-the-art differentiable top-K methods by over 13% relative in F1-score, proving its efficacy on complex, real-world data.

Conclusion

MIST provides a robust framework for multi-object discovery without location-based supervision. By treating top-K selection as a lifting problem, it enables end-to-end training for tasks ranging from unsupervised reconstruction to weakly supervised classification. While currently limited to square patches, future work will focus on extending the framework to handle varying aspect ratios and dynamic determination of the optimal number of instances ($K$) per image.

Summary updated

BibTeX
@inproceedings{angles2021mist,
  author = {Baptiste Angles and Yuhe Jin and Simon Kornblith and Andrea Tagliasacchi and Kwang Moo Yi},
  title = {{MIST: Multiple Instance Spatial Transformer}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  url = {https://openreview.net/forum?id=ky9I7yYue6},
}
Figure