面向 Issue 与 Commit 的链接预测模型的数据泄漏与泛化能力实证研究
An Empirical Study on Data Leakage and Generalizability of Link Prediction Models for Issues and Commits
AI总结:
针对 issue-commit 链接预测中的数据泄漏与泛化问题,提出基于 Transformer 的 LinkFormer,结合文本与元数据微调,并通过随机和时间划分及迁移学习验证其真实场景有效性。
摘要:
为了增强文档编写与维护实践,开发者通常会在相关软件制品之间手动建立链接。实证研究表明,开发者经常忽视这一做法,从而造成严重的信息丢失。为解决这一问题,研究者提出了自动链接恢复技术。然而,这些方法主要关注在随机划分的数据集上提升预测准确率,对数据泄漏的影响以及预测模型的泛化能力关注有限。LinkFormer 旨在解决这些局限。我们的方法不仅保持并提高了现有预测的准确率,还增强了其与真实场景的契合度以及泛化能力。首先,为了更好地利用上下文信息进行预测,我们采用 Transformer 架构,并在 issue 与 commit 的文本信息和元数据信息上对多个预训练模型进行微调。接着,为衡量时间对模型性能的影响,我们在训练和测试阶段采用两种划分策略:随机划分数据集和按时间划分数据集。最后,为寻求能够在多个项目上表现出高性能的通用模型,我们在两种不同的迁移学习设置中对 LinkFormer 进行额外微调。研究结果支持以下结论:为有效模拟真实场景,研究者在训练模型时必须保持数据的时间流动。此外,结果表明 LinkFormer 显著优于现有方法,在基于项目的设置中 F1-measure 提升了 48%。最后,LinkFormer 在跨项目设置中的性能与其在基于项目场景下的平均性能相当。
英文摘要:
To enhance documentation and maintenance practices, developers conventionally establish links between related software artifacts manually. Empirical research has revealed that developers frequently overlook this practice, resulting in significant information loss. To address this issue, automatic link recovery techniques have been proposed. However, these approaches primarily focused on improving prediction accuracy on randomly-split datasets, with limited attention given to the impact of data leakage and the generalizability of the predictive models. LinkFormer seeks to address these limitations. Our approach not only preserves and improves the accuracy of existing predictions but also enhances their alignment with real-world settings and their generalizability. First, to better utilize contextual information for prediction, we employ the Transformer architecture and fine-tune multiple pre-trained models on both textual and metadata information of issues and commits. Next, to gauge the effect of time on model performance, we employ two splitting policies during both the training and testing phases; randomly- and temporally-split datasets. Finally, in pursuit of a generic model that can demonstrate high performance across a range of projects, we undertake additional fine-tuning of LinkFormer within two distinct transfer-learning settings. Our findings support that to simulate real-world scenarios effectively, researchers must maintain the temporal flow of data when training models. Furthermore, the results demonstrate that LinkFormer outperforms existing methodologies by a significant margin, achieving a 48% improvement in F1-measure within a project-based setting. Finally, the performance of LinkFormer in the cross-project setting is comparable to its average performance within the project-based scenario.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。