信息网络安全 ›› 2026, Vol. 26 ›› Issue (8): 1183-1193.doi: 10.3969/j.issn.1671-1122.2026.08.002

• 学术研究 • 上一篇    下一篇

融合轻量级注意力机制的双分支入侵检测方法

金志刚(), 李其睿, 丁禹   

  1. 天津大学电气自动化与信息工程学院天津 300072
  • 收稿日期:2026-07-05 出版日期:2026-08-10 发布日期:2026-09-23
  • 通讯作者: 金志刚 E-mail:zgjin@tju.edu.cn
  • 作者简介:金志刚(1972—),男,上海,教授,博士,主要研究方向为无线网络、网络安全|李其睿(2003—),男,四川,硕士研究生,主要研究方向为入侵检测、深度学习|丁禹(2001—),男,四川,硕士研究生,主要研究方向为入侵检测、联邦学习
  • 基金资助:
    国家自然科学基金(52171337)

A dual-branch intrusion detection method integrated with lightweight attention mechanism

Jin Zhigang(), Li Qirui, Ding Yu   

  1. School of Electrical and Information Engineering, Tianjin University, Tianjin 300072, China
  • Received:2026-07-05 Online:2026-08-10 Published:2026-09-23
  • Contact: Jin Zhigang E-mail:zgjin@tju.edu.cn

摘要:

针对资源受限场景下入侵检测系统难以兼顾检测精度与计算效率的问题,文章提出一种融合轻量级注意力机制的双分支入侵检测方法。该方法以轻量化过程中的特征损失与多类攻击间的特征混叠为核心设计出发点,构建双分支-可分离卷积-高效注意力机制协同架构。双分支结构负责从网络流量中捕获多尺度特征,保障模型对复杂攻击行为的完整感知;深度可分离卷积大幅压缩参数量与计算复杂度,并引入残差网络连接补偿轻量化带来的特征退化;在特征融合阶段,轻量级通道注意力机制ECA对关键通道特征进行自适应增强,提升复杂攻击流量的区分能力。实验结果表明,该方法在各项指标上均优于基线对比模型,其中在UNSW-NB15数据集上准确率为89.69%,精确率为89.83%,并且F1分数为89.70%,较次优基线模型提升7.13个百分点,表明模型在精确率与召回率间取得了良好的平衡。模型参数量与一维卷积神经网络处于同一量级,验证了其在资源受限网络环境中的应用潜力。

关键词: 入侵检测, 深度学习, 注意力机制, 深度可分离卷积

Abstract:

To address the inherent trade-off between detection accuracy and computational efficiency in intrusion detection systems (IDS) deployed under resource-constrained environments, this paper proposed a dual-branch intrusion detection method integrated with a lightweight attention mechanism. Motivated by the feature degradation commonly caused by model compression and the inter-class confusion among heterogeneous attack types, a collaborative Dual-Branch-DSC-ECA architecture was constructed: a dual-branch structure captures multi-scale features from network traffic to ensure comprehensive perception of complex attack behaviors; depthwise separable convolutions substantially reduced parameter count and computational complexity, while residual connections compensate for representational loss caused by depthwise separable decomposition; at the feature fusion stage, the efficient channel attention (ECA) mechanism adaptively recalibrates channel-wise feature responses to enhance the model’s sensitivity to anomalous traffic patterns. Experimental results on the UNSW-NB15 dataset show that the proposed method outperforms all baseline models, achieving 89.69% accuracy, 89.83% precision; and an F1-score of 89.70%—a 7.13-percentage-point improvement over the second-best baseline—reflecting a well-balanced trade-off between precision and recall. With only 0.043M parameters, comparable to the 1D CNN model, the proposed method demonstrates its suitability for deployment in resource-constrained network environments.

Key words: intrusion detection, deep learning, attention mechanism, depthwise separable convolution

中图分类号: