{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,2,19]],"date-time":"2026-02-19T03:24:21Z","timestamp":1771471461883,"version":"3.50.1"},"reference-count":46,"publisher":"MDPI AG","issue":"4","license":[{"start":{"date-parts":[[2025,9,23]],"date-time":"2025-09-23T00:00:00Z","timestamp":1758585600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Software"],"abstract":"<jats:p>Context: Modern software systems have become increasingly complex, making it difficult to interpret raw requirements and effectively utilize traditional tools for software design and analysis. Unified Modeling Language (UML) class diagrams are widely used to visualize and understand system architecture, but analyzing them manually, especially for large-scale systems, poses significant challenges. Objectives: This study aims to automate the analysis of UML class diagrams by assessing their complexity using a machine learning approach. The goal is to support software developers in identifying potential design issues early in the development process and to improve overall software quality. Methodology: To achieve this, this research introduces a Visual Question Answering (VQA)-based framework that integrates both computer vision and natural language processing. Vision Transformers (ViTs) are employed to extract global visual features from UML class diagrams, while the BERT language model processes natural language queries. By combining these two models, the system can accurately respond to questions related to software complexity, such as class coupling and inheritance depth. Results: The proposed method demonstrated strong performance in experimental trials. The ViT model achieved an accuracy of 0.8800, with both the F1 score and recall reaching 0.8985. These metrics highlight the effectiveness of the approach in automatically evaluating UML class diagrams. Conclusions: The findings confirm that advanced machine learning techniques can be successfully applied to automate software design analysis. This approach can help developers detect design flaws early and enhance software maintainability. Future work will explore advanced fusion strategies, novel data augmentation techniques, and lightweight model adaptations suitable for environments with limited computational resources.<\/jats:p>","DOI":"10.3390\/software4040022","type":"journal-article","created":{"date-parts":[[2025,9,23]],"date-time":"2025-09-23T10:27:53Z","timestamp":1758623273000},"page":"22","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":1,"title":["Automatic Complexity Analysis of UML Class Diagrams Using Visual Question Answering (VQA) Techniques"],"prefix":"10.3390","volume":"4","author":[{"ORCID":"https:\/\/orcid.org\/0009-0001-7760-4801","authenticated-orcid":false,"given":"Nimra","family":"Shehzadi","sequence":"first","affiliation":[{"name":"Department of Computer Science, COMSATS University Islamabad (CUI), Sahiwal 57000, Pakistan"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3970-3147","authenticated-orcid":false,"given":"Javed","family":"Ferzund","sequence":"additional","affiliation":[{"name":"Department of Computer Science, COMSATS University Islamabad (CUI), Sahiwal 57000, Pakistan"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-7144-1925","authenticated-orcid":false,"given":"Rubia","family":"Fatima","sequence":"additional","affiliation":[{"name":"Department of Computer Science and Technologies, Emerson University, Multan 60000, Pakistan"}]},{"given":"Adnan","family":"Riaz","sequence":"additional","affiliation":[{"name":"Department of Computer Science and Engineering, University of Bologna, 40126 Bologna, Italy"}]}],"member":"1968","published-online":{"date-parts":[[2025,9,23]]},"reference":[{"key":"ref_1","first-page":"10","article-title":"A Study of UML Diagrams in Software Development","volume":"12","author":"John","year":"2023","journal-title":"Int. J. Softw. Eng."},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"165","DOI":"10.5381\/jot.2005.4.9.a1","article-title":"A Survey of Metrics for UML Class Diagrams","volume":"4","author":"Genero","year":"2005","journal-title":"J. Object Technol."},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"476","DOI":"10.1109\/32.295895","article-title":"A Metrics Suite for Object Oriented Design","volume":"20","author":"Chidamber","year":"1994","journal-title":"IEEE Trans. Softw. Eng."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"751","DOI":"10.1109\/32.544352","article-title":"A Validation of Object-Oriented Design Metrics as Quality Indicators","volume":"22","author":"Basili","year":"1996","journal-title":"IEEE Trans. Softw. Eng."},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"49","DOI":"10.1038\/s41586-024-07146-0","article-title":"Artificial intelligence and illusions of understanding in scientific research","volume":"627","author":"Messeri","year":"2024","journal-title":"Nature"},{"key":"ref_6","first-page":"63","article-title":"Visual Question Answering: Which Investigated Applications?","volume":"146","author":"Barra","year":"2021","journal-title":"Pattern Recognit. Lett."},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"268","DOI":"10.1016\/j.inffus.2019.03.005","article-title":"Information Fusion in Visual Question Answering: A Survey","volume":"52","author":"Zhang","year":"2019","journal-title":"Inf. Fusion"},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"3","DOI":"10.1016\/j.cviu.2017.06.005","article-title":"Visual Question Answering: Datasets, Algorithms, and Future Challenges","volume":"163","author":"Kafle","year":"2017","journal-title":"Comput. Vis. Image Underst."},{"key":"ref_9","doi-asserted-by":"crossref","first-page":"102270","DOI":"10.1016\/j.inffus.2024.102270","article-title":"From Image to Language: A Critical Analysis of Visual Question Answering (VQA) Approaches, Challenges, and Opportunities","volume":"106","author":"Ishmam","year":"2024","journal-title":"Inf. Fusion"},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Gurari, D., Li, Q., Stangl, A.J., Guo, A., Lin, C., Grauman, K., Luo, J., and Bigham, J.P. (2018, January 18\u201323). VizWiz Grand Challenge: Answering Visual Questions from Blind People. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA.","DOI":"10.1109\/CVPR.2018.00380"},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"389","DOI":"10.3233\/JVR-240000","article-title":"Every Day You Are Working You Have to Prove It: Navigating the Costs of Work and Ableism with Visual Impairment","volume":"60","author":"Savin","year":"2024","journal-title":"J. Vocat. Rehabil."},{"key":"ref_12","first-page":"765","article-title":"Fast Retrieval of Multi-Modal Embeddings for E-Commerce Applications","volume":"28","author":"Abluton","year":"2024","journal-title":"Int. J.-Knowl.-Based Intell. Eng. Syst."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"615","DOI":"10.1016\/j.aej.2025.03.005","article-title":"EduVQA: A Multimodal Visual Question Answering Framework for Smart Education","volume":"122","author":"Xiao","year":"2025","journal-title":"Alex. Eng. J."},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"878","DOI":"10.1016\/j.aej.2024.09.059","article-title":"Integrating IoT and Visual Question Answering in Smart Cities: Enhancing Educational Outcomes","volume":"108","author":"Gao","year":"2024","journal-title":"Alex. Eng. J."},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"He, X., Zhang, Y., Mou, L., Xing, E., and Xie, P. (2020). PathVQA: 30000+ Questions for Medical Visual Question Answering. arXiv.","DOI":"10.36227\/techrxiv.13127537.v1"},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"180251","DOI":"10.1038\/sdata.2018.251","article-title":"A Dataset of Clinically Generated Visual Questions and Answers About Radiology Images","volume":"5","author":"Lau","year":"2018","journal-title":"Sci. Data"},{"key":"ref_17","unstructured":"Peng, Y., Liu, F., and Rosen, M.P. (2018, January 10\u201314). UMass at ImageCLEF Medical Visual Question Answering (Med-VQA) 2018 Task. Proceedings of the Working Notes of CLEF 2018\u2014Conference and Labs of the Evaluation Forum (CEUR Workshop Proceedings), Avignon, France. Available online: http:\/\/ceur-ws.org\/Vol-2125\/paper_163.pdf."},{"key":"ref_18","unstructured":"Abacha, A.B., Hasan, S.A., Datla, V.V., Demner-Fushman, D., and M\u00fcller, H. (2019, January 9\u201312). Vqa-med: Overview of the medical visual question answering task at imageclef 2019. Proceedings of the CLEF (Conference and Labs of the Evaluation Forum) 2019 Working Notes, Lugano, Switzerland. Available online: https:\/\/ceur-ws.org\/Vol-2380\/paper_272.pdf."},{"key":"ref_19","unstructured":"Abacha, A.B., Datla, V.V., Hasan, S.A., Demner-Fushman, D., and M\u00fcller, H. (2020, January 22\u201325). Overview of the VQA-Med Task at ImageCLEF 2020: Visual Question Answering and Generation in the Medical Domain. Proceedings of the Working Notes of CLEF 2020\u2014Conference and Labs of the Evaluation Forum (CEUR Workshop Proceedings), Thessaloniki, Greece. Available online: http:\/\/ceur-ws.org\/Vol-2696\/paper_106.pdf."},{"key":"ref_20","unstructured":"Abacha, A.B., Sarrouti, M., Demner-Fushman, D., Hasan, S.A., and M\u00fcller, H. (2021, January 21\u201324). Overview of the VQA-Med Task at ImageCLEF 2021: Visual Question Answering and Generation in the Medical Domain. Proceedings of the Working Notes of CLEF 2021\u2014Conference and Labs of the Evaluation Forum (CEUR Workshop Proceedings), Bucharest, Romania. Available online: http:\/\/ceur-ws.org\/Vol-2936\/paper-87.pdf."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"7378","DOI":"10.1109\/TIP.2022.3180563","article-title":"Weakly Supervised Learning for Textbook Question Answering","volume":"31","author":"Ma","year":"2022","journal-title":"IEEE Trans. Image Process."},{"key":"ref_22","first-page":"14014","article-title":"Enhancing Software Quality in Architecture Design: A Survey-Based Approach","volume":"13","author":"Pargaonkar","year":"2023","journal-title":"Int. J. Sci. Res. Publ."},{"key":"ref_23","doi-asserted-by":"crossref","unstructured":"Ko\u00e7, H., Erdo\u011fan, A.M., Barjakly, Y., and Peker, S. (2021). UML Diagrams in Software Engineering Research: A Systematic Literature Review. Proceedings, 74.","DOI":"10.3390\/proceedings2021074013"},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Ho-Quang, T., Chaudron, M.R.V., Sam\u00faelsson, I., Hjaltason, J., Karasneh, B., and Osman, H. (2014, January 1\u20134). Automatic Classification of UML Class Diagrams from Images. Proceedings of the 21st Asia-Pacific Software Engineering Conference (APSEC 2014), Jeju, Republic of Korea.","DOI":"10.1109\/APSEC.2014.65"},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Bethany, S.R.C., Singh, J., Gupta, M., and Mishra, A. (2021). Automatic Classification of UML Class Diagrams Using Deep Learning Technique: Convolutional Neural Network. Appl. Sci., 11.","DOI":"10.3390\/app11094267"},{"key":"ref_26","doi-asserted-by":"crossref","first-page":"4","DOI":"10.3991\/ijet.v16i21.25105","article-title":"A Proposed Architecture of an Intelligent System for Assessing the Student\u2019s UML Class Diagram","volume":"16","author":"Jebli","year":"2021","journal-title":"Int. J. Emerg. Technol. Learn."},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Shcherban, S., Liang, P., Li, Z., and Yang, C. (2021, January 1\u201310). Multiclass Classification of Four Types of UML Diagrams from Images Using Deep Learning. Proceedings of the 33rd International Conference on Software Engineering and Knowledge Engineering (SEKE 2021), Pittsburgh, PA, USA.","DOI":"10.18293\/SEKE2021-185"},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"452","DOI":"10.1016\/j.procs.2024.05.053","article-title":"Extraction of UML Class Diagrams Using Deep Learning: Comparative Study and Critical Analysis","volume":"236","author":"Babaalla","year":"2024","journal-title":"Procedia Comput. Sci."},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Apostol, D.-C., Bogdan, R., and Marcu, M. (2024, January 25\u201327). UML Diagrams in Teaching Software Engineering Classes. A Case Study in Computer Science Class. Proceedings of the 2024 IEEE 22nd World Symposium on Applied Machine Intelligence and Informatics (SAMI), Star\u00e1 Lesn\u00e1, Slovakia.","DOI":"10.1109\/SAMI60510.2024.10432905"},{"key":"ref_30","doi-asserted-by":"crossref","first-page":"29","DOI":"10.2174\/1874110X01408010029","article-title":"Two-phase Automated Software Measure Approach\u2014From Class Diagram Design to Object-Oriented Metrics","volume":"8","author":"Liu","year":"2014","journal-title":"Open Cybern. Syst. J."},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Saide, M. (2025, January 01). Understanding Object-Oriented Development: Concepts, Benefits, and Inheritance in Modern Software Engineering, SSRN, Available online: https:\/\/ssrn.com\/abstract=4881346.","DOI":"10.2139\/ssrn.4881346"},{"key":"ref_32","doi-asserted-by":"crossref","unstructured":"W\u0105sowski, A., and Berger, T. (2023). Domain-Specific Languages: Effective Modeling, Automation, and Reuse, Springer. [1st ed.].","DOI":"10.1007\/978-3-031-23669-3"},{"key":"ref_33","unstructured":"Lu, P., Qiu, L., Chen, J., Xia, T., Zhao, Y., Zhang, W., Yu, Z., Liang, X., and Zhu, S.-C. (2021). IconQA: A New Benchmark for Abstract Diagram Understanding and Visual Language Reasoning. arXiv."},{"key":"ref_34","doi-asserted-by":"crossref","unstructured":"Koenig, A., Allaert, B., and Renaux, E. (2023, January 1\u20136). NEURAL-UML: Intelligent Recognition System of Structural Elements in UML Class Diagram. Proceedings of the 2023 ACM\/IEEE 26th International Conference on Model Driven Engineering Languages and Systems (MODELS-C), V\u00e4ster\u00e5s, Sweden.","DOI":"10.1109\/MODELS-C59198.2023.00099"},{"key":"ref_35","unstructured":"Shweta, X., Mittal, S., and Chauhan, S. (2023, January 14\u201317). Advancing Class Diagram Extraction from Requirement Text: A Transformer-Based Approach. Proceedings of the 20th International Conference on Natural Language Processing (ICON), Goa University, Goa, India. Available online: https:\/\/aclanthology.org\/2023.icon-1.36\/."},{"key":"ref_36","first-page":"166","article-title":"A Machine Learning Approach to Software Model Refactoring","volume":"44","author":"Sidhu","year":"2022","journal-title":"Int. J. Comput. Appl."},{"key":"ref_37","first-page":"93","article-title":"UML Diagrams Classification with MIMO and SISO Neural Networks","volume":"84","author":"Nedelcu","year":"2022","journal-title":"Sci. Bull. Politeh. Univ. Bucharest Ser. C Electr. Eng. Comput. Sci."},{"key":"ref_38","first-page":"1979","article-title":"Proposal of a Similarity Measure for Unified Modeling Language Class Diagram Images Using Convolutional Neural Network","volume":"14","author":"Jebli","year":"2024","journal-title":"Int. J. Electr. Comput. Eng."},{"key":"ref_39","doi-asserted-by":"crossref","unstructured":"Baumgartner, N., and Pulverm\u00fcller, E. (2024, January 27\u201328). An Extensive Analysis of Data Clumps in UML Class Diagrams. Proceedings of the 19th International Conference on Evaluation of Novel Approaches to Software Engineering (ENASE), Angers, France.","DOI":"10.5220\/0012550500003687"},{"key":"ref_40","doi-asserted-by":"crossref","first-page":"189","DOI":"10.25007\/ajnu.v10n2a1035","article-title":"A Tool to Automate Student UML Diagram Evaluation","volume":"10","author":"Modi","year":"2021","journal-title":"Acad. J. Nawroz Univ."},{"key":"ref_41","doi-asserted-by":"crossref","unstructured":"Bedini, F., Jungebloud, T., Maschotta, R., and Zimmermann, A. (2024, January 21\u201323). An Analysis and Simulation Framework for Systems with Classification Components. Proceedings of the 12th International Conference on Model-Based Software and Systems Engineering (MODELSWARD 2024), Rome, Italy.","DOI":"10.5220\/0012357000003645"},{"key":"ref_42","first-page":"467","article-title":"Complexity Metrics for Quality Assessment of Object-Oriented Design","volume":"9","author":"Hopkins","year":"1994","journal-title":"Trans. Inf. Commun. Technol."},{"key":"ref_43","unstructured":"Perepletchikov, M. (2010). Software Design Metrics for Predicting Maintainability of Service-Oriented Software. [Ph.D. Thesis, RMIT University]."},{"key":"ref_44","doi-asserted-by":"crossref","unstructured":"Heri\u010dko, T., and \u0160umak, B. (2023). Exploring Maintainability Index Variants for Software Maintainability Measurement in Object-Oriented Systems. Appl. Sci., 13.","DOI":"10.3390\/app13052972"},{"key":"ref_45","unstructured":"Liubchenko, V. (2024, January 28). Machine Learning Techniques for Predicting Software Code Properties Using Design Metrics. Proceedings of the 5th International Workshop on Intelligent Information Technologies & Systems of Information Security (IntelITSIS 2024), CEUR Workshop Proceedings, Khmelnytskyi, Ukraine."},{"key":"ref_46","unstructured":"Rodriguez, D., and Harrison, R. (2001). An Overview of Object-Oriented Design Metrics, Department of Computer Science, University of Reading. Technical Report RUCS\/2001\/TR\/A."}],"container-title":["Software"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2674-113X\/4\/4\/22\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T18:47:40Z","timestamp":1760035660000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2674-113X\/4\/4\/22"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,9,23]]},"references-count":46,"journal-issue":{"issue":"4","published-online":{"date-parts":[[2025,12]]}},"alternative-id":["software4040022"],"URL":"https:\/\/doi.org\/10.3390\/software4040022","relation":{},"ISSN":["2674-113X"],"issn-type":[{"value":"2674-113X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,9,23]]}}}