Box-based Refinement for Weakly Supervised and Unsupervised Localization Tasks

Eyal Gomel, Tal Shaharabany, Lior Wolf

Abstract

While supervised localization models excel at identifying object boundaries, unsupervised and weakly supervised methods often produce noisy, fragmented heatmaps. This paper introduces a novel box-based refinement strategy that utilizes an auxiliary detector network as a differentiable teacher. By training this auxiliary network to predict bounding boxes from the primary network's feature maps, the authors enable backpropagation of localization errors, forcing the primary model to produce more spatially coherent and accurate object boundaries. The method demonstrates state-of-the-art performance in both phrase grounding and unsupervised object discovery.

Introduction

Localization—the task of determining the spatial extent of objects within an image—is a cornerstone of computer vision. While supervised models benefit from millions of human-labeled bounding boxes, unsupervised methods (like DINO or LOST) and weakly supervised methods (like phrase grounding) must rely on self-similarity or image-level labels. These approaches frequently suffer from "noisy" activations—fragmented blobs that fail to capture the precise shape of the target object.

Previous attempts to rectify this often involved training a separate detector (e.g., Faster R-CNN) on top of these noisy outputs. However, because the process of converting a feature map into a bounding box is typically non-differentiable, these detectors could not provide feedback to improve the underlying localization network. This paper addresses this gap by creating a differentiable bridge between the detector and the primary network.

Methodology

The core of the proposed approach is a symbiotic, cyclic training strategy designed to make the localization pipeline end-to-end differentiable.

  1. Primary Network Initialization: The process begins with a pre-trained localization network, such as a Transformer for object discovery or a CLIP-based model for phrase grounding.
  2. Auxiliary Detector ($h$): A small detector network ($h$) is trained to predict bounding boxes directly from the output maps of the primary network, rather than the raw image.
  3. Pseudo-Labeling: Initial "pseudo-labels" (rough bounding boxes) are generated from the primary network's noisy output using existing heuristics like TokenCut.
  4. Refinement via Backpropagation: Once the detector $h$ is trained to recognize objects in the primary network's feature space, it is frozen. The detector's loss—comprising classification, L1 box coordinates, and Generalized IoU—is then used to fine-tune the primary network.
The proposed refinement framework. The primary network $g$ generates a feature map $M$, which is processed by an auxiliary detector $h$ to produce bounding boxes. Gradients are backpropagated through $h$ to refine $g$.

By treating the auxiliary detector as a neural network, the entire path from the primary network's features to the final bounding box becomes differentiable. This forces the primary network to "clean up" its feature maps, producing denser, more coherent activations that align with the inductive bias of a bounding box.

Experiments and Results

The authors evaluated the refinement method across several standard benchmarks for phrase grounding and unsupervised object discovery. For phrase grounding, the models were trained on MS-COCO 2014 and Visual Genome (VG), and evaluated on Flickr30k, ReferIt, and VG.

Quantitative Performance

The refinement method consistently outperformed state-of-the-art baselines. In phrase grounding tasks on the Visual Genome dataset, the method achieved a "pointing game" accuracy of 63.51%, a significant improvement over the previous best of 62.31% (WWbL). Similar gains were observed in unsupervised object discovery; when applied to the MOVE architecture, refinement pushed the Correct Localization (CorLoc) score on VOC07 to 77.5%, up from a 76.0% baseline.

Performance comparison on phrase grounding benchmarks showing the proposed method consistently outperforming baselines across multiple backbones and datasets.

Qualitative Insights

Visual analysis confirms that the refined heatmaps are much denser and more accurately centered on objects compared to the original, scattered activations. The auxiliary detector acts as a spatial prior, effectively filtering out the "checkerboard" noise and fragmented activations common in self-supervised Transformers. Because the detector $h$ learns across the entire dataset, it provides a global understanding of "objectness" that benefits the localization of individual instances.

Discussion and Limitations

The primary innovation of this work is the use of an auxiliary network as a differentiable bridge to solve the non-differentiability of box-based localization. However, the method is not without limitations. It relies heavily on the assumption that objects fit neatly into rectangular boxes, which may not hold for highly irregular or non-convex shapes (e.g., a bicycle frame). Additionally, the requirement to train an extra network and perform an additional fine-tuning stage introduces computational overhead. Future work may explore extending this refinement logic to more complex segmentation masks or integrating it into larger multi-modal foundation models.

Summary updated

BibTeX
@inproceedings{gomel2023box,
  author = {Eyal Gomel and Tal Shaharabany and Lior Wolf},
  title = {{Box-based Refinement for Weakly Supervised and Unsupervised Localization Tasks}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure