用少量样本预测微调所需数据量,避免盲目标注。
Efficiently Estimating Data Efficiency for Language Model Fine-tuning
- 通过低置信度样本的梯度相似性预测数据效率。
- 在30个任务上预测误差仅8.6%,减少数百次无效标注。
- 适合需要高效微调的NLP研究者和工程师。
尽管大语言模型在众多下游任务中具备一定的零样本能力,但微调仍是提升性能的常用手段。然而,任务的数据效率——即达到目标性能所需的微调样本数——通常未知,导致频繁的增量标注与重训练,成本高昂。我们通过对30个专业任务的分析发现,表现良好的大模型可能在零样本下表现不佳,但经微调后可显著提升性能。为此,我们提出一种量化数据效率的指标,并基于少量标注样本,利用低置信度样本的梯度余弦相似性来预测数据效率。在多样化任务上的实验表明,该方法整体预测误差为8.6%,通常可避免每项任务数百次不必要的标注。实验结果与代码已开源。
原文摘要 · Abstract (English)
While large language models (LLMs) demonstrate reasonable zero-shot capability across many downstream tasks, fine-tuning is a common practice to improve their performance. However, a task's data efficiency--i.e., the number of fine-tuning examples needed to achieve a desired level of performance--is often unknown, resulting in costly cycles of incremental annotation and retraining. Indeed, we demonstrate across a curated set of 30 specialized tasks that performant LLMs may struggle zero-shot but can attain stronger performance after fine-tuning. This motivates the need for methods to predict a task's data efficiency without requiring incremental annotation. After introducing a concrete metric that quantifies a task's data efficiency, we propose using the gradient cosine similarity of low-confidence examples to predict data efficiency based on a small number of labeled samples. We validate our approach on a diverse set of tasks with varying data efficiencies, attaining 8.6% error in overall data efficiency prediction and typically eliminating hundreds of unnecessary annotations on each task. Our experiment results and implementation code are available on GitHub.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。