Abstract
Current visual grounding models face significant computational bottlenecks due to the quadratic scaling of Transformer Encoders during multi-modal fusion. This paper introduces EEVG (Efficient and Effective Visual Grounding), a framework that replaces the standard Encoder with a Decoder-based architecture to achieve linear scaling relative to text length. By incorporating dynamic background token elimination and a lightweight MLP-based mask head, EEVG achieves state-of-the-art accuracy and superior inference speeds, particularly on complex, long-form language prompts.
Introduction
Multi-Task Visual Grounding (MTVG) is a critical computer vision challenge that requires a model to locate specific objects within an image based on natural language descriptions. This typically involves two concurrent sub-tasks: Referring Expression Comprehension (REC), which outputs a bounding box, and Referring Expression Segmentation (RES), which generates a pixel-level mask.
Existing state-of-the-art models generally utilize a Transformer Encoder to fuse image and text features. However, the self-attention mechanism in these Encoders scales quadratically—$O((N+L)^2)$, where $N$ represents image tokens and $L$ represents text tokens. As researchers move toward higher-resolution images and longer, LLM-generated text prompts, this computational cost becomes prohibitive. Furthermore, because visual grounding typically focuses on a single target, the majority of image tokens represent irrelevant background noise that consumes compute and potentially degrades model focus.
Methodology
The EEVG framework addresses these efficiency and redundancy issues through three primary architectural innovations:
1. Decoder-Only Cross-Modal Fusion
Instead of the symmetric fusion found in standard Encoders, EEVG employs a Transformer Decoder. In this setup, visual tokens serve as the "queries," while linguistic tokens act as the "memory" (keys and values). This architectural shift changes the cross-attention complexity to $O(NLC)$. Consequently, the computational cost scales linearly with text length, making the model significantly more robust to long-form descriptions.
2. Parameter-Free Token Elimination
To mitigate the processing of redundant background data, EEVG dynamically prunes visual tokens. The model calculates attention scores between a learnable "location token" and all visual tokens; those with low scores are discarded. To ensure that parts of the target object are not accidentally removed, the authors implement "Adaptive Spatial Attention." This step applies a local averaging filter to smooth attention scores, ensuring the structural integrity of the target object remains intact during the pruning process.
3. Efficient Mask Head
Traditional RES models rely on heavy Feature Pyramid Networks (FPN) to reconstruct masks from a 2D grid of tokens. Since EEVG operates on a sparse set of surviving 1D tokens, the authors replaced the FPN with a lightweight 2-layer MLP. This MLP projects sparse tokens directly into local 2D patch masks, with eliminated background areas padded with zeros. This shift drastically reduces parameter count and inference latency.
Experimental Results
Performance and Efficiency
EEVG was evaluated against standard benchmarks including RefCOCO, RefCOCO+, and RefCOCOg. The model demonstrated significant improvements in both speed and accuracy:
- Inference Speed: EEVG achieved 80.53 FPS on an NVIDIA RTX 4090, representing a 28.19% speedup over the previous state-of-the-art, PolyFormer (62.82 FPS).
- Accuracy: The model outperformed existing SOTA benchmarks in both REC and RES. The gains were most pronounced on the RefCOCOg dataset, which features the longest and most complex language expressions, showing a 3.93% improvement in RES performance.
- Hardware Efficiency: The MLP-based mask head requires only 0.79M parameters and 0.87ms of execution time, compared to the 8.11M parameters and 23.56ms required by a standard FPN.
Datasets
Pre-training was conducted on a diverse corpus including Visual Genome, RefCOCO/+/g, and Flickr30k. The model also showed strong performance on the Generalized Referring Expression Segmentation (GRES) benchmark, which includes challenging cases where the text may refer to multiple objects or no objects at all.
Discussion and Future Work
The success of EEVG suggests that asymmetric fusion—treating text as a knowledge base for image queries—is more efficient for grounding tasks than symmetric encoder-based fusion. Furthermore, the results indicate that background pruning does more than just save compute; it acts as a form of denoising that improves segmentation accuracy by removing distracting features.
While the model relies on hyperparameters for token elimination (threshold $\alpha$ and window size $k$) that may require tuning for specialized domains, its linear scaling with text length provides a clear path forward for integrating visual grounding into real-time, conversation-based AI systems powered by Large Language Models.
Summary updated