六、 實驗結果(Experiment)
6.2. 自我學習方法(Self-Learning)
這邊將列出有無使用 Self-Learning 在辨識結果上的差異,使用的資料集包含 NSL-KDD、Modified NSL-KDD、以及由 DARPA 所轉換的 Dataset,而使用的演 算法上,則以 Decision Tree(J48)為主,並分析其結果。
首先列出使用 Decision Tree 的演算法下,是否使用 Self-Learning 所做實驗之 Confusion Matrix
NSL-KDD Decision Tree (J48) Actual Class
Predicted Class Positive Negative Classified as Positive 8933 263 Classified as Negative 3900 9448
表 9 Confusion Matrix @NSL-KDD
NSL-KDD Decision Tree (J48) with Self-Learning Actual Class
Predicted Class Positive Negative Classified as Positive 11536 395 Classified as Negative 1297 9316
表 10 Confusion Matrix @NSL-KDD
Modified NSL-KDD Decision Tree (J48) Actual Class
Predicted Class Positive Negative Classified as Positive 6466 158 Classified as Negative 6367 9553
表 11 Confusion Matrix @Modified NSL-KDD
Modified NSL-KDD Decision Tree (J48) with Self-Learning Actual Class
Predicted Class Positive Negative Classified as Positive 8440 304 Classified as Negative 4393 9407
表 12 Confusion Matrix @Modified NSL-KDD
39
DARPA Decision Tree (J48) Actual Class
Predicted Class Positive Negative Classified as Positive 10390 30809 Classified as Negative 149894 641194
表 13 Confusion Matrix @DARPA
DARPA Decision Tree (J48) with Self-Learning Actual Class
Predicted Class Positive Negative Classified as Positive 138956 130530 Classified as Negative 21328 541473
表 14 Confusion Matrix @DARPA 接著針對以上的結果,計算其各項數值,統計如表 15 所示。
Dataset NSL-KDD Modified NSL-KDD DARPA Algorithm J48 J48 with
可以看到在加入了 Self-Learning 的機制後,整體的實驗結果,雖然在 FPR 上會有些許的上升,但因 TPR 的急遽上升,也就是對攻擊的辨識捕捉率提高,
連帶地使得整體的辨識結果來的更好,使 Accuracy 也都是呈現上升的狀況,而 其改進的原因,便在於藉由 Self-Learning 的過程中,藉由已知的模型作為辨識基 礎,將更多未知的樣本加入到訓練樣本中,使得訓練集中的攻擊樣本之數量及多 樣性都獲得增加,連帶使得後續訓練出的分類器對攻擊將擁有更好的辨識能力,
而由 Modified NSL-KDD 的結果中也可看出,即使在原始的攻擊訓練樣本數量缺 乏下,利用此機制,仍然可以使攻擊偵測率提高許多,也可證明 Self-Learning 在針對 Unknown Attack 的偵測上,有著一定程度上的改進。
圖 29 及圖 30 則是有無使用 Self-Learning 機制在 NSL-KDD 資料集上的 ROC Curve 比較,可明顯的看出加入 Self-Learning 後表現上升許多,Area under Curve
40
也來的大上許多,藉由加入 Self-Learning 機制可顯著的提升 J48 之效益。
圖 29 ROC Curve and AUC of J48 @NSL-KDD
圖 30 ROC Curve and AUC of J48 with Self-Learning @NSL-KDD
41
另外,在表 16 中,也列出一些同樣以 NSL-KDD 作為實驗資料集的研究,
對其提供的結果數據加以比較,也可看到無論是 True Positive Rate 或是 False Positive Rate,使用 Self-Learning 之數據皆比其他研究之結果要來的好。
Approach TPR FPR Linear discriminant functions [8] 0.83 0.09
1-Class NN [8] 0.8 0.17
J48 with Self-learning 0.89 0.04 表 16 NSL-KDD 之實驗結果比較
對於 Self-Learning 應用在不同演算法上的比較,則以 NSL-KDD 作為實驗資 料集,將結果列於下表 17。而由當中的數據可以看到,Self-Learning 的方式,在 對於 Decision Tree 類型的演算法,如 J48、Random Forest 等等,皆有著良好的 效率提升以及辨識能力之改善,相反的,於 Bayes 類型之演算法,則沒有什麼改 善甚至沒有變動,主要是由於其演算法的作法,是利用假設各個為獨立的 Feature 與類別之間的條件機率來計算辨識結果,而單單是引進更多的訓練樣本,對於其 訓練器並不會有明顯之改善,且由於 Feature 數較多且各 Feature 之間的關係並不 見得為獨立,也因此使得其辨識效率較為低落。
Algorithm J48 BayesNet Naïve Bayes Original Self-
learning
Original Self- learning
Original Self- learning Algorithm Random Forest Random Tree RBF Network
Original Self- learning
Original Self- learning
Original Self- learning Precision 0.96 0.92 0.92 0.85 0.90 0.91
TPR 0.64 0.96 0.73 0.99 0.57 0.67
42
FPR 0.02 0.10 0.07 0.22 0.07 0.08
Accuracy 0.78 0.93 0.81 0.90 0.72 0.78 F1 score 0.77 0.94 0.81 0.91 0.70 0.77
表 17 不同演算法與 Self-Learning 之比較