Skip to main content
QUICK REVIEW

[Paper Review] LPT: Long-tailed Prompt Tuning for Image Classification

Bowen Dong, Pan Zhou|arXiv (Cornell University)|Oct 3, 2022
Domain Adaptation and Few-Shot LearningComputer Science19 citations
TL;DR

LPT proposes a prompt tuning method for long-tailed image classification that freezes a pretrained vision model and only fine-tunes a small set of learnable prompts. It uses a two-phase training scheme with a shared prompt for domain adaptation and group-specific prompts for fine-grained discrimination, achieving state-of-the-art performance with only ~1.1% additional trainable parameters and improved robustness to domain shift.

ABSTRACT

For long-tailed classification, most works often pretrain a big model on a large-scale dataset, and then fine-tune the whole model for adapting to long-tailed data. Though promising, fine-tuning the whole pretrained model tends to suffer from high cost in computation and deployment of different models for different tasks, as well as weakened generalization ability for overfitting to certain features of long-tailed data. To alleviate these issues, we propose an effective Long-tailed Prompt Tuning method for long-tailed classification. LPT introduces several trainable prompts into a frozen pretrained model to adapt it to long-tailed data. For better effectiveness, we divide prompts into two groups: 1) a shared prompt for the whole long-tailed dataset to learn general features and to adapt a pretrained model into target domain; and 2) group-specific prompts to gather group-specific features for the samples which have similar features and also to empower the pretrained model with discrimination ability. Then we design a two-phase training paradigm to learn these prompts. In phase 1, we train the shared prompt via supervised prompt tuning to adapt a pretrained model to the desired long-tailed domain. In phase 2, we use the learnt shared prompt as query to select a small best matched set for a group of similar samples from the group-specific prompt set to dig the common features of these similar samples, then optimize these prompts with dual sampling strategy and asymmetric GCL loss. By only fine-tuning a few prompts while fixing the pretrained model, LPT can reduce training and deployment cost by storing a few prompts, and enjoys a strong generalization ability of the pretrained model. Experiments show that on various long-tailed benchmarks, with only ~1.1% extra parameters, LPT achieves comparable performance than previous whole model fine-tuning methods, and is more robust to domain-shift.

Motivation & Objective

  • Address the high computational cost and reduced generalization of full fine-tuning in long-tailed image classification.
  • Reduce deployment cost by storing only a few trainable prompts instead of entire models.
  • Improve model robustness to domain shift by preserving the generalization capacity of the frozen pretrained model.
  • Enable effective adaptation to long-tailed data without retraining feature extractors or classifiers from scratch.
  • Enhance fine-grained discrimination through group-specific prompts that capture shared features among similar samples.

Proposed method

  • Introduces two types of trainable prompts: a shared prompt for general domain adaptation and group-specific prompts for fine-grained feature learning.
  • Employs a two-phase training paradigm: first, optimize the shared prompt and classifier on long-tailed data; second, use the learned shared prompt as a query to select relevant group-specific prompts.
  • Uses cosine similarity between the class token (query) and keys from the group-specific prompt set to identify the most relevant prompts for each input.
  • Applies a dual sampling strategy and asymmetric Gaussian Clouded Logit (A-GCL) loss in phase two to optimize group-specific prompts.
  • Fixes the pretrained model and only fine-tunes the prompts, drastically reducing training and deployment costs.
  • Uses decoupled training: phase one trains the shared prompt and classifier, while phase two fixes the shared prompt and optimizes only the group-specific prompts.

Experimental results

Research questions

  • RQ1Can prompt tuning with a small number of learnable parameters effectively adapt a frozen pretrained model to long-tailed image classification?
  • RQ2Does separating shared and group-specific prompts improve performance and generalization compared to full fine-tuning?
  • RQ3How does using the first-phase model as a query function compare to using a pretrained ViT for prompt matching?
  • RQ4What is the optimal group size for group-specific prompts in terms of accuracy and robustness?
  • RQ5To what extent does LPT improve generalization under domain shift compared to full fine-tuning?

Key findings

  • LPT achieves 50.07% overall accuracy on iNaturalist 2018 with ViT-B, surpassing full fine-tuning methods and setting a new state of the art.
  • With only ~1.1% additional trainable parameters, LPT outperforms or matches previous full fine-tuning methods across multiple benchmarks.
  • Using the phase-one model as a query function improves K-NN accuracy to 36.16% and boosts phase-two accuracy to 50.07%, outperforming the use of a pretrained ViT-B as query.
  • Decoupled training (40+40 epochs) achieves 50.07% accuracy, outperforming joint training (80 epochs) by 2.59%, demonstrating the benefit of fixed optimal queries.
  • The method is robust to domain shift, showing strong generalization even when test data distribution differs from training.
  • Prompt matching analysis shows that top-2 matched prompts cover the majority of samples per class, confirming adaptive and effective prompt selection.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.