一句话:提出 T-BERT 框架,通过三步训练迁移预训练 BERT 知识,为源代码与自然语言制品生成更准确的可追溯链接。
软件可追溯性需要在需求、问题描述与源代码等开发制品间建立关联。已有深度学习追溯模型受标注数据稀缺和运行时效率限制。本文提出 T-BERT 框架,采用三步训练策略,将从数据丰富的相关软件工程任务中学到的知识迁移到源代码与自然语言制品的链接生成,并用于恢复开源项目 issue 与 commit 之间的追溯关系。作者比较三种 BERT 架构:Single-BERT 生成的链接最准确,Siamese-BERT 结果相当且执行时间显著更短;三者均优于经典 IR 追溯模型。在三个真实开源项目上,最佳 T-BERT 相比 VSM 的 MAP 平均提升 60.31%,而 RNN 因训练数据不足表现较差。
Software traceability establishes and leverages associations between diverse development artifacts. Researchers have proposed the use of deep learning trace models to link natural language artifacts, such as requirements and issue descriptions, to source code; however, their effectiveness has been restricted by availability of labeled data and efficiency at runtime. In this study, we propose a novel framework called Trace BERT (T-BERT) to generate trace links between source code and natural language artifacts. To address data sparsity, we leverage a three-step training strategy to enable trace models to transfer knowledge from a closely related Software Engineering challenge, which has a rich dataset, to produce trace links with much higher accuracy than has previously been achieved. We then apply the T-BERT framework to recover links between issues and commits in Open Source Projects. We comparatively evaluated accuracy and efficiency of three BERT architectures. Results show that a Single-BERT architecture generated the most accurate links, while a Siamese-BERT architecture produced comparable results with significantly less execution time. Furthermore, by learning and transferring knowledge, all three models in the framework outperform classical IR trace models. On the three evaluated real-word OSS projects, the best T-BERT stably outperformed the VSM model with average improvements of 60.31% measured using Mean Average Precision (MAP). RNN severely underperformed on these projects due to insufficient training data, while T-BERT overcame this problem by using pretrained language models and transfer learning.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2102-04411,
title = {Traceability Transformed: Generating More Accurate Links with Pre-Trained BERT Models},
author = {Jinfeng Lin and Yalin Liu and Qingkai Zeng and Meng Jiang and Jane Cleland-Huang},
booktitle = {ICSE},
year = {2021},
doi = {10.1109/icse43902.2021.00040}
}