Abstract
Open-vocabulary semantic segmentation (OVSS) leverages vision-language models like CLIP to identify unseen categories at the pixel level. However, CLIP’s inherent design for image-level classification results in spatially coarse attention maps. We introduce the Attention Refinement Module (ARM), a lightweight, "train once, use anywhere" module that adaptively fuses CLIP’s hierarchical features. ARM acts as a universal plug-and-play post-processor, significantly boosting the accuracy of training-free segmentation methods with negligible computational cost. Experimental results demonstrate that ARM consistently improves performance across various benchmarks and baseline architectures.
Introduction
The primary challenge in Open-vocabulary Semantic Segmentation (OVSS) is achieving high-precision pixel labeling for categories not present during training. While CLIP provides a robust foundation for zero-shot classification, its internal representations lack the fine-grained spatial detail necessary for sharp segmentation boundaries.
Existing solutions typically follow two paradigms: utilizing heavy external Vision Foundation Models (VFMs) like SAM or DINO for boundary refinement, or employing hand-crafted static rules to mine internal CLIP features. The former is computationally expensive, while the latter often fails to capture complex object details. ARM identifies a middle path: a learnable, lightweight module that extracts high-resolution spatial information directly from CLIP’s early layers and aligns it with deep semantic features.
Methodology
The Attention Refinement Module (ARM) is designed to bridge the gap between shallow spatial details and deep semantic information within CLIP’s Vision Transformer (ViT) architecture.
Architectural Components
- Hierarchical Feature Extraction: ARM extracts features from intermediate layers (e.g., layers 3 and 7) which contain rich spatial textures, alongside the final layer which provides robust semantic context.
- Semantically-guided Cross-Attention: This core component uses deep semantic information as Keys and Values to refine the detail-rich shallow features (Queries), effectively filtering out noise while preserving boundaries.
- Spatial Consistency Self-Attention: Following cross-attention, a self-attention layer ensures that the refined features maintain spatial coherence across the image.
- Scale Blocks: A series of transposed convolutions upsample the refined features back to the original image resolution, producing high-fidelity refinement maps.
The "Train Once" Paradigm
Unlike traditional decoders that require task-specific fine-tuning, ARM is trained once on a general dataset (COCO-Stuff) and then frozen. Its compact design allows it to be integrated into various training-free frameworks, such as SCLIP or CLIPer, as a zero-shot enhancement tool.
Key Results and Discussion
ARM demonstrates significant performance gains across multiple benchmarks, including PASCAL VOC, PASCAL Context, and ADE20K. By moving from static fusion to adaptive, learnable refinement, ARM unlocks the latent spatial potential within CLIP.
Performance and Efficiency
- mIoU Improvements: When integrated with the SCLIP baseline on ViT-B/16, ARM improved mean Intersection over Union (mIoU) from 44.8% to 53.7%. Paired with CLIPer, it achieved a state-of-the-art 55.0% mIoU on standard benchmarks.
- Computational Overhead: ARM adds only 10–20ms of latency per image, maintaining a total inference time of 50-80ms on an NVIDIA Tesla V100. This is significantly faster than methods relying on large external foundation models.
- Cross-Framework Generality: The module shows robust generalization; an ARM trained on one architecture (e.g., ViT-B/16) consistently improves results when applied to others (e.g., ViT-L/14), proving its utility as a general-purpose refinement tool.
Conclusion
The Attention Refinement Module (ARM) provides an efficient and effective solution for the spatial limitations of CLIP in semantic segmentation. By adaptively mining internal features, ARM achieves sharp boundaries and high semantic accuracy without the need for heavy external models. While performance on extremely dense datasets like ADE-150 suggests room for scaling, ARM’s plug-and-play nature makes it a highly practical addition to the OVSS toolkit.
Summary updated