[论文解读] Large Language Models Are Zero-Shot Text Classifiers
tldr: 本文评估基于 GPT 的模型和其他基线在多个数据集上的零-shot 文本分类性能,结果显示在四项任务中的三项任务中,LLM 可以作为零-shot 分类器。
Retrained large language models (LLMs) have become extensively used across various sub-disciplines of natural language processing (NLP). In NLP, text classification problems have garnered considerable focus, but still faced with some limitations related to expensive computational cost, time consumption, and robust performance to unseen classes. With the proposal of chain of thought prompting (CoT), LLMs can be implemented using zero-shot learning (ZSL) with the step by step reasoning prompts, instead of conventional question and answer formats. The zero-shot LLMs in the text classification problems can alleviate these limitations by directly utilizing pretrained models to predict both seen and unseen classes. Our research primarily validates the capability of GPT models in text classification. We focus on effectively utilizing prompt strategies to various text classification scenarios. Besides, we compare the performance of zero shot LLMs with other state of the art text classification methods, including traditional machine learning methods, deep learning methods, and ZSL methods. Experimental results demonstrate that the performance of LLMs underscores their effectiveness as zero-shot text classifiers in three of the four datasets analyzed. The proficiency is especially advantageous for small businesses or teams that may not have extensive knowledge in text classification.
研究动机与目标
- 评估在多个数据集上使用 GPT、Llama2、GPT-3.5 和 GPT-4 的零-shot 文本分类。
- 在标准化提示与输入条件下,将零-shot LLM 与传统 ML、DL,以及 ZSL 方法进行比较。
- 为小型团队部署零-shot 文本分类提供实用见解。
- 开源代码库以实现可重复性和社区影响。
提出的方法
- 描述传统文本分类工作流,并与使用 GPT 模型的零-shot 提示进行对比。
- 在 LLM 实验中标准化提示和采样参数(temperature=0.01, top_p=0.9)。
- 对 LLM 使用原始测试数据,而传统 ML/DL 模型使用标准化的预处理输入。
- 在四个数据集上评估模型:COVID-19 推文、经济文本、电子商务文本和短信垃圾邮件。
- 与 MNB、LG、RF、DT、KNN、RNN、LSTM、GRU、BART、DeBERTa,以及 LLM(Llama2、GPT-3.5、GPT-4)进行比较。
- 报告 ACC、F1 和 AUC 指标并分析零-shot 性能。

实验结果
研究问题
- RQ1零-shot LLMs 是否能够在相对于传统 ML/DL 方法的文本分类中达到有竞争力的表现?
- RQ2在情感、主题和垃圾邮件任务中,零-shot LLMs 与 ZSL 基线有何比较?
- RQ3哪些提示和输入处理选择可以最大化零-shot 文本分类性能?
- RQ4对于 labeling 能力有限的小型团队或企业,LLMs 是否更具优势?
- RQ5在跨数据集的零-shot LLM 分类中观察到的局限性与偏见是什么?
主要发现
- LLMs 在四个数据集中的三项任务中表现出色,作为零-shot 文本分类器。
- GPT-4 通常在各数据集上优于其他基线,特别是在经济文本和短信任务中。
- Llama2 和 GPT-3.5 在情感分析与电子商务分类方面表现出优势,而在某些 COVID-19 情感任务中,LLMs 仍落后。
- 在若干任务中,传统 ML 方法的表现通常不如 DL 与基于 LLM 的零-shot 方法。
- 提示策略与数据预处理(如清理推文)显著影响模型输出与准确性。
- 开源代码与标准化评估有助于可重复性与更广泛的采用。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。