Skip to main content
QUICK 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 Science被引用数 19
ひとこと要約

LPTは、事前学習済みの視覚モデルを固定し、学習可能なプロンプトの少数のみを微調整する、長尾画像分類のためのプロンプトチューニング手法を提案する。2段階の訓練スキームを採用し、ドメイン適応には共有プロンプトを、微細な識別にはグループ固有のプロンプトを用いる。わずか約1.1%の追加可学習パラメータで最先端の性能を達成し、ドメインシフトに対しても耐性が向上する。

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.

研究の動機と目的

  • 長尾画像分類における完全微調整の高い計算コストと一般化性能の低下を解消する。
  • 全モデルを保存するのではなく、少数の可学習プロンプトのみを保存することで、導入コストを低減する。
  • 固定された事前学習済みモデルの一般化能力を維持することで、モデルのドメインシフトに対する耐性を向上させる。
  • 特徴抽出器や分類器を再学習せずに、長尾データへの効果的適応を可能にする。
  • 類似したサンプル間の共通特徴を捉えるグループ固有のプロンプトにより、微細な識別性能を向上させる。

提案手法

  • 2種類の可学習プロンプトを導入:一般ドメイン適応用の共有プロンプトと、微細な特徴学習用のグループ固有プロンプト。
  • 2段階の訓練パラダイムを採用:第1段階では、長尾データ上で共有プロンプトと分類器を最適化する。第2段階では、学習済みの共有プロンプトをクエリとして用い、関連するグループ固有プロンプトを選択する。
  • クラストークン(クエリ)とグループ固有プロンプト群のキーとの間のコサイン類似度を用いて、各入力に対して最も関連性の高いプロンプトを特定する。
  • 第2段階では、二重サンプリング戦略と非対称ガウスクラウドロジット(A-GCL)損失を用いてグループ固有プロンプトを最適化する。
  • 事前学習済みモデルを固定し、プロンプトのみを微調整することで、訓練および導入コストを大幅に削減する。
  • 分離訓練を採用:第1段階では共有プロンプトと分類器を訓練するが、第2段階では共有プロンプトを固定し、グループ固有プロンプトのみを最適化する。

実験結果

リサーチクエスチョン

  • RQ1少数の可学習パラメータを用いたプロンプトチューニングが、固定された事前学習済みモデルを長尾画像分類に効果的に適応できるか。
  • RQ2共有プロンプトとグループ固有プロンプトを分離することで、完全微調整と比較して性能と一般化能力が向上するか。
  • RQ3第1段階のモデルをクエリ関数として使用する場合と、事前学習済みViT-Bをクエリとして使用する場合とでは、プロンプトマッチング性能に差が出るか。
  • RQ4正確性と耐性の観点から、グループ固有プロンプトの最適なグループサイズは何か。
  • RQ5完全微調整と比較して、LPTはドメインシフト下での一般化性能をどの程度向上させるか。

主な発見

  • ViT-Bを用いたiNaturalist 2018では、LPTが全体精度50.07%を達成し、完全微調整手法を上回り、新たな最先端性能を樹立した。
  • わずか約1.1%の追加可学習パラメータで、複数のベンチマークにおいて従来の完全微調整手法を上回るか同等の性能を達成した。
  • 第1段階のモデルをクエリ関数として使用することで、K-NN精度が36.16%に向上し、第2段階の精度が50.07%にまで上昇し、事前学習済みViT-Bをクエリとして使用する場合を上回った。
  • 分離訓練(40+40エポック)では50.07%の精度を達成し、共同訓練(80エポック)の2.59%上回った。これは、最適な固定クエリが有効であることを示している。
  • ドメインシフトに対しても頑健であり、テストデータの分布が学習データと異なる場合でも強力な一般化性能を示した。
  • プロンプトマッチング解析から、上位2つのマッチングプロンプトがクラスごとの大多数のサンプルをカバーしていることが確認され、適応的で効果的なプロンプト選択が実現していることが裏付けられた。

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。