Abstract
The integration of visual inputs with large language models (LLMs) has led to remarkable advancements in multi-modal capabilities, giving rise to visual large language models (VLLMs). However, effectively harnessing VLLMs for intricate visual perception tasks remains a challenge. In this paper, we present a novel end-to-end framework named PerceptionGPT, which efficiently and effectively equips the VLLMs with visual perception abilities by leveraging the representation power of LLMs' token embedding. Our proposed method treats the token embedding of the LLM as the carrier of spatial information, then leverage lightweight visual task encoders and decoders to perform visual perception tasks (e.g., detection, segmentation). Our approach significantly alleviates the training difficulty suffered by previous approaches that formulate the visual outputs as discrete tokens, and enables achieving superior performance with fewer trainable parameters, less training data and shorted training time. Moreover, as only one token embedding is required to decode the visual outputs, the resulting sequence length during inference is significantly reduced. Consequently, our approach enables accurate and flexible representations, seamless integration of visual perception tasks, and efficient handling of a multiple of visual outputs. We validate the effectiveness and efficiency of our approach through extensive experiments. The results demonstrate significant improvements over previous methods with much fewer trainable parameters and GPU hours, which facilitates future research in enabling LLMs with visual perception abilities.
Introduction
While Vision-Language Models (VLLMs) excel at describing images, equipping them with "perception"—the ability to pinpoint objects via bounding boxes or segmentation masks—remains a significant hurdle. Existing approaches typically rely on two-stage models that use external experts, making the LLM a mere orchestrator, or discrete-token models that represent coordinates as text-like tokens (e.g., [bin_42, bin_12]). The latter often suffers from sequence bloat, quantization errors, and difficult training dynamics due to the non-natural linguistic patterns of numerical tokens.
PerceptionGPT addresses these inefficiencies by treating visual signals as continuous data points mapped directly into the LLM's internal embedding space, allowing for a more integrated and efficient visual reasoner.
Methodology
The core innovation of PerceptionGPT is the <vis> token. Instead of outputting a string of discrete coordinate tokens, the LLM generates a special placeholder token whose high-dimensional embedding carries the spatial information of the visual object.
Continuous Representation and Lightweight Modules
To facilitate this, the framework attaches small, task-specific modules to the LLM:
- Perception Encoder: Maps physical boxes or masks into embeddings the LLM can process as input.
- Perception Decoder: Uses MLPs for bounding boxes and a small Transformer/ResNet for masks to reconstruct visual signals from the LLM's output embedding.
- Adaptive Layer Fusion: Unlike standard VLLMs that use only the final layer of the Vision Transformer (ViT), PerceptionGPT learns an adaptive weighting to fuse features from all ViT layers, capturing both high-level semantics and fine-grained spatial details.
Training is conducted using a combination of standard Language Modeling loss and task-specific losses (GIoU for boxes, DICE for masks). The model can be effectively fine-tuned using Low-Rank Adaptation (LoRA), updating only about 4% of the total parameters.
Key Results and Qualitative Analysis
PerceptionGPT demonstrates state-of-the-art (SOTA) performance across several benchmarks, including Referring Expression Comprehension (REC) and Segmentation (RES). Notably, PerceptionGPT-13B achieved 89.17% accuracy on the RefCOCO validation set, outperforming previous models like Shikra while being significantly more parameter-efficient.
Efficiency and Reasoning Synergy
One of the model's primary advantages is inference speed. By reducing a segmentation mask from dozens of tokens to just one, PerceptionGPT is roughly 280x faster than numerical token methods in a 7B parameter setup. Furthermore, the model exhibits "reasoning segmentation," where it can correctly identify and segment objects based on complex semantic queries, such as "the food with the most protein," showing a deep synergy between the LLM's knowledge and its perception abilities.
Conclusion
PerceptionGPT provides a novel and efficient framework for integrating visual perception into LLMs. By leveraging continuous embeddings rather than discrete tokens, it achieves superior performance with fewer trainable parameters and significantly reduced inference latency. Future work may expand this framework to include additional tasks such as depth estimation or human pose estimation.
Summary updated