Skip to main content
QUICK REVIEW

[論文レビュー] Selecting Between BERT and GPT for Text Classification in Political Science Research

Yu Wang, Qu Wen|arXiv (Cornell University)|Nov 7, 2024
Sentiment Analysis and Opinion MiningComputer Science被引用数 3
ひとこと要約

本研究では、政治学分野におけるテキスト分類において、データが限られる状況下で、GPTモデルを用いたゼロショットおよびフェイントショットプロンプティングと、微調整されたBERTモデルを比較している。GPTプロンプティングは、特にクラス数が少ない場合に、使いやすさと妥当な性能を提供するが、1,000件の訓練データに達すると、微調整されたBERTは一貫してGPTを上回るか、同等の性能を示す。また、スケールに応じて、微調整されたBERTはコスト効率が優れている。

ABSTRACT

Political scientists often grapple with data scarcity in text classification. Recently, fine-tuned BERT models and their variants have gained traction as effective solutions to address this issue. In this study, we investigate the potential of GPT-based models combined with prompt engineering as a viable alternative. We conduct a series of experiments across various classification tasks, differing in the number of classes and complexity, to evaluate the effectiveness of BERT-based versus GPT-based models in low-data scenarios. Our findings indicate that while zero-shot and few-shot learning with GPT models provide reasonable performance and are well-suited for early-stage research exploration, they generally fall short - or, at best, match - the performance of BERT fine-tuning, particularly as the training set reaches a substantial size (e.g., 1,000 samples). We conclude by comparing these approaches in terms of performance, ease of use, and cost, providing practical guidance for researchers facing data limitations. Our results are particularly relevant for those engaged in quantitative text analysis in low-resource settings or with limited labeled data.

研究の動機と目的

  • GPTベースのフェイントショットプロンプティングが、政治学におけるテキスト分類の分野で微調整されたBERTの代替手段として実用的であるかどうかを評価すること。
  • さまざまなデータサイズと分類の複雑さを想定し、GPTプロンプティングとBERT微調整の性能、使いやすさ、コストを比較すること。
  • 定量的テキスト分析においてデータ制限に直面する政治学者に実用的なガイダンスを提供すること。
  • 特に二値分類および多値分類タスクにおいて、最小限のラベル付きデータでGPTモデルを用いたプロンプト工学の有効性を評価すること。
  • 微調整における初期の固定コストと、プロンプティングにおける継続的な推論コストのトレードオフを分析すること。

提案手法

  • 本研究では、複数のテキスト分類タスクにおいて、GPT-4oを用いたゼロショットおよびフェイントショットプロンプティングと、微調整されたBERTモデルを比較する制御実験を実施している。
  • タスクは、クラス数(二値分類および多値分類)とデータサイズ(最大1,000件のラベル付きサンプル)の面で変動し、低リソースな政治学的状況を模擬している。
  • 性能評価は、標準的な分類指標を用い、特に異なるデータ環境下での正確性とF1スコアに注目している。
  • コスト分析では、GPTプロンプティングの推論コスト(トークン単価)と、BERT微調整の固定コストおよびその後の推論コストを比較している。
  • プロンプト工学では、各クラスあたり2〜4例の例示を含むフェイントショットのコンテキスト学習を用い、明確さとタスクへの整合性を最適化している。
  • 実験は、ニュース記事、演説、政策文書など多様な政治学的テキストタイプを対象としており、一般化可能性を確保している。
Figure 1: Increasing the number of samples enhances model accuracy, whether it’s through fine-tuning BERT models or prompting GPT models. ‘RoBERTa # 200’ refers to fine-tuning RoBERTa-large with 200 samples, while ‘Temp0.2 #0’ indicates zero-shot prompting with a temperature setting of 0.2. The blac
Figure 1: Increasing the number of samples enhances model accuracy, whether it’s through fine-tuning BERT models or prompting GPT models. ‘RoBERTa # 200’ refers to fine-tuning RoBERTa-large with 200 samples, while ‘Temp0.2 #0’ indicates zero-shot prompting with a temperature setting of 0.2. The blac

実験結果

リサーチクエスチョン

  • RQ1GPTモデルを用いたフェイントショットプロンプティングは、データが少ないテキスト分類タスクにおいて、微調整されたBERTと同等または優れた性能を達成できるか?
  • RQ2訓練データ量の増加に伴い、特に1,000件を超えた場合に、モデルの性能はどのように変化するか?
  • RQ3GPTプロンプティングがBERT微調整を上回る状況はどのようなものか。特に、使いやすさとコスト効率の観点から。
  • RQ4異なる推論量を想定した場合、GPTプロンプティングとBERT微調整のコスト構造はどのように比較できるか?
  • RQ5GPTモデルを用いたプロンプト工学は、最小限のラベル付きデータで政治学的多値分類タスクを効果的に処理できるか?

主な発見

  • 微調整されたBERTモデルは、訓練データが1,000件を超えるようになると、常にゼロショットおよびフェイントショットGPTプロンプティングを上回るか、同等の性能を示す。
  • GPTプロンプティングは、小規模なデータセットと少ないクラス数の初期段階の研究において、妥当な性能を示すが、ほとんどの状況で微調整されたBERTの性能を下回っている。
  • ゼロショットGPTプロンプティングのコストは、150〜200件のサンプル処理後に微調整されたBERTの推論コストと交差し、以降は微調整がより経済的になる。
  • GPT-4oを用いた二ショットプロンプティングは、微調整よりも著しく高いコストを要し、高コストなトークン消費のため、数回のAPIコールで微調整コストを上回る。
  • GPTプロンプティングはデプロイが容易で、初期のモデル訓練が不要であるが、固定コストがない反面、推論あたりの費用が高くなる。
  • チェーン・オブ・トゥキャストやセルフコンシステンシーといった高度なプロンプティング技術による性能向上は予想されるが、本研究では検討されていない。
Figure 2: Prompting with or without samples lags behind fine-tuning RoBERTa-large models by a sizeable margin in the 8-class manifesto classification.
Figure 2: Prompting with or without samples lags behind fine-tuning RoBERTa-large models by a sizeable margin in the 8-class manifesto classification.

この論文を読む

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

Nubintでこの論文を読む

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