Attention-Based Method for Design Pattern Detection

被引:1
|
作者
Mzid, Rania [1 ,2 ]
Rezgui, Ilyes [1 ]
Ziadi, Tewfik [3 ]
机构
[1] Univ Tunis El Manar, ISI, 2 Rue Abourraihan Al Bayrouni, Ariana, Tunisia
[2] Univ Sfax, CES Lab ENIS, Sfax, Tunisia
[3] Sorbonne Univ, CNRS, LIP6, F-75005 Paris, France
来源
SOFTWARE ARCHITECTURE, ECSA 2024 | 2024年 / 14889卷
关键词
Design pattern detection; Feature extraction; classification; Transformer architecture;
D O I
10.1007/978-3-031-70797-1_6
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Design patterns are standard solutions to recurrent software engineering problems. The use of design patterns helps developers improve software quality. However, when integrating design patterns into their systems, software developers usually do not document their use. To this end, the use of an automatic approach for their detection may accelerate program comprehension, assist developers in software refactoring, and reduce efforts during the maintenance task. In this paper, we propose an attention-based approach for design pattern detection. Specifically, we utilize an automatic feature extraction step with a transformer-based model incorporating the attention mechanism. Based on an unsupervised approach, this step learns from source code to identify code attributes and then produces embedding vectors. These vectors capture syntactic and semantic information related to design pattern implementations and serve as input to train a classifier for the design pattern detection task. The attention mechanism is used to produce important representative features of design pattern implementations and improve the accuracy of the classification model. The evaluation shows that our classifier detects GoF design patterns with an accuracy score of 86%, precision of 87%, recall of 86%, and F1-score of 86%. The comparison of our findings with state-of-the-art methods shows an improvement in (i) precision of 25%, (ii) recall of 6%, and (iii) F1-score of 8%.
引用
收藏
页码:86 / 101
页数:16
相关论文
共 50 条
  • [21] A Robust Cyber Attack Detection Method Through Attention-Based Graph Neural Networks
    Xu, Xiangyang
    Song, Yu
    JOURNAL OF CIRCUITS SYSTEMS AND COMPUTERS, 2025,
  • [22] An Attention-Based Network for Textured Surface Anomaly Detection
    Liu, Gaokai
    Yang, Ning
    Guo, Lei
    APPLIED SCIENCES-BASEL, 2020, 10 (18):
  • [23] Attention-based fusion factor in FPN for object detection
    Li, Yuancheng
    Zhou, Shenglong
    Chen, Hui
    APPLIED INTELLIGENCE, 2022, 52 (13) : 15547 - 15556
  • [24] Attention-Based Grasp Detection With Monocular Depth Estimation
    Xuan Tan, Phan
    Hoang, Dinh-Cuong
    Nguyen, Anh-Nhat
    Nguyen, Van-Thiep
    Vu, Van-Duc
    Nguyen, Thu-Uyen
    Hoang, Ngoc-Anh
    Phan, Khanh-Toan
    Tran, Duc-Thanh
    Vu, Duy-Quang
    Ngo, Phuc-Quan
    Duong, Quang-Tri
    Ho, Ngoc-Trung
    Tran, Cong-Trinh
    Duong, Van-Hiep
    Mai, Anh-Truong
    IEEE ACCESS, 2024, 12 : 65041 - 65057
  • [25] Graph Convolutional Networks and Attention-Based Outlier Detection
    Qiu, Rui
    Du, Xusheng
    Yu, Jiong
    Wu, Jiaying
    Li, Shu
    IEEE ACCESS, 2022, 10 : 72388 - 72399
  • [26] Attention-based Weighted Fusion Network for Object Detection
    Yu, Ruixing
    Wang, Chuyin
    Tang, Yifei
    JOURNAL OF IMAGING SCIENCE AND TECHNOLOGY, 2024, 68 (06) : 1 - 18
  • [27] An attention-based automatic vulnerability detection approach with GGNN
    Tang, Gaigai
    Yang, Lin
    Zhang, Long
    Cao, Weipeng
    Meng, Lianxiao
    He, Hongbin
    Kuang, Hongyu
    Yang, Feng
    Wang, Huiqiang
    INTERNATIONAL JOURNAL OF MACHINE LEARNING AND CYBERNETICS, 2023, 14 (09) : 3113 - 3127
  • [28] Visual attention-based deepfake video forgery detection
    Shreyan Ganguly
    Sk Mohiuddin
    Samir Malakar
    Erik Cuevas
    Ram Sarkar
    Pattern Analysis and Applications, 2022, 25 : 981 - 992
  • [29] Where and What: Driver Attention-based Object Detection
    Rong Y.
    Kassautzki N.-R.
    Fuhl W.
    Kasneci E.
    Proceedings of the ACM on Human-Computer Interaction, 2022, 6 (ETRA)
  • [30] Attention-based Deep Learning for Network Intrusion Detection
    Guo, Naiwang
    Tian, Yingjie
    Li, Fan
    Yang, Hongshan
    2020 INTERNATIONAL CONFERENCE ON IMAGE, VIDEO PROCESSING AND ARTIFICIAL INTELLIGENCE, 2020, 11584