用多策略融合提升自然语言与代码的关联识别准确率
Natural Language-Programming Language Software Traceability Link Recovery Needs More than Textual Similarity
- 结合领域特定辅助策略增强文本匹配能力
- 在12个开源项目上F1得分提升3.68%至8.84%
- 适合需要精准需求-代码映射的研究者和开发者
在自然语言与编程语言(NL-PL)软件追溯链接恢复任务中,仅依赖文本相似性存在语义鸿沟限制。本文通过大规模实证评估揭示了这一局限性,并提出融合多种领域特定辅助策略的方法。该方法分别应用于异构图变压器(HGT)和基于提示的Gemini 2.5 Pro模型,在需求-代码追溯任务中显著优于原始模型。相较于当前最先进方法HGNNLink,HGT与Gemini 2.5 Pro平均F1分数分别提升3.68%和8.84%,验证了多策略集成对提升模型性能的有效性。
原文摘要 · Abstract (English)
In the field of software traceability link recovery (TLR), textual similarity has long been regarded as the core criterion. However, in tasks involving natural language and programming language (NL-PL) artifacts, relying solely on textual similarity is limited by their semantic gap. To this end, we conducted a large-scale empirical evaluation across various types of TLR tasks, revealing the limitations of textual similarity in NL-PL scenarios. To address these limitations, we propose an approach that incorporates multiple domain-specific auxiliary strategies, identified through empirical analysis, into two models: the Heterogeneous Graph Transformer (HGT) via edge types and the prompt-based Gemini 2.5 Pro via additional input information. We then evaluated our approach using the widely studied requirements-to-code TLR task, a representative case of NL-PL TLR. Experimental results show that both the multi-strategy HGT and Gemini 2.5 Pro models outperformed their original counterparts without strategy integration. Furthermore, compared to the current state-of-the-art method HGNNLink, the multi-strategy HGT and Gemini 2.5 Pro models achieved average F1-score improvements of 3.68% and 8.84%, respectively, across twelve open-source projects, demonstrating the effectiveness of multi-strategy integration in enhancing overall model performance for the requirements-code TLR task.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。