Abstract
Standard Referring Image Segmentation (RIS) models operate under a "closed-world" assumption, presuming that the target object described in natural language always exists within the provided image. This leads to significant false positives and hallucinations when models encounter "negative" sentences—descriptions of non-existent objects. This paper introduces the task of Robust Referring Image Segmentation (R-RIS), requiring models to output a blank mask for mismatching descriptions. We propose RefSegformer, an end-to-end transformer architecture that utilizes a novel "blank token" design to effectively ignore non-existent targets. RefSegformer achieves state-of-the-art results on standard RIS datasets and demonstrates superior robustness on newly established R-RIS benchmarks.
Introduction: The "Always-Exists" Fallacy
Referring Image Segmentation (RIS) has seen rapid progress, with models now capable of generating precise pixel-level masks for complex descriptions. However, these models are fundamentally "over-eager." Because they are trained on datasets where every sentence has a corresponding object, they fail to verify existence.
As shown in the figure above, when a standard RIS model is given a negative sentence like "the elephant" for an image of a boat, it hallucinations a mask over unrelated pixels. This lack of robustness limits the reliability of RIS in real-world applications where user input may be noisy or intentionally misleading. We formalize the R-RIS task to bridge this gap, requiring models to distinguish between positive (matching) and negative (mismatching) expressions.
RefSegformer Architecture
To address the R-RIS task, we propose RefSegformer, a transformer-based model designed for both high-precision segmentation and robust rejection.
Vision-Language Token Fusion (VLTF)
RefSegformer employs a multi-stage fusion approach. Instead of simple concatenation, it uses memory tokens to dynamically select and fuse relevant linguistic information into visual features across different stages of a Swin Transformer backbone. This allows for a deeper, more nuanced integration of text and image data.
Decoupling via Blank Tokens
The core architectural innovation is the introduction of blank tokens. Within the VLTF module, we maintain two sets of tokens:
- Conditional Tokens: These fuse with language features to identify and localize the target object.
- Blank Tokens: These are intentionally decoupled from the language input. They learn to attend to regions that do not match the text, such as the background or unrelated objects.
By providing the network with a representational "sink" for non-matching regions, the model can effectively represent the absence of a target. A small binary classification head then predicts the probability of the object's existence to suppress the mask output when necessary.
R-RIS Benchmarks and Metrics
To evaluate robustness, we created three new benchmarks—R-RefCOCO, R-RefCOCO+, and R-RefCOCOg—by augmenting existing datasets with five types of negative sentences: random sentences, random categories, target object swaps, attribute changes, and relationship changes.
We introduce two new metrics for this task:
- Robust IoU (rIoU): A metric that penalizes false positives on negative samples.
- Mean Robust Recall (mRR): Measures the frequency with which the model correctly outputs "no mask" for negative inputs.
Results and Discussion
RefSegformer demonstrates exceptional performance across the board. On standard RIS benchmarks, it achieved 76.92% oIoU on RefCOCO (val), surpassing previous state-of-the-art models like LAVT.
On the new R-RIS benchmarks, the gains are even more pronounced. RefSegformer outperformed modified versions of existing models by approximately 6% in the rIoU metric across all datasets. Visualization of attention maps confirms our theory: conditional tokens focus on target objects, while blank tokens learn to focus on the background, providing a clear mechanism for robust rejection.
Conclusion
By moving beyond the "always-exists" fallacy, RefSegformer sets a new standard for reliability in referring image segmentation. The introduction of blank tokens provides a simple yet effective way to decouple linguistic matching from visual localization, paving the way for more trustworthy vision-language systems.
Summary updated