A Comparative Evaluation of Attention Mechanisms for CAN Bus Attack Detection
Keywords:
Internet of Vehicles, CAN bus, attack detection system, attention mechanism, data leakage, explainable artificial intelligenceAbstract
The lack of authentication and encryption mechanisms in the CAN bus used in in-vehicle networks leaves vehicles vulnerable to DoS and spoofing attacks. In this study, the contribution of attention mechanisms to the detection of CAN attacks was examined in a controlled manner using the CICIoV2024 dataset. The SE, ECA, CBAM-1D, and MHSA modules were added to a fixed 1D-CNN backbone, and the models were evaluated on a feature axis based on individual messages and a time axis consisting of sequential messages, under a partitioning protocol that prevents data leakage. While all models remained at a macro F1 score of approximately 0.20 on the feature axis, performance on the time axis increased to 0.67. None of the attention modules outperformed the baseline model; however, they increased the number of parameters and inference time. SHAP analysis also showed that the attention modules did not significantly alter the feature importance ranking. The results demonstrate that, in CAN attack detection, input representation and the evaluation protocol are more decisive factors than the model architecture.