NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Enhancing Features in Long-tailed Data Using Large Vision Model

Pengxiao Han, Changkun Ye, Jinguang Tong, Cuicui Jiang, Jie Hong, Li Fang, Xuesong LiarXiv 2025

TL;DR

This paper introduces a novel approach to long-tailed image recognition by leveraging the rich visual priors of a Large Vision Model (LVM)—specifically the Segment Anything Model (SAM)—without relying on any external text or linguistic data. By fusing SAM-extracted features into both the feature map and latent spaces of a standard backbone network and applying a tailored prototype-based loss function, the method significantly boosts classification accuracy, particularly for rare "tail" classes.

What Problem Does This Paper Address?

In the real world, data is rarely neatly balanced. Whether you are identifying rare species in the wild or spotting uncommon pathologies in medical imaging, datasets routinely exhibit a "long-tailed" distribution. A few "head" classes have thousands of examples, while hundreds of "tail" classes might only have a handful. Standard neural networks naturally bias toward the dominant head classes, leading to abysmal performance on the rare tail classes.

Recently, researchers have turned to massive foundation models like CLIP or LLMs to bridge this gap by injecting text-based semantic knowledge. However, language descriptions aren't always available, practical, or applicable to every computer vision task. This paper tackles the challenge of long-tailed recognition using purely visual foundation models, extracting spatial and semantic features from an LVM to guide a smaller backbone network.

Methods

The authors propose a dual-pronged approach consisting of a Feature Augmentation Framework and a custom Prototype-based Loss Function.

1. Feature Augmentation via SAM

Instead of fine-tuning a massive model, the authors keep the Segment Anything Model (SAM) frozen and use it as a robust feature extractor. They integrate these features into a standard CNN backbone (like ResNet-50) in two distinct ways:

  • SAM Map Feature Fusion: The spatial feature map from SAM is compressed using Principal Component Analysis (PCA) to a single channel, acting as a spatial mask. This mask undergoes a $1\times1$ convolution and is element-wise multiplied and added to the intermediate feature maps of the backbone network, forcing the model to focus on critical object regions.
  • SAM Latent Feature Fusion: The SAM features are average-pooled into a latent vector, concatenated with the backbone's final latent vector, and passed through a self-attention mechanism and a fully connected layer. This output is combined with the backbone's original logits to make the final prediction.

The complete architecture illustrating these two fusion mechanisms is shown below:

Fig. 2. Framework of the proposed method illustrating two feature augmentation methods: feature map fusion and latent feature vector fusion. The extracted feature map from SAM undergoes 1 × 1 convolution and is fused with the backbone feature map via element-wise multiplication and addition. Subsequently, the extracted feature latent from SAM is fused with the feature embedding of the backbone after average pooling.

2. Prototype-Based Loss

To maximize the utility of these augmented features, the authors design a loss function ($\mathcal{L}_{proto}$) that treats head and tail classes differently based on class prototypes (representative center vectors tracked via a dynamic memory bank):

  • Head Loss ($\mathcal{L}_{head}$): Encourages head-class features to cluster tightly around their respective prototypes, exploiting the rich information available for well-represented classes.
  • Tail-std Loss ($\mathcal{L}_{tail-std}$): Introduces a stochastic perturbation to tail class centers during training, acting as a regularizer to prevent the model from overfitting to the few available tail samples.
  • Tail-dist Loss ($\mathcal{L}_{tail-dist}$): Uses a negative logarithmic distance to push tail features away from the prototype, intentionally enriching the feature diversity of under-represented classes.

The conceptual mechanics of this loss function are illustrated here:

Fig. 4. Illustration of the proposed prototype-based loss. The figure consists of three loss components: Lhead, Ltail-std and Ltail-logdist. The head loss, Lhead (black arrows), encourages comparison clustering around the class prototype for head classes. For tail classes, Ltail-std (orange arrow) minimizes the distance between features and the prototype, while Ltail-logdist (blue arrow) enhances diversity by pushing features away from the prototype.

Datasets

The approach was rigorously evaluated on two standard long-tailed benchmarks:

  • ImageNet-LT: A long-tailed version of the classic ImageNet dataset, containing 1,000 categories and 186,389 images, with class frequencies ranging drastically from 5 to 1,280 images.
  • iNaturalist2018: A massive, naturally imbalanced real-world dataset for species identification, featuring 8,142 species across 437,513 images.

Key Insights and Ideas

  • Visual-Only Priors Suffice: You don't need language models to improve long-tailed recognition. The structural and object-boundary knowledge embedded within a frozen LVM like SAM provides an excellent geometric and semantic foundation for data-starved tail classes.
  • Exploitation vs. Exploration in Loss Space: A uniform loss strategy doesn't work for long-tailed data. Head classes benefit from exploitation (tight clustering), while tail classes require exploration (stochastic perturbation and variance expansion) to prevent the network from drawing overly rigid decision boundaries around limited data.
  • Framework Dependency: Simply using SAM features directly for classification yields terrible results (only 4.10% accuracy on ImageNet-LT). The performance gains rely entirely on the dual-space fusion architecture and the joint optimization framework.

Key Results

The proposed method consistently improved performance across all baselines and datasets:

  • ImageNet-LT: When added to a standard Cross-Entropy (CE) baseline, the method boosted overall accuracy from 41.6% to 46.9%. When paired with a stronger baseline like Label Shift, it achieved 52.4% accuracy. Crucially, the few-shot (tail) class accuracy for the Label Shift baseline skyrocketed from 18.3% to 31.8%—a massive 13.5% absolute improvement.
  • iNaturalist2018: The method elevated the standard CE baseline from 65.0% to 67.0% and pushed the Label Shift baseline to a top-performing 72.7% overall accuracy.

Limitations and Future Work

While the paper demonstrates impressive accuracy gains, it does not deeply discuss the computational overhead. Running images through a large ViT-based model like SAM to extract features adds inference and preprocessing costs, even if SAM remains frozen.

Future work could explore distilling these LVM visual priors directly into the student backbone network to eliminate the need to run the large vision model at inference time, or evaluating how this framework scales with newer, even larger visual foundation models.

Summary updated

BibTeX
@misc{han2025enhancing,
  author = {Pengxiao Han and Changkun Ye and Jinguang Tong and Cuicui Jiang and Jie Hong and Li Fang and Xuesong Li},
  title = {{Enhancing Features in Long-tailed Data Using Large Vision Model}},
  year = {2025},
  eprint = {2504.10852},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.10852},
}
Figure