Bayesian Optimization With Machine Learning Algorithms Towards Anomaly Detection
Bayesian Optimization With Machine Learning Algorithms Towards Anomaly Detection
Email: [email protected]
Abstract—Network attacks have been very prevalent as their [5]. On the other hand, anomaly-based detection systems rely
rate is growing tremendously. Both organization and individuals on the hypothesis that abnormal behavior differs from normal
are now concerned about their confidentiality, integrity and behavior. Therefore, any deviation from what is considered as
availability of their critical information which are often impacted
by network attacks. To that end, several previous machine normal is classified as anomalous or intrusive. Such systems
learning-based intrusion detection methods have been developed typically build models based on normal patterns and hence
to secure network infrastructure from such attacks. In this are capable of detecting unknown behaviors or intrusions
paper, an effective anomaly detection framework is proposed [6]. Although previous work on IDSs has shown promising
utilizing Bayesian Optimization technique to tune the parameters improvement, intrusion detection problem remains a prime
of Support Vector Machine with Gaussian Kernel (SVM-RBF),
Random Forest (RF), and k-Nearest Neighbor (k-NN) algorithms. concern, especially given the high volume of network traffic
The performance of the considered algorithms is evaluated data generated, the continuously changing environments, the
using the ISCX 2012 dataset. Experimental results show the plethora of features collected as part of training datasets (high
effectiveness of the proposed framework in term of accuracy dimensional datasets), and the need for real-time intrusion
rate, precision, low-false alarm rate, and recall. detection [7]. For instance, high dimensional datasets can have
Index Terms—Bayesian Optimization, network anomaly detec-
tion, Machine Learning (ML), ISCX 2012. irrelevant, redundant, or highly correlated features. This can
have a detrimental impact on the performance of IDSs as it
can slow the model training process. Additionally, choosing
I. I NTRODUCTION
the most suitable subset of features and optimizing the corre-
Computer networks and the Internet have become an essen- sponding parameters of the detection model can help improve
tial component of any organization in this high-tech world. its performance significantly [8].
Organizations heavily depend on their networks to conduct In this paper, we propose an effective intrusion detection
their daily work. Moreover, individuals are also dependent framework based on optimized machine learning classifiers in-
on the Internet as a means to communicate, conduct busi- cluding Support Vector Machine with Gaussian kernel (SVM-
ness, and store their personal information [1]. The topic of RBF), Random Forest (RF), and k-Nearest Neighbors (k-NN)
Cyber-security has garnered significant attention as it greatly using Bayesian Optimization (BO). These techniques have
impacts many entities including individuals, organizations, been selected based on the nature of the selected dataset,
and governmental agencies. Organizations have become more i.e. SVM-RBF is selected because the data is not linearly
concerned with their network security and are allocating more separable. Additional details about the utilized techniques are
resources to protect it against potential attacks or anomalous presented in section III. This is done to provide a robust
activities. Traditional network protection mechanisms have and accurate methodology to detect anomalies. The con-
been proposed such as adopting firewalls, authenticating users, sidered methods are titled BO-SVM, BO-RF, and BO-kNN
and integrating antivirus and malware programs as a first respectively. The performance is evaluated and compared by
line of defense [2]. Nonetheless, these mechanisms have not conducting different experiments with the ISCX 2012 dataset
been as efficient in providing complete protection for the that was collected from University of New Brunswick [9]. As
organizations’ networks, especially with contemporary attacks mentioned in Wu and Banzhaf [5], a robust IDS should have
[3]. a high detection rate/recall and a low false alarm rate (FAR).
Typical intrusion detection systems (IDSs) can be cate- Despite the fact that most of intrusion detection methods
gorized into two main types, namely signature-based detec- have high detection rate (DR), they suffer from higher FAR.
tion systems (misused detection) and anomaly-based detection Thus, this paper utilizes optimized machine learning models
systems [4]. Signature-based detection systems compare the to minimize the objective function that will maximize the
observed data with pre-defined attack patterns to detect intru- effectiveness of the considered methods. Totally, the feasibility
sion. Such systems are effective for attacks with well-known and efficiency of these optimized methods is compared using
signatures and patterns. However, these systems miss new various evaluation metrics such as accuracy (acc), precision,
attacks due to the ever-changing nature of intrusion attacks recall, and FAR. Furthermore, the performance of the three
an
rm
Observed points
ea
processing time. Model mean
sp
Next point
n
ea
Model minimum feasible
lid
uc
se
i
sk
w
ko
Objective function model
in
m
103
is
ob
Observed points
an
al
Model mean
ah
Next point
d
ar
Model minimum feasible
cc
102
ja
g
in
m
m
ha
n
101
ea
id
cl
eu
ne
si
co
100
n
io
t
la
rre
co
v
he
yc
10-1
eb
ch
k
100 101 102 103 104
oc
bl
ty
ci
10-2
Training Testing
Classifier Acc(%) Precision Recall FAR Acc(%) Precision Recall FAR
SVM-RBF 99.58 0.994 0.999 0.011 99.59 0.995 0.999 0.010
K-NN (k=5) 99.59 0.9965 0.998 0.008 99.36 0.994 0.996 0.012
RF 99.96 0.999 1.00 0.001 99.88 0.998 0.999 0.002
BO-SVM 99.95 0.999 1.00 0.001 99.84 0.998 0.999 0.003
BO-k-NN 99.98 0.999 1.00 0.001 99.93 0.999 0.999 0.001
BO-RF 99.98 0.999 1.00 0.001 99.92 0.999 0.999 0.001
0.3
0.04
0.25
Min objective
0.03
0.2
Min objective
0.15 0.02
0.1
0.01
0.05
0
0 5 10 15 20 25 30
Function evaluations
0
0 5 10 15 20 25 30
Function evaluations
anomaly detection system with high accuracy rate and a [12] W. Li, P. Yi, Y. Wu, L. Pan, and J. Li, “A new intrusion detection system
low false positive rate, BO was able to improve the utilized based on knn classification algorithm in wireless sensor network,”
Journal of Electrical and Computer Engineering, vol. 2014, 2014.
classifiers. The experimental results show not only is the [13] S. Aljawarneh, M. Aldwairi, and M. B. Yassein, “Anomaly-based in-
proposed optimization method more accurate in detecting trusion detection system through feature selection analysis and building
intrusions, but also it can find the global minimum of the hybrid efficient model,” Journal of Computational Science, 2017.
[14] Y. Y. Chung and N. Wahid, “A hybrid network intrusion detection system
objective function which leads to better classification results. using simplified swarm optimization (sso),” Applied Soft Computing,
Overall, k-NN with Bayesian optimization has achieved the vol. 12, no. 9, pp. 3014–3022, 2012.
optimum performance on ISCX 2012 dataset in terms of [15] F. Kuang, W. Xu, and S. Zhang, “A novel hybrid kpca and svm with
ga model for intrusion detection,” Applied Soft Computing, vol. 18, pp.
accuracy, precision, recall, and false alarm rate. In order to 178–184, 2014.
further improve the performance of the proposed approach, we [16] J. Zhang, M. Zulkernine, and A. Haque, “Random-forests-based network
plan to involve feature selection and parameter setting applied intrusion detection systems,” IEEE Transactions on Systems, Man, and
Cybernetics, Part C (Applications and Reviews), vol. 38, no. 5, pp. 649–
simultaneously in the optimization method. Moreover, the 659, 2008.
results of the proposed approach will be further improved by [17] A. J. Malik and F. A. Khan, “A hybrid technique using multi-objective
combining both supervised and unsupervised machine learning particle swarm optimization and random forests for probe attacks
detection in a network,” in Systems, Man, and Cybernetics (SMC), 2013
techniques to detect novel attacks with additional datasets such IEEE International Conference on. IEEE, 2013, pp. 2473–2478.
as the new release of the ISCX dataset. [18] I. S. Thaseen and C. A. Kumar, “Intrusion detection model using fusion
of chi-square feature selection and multi class svm,” Journal of King
Saud University-Computer and Information Sciences, vol. 29, no. 4, pp.
R EFERENCES 462–472, 2017.
[19] H. Bostani and M. Sheikhan, “Modification of supervised opf-based
[1] C.-F. Tsai, Y.-F. Hsu, C.-Y. Lin, and W.-Y. Lin, “Intrusion detection by intrusion detection systems using unsupervised learning and social
machine learning: A review,” Expert Systems with Applications, vol. 36, network concept,” Pattern Recognition, vol. 62, pp. 56–72, 2017.
no. 10, pp. 11 994–12 000, 2009. [20] W. Meng, W. Li, and L.-F. Kwok, “Design of intelligent knn-based alarm
[2] M. B. Salem, S. Hershkop, and S. J. Stolfo, “A survey of insider attack filter using knowledge-based alert verification in intrusion detection,”
detection research,” in Insider Attack and Cyber Security. Springer, Security and Communication Networks, vol. 8, no. 18, pp. 3883–3895,
2008, pp. 69–90. 2015.
[3] W. Bul’ajoul, A. James, and M. Pannu, “Improving network intrusion [21] M. Injadat, F. Salo, and A. B. Nassif, “Data mining techniques in
detection system performance through quality of service configuration social media: A survey,” Neurocomputing, vol. 214, pp. 654 – 670,
and parallel technology,” Journal of Computer and System Sciences, 2016. [Online]. Available: http://www.sciencedirect.com/science/article/
vol. 81, no. 6, pp. 981–999, 2015. pii/S092523121630683X
[4] S. M. H. Bamakan, B. Amiri, M. Mirzabagheri, and Y. Shi, “A new [22] A. J. Malik, W. Shahzad, and F. A. Khan, “Binary pso and random
intrusion detection approach using pso based multiple criteria linear forests algorithm for probe attacks detection in a network,” in 2011
programming,” Procedia Computer Science, vol. 55, pp. 231–237, 2015. IEEE Congress of Evolutionary Computation (CEC), June 2011, pp.
[5] S. X. Wu and W. Banzhaf, “The use of computational intelligence in 662–668.
intrusion detection systems: A review,” Applied soft computing, vol. 10, [23] E. Brochu, V. M. Cora, and N. De Freitas, “A tutorial on bayesian
no. 1, pp. 1–35, 2010. optimization of expensive cost functions, with application to active
[6] H.-J. Liao, C.-H. R. Lin, Y.-C. Lin, and K.-Y. Tung, “Intrusion detection user modeling and hierarchical reinforcement learning,” arXiv preprint
system: A comprehensive review,” Journal of Network and Computer arXiv:1012.2599, 2010.
Applications, vol. 36, no. 1, pp. 16–24, 2013. [24] M. Salem and U. Buehler, “Mining techniques in network security to
[7] S. Suthaharan, “Big data classification: Problems and challenges in net- enhance intrusion detection systems,” arXiv preprint arXiv:1212.2414,
work intrusion prediction with machine learning,” ACM SIGMETRICS 2012.
Performance Evaluation Review, vol. 41, no. 4, pp. 70–73, 2014. [25] M. H. Tang, C. Ching, S. Poon, S. S. Chan, W. Ng, M. Lam, C. Wong,
[8] J. Zhang and M. Zulkernine, “Anomaly based network intrusion de- R. Pao, A. Lau, and T. W. Mak, “Evaluation of three rapid oral fluid test
tection with unsupervised outlier detection,” in Communications, 2006. devices on the screening of multiple drugs of abuse including ketamine,”
ICC’06. IEEE International Conference on, vol. 5. IEEE, 2006, pp. Forensic science international, 2018.
2388–2393. [26] H. Huang, R. S. Khalid, W. Liu, and H. Yu, “Work-in-progress: a fast
online sequential learning accelerator for iot network intrusion detec-
[9] A. Shiravi, H. Shiravi, M. Tavallaee, and A. A. Ghorbani, “Toward
tion,” in Hardware/Software Codesign and System Synthesis (CODES+
developing a systematic approach to generate benchmark datasets for
ISSS), 2017 International Conference on. IEEE, 2017, pp. 1–2.
intrusion detection,” Computers Security, vol. 31, no. 3, pp. 357 –
[27] W. Yassin, N. I. Udzir, Z. Muda, M. N. Sulaiman et al., “Anomaly-
374, 2012. [Online]. Available: http://www.sciencedirect.com/science/
based intrusion detection through k-means clustering and naives bayes
article/pii/S0167404811001672
classification,” in Proc. 4th Int. Conf. Comput. Informatics, ICOCI,
[10] F. Kuang, W. Xu, and S. Zhang, “A novel hybrid kpca and svm with
no. 49, 2013, pp. 298–303.
ga model for intrusion detection,” Applied Soft Computing, vol. 18, pp.
178–184, 2014.
[11] A. S. Eesa, Z. Orman, and A. M. A. Brifcani, “A novel feature-selection
approach based on the cuttlefish optimization algorithm for intrusion
detection systems,” Expert Systems with Applications, vol. 42, no. 5,
pp. 2670–2679, 2015.