[论文解读] Making the most of small Software Engineering datasets with modern machine learning
本文在13个小型软件工程数据集(样本数少于1,000个)上评估了预训练Transformer模型(如BERT和RoBERTa)的表现,展示了其在自然语言任务中的有效性以及在代码相关任务中的竞争力。研究发现,尽管预训练能提升小型SE数据集上的性能,但在极小的代码数据集上,传统机器学习方法仍优于Transformer模型,因此建议采用主动学习和软标签等技术以提高学习效率。
This paper provides a starting point for Software Engineering (SE) researchers and practitioners faced with the problem of training machine learning models on small datasets. Due to the high costs associated with labeling data, in Software Engineering,there exist many small (< 1 000 samples) and medium-sized (< 100 000 samples) datasets. While deep learning has set the state of the art in many machine learning tasks, it is only recently that it has proven effective on small-sized datasets, primarily thanks to pre-training, a semi-supervised learning technique that leverages abundant unlabelled data alongside scarce labelled data.In this work, we evaluate pre-trained Transformer models on a selection of 13 smaller datasets from the SE literature, covering both,source code and natural language. Our results suggest that pre-trained Transformers are competitive and in some cases superior to previous models, especially for tasks involving natural language; whereas for source code tasks, in particular for very small datasets,traditional machine learning methods often has the edge.In addition, we experiment with several techniques that ought to aid training on small datasets, including active learning, data augmentation, soft labels, self-training and intermediate-task fine-tuning, and issue recommendations on when they are effective. We also release all the data, scripts, and most importantly pre-trained models for the community to reuse on their own datasets.
研究动机与目标
- 为解决因标注成本高而导致的小型软件工程数据集上训练有效机器学习模型的挑战。
- 评估预训练Transformer模型(如BERT、RoBERTa)在小型SE数据集上的有效性,涵盖源代码和自然语言任务。
- 研究并推荐可提升小型数据集上模型性能的技术,如主动学习、数据增强和自训练。
- 发布所有数据、代码和预训练模型,以支持SE社区中的可重用性和可复现性。
提出的方法
- 在文献中收集的13个小型SE数据集上微调预训练Transformer模型(如BERT、RoBERTa),涵盖代码和自然语言任务。
- 通过回译和同义词替换进行数据增强,以提升训练数据的多样性。
- 利用集成模型生成的软标签,以提升在标注数据有限情况下的泛化能力。
- 通过迭代选择置信度最低的样本进行标注,实现主动学习,从而降低标注成本。
- 在目标SE任务的微调前,先在相关NLP任务上进行中间任务微调,以增强归纳偏置。
- 使用标准指标(如F1、准确率)评估模型性能,并与各数据集中的先前最先进模型进行比较。
实验结果
研究问题
- RQ1与传统机器学习模型相比,预训练Transformer模型在小型软件工程数据集上的表现如何?
- RQ2哪些数据增强和标注技术(如回译、软标签)最有效地提升小型SE数据集上的模型性能?
- RQ3在何种情况下,主动学习能有效减少标注工作量,同时保持或提升模型性能?
- RQ4中间任务微调是否能提升小型SE数据集上的性能,且在哪些任务上效果最显著?
- RQ5在代码相关SE任务中,预训练模型在何种条件下会优于或劣于经典机器学习模型?
主要发现
- 在小型SE数据集的自然语言任务中,预训练Transformer模型表现出竞争力甚至更优的性能,通常优于先前的最先进模型。
- 对于极小的代码相关数据集(如样本数少于100个),支持向量机(SVM)和随机森林等传统机器学习模型仍优于Transformer模型。
- 主动学习显著减少了所需标注样本数量,同时保持高性能,尤其在低资源环境下效果明显。
- 由集成模型生成的软标签能提升小样本数据集上的泛化能力和模型鲁棒性,尤其在标签噪声大或样本稀缺时。
- 通过回译进行数据增强可提升自然语言任务的性能,但在代码相关任务上的提升效果较弱。
- 中间任务微调能提升下游SE任务的性能,尤其当中间任务与目标任务语义相关时效果更显著。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。