Skip to main content
QUICK REVIEW

[논문 리뷰] How Does In-Context Learning Help Prompt Tuning?

Simeng Sun, Yang Liu|arXiv (Cornell University)|2023. 02. 22.
Topic ModelingComputer Science인용 수 9
한 줄 요약

이 논문은 맥락 내 학습(ICL), 프롬프트 튜닝(PT), 지시 프롬프트 튜닝(IPT)이 다섯 가지 텍스트 생성 과제에서 어떻게 상호 작용하는지 실증적으로 분석하고 IPT나 PT가 언제 우수한지와 전이 및 안정성이 어떻게 작용하는지 밝힙니다.

ABSTRACT

Fine-tuning large language models is becoming ever more impractical due to their rapidly-growing scale. This motivates the use of parameter-efficient adaptation methods such as prompt tuning (PT), which adds a small number of tunable embeddings to an otherwise frozen model, and in-context learning (ICL), in which demonstrations of the task are provided to the model in natural language without any additional training. Recently, Singhal et al. (2022) propose ``instruction prompt tuning'' (IPT), which combines PT with ICL by concatenating a natural language demonstration with learned prompt embeddings. While all of these methods have proven effective on different tasks, how they interact with each other remains unexplored. In this paper, we empirically study when and how in-context examples improve prompt tuning by measuring the effectiveness of ICL, PT, and IPT on five text generation tasks with multiple base language models. We observe that (1) IPT does \emph{not} always outperform PT, and in fact requires the in-context demonstration to be semantically similar to the test input to yield improvements; (2) PT is unstable and exhibits high variance, but combining PT and ICL (into IPT) consistently reduces variance across all five tasks; and (3) prompts learned for a specific source task via PT exhibit positive transfer when paired with in-context examples of a different target task. Our results offer actionable insights on choosing a suitable parameter-efficient adaptation method for a given task.

연구 동기 및 목표

  • 대규모 언어 모델의 전체 미세조정의 비현실성으로 인한 매개변수 효율적 적응 동기 부여.
  • 다양한 OOD 생성 과제에서 ICL, PT, IPT를 비교.
  • IPT가 PT보다 우수한 조건과 시연의 유사성 역할을 조사.
  • 맥락 내 시연을 사용할 때 한 작업에서 학습된 소프트 프롬프트의 다른 작업으로의 전달 가능성 조사.

제안 방법

  • BLOOM-1.1B, OPT-1.3B, GPT-2-XL-1.5B를 기반 LMs로 사용해 다섯 가지 언어 생성 과제에서 ICL, PT, IPT를 실증적으로 비교.
  • PT와 IPT에 소프트 프롬프트 임베딩을 사용하고 초기 프롬트 위에 두 개의 피드포워드 계층을 추가하여 안정성을 확보.
  • dense retrieval(최근접 이웃)으로 맥락 내 시연을 검색하고 테스트 예마다 검색된 시연 하나를 평가.
  • PT/IPT를 무작위로 초기화된 프롬프트로 학습시키고 dev 손실로 평가하며 AdamW 최적화로 세 번 실행의 평균을 보고.
  • 맥락 내 시연과 테스트 입력 간의 유사성이 IPT 대비 PT 성능에 미치는 영향을 평가.
  • 소스 작업과 대상 작업의 맥락 내 시연을 결합해 교차 작업 전이를 탐구.
Figure 1: An illustration of instruction prompt tuning (IPT). Soft tunable prompt embeddings are prepended to a retrieved in-context demonstration, which is followed by the training example. In this paper, we study the mutual effect of the soft prompts and the discrete demonstrations in instruction
Figure 1: An illustration of instruction prompt tuning (IPT). Soft tunable prompt embeddings are prepended to a retrieved in-context demonstration, which is followed by the training example. In this paper, we study the mutual effect of the soft prompts and the discrete demonstrations in instruction

실험 결과

연구 질문

  • RQ1IPT와 PT가 ICL을 능가하는 조건은 무엇인가?
  • RQ2검색된 맥락 내 시연과 테스트 입력 간의 유사성이 IPT 대 PT 성능에 어떤 영향을 미치는가?
  • RQ3IPT가 소프트 프롬프트 토큰 수와 같은 하이퍼파라미터를 조정할 때 PT의 분산을 줄이는가?
  • RQ4소스 작업에서 학습된 소프트 프롬프트가 대상 작업 시연과 함께 사용될 때 새로운 대상 작업으로 유익하게 전달될 수 있는가?
  • RQ5다섯 가지 데이터-텍스트, 논리-텍스트, 의미 파싱 작업에서 검색된 시연의 사용 효과는?

주요 결과

  • IPT와 PT 모두 ICL을 능가하여 다섯 개 과제 모두에서 훈련된 소수의 매개변수라도 오픈 도메인 작업에서 도움이 됨.
  • PT와 IPT 사이에 보편적인 승자는 없으며 성능은 작업과 구성(예: 프롬프트 임베딩 수)에 따라 달라진다.
  • 맹점은 맥락 내 시연이 테스트 입력과 매우 유사할 때 IPT가 PT를 능가한다(특히 ToTTo에서).
  • PT는 조정 가능한 매개변수 수가 늘어나면 분산이 커지는 반면 IPT는 분산을 줄이고 프롬프트 토큰 수에 덜 민감하다.
  • 소스 작업에서 학습된 소프트 프롬프트가 대상 작업 시연과 함께 사용될 때 새로운 대상 작업으로 긍정적으로 전달될 수 있어, 일부 교차 작업 설정에서 ICL을 능가한다.
  • IPT는 일반적으로 PT에 비해 더 안정적인 수렴과 하이퍼파라미터에 대한 강건성을 제공한다.
Figure 4: Cross-task evaluation of prompt tuning with (right) and without (left) a target in-context example.. Numbers better than the corresponding ICL baseline for the target task are bolded. Pairing source task embeddings with target task in-context demonstrations increases task transfer.
Figure 4: Cross-task evaluation of prompt tuning with (right) and without (left) a target in-context example.. Numbers better than the corresponding ICL baseline for the target task are bolded. Pairing source task embeddings with target task in-context demonstrations increases task transfer.

이 논문 읽기

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

누빈트에서 이 논문 읽기

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