Introduction
Referring Expression Segmentation (RES) is the challenging task of identifying and masking the exact pixels of an object described in natural language. While Multi-Modal Large Language Models (MLLMs) are excellent at understanding complex semantics, they often struggle with spatial precision. Existing solutions typically modify the MLLM architecture with specialized tokens or custom decoders, which increases training complexity and reduces flexibility.
SAM4MLLM introduces a framework that enables MLLMs to perform precise pixel-level segmentation without changing their core architecture. By treating the MLLM as a "prompt generator" for the Segment Anything Model (SAM), the researchers achieve state-of-the-art results using significantly less training data than competing methods.
Methodology
The core innovation of SAM4MLLM is leveraging the MLLM's text-processing capabilities to generate or verify prompt points for SAM. The model is fine-tuned using LoRA and trained solely with standard text cross-entropy loss, avoiding specialized mask losses.
Prompt-Point Generation (PPG)
In the PPG strategy, the MLLM is fine-tuned to directly output a bounding box and a set of "positive" (inside the object) and "negative" (outside the object) points as text strings. These points are then fed into SAM to produce the final mask. During training, a filtering process ensures the sampled points are high-quality.
Proactive Query of Prompt-Points (PQPP)
PQPP is a more sophisticated two-turn dialogue approach based on the insight that verification is easier than generation for MLLMs.
- Turn 1: The MLLM identifies a rough bounding box for the target.
- Turn 2: The system samples a grid of points within that box and asks the MLLM: "Is this point on the object?"
The MLLM responds with "Yes" or "No," and the points with the highest confidence are used as prompts for SAM. This method is particularly effective for complex reasoning tasks.
Key Results and Insights
SAM4MLLM demonstrates remarkable efficiency and performance across standard benchmarks like refCOCO, refCOCO+, and refCOCOg.
- Data Efficiency: Because SAM already understands object boundaries, SAM4MLLM only needs to learn how to "point." It achieved results comparable to models like GLaMM while using 100x fewer images and 10,000x fewer masks during training.
- State-of-the-Art Performance: On the refCOCOg "val" set, SAM4MLLM (using a LLaVA-1.6-7B backbone) achieved a 74.5 cIoU, outperforming GLaMM-7B (74.2) and LISA-7B (67.9).
- Zero-Shot Reasoning: On the ReasonSeg benchmark, SAM4MLLM-PQPP achieved a 48.1 cIoU, significantly outperforming the previous state-of-the-art, LISA-13B (46.9), despite being a smaller model.
- Preserving General Capabilities: Testing on VQAv2 showed that the fine-tuning process did not cause "catastrophic forgetting"; in fact, general visual question-answering performance improved slightly (from 78.2 to 78.7).
Conclusion and Future Work
SAM4MLLM proves that pixel-perfect segmentation can be achieved by MLLMs through intelligent prompting rather than architectural modification. While the PQPP method is currently slower due to its multi-turn nature, its reasoning capabilities and data efficiency mark a significant step forward. Future work will focus on improving inference speed and extending the framework to video-based segmentation tasks.
Summary updated