Skip to main content
QUICK REVIEW

[논문 리뷰] LPT: Long-tailed Prompt Tuning for Image Classification

Bowen Dong, Pan Zhou|arXiv (Cornell University)|2022. 10. 03.
Domain Adaptation and Few-Shot LearningComputer Science인용 수 19
한 줄 요약

LPT는 사전 학습된 시각 모델을 동결하고 작은 수의 학습 가능한 프롬프트만 미세조정하는 장수분포 이미지 분류를 위한 프롬프트 튜닝 방법을 제안한다. 도메인 적응을 위한 공유 프롬프트와 세분화된 식별을 위한 그룹별 프롬프트를 사용하는 이중 단계 학습 방식을 통해, 약 1.1%의 추가 학습 가능한 파rameter만으로 최신 기술 수준의 성능을 달성하며 도메인 이동에 대한 강건성도 향상시킨다.

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.

연구 동기 및 목표

  • 장수분포 이미지 분류에서 전체 미세조정의 높은 계산 비용과 일반화 능력 저하 문제를 해결한다.
  • 전체 모델 대신 몇 개의 학습 가능한 프롬프트만 저장함으로써 구현 비용을 낮춘다.
  • 동결된 사전 학습된 모델의 일반화 능력을 유지함으로써 도메인 이동에 대한 모델의 강건성을 향상시킨다.
  • 특징 추출기나 분류기의 재학습 없이도 장수분포 데이터에 효과적으로 적응할 수 있도록 한다.
  • 유사한 샘플 간의 공통 특징을 포착하는 그룹별 프롬프트를 통해 세분화된 식별 능력을 향상시킨다.

제안 방법

  • 공유 프롬프트(일반적인 도메인 적응용)와 그룹별 프롬프트(세분화된 특징 학습용)라는 두 가지 유형의 학습 가능한 프롬프트를 도입한다.
  • 이중 단계 학습 프레임워크를 적용한다: 첫 번째 단계에서는 장수분포 데이터에서 공유 프롬프트와 분류기를 최적화하고, 두 번째 단계에서는 학습된 공유 프롬프트를 쿼리로 사용해 관련된 그룹별 프롬프트를 선택한다.
  • 입력마다 클래스 토큰(쿼리)와 그룹별 프롬프트 세트의 키 간의 코사인 유사도를 사용해 가장 관련성이 높은 프롬프트를 식별한다.
  • 두 번째 단계에서는 이중 샘플링 전략과 비대칭 가우시안 클라우드 로짓(A-GCL) 손실을 사용해 그룹별 프롬프트를 최적화한다.
  • 사전 학습된 모델을 동결하고 프롬프트만 미세조정함으로써 훈련 및 구현 비용을 크게 감소시킨다.
  • 분리된 학습을 적용한다: 첫 번째 단계는 공유 프롬프트와 분류기를 학습하고, 두 번째 단계는 공유 프롬프트를 고정하고 오직 그룹별 프롬프트만 최적화한다.

실험 결과

연구 질문

  • RQ1소수의 학습 가능한 파rameter로 구성된 프롬프트 튜닝이 동결된 사전 학습된 모델을 장수분포 이미지 분류에 효과적으로 적응시킬 수 있는가?
  • RQ2공유 프롬프트와 그룹별 프롬프트를 분리함으로써 전체 미세조정 대비 성능과 일반화 능력이 향상되는가?
  • RQ31단계 모델을 쿼리 기능으로 사용하는 것과 사전 학습된 ViT를 쿼리로 사용하는 것의 성능 차이는 어떻게 되는가?
  • RQ4정확도와 강건성 측면에서 그룹별 프롬프트의 최적의 그룹 크기는 무엇인가?
  • RQ5전체 미세조정 대비 LPT는 도메인 이동 상황에서 얼마나 더 우수한 일반화 능력을 보이는가?

주요 결과

  • ViT-B를 사용할 때 iNaturalist 2018에서 전체 정확도 50.07%를 기록하여 전체 미세조정 방법을 초월하고 새로운 최신 기술 수준을 수립했다.
  • 약 1.1%의 추가 학습 가능한 파rameter만으로도 LPT는 여러 벤치마크에서 이전의 전체 미세조정 방법을 능가하거나 동등하게 성능을 내었다.
  • 1단계 모델을 쿼리 기능으로 사용할 경우 K-NN 정확도는 36.16%로 향상되고, 2단계 정확도는 50.07%로 상승하여 사전 학습된 ViT-B를 쿼리로 사용하는 것보다 성능이 뛰어났다.
  • 분리된 학습(각각 40+40 에포크)은 50.07%의 정확도를 달성하여 공동 학습(80 에포크)보다 2.59% 높은 성능을 보이며 고정된 최적의 쿼리의 이점을 입증했다.
  • 모델은 도메인 이동에 강건하여, 테스트 데이터 분포가 훈련 데이터와 다를 경우에도 강력한 일반화 능력을 보였다.
  • 프롬프트 매칭 분석 결과, 상위 2개의 매칭 프롬프트가 클래스당 대부분의 샘플을 커버함을 확인하여, 적응형이고 효과적인 프롬프트 선택이 이루어졌음을 확인했다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.