Skip to content
Open access

Hybrid 1D CNN-BiLSTM with focal loss for robust intrusion detection in in-vehicle CAN networks

Jul 2026 · PLoS ONE · Vol 21, pp. e0353472 · 0 citations · 52 references
Medicine

TL;DR

These findings confirm that a combination of spatial feature extraction, temporal sequence modeling, and imbalance-aware optimization not only ensures but also delivers a highly effective and more reliable intrusion detection solution for in-vehicle CAN network security.

Abstract

The Controller Area Network (CAN) bus serves as the primary communication framework in modern vehicles, enabling reliable data exchange among Electronic Control Units (ECUs) for seamless interaction. The CAN protocol lacks built-in protection, leaving in-vehicle networks vulnerable to cyberattacks such as denial-of-service, message injection, replay, and suppression.To address these challenges, this study presents a deep learning–based intrusion detection approach that integrates a 1D Convolutional Neural Network (1D CNN) with a Bidirectional Long Short-Term Memory (BiLSTM) model, along with focal loss to improve detection performance. The 1D CNN is responsible for capturing spatial patterns from CAN frame attributes, including arbitration ID, data length code, and payload information. In contrast, the BiLSTM learns temporal dependencies by analyzing sequence patterns in both forward and backward directions. Furthermore, instead of relying on synthetic data balancing techniques such as SMOTE, focal loss is applied to give greater importance to difficult-to-detect attack samples during training, thereby effectively addressing the issue of class imbalance in CAN datasets. Additionally window labeling tactic that helps detect attacks more sensitively within a temporal window is also proposed. Besides these, the Car-Hacking dataset (driving scenario) with stratified 10-fold cross-validation is used to test the above framework. The experimental results demonstrate that the proposed approach can achieve an accuracy of 97.41%, precision of 96.37%, recall of 96.73%, F1-score of 96.49%, and ROC-AUC of 0.9971 which is way above the baseline BiLSTM model performance from the previous work. These findings confirm that a combination of spatial feature extraction, temporal sequence modeling, and imbalance-aware optimization not only ensures but also delivers a highly effective and more reliable intrusion detection solution for in-vehicle CAN network security.

Read PDF

Similar papers

Open access Sep 2026

A hybrid CNN and attentive hierarchical BiLSTM model with SMO for intrusion detection in IIoT

This study introduces a novel IDS called CNN-AH-BiLSTM that employs spider monkey optimization (SMO) to optimize data which enables system to not only deal with high-dimensional data but also ability to handle uncertainties in the data.

Sushama L. Pawar, M. Karyakarte · 0 citations
Conference Open access 2026

A Lightweight NLP-CNN Framework Based on Semantic Flow Representation for Network Intrusion Detection

One lesson emerges from the experiments: putting the effort into how traffic is written down, instead of making the classifier heavier, offers an economical and workable path to intrusion detection across heterogeneous network environments.

Asmaa Benchama, Khalid Zebbara · 0 citations
Open access Sep 2026

A cross-attention CNN–LSTM fusion model for network traffic anomaly detection

Detecting cyber intrusions in modern IoT networks is challenging because of their large scale, heterogeneous device ecosystems, and high-volume traffic patterns. This paper presents a cross-attention CNN–LSTM fusion architecture that jointly learns the spatial and temporal characteristics of network traffic for bin...

Mohamed Fakri, A. Najid, Rachid Ben Said et al. · 0 citations
Aug 2026

In-vehicle network intrusion detection via traffic-to-image encoding and transfer learning-based visual transformers

In complex communication environments, in-vehicle networks face severe security challenges. To address the limited multi-scenario coverage, imbalanced data distribution, and high training cost of existing in-vehicle network intrusion-detection methods, an intelligent intrusion detection system based on transfer learnin...

Chen Yang, Feng Du, Shuai Zhang et al. · 0 citations
Open access Aug 2026

Unsupervised deep learning for IoT botnet detection in a surveillance VLAN via multi-source traffic, threat intelligence and honeypot corroboration

An unsupervised deep-learning detection system using autoencoder (AE)-family models that learn normal traffic behaviors and identify anomalies through reconstruction error (MSE) and provides a transparent, reproducible methodology for proactive, scalable, and interpretable botnet detection.

Özkan Zeybek, Hasan Güler · 0 citations
Open access Aug 2026

Deep Learning-Based Network Intrusion Detection Using Hybrid CNN and LSTM Architecture

The findings indicate that hybrid deep learning techniques can improve network security by enhancing intrusion detection capability while reducing false alarms.

A. O. Jimoh-Mahmud, Abubakar Dayyabu, Abubakar Sadiq Idris et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.