Side Adapter Network for Open-Vocabulary Semantic Segmentation

Mengde Xu, Zheng Zhang, Fangyun Wei, Han Hu, Xiang Bai

TL;DR

The Side Adapter Network (SAN) is a lightweight framework that enables open-vocabulary semantic segmentation by attaching a small, trainable "side" network to a frozen CLIP model. By decoupling mask prediction from mask recognition and using a clever attention-biasing mechanism, SAN achieves state-of-the-art accuracy while being up to 19 times faster and using 18 times fewer trainable parameters than previous methods.

What Problem Does This Paper Address?

Semantic segmentation—the task of assigning a category label to every pixel in an image—traditionally relies on fixed datasets with a limited number of classes (e.g., the 80 categories in COCO). Open-vocabulary semantic segmentation aims to break this limit, allowing models to segment any object described by text, even those never seen during training.

Recent attempts leverage powerful vision-language models like CLIP. However, they face a "granularity gap": CLIP is trained on whole images, while segmentation requires pixel-level precision. Existing solutions are often:

  1. Two-stage and slow: Generating mask proposals first, then cropping and feeding each one into CLIP separately.
  2. Heavy: Fine-tuning the entire CLIP model, which is computationally expensive and often destroys CLIP’s original "open-vocabulary" knowledge.

Methods

The authors introduce the Side Adapter Network (SAN), which treats segmentation as a region recognition problem without modifying the underlying CLIP model.

Figure 2. Overview of our SAN. The red dotted lines indicate the gradient flow during training. In our framework, the frozen CLIP model still serves as a classifier, and the side adapter network gen- erates mask proposals and attention bias to guide the deeper layers of the CLIP model to predict proposal-wise classification logits. During inference, the mask proposals and the proposal logits are combined to get final predictions through Matmul.

Key Components:

  • Frozen CLIP Model: The pre-trained CLIP remains untouched, preserving its vast knowledge of visual concepts.
  • Side Adapter Network (SAN): A lightweight Vision Transformer (ViT) that runs alongside CLIP. It takes the image and a set of learnable "query tokens" to produce two things:
  • Mask Proposals: Predicted regions that might contain objects.
  • Attention Biases: These are injected into CLIP’s deeper self-attention layers to guide CLIP’s focus toward the predicted mask regions for classification.
  • Feature Fusion: SAN reuses features from CLIP’s shallow layers, allowing the side network to stay very small (only ~8M parameters).
  • Asymmetric Resolution: To balance speed and accuracy, SAN processes high-resolution images (needed for sharp masks), while the frozen CLIP processes low-resolution versions (which it was originally trained on).
Figure 3. The architecture of the side adapter network. The side adapter network projects the input image to visual tokens and appends query tokens to them at the beginning. Further, it fuses the immediate features of the CLIP model in the middle of transformer layers. The query and visual features are encoded with MLP layers to generate the attention biases and the mask proposals.

Datasets

The model is trained exclusively on the COCO Stuff dataset (171 classes). To test its "open-vocabulary" capabilities, it is evaluated on several benchmarks with categories not seen during training:

  • ADE20K-150 and ADE20K-847 (a massive 847-class challenge).
  • Pascal Context-59 and Pascal Context-459.
  • Pascal VOC.

The authors also provide a similarity analysis between these datasets and COCO Stuff to quantify how "cross-domain" the evaluation truly is.

Key Insights and Ideas

  • Decoupled Design: The authors found that the best region for predicting a mask isn't always the best region for CLIP to recognize it. By having separate branches for masks and attention biases, the model can optimize both tasks independently.
  • CLIP-Aware Proposals: Because the side network is trained end-to-end with the frozen CLIP, the mask proposals it generates are naturally tailored to what CLIP is good at recognizing.
  • The Power of "Side-Tuning": Instead of fine-tuning a giant model, adding a tiny "sidecar" network is enough to adapt a general-purpose model to a specialized task like segmentation without losing generalization.
Figure 5. Design choice of mask prediction head. (a) Two-stage training with single head and blocking gradients from CLIP. (b) End-to-end training with single head (c) End-to-end training with decoupled head. The red dotted line indicates the gradient flow during training.

Key Results

SAN sets a new bar for efficiency and performance in the field:

  • Speed & Efficiency: It uses only 8.4M trainable parameters (vs. 147M for OvSeg) and runs at 15.2 FPS (vs. 0.8 FPS for SimSeg/OvSeg).
  • Accuracy: On the challenging ADE20K-847 dataset, SAN achieved 12.4 mIoU, significantly outperforming previous leaders like MaskCLIP (8.2 mIoU).
  • Generalization: Even when tested on ImageNet categories (Figure 1), the model successfully segments a vast array of niche animals and objects using only text prompts.

Limitations and Future Work

  • Fine-grained Distinctions: Qualitative analysis showed the model sometimes struggles with very similar categories, such as distinguishing between a "signboard" and an "advertisement."
  • Feature Fusion: The current feature fusion method is simple (element-wise addition). The authors suggest that more sophisticated fusion architectures could further boost performance.
  • Vocabulary Sensitivity: Like most CLIP-based models, performance can vary based on the quality of the text prompts used during inference.

Summary updated

BibTeX
@inproceedings{xu2023side,
  author = {Mengde Xu and Zheng Zhang and Fangyun Wei and Han Hu and Xiang Bai},
  title = {{Side Adapter Network for Open-Vocabulary Semantic Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
}
Figure