NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

NExT-Chat: An LMM for Chat, Detection and Segmentation

Ao Zhang, Wei Ji, Tat-Seng Chua · DOI

Abstract

NExT-Chat introduces pix2emb, a novel paradigm that represents object locations as continuous embeddings rather than discrete text tokens. This approach allows a single Large Multimodal Model (LMM) to handle conversational chat, object detection, and image segmentation within a unified framework. By treating spatial data as continuous embeddings, NExT-Chat overcomes the inefficiency and precision loss inherent in text-based coordinate representations, achieving state-of-the-art performance in visual grounding tasks.

Introduction

While Large Multimodal Models (LMMs) like GPT-4V excel at global image interpretation, they often struggle with precise "region-level" reasoning—the ability to pinpoint or describe specific parts of an image. Existing solutions typically rely on a pix2seq approach, where spatial coordinates are converted into strings of text tokens (e.g., "[0.1, 0.2, 0.5, 0.8]"). This method suffers from three major drawbacks: extreme token inefficiency (requiring up to 26 tokens for one box), discretization errors that lose spatial precision, and an inherent difficulty in representing complex pixel-level segmentation masks using text alone.

NExT-Chat addresses these challenges by introducing a location-as-embedding approach. By treating location as a first-class embedding, the model bridges the gap between high-level language understanding and low-level spatial grounding, enabling more accurate and versatile visual interaction.

Methodology

The core innovation of NExT-Chat is the pix2emb (pixel-to-embedding) framework, which moves away from forcing the model to "speak" coordinates.

The NExT-Chat architecture featuring unified encoders and decoders for text, images, and boxes.

The architecture, based on a LLaVA-like combination of a CLIP vision encoder and the Vicuna-1.5 language model, utilizes two new special tokens: <trigger> and <loc>.

  • Location as Output: When the model identifies an object, it generates a <trigger> token. The internal hidden state of this token is passed to dedicated "heads": a Box Decoder for bounding boxes and a Mask Decoder based on the Segment Anything Model (SAM).
  • Location as Input: When a user provides a region, a Box Encoder converts the coordinates into an embedding that the model processes similarly to a standard word embedding.
  • Cycle Loss: To ensure robust spatial understanding, the authors implement a "cycle loss" during training. This forces the Box Encoder and Box Decoder to act as mathematical inverses, ensuring that encoding a box and then decoding it returns the original coordinates.

Datasets and Training

NExT-Chat was trained using a massive variety of existing datasets to ensure broad capability. Pre-training and grounding tasks utilized Flickr30K Entities, Visual Genome, RefCOCO/+/g, VQAv2, PointQA, and VCR. Instruction tuning was conducted with LLaVA-instruct and Shikra-RD. For segmentation, the model focused on the RefCOCO series. Remarkably, NExT-Chat achieved its high performance despite using a relatively small segmentation training set of 127k masks, far fewer than the millions used by some competitors.

Results and Discussion

NExT-Chat demonstrates state-of-the-art performance across multiple benchmarks, proving the efficacy of the pix2emb paradigm.

Visual demonstrations of the model's ability to locate and segment objects based on complex spatial and descriptive queries.

Key results include:

  • Object Hallucination: On the POPE-Random benchmark, it achieved 87.7% accuracy, surpassing specialized models like Shikra (86.9%).
  • Segmentation: In referring expression segmentation (RES), it reached 68.9 cIoU, outperforming the LISA model (67.9%).
  • Region Captioning: It achieved a 79.6 CIDEr score on RefCOCOg, significantly beating Kosmos-2 (62.3).

The shift from classification to regression allows for much higher spatial precision. Furthermore, the use of a single <trigger> token instead of dozens of text tokens significantly improves efficiency, leaving more room in the model's context window for actual conversation. This allows for "grounded reasoning," where the model can link language directly to spatial embeddings to solve complex queries, such as identifying a specific bear based on its relative position or attire.

Conclusion

By unifying chat, detection, and segmentation through continuous embeddings, NExT-Chat offers a more efficient and precise alternative to text-based localization. While currently focused on single-image tasks, its architecture provides a foundation for future multimodal agents capable of navigating complex environments or specialized domains like medical imaging.

Summary updated

BibTeX
@inproceedings{zhang2024next,
  author = {Ao Zhang and Wei Ji and Tat-Seng Chua},
  title = {{NExT-Chat: An LMM for Chat, Detection and Segmentation}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=ZAW37OZ6ig},
}
Figure