Skip to main content
QUICK REVIEW

[论文解读] SecureBERT and LLAMA 2 Empowered Control Area Network Intrusion Detection and Classification

Xuemei Li, Huirong Fu|arXiv (Cornell University)|Nov 19, 2023
Network Security and Intrusion Detection被引用 6
一句话总结

本文提出 CAN-SecureBERT 和 CAN-Llama2,为直接基于原始文本格式的 CAN 消息日志进行入侵检测与攻击分类而微调的基于 Transformer 的模型。CAN-Llama2 模型实现了 0.999993 的平衡准确率与 3.1e-6 的误报率——比最先进模型 MTH-IDS 低 52 倍,展示了无需特征工程的优越性能。

ABSTRACT

Numerous studies have proved their effective strength in detecting Control Area Network (CAN) attacks. In the realm of understanding the human semantic space, transformer-based models have demonstrated remarkable effectiveness. Leveraging pre-trained transformers has become a common strategy in various language-related tasks, enabling these models to grasp human semantics more comprehensively. To delve into the adaptability evaluation on pre-trained models for CAN intrusion detection, we have developed two distinct models: CAN-SecureBERT and CAN-LLAMA2. Notably, our CAN-LLAMA2 model surpasses the state-of-the-art models by achieving an exceptional performance 0.999993 in terms of balanced accuracy, precision detection rate, F1 score, and a remarkably low false alarm rate of 3.10e-6. Impressively, the false alarm rate is 52 times smaller than that of the leading model, MTH-IDS (Multitiered Hybrid Intrusion Detection System). Our study underscores the promise of employing a Large Language Model as the foundational model, while incorporating adapters for other cybersecurity-related tasks and maintaining the model's inherent language-related capabilities.

研究动机与目标

  • 解决现有 CAN 入侵检测系统在需要大量预处理、基于规则的工作流以及特征工程方面的局限性。
  • 评估预训练 Transformer 模型(尤其是大语言模型)在 CAN 网络入侵检测与攻击分类中的适应性。
  • 开发可直接处理原始 CAN 消息日志的模型,同时保持高检测准确率与低误报率。
  • 评估预训练领域知识(如网络安全相关数据)以及模型规模(如 Llama2 与 BERT)对 IDS 性能的影响。
  • 证明通过参数高效微调方法(如 LoRA)微调的大规模预训练大语言模型(LLM)可在准确率与鲁棒性方面超越传统基于机器学习的 IDS 系统。

提出的方法

  • 在预平衡的原始 CAN 消息日志数据集上微调预训练的 Transformer 模型——CAN-C-BERT、CAN-SecureBERT 与 CAN-Llama2。
  • 采用 LoRA(低秩适应)方法,仅微调 Llama2 模型的 4000 万个参数,同时冻结其余 54 倍大的参数基础。
  • 直接处理原始、基于文本的 CAN 消息,无需人工特征提取或预处理,利用模型的注意力机制学习内在模式。
  • 应用多头自注意力与位置编码,以建模 CAN 消息序列中的长距离依赖关系与语义关联。
  • 在包含四种攻击类型(DoS、Fuzzy、Gear Spoofing 与 RPM Spoofing)的平衡数据集上端到端训练模型。
  • 使用标准指标评估性能:平衡准确率(BA)、精确率(PREC)、检测率(DR)、F1 分数与误报率(FAR)

实验结果

研究问题

  • RQ1预训练的大语言模型(如 Llama2)是否能通过原始消息日志直接微调实现有效的 CAN 入侵检测,而无需特征工程?
  • RQ2Transformer 模型的规模与预训练领域(如 Llama2 与 BERT 或 SecureBERT 的对比)如何影响其在 CAN IDS 任务中的性能?
  • RQ3参数高效微调(如 LoRA)在资源受限的车载环境中在多大程度上可实现高性能推理?
  • RQ4模型性能如何随训练数据规模变化?更大的模型是否在有限数据上收敛更快且泛化能力更强?
  • RQ5基于大语言模型的模型是否能实现显著低于最先进系统(如 MTH-IDS)的误报率,同时保持近乎完美的检测准确率?

主要发现

  • CAN-Llama2 实现了 0.999993 的平衡准确率、1.0 的精确率、1.0 的检测率与 1.0 的 F1 分数,误报率为 3.1e-6。
  • CAN-Llama2 的误报率(3.1e-6)比最先进模型 MTH-IDS 低 52 倍。
  • 当仅使用 1% 的数据进行训练时,CAN-Llama2 比其他模型收敛更快,表明其得益于大规模预训练带来的更强归纳偏置与模式识别能力。
  • 尽管微调参数更少,CAN-Llama2 仍优于 CAN-SecureBERT 与 CAN-C-BERT,归因于其更大的预训练参数基础与领域优化的架构。
  • 在 10% 数据上训练的模型始终优于在 1% 数据上训练的模型,表明数据规模增加可提升泛化能力。
  • CAN-SecureBERT 在网络安全相关数据上预训练,性能略低于 CAN-Llama2,但仍优于 CAN-C-BERT,表明领域特定的预训练可提升 IDS 性能。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。