Skip to main content
QUICK REVIEW

[论文解读] Comparing Specialised Small and General Large Language Models on Text Classification: 100 Labelled Samples to Achieve Break-Even Performance

Branislav Pecher, Ivan Srba|arXiv (Cornell University)|Feb 20, 2024
Science Education and Pedagogy被引用 4
一句话总结

本文研究了在文本分类任务中,专用小型语言模型要超越通用大型语言模型,需要多少有标签样本。通过在三个复杂度不同的数据集上进行微调、提示工程、少样本学习和指令微调,作者确定了专用模型与通用模型表现相当或更优的临界点——通常仅需100至1000个有标签样本,且性能方差会使所需数据量增加25%至200%。

ABSTRACT

When solving NLP tasks with limited labelled data, researchers typically either use a general large language model without further update, or use a small number of labelled samples to tune a specialised smaller model. In this work, we answer an important question -- how many labelled samples are required for the specialised small models to outperform general large models, while taking the performance variance into consideration. By observing the behaviour of fine-tuning, instruction-tuning, prompting and in-context learning on 8 language models, we identify such performance break-even points across 8 representative text classification tasks of varying characteristics. We show that the specialised models often need only few samples (on average $100$) to be on par or better than the general ones. At the same time, the number of required labels strongly depends on the dataset or task characteristics, with fine-tuning on binary datasets requiring significantly more samples. When performance variance is taken into consideration, the number of required labels increases on average by $100 - 200\%$. Finally, larger models do not consistently lead to better performance and lower variance, with 4-bit quantisation having negligible impact.

研究动机与目标

  • 确定专用小型语言模型在文本分类任务中实现与通用大型语言模型性能相当或更优所需的有效标签样本数量。
  • 比较四种高效NLP方法(微调、提示工程、少样本学习和指令微调)在不同数量有标签数据下的影响。
  • 识别专用模型超越通用模型的临界点,并考虑性能方差的影响。
  • 评估任务复杂度和结果方差如何影响所需有标签样本数量。

提出的方法

  • 本研究评估了四种NLP微调与提示技术:微调、提示微调、少样本学习和指令微调,在三个复杂度递增的文本分类数据集上的表现。
  • 性能在从1到1000个有标签样本的训练集规模上进行测量,并通过统计分析考虑方差影响。
  • 三个数据集——SST-2、MRPC和BoolQ——代表了不同任务复杂度,支持在不同NLP挑战下的比较。
  • 作者在模型间采用一致的评估协议,包括大型模型(如LLaMA-2、ChatGPT)和小型模型(如Flan-T5),以确保公平比较。
  • 结果分析了专用模型超越通用模型的临界点,并使用置信区间考虑方差影响。
  • 通过减少训练步数并共享提示工程与指令微调中的模型权重,优先考虑计算效率,以限制资源使用。
Figure 1: The impact of changing training dataset size is observed and the break-even points are identified, taking performance variance into consideration.
Figure 1: The impact of changing training dataset size is observed and the break-even points are identified, taking performance variance into consideration.

实验结果

研究问题

  • RQ1在多少个有标签样本下,专用小型语言模型能在文本分类任务中实现与通用大型语言模型性能相当或更优?
  • RQ2在不同提示工程与微调方法下,所需有标签样本数量如何随任务复杂度变化?
  • RQ3性能方差在多大程度上增加了为可靠超越通用模型而需要的有标签样本数量?
  • RQ4不同微调与提示策略(如指令微调与微调)在不同数据集规模下的数据效率如何比较?

主要发现

  • 专用小型语言模型在仅需100至1000个有标签样本的情况下,即可实现与通用大型语言模型相当或更优的性能,具体取决于任务复杂度。
  • 性能方差使所需有标签样本数量增加25%至200%,凸显了稳健评估协议的重要性。
  • 指令微调即使在数据有限的情况下也持续提供显著优势,且在数据效率方面优于其他方法。
  • 在更复杂任务(如BoolQ)中,Flan-T5等小型模型表现出更高方差,需通过更精细的提示工程(如减少少样本示例数量)来稳定性能。
  • 临界点并非统一:简单任务(如SST-2)的临界点较低,而复杂任务(如BoolQ)的临界点较高,且大型模型在复杂任务上表现更稳定。
  • 提示工程与少样本学习在不同模型规模下方差较低,但其性能对数据量增加的敏感度低于微调模型。
Figure 2: The impact of varying size of available labelled training samples (in logarithmic fashion) on the performance of fine-tuning, prompting, in-context learning and instruction-tuning approaches, reported using F1 macro and its standard deviation. Although the impact is dataset dependent (with
Figure 2: The impact of varying size of available labelled training samples (in logarithmic fashion) on the performance of fine-tuning, prompting, in-context learning and instruction-tuning approaches, reported using F1 macro and its standard deviation. Although the impact is dataset dependent (with

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

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