IteRPrimE: Zero-shot Referring Image Segmentation with Iterative Grad-CAM Refinement and Primary Word Emphasis

Yuji Wang, Jingchen Ni, Yong Liu, Chun Yuan, Yansong Tang

Abstract

Referring Image Segmentation (RIS) typically relies on extensive supervised learning with pixel-level annotations. Zero-shot approaches using Vision-Language Models (VLMs) like CLIP often struggle with spatial context and semantic noise. We present IteRPrimE, a zero-shot framework that utilizes iterative Grad-CAM refinement and primary word emphasis to resolve these issues. By maintaining a global spatial perspective and focusing on core linguistic subjects, IteRPrimE achieves state-of-the-art performance across multiple benchmarks without any task-specific fine-tuning.

Introduction

Referring Image Segmentation (RIS) requires a model to segment a specific object described by a natural language query (e.g., "the left bike on the roadside"). While supervised models perform well, the cost of human annotation is prohibitive. Zero-shot methods attempt to leverage pre-trained models like CLIP but face two primary challenges:

  1. Spatial Blind Spots: Similarity-based methods often crop candidate objects, removing the relative context needed to understand positional terms like "left" or "right."
  2. Semantic Noise: Complex sentences contain secondary nouns (e.g., "roadside") that can distract the model from the primary target ("bike").

Methodology

IteRPrimE introduces a novel pipeline that uses Grad-CAM heatmaps as a spatial anchor, ensuring the model retains a global coordinate system throughout the segmentation process.

Overview of IteRPrimE architecture (b) vs. standard CLIP-based cropping (a), and performance comparison (c).

Primary Word Emphasis Module (PWEM)

To mitigate semantic noise, IteRPrimE employs a Primary Word Emphasis Module. Using part-of-speech (POS) tagging and dependency parsing, the system identifies the primary noun in the query. It then specifically boosts the Grad-CAM signal for this word, ensuring the model remains focused on the target object rather than descriptive context words.

Iterative Grad-CAM Refinement Strategy (IGRS)

Rather than relying on a single inference pass, IteRPrimE uses an iterative approach. In each step, the model identifies salient regions and then systematically masks them out in subsequent passes. This forces the model to explore the image for overlooked areas that might better match the full text description, effectively correcting initial errors in positional logic.

The iterative process resolving positional ambiguity by re-evaluating the scene across multiple steps.

Selective Mask Proposal Network

The refined Grad-CAM heatmap serves as a guide for a standard segmentor (such as Mask2Former). The system selects the high-quality mask proposal that best aligns with the final refined heatmap, producing a precise segmentation output.

Experimental Results

IteRPrimE was evaluated on RefCOCO, RefCOCO+, RefCOCOg, and PhraseCut datasets, setting new benchmarks for zero-shot RIS:

  • State-of-the-Art Accuracy: The model achieved an average score of 42.9% across the RefCOCO series, surpassing previous zero-shot leaders.
  • Positional Mastery: On the RefCOCO dataset, which is rich in spatial queries, IteRPrimE improved accuracy on positional phrases from 19.07% (GL-CLIP) to 36.45%.
  • Robust Generalization: On PhraseCut, which includes over 1,200 object categories, IteRPrimE reached 38.1% oIoU, significantly outperforming previous methods like Ref-Diff (29.4%).

Conclusion

IteRPrimE demonstrates that zero-shot RIS can be significantly improved by preserving spatial context and prioritizing linguistic hierarchy. By using Grad-CAM as an iterative, self-correcting pointer, the framework overcomes the inherent limitations of crop-based CLIP methods. Future work will explore applying these iterative refinement techniques to video segmentation and more granular linguistic directives.

Summary updated

BibTeX
@inproceedings{wang2025iterprime,
  author = {Yuji Wang and Jingchen Ni and Yong Liu and Chun Yuan and Yansong Tang},
  title = {{IteRPrimE: Zero-shot Referring Image Segmentation with Iterative Grad-CAM Refinement and Primary Word Emphasis}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i8.32880},
}
Figure