Multimodal Large Language Models (MLLMs) have become impressively good at chatting about images, but they still struggle with fine-grained tasks like pinpointing a specific object or drawing a segmentation mask. A new paper, "Patch-as-Decodable-Token: Towards Unified Multi-Modal Vision Tasks in MLLMs," introduces a paradigm shift called PaDT that solves this by changing how models "talk" about what they see.
The Problem with Textual Coordinates
Most current MLLMs (like GPT-4o or LLaVA) treat vision tasks as a text generation problem. To detect a cat, the model literally types out string characters representing bounding box coordinates, such as [123, 456, 789, 012].
This approach has three major flaws:
- Brittleness: The model might hallucinate numbers or fail to follow the specific JSON or list format required for parsing.
- Semantic Mismatch: Numerical digits have no inherent "visual" meaning to the LLM; they are abstract symbols disconnected from the image features.
- Resolution Limits: Typing out coordinates is passable for simple bounding boxes, but it is nearly impossible to generate a complex, pixel-perfect segmentation mask this way.
The PaDT Solution: Visual Reference Tokens
PaDT moves away from this clunky method by introducing Visual Reference Tokens (VRTs)—essentially "visual pointers" to image patches. This allows the model to directly generate detection boxes and segmentation masks through a unified, lightweight decoder.
The architecture relies on three core innovations:
- Visual Reference Tokens (VRTs): Instead of using a fixed global codebook, PaDT dynamically adds the actual patch embeddings from the input image into the LLM’s vocabulary for that specific session. When the model wants to refer to an object, it outputs these VRTs directly in its text stream.
- Dynamic Embedding Module: This module ensures that the VRTs reside in the same feature space as the LLM's text tokens. Because these tokens are derived directly from the image patches, they carry rich spatial and semantic information.
- Lightweight PaDT Decoder: When the LLM outputs a sequence of VRTs, they are fed into a small, 3-layer "two-way attention" decoder. This decoder transforms the hidden states of the VRTs into structured outputs: bounding boxes, segmentation masks, and confidence scores.
Unified Vision Tasks and Datasets
Because the decoder is flexible, the same model can handle detection and segmentation simultaneously without needing task-specific heads. The model was evaluated across several standard benchmarks:
- Referring Expression Comprehension (REC) & Segmentation (RES): Evaluated on RefCOCO, RefCOCO+, and RefCOCOg.
- Open-Vocabulary Detection (OVD): Tested on COCO 2017 and Objects365.
- Referring Image Captioning (RIC): A newly introduced benchmark created by re-annotating COCO with fine-grained, grounded captions that explicitly link text to visual tokens.
Key Insights and Results
- "Pointing" Beats "Describing": By using VRTs, the model essentially points to parts of the image it already "sees." This preserves spatial continuity and semantic alignment much better than abstract numbers.
- Efficiency Gains: Representing an object with a few VRTs is highly token-efficient. PaDT saves roughly 12 forward passes per object compared to standard text-based coordinate serialization.
- State-of-the-Art Performance: PaDT achieved SOTA results across REC and RES tasks. On RefCOCO, the 3B parameter model reached an overall score of 93.6, while the 7B version hit 94.5.
- Detection Leap: On the COCO open-vocabulary detection task, PaDT improved the previous best-in-class performance by a staggering 19.0 mAP.
- Scaling Efficiency: Remarkably, the 3B parameter PaDT model outperformed the massive 78B InternVL3 model on referring expression tasks, proving that architectural cleverness can beat raw parameter count.
- Zero-Shot Generalization: When pretrained on Objects365 and tested on COCO without further tuning, PaDT showed significantly stronger zero-shot capabilities than base models like Qwen2.5-VL.
Limitations and Future Work
While the PaDT decoder is lightweight (95M parameters), it still adds a small amount of computational overhead compared to a pure LLM. Additionally, while the model is excellent at "pointing" to existing patches, its performance remains somewhat tied to the resolution of the initial vision encoder's patch grid.
Future work could involve refining the masks further using foundation models like SAM 2 (which the authors experimented with as a post-processing step) or extending the VRT concept to video-based tracking and dense temporal grounding.
Code is available at: https://github.com/Gorilla-Lab-SCUT/PaDT
Summary updated