arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2509.20149cs.SE
收藏

需求到代码可追溯性的协同增强:一个结合基于大语言模型的数据增强与先进编码器的框架

Synergistic Enhancement of Requirement-to-Code Traceability: A Framework Combining Large Language Model based Data Augmentation and an Advanced Encoder

Hangzhou Normal University(杭州师范大学);University of North Florida(北佛罗里达大学);Jiangxi Provincial Institute of Cyber Security(江西省网络安全研究院)

Jianzhang Zhang, Jialong Zhou, Nan Niu, Jinping Hua, Chuang Liu

AI总结:

针对需求到代码追溯中标签数据稀缺问题,提出结合LLM数据增强与先进编码器的协同框架,在四个公共数据集上显著超越十个基线。

摘要:

自动化需求到代码的可追溯链接恢复对于工业系统的质量和安全至关重要,但受到标注数据稀缺的严重阻碍。为解决这一瓶颈,本文提出并验证了一个协同框架,将大语言模型(LLM)驱动的数据增强与先进编码器相集成。我们首先表明,通过对双向提示以及零样本/少样本提示策略进行系统评估而优化的数据增强非常有效,而在主流LLM之间进行选择并不是显著的性能因素。在增强数据的基础上,我们进一步改进了一种成熟的、最先进的基于预训练语言模型的方法,纳入了一个以更广泛预训练语料和扩展上下文窗口为特征的编码器。我们在四个公共数据集上的实验量化了框架各组成部分的独立贡献:数据增强本身能够持续改进基线方法,带来最高26.66%的显著性能提升;纳入先进编码器则额外带来2.21%至11.25%的提升。这种协同最终形成一个完全优化的框架,相对于既有基线,其$F_1$分数最高提升28.59%,$F_2$分数最高提升28.9%,并决定性地优于来自三种主流范式的十个成熟基线。本工作为克服数据稀缺瓶颈贡献了一种实用且可扩展的方法,为数据驱动的需求到代码可追溯性在工业界的更广泛采用铺平了道路。

英文摘要:

Automated requirement-to-code traceability link recovery, essential for industrial system quality and safety, is critically hindered by the scarcity of labeled data. To address this bottleneck, this paper proposes and validates a synergistic framework that integrates large language model (LLM)-driven data augmentation with an advanced encoder. We first demonstrate that data augmentation, optimized through a systematic evaluation of bi-directional and zero/few-shot prompting strategies, is highly effective, while the choice among leading LLMs is not a significant performance factor. Building on the augmented data, we further enhance an established, state-of-the-art pre-trained language model based method by incorporating an encoder distinguished by a broader pre-training corpus and an extended context window. Our experiments on four public datasets quantify the distinct contributions of our framework's components: on its own, data augmentation consistently improves the baseline method, providing substantial performance gains of up to 26.66%; incorporating the advanced encoder provides an additional lift of 2.21% to 11.25%. This synergy culminates in a fully optimized framework with maximum gains of up to 28.59% on $F_1$ score and 28.9% on $F_2$ score over the established baseline, decisively outperforming ten established baselines from three dominant paradigms. This work contributes a pragmatic and scalable methodology to overcome the data scarcity bottleneck, paving the way for broader industrial adoption of data-driven requirement-to-code traceability.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑