Xun Zhang, H. Washizaki, Nobukazu Yoshioka, Y. Fukazawa
{"title":"Detecting Design Patterns in UML Class Diagram Images using Deep Learning","authors":"Xun Zhang, H. Washizaki, Nobukazu Yoshioka, Y. Fukazawa","doi":"10.1109/SNPD54884.2022.10051795","DOIUrl":null,"url":null,"abstract":"Detecting software design pattern is an important part of software reverse engineering because design patterns can provide the most intuitive design idea of software products, which can be useful for maintenance engineers. In past studies, a lot of approaches have been proposed to detect design patterns, and the machine learning-based approach is a new trend in recent years. In this paper, we propose a preliminary idea of a deep learning-based approach to detect design patterns from UML class diagrams of software products, which can be used in some cases that traditional approaches may not work. We propose an overall process, which is divided into preparation phase and application phase. In preparation phase, we train a deep learning-based classifier to do the image classification task. In application phase, users may input the UML class diagram of a micro-architecture into the model and get the pattern it belongs to. We conduct a preliminary experiment to show the effectiveness of our approach, we train a Convolutional Neural Network (CNN) as the classifier and test it on our image dataset, which is constructed with UML images we collected from the Internet. We also use Gradient-weighted Class Activation Mapping (Grad-CAM) to do the visualization and use it to explain why our approach works. Lastly, we analyze the potential advantages and disadvantages of our approach.","PeriodicalId":425462,"journal":{"name":"2022 IEEE/ACIS 23rd International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD)","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-12-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE/ACIS 23rd International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SNPD54884.2022.10051795","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Detecting software design pattern is an important part of software reverse engineering because design patterns can provide the most intuitive design idea of software products, which can be useful for maintenance engineers. In past studies, a lot of approaches have been proposed to detect design patterns, and the machine learning-based approach is a new trend in recent years. In this paper, we propose a preliminary idea of a deep learning-based approach to detect design patterns from UML class diagrams of software products, which can be used in some cases that traditional approaches may not work. We propose an overall process, which is divided into preparation phase and application phase. In preparation phase, we train a deep learning-based classifier to do the image classification task. In application phase, users may input the UML class diagram of a micro-architecture into the model and get the pattern it belongs to. We conduct a preliminary experiment to show the effectiveness of our approach, we train a Convolutional Neural Network (CNN) as the classifier and test it on our image dataset, which is constructed with UML images we collected from the Internet. We also use Gradient-weighted Class Activation Mapping (Grad-CAM) to do the visualization and use it to explain why our approach works. Lastly, we analyze the potential advantages and disadvantages of our approach.
软件设计模式的检测是软件逆向工程的重要组成部分,因为设计模式可以提供软件产品最直观的设计思想,对维护工程师非常有用。在过去的研究中,已经提出了许多方法来检测设计模式,而基于机器学习的方法是近年来的新趋势。在本文中,我们提出了一个基于深度学习的方法的初步想法,该方法可以从软件产品的UML类图中检测设计模式,它可以在传统方法可能不起作用的某些情况下使用。我们提出了一个整体的过程,分为准备阶段和应用阶段。在准备阶段,我们训练了一个基于深度学习的分类器来完成图像分类任务。在应用阶段,用户可以将微体系结构的UML类图输入到模型中,从而获得其所属的模式。我们进行了一个初步的实验来证明我们的方法的有效性,我们训练了一个卷积神经网络(CNN)作为分类器,并在我们的图像数据集上进行了测试,该数据集是用我们从互联网上收集的UML图像构建的。我们还使用梯度加权类激活映射(Gradient-weighted Class Activation Mapping, Grad-CAM)来进行可视化,并使用它来解释为什么我们的方法有效。最后,我们分析了该方法的潜在优点和缺点。