{'fraction_non_alphanumeric': 0.02642222642222642, 'fraction_numerical': 0.012474012474012475, 'mean_word_length': 5.203048065650645, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A New Combined Model with Reduced Label Dependency for Malware Classification

With the technological advancements in recent times, security threats caused by malware are increasing with no bounds. The first step performed by security analysts for the detection and mitigation of malware is its classification. This paper aims to classify network intrusion malware using new-age machine learning techniques with reduced label dependency and identifies the most effective combination of feature selection and classification technique for this purpose. The proposed model, L2 Regularized Autoencoder Enabled Ladder Networks Classifier (RAELN-Classifier), is developed based on a combinatory analysis of various feature selection techniques like FSFC, variants of autoencoders and semisupervised classification techniques such as ladder networks. The model is trained and tested over UNSW-NB15 and benchmark NSL-KDD datasets for accurate real time model performance evaluation using overall accuracy as well as per-class accuracy and was found to result in higher accuracy compared to similar baseline and state-of-the-art models.


INTRODUCTION
Malware, defined as a software that is added or modified in a system to intentionally cause harm, is a generic term that encloses all Trojans, viruses, spyware etc. [1]. Though most of the malwares have network activity while performing attacks, the malwares that corrupt the network systems and exploit network protocols are termed as network malwares. The damage caused by these malwares to the network system, resources, and node systems point out the need for early detection, which includes identification, analysis and mitigation mechanisms [2][3].
Network intrusion malwares can be broadly classified based on their attack types such as illegal access to root user credentials, denial of system services, etc. [4]. However, manually observing and labelling each program running on a system when generating a large dataset, with its corresponding subclass is a highly tedious task involving inaccuracies. Therefore, it is practical to devise an approach that can automate this classification task [5].
The proposed model, L2 Regularized Autoencoder Enabled Ladder Networks Classifier (RAELN-Classifier), aims to facilitate the classification phase of network intrusion malware attacks mitigation process [6]. It identifies the various classes of the malware files using new age machine learning techniques, having reduced label dependency, with promised accuracy in real time situations [7][8]. It comprises of a novel combined unsupervised feature selection and semisupervised multi-class classification technique that is trained and tested on the UNSW-NB15 and NSL-KDD benchmark datasets. The performance of the combination is compared with other fully-supervised baseline and state-of-the-art classification algorithms, with and without prior feature selection [9]. Overall and per-class classification accuracies are compared to validate the best combination of feature selection and classification model. The novel combination in the proposed model is chosen after a series of experiments performed using combinations of feature selection algorithms like FSFC, autoencoder based techniques with supervised and semi-supervised classification techniques such as ladder networks [10][11][12]. the unlabelled datasets. A slight modification of unsupervised learning is semi-supervised learning, where only some samples in the input data are labelled. The algorithms of this branch find patterns within the features on the labelled samples to produce suitable output labels on the unlabelled samples. This approach is useful when there is a dearth of labelled data available for training and the model performance is expected to be at par with supervised learning.

Undercomplete Autoencoders
An autoencoder [13] is an unsupervised machine learning model based on artificial neural networks that is commonly used for dimensionality reduction purposes. The architecture of such networks consists of two parts: an encoder and a decoder. The encoder compresses the input x to a latent-space representation using an encoding function h = f(x). When the dimension of this representation is smaller than that of the input, it is said to be under complete. The decoder has a layer configuration opposite to that of the encoder and decodes this latent space representation to reconstruct the original input using the decoding function x'= g(h). x' here refers to the reconstructed input. The mean squared error of x' with the original input x is used to calculate the loss of the network. Autoencoders adjust the model hyperparameters to reduce this reconstruction loss, Equation (1), on the data where the innermost hidden layer contains a number of nodes equal to the desired number of features to obtain a suitable latent-space representation with reduced dimensionality.
Thus, those features with the highest weights at the end of the training process reflect their importance in describing the data. They are the most relevant and must be chosen.

FSFC
Feature-Selection based Feature Clustering (FSFC), is an unsupervised feature clustering algorithm that groups features based on their similarity and importance [14]. In order to find the similarity between two features Fi and Fj , their Symmetric Uncertainty (SU) is calculated (2)) is the information gain of feature Fi when Fj is observed, and H(F) (Equation (3)) is the entropy value of the feature F.
To reflect the degree of redundancy of feature Fi with its k nearest neighbours, the density of kNN (DkNN) is Among all features that are cluster centres (in set Fc), the pair having the minimum distance between them or alternatively having the highest symmetric uncertainty gives the minimum cluster centre distance maxSU(Fc).
Symmetric Uncertainty (SU) is calculated for each pair of features and the feature set is ordered based on decreasing values of DkNN. The feature with the highest DkNN is selected as the first cluster centre. If a new feature F is not in the kNN of a cluster centre and vice versa, the feature is selected as a new cluster centre and the maxSU(Fc) is updated as the maximum of the SU between the feature F and the existing cluster centres if greater than the existing SU value. Next, the redundant features not in Fc are distributed into clusters by comparing their SU with the maxSU of each of the other cluster centres. This leads to formation of the clusters. Finally, to find the representative feature of each cluster, the average redundancy of each feature within a cluster C is calculated as , where n is the number of features in the cluster. The feature with the highest AR in cluster C will contain the most information and will serve as the representative.

Ladder Networks
Ladder Networks [15] is a popular deep learning architecture that is used to identify and represent more relevant and abstract hierarchical structures that are present within the inputs but cannot be identified directly. They learn by training the latent variables using both inferences and posterior probabilities, thus combining supervised and unsupervised learning in a principled way. They consist of encoder and decoder networks similar to that in autoencoders. However, the networks have skip connections between them, that is, every layer in the encoder is connected to its corresponding layer in the decoder directly as well as through the other layers in between. The skip connections ensure no data is lost during representation. The ladder networks are designed in a way that two different pathways handle the labelled and unlabelled samples for supervised learning and unsupervised learning respectively. These pathways are called Labelled Samples pathway and Unlabelled samples pathway.

RELATED WORK
Recent methods proposed for malware classification include [16] and [17] that use new-age image based deep learning techniques. The models are tested over benchmark dataset, Microsoft Malware Classification Challenge (BIG-2015). However, the model learns from highly labelled datasets, with no feature selection prior to classification.
Combination of feature selection and classification techniques is proposed in [18], with deep convolutional neural network-based feature extractor and Support Vector Machine based classifier. A combination of various feature selection techniques with supervised classification models are compared in [19]. However, all of these methods rely on the actual classes of the samples to find patterns within the features whereas in real life it is a highly tedious task to manually observe and label each of the running programs on a system. A semi-supervised transfer learning model for cloud malware classification with no feature selection was proposed in [20]. The model was trained and tested on Kaggle datasets, resulting in highly accurate malware classification. It was trained on limited labelled training samples with no feature extraction, gave high accuracy, thereby rendering semi-supervised learning a better option for malware classification.
State-of-the-art supervised classifiers such as Random Forest, Naïve Bayes have given good average accuracy on multi-class classification use cases, with highly imbalanced datasets and extensive number of features. The network intrusion malware datasets used for the experiments in this paper have similar dataset structure with those used in [22], having high feature dependency and multiple classes, thus these state-of-theart classifiers will be compared with the proposed RAELN-Classifier model.
Multi class classification using ladder networks on the KDD dataset was performed in [21] with minimal classes. This semi-supervised approach was compared against standard supervised learning techniques such as Random Forest and Support Vector Machine models. However, experiments were done using a 50% labelled dataset having fewer samples (around 5000 samples) without any prior feature selection. Dataset classes were modified based on number of training samples considered notwithstanding the class imbalance problem, with no supervised baseline ladder networks used for comparison to state how reduced label dependency is an advantage over its supervised counterpart.
Similar effort is seen in [23] which proposed a ladder network-based intrusion detection system. However, there is no comparison with supervised counterparts and no mention of feature selection algorithms used. The wireless network intrusion malware dataset used in the paper was also not imbalanced. The combination of semisupervised learning and deep neural networks with pseudo labels and ladder networks is tested in [24]. Their proposed combined model was tested on benchmark NSL-KDD to check the efficacy of the model. However, feature selection was not performed prior to the classification, and pseudo-labelling is not always reliable as it causes confirmation-bias [25]. Therefore, a combined unsupervised feature selection and semi-supervised classification model having reduced label dependency, as proposed in this paper, can effectively classify network intrusion malware even with fewer labelled samples, on a larger training and testing set (around 1,50,000 samples) with a higher accuracy.

PROPOSED MODEL
RAELN-Classifier is a combination of feature selection and classification model for classifying network intrusion malware, which is trained and tested on UNSW-NB15 and NSL-KDD datasets. This combination is selected after a series of experiments with new-age techniques, mentioned in Section 1, and comparing the results with baseline and state-of-art models based on overall and per-class classification.

Datasets
Experiments are performed on the following two network intrusion malware datasets:

UNSW-NB15 Dataset
UNSW-NB15 [26] was developed to efficiently evaluate the Network Intrusion Detection System against network behaviours. The dataset generation architecture consists of a traffic generator called IXIA, a pcap file capturer called Tcpdump tool, and a few feature extractors like Argus and Bro-IDS. These features are matched and are grouped as basic, content and time. Additional features are also generated with this matching process, that can help detect stealth and multi-flow attacks. Followed by the feature generation process, the features are associated with labels determining whether they are legitimate or malicious. The dataset is labelled into 9 classes, namely Fuzzers, Backdoor, Analysis, DoS, Exploit, generic, Reconnaissance, worms, and shellcode and 1 benign or normal class. UNSW-NB15 stands out from other datasets with clear metrics like realistic network configuration, labelled observations, full packet capture, etc. Comparison based on these metrics reveals that this dataset is better than KDD99, NSL-KDD, CAIDA, DEFCON, ISCX, DARPA 2009 [27].

NSL-KDD Benchmark Dataset
NSL-KDD [28] is a benchmark dataset for internet traffic, consisting of 4 subsets which include the training and testing sets. The records are a consolidated statistic of 43 features of which the last two are labels determining whether an input is malicious and if yes, what is its severity. The first 41 features can be broadly categorized into 4 groups namely, Intrinsic, Content, Host-based and Time-based. The dataset has a total of 39 sub-classes, each of which belongs to one of the 4 attack classes in Figure 1, DoS (Denial of Service) where a system is rendered unavailable for users by sending multiple requests, Probe which is the stealing of personal information, U2R (User to Root), a privilege escalation attack and R2L (Remote to Local) where local access is obtained over a remote system. The dataset is preprocessed to generalize these subclasses to reduce discrepancies in the prediction as the training set contains 22 sub-classes whereas the testing set contains 39 subclasses.

Data Pre-processing
The datasets consist of categorical features which need to be converted to numeric values. To deal with the huge range in values, the features are normalized using their mean(µ) and standard deviation(σ). The labels are one-hot integer encoded (converted to binary-valued vectors with sizes equal to the total number of classes in the dataset, with each position containing 0 by default and 1 if the label belongs to a particular class) to make classification easier. Feature selection algorithm, FSFC [14] uses entropy to calculate the feature importance which needs discrete values whereas the normalized feature values are continuous. To address this discrepancy, each of the feature values are discretized into six integer values based on the ranges between µ ± 1.5σ, µ ± σ, µ ± 0.5σ and µ of their respective features.

Unsupervised Feature Selection
Redundant features within the dataset reduces the model performance and may lead to overfitting during training as explained in [13]. Hence, Principal Component Analysis (PCA) is done to determine the optimal number of features required.
From Figure 2, the point in the PCA graph at which the variance curvature decreases and becomes almost linear gives the ideal number of features that can effectively classify the data as explained in [29]. As a result, in the UNSW-NB15 dataset (with 43 features) and the NSL-KDD dataset (with 41 features), the selection of 25-35 features can help preserve around 98-99% of the variance in the data.
Therefore, approximately 25-35 most relevant features are selected by utilizing the two unsupervised feature selection approaches, that are autoencoder-based [13] and a relatively new clustering algorithm known as FSFC [14] mentioned in Section 1.2 and 1.3 respectively. To obtain the most relevant features to ensure higher accuracy, these algorithms find correlations between the features in a way that is independent of the class labels.

Autoencoder-based Feature Selection
Undercomplete autoencoders, as explained in Section 1.2 can be used for unsupervised feature selection. The performance of 4 variants of autoencoders, based on their reconstruction loss and variance in weights are compared. The Autoencoder AE, only minimizes reconstruction loss which might lead to overfitting [23] during classification. To address this problem, regularization terms are introduced, that provide additional information in the calculation of the loss function. These terms are calculated based on the L1 and L2 norms of the weight vectors between the hidden layers of the autoencoder.
The L1 regularization, also known as lasso regularization is the linear norm of the weight vectors, and the L2 regularization, known as ridge regularization is the Euclidean norm of the weight vectors, as explained in the Equations (4) and (5) Thus, two new variants of the autoencoders AE_L1 and AE_L2 are created that minimize their respective loss functions as follows: The fourth autoencoder variant (AE_Dropout) makes use of dropout regularization, that does not consider weight values in a vector that fall below a threshold probability value (0.8) in the calculation of the loss. This variation is included in the weight vector leading to the innermost hidden layer. This loss is denoted as lossdropout.
All the 4 variants were trained on both the datasets and the observations are recorded in Table 1. From the table, AE has the least reconstruction loss with a good convergence and can find feature importance within a small variation range. AE_L2 has a slightly higher reconstruction loss, which implies that it is able to generalize over the input data better using the regularization term and can reduce overfitting. Therefore, in the experiments, autoencoder variants (AE and AE_L2) will be considered for feature selection.

FSFC-based Feature Selection
FSFC algorithm is used to compare the performance of the two autoencoder variants in combination with a specific classifier on the final multi-class classification task. This algorithm performs unsupervised feature selection based on KNN clustering as mentioned in Section 1.3.

Overview of the Training Approach
As part of the experiments, models with the above feature selection algorithms (AE, AE_L2 and FSFC) in combination with semi-supervised ladder networks (discussed in Section 1.4) will be trained and tested, of which AE_L2 with semi-supervised ladder networks will form our proposed RAELN-Classifier model. Also, the performance of ladder networks without prior feature selection is observed. Each model will input data from the features that are selected using one of the above feature selection algorithms which will then be passed to the ladder network along with the available sample labels for classification. Within the ladder network, samples will be passed to labelled or unlabelled pathways depending on the availability of target labels. As the network contains both the encoder and decoder parts of the architecture, it will adjust its hyperparameter values to minimize the total labelled and unlabelled cost and ultimately obtain a good accuracy on both training and testing sets. Baseline approaches are also designed, with fully-supervised ladder networks, with and without prior feature selection.
The aim of the baseline models will only be to minimize the labelled cost in their ladder networks by adjusting their hyperparameter values, so they will only contain the encoder for their labelled pathway. The accuracy obtained by these baseline models on the training and testing sets will be used to compare the performance and decide on the best combined feature selection and classification model suitable for the intended task. Additionally, the performance of the Random Forest and Naïve Bayes state-of-the-art models with and without prior feature selection is compared to highlight the advantage offered by the proposed RAELN-Classifier combined model, in terms of better accuracy obtained.

Training Model Settings
The model is trained on the UNSW-NB15 dataset and NSL-KDD benchmark dataset separately. In the UNSW-NB15 dataset, 75% (1,50,000 samples) of the data is used for training and 25% (50,000 samples) is used for testing. A similar train-test split ratio is used with the NSL-KDD dataset where 1,20,000 samples and 40,000 samples are used for training and testing respectively. In the semisupervised setting, only the class labels of the first 5000 samples in the training set are considered for calculating the labelled cost and the rest of the samples are used to calculate the unlabelled cost, whereas, in the supervised setting, the class labels of all samples in the training set are considered to calculate only the labelled cost. The experiments were performed on Windows 10 64bit Intel(R) Core(TM) i5-7200U CPU (2.71GHz) with 8GB RAM and an NVIDIA GeForce 940MX GPU with 6GB memory. The NumPy, scikit-learn, pandas and Matplotlib Python libraries were commonly used for all the above settings. TensorFlow Python library [30] was used to implement the autoencoders and ladder network models using the GPU. To avoid training bias over the same set of samples, training data is shuffled randomly. The autoencoders are trained with an initial learning rate of 0.01 that decays by 30% in every 25 epochs and all layers use the ELU activation function. For the ladder networks, initial learning rate is set to be 0.005 with a decay of 4% for every 50 epochs. All layers except the last use the ELU for activation, the last layer uses the softmax function.

RESULTS AND DISCUSSION
The performance of the models having combinations of unsupervised feature selection algorithms with semisupervised ladder networks for multi-class classification are compared with that of baseline models of fullysupervised ladder networks and state-of-the-art supervised ML classification algorithms such as Random Forest and Naive Bayes Classifiers [21,22,31,32] with and without prior feature selection for the classification task (Refer Section 3.4 for details). This is done so that a conclusion can be drawn about the best feature selector and classification model combination suitable for the multi-class classification.
The performance metrics used for comparing the models are average sample accuracy and average perclass accuracy on the training and testing sets. Average sample accuracy is the ratio of correctly predicted samples to the total number of samples. Per-class accuracy is important to evaluate the model performance in terms of generalization capability over an imbalanced dataset.
From the results in Table 2, the proposed combined model of the AE_L2 Regularized Autoencoder feature selector with semi-supervised Ladder Networks (RAELN-Classifier) gives the best average testing accuracy of 81.06% on the UNSW-NB15 dataset, having 10 classes, ensuring minimum model overfitting among all other combinations. It performs better than the corresponding supervised baseline model in all cases (80.676% on the UNSW-NB15 dataset), and when compared with the state-of-the-art Random Forest (74.744%) and Naïve Bayes (53.784%) classifier models. The performance of the proposed RAELN-classifier model is also better than semi-supervised Ladder Networks without prior feature selection (64.592%), highlighting the efficacy of the model for the required classification task.
The average testing accuracy of RAELN-Classifier is comparable to that of semi-supervised Ladder Networks classifier without prior feature selection in Table 3, on the benchmark NSL-KDD dataset having 5 classes (74.709% and 76.227% respectively). This can be attributed to the fact that fewer classes in a relatively balanced dataset such as in NSL-KDD [33] make it easier for the model to identify patterns among the features whereas with more classes, this task becomes more difficult, hence describing why feature selection prior to classification does not provide a major advantage with the NSL-KDD benchmark dataset. To generalize over a larger number of classes, even when they have unequal or imbalanced representations, such as in the UNSW-NB15 dataset, the patterns identified over the dataset features by the model would need to be more specific and accurate, hence prior feature selection in RAELN-Classifier proves to be beneficial [34].   Moreover, with malware evolving every day, classifying them into broad classes, such as in NSL-KDD, cannot be of much help in malware mitigation process.
The average per class training and testing accuracies obtained by the proposed RAELN-Classifier and baseline fully-supervised ladder network models (with AE_L2 feature selector) on the UNSW-NB15 dataset are presented in Table 4. It can be observed that RAELN-Classifier gives better average per class accuracies (44.328% on training and 44.57% on testing) than the baseline supervised model (42.48% on training and 42.632% on testing). The backdoor and worm classes have 0.0% accuracy due to their minimal representation in the dataset (around 0.01% of the samples) [35][36][37], which reflected during training, thus explaining why the model was not able to sufficiently generalize over these classes with less representation as well.
Therefore, based on evaluations using both the performance metrics, it can be observed that the proposed combined model of the regularized AE_L2 autoencoder in combination with semi-supervised Ladder Networks

CONCLUSION
Malware programs are increasing at an alarming rate that leads to massive monetary and data losses to user bases. It, therefore, becomes imperative to analyse and classify such malware at the earliest. To address the problem, a novel combined model with reduced label dependency is proposed to perform multi-class network intrusion malware classification. From the results obtained on the experiments, it is concluded that the proposed RAELN Classifier, gave better results than state-of-the-art and baseline supervised classification algorithms implemented for the same task, with and without prior feature selection. As future work, other possible semi-supervised approaches such as spectral graph transducer and Gaussian fields for classification, in combination with prior feature selection will be explored and evaluated based on same performance metrics.

ACKNOWLEDGMENTS
We would like to thank the management and administrative members of Vellore Institute of Technology for giving us the opportunity and required resources to implement the project and prepare this research article.