Intrusion detection systems (IDSs) for 5G networks must handle complex, high-volume traffic. Although opaque "black-box" models can achieve high accuracy, their lack of transparency hinders trust and effective operational response. We propose ExAI5G, a framework that prioritizes interpretability by integrating a Transformer-based deep learning IDS with logic-based explainable AI (XAI) techniques. The framework uses Integrated Gradients to attribute feature importance and extracts a surrogate decision tree to derive logical rules. We introduce a novel evaluation methodology for LLM-generated explanations, using a powerful evaluator LLM to assess actionability and measuring their semantic similarity and faithfulness. On a 5G IoT intrusion dataset, our system achieves 99.9\% accuracy and a 0.854 macro F1-score, demonstrating strong performance. More importantly, we extract 16 logical rules with 99.7\% fidelity, making the model's reasoning transparent. The evaluation demonstrates that modern LLMs can generate explanations that are both faithful and actionable, indicating that it is possible to build a trustworthy and effective IDS without compromising performance for the sake of marginal gains from an opaque model.
翻译:5G网络入侵检测系统必须处理复杂且高流量的数据。尽管不透明的"黑箱"模型能够实现高精度,但其缺乏透明性阻碍了信任建立与有效的运维响应。我们提出ExAI5G框架,该框架通过融合基于Transformer的深度学习入侵检测系统与基于逻辑的可解释人工智能技术,优先保障模型可解释性。该框架采用集成梯度法归因特征重要性,并提取替代决策树以推导逻辑规则。针对大语言模型生成的解释,我们引入一种新型评估方法:通过强大的评估器LLM评估其可操作性,同时测量解释的语义相似性与忠实度。在5G物联网入侵数据集上,我们的系统实现了99.9%的准确率和0.854的宏F1分数,展现出卓越性能。更重要的是,我们提取出16条逻辑规则,忠实度达99.7%,使模型推理过程透明化。评估结果表明,现代大语言模型能够生成既忠实又可操作的解释,验证了在不牺牲性能换取不透明模型边际增益的前提下,构建可信且高效入侵检测系统的可行性。