Abstract
Intrusion detectors for the Internet of Vehicles (IoV) are often reported with near-perfect scores. We re-examine hybrid deep-learning detectors that combine deep neural network (DNN), convolutional neural network (CNN) and long short-term memory (LSTM) layers (DNN-CNN, LSTM-CNN and LSTM-DNN) and are refined with Local Interpretable Model-agnostic Explanations (LIME) under a duplicate-aware protocol on two real-vehicle Controller Area Network (CAN) bus datasets (CICIoV2024 and Car-Hacking), Edge-IIoTset and UNSW-NB15, with nested 20–80% training fractions, five seeds, conventional and unsupervised baselines and 1312 runs, none of them discarded. In-distribution scores saturate: random forest reaches an F1-score of 100.00% on CICIoV2024, where 98.6% of test records have an exact copy in the training pool, and logistic regression reaches 100.00% on Edge-IIoTset. Attacks withheld from training are largely missed on the CAN data (mean detection 0–25% on Car-Hacking and 28–68% for supervised models on CICIoV2024), whereas UNSW-NB15 retains about 83% detection at false-positive rates of 7–18%. LIME-guided feature refinement does not improve F1 (mean change −0.72 to −0.10 points), although LIME-selected subsets beat random subsets of equal size for LSTM-DNN (+1.75 points, p = 0.045), and LIME fidelity is low (surrogate R2 0.09–0.62). On the only non-saturated benchmark, random forest and XGBoost (F1 ≈ 90%) outperform all hybrids (85–89%). IoV detection studies should therefore report train–test overlap and unseen-attack performance alongside headline accuracy, and LIME is better suited to auditing detectors than to improving them.
1. Introduction
The Internet of Vehicles (IoV) links in-vehicle networks, on-board units, roadside units, edge servers and cloud services. Two attack surfaces matter for this paper. Inside the vehicle, the Controller Area Network (CAN) bus broadcasts frames without sender authentication, so a compromised or attached node can inject frames that flood the bus or spoof speed, engine-speed, gear or steering signals [1,2]. At the edge, gateways and roadside services receive IP traffic that can carry the same denial-of-service, scanning, injection and malware activity seen in other networks [3,4]. Authentication, encryption and access control reduce these risks, but they do not cover every case: legacy CAN frames are usually not authenticated, and an adversary who controls a legitimate node can send correctly formed traffic. Monitoring that models how traffic normally behaves and flags departures from it therefore complements preventive controls [5,6].
Machine learning (ML) is attractive for such monitoring because it can learn weak statistical regularities that human analysts do not notice [5]. Whether ML replaces signatures is a separate question. Signatures can themselves be produced automatically by ML, and both signatures and learned models must be updated as devices, software versions and attacks change. Apruzzese et al. [5] summarise the practical consequences: deployed defences must adapt to mutating environments and to a dynamic threat landscape; the independent and identically distributed assumption is violated in the long term because new devices, services and users appear continuously (concept drift); public datasets suffer from inaccurate labels, fast obsolescence and small or synthetic environments; the lack of real, labelled data makes many research evaluations of questionable value; and most ML in operational products is unsupervised and used for anomaly detection. Earlier work made similar observations about the gap between closed-world benchmarks and operational intrusion detection [7] and catalogued pitfalls such as sampling bias, data snooping, spurious correlations and lab-only evaluation [8].
Hybrid deep-learning detectors that combine dense deep neural network (DNN), convolutional neural network (CNN) and long short-term memory (LSTM) layers, sometimes refined with explanations from Local Interpretable Model-agnostic Explanations (LIME) [9], are frequently proposed for connected vehicles. They are typically evaluated on generic network benchmarks such as KDD-CUP, whose flaws have long been documented [10], with a single random split and a single training run. Evidence of this kind cannot support conclusions about IoV intrusion detection. This paper asks whether LIME-guided refinement makes such detectors more accurate and more data-efficient, and it answers the question under conditions designed to expose the weaknesses listed above. Two CAN-bus datasets recorded on real vehicles are used, CICIoV2024 [2] and Car-Hacking [1]. Edge-IIoTset [3] represents the edge network, and UNSW-NB15 [11] serves only as a general reference benchmark.
1.1. Research Questions
This study is organised around four questions:
- RQ1 (benchmark validity): How much of the reported in-distribution performance on IoV-related datasets is explained by duplicated records and trivially separable traffic rather than by detection skill?
- RQ2 (generalisation): How well do hybrid and conventional detectors recognise an attack family that was absent from training?
- RQ3 (LIME as a guide): Does retraining on LIME-selected features improve accuracy or data efficiency, and is any effect larger than that of a random feature subset of the same size?
- RQ4 (LIME as an explainer): How faithful, stable and costly are the LIME explanations, and can they reveal dataset shortcuts?
1.2. Contributions
A duplicate-aware evaluation protocol for CAN-bus data that splits captures into contiguous time blocks, retains the naturally repeated frames and reports, for every dataset, the share of test records whose exact feature vector also occurs in the training pool.
A repeated-seed comparison of three hybrid deep-learning families with logistic regression, random forest, XGBoost and an unsupervised isolation forest on four datasets and four nested training fractions (880 main runs, five seeds each, with mean, standard deviation, 95% confidence intervals, Wilcoxon and McNemar tests).
A leave-one-attack-out (LOAO) study on all four datasets (360 runs) that measures detection of attack families withheld from training, addressing the concern that future attacks are not known in advance.
A controlled test of LIME-guided refinement against both the unrefined model and a random feature subset of equal size, together with a LIME-driven shortcut audit (72 runs) and measurements of explanation fidelity, stability and run time.
A complete account of all runs: none was discarded, no run failed, and the code, configuration, per-run records and predictions are released for re-analysis.
1.3. Paper Organisation
Section 2 analyses related work and ends with the research gaps. Section 3 formulates the learning, data-efficiency, explanation and model-selection objectives and lists every parameter value. Section 4 states the threat and deployment model. Section 5 describes the datasets and the duplicate-aware splitting protocol. Section 6 describes the detectors, LIME-guided refinement and additional experiments with pseudocode. Section 7 gives the experimental design and statistics, Section 8 the results, Section 9 the discussion and Section 10 the threats to validity; Section 11 concludes the paper.
2. Related Work
2.1. Evaluation Pitfalls in ML-Based Intrusion Detection
Sommer and Paxson [7] argued that intrusion detection differs from typical ML applications: errors are expensive, the training data rarely represent the operational environment, and an anomaly detector that finds something unusual is not necessarily finding an attack. Arp et al. [8] reviewed 30 security papers and found that pitfalls such as sampling bias, data snooping, spurious correlations, inappropriate baselines and lab-only evaluation were common. Kapoor and Narayanan [12] showed that leakage, including duplicated records shared between training and test sets, inflates results across many ML-based sciences. Dataset-specific audits reach similar conclusions. Engelen et al. [13] found labelling and feature-extraction errors in CICIDS2017 [14], and Ring et al. [15] and Hindy et al. [16] showed that the choice of dataset, its age and its class definitions dominate reported performance. Apruzzese et al. [5] add the operational view summarised in Section 1. Together, these works imply that a new detector should be judged by its behaviour under controlled leakage, unseen attacks and realistic baselines, not by its accuracy on a random split. Many IoV detection studies do not meet this standard.
2.2. In-Vehicle (CAN-Bus) Intrusion Detection and Datasets
Seo et al. [1] introduced the Car-Hacking dataset, recorded on a real vehicle through the on-board diagnostics (OBD-II) port, with denial-of-service (DoS), fuzzing, gear-spoofing and engine-speed (RPM) spoofing attacks, and proposed GIDS, a generative adversarial detector intended to recognise unknown attacks. Song et al. [17] trained a deep convolutional network on windows of CAN identifiers from the same dataset and reported very low error rates. Verma et al. [6] reviewed the public CAN datasets and showed that many of their attacks are easy to detect: injected frames often use an identifier or payload that never occurs in benign traffic, or are inserted at rates that make the timing obviously abnormal. They released the ROAD dataset with more realistic, stealthier attacks for this reason. Neto et al. [2] released CICIoV2024, captured from a 2019 vehicle, with DoS and four spoofing attacks (gas pedal, RPM, speed and steering wheel), and reported ML baselines on it. These studies establish the data used here. They also show the tension that motivates this paper: the most widely used CAN datasets produce near-perfect scores, while the analysis by Verma et al. [6] suggests that such scores reflect the simplicity of the injected traffic.
2.3. Edge, IoT and Network Benchmarks
UNSW-NB15 [11] contains flow records with nine attack families generated in a testbed and is still one of the more demanding general benchmarks. Edge-IIoTset [3] was collected on an Internet of Things/Industrial Internet of Things (IoT/IIoT) testbed with fourteen attacks and is used for centralised and federated learning. Lightweight and distributed denial-of-service (DDoS)-oriented IoT detectors [18,19,20,21,22] show that strong in-distribution performance is easy to obtain on such testbed data. Neither dataset was recorded in a vehicular network. We use Edge-IIoTset as a proxy for the IP traffic of an edge gateway, and we use UNSW-NB15 because it is the only one of our four datasets on which the detectors do not saturate.
2.4. Explainable AI for Intrusion Detection
LIME [9] fits a sparse linear surrogate to a black-box model in the neighbourhood of one input, whereas SHapley Additive exPlanations (SHAP) [23] distributes the prediction among features using Shapley values; both are widely used in security [24,25,26]. In most intrusion-detection papers, the explanations are shown as plots of a few records and their quality is not measured. Warnecke et al. [27] evaluated explanation methods for security models by descriptive accuracy, sparsity, stability, efficiency and robustness and found large differences between methods. They also found that perturbation-based methods such as LIME can be unstable and slow. Alvarez-Melis and Jaakkola [28] showed that small input changes can produce very different LIME explanations. Geirhos et al. [29] described shortcut learning, in which a model exploits an easy but non-causal cue that happens to separate the classes in the training data. Explanations are an obvious tool for detecting such shortcuts. Using them to select features and then retraining the detector is a different and less studied use.
2.5. Comparative Positioning
Table 1 compares representative studies by data, method, evaluation protocol and whether unseen attacks and explanation quality are assessed.
Table 1.
Comparative positioning of this study relative to representative work.
2.6. Summary of Research Gaps and Novelty
Three gaps follow from this analysis. (i) IoV detection papers rarely report how many test records duplicate training records, although CAN traffic is periodic and many injection attacks repeat one fixed frame. (ii) Unseen-attack behaviour is rarely measured systematically, even though future attacks are by definition unknown [5]. (iii) When explanations are used to modify a detector, the change is seldom compared with a random control, so an improvement cannot be attributed to the explanation. Our contribution is not a new architecture. It is an evaluation that addresses these three gaps together for LIME-guided hybrid deep learning, using real-vehicle CAN data, conventional baselines and an unsupervised baseline representative of operational anomaly detection. This study also reports a negative result that, in our view, is useful: on these data, LIME-guided refinement does not improve hybrid detectors, and the high scores reported in the literature largely reflect the benchmarks.
3. Problem Formulation
3.1. Supervised Detection Objective
Let D = {(xi, yi)} be a labelled dataset in which xi is a d-dimensional feature vector and yi = 1 denotes an attack. D is split into a training pool, a validation set and a fixed test set before any transformation is fitted (Section 5). For a training fraction b ∈ {0.2, 0.4, 0.6, 0.8} a stratified subset Db of the pool is drawn. A detector fθ outputs an attack probability pi and a decision with threshold τ:
The neural detectors minimise class-weighted binary cross-entropy with an L2 penalty λ:
Class weights wc = 0.5/πc, where πc is the share of class c in Db, enter the sum of Equation (2) as wyi, the weight of the class of record i; they equalise the contribution of the two classes without resampling.
3.2. Data-Efficiency Measures
For a metric M of model m on dataset d, the degradation between the largest and the smallest fraction, the retention ratio and a stability score that penalises dispersion across fractions are
Here, meanb and SDb (standard deviation) are taken over the four fractions after averaging over seeds; α is fixed to 1 before any result is seen, so that one standard deviation of cross-fraction variation costs as much as one point of mean performance.
3.3. Explanation Objective
For a record x, LIME draws perturbed samples z, weights them by a proximity kernel πx(z) and fits an interpretable surrogate gx that minimises a weighted loss plus a complexity penalty Ω(g) [9]. Local fidelity is the weighted coefficient of determination of the surrogate, and sparsity is the number of non-zero coefficients shown to the analyst:
3.4. Multi-Criteria Model Selection
Models are ranked by a utility that rewards F1-score, specificity (1 − FPR, where FPR is the false-positive rate), cross-fraction stability and explanation fidelity and penalises latency and energy:
All terms are scaled to [0, 1]; latency is min–max normalised over the six hybrid configurations of a dataset. Energy was not measured, so w6 = 0 and the energy term is retained only as a placeholder for hardware studies. Table 2 lists every coefficient and setting used in Equations (1)–(9) and the reason for its value.
Table 2.
Parameter values used in Equations (1)–(9) and in the experiments, with their basis.
4. IoV Threat and Deployment Model
Figure 1 shows the intended deployment. In-vehicle detectors observe CAN frames at a gateway electronic control unit or a telematics unit; edge detectors observe flow or packet features at a roadside unit or a multi-access edge server. Alerts, confidence values and, when requested, a local explanation are forwarded to a security operations function. The figure is conceptual; the experiments use recorded datasets, not a live deployment.
Figure 1.
Conceptual IoV deployment of the evaluated detectors at the roadside/edge layer. Solid arrows show the data and alert flows from the vehicles through the roadside unit (RSU)/V2X gateway to the edge detector and the cloud security operations centre (SOC); the dashed red arrow denotes adversarial traffic injected at the gateway, and the dashed purple arrow denotes feedback (audit results and model updates) from the SOC to the edge detector. Colours distinguish the vehicles (blue), gateway (orange), edge detector (green), SOC (purple) and adversary (red). In-vehicle placement at a gateway electronic control unit (Section 4) follows the same flow and is not drawn. The experiments in this paper use recorded CAN-bus and edge-network datasets; no live vehicular deployment was performed.
The adversary can (a) inject CAN frames through a compromised electronic control unit or a device attached to the OBD-II port to flood the bus (DoS), send random frames (fuzzing) or spoof signals such as speed, RPM, gear, gas pedal and steering angle [1,2]; or (b) send IP traffic to an edge service, including DDoS, scanning, injection, password, backdoor, ransomware and man-in-the-middle activity [3,11]. The detectors need no cryptographic keys and observe only frame or flow features. The adversary is not assumed to know the detector, so adaptive evasion is out of scope (Section 10). Because new attack variants appear over time, a detector must be judged on attack types it has not seen. The leave-one-attack-out experiment (Section 6.6) addresses this requirement.
5. Datasets and Duplicate-Aware Protocol
5.1. Datasets
Table 3 summarises the four datasets as they were processed. CICIoV2024 [2] contains decimal-encoded CAN frames (identifier and eight data bytes) from a 2019 vehicle, with a benign capture and one capture each for DoS and for spoofing of gas pedal, RPM, speed and steering wheel. Car-Hacking [1] contains raw CAN logs with time stamps for DoS, fuzzy, gear and RPM attacks; every frame carries an injected/regular flag, so each attack file also contains benign frames. We read the first 106 frames of each attack file. Edge-IIoTset [3] is used in its deep-learning release (DNN-EdgeIIoT) with fourteen attack types. UNSW-NB15 [11] is used as the union of its official training and testing files. All experiments are binary (benign versus attack); attack types are retained only for stratification and for the LOAO experiment. To keep the run time feasible on a single cloud runtime, 100,000 records per dataset are sampled with stratification by attack type after the split labels are assigned.
Table 3.
Dataset characteristics after loading, the splitting protocol and the measured train–test overlap.
5.2. Why Exact De-Duplication Fails for CAN Data
CAN traffic is periodic: each electronic control unit repeats its frames at a fixed rate, and many signals do not change while a vehicle is stationary. Injection attacks frequently repeat a single crafted frame. In CICIoV2024, the 1,408,219 recorded frames contain only 3588 distinct feature vectors, and the five attack types together contain 41 distinct frames. Removing exact duplicates, which is good practice for flow data, would therefore leave fewer than fifty attack records. We observed this in a preliminary run, in which de-duplication reduced three of the four Car-Hacking attack types (DoS, gear and RPM, without timing features) to a single distinct frame each. For the CAN datasets, we keep duplicates, because they are a genuine property of the traffic, and control leakage instead by splitting in time (Section 5.3). We then measure the remaining overlap. Table 3 shows that 98.61% of the CICIoV2024 test records, including 91.53% of the attack records, have an exact copy in the training pool. A detector can therefore score almost perfectly on this dataset by memorising frames, and the in-distribution results on it must be read with this in mind.
5.3. Splitting and Nested Stratified Sampling
Leakage control differs by data type, but the downstream procedure is identical. The steps are as follows; Algorithm 1 gives them as pseudocode.
- Fixed test, validation and pool partitions. For CICIoV2024 and Car-Hacking, each capture file is cut into 40 contiguous blocks of equal length in recording order. Within each file, 30% of the blocks are assigned to the test partition, 15% of the remainder to validation and the rest to the training pool, by a random permutation with seed 2026. Neighbouring frames, which are strongly correlated, therefore stay in the same partition. For Edge-IIoTset and UNSW-NB15, exact duplicates (identical features and label) are removed first; the records are then split 70/30 into development and test, and the development part 85/15 into pool and validation, with stratification by attack type and seed 2026. The partitions are created once per dataset and never change.
- Nested stratified fractions. For each training seed s ∈ {0, …, 4}, the pool records of every attack type (and of the benign class) are randomly permuted with seed 1000 + s. The subset Db consists of the first ⌈b·ng⌉ records of each group g. Because the same permutation is used for all b, D0.2 ⊂ D0.4 ⊂ D0.6 ⊂ D0.8 holds by construction, and every subset preserves the type distribution of the pool. Table 3 and Section 7.1 give the resulting sizes (about 12,000 to 48,000 training records).
- Fit on the training subset only. Encoders and scalers are fitted on Db alone and then applied to the validation and test partitions (Section 5.4). The validation partition is used for early stopping, LIME guidance and the isolation-forest threshold. The test partition is used only for the final scores.
| Algorithm 1. Duplicate-aware evaluation pipeline (main experiment). |
| Input: datasets ; fractions B = {0.2, 0.4, 0.6, 0.8}; seeds S = {0..4} hybrids A = {DNN-CNN, LSTM-CNN, LSTM-DNN} references C = {LogReg, RF, XGB, IForest} Output: run table R: one row per (dataset, model, configuration, fraction, seed) with TP, TN, FP, FN and all metrics 1: for each dataset d in do 2: X, y, t ← Load(d) # features, binary label, attack type 3: if d is a CAN capture then # CICIoV2024, Car-Hacking 4: (P,V,T) ← TemporalBlockSplit(X, 40 blocks/file, seed 2026) # duplicates are kept 5: else # Edge-IIoTset, UNSW-NB15 6: X, y, t ← RemoveExactDuplicates(X, y, t) 7: (P,V,T) ← StratifiedSplit(by t; 30% test, 15% val; seed 2026) 8: overlap(d) ← share of T with an exact copy in P # Table 3 9: for each seed s in S do 10: order ← per-type random permutation of P (seed 1000 + s) 11: for each b in B do 12: D_b ← first ⌈b·n_g⌉ records of each type g in order # nested by construction: D_0.2 ⊂ D_0.4 ⊂ D_0.6 ⊂ D_0.8 13: φ ← FitPreprocessing(D_b) # fitted on D_b only 14: for each c in C: R ← R ∪ Eval(Train(c, φ(D_b)), φ(T)) 15: for each a in A do 16: f ← TrainHybrid(a, φ(D_b), early stop on φ(V), seed s) 17: R ← R ∪ Eval(f, φ(T)) # baseline 18: F_k ← LimeSelect(f, φ(D_b), φ(V), s) # Algorithm 2 19: f_k ← TrainHybrid(a, φ(D_b)[F_k], seed s) 20: R ← R ∪ Eval(f_k, φ(T)[F_k]) # LIME-guided 21: if a = LSTM-DNN then # control 22: F_r ← RandomSubset(|F_k|, seed 500 + s) 23: R ← R ∪ Eval(TrainHybrid(a, φ(D_b)[F_r], s), φ(T)[F_r]) 24: CheckIntegrity(R) # TP + TN + FP + FN = |T|; metrics in [0,1]; # constant predictions flagged; nothing removed 25: return R |
| Algorithm 2. LIME-based feature selection (LimeSelect) and shortcut audit. |
| Input: detector f; training subset D_b; validation set V; seed s; mass ρ = 0.90; records n_e = 60; perturbations n_p = 500 Output: feature set F_k; importance vector I; mean guidance fidelity 1: E ← LimeTabularExplainer(5000 records of D_b, quartile, seed s) 2: Q ← 30 benign + 30 attack records of V (seed s) # never test 3: I ← zero vector of length d 4: for each record x in Q do 5: g_x ← E.explain(x, f, class = attack, n_p samples) # Equation (6) 6: I_j ← I_j + |w_j(g_x)| for every feature j 7: store Fid(x) # Equation (7) 8: I ← I/Σ_j I_j 9: F_k ← smallest top-ranked set with Σ I ≥ ρ and |F_k| ≥ max(3, ⌈0.25·d⌉) 10: return F_k, I, mean Fid Shortcut audit (per dataset, after the main experiment): 11: rank ← features sorted by mean I of LSTM-DNN at b = 0.8 12: for k in {1,3,5}, s in {0,1,2}, model in {LSTM-DNN, RF} do 13: retrain without rank [1..k]; evaluate on T # a large drop indicates reliance on a few cues |
5.4. Features and Preprocessing
CICIoV2024 uses its nine decimal fields (identifier and eight data bytes). For Car-Hacking, we parse the identifier, data length code and up to eight data bytes (missing bytes are coded −1) and add two causal timing features computed from preceding frames only: the gap to the previous frame and the gap to the previous frame with the same identifier, both clipped at 1 s. For Edge-IIoTset, we remove the fields that identify a particular capture or carry payload text (time stamp, IP addresses, ports, URIs, payloads and options, following the dataset authors) and, in addition, the TCP and UDP stream indices, which are capture-specific counters. Three Message Queuing Telemetry Transport (MQTT) fields remain categorical. For UNSW-NB15, the identifier and attack-category columns are removed and protocol, service and state are categorical. Constant columns are dropped. Categorical fields are ordinal-encoded (unseen values map to −1); every column is then transformed by sign(x)·log(1 + |x|), standardised and clipped to [−10, 10]. All fitting uses Db only.
6. Detectors, LIME-Guided Refinement and Additional Experiments
Figure 2 summarises the complete protocol.
Figure 2.
Evaluation protocol: (a) duplicate-aware splitting and nested stratified fractions; (b) detectors and validation-only LIME guidance with a random-subset control; (c) the five evaluations, all computed on the untouched test partition.
6.1. Hybrid Deep-Learning Architectures
Each record is presented as a sequence of d scalar features of shape (d, 1). This is the usual input format for such hybrids and allows convolutional and recurrent layers to be compared under identical inputs. The feature order carries no temporal meaning, so the recurrent and convolutional layers act as learned feature-interaction operators rather than as sequence models; Section 10 discusses this limitation. Table 4 lists the layers. All hybrids use rectified linear unit (ReLU) activations, an L2 penalty of 10−4 on every weight matrix, dropout 0.3 before the last hidden layer, a sigmoid output, Adam [30] and early stopping on validation loss with the best weights restored. LSTM layers follow [32].
Table 4.
Hybrid architectures (d = number of input features).
6.2. Reference Detectors
Three supervised references and one unsupervised reference are trained on exactly the same subsets and transformations: logistic regression (LogReg; balanced class weights), random forest (RF) [33] (200 trees, balanced subsample weights) and XGBoost (XGB) [34] (300 trees, depth 8, learning rate 0.1, positive-class weight equal to the benign-to-attack ratio), all from standard libraries [35]. Because operational products mostly rely on unsupervised anomaly detection [5], we add an isolation forest (IForest) [36] (200 trees) fitted on the benign records of Db only. Its threshold is the 99th percentile of the anomaly scores of benign validation records, so it uses no attack labels and targets a 1% false-positive rate.
6.3. LIME-Guided Refinement
The guided configuration is defined so that its effect can be attributed and reproduced (Algorithm 2). (1) The baseline hybrid is trained on Db. (2) Sixty validation records, 30 benign and 30 attack, are selected with the run seed. (3) For each record LIME [9] is run with 500 perturbations, quartile discretisation and a background sample of up to 5000 records of Db, explaining the attack class with all d features. (4) The absolute weights are summed per feature and normalised. (5) The smallest set of features that covers 90% of the total importance is kept, with at least max(3, ⌈0.25d⌉) features. (6) The same architecture is retrained from scratch on the selected features with the same seed, and it is evaluated on the same test partition. The test partition is never used in steps (1)–(5).
6.4. Random-Subset Control
An improvement after feature selection could come from the reduced dimensionality rather than from LIME. For LSTM-DNN, we therefore also retrain on k randomly chosen features, where k equals the number selected by LIME in the same run (seed 500 + s). If LIME carries useful information, LIME-selected features should beat random features of equal number.
6.5. LIME-Driven Shortcut Audit
A shortcut is a cue that separates the classes in a dataset without reflecting the attack mechanism [29]. For each dataset, we rank features by their mean LIME importance for LSTM-DNN at b = 0.8 over the five seeds (all computed on validation records), remove the top 1, 3 or 5 features, and retrain LSTM-DNN and random forest at b = 0.8 with seeds 0–2. If performance is unchanged after removing the features that LIME considers most important, the classes are separable by many redundant cues. If it collapses, the detector depended on those few features.
6.6. Leave-One-Attack-Out Experiment
For each dataset and each attack type a with at least 30 test records, all records of type a are removed from the training pool and from validation. The models are trained on the full remaining pool, and they are tested on the benign test records plus the test records of type a. The detection rate on a is the recall on those records. LSTM-DNN, random forest, XGBoost and the isolation forest are evaluated with seeds 0–2. Supervised models are not trained when the remaining pool contains only benign records. With 5, 4, 12 and 9 eligible types (Fingerprinting and man-in-the-middle (MITM) in Edge-IIoTset have fewer than 30 test records), this gives 360 runs.
7. Experimental Design and Statistics
7.1. Overview of the Experiments
Table 5 lists the experiments. The main experiment crosses 4 datasets, 4 fractions and 5 seeds with 11 configurations: four references, three hybrids in baseline and LIME-guided form, and the random-subset control, giving 880 runs. With the LOAO and shortcut-audit runs, 1312 detectors were trained and evaluated. Training subsets contain 11,904–12,003 records at b = 0.2 and 47,605–48,003 at b = 0.8; every test partition contains 30,000 records.
Table 5.
Experimental matrix and run accounting.
7.2. Metrics
Attack is the positive class. Accuracy, recall, precision, F1-score and the false-positive and false-negative rates are computed from the confusion counts (true positives, TP; true negatives, TN; false positives, FP; false negatives, FN) of the fixed test partition:
We also report the Matthews correlation coefficient (MCC) and the area under the precision–recall curve (PR-AUC), which is more informative than the area under the receiver operating characteristic curve (ROC-AUC) under class imbalance [37]. F1-score is the primary metric because the attack share ranges from 13% to 44% and accuracy alone would favour the majority class.
7.3. Statistical Analysis
Every main configuration is run with five seeds that change the training subset, the network initialisation, the LIME sampling and the tree ensembles, while the test partition stays fixed; this quantifies the variability that a single run would hide. We report mean ± standard deviation over seeds and 95% Student-t confidence intervals (CIs) in the supplementary results. Baseline and LIME-guided models are compared with the two-sided Wilcoxon signed-rank test [38] on F1-scores paired by dataset, fraction and seed (20 pairs per dataset and architecture, 80 pooled). Classifiers are compared on the same test records with McNemar’s test [39] (seed 0, b = 0.8). We used α = 0.05 and did not correct for multiplicity; with the 20 Wilcoxon comparisons in Section 8.3, results with p between 0.01 and 0.05 should be treated as weak evidence.
7.4. Integrity Checks and Discarded Runs
No run was discarded. After each run the code checks that TP + TN + FP + FN equals the test-set size and that all rate metrics lie in [0, 1] (MCC in [−1, 1]), and it flags runs whose predictions are constant. All 1312 runs passed the first two checks, no main run produced constant predictions, and no run failed or was removed. Every run, including those with poor results (for example, an isolation forest with zero recall), is reported. No post hoc exclusion rule is applied.
7.5. Implementation and Environment
The experiments were run as a single self-contained notebook cell on Google Colab (CPU runtime, TensorFlow 2.21, scikit-learn [35], XGBoost and LIME 0.2.0.1). The code downloads the datasets from public mirrors, caches them, records every run as one JSON line and resumes interrupted sessions; runs repeated after an interruption gave identical results and are counted once (lists the 1312 unique runs). The analysis code was written with the help of an AI-based assistant (Claude Opus 5.5, Anthropic) and checked by the authors (see Acknowledgments). Latency was measured on the same CPU as the median time of 100 single-record predictions; throughput was measured on a batch of 4096 records.
8. Results
8.1. In-Distribution Performance
Table 6 reports F1-score at the smallest and largest fractions together with FPR, MCC and PR-AUC at b = 0.8; Figure 3 shows F1 across all fractions. The full matrix (all fractions, all metrics, 95% CIs) is provided as Supplementary Table S1.
Table 6.
Test performance (%), mean ± SD over five seeds. F1 at 20% and 80% training fractions; FPR, MCC and PR-AUC at 80%.
Figure 3.
Test F1-score versus training fraction (mean ± SD over five seeds). Solid lines: unrefined models; dashed lines: LIME-guided retraining. The y-axes start at different values.
Three of the four datasets saturate. On CICIoV2024, random forest and XGBoost reach F1 = 100.00 ± 0.00% at every fraction, and all hybrids exceed 99% at b = 0.8. On Car-Hacking, random forest reaches 99.99% and the hybrids 99.47–99.90%. On Edge-IIoTset, every unrefined supervised model, including logistic regression, reaches 100.00%, with at most one false positive among 30,000 test records. The overlap figures of Table 3 explain CICIoV2024: almost every test frame was seen during training. Edge-IIoTset has no overlap, so its saturation reflects classes that are linearly separable (Section 8.4 and Section 8.5). Car-Hacking lies between the two: 32.49% of the attack test frames occur in the pool, and its injected frames differ visibly from benign ones in identifier, payload or timing [6].
UNSW-NB15 is the only dataset on which the models differ materially. XGBoost (90.36 ± 0.07%) and random forest (90.07 ± 0.07%) achieve the highest F1 and the lowest FPR (8.34% and 7.81%). The best hybrid, DNN-CNN, reaches 89.14 ± 0.07% with 9.99% FPR; LSTM-CNN is on par with logistic regression (86.50% versus 86.42%; FPR 16.32% versus 17.53%), and LSTM-DNN is below it (85.30%, FPR 20.63%). McNemar’s test confirms that the error patterns of random forest and XGBoost differ from that of the LIME-guided LSTM-DNN (p < 10−100): random forest is correct on 2229 test records that LSTM-DNN misclassifies and wrong on only 987 that LSTM-DNN classifies correctly (XGBoost: 2217 versus 942). LSTM-DNN, often presented as the strongest hybrid, is the weakest supervised model on this benchmark.
The unsupervised isolation forest, calibrated to a 1% benign FPR, detects almost nothing on CICIoV2024 (F1 = 0.00%) and UNSW-NB15 (0.11%) and only a minority of attacks on Car-Hacking (20.56%) and Edge-IIoTset (33.22%). In the CAN datasets, the spoofed frames use legitimate identifiers and plausible byte values, so they are not outliers in feature space. Their PR-AUC values (40–62%) show that the anomaly scores carry some ranking information, but not enough for an operating point with few false alarms.
8.2. Data Efficiency
Table 7 shows that reducing the training data from 80% to 20% of the pool (about 48,000 to 12,000 records) costs very little. On UNSW-NB15 the loss is 0.79–2.07 points for random forest, XGBoost and all hybrids, and random forest and XGBoost retain 99.0% and 98.7% of their F1. On the saturated datasets, retention is close to 1 because there is nothing left to lose. The largest losses are instabilities of the recurrent hybrids at small fractions: LIME-guided LSTM-DNN on Car-Hacking (5.07 points; F1 = 94.40 ± 6.73% at b = 0.2) and LIME-guided LSTM-CNN on Edge-IIoTset (5.67 points; 94.31 ± 12.70%). With 12,000 records, these benchmarks are not data-limited, so the data-efficiency experiment cannot distinguish the detectors. The more demanding test is generalisation to unseen attacks (Section 8.4).
Table 7.
Data efficiency of F1 (Equations (3)–(5)): Δ = F1(0.8) − F1(0.2) in percentage points, R = retention F1(0.2)/F1(0.8), S = Sstab (%) with α = 1.
8.3. Effect of LIME-Guided Refinement
Table 8 and Figure 4 answer RQ3. LIME-guided retraining did not improve any architecture overall. The pooled mean change is −0.10 points for DNN-CNN (34 losses, 19 wins, p = 1.8 × 10−4), −0.72 points for LSTM-CNN (p = 0.26) and −0.51 points for LSTM-DNN (p = 0.41). The only significant gain is +0.39 points for LSTM-CNN on UNSW-NB15 (p = 0.021), which is weak evidence given the number of comparisons. Significant losses occurred on Car-Hacking for all three architectures and on UNSW-NB15 for DNN-CNN (−0.16 points, p = 4.8 × 10−4). Retraining with fewer features did reduce latency by up to 44% for the recurrent models (Section 8.6), so refinement can still be useful for compression, but it does not improve detection.
Table 8.
Paired comparison of F1-scores (percentage points; pairs = dataset × fraction × seed). k/d: mean number of selected features/all features. W/L: wins/losses of the LIME-guided (LIME-k) configuration; ΔF1 = LIME-guided minus unrefined (LIME-k minus random-k). p: two-sided Wilcoxon signed-rank test.
Figure 4.
(a) Change in F1 after LIME-guided retraining relative to the unrefined model (mean ± SD over 20 fraction–seed pairs). (b) LIME-selected versus random feature subsets of equal size for LSTM-DNN.
The random-subset control shows that the LIME ranking is nonetheless informative. Feature sets chosen by LIME outperformed random sets of the same size on CICIoV2024 (+2.33 points, 14 wins of 16 non-tied pairs, p = 0.015) and on Edge-IIoTset (+5.02 points, 10 wins and no losses, p = 0.0050), and over all datasets (+1.75 points, p = 0.045). On UNSW-NB15, where LIME keeps 33 of 42 features, random subsets were slightly better (−0.38 points, p = 0.0094). LIME therefore identifies features that matter for the model, but removing the remaining features does not help a model that can already ignore them.
8.4. Detection of Unseen Attacks
Table 9 and Figure 5 answer RQ2. The near-perfect in-distribution scores on the CAN datasets do not carry over to attacks absent from training. On Car-Hacking, no model detects held-out DoS or gear attacks; random forest detects none of the four held-out types, LSTM-DNN detects 6.3% on average, and XGBoost 24.6%, owing to a single type (RPM, 98.2%). On CICIoV2024, mean detection is 28.3% for LSTM-DNN, 58.4% for random forest and 68.5% for XGBoost, with every model missing at least one type completely. The models disagree on which types they miss: random forest detects all held-out steering-wheel frames but no gas-pedal frames, and XGBoost does the opposite. Detection of a new attack thus depends on incidental properties of the learner rather than on any learned notion of abnormal behaviour. The threshold-free PR-AUC of random forest remains high for some held-out types (for example, 99.7% for Car-Hacking RPM and 96.0% for gear), which shows that the scores rank the unseen attacks correctly but fall below the decision threshold learned from the other attacks.
Table 9.
Leave-one-attack-out results: detection rate (%) on the held-out attack type, averaged over three seeds and then over types; minimum and maximum over types; number of types detected at below 10%; mean FPR (%).
Figure 5.
Detection rate (%) on each held-out attack type in the leave-one-attack-out experiment (mean over three seeds). Edge-IIoTset is omitted because all supervised models detect all twelve held-out types (Table 9).
On Edge-IIoTset, all supervised models detect every held-out type at 100%, with zero false positives. Together with the 100% score of logistic regression, this shows that the benign class occupies a small, distinctive region of feature space, so that anything outside it is labelled as an attack, which makes the dataset uninformative for comparing detectors. On UNSW-NB15, mean detection is 83–84% for all supervised models, but at higher false-positive rates (6.8–18.0%), and Fuzzers are mostly missed (13–26%). The isolation forest detects almost nothing on CICIoV2024 and UNSW-NB15, and in Edge-IIoTset it detects only the volumetric ICMP and UDP floods.
8.5. LIME Shortcut Audit
Table 10 addresses the shortcut part of RQ4. On Edge-IIoTset, LIME ranks MQTT and DNS fields highest, consistent with benign traffic in this testbed being dominated by MQTT sensor messages. Removing the five most important fields leaves F1 at 100.00% for both models, so the classes are separated by many redundant protocol cues rather than by one artefact. On the CAN datasets, removing the identifier (CICIoV2024 only) and the most informative payload bytes reduces LSTM-DNN F1 by at most 3.98 points (CICIoV2024) and 2.01 points (Car-Hacking), while random forest is unaffected (≥99.96%). On UNSW-NB15, removing the top features changes F1 by less than 1.5 points and slightly improves LSTM-DNN, which suggests that the features LIME ranks highest for this model are not the ones it actually relies on most. This is consistent with the low fidelity reported next. The audit therefore shows that high scores on these datasets do not depend on a single spurious feature. It cannot show the converse, that the models learned attack behaviour, which only the LOAO experiment probes.
Table 10.
Shortcut audit: test F1 (%) at b = 0.8 (mean of seeds 0–2) with all features and after removing the top-k LIME-ranked features (removed features listed below the table).
8.6. Explanation Quality, Cost and Model Selection
Figure 6 answers the remaining part of RQ4. Local fidelity is low: the weighted R2 of the LIME surrogate (seed 0, b = 0.8) is 0.12–0.20 on the CAN datasets, 0.35–0.62 on Edge-IIoTset and 0.09–0.36 on UNSW-NB15. For the recurrent models on UNSW-NB15, it is below 0.10, so the linear surrogate explains less than a tenth of the local variation of the model output. Stability is moderate: the mean top-5 Jaccard overlap between two LIME seeds is 0.63–0.73 on the CAN data, but only 0.16 (LSTM-CNN) and 0.30 (LSTM-DNN) on UNSW-NB15. An explanation costs 96–578 ms on CPU, whereas a single-record prediction costs 13–169 ms, so an explanation costs about 2.6 to 27 times as much as the prediction it explains, depending on the model and dataset. Figure 7 shows LIME explanations for one correctly and one incorrectly classified record of each class. Even for the true positive on Car-Hacking (p = 1.00), the surrogate fidelity is only 0.34.
Figure 6.
Explanation quality of the LIME-guided hybrids (seed 0, b = 0.8): local fidelity (weighted surrogate R2, Equation (7)), stability (mean top-5 Jaccard overlap for 20 validation records explained with two LIME seeds) and LIME run time per explanation on CPU.
Figure 7.
LIME explanations (top six weights; green supports attack, orange supports benign) for one true positive, true negative, false positive and false negative of the LIME-guided LSTM-DNN on Car-Hacking and UNSW-NB15 (seed 0, b = 0.8; feature thresholds refer to standardised values). Each title gives the predicted attack probability p and the surrogate fidelity R2. No false positive or false negative occurred on Edge-IIoTset, and no false positive occurred on CICIoV2024.
Table 11 combines the criteria of Equation (9). DNN-CNN, unrefined or LIME-guided, has the highest utility on all four datasets (U = 0.753–0.859), because it is the most accurate hybrid on UNSW-NB15, the most stable across fractions on three of the four datasets, the fastest (13–18 ms) and the most faithfully explained (guidance fidelity 0.16–0.59). LSTM-DNN has the lowest utility on every dataset. LIME-guided retraining raises the utility of the recurrent hybrids in seven of eight cases, mainly by shortening their inference time, not by improving detection.
Table 11.
Multi-criteria utility U(m) of Equation (9) with the weights of Table 2. F1, FPR and Sstab are means over fractions and seeds (%); Fid is the mean guidance fidelity (computed on the unrefined model and therefore equal for both rows of an architecture); latency is the median single-record CPU latency.
8.7. Principal Findings
- High in-distribution scores on CICIoV2024, Car-Hacking and Edge-IIoTset reflect the datasets rather than the detectors: 98.6% of CICIoV2024 test records occur in the training pool, and Edge-IIoTset is separated perfectly by logistic regression (RQ1).
- Attacks withheld from training are largely missed on the CAN data (mean detection 0–68% depending on the model, with complete misses for every model), whereas UNSW-NB15 retains about 83% detection at higher false-alarm rates (RQ2).
- LIME-guided retraining does not improve F1 (pooled changes −0.72 to −0.10 points), although LIME-selected features beat random features of the same number for LSTM-DNN (+1.75 points, p = 0.045) (RQ3).
- LIME explanations have low fidelity (R2 0.09–0.62), moderate stability and a cost several times that of inference. They are useful for auditing which cues a model uses, not as a reliable account of individual decisions (RQ4).
- Where the benchmark is not saturated, random forest and XGBoost outperform all hybrids, and DNN-CNN is the preferable hybrid; LIME-guided LSTM-DNN is not the best detector on any dataset.
9. Discussion
9.1. What the Near-Perfect Scores Mean
These experiments reproduce, in quantitative form, the concerns of Apruzzese et al. [5] summarised in Section 1. Two of their observations, on dataset limitations and on the questionable value of research evaluations, appear directly: on CICIoV2024, a detector that only memorised the attack frames of the training pool would already recognise 91.5% of the attack test records, and on Edge-IIoTset a linear model is sufficient. These results do not show that the datasets are useless. They show that a random or temporally blocked split measures recognition of known injection patterns, which is a narrower task than intrusion detection. We therefore recommend that IoV papers report the train–test overlap, a linear baseline and an unseen-attack test alongside any headline accuracy. All three cost little to compute, and each of them changes how the headline scores in this paper should be read.
9.2. Unseen Attacks and Concept Drift
Two further observations concern adaptation to new threats and to a changing environment. The LOAO experiment is a simple test of the first: on the CAN data, supervised detectors trained on the remaining attack types detect the held-out type only sporadically, and the isolation forest, the type of detector most often deployed [5], does not detect spoofing at all, because spoofed frames are not outliers. Detecting such attacks probably requires features that describe the relationship between signals over time, for example a speed value inconsistent with the RPM and gear, rather than single-frame statistics. This is consistent with the argument of Verma et al. [6] that realistic CAN attacks are hard to detect. Concept drift in the strict sense, a change of the benign distribution over months, cannot be studied with these datasets, which were each recorded within a short period; Section 10 lists this limitation.
9.3. What LIME Is Useful for
LIME-guided refinement treats LIME both as an explanation tool and as a way to improve detectors. The second use is not supported: retraining on LIME-selected features matched or slightly reduced F1 on average. The ranking does carry information, since it beats random selection, but the hybrids already down-weight uninformative features during training. As an auditing tool, LIME was more useful. Its rankings pointed to MQTT fields in Edge-IIoTset and to identifiers and payload bytes in the CAN data, which led directly to the shortcut audit and to the interpretation of the saturation. Its low fidelity and moderate stability mean that individual explanations should not be shown to an analyst without the fidelity value, and that conclusions should be drawn from aggregated rankings over many records and several seeds, as done here. These results agree with earlier evaluations of explanation methods in security [27,28].
9.4. Implications for Detector Design
Three practical implications follow. First, ensemble trees are strong references: on UNSW-NB15, they are more accurate than the hybrids, have lower false-positive rates and are cheaper to train, so a new hybrid architecture should be compared with them under the same protocol. Second, among the hybrids, the simpler DNN-CNN is more accurate, faster and more faithfully explained than the recurrent variants on non-sequential record inputs. Third, false-positive rates of 8–21% on UNSW-NB15 are far too high for operational use, since a gateway that processes thousands of records per second would raise many false alerts per second. Deployment studies should therefore report performance at a fixed low false-positive rate. The cost of LIME (0.1–0.6 s per explanation on CPU) also argues for explaining only alerts that are escalated to an analyst.
9.5. Why Keep the Security Setting?
Given the weaknesses of the available datasets, one could argue that LIME-guided hybrids should be evaluated in domains where suitable data exist. We kept the security setting because the question of interest, whether published IoV detection results support the claims made for them, can only be answered on IoV data. Our results confirm the concern: with the available datasets, an evaluation of IoV intrusion detection is informative about the datasets at least as much as about the detectors. We present this as the main finding rather than as a limitation.
10. Threats to Validity
Internal validity. The CAN datasets retain duplicated frames by design. Temporal blocking prevents adjacent frames from leaking, but identical frames recorded at different times remain on both sides of the split, as Table 3 quantifies. Hyperparameters were fixed a priori and not tuned per dataset; many hybrid runs used all 25 epochs, so longer training might change the hybrids slightly, although not enough to alter the saturated results. LIME was run with one configuration; other kernels or perturbation sizes could change fidelity.
Construct validity. The hybrids receive single records arranged as a feature sequence, so the convolutional and recurrent layers do not exploit temporal order. Detectors that use windows of consecutive CAN frames, as in Song et al. [17], are a different design and may generalise differently. Binary labels hide differences among attack types, which the LOAO experiment partly recovers.
Statistical validity. Five seeds per configuration give stable means, but standard deviations based on five values are themselves uncertain. The Wilcoxon tests are uncorrected for multiple comparisons, and McNemar’s tests use seed 0 only.
External validity. CICIoV2024 and Car-Hacking were recorded on a single stationary or lightly driven vehicle each, with attacks injected by the dataset authors; Edge-IIoTset and UNSW-NB15 are testbed captures. None contains vehicle-to-everything (V2X) messages, long-term drift or adaptive attackers. Stealthier CAN datasets such as ROAD [6] and V2X misbehaviour datasets are the natural next step. Latency was measured on a shared cloud CPU and is indicative only; energy was not measured.
11. Conclusions
We re-evaluated LIME-guided hybrid deep-learning intrusion detectors for the Internet of Vehicles on two real-vehicle CAN datasets, an edge/IIoT dataset and a general network benchmark, using a duplicate-aware protocol, nested training fractions, five seeds, conventional and unsupervised baselines and a leave-one-attack-out test. The near-perfect scores obtained on the CAN and edge datasets are largely explained by repeated frames and easily separable traffic, and on the CAN datasets they do not carry over to attack types that were absent from training; on Edge-IIoTset, whose classes are easily separable, all supervised models still detected every withheld attack type. LIME-guided retraining did not improve detection, although LIME rankings were better than random and were useful for auditing the cues the models rely on. On the only non-saturated benchmark, random forest and XGBoost outperformed all hybrids, and DNN-CNN was the best hybrid. These findings contradict the common claim that LIME-guided recurrent hybrids are the most accurate IoV detectors. Future work should use stealthier CAN and V2X datasets, window-based sequence models, evaluation at fixed low false-positive rates, and explanation methods whose fidelity is reported with every explanation.
Supplementary Materials
The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/computers15110863/s1, Table S1: complete performance matrix for all datasets, models, configurations and training fractions (mean, SD and 95% CI of accuracy, precision, recall, F1, FPR, MCC and PR-AUC); Table S2: leave-one-attack-out results for every held-out attack type.
Author Contributions
Conceptualization, H.A.S.; methodology, H.A.S.; software, S.K. and M.M.; validation, H.A.S., S.S., K.I.A.I., S.K., M.M. and A.A.I.; formal analysis, H.A.S. and K.I.A.I.; investigation, H.A.S., S.S., M.M. and A.A.I.; resources, S.S., K.I.A.I. and A.A.I.; data curation, H.A.S., S.K. and M.M.; writing—original draft preparation, H.A.S.; writing—review and editing, H.A.S., S.S., K.I.A.I., S.K., M.M. and A.A.I.; visualization, H.A.S., S.K. and M.M.; supervision, H.A.S.; project administration, H.A.S. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable. This study used publicly available network-security datasets and did not involve human participants or animals.
Informed Consent Statement
Not applicable.
Data Availability Statement
CICIoV2024, Car-Hacking, Edge-IIoTset and UNSW-NB15 are publicly available from their providers [1,2,3,11]. The experiment code, configuration, per-run records, split definitions and test-set predictions supporting the findings are provided as Supplementary Materials and are available from the corresponding author.
Acknowledgments
The authors thank the developers of the CICIoV2024, Car-Hacking, Edge-IIoTset and UNSW-NB15 datasets and the anonymous reviewers, whose comments led to a complete revision of the experimental study. During the preparation of this manuscript, the authors used an AI-based assistant (Claude Opus 5.5, Anthropic) to help draft and edit the text and the analysis code. The authors designed the study, ran all experiments, verified every reported number against the experiment records, and take full responsibility for the content of this publication.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Seo, E.; Song, H.M.; Kim, H.K. GIDS: GAN based intrusion detection system for in-vehicle network. In Proceedings of the 2018 16th Annual Conference on Privacy, Security and Trust (PST), Belfast, UK, 28–30 August 2018; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
- Neto, E.C.P.; Taslimasa, H.; Dadkhah, S.; Iqbal, S.; Xiong, P.; Rahman, T.; Ghorbani, A.A. CICIoV2024: Advancing realistic IDS approaches against DoS and spoofing attack in IoV CAN bus. Internet Things 2024, 26, 101209. [Google Scholar] [CrossRef] [Scilit]
- Ferrag, M.A.; Friha, O.; Hamouda, D.; Maglaras, L.; Janicke, H. Edge-IIoTset: A new comprehensive realistic cyber security dataset of IoT and IIoT applications for centralized and federated learning. IEEE Access 2022, 10, 40281–40306. [Google Scholar] [CrossRef] [Scilit]
- Khalifa, Y.; Ismaiel, A.; Elasmar, A.; Bahnassy, M.; Hefnawy, M.; Hamza, A.A.; Sakr, H.A.; Elashry, A. Enhancing vehicular ad-hoc networks security: A comprehensive analysis of emerging threats and countermeasures. In Proceedings of the 2024 International Japan-Africa Conference on Electronics, Communications, and Computations (JAC-ECC), Alexandria, Egypt, 16–18 December 2024; pp. 129–134. [Google Scholar] [CrossRef] [Scilit]
- Apruzzese, G.; Laskov, P.; Montes de Oca, E.; Mallouli, W.; Brdalo Rapa, L.; Grammatopoulos, A.V.; Di Franco, F. The role of machine learning in cybersecurity. Digit. Threats Res. Pract. 2023, 4, 1–38. [Google Scholar] [CrossRef] [Scilit]
- Verma, M.E.; Bridges, R.A.; Iannacone, M.D.; Hollifield, S.C.; Moriano, P.; Hespeler, S.C.; Kay, B.; Combs, F.L. A comprehensive guide to CAN IDS data and introduction of the ROAD dataset. PLoS ONE 2024, 19, e0296879. [Google Scholar] [CrossRef] [Scilit]
- Sommer, R.; Paxson, V. Outside the closed world: On using machine learning for network intrusion detection. In 2010 IEEE Symposium on Security and Privacy, Oakland, CA, USA, 16–19 May 2010; IEEE: New York, NY, USA, 2010; pp. 305–316. [Google Scholar] [CrossRef] [Scilit]
- Arp, D.; Quiring, E.; Pendlebury, F.; Warnecke, A.; Pierazzi, F.; Wressnegger, C.; Cavallaro, L.; Rieck, K. Dos and don’ts of machine learning in computer security. In Proceedings of the 31st USENIX Security Symposium, Boston, MA, USA, 10–12 August 2022; pp. 3971–3988. [Google Scholar]
- Ribeiro, M.T.; Singh, S.; Guestrin, C. “Why should I trust you?” Explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 1135–1144. [Google Scholar] [CrossRef] [Scilit]
- Tavallaee, M.; Bagheri, E.; Lu, W.; Ghorbani, A.A. A detailed analysis of the KDD CUP 99 data set. In 2009 IEEE Symposium on Computational Intelligence for Security and Defense Applications, Ottawa, ON, Canada, 8–10 July 2009; IEEE: New York, NY, USA, 2009; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
- Moustafa, N.; Slay, J. UNSW-NB15: A comprehensive data set for network intrusion detection systems (UNSW-NB15 network data set). In 2015 Military Communications and Information Systems Conference (MilCIS), Canberra, Australia, 10–12 November 2015; IEEE: New York, NY, USA, 2015; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
- Kapoor, S.; Narayanan, A. Leakage and the reproducibility crisis in machine-learning-based science. Patterns 2023, 4, 100804. [Google Scholar] [CrossRef] [Scilit]
- Engelen, G.; Rimmer, V.; Joosen, W. Troubleshooting an intrusion detection dataset: The CICIDS2017 case study. In 2021 IEEE Security and Privacy Workshops (SPW), Virtual, 27 May 2021; IEEE: New York, NY, USA, 2021; pp. 7–12. [Google Scholar] [CrossRef] [Scilit]
- Sharafaldin, I.; Lashkari, A.H.; Ghorbani, A.A. Toward generating a new intrusion detection dataset and intrusion traffic characterization. In Proceedings of the 4th International Conference on Information Systems Security and Privacy—ICISSP, Funchal, Portugal, 22–24 January 2018; SciTePress: Setúbal, Portugal, 2018; pp. 108–116. [Google Scholar] [CrossRef] [Scilit]
- Ring, M.; Wunderlich, S.; Scheuring, D.; Landes, D.; Hotho, A. A survey of network-based intrusion detection data sets. Comput. Secur. 2019, 86, 147–167. [Google Scholar] [CrossRef] [Scilit]
- Hindy, H.; Brosset, D.; Bayne, E.; Seeam, A.K.; Tachtatzis, C.; Atkinson, R.; Bellekens, X. A taxonomy of network threats and the effect of current datasets on intrusion detection systems. IEEE Access 2020, 8, 104650–104675. [Google Scholar] [CrossRef] [Scilit]
- Song, H.M.; Woo, J.; Kim, H.K. In-vehicle network intrusion detection using deep convolutional neural network. Veh. Commun. 2020, 21, 100198. [Google Scholar] [CrossRef] [Scilit]
- Jan, S.U.; Ahmed, S.; Shakhov, V.; Koo, I. Toward a lightweight intrusion detection system for the Internet of Things. IEEE Access 2019, 7, 42450–42471. [Google Scholar] [CrossRef] [Scilit]
- Doshi, R.; Apthorpe, N.; Feamster, N. Machine learning DDoS detection for consumer Internet of Things devices. In 2018 IEEE Security and Privacy Workshops (SPW), San Francisco, CA, USA, 24 May 2018; IEEE: New York, NY, USA, 2018; pp. 29–35. [Google Scholar]
- Sakr, H.A.; Fouda, M.M.; Ashour, A.F.; Abdelhafeez, A.; El-Afifi, M.I.; Abdellah, M.R. Machine learning-based detection of DDoS attacks on IoT devices in multi-energy systems. Egypt. Inform. J. 2024, 28, 100540. [Google Scholar] [CrossRef] [Scilit]
- Sakr, H.A.; El-Afifi, M.I.; El-Mowafy, M.A.; Ibrahim, H.M. Detecting DDoS threats in IoT-driven 6G-energy hubs networks using machine learning algorithms. Discov. Appl. Sci. 2025, 7, 1002. [Google Scholar] [CrossRef] [Scilit]
- Hamza, A.A.; Sakr, H.A.; Elashry, A. SBFL-GAN: Secure blockchain empowered federated learning and GAN model for providing preserving of IoMT. Neural Comput. Appl. 2026, 38, 16. [Google Scholar] [CrossRef] [Scilit]
- Lundberg, S.M.; Lee, S.-I. A unified approach to interpreting model predictions. In NIPS’17: Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; Curran Associates: Red Hook, NY, USA, 2017; pp. 4765–4774. [Google Scholar]
- Barredo Arrieta, A.; Díaz-Rodríguez, N.; Del Ser, J.; Bennetot, A.; Tabik, S.; Barbado, A.; García, S.; Gil-López, S.; Molina, D.; Benjamins, R.; et al. Explainable artificial intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI. Inf. Fusion 2020, 58, 82–115. [Google Scholar] [CrossRef] [Scilit]
- Sharma, B.; Sharma, L.; Lal, C.; Roy, S. Explainable artificial intelligence for intrusion detection in IoT networks: A deep learning based approach. Expert Syst. Appl. 2024, 238, 121751. [Google Scholar] [CrossRef] [Scilit]
- Kaur, N.; Gupta, L. Securing the 6G–IoT environment: A framework for enhancing transparency in artificial intelligence decision-making through explainable artificial intelligence. Sensors 2025, 25, 854. [Google Scholar] [CrossRef] [Scilit]
- Warnecke, A.; Arp, D.; Wressnegger, C.; Rieck, K. Evaluating explanation methods for deep learning in security. In 2020 IEEE European Symposium on Security and Privacy (EuroS&P), Virtual, 7–11 September 2020; IEEE: New York, NY, USA, 2020; pp. 158–174. [Google Scholar]
- Alvarez-Melis, D.; Jaakkola, T.S. On the robustness of interpretability methods. arXiv 2018, arXiv:1806.08049. [Google Scholar]
- Geirhos, R.; Jacobsen, J.-H.; Michaelis, C.; Zemel, R.; Brendel, W.; Bethge, M.; Wichmann, F.A. Shortcut learning in deep neural networks. Nat. Mach. Intell. 2020, 2, 665–673. [Google Scholar] [CrossRef] [Scilit]
- Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations (ICLR), San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Srivastava, N.; Hinton, G.; Krizhevsky, A.; Sutskever, I.; Salakhutdinov, R. Dropout: A simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 2014, 15, 1929–1958. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [Scilit]
- Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
- Chen, T.; Guestrin, C. XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar] [CrossRef] [Scilit]
- Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
- Liu, F.T.; Ting, K.M.; Zhou, Z.-H. Isolation forest. In 2008 Eighth IEEE International Conference on Data Mining, Pisa, Italy, 15–19 December 2008; IEEE: New York, NY, USA, 2008; pp. 413–422. [Google Scholar] [CrossRef] [Scilit]
- Saito, T.; Rehmsmeier, M. The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets. PLoS ONE 2015, 10, e0118432. [Google Scholar] [CrossRef] [Scilit]
- Wilcoxon, F. Individual comparisons by ranking methods. Biom. Bull. 1945, 1, 80–83. [Google Scholar] [CrossRef] [Scilit]
- McNemar, Q. Note on the sampling error of the difference between correlated proportions or percentages. Psychometrika 1947, 12, 153–157. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.






