Better, Stronger, Faster: Tackling the Trilemma in MLLM-based Segmentation with Simultaneous Textual Mask Prediction

Jiazhen Liu, Mingkuan Feng, Long ChenarXiv 2025 · DOI

Abstract

Multimodal Large Language Models (MLLMs) have demonstrated impressive capabilities in visual understanding and dialogue. However, integrating precise object segmentation into these models introduces a "trilemma": a conflict between general dialogue ability, high segmentation performance, and fast inference speed. We introduce STAMP (Simultaneous Textual All-Mask Prediction), a framework that resolves this trilemma by decoupling autoregressive text generation from a parallel, single-pass mask prediction phase. STAMP treats segmentation as a "fill-in-the-blank" task over image patches using bidirectional attention, achieving state-of-the-art results while maintaining high inference speeds and preserving the model's conversational integrity.

The MLLM Segmentation Trilemma

Current MLLM-based segmentation approaches typically fall into two categories, both of which suffer from inherent trade-offs:

  1. Embedding Prediction: Models like LISA utilize a special token whose hidden state is fed into an external decoder (e.g., SAM). While fast, the pixel-level loss functions required for training often conflict with the model's language objectives, degrading its general dialogue and reasoning capabilities.
  2. Next-token Prediction: Other models treat masks as sequences of coordinates or patch labels. While this preserves dialogue quality, it is either inaccurate or prohibitively slow due to the massive number of tokens required for high-resolution masks.
The MLLM Segmentation Trilemma: Balancing dialogue, performance, and speed.

STAMP: Simultaneous Textual All-Mask Prediction

To break this trilemma, STAMP introduces a novel All-Mask Prediction paradigm. The core idea is to separate the linguistic response from the spatial segmentation task, allowing each to be optimized without compromising the other.

The STAMP inference process occurs in two distinct phases:

  • Phase 1: Dialogue Generation: The MLLM generates a standard textual response. When a segmentation is required, it emits a unique <SEG> token. This ensures the language model's internal representations remain focused on dialogue and reasoning.
  • Phase 2: All-mask Generation: Upon encountering the <SEG> token, the model triggers a non-autoregressive forward pass. It appends a fixed set of [MASK] placeholders—one for each image patch—to the sequence. These tokens use bidirectional attention, allowing them to capture global spatial context and dialogue history simultaneously. A simple linear head then performs patch-wise classification to generate the final mask.
STAMP's Two-Phase All-mask Prediction framework.

Experimental Results

STAMP was evaluated across multiple benchmarks, including RefCOCO, gRefCOCO, and ReasonSeg. Key findings include:

  • Superior Performance: STAMP-7B achieved a 80.7 cIoU on RefCOCO, surpassing larger models like Text4Seg-13B.
  • Efficiency: By avoiding autoregressive mask generation, STAMP is 10-15x faster than next-token prediction methods like SegAgent.
  • Dialogue Preservation: Evaluation on general VQA benchmarks (e.g., MMBench, MMMU) confirms that STAMP maintains its "intelligence," outperforming other segmentation-capable models in multi-round dialogue and complex reasoning.

Conclusion

STAMP successfully addresses the MLLM segmentation trilemma by decoupling dialogue and mask generation. By leveraging parallel patch classification and bidirectional attention, it provides a scalable, efficient, and high-performance solution for grounded visual conversation. Future work will explore extending this paradigm to panoptic segmentation and further reducing dependency on external refinement decoders.

Summary updated

BibTeX
@misc{liu2025better,
  author = {Jiazhen Liu and Mingkuan Feng and Long Chen},
  title = {{Better, Stronger, Faster: Tackling the Trilemma in MLLM-based Segmentation with Simultaneous Textual Mask Prediction}},
  year = {2025},
  eprint = {2512.00395},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.00395},
}
Figure