CDchineme.dev

CSE 6324 · Engineering Trustworthy AI Software · UT Arlington · Fall 2026

Can You Trust the Explanation?

A survey of how explanations of network intrusion detectors are evaluated, what breaks them, and what I found on my own model.

Literature survey · presented November 24, 2026

Topic overview

Why this matters

Intrusion detectors that use machine learning now come with explanations: a chart or a paragraph that says why a network flow was flagged. Analysts use them to decide what to do, engineers use them to debug models, and auditors use them to decide whether to trust a system. So a simple question matters a lot for trustworthy AI: how do we know an explanation is any good?

An explanation can be faithful and still not be right.

Faithful: it matches how the model really decides. Right: it points at the real reason the traffic is an attack.

Scope. Twenty peer-reviewed papers from 2018 to 2026, chosen because they measure explanation quality rather than just show an explanation. The lens is network intrusion detection (NIDS); the foundations come from security machine learning more broadly, because the evaluation methods the NIDS papers use were first defined on malware and image models.

How this site is organised. Papers follow the five parts of my talk, with five more as further reading. Resources are grouped by type: explanation libraries, evaluation tools, reference code, datasets, and the papers that document flaws in those datasets.

  1. 01
    Pixels vs PacketsWhy explaining a security model is different from explaining an image model
  2. 02
    5 Ways to Open a Black BoxThe kinds of explanation used for intrusion detection
  3. 03
    Grading ExplainersHow explanations are evaluated, and why the yardsticks disagree
  4. 04
    When XAI Breaks in NIDSAttacks on explainers, flawed datasets, and shortcuts
  5. 05
    Faithful, Stable and WrongMy own experiment on CICIDS2017
Research papers

Twenty papers

Fifteen carry the talk; five more are further reading. Each card gives the authors, venue and year, links, and a short summary.

01 · Pixels vs Packets

SoK: Explainable Machine Learning for Computer Security Applications

Azqa Nadeem, Daniël Vos, Clinton Cao, Luca Pajola, Simon Dieck, Robert Baumgartner, Sicco Verwer

IEEE EuroS&P · 2023

Reviews 75 studies that use explainable machine learning in security and sorts them by who reads the explanation (analysts, model designers, attackers) and why. Only about one in seven studies tests explanations with people, with a median of eight participants. A worked example on CTU-13 NetFlow data shows SHAP and LIME exposing spurious features and disagreeing on a quarter of the top-three features. It is the best map of the field.

02 · 5 Ways to Open a Black Box

AI/ML for Network Security: The Emperor has no Clothes

Arthur S. Jacobs, Roman Beltiukov, Walter Willinger, Ronaldo A. Ferreira, Arpit Gupta, Lisandro Z. Granville

ACM CCS · 2022

Introduces Trustee, which copies a black-box network-security model into a small decision tree that is faithful, compact and stable, so people can read it. The trees expose shortcuts: one CIC-IDS2017 model told attacks from normal traffic by the attacker's operating system (IP TTL 64 for Kali, 128 for Windows). A Heartbleed detector from the same dataset caught none of 1,000 freshly generated attacks. High accuracy can hide a model that learned the wrong thing, and a good explanation can reveal it.

xNIDS: Explaining Deep Learning-based Network Intrusion Detection Systems for Active Intrusion Responses

Feng Wei, Hongda Li, Ziming Zhao, Hongxin Hu

USENIX Security · 2023

Argues that generic explainers fit deep intrusion detectors badly, because these detectors also use earlier inputs and their features depend on each other. xNIDS builds explanations from current and past inputs with a sparse group lasso and beats five standard explainers on fidelity, sparsity and stability. It then compiles explanations into firewall and switch rules for active response. Checking whether the detectors learned dataset artefacts is left to future work.

eX-NIDS: A Framework for Explainable Network Intrusion Detection Leveraging Large Language Models

Paul R. B. Houssel, Siamak Layeghy, Priyanka Singh, Marius Portmann

Computers & Electrical Engineering · 2026

Gives a flagged network flow, plus feature definitions and threat intelligence, to a large language model (GPT-4 or Llama 3) and asks for a written explanation. Two experts rated 50 explanations for correctness and hallucination. The language model never sees the detector, so it explains the traffic rather than the model's decision. In the paper's own showcase, a "suspicious 71-minute connection" is a 32-bit counter rollover: 4,294,920 ms = 2³² ÷ 1000 − 47.

03 · Grading Explainers

Evaluating Explanation Methods for Deep Learning in Security

Alexander Warnecke, Daniel Arp, Christian Wressnegger, Konrad Rieck

IEEE EuroS&P · 2020

Defines the criteria most later papers use to grade explanations in security: descriptive accuracy, sparsity, completeness, stability, efficiency and robustness. White-box methods (Integrated Gradients, LRP) beat LIME, SHAP and LEMNA on every measured criterion. Robustness was judged from earlier work rather than measured. The systems tested were malware and vulnerability detectors; no network intrusion detector was included.

Sanity Checks for Saliency Maps

Julius Adebayo, Justin Gilmer, Michael Muelly, Ian Goodfellow, Moritz Hardt, Been Kim

NeurIPS · 2018

Proposes two simple tests: randomise the model's weights, or train it on shuffled labels, and check whether the explanation changes. Some popular methods (Guided BackProp, Guided GradCAM) barely changed, so they were not really explaining the model. The authors warn that judging explanations by eye is a poor guide. The study covers image models only; LIME and SHAP were not tested.

The Disagreement Problem in Explainable Machine Learning: A Practitioner's Perspective

Satyapriya Krishna, Tessa Han, Alex Gu, Steven Wu, Shahin Jabbari, Himabindu Lakkaraju

TMLR · 2024

Shows that explainers often give conflicting explanations for the same prediction, on tabular, text and image data. Defines six agreement metrics, from simple top-k feature overlap to agreement on rank and sign. LIME and SHAP agree on 86% of top features in one example but only 18% once order and direction must match. Interviewed data scientists said they usually resolve disagreement by picking a favourite method.

E-XAI: Evaluating Black-Box Explainable AI Frameworks for Network Intrusion Detection

Osvaldo Arreche, Tanish R. Guntur, Jack W. Roberts, Mustafa Abdallah

IEEE Access · 2024

Compares SHAP and LIME on intrusion detection with six criteria modelled on Warnecke et al., across three datasets (CICIDS2017, NSL-KDD, RoEduNet-SIMARGL2021) and seven models. SHAP wins on descriptive accuracy, sparsity and completeness; stability, efficiency and robustness depend on the dataset and model. Robustness is tested by porting the scaffolding attack of Slack et al. to network flows. Destination Port ranks first on every CICIDS2017 model, and the authors keep it although they cite it as a contaminating feature.

Evaluating Explainable AI for Deep Learning-Based Network Intrusion Detection System Alert Classification

Rajesh Kalakoti, Risto Vaarandi, Hayretdin Bahşi, Sven Nõmm

ICISSP · 2025

Evaluates LIME, SHAP, Integrated Gradients and DeepLIFT on deep models that classify real alerts from a university security operations centre. DeepLIFT wins five of six metrics, including faithfulness and robustness; Integrated Gradients gives the simplest explanations. "Analyst agreement" here means overlap with five features analysts named in advance; no analyst judged an explanation directly. It is the most complete scorecard on real operational data.

Feature Attribution in 5G Intrusion Detection: A Statistical vs. Logic-Based Comparison

Federica Uccello, Simin Nadjm-Tehrani

J. Information Security & Applications · 2026

Compares Tree SHAP with VoTE-XAI, a logic-based method that finds the feature values sufficient to force a decision and is provably faithful to the model. On three 5G intrusion datasets VoTE-XAI gives shorter, more consistent and faster explanations, and SHAP's top features are a subset of VoTE's. On detectors above 99% accuracy, both methods point at sequence numbers, TTL and fragment offsets: signs of dataset artefacts rather than attack behaviour.

Explainable AI in Cybersecurity Operations: Lessons Learned from xAI Tool Deployment

Megan Nyre-Yu, Elizabeth Morris, Blake Moss, Charles Smutz, Michael R. Smith

USEC (NDSS workshop) · 2022

Reports a pilot of a TreeSHAP explanation tool for a malware file classifier with 11 incident-response analysts in a real security operation. Analysts opened the explanation in 2 of 8 escalated events, and 1 of 11 answered the follow-up survey. The people who valued the feature importances were the engineers maintaining the model, not the analysts triaging alerts. Analysts wanted evidence and confidence rather than attributions.

Attributions for ML-based ICS Anomaly Detection: From Theory to Practice

Clement Fung, Eric Zeng, Lujo Bauer

NDSS · 2024

Tests attribution methods where the right answer is known: 156 planted sensor and actuator manipulations across three industrial control system datasets and five anomaly detectors. The top-ranked feature is the manipulated one in fewer than 39% of attacks. Results depend on when the explanation is computed, and slower, stealthier attacks make every method worse. An ensemble of methods works best, and surveyed operators wanted 10 to 20 candidate features rather than one.

04 · When XAI Breaks in NIDS

Fooling LIME and SHAP: Adversarial Attacks on Post hoc Explanation Methods

Dylan Slack, Sophie Hilgard, Emily Jia, Sameer Singh, Himabindu Lakkaraju

AAAI/ACM AIES · 2020

Shows how a model owner can fool LIME and SHAP. These explainers probe the model with perturbed inputs that don't look like real data, so a "scaffold" can detect the probes and answer them with a harmless model while real inputs still reach a biased one. The biased feature disappears from LIME's explanations, and SHAP is fooled somewhat less. The threat comes from whoever owns or sells the model, not from the person sending the data.

Dos and Don'ts of Machine Learning in Computer Security

Daniel Arp, Erwin Quiring, Feargus Pendlebury, Alexander Warnecke, Fabio Pierazzi, Christian Wressnegger, Lorenzo Cavallaro, Konrad Rieck

USENIX Security · 2022

Identifies ten common pitfalls in machine learning for security, such as sampling bias, data snooping and spurious correlations, and finds at least three in every one of 30 papers from top security venues. It recommends explainable AI as one way to catch spurious correlations. A network intrusion case study shows a simple one-feature baseline rivalling a published deep detector. It is the standard reference for why benchmark scores in security can mislead.

Reliability of Evaluation and Explanation in Network Intrusion Detection: Jointly Interrogating High Performance and SHAP–LIME Explanations

Esma Fazilet Karagülle, Tolga Aydın, Esra Odabaş Yıldırım, Ferhat Bozkurt

Pamukkale Univ. J. Engineering Sciences · 2026 · in Turkish

Re-examines a random forest on CICIDS2017 after removing 307,767 duplicate rows. F1 falls from 99.78% with a random split to 97.49% when testing on later parts of the same day, and to 32.86% when whole days are held out. SHAP and LIME barely agree on the top features (Jaccard 0.20), and removing SHAP's second-ranked feature, Destination Port, changes nothing. The article is in Turkish with an English abstract.

Further reading

survey

Explainable Intrusion Detection Systems (X-IDS): A Survey of Current Methods, Challenges, and Opportunities

Subash Neupane, Jesse Ables, William Anderson, Sudip Mittal, Shahram Rahimi, Ioana Banicescu, Maria Seale

IEEE Access · 2022

A survey of explainable intrusion detection that classifies methods as white-box or black-box. It proposes a human-in-the-loop architecture for explainable IDS. A good starting point for the range of methods, though it does not evaluate them.

approach

An Adversarial Approach for Explainable AI in Intrusion Detection Systems

Daniel L. Marino, Chathurika S. Wickramasinghe, Milos Manic

IECON · 2018

An early explainable IDS method that finds the smallest change to a misclassified NSL-KDD record that would make the model classify it correctly, a counterfactual-style explanation. The changes show which features drove the mistake. Evaluation is qualitative only.

evaluation

Evaluating the Explainability of Deep Learning-Based Network Intrusion Detection Systems

Ayush Kumar, Vrizlynn L. L. Thing

ESORICS Workshops · 2025

Explains published deep intrusion detectors both globally (with Trustee) and locally (with Kernel SHAP), and finds the two disagree for two of three models. It proposes a score for agreement between global and local explanations. The evidence is limited: three data subsets and three runs.

evaluation

Evaluating Explanation Quality in X-IDS Using Feature Alignment Metrics

Mohammed Alquliti, Erisa Karafili, BooJoong Kang

ARES · 2025

Scores SHAP explanations of intrusion detectors on CICIDS2017 against feature sets that domain knowledge says should matter. Among the top five features, 70 to 91% fall outside the reference sets. It compares detection models rather than explainers.

attacks

SoK: Explainable Machine Learning in Adversarial Environments

Maximilian Noppel, Christian Wressnegger

IEEE S&P · 2024

Organises attacks on explanations by what the attacker controls (the input, the model or the system) and what they want to preserve (the explanation, the prediction, or both). It defines a hierarchy of robustness notions and maps defences onto the machine learning pipeline. It ends with eight open questions; there is no intrusion detection case.

Software and other resources

Tools, data and benchmarks

What you need to explain an intrusion detector, measure the explanation, and check the data underneath it.

Explanation libraries

MIT

SHAP

Library · Lundberg & Lee, NeurIPS 2017

Explains predictions with Shapley values, splitting a prediction fairly among the input features. Includes a fast, exact explainer for tree models plus Kernel and Deep explainers for other models. It is the explainer most often evaluated in intrusion detection papers.

BSD-2

LIME

Library · Ribeiro et al., KDD 2016

Explains one prediction by fitting a small, simple model to perturbed copies of the input. It is the standard second baseline next to SHAP. Its results can change between runs and settings, which makes it a common target of stability tests. No longer actively maintained.

BSD-3

Captum

Library + metrics · PyTorch

Attribution methods for PyTorch models, including Integrated Gradients, DeepLIFT and GradientSHAP. It also ships infidelity and max-sensitivity metrics, so you can measure faithfulness and robustness in the same toolkit.

MIT

InterpretML

Library · Microsoft Research

Explainable Boosting Machines, accurate models you can read directly, plus wrappers for black-box explainers. Useful as an interpretable baseline: if a readable model detects intrusions as well, you may not need a post-hoc explainer at all.

MIT

DiCE

Library · Mothilal et al., FAT* 2020

Generates diverse counterfactual explanations: small, realistic changes that would flip a prediction. For intrusion detection it answers "what would this flow need to look like to not be flagged?".

BSL (not OSI)

Alibi Explain

Library · Seldon

Anchors (rule-style explanations), counterfactuals, accumulated local effects, Integrated Gradients and SHAP behind one interface. Anchors make a useful contrast with attribution scores. Note the Business Source License.

Evaluation frameworks and benchmarks

LGPL-3.0

Quantus

Evaluation framework · Hedström et al., JMLR 2023

More than 35 metrics for explanation quality in six groups: faithfulness, robustness, localisation, complexity, randomisation and axiomatic properties. Works with PyTorch and TensorFlow on images, time series and tables. The most complete toolkit for grading an explainer.

MIT

OpenXAI

Benchmark · Agarwal et al., NeurIPS 2022

22 metrics covering faithfulness, stability and fairness, seven explainers, and synthetic tabular data with known ground-truth explanations. Its tabular focus fits network flow features. Includes public leaderboards.

Apache-2.0

XAI-Bench

Benchmark · Liu et al., NeurIPS 2021

Synthetic tabular datasets where the true Shapley values can be computed, used to test six explainers on five metrics. It shows how faithfulness metrics behave when the right answer is known, which real network data lacks.

Reference implementations

no licence

explain-mlsec

Code for Warnecke et al., EuroS&P 2020

The code behind the six security evaluation criteria: descriptive accuracy, sparsity, completeness, stability, efficiency and robustness. Useful for reproducing the original scorecard. Frozen since 2020.

no licence

XAI_metrics (E-XAI)

Code for Arreche et al., IEEE Access 2024

Evaluates SHAP and LIME on six metrics across seven models and three intrusion datasets, with significance tests between models. The closest existing implementation to this survey's topic.

project site

Trustee

Code for Jacobs et al., CCS 2022

Extracts a small, faithful decision tree from a black-box network-security model and reports how much to trust it. The tool behind the TTL and Heartbleed findings above.

my code

network-intrusion-detection

My project · decision tree and SVMs on CICIDS2017

My own leak-disciplined pipeline, models and the experiments on this page: the duplicate-row check, the split protocols, the controls and the SHAP comparison. Notebooks and results are in the repository.

Datasets

free with citation

CIC-IDS2017

Dataset · Sharafaldin et al., ICISSP 2018

Five days of traffic with brute force, DoS and DDoS, web attacks, infiltration, botnet and port scans; 80+ flow features plus raw packet captures. The most used dataset in explainable intrusion detection, and the best documented for its flaws (see below). Each attack type appears on a single day, which matters for how you split it.

academic use

UNSW-NB15

Dataset · Moustafa & Slay, MilCIS 2015

2.54 million records, nine attack categories and 49 features, with an official train/test split. Its feature set differs from CIC's, which makes it useful for checking whether explanations hold across datasets.

no licence stated

NF-* NetFlow datasets

Datasets · Sarhan, Layeghy, Portmann

Existing intrusion datasets re-extracted into one common NetFlow feature set, in three versions. Because every dataset shares the same features, explanations can be compared across datasets directly.

Dataset critiques and corrected versions

Engelen, Rimmer, Joosen · corrected CICIDS2017

IEEE S&P Workshops (WTMC) · 2021

Documents flaws in how CICIDS2017 was generated, turned into flows, featurised and labelled; more than 20% of traces were reconstructed or relabelled. Releases a fixed flow extractor and relabelled data. Pairing original and corrected data is a clean test of whether explanations point at artefacts.

Liu et al. · corrected CIC-IDS-2017 and 2018

IEEE CNS · 2022

Measures how common the errors are across both CIC datasets and releases fully recreated versions with corrected labelling logic.

Lanvin et al.

CRiSIS 2022 (LNCS 2023)

Independently confirms CICIDS2017 errors such as misordered packets, duplicates and mislabelled attacks, and measures how much fixing them changes detection results.

Flood et al.

IEEE EuroS&P · 2024

A manual audit of seven highly cited intrusion detection benchmarks for recurring "design smells": poor diversity, unclear labels and ill-defined generalisation. It explains why models, and their explanations, latch onto artefacts.

05 · Faithful, Stable and Wrong

My experiment

I trained a decision tree on CICIDS2017 in my own project. In July 2026 I checked whether duplicate rows were inflating its 99.7% score: 13.5% of test rows have an exact copy in training, but the tree scores the same on rows it has never seen, so they weren't. Then I changed only how the model is tested.

Random split0.997
Later in the same day0.963
New attack type0.259

It failed in two different ways. The missed attacks came from attack types it had never seen: it caught about 16% of them. The false alarms came from two days of unusual normal traffic, where it flagged 14 to 16% of normal flows. Shuffling the days brings the score straight back to 0.997, so the drop is about what is held out, not how much.

The explanation never warned of either. The tree's top three features (backward packet size spread, average packet size, destination port) were the same under every test. SHAP agreed with the tree (rank correlation about 0.9), and none of the missed new-type attacks got an unusual SHAP explanation. Faithful, stable, and wrong.

The July measurements are my own work. The November split protocols, controls and SHAP run were written and run by Claude on my pipeline; see the disclosure below. Code and results: network-intrusion-detection.

AI disclosure

How I used AI

The course allows generative AI with explicit disclosure. Here is what I used, what for, and how I checked it.

ToolUsed forHow I verified or revised it
Claude (Claude Code)Literature search and citation snowballing; checking citations; reading notes; drafting the slides and this website; writing and running the split-protocol, control and SHAP scripts on my NIDS pipeline.Claude resolved every paper to a real venue or DOI before it was included, and read the full texts to write notes and these summaries. I learned the papers from those notes and from audio overviews, and read Warnecke et al. and Adebayo et al. in full myself. I chose the papers and the structure; my July measurements are my own work.
NotebookLMAudio overviews of the 20 papers and the course lectures, to help me understand them.My main way of learning the papers. Numbers on this site come from Claude's notes on the full texts, not from audio.
Kimi, ChatGPTEarly ranking of candidate topics (September 2026).Every suggested citation was checked; one of four that Kimi gave was a misattribution and was dropped.