Skip to main content
QUICK REVIEW

[论文解读] Open, Closed, or Small Language Models for Text Classification?

Hao Yu, Zachary Yang|arXiv (Cornell University)|Aug 19, 2023
Topic Modeling被引用 16
一句话总结

较小的监督模型往往能够匹配或超越生成式大语言模型;开源模型经微调后可与闭源模型相抗衡,而最大的闭源模型在最困难的任务上表现出色。

ABSTRACT

Recent advancements in large language models have demonstrated remarkable capabilities across various NLP tasks. But many questions remain, including whether open-source models match closed ones, why these models excel or struggle with certain tasks, and what types of practical procedures can improve performance. We address these questions in the context of classification by evaluating three classes of models using eight datasets across three distinct tasks: named entity recognition, political party prediction, and misinformation detection. While larger LLMs often lead to improved performance, open-source models can rival their closed-source counterparts by fine-tuning. Moreover, supervised smaller models, like RoBERTa, can achieve similar or even greater performance in many datasets compared to generative LLMs. On the other hand, closed models maintain an advantage in hard tasks that demand the most generalizability. This study underscores the importance of model selection based on task requirements

研究动机与目标

  • 评估开源模型在文本分类任务上是否能够与闭源 LLMs 相匹配。
  • 在多数据集和任务上评估三类模型(开放式 LLM、闭源 LLM、RoBERTa)。
  • 确定影响性能与泛化能力的提示与微调策略。
  • 分析不同模型选择的成本与能源影响。

提出的方法

  • 比较模型类型:Llama 2(13B,70B)、GPT-3.5、GPT-4,以及 RoBERTa(123M,354M)在三个任务上的表现。
  • 评估零-shot、少量样本以及微调设置。
  • 对 Llama 2(70B) 在命名实体识别上对联合数据集使用 LoRA 微调。
  • 测试两种提示风格(Serial、JSON)用于 LLM 并分析提示敏感性。
  • 使用任务相关指标(F1、准确率、宏F1)衡量性能。
  • 提供训练与推理的成本及能耗分析。
Figure 1: The training loss curve for supervised finetuning with Llama2 70B Chat on the combined dataset.
Figure 1: The training loss curve for supervised finetuning with Llama2 70B Chat on the combined dataset.

实验结果

研究问题

  • RQ1开源 Llama 2 模型在 NER、意识形态预测和错误信息任务上与闭源 LLMs(GPT-3.5、GPT-4)以及 RoBERTa 相比如何?
  • RQ2哪些提示、少样本和微调策略能够最大化各模型类别的性能?
  • RQ3开源模型通过微调是否能够重新具备竞争力,闭源模型在最困难任务上是否仍具优势?
  • RQ4在实际使用中,各模型类别的相对成本与能源含量是多少?

主要发现

Task数据集Llama 2 (13B)Llama 2 (70B)GPT-3.5GPT-4RoBERTa
NERCoNLL 200357.8 ± 11.582.5 ± 5.679.8 ± 6.294.3 ± 3.5
NERWNUT 201735.4 ± 4.755.3 ± 4.754.6 ± 3.065.1 ± 3.059.6 ± 3.3
NERWikiNER-EN51.3 ± 8.876.1 ± 3.677.4 ± 0.696.2 ± 0.1
Explicit Ideology2020 Election95.5 ± 1.196.3 ± 0.597.0 ± 0.897.6 ± 0.597.3 ± 0.6
COVID-19COVID-1990.2 ± 0.992.5 ± 1.394.7 ± 0.895.1 ± 0.691.2 ± 0.2
Explicit Ideology2021 Election82.1 ± 1.685.2 ± 1.087.7 ± 1.389.4 ± 1.295.2 ± 0.7
Implicit Ideology2020 Election71.9 ± 1.977.2 ± 1.092.9 ± 0.593.0 ± 0.2
Implicit IdeologyCOVID-1944.6 ± 1.653.9 ± 1.565.9 ± 2.068.6 ± 1.970.0 ± 2.7
Implicit Ideology2021 Election48.8 ± 3.555.7 ± 3.375.4 ± 1.682.3 ± 1.1
MisinfoLIAR50.0 ± 1.349.1 ± 2.568.5 ± 3.066.3 ± 2.161.5 ± 2.1
MisinfoCT-FAN-2221.2 ± 3.225.4 ± 2.143.7 ± 1.942.0 ± 2.621.6 ± 2.0
  • 小型监督模型如 RoBERTa 常常匹配甚至优于开源 LLMs 与 GPT-3.5,某些情况下甚至逼近 GPT-4。
  • 提示工程显著影响 LLM 性能;JSON 提示提升 GPT-3.5 的少样本结果,而序列化提示在零-shot 时可帮助 Llama 2。
  • 微调后的开源 Llama 2(70B)可超越 GPT-3.5,但在成本、速度和透明度方面 RoBERTa 常常总体上更优。
  • 最大规模的闭源模型在需要广泛泛化的最具挑战性任务上仍然领先(例如某些 CT-FAN-22 错误信息设置)。
  • 开源模型经微调在环境与成本方面具有优势;RoBERTa 在多数任务中展示了最佳的能源效率和成本特征。
  • RoBERTa 在若干数据集上可达到与生成式 LLM 相近或更好的性能,凸显了辨识式、监督式方法的价值。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。