• 文献检索
  • 文档翻译
  • 深度研究
  • 学术资讯
  • Suppr Zotero 插件Zotero 插件
  • 邀请有礼
  • 套餐&价格
  • 历史记录
应用&插件
Suppr Zotero 插件Zotero 插件浏览器插件Mac 客户端Windows 客户端微信小程序
定价
高级版会员购买积分包购买API积分包
服务
文献检索文档翻译深度研究API 文档MCP 服务
关于我们
关于 Suppr公司介绍联系我们用户协议隐私条款
关注我们

Suppr 超能文献

核心技术专利:CN118964589B侵权必究
粤ICP备2023148730 号-1Suppr @ 2026

文献检索

告别复杂PubMed语法,用中文像聊天一样搜索,搜遍4000万医学文献。AI智能推荐,让科研检索更轻松。

立即免费搜索

文件翻译

保留排版,准确专业,支持PDF/Word/PPT等文件格式,支持 12+语言互译。

免费翻译文档

深度研究

AI帮你快速写综述,25分钟生成高质量综述,智能提取关键信息,辅助科研写作。

立即免费体验

基于注意力机制的 GRU-LSTM 在软件缺陷预测中的应用。

Attention based GRU-LSTM for software defect prediction.

机构信息

Computer Science and Engineering, Central South University, Changsha, China.

出版信息

PLoS One. 2021 Mar 4;16(3):e0247444. doi: 10.1371/journal.pone.0247444. eCollection 2021.

DOI:10.1371/journal.pone.0247444
PMID:33661985
原文链接:https://pmc.ncbi.nlm.nih.gov/articles/PMC7932164/
Abstract

Software defect prediction (SDP) can be used to produce reliable, high-quality software. The current SDP is practiced on program granular components (such as file level, class level, or function level), which cannot accurately predict failures. To solve this problem, we propose a new framework called DP-AGL, which uses attention-based GRU-LSTM for statement-level defect prediction. By using clang to build an abstract syntax tree (AST), we define a set of 32 statement-level metrics. We label each statement, then make a three-dimensional vector and apply it as an automatic learning model, and then use a gated recurrent unit (GRU) with a long short-term memory (LSTM). In addition, the Attention mechanism is used to generate important features and improve accuracy. To verify our experiments, we selected 119,989 C/C++ programs in Code4Bench. The benchmark tests cover various programs and variant sets written by thousands of programmers. As an evaluation standard, compared with the state evaluation method, the recall, precision, accuracy and F1 measurement of our well-trained DP-AGL under normal conditions have increased by 1%, 4%, 5%, and 2% respectively.

摘要

软件缺陷预测(SDP)可用于生成可靠、高质量的软件。目前的 SDP 是针对程序粒度组件(如文件级、类级或函数级)进行实践的,无法准确预测故障。为了解决这个问题,我们提出了一个名为 DP-AGL 的新框架,该框架使用基于注意力的 GRU-LSTM 进行语句级缺陷预测。通过使用 clang 构建抽象语法树(AST),我们定义了一组 32 个语句级别的指标。我们对每个语句进行标记,然后创建一个三维向量并将其作为自动学习模型应用,然后使用门控循环单元(GRU)和长短期记忆(LSTM)。此外,还使用注意力机制生成重要特征并提高准确性。为了验证我们的实验,我们在 Code4Bench 中选择了 119,989 个 C/C++程序。该基准测试涵盖了数千名程序员编写的各种程序和变体集。作为评估标准,与状态评估方法相比,我们经过良好训练的 DP-AGL 在正常情况下的召回率、精度、准确性和 F1 测量分别提高了 1%、4%、5%和 2%。

https://cdn.ncbi.nlm.nih.gov/pmc/blobs/b51d/7932164/07bcf0f1b89d/pone.0247444.g006.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/b51d/7932164/0311f5858ba7/pone.0247444.g001.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/b51d/7932164/34f3e00113cb/pone.0247444.g002.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/b51d/7932164/fd19d2cbc9b3/pone.0247444.g003.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/b51d/7932164/1074f63d3628/pone.0247444.g004.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/b51d/7932164/933792a4a749/pone.0247444.g005.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/b51d/7932164/07bcf0f1b89d/pone.0247444.g006.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/b51d/7932164/0311f5858ba7/pone.0247444.g001.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/b51d/7932164/34f3e00113cb/pone.0247444.g002.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/b51d/7932164/fd19d2cbc9b3/pone.0247444.g003.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/b51d/7932164/1074f63d3628/pone.0247444.g004.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/b51d/7932164/933792a4a749/pone.0247444.g005.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/b51d/7932164/07bcf0f1b89d/pone.0247444.g006.jpg

相似文献

1
Attention based GRU-LSTM for software defect prediction.基于注意力机制的 GRU-LSTM 在软件缺陷预测中的应用。
PLoS One. 2021 Mar 4;16(3):e0247444. doi: 10.1371/journal.pone.0247444. eCollection 2021.
2
Software defect prediction using hybrid model (CBIL) of convolutional neural network (CNN) and bidirectional long short-term memory (Bi-LSTM).使用卷积神经网络(CNN)和双向长短期记忆网络(Bi-LSTM)的混合模型(CBIL)进行软件缺陷预测。
PeerJ Comput Sci. 2021 Nov 16;7:e739. doi: 10.7717/peerj-cs.739. eCollection 2021.
3
Predicting Energy Consumption Using LSTM, Multi-Layer GRU and Drop-GRU Neural Networks.使用 LSTM、多层 GRU 和 Drop-GRU 神经网络预测能耗。
Sensors (Basel). 2022 May 27;22(11):4062. doi: 10.3390/s22114062.
4
Prediction of Head Movement in 360-Degree Videos Using Attention Model.基于注意力模型的 360 度视频中头部运动预测
Sensors (Basel). 2021 May 25;21(11):3678. doi: 10.3390/s21113678.
5
LSTM and GRU Neural Networks as Models of Dynamical Processes Used in Predictive Control: A Comparison of Models Developed for Two Chemical Reactors.长短期记忆神经网络和门控循环单元神经网络作为预测控制中动态过程的模型:为两个化学反应器开发的模型的比较。
Sensors (Basel). 2021 Aug 20;21(16):5625. doi: 10.3390/s21165625.
6
Forecasting stock prices with long-short term memory neural network based on attention mechanism.基于注意力机制的长短时记忆神经网络的股票价格预测。
PLoS One. 2020 Jan 3;15(1):e0227222. doi: 10.1371/journal.pone.0227222. eCollection 2020.
7
Traffic flow prediction using bi-directional gated recurrent unit method.基于双向门控循环单元方法的交通流预测
Urban Inform. 2022;1(1):16. doi: 10.1007/s44212-022-00015-z. Epub 2022 Dec 1.
8
Extended-Range Prediction Model Using NSGA-III Optimized RNN-GRU-LSTM for Driver Stress and Drowsiness.基于 NSGA-III 优化 RNN-GRU-LSTM 的驾驶员应激和困倦的扩展范围预测模型。
Sensors (Basel). 2021 Sep 25;21(19):6412. doi: 10.3390/s21196412.
9
Using Complementary Ensemble Empirical Mode Decomposition and Gated Recurrent Unit to Predict Landslide Displacements in Dam Reservoir.利用互补集合经验模态分解和门控循环单元预测大坝水库中的滑坡位移。
Sensors (Basel). 2022 Feb 9;22(4):1320. doi: 10.3390/s22041320.
10
A Machine Learning Model Based on GRU and LSTM to Predict the Environmental Parameters in a Layer House, Taking CO Concentration as an Example.基于 GRU 和 LSTM 的鸡舍环境参数预测机器学习模型——以 CO 浓度为例。
Sensors (Basel). 2023 Dec 31;24(1):244. doi: 10.3390/s24010244.

引用本文的文献

1
DrugBERT: a BERT-based approach integrating LDA topic embedding and efficacy-aware mechanism for predicting anti-tumor drug efficacy.DrugBERT:一种基于BERT的方法,集成LDA主题嵌入和疗效感知机制以预测抗肿瘤药物疗效。
J Transl Med. 2025 Aug 5;23(1):864. doi: 10.1186/s12967-025-06795-7.
2
Topic modeling-based prediction of software defects and root cause using BERTopic, and multioutput classifier.基于主题建模,使用BERTopic和多输出分类器对软件缺陷及根本原因进行预测。
Sci Rep. 2025 Jul 14;15(1):25428. doi: 10.1038/s41598-025-11458-0.
3
Gonorrhoea among China's aging population: a 20-year nationwide analysis of epidemiological trends with 5-year projections.

本文引用的文献

1
Effort-aware and just-in-time defect prediction with neural network.基于神经网络的努力感知和及时缺陷预测。
PLoS One. 2019 Feb 1;14(2):e0211359. doi: 10.1371/journal.pone.0211359. eCollection 2019.
2
LSTM: A Search Space Odyssey.长短期记忆网络:搜索空间奥德赛。
IEEE Trans Neural Netw Learn Syst. 2017 Oct;28(10):2222-2232. doi: 10.1109/TNNLS.2016.2582924. Epub 2016 Jul 8.
中国老年人口中的淋病:一项为期20年的全国性流行病学趋势分析及5年预测
Front Public Health. 2025 Jun 27;13:1594289. doi: 10.3389/fpubh.2025.1594289. eCollection 2025.
4
Features extraction and fusion by attention mechanism for software defect prediction.基于注意力机制的软件缺陷预测特征提取与融合
PLoS One. 2025 Apr 14;20(4):e0320808. doi: 10.1371/journal.pone.0320808. eCollection 2025.
5
A hybrid model for tuberculosis forecasting based on empirical mode decomposition in China.基于经验模态分解的中国结核病预测混合模型。
BMC Infect Dis. 2023 Oct 7;23(1):665. doi: 10.1186/s12879-023-08609-x.
6
Development and comparison of predictive models for sexually transmitted diseases-AIDS, gonorrhea, and syphilis in China, 2011-2021.中国 2011-2021 年性传播疾病-艾滋病、淋病和梅毒预测模型的建立与比较。
Front Public Health. 2022 Aug 12;10:966813. doi: 10.3389/fpubh.2022.966813. eCollection 2022.
7
The research of ARIMA, GM(1,1), and LSTM models for prediction of TB cases in China.ARIMA、GM(1,1) 和 LSTM 模型在中国结核病病例预测中的研究。
PLoS One. 2022 Feb 23;17(2):e0262734. doi: 10.1371/journal.pone.0262734. eCollection 2022.