Software architecture plays an important role in software development, especially in software quality and maintenance. Understanding the impact of certain architectural patterns on software quality and verification of software requirements has become increasingly difficult with the increasing complexity of codebases in recent years. Researchers over the years have proposed automated approaches based on machine learning. However, there is a lack of benchmark datasets and more accurate machine learning (ML) approaches. This paper presents an ML-based approach for software architecture detection, namely, MVP (Model–View–Presenter) and MVVM (Model–View–ViewModel). Firstly, we present a labeled dataset that consists of 5973 data points retrieved from GitHub. Nine ML methods are applied for detection of software architecture from source code metrics. Using precision, recall, accuracy, and F1 score, the outstanding ML model performance is 83%, 83%, 83%, and 83%, respectively. The ML model’s performance is validated using k-fold validation (k = 5). Our approach outperforms when compared with the state-of-the-art.
Unsupervised anomaly detection is an important area of research to find abnormal behavior and integral part of many systems. In this research, a lightweight deep autoencoder based approach is presented to detect anomalies in unsupervised manner. It has the ability to learn the model over the normal patterns and any deviation is considered as an anomaly. Consequently, it can relax the condition to have anomalous data patterns during the training phase of the model. In this work, we examine lightweight autoencoder for anomaly detection task in order to show that simple architecture can show good performance in terms of training, testing time, number of parameters and metrics. We apply autoencoder for binary classification problem (i.e., each data point considered either normal or abnormal). The reconstruction error is used to detect anomalies. The experiments are carried out over the particular class of cyber security domain known as intrusion detection systems. We evaluated our model on standard publicly available benchmarks of KDD-99, NSL-KDD and UNSW-NB15 and achieved F1-score of 0.96, 0.88 and 0.95, respectively. It outperforms by a considerable margin when compared to state-of-the-art methods.