arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2511.23007cs.SEcs.AI
收藏

基于双编码器的软件需求句对自动冲突检测的迁移学习方法

A transfer learning approach for automatic conflicts detection in software requirement sentence pairs based on dual encoders

School of Mathematics and Computer Science, Yunnan Minzu University(云南民族大学数学与计算机科学学院)

Yizheng Wang, Tao Jiang, Jinyan Bai, Zhengbin Zou, Tiancheng Xue, Nan Zhang, Jie Luan

AI总结:

本文提出基于SBERT和SimCSE的TSRCDF-SS框架,通过双编码器和混合损失优化提升软件需求句对冲突检测的准确率和跨领域迁移性能。

摘要:

软件需求文档(RD)通常包含上万条独立需求,确保这些需求之间的一致性对于软件工程项目的成功至关重要。自动化检测方法可以显著提高效率并降低成本;然而,现有方法仍面临几个挑战,包括在不平衡数据上检测精度低、由于使用单一编码器导致的语义提取有限,以及跨领域迁移学习性能不佳。为了解决这些问题,本文提出了一种基于SBERT和SimCSE的可迁移软件需求冲突检测框架,称为TSRCDF-SS。首先,该框架使用两个独立的编码器,Sentence-BERT(SBERT)和简单对比句子嵌入(SimCSE),为需求对生成句子嵌入,随后采用六元素拼接策略。此外,分类器通过具有混合损失优化策略的两层全连接前馈神经网络(FFNN)进行增强,该策略整合了Focal Loss的变种、领域特定约束以及基于置信度的惩罚项。最后,该框架协同整合了序列和跨领域迁移学习。实验结果表明,所提出的框架在领域内设置中实现了宏F1和加权F1得分各提高10.4%,在跨领域场景中宏F1得分提高了11.4%。

英文摘要:

Software Requirement Document (RD) typically contain tens of thousands of individual requirements, and ensuring consistency among these requirements is critical for the success of software engineering projects. Automated detection methods can significantly enhance efficiency and reduce costs; however, existing approaches still face several challenges, including low detection accuracy on imbalanced data, limited semantic extraction due to the use of a single encoder, and suboptimal performance in cross-domain transfer learning. To address these issues, this paper proposes a Transferable Software Requirement Conflict Detection Framework based on SBERT and SimCSE, termed TSRCDF-SS. First, the framework employs two independent encoders, Sentence-BERT (SBERT) and Simple Contrastive Sentence Embedding (SimCSE), to generate sentence embeddings for requirement pairs, followed by a six-element concatenation strategy. Furthermore, the classifier is enhanced by a two-layer fully connected feedforward neural network (FFNN) with a hybrid loss optimization strategy that integrates a variant of Focal Loss, domain-specific constraints, and a confidence-based penalty term. Finally, the framework synergistically integrates sequential and cross-domain transfer learning. Experimental results demonstrate that the proposed framework achieves a 10.4% improvement in both macro-F1 and weighted-F1 scores in in-domain settings, and an 11.4% increase in macro-F1 in cross-domain scenarios.

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

↑