Understanding Fine-tuning CLIP for Open-vocabulary Semantic Segmentation in Hyperbolic Space

Zelin Peng, Zhengqin Xu, Zhilin Zeng, Changsong Wen, Yu Huang, Menglin Yang, Feilong Tang, Wei Shen

Contrastive Language-Image Pre-training (CLIP) has revolutionized vision-language tasks by learning robust image-level representations. However, extending CLIP to dense prediction tasks like semantic segmentation remains challenging. Semantic segmentation requires pixel-level precision, whereas CLIP was trained on global image-text pairs. This paper, presented at CVPR 2024, introduces HyperCLIP, a novel framework that reinterprets semantic segmentation as a hierarchical alignment problem within hyperbolic space.

The Challenge of Granularity

Standard fine-tuning of CLIP for segmentation often involves updating both image and text encoders to bridge the gap between image-level descriptions and pixel-level masks. The authors argue that this transition is fundamentally a shift in hierarchical granularity. Euclidean geometry, commonly used in deep learning, struggles to represent these hierarchical relationships efficiently.

Hierarchical alignment in the Poincaré ball model of hyperbolic space, where radius represents granularity.

In hyperbolic space—specifically the Poincaré ball model—the volume grows exponentially with the radius. This property makes it ideal for representing hierarchies:

  • Large Radius (Edge): Corresponds to high-level, global information (e.g., image-level embeddings).
  • Small Radius (Center): Corresponds to low-level, local information (e.g., pixel-level embeddings).

Methodology: HyperCLIP

HyperCLIP introduces a "Hyperbolic Radius Adjustment" strategy to align text embeddings with pixel-level features. Instead of full fine-tuning, the method employs parameter-efficient scaling.

The HyperCLIP architecture utilizing Möbius matrix multiplication and block-diagonal scaling matrices to adjust hyperbolic radius.

The process involves:

  1. Projection: Mapping CLIP’s Euclidean embeddings into hyperbolic space via an exponential map.
  2. Scaling: Using learnable block-diagonal scaling matrices ($S$) and Möbius matrix multiplication to scale the hyperbolic radius.
  3. Alignment: The model learns to "pull" text embeddings from the edge toward the center, matching the granularity of pixel features.
  4. Efficiency: This approach tunes only 4% of CLIP’s parameters (~5.6M for ViT-B/16), preserving its open-vocabulary knowledge while adapting to dense tasks.

Experimental Results

The authors evaluated HyperCLIP across several benchmarks, including COCO-Stuff, ADE20K, and PASCAL-Context.

  • State-of-the-Art Performance: On ADE20K (A-847), HyperCLIP achieved 12.3 mIoU, surpassing previous methods like CAT-Seg (12.0) and SAN (10.1).
  • Generalization: On the PASCAL-Context (PC-459) dataset, it reached 19.2 mIoU, a significant improvement over SAN’s 12.6.
  • Efficiency: With only 5.6M learnable parameters, HyperCLIP is far more lightweight than competitors like OVSeg (147.2M) or CAT-Seg (39.5M).

A key observation was that successful fine-tuning consistently leads to a decrease in the hyperbolic radius of text embeddings, confirming that "learning to segment" is geometrically equivalent to moving toward the center of the hierarchy.

Conclusion

HyperCLIP provides a compelling geometric explanation for the success of fine-tuning in dense vision tasks. By treating granularity as a hyperbolic radius, it offers a parameter-efficient way to adapt large-scale vision-language models. While the current model uses a fixed curvature, future work may explore learnable curvature or applying this hierarchical adjustment to other domains like 3D point clouds or video understanding.

Summary updated

BibTeX
@inproceedings{peng2025understanding,
  author = {Zelin Peng and Zhengqin Xu and Zhilin Zeng and Changsong Wen and Yu Huang and Menglin Yang and Feilong Tang and Wei Shen},
  title = {{Understanding Fine-tuning CLIP for Open-vocabulary Semantic Segmentation in Hyperbolic Space}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.00430},
}
Figure