首页|基于Focal Loss和时空特征提取的网络入侵检测算法研究

基于Focal Loss和时空特征提取的网络入侵检测算法研究

扫码查看
在网络入侵检测领域中,由于网络流量特征提取不充分和网络数据分布不均衡的问题,入侵检测系统的识别率受到了明显的影响.提出一种基于Focal Loss并能够从时序和空间两维度进行提取特征的网络模型.在时序方面,主要采用双向门控循环单元(BiGRU)模型进行特征的提取,随后通过Transformer-Encoder的多头注意力机制重新分配特征权重,增强了模型对关键特征的关注度.在空间特征方面,主要采用Inception模块并引入残差思想,有效的提取网络中的空间特征.将这两个维度的特征融合,并通过分类器进行分类.为了缓解模型聚焦多数类别样本的问题,整个模型使用焦点损失函数(Focal Loss)进行参数的更新.通过在CICIDS2018和UNSW_NB15两个数据集上进行大量实验,有效证明了提出的模型在准确率、精确率、召回率、F1值上均优于现有其他方法.
Research on network intrusion detection algorithm based on Focal Loss and spatio-temporal feature extraction
In the field of network intrusion detection,the recognition rate of intrusion detection systems is significantly affected due to insufficient extraction of network traffic features and the problem of uneven distribution of network data.To address these issues,this paper proposes a network model based on Focal Loss that can extract features from both temporal and spatial dimensions.In terms of temporal features,the extraction mainly utilizes the Bidirectional Gated Recurrent Unit(BiGRU)model,followed by the reassignment of feature weights through the multi-head attention mechanism of the Transformer-Encoder,enhancing the model's focus on key features.Regarding spatial features,the Inception module is primarily adopted,incorporating residual thinking to effectively extract spatial features within the network.Finally,these two-dimensional features are fused and classified using a classifier.To alleviate the problem of model focusing on majority class samples,the entire model employs the Focal Loss function for parameter updates.Through extensive experiments conducted on the CICIDS2018 and UNSW_NB15 datasets,it effectively demonstrates that the proposed model outperforms existing methods in terms of accuracy,precision,recall,and F1 score.

intrusion detectionspatiotemporal feature extractionmulti-head attention mechanismresidual networkFocal Loss

王震、佟志勇、杨自恒

展开 >

黑龙江大学电子工程学院,哈尔滨 150080

中国人民解放军黑龙江省军区数据信息室,哈尔滨 150001

入侵检测 时空特征提取 多头注意力机制 残差网络 Focal Loss

国家自然科学基金项目

61471158

2024

黑龙江大学工程学报
黑龙江大学

黑龙江大学工程学报

影响因子:0.358
ISSN:2095-008X
年,卷(期):2024.15(3)
  • 1