We compare our method with the method pro-
posed in the work of (Kabir, 2014) and (Gao and
Wang, 2006). For this purpose we had to make two
different subsets of KDD99 to make the environment
comparable to each of their methods.
The data has attack type feature, which has cat-
egorical values: NORMAL, DOS, Probe, U2R and
R2L. To correctly reflect the arrangements of (Kabir,
2014), the data was partitioned into four different data
sets D1,..,D4, each containing instances of normal
data and one type of attack data. For example the
D1 data set consists of normal and DoS instances. To
make our data compatible with RLS classifier we have
converted the categorical data into numerical data and
normalized all the samples to have unit norm. Since
the kernel approximation parameters are different for
each combination of the four classes of attacks, in this
paper we have constructed four different predictors,
one for each of these attack classes.
Our Environment consists of Python 2.7, 3.8 G
RAM, Dual Core Dell Processor, CPU 2.26 GHz. We
run the program 10 times with different train subsets
and report average results of the RLS learner. We
give Precision, Recall and F-value results of Fast
k-means RLS algorithm, and the training and testing
times of our method.
3.1 First Experiment
In this Section we will compare our Fast KM-RLS
method to the other two methods of intrusion detec-
tion. First is the Layered approach using Conditional
Random Fields presented by (Gupta et al., 2010) and
second is the OA-LS-SVM IDS frame work presented
by (Kabir, 2014). We chose the training and testing
partitions similar to theirs to make the results compa-
rable. We focus on improving the IDS prediction time
therefore all comparisons are mainly based on predic-
tion time needed for classifying each traffic instance.
3.1.1 D1: DoS Attack vs Normal Traffic
For the training phase we chose 9,000 random nor-
mal traffic instances and 9,000 DoS attack instances
from the KDD99 train data set. We tested the learner
on 5,000 of normal and 6,000 of DoS instances from
KDD99 test data set. Optimal results for our KM-
RLS were obtained by λ = 4 and σ = −5 using k = 30
cluster centroids. Table 1 demonstrates the results of
our algorithm compared to Kabir’s and Guptal’s re-
sults. Test time of Fast KM-RLS for 11,000 instances
is 0.12 seconds and for an instance it is 0.009 millisec-
onds which is much faster prediction rate than the two
methods provide.
Table 1: DoS attack detection, Comparison of KM-RLS,
Kabir’s OA-LS-SVM and Gupta’s CRF method.
Method Precision Recall Fscore
Train Time
(sec)
Test Time
Per Instance
(millisec)
Fast
KM-RLS
99.84 97.67 98.74 169.23 0.009
OA-LS
-SVM
99.86 97.31 98.56 79.36 0.4
Layered
CRF
99.78 97.05 98.10 256.11 0.05
3.1.2 D2: Prob Attack Vs Normal Traffic
For the training phase we chose 9,000 random nor-
mal traffic instances and 2,000 Prob attack instances
from the whole KDD99 train data set. We tested the
learner on 5,000 normal and 3,000 Prob instance of
the KDD99 test data set Table 2. Test time of 8,000
instance of traffic is 0.17 seconds and for one instance
it is 0.01 milliseconds. Optimal detection for Prob at-
tack was obtained by λ = 1 and σ = −3, using 80
cluster centroids. This achieved 99.73 percent accu-
racy on the training set.
Table 2: Prob attack detection.
Method Precision Recall Fscore
Train Time
(sec)
Test Time
Per Instance
(millisec)
Fast
KM-RLS
98.11 95.80 96.94 517.52 0.01
OA-LS
-SVM
97.64 90.89 94.14 22.49 0.2
Layered
CRF
82.53 88.06 85.21 200.6 0.03
3.1.3 D3: R2L Attack Vs Normal Traffic
For the training phase we chose 1,000 random normal
traffic instances and all 1,126 R2L attack instances
from the whole KDD99 train data set. We tested the
learner on 10,000 normal and 8,000 R2L instances of
the KDD99 test data set Table 3. The test time of
18,000 instances of traffic is 0.14 seconds and for one
instance it is 0.008 milliseconds. Optimal detection
for the R2L attack is obtained by λ = 8 and σ = −15,
using 30 cluster centroids for the basis vectors.
Table 3: R2L attack detection.
Method Precision Recall Fscore
Train Time
(sec)
Test Time
Per Instance
(millisec)
Fast
KM-RLS
73.81 97.86 84.15 30.65 0.008
OA-LS
-SVM
83.45 71.48 76.93 3.40 0.1
Layered
CRF
92.35 15.10 25.94 23.40 0.09
FastRegularizedLeastSquaresandk-meansClusteringMethodforIntrusionDetectionSystems
267