Skip to main content
QUICK REVIEW

[논문 리뷰] Language Models for Text Classification: Is In-Context Learning Enough?

Aleksandra Edwards, José Camacho-Collados|arXiv (Cornell University)|2024. 03. 26.
Text and Document Classification TechnologiesComputer Science인용 수 8
한 줄 요약

본 논문은 16개의 데이터셋에서 대형 언어 모델의 제로샷 및 few-shot 프롬프팅을 파인튜닝된 소형 모델과 비교하여 평가한 대규모 연구로, 파인튜닝된 소형 모델이 종종 적은 데이터로 학습한 LLM보다 더 우수하지만 프롬프트 방식은 특정 작업에서 저자원 설정에서 강점을 보임.

ABSTRACT

Recent foundational language models have shown state-of-the-art performance in many NLP tasks in zero- and few-shot settings. An advantage of these models over more standard approaches based on fine-tuning is the ability to understand instructions written in natural language (prompts), which helps them generalise better to different tasks and domains without the need for specific training data. This makes them suitable for addressing text classification problems for domains with limited amounts of annotated instances. However, existing research is limited in scale and lacks understanding of how text generation models combined with prompting techniques compare to more established methods for text classification such as fine-tuning masked language models. In this paper, we address this research gap by performing a large-scale evaluation study for 16 text classification datasets covering binary, multiclass, and multilabel problems. In particular, we compare zero- and few-shot approaches of large language models to fine-tuning smaller language models. We also analyse the results by prompt, classification type, domain, and number of labels. In general, the results show how fine-tuning smaller and more efficient language models can still outperform few-shot approaches of larger language models, which have room for improvement when it comes to text classification.

연구 동기 및 목표

  • 대형 언어 모델(LLMs)의 제로샷 및 피샷 프롬프팅이 텍스트 분류 작업에서 파인튜닝된 소형 모델과 비교해 얼마나 잘 수행되는지 평가한다.
  • 이진, 다중 클래스, 다중 라벨 작업에서 프롬프팅과 파인튜닝의 강점과 약점을 식별한다.
  • 도메인, 데이터셋 속성, 라벨 수에 따른 성능 경향을 분석하여 일반화 가능성과 한계를 이해한다.

제안 방법

  • 16개의 데이터셋에서 이진, 다중 클래스, 다중 라벨 작업을 다루며 다섯 가지 모델 유형(생성형 LLM, RoBERTa base/large, T5, Flan-T5, FastText)을 평가한다.
  • LLaMA-1, LLaMA-2, Flan-T5, GPT-3.5-Turbo의 제로샷 및 원샷 프롬프팅을 RoBERTa, T5, FastText 등의 파인튜닝 기준과 비교한다.
  • 프롬프트 스타일의 민감도를 평가하기 위해 세 가지 프롬프트 스타일(일반적, 작업별, 도메인별)을 사용한다.
  • 각 데이터셋에서 RoBERTa와 T5를 파인튜닝하고 프롬프팅 기준과 비교한다.
  • 데이터셋과 도메인 전반에 걸쳐 Micro-F1 및 Macro-F1, 그리고 잘못된 라벨 수를 보고한다.
Figure 1: Micro-F1 (left) and Macro-F1 (middle) results averaged across all datasets, comparing the performance of Flan-T5, LLaMA 1, and LLaMA 2 models for all three types of prompts, i.e., ’generic’ , ’task’ , and ’domain’ as well as the average (’AVG’) between them. ’Missing label’ (right) shows t
Figure 1: Micro-F1 (left) and Macro-F1 (middle) results averaged across all datasets, comparing the performance of Flan-T5, LLaMA 1, and LLaMA 2 models for all three types of prompts, i.e., ’generic’ , ’task’ , and ’domain’ as well as the average (’AVG’) between them. ’Missing label’ (right) shows t

실험 결과

연구 질문

  • RQ1LLM의 제로샷 및 원샷 프롬프팅 방법은 텍스트 분류 과제에서 소형 언어 모델의 파인튜닝과 어떻게 비교되는가?
  • RQ2프롬프팅 기반 접근법이 이진, 다중 클래스, 다중 라벨 분류 과제에서 파인튜닝보다 데이터 효율적인가?
  • RQ3도메인과 라벨 수가 다른 상황에서 LLM 프롬프팅과 파인튜닝의 강점과 약점은 무엇인가?
  • RQ4프롬프트 설계(일반적, 작업, 도메인)가 모델 전반의 성능과 강건성에 어떻게 영향을 미치는가?
  • RQ5도메인 특화 또는 작업 특화 데이터셋이 프롬프팅 versus 파인튜닝에서 다른 경향을 보이는가?

주요 결과

  • 파인튜닝된 소형 언어 모델(예: RoBERTa)이 텍스트 분류 과제에서 종종 더 큰 LLM의 few-shot 프롬프팅보다 우수하다.
  • 프롬프팅 모델 중에서 Flan-T5는 제로샷 및 원샷 설정에서 LLaMA 변종에 비해 더 높은 micro- 및 macro-F1을 달성하는 경향이 있다.
  • 원샷 프롬프팅은 일반적으로 성능을 향상시키고 잘못된 라벨 수를 감소시키며, Flan-T5에서 주목할 만한 이득을 보인다.
  • 다중 클래스 및 다중 라벨 작업에서 파인튜닝된 masked language model이 프롬프팅 접근법을 종종 능가하여, 복합 분류에서 LLM 프롬프팅의 개선 여지가 있음을 시사한다.
  • 프롬프트 선택이 모델 행동에 미치는 영향은 전반적으로 제한적이지만, Flan-T5와 같은 소형 모델은 제로샷 설정에서 프롬프트에 더 민감할 수 있다.
  • 법률, 의학, 범죄 등 다양한 도메인에서 파인튜닝은 여전히 경쟁력이 있거나 다수의 데이터셋에서 우수하며, 프롬프팅은 저자원 상황에서 가치를 제공한다.
Figure 2: Comparison between prompting (left) and fine-tuning (right) approaches per text classification type where ’AVG’ refers to averaged results across all prompt types per model. In ’Prompting’, ’zero’ and ’one’ refer to zero- and one- shot prompt-based learning techniques, in ’Fine Tuning’, ’o
Figure 2: Comparison between prompting (left) and fine-tuning (right) approaches per text classification type where ’AVG’ refers to averaged results across all prompt types per model. In ’Prompting’, ’zero’ and ’one’ refer to zero- and one- shot prompt-based learning techniques, in ’Fine Tuning’, ’o

이 논문 읽기

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

누빈트에서 이 논문 읽기

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