How Universal Are SAM2 Features?

Masoud Khairi Atani, Alon Harell, Hyomin Choi, Runyu Yang, Fabien Racapé, Ivan V. Bajic · DOI

Introduction

The computer vision landscape is increasingly defined by "foundation models"—large-scale encoders like DINOv2 or Hiera designed to serve as general-purpose backbones. However, the rise of specialized models, such as the Segment Anything Model 2 (SAM2), which is fine-tuned from Hiera for segmentation tasks, raises a critical question: is there a "specialization tax" associated with this fine-tuning? This research quantifies the trade-off in feature utility when a generalist encoder is adapted for a specific specialist task, particularly in the context of Universal Feature Coding where a single bitstream must support diverse downstream applications.

Methodology

To evaluate the latent knowledge within frozen encoders, the researchers developed a diagnostic framework centered on three key components:

  1. The "Neck" Module: A lightweight, trainable Transformer-based bridge is inserted between a frozen encoder (e.g., Hiera or SAM2) and a frozen task-specific decoder. By training only this small module, the researchers can isolate and measure the inherent information content of the encoder's features for specific tasks.
  2. Cross-Neck Analysis: This novel sequential testing method involves training a neck for one task (Task A), freezing it, and then training a second neck on top of it for a different task (Task B). This process reveals whether specializing for one task creates an irreversible informational bottleneck for others.
  3. Information-Theoretic Probing: Metrics such as Latent Mutual Information (LMI) and Mutual Information Neural Estimation (MINE) are employed to quantify the overlap between adapted features and expert baseline models, providing a deeper look than accuracy scores alone.
The diagnostic framework utilizes a trainable 'Neck' to probe the information content of frozen encoders across various vision tasks.
The sequential cross-neck analysis method measures how task-specific adaptation creates informational bottlenecks for subsequent tasks.

Experimental Setup

The study probes the encoders across three distinct visual domains:

  • Monocular Depth Estimation: Evaluated using the KITTI dataset (Eigen split).
  • Human Pose Estimation: Evaluated on MS COCO keypoint detection.
  • Image Captioning: Evaluated on the COCO Caption dataset (Karpathy split).

Results and Discussion

The experiments reveal that the "specialization tax" is a significant factor in model performance. While SAM2 excels at spatially-aligned tasks like depth estimation, it loses the broader semantic information required for tasks like image captioning and pose estimation compared to its generalist ancestor, Hiera.

Key Performance Metrics

  • Spatial Tasks: SAM2 outperformed Hiera in depth estimation, achieving a 3.07 RMSE versus Hiera’s 3.21. This suggests that segmentation fine-tuning enhances spatial alignment features.
  • Semantic and Structural Tasks: Hiera maintained a clear lead in human pose estimation (73.3 AP vs. SAM2’s 69.8 AP) and image captioning (116.8 CIDEr vs. SAM2’s 114.2 CIDEr).
  • The Bottleneck Effect: Cross-neck experiments showed that adapting for pose before depth led to a 12.2% performance drop compared to direct depth adaptation, confirming that task-specific adaptation "locks" features into representations that may be hostile to other tasks.

Insights on Model Capacity and Distillation

The research found that increasing the complexity of the "neck" could help a generalist model adapt to spatial tasks but could not recover semantic information already discarded by a specialist like SAM2. However, employing knowledge distillation during neck training—mimicking an expert model—significantly improved performance by guiding the neck toward the most relevant features within the encoder.

Conclusion

This study demonstrates that fine-tuning for specialization effectively "prunes" high-level semantic information. The findings suggest that while specialized models like SAM2 are powerful for their intended use, they may not be the optimal choice for universal feature representation. This framework provides a foundation for designing more robust encoders that balance specialization with general utility in future vision systems.

Summary updated

Abstract

The trade-off between general-purpose foundation vision models and their specialized counterparts is critical for efficient feature coding design and is not yet fully understood. We investigate this trade-off by comparing the feature versatility of the general-purpose Hiera encoder against the segmentation-specialized Segment Anything Model 2 (SAM2). Using a lightweight, trainable neck to probe the adaptability of their frozen features, we quantify the information-theoretic cost of specialization. Our results reveal that while SAM2's specialization is highly effective for spatially-related tasks like depth estimation, it comes at a cost. The specialized SAM2 encoder underperforms its generalist predecessor, Hiera, on conceptually distant tasks such as pose estimation and image captioning, demonstrating a measurable loss of broader semantic information. A novel cross-neck analysis on SAM2 reveals that each level of adaptation creates a further representational bottleneck. Our analysis illuminates these trade-offs in feature universality, providing a quantitative foundation for designing efficient feature coding and adaptation strategies for diverse downstream applications.
BibTeX
@misc{atani2025how,
  author = {Masoud Khairi Atani and Alon Harell and Hyomin Choi and Runyu Yang and Fabien Racapé and Ivan V. Bajic},
  title = {{How Universal Are SAM2 Features?}},
  year = {2025},
  eprint = {2510.17051},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.17051},
}
Figure