CoReS: Orchestrating the Dance of Reasoning and Segmentation

Xiaoyi Bao, Siyang Sun, Shuailei Ma, Kecheng Zheng, Yuxin Guo, Guosheng Zhao, Yun Zheng, Xingang Wang

Abstract

The reasoning segmentation task, which demands a nuanced comprehension of intricate queries to accurately pinpoint object regions, is attracting increasing attention. However, Multi-modal Large Language Models (MLLM) often find it difficult to accurately localize the objects described in complex reasoning contexts. We believe that the act of reasoning segmentation should mirror the cognitive stages of human visual search, where each step is a progressive refinement of thought toward the final object. Thus we introduce the Chains of Reasoning and Segmenting (CoReS) and find this top-down visual hierarchy indeed enhances the visual search process. Specifically, we propose a dual-chain structure that generates multi-modal, chain-like outputs to aid the segmentation process. Furthermore, to steer the MLLM’s outputs into this intended hierarchy, we incorporate in-context inputs as guidance. Extensive experiments demonstrate the superior performance of our CoReS, which surpasses the state-of-the-art method by 6.5% on the ReasonSeg dataset.

Introduction: The Challenge of Reasoning Segmentation

Reasoning segmentation requires a model to interpret implicit, complex queries—such as "Find the part that gives dogs a sense of smell"—and generate a precise pixel-level mask. Unlike standard referring expression segmentation, the target is not explicitly named.

Current state-of-the-art models, such as LISA, often struggle with these tasks because they attempt to locate the final object directly. Without a structured search strategy, these models are frequently distracted by semantically similar features. For example, when searching for a dog's nose, a model might mistakenly segment the eyes because both are dark, round, sensory organs.

Comparison between the direct approach of LISA and the hierarchical approach of CoReS.

Methodology: Chains of Reasoning and Segmenting

To address these limitations, CoReS introduces a top-down visual hierarchy that mirrors human cognitive stages: identifying a broad context before pinpointing a specific detail. This is achieved through a Dual-Modal Dual-Chain architecture.

1. Chain-of-Reasoning (CoR)

The model is trained to generate a structured textual response that identifies the broader location ([LOC]) before the final segment ([SEG]). The output format follows the template: "It appears on [LOC]. It is [SEG]." This forces the MLLM to establish a spatial context first.

2. Chain-of-Segmenting (CoS)

This visual chain operates in parallel with the text. An initial coarse mask is generated for the [LOC] token. To refine this, a Token Refiner uses Masked Average Pooling (MAP) to extract visual features from the coarse mask and fuse them back into the text embeddings. This "calibrated" embedding then guides the generation of the final, precise mask for the [SEG] token.

The CoReS architecture, featuring the Dual-Chain structure and Token Refiner.

3. In-Context Guidance

To steer the MLLM toward this hierarchical logic without complex prompt engineering, CoReS utilizes in-context inputs. By providing a few text-only examples of hierarchical reasoning, the model learns the desired output structure, effectively transferring the "rule" of top-down search to the visual task.

Experimental Results

CoReS was evaluated on the ReasonSeg benchmark, the primary dataset for complex reasoning segmentation.

  • Performance Gains: Using a LLaVA-7B backbone, CoReS achieved a 59.4 gIoU, outperforming LISA by 6.5%.
  • Zero-Shot Capability: An "un-tuned" version of CoReS (not trained on ReasonSeg) outperformed the fine-tuned version of LISA by 1.9%, highlighting the strength of the hierarchical logic itself.
  • Complexity Scaling: The model showed significant improvements on refCOCOg, which contains longer, more complex descriptions, confirming that the "Chain-of-Thought" approach is most beneficial for challenging reasoning tasks.

Conclusion

CoReS demonstrates that a top-down visual hierarchy significantly improves the reasoning capabilities of MLLMs in segmentation tasks. By decoupling the "where" from the "what" through a dual-chain structure, the model effectively reduces noise and focuses its visual search. Future work will explore extending this hierarchical reasoning to more complex domains like video analysis and robotic manipulation.

Summary updated

BibTeX
@inproceedings{bao2024cores,
  author = {Xiaoyi Bao and Siyang Sun and Shuailei Ma and Kecheng Zheng and Yuxin Guo and Guosheng Zhao and Yun Zheng and Xingang Wang},
  title = {{CoReS: Orchestrating the Dance of Reasoning and Segmentation}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  url = {https://openreview.net/forum?id=KGbkyTMtIZ},
}
Figure