Deep Defence on Wheels: A Dual Intrusion Detection System Architecture for Comprehensive In-Vehicle Network Security
Organizations: Trinity College Dublin, Ireland
Abstract
Increasing connectivity to the outside world and the lack of inbuilt security mechanisms have made legacy intra-vehicular networks vulnerable to cyberattacks. Initial research focused on maximising detection accuracy for known and unknown attacks, often using large, full-precision machine learning models. However, embedding IDSs into vehicular electronic systems also requires low detection latency, energy efficiency and minimal electronic control unit (ECU) resource overhead to process about 2,000 CAN frames/s. Lightweight models must balance accuracy with these deployment constraints. We propose a dual IDS framework comprising supervised and unsupervised learning-based solutions, each optimised for real-time, resource-constrained automotive platforms. A quantised LSTM-based IDS (QLSTM-IDS) achieves over 99.9% detection accuracy for DoS/Flooding, Fuzzing and Spoofing/Malfunction attacks using a single model architecture evaluated on two widely used datasets. The model is trained using the Brevitas quantisation-aware training library, transformed into a dataflow accelerator with custom blocks compatible with AMD's FINN toolchain, and synthesised using Vitis HLS. Complementing this, an 8-bit quantised convolutional autoencoder-based IDS (QCAE-IDS), quantised using AMD's Vitis-AI toolchain, detects previously unseen anomalies that alter CAN-ID sequence patterns with over 99% accuracy. An integration architecture enables both models to operate on a single FPGA, bridging the network interface IP and processing system to minimise software overhead. QLSTM-IDS achieves 0.25 ms inference latency and 0.8 mJ energy consumption per message, while QCAE-IDS achieves 0.42 ms and 1.1 mJ per block. Both solutions are deployed and evaluated on the ZCU104 SoC (XCZU7EV FPGA), demonstrating a flexible hardware/software co-design for real-time detection of known and unknown attacks on high-speed CAN buses.
Figures & tables
| Attack | Model | Precision | Recall | F1 | FNR |
|---|---|---|---|---|---|
| (%) | (%) | (%) | (%) | ||
| DoS | DCNN ( Song et al., 2020 ) | 100 | 99.89 | 99.95 | 0.13 |
| NovelADS ( Agrawal et al., 2022 ) | 99.97 | 99.91 | 99.94 | - | |
| TCAN-IDS ( Cheng et al., 2022 ) | 100 | 99.97 | 99.98 | - | |
| GRU ( Ma et al., 2022 ) | 99.93 | 99.91 | 99.92 | - | |
| BIDS ( Rangsikunpum et al., 2024 ) | 99.50 | 97.73 | 98.63 | - |
| Model Prec. Recall F1 XGBoost ( Anjum et al., 2022 ) 100 90 94.74 RF ( Santa Barletta et al., 2024 ) 100 100 100 G-IDCS ( Park et al., 2023 ) 99.73 99.72 99.72 LSTM ( Hossain et al., 2020 ) - 100 100 QLSTM-IDS 100 100 100 (a) Sonata - Flooding | Model Prec. Recall F1 XGBoost ( Anjum et al., 2022 ) 100 90 94.74 RF ( Santa Barletta et al., 2024 ) 100 100 100 LSTM ( Hossain et al., 2020 ) - 100 100 G-IDCS ( Park et al., 2023 ) 96.92 99.74 98.31 QLSTM-IDS 100 100 100 (b) Soul - Flooding | Model Prec. Recall F1 XGBoost ( Anjum et al., 2022 ) 100 90 94.74 RF ( Santa Barletta et al., 2024 ) 100 100 100 LSTM ( Hossain et al., 2020 ) - 100 100 G-IDCS ( Park et al., 2023 ) 99.65 100 99.83 QLSTM-IDS 100 100 100 (c) Spark - Flooding |
| Model Prec. Recall F1 XGBoost ( Anjum et al., 2022 ) 99.98 99.08 99.53 RF ( Santa Barletta et al., 2024 ) 99.79 99.93 99.86 G-IDCS ( Park et al., 2023 ) 100 100 100 LSTM ( Hossain et al., 2020 ) - 99.95 99.96 QLSTM-IDS 99.87 99.98 99.93 (d) Sonata - Fuzzing | Model Prec. Recall F1 XGBoost ( Anjum et al., 2022 ) 99.99 99.58 99.78 RF ( Santa Barletta et al., 2024 ) 99.79 99.93 99.86 LSTM ( Hossain et al., 2020 ) - 94.69 97.01 G-IDCS ( Park et al., 2023 ) 100 99.84 99.92 QLSTM-IDS 99.21 100 99.60 (e) Soul - Fuzzing | Model Prec. Recall F1 XGBoost ( Anjum et al., 2022 ) 97.34 92 94.6 RF ( Santa Barletta et al., 2024 ) 99.79 99.93 99.86 LSTM ( Hossain et al., 2020 ) - 98.23 98.31 G-IDCS ( Park et al., 2023 ) 98.92 100 99.46 QLSTM-IDS 98.24 92.20 95.13 (f) Spark - Fuzzing |
| Model Prec. Recall F1 XGBoost ( Anjum et al., 2022 ) 99.92 100 99.96 RF ( Santa Barletta et al., 2024 ) 99.90 99.98 99.94 G-IDCS ( Park et al., 2023 ) 100 99.64 99.82 LSTM ( Hossain et al., 2020 ) - 100 100 QLSTM-IDS 100 100 100 (g) Sonata - Malfunction | Model Prec. Recall F1 XGBoost ( Anjum et al., 2022 ) 100 93.22 96.49 RF ( Santa Barletta et al., 2024 ) 99.90 99.98 99.94 LSTM ( Hossain et al., 2020 ) - 96.97 90.87 G-IDCS ( Park et al., 2023 ) 95.92 99.03 97.45 QLSTM-IDS 100 100 100 (h) Soul - Malfunction | Model Prec. Recall F1 XGBoost ( Anjum et al., 2022 ) 99.80 100 99.90 RF ( Santa Barletta et al., 2024 ) 99.90 99.98 99.94 LSTM ( Hossain et al., 2020 ) - 100 100 G-IDCS ( Park et al., 2023 ) 99.36 100 99.68 QLSTM-IDS 100 100 100 (i) Spark - Malfunction |
| Subset | Attack | Model | Precision | Recall | F1 |
|---|---|---|---|---|---|
| Sonata | Flooding | Pre-Q | 100 | 99.28 | 99.64 |
| QCAE-SA | 100 | 99.28 | 99.64 | ||
| Fuzzy | Pre-Q | 100 | 99.5 | 99.75 | |
| QCAE-SA | 100 | 99.5 | 99.75 | ||
| Malfunction | Pre-Q | 100 | 96.8 | 98.37 | |
| QCAE-SA | 100 | 94.24 | 97.04 |
| Attack | Message Type | Pred. N | Pred. A |
|---|---|---|---|
| Flooding | True N | 585 | 0 |
| True A | 3 | 412 | |
| Fuzzy | True N | 606 | 0 |
| True A | 2 | 392 | |
| Malfunction | True N | 594 | 0 |
| True A | 24 | 393 |
| Models | Latency | Frames | Platform |
|---|---|---|---|
| GRU ( Ma et al., 2022 ) | 890 ms | 5000 CAN frames | Jetson Xavier NX |
| MLIDS ( Desta et al., 2020 ) | 275 ms | per CAN frame | GTX Titan X |
| NovelADS ( Agrawal et al., 2022 ) | 128.7 ms | 100 CAN frames | Jetson Nano |
| TAN-IDS ( Nguyen et al., 2023 ) | 11.6 ms | 128 CAN frames | - |
| DCNN ( Song et al., 2020 ) | 5 ms | 29 CAN frames | Tesla K80 |
| TCAN-IDS ( Cheng et al., 2022 ) | 3.4 ms | 64 CAN frames | Jetson AGX |
| Function | LUTs (%) | FFs (%) | LUTRAM (%) | BRAMs (%) | DSPs (%) |
|---|---|---|---|---|---|
| QLSTM-IDS | 40902 (17.75) | 11234 (2.44) | 4669 (4.59) | 23.5 (7.53) | 12 (0.69) |
| QCAE-IDS | 39956 (17.34) | 51957 (11.1) | - | 50 (16.51) | 125 (7.18) |
| CAN-NC | 887 (0.38) | 625 (0.14) | 18 (0.02) | - | - |
| Overall | 81745 (35.47) | 63816 (13.68) | 4687 (4.61) | 73.5 (24.04) | 137 (7.87) |
| Model | Latency (ms) | % Resource Utilisation | Power (W) | |||||
|---|---|---|---|---|---|---|---|---|
| LUT | FF | DSP | BRAM | URAM | Idle | Active | ||
| QCAE-CH (B4096) | 0.43 | 27.17 | 25.03 | 40.74 | 35.42 | 47.92 | 4.36 | 4.89 |
| QCAE-IDS (B512) | 0.42 | 17.34 | 11.10 | 7.18 | 16.51 | 12.5 | 2.61 | 3.11 |
| Model | LUTs | FFs | BRAM (Mb) | Energy (mJ) | Misclassifications |
|---|---|---|---|---|---|
| QMLP ( Khandelwal and Shreejith, 2022a ) | 56,733 (24.6%) | 72,147 (15.6%) | 3.06 | 1.96 | 75/200,000 |
| CQMLP ( Khandelwal and Shreejith, 2023a ) | 3999 (1.74%) | 4524 (0.98%) | 0.84 | 0.23 | 147/180,000 |
| BIDS ( Rangsikunpum et al., 2024 ) | 23,256 (10.09%) | 37,943 (8.2%) | 4.07 | 0.35 | 70/187,062 |
| QLSTM-IDS | 40,902 (17.75%) | 11,234 (2.44%) | 0.82 | 0.8 | 11/620,200 |
| QCAE-IDS | 39,956 (17.34%) | 51,957 (11.1%) | 1.74 | 1.1 | 29/3011 |