
IEEE EMBEDDED SYSTEMS LETTERS, VOL. 17, NO. 2, APRIL 2025 67
TinyML-Based Intrusion Detection System for
In-Vehicle Network Using Convolutional Neural
Network on Embedded Devices
Hyungchul Im , Graduate Student Member, IEEE, and Seongsoo Lee , Member, IEEE
Abstract—This letter proposes a novel model for effectively
detecting malicious messages in controller area network (CAN)
communication, which is widely used in automotive networks.
Because in-vehicle networks operate in resource-constrained
environments, an intrusion detection system (IDS) must simul-
taneously provide a low computational load and excellent
detection performance. However, existing models are unsuitable
for deployment on low-power embedded devices owing to their
high computational requirements. This letter presents a low-
complexity convolutional neural network (CNN)-based IDS for
deployment on embedded edge devices. The proposed model
applies CNN operations separately to the CAN ID sequence
and the data field of the CAN frame to extract features
and concatenate them for feature fusion. Experimental results
demonstrate that this approach requires considerably less com-
putational load and provides superior detection performance.
Furthermore, the proposed model is deployed on a resource-
constrained nRF52840 microcontroller using TensorFlow Lite for
Microcontrollers with 20.44-kB flash memory and 26.44-kB RAM
without quantization.
Index Terms—Controller area network (CAN), convolutional
neural network (CNN), edge devices, intrusion detection system
(IDS), tiny machine learning (TinyML).
I. INTRODUCTION
R
ECENTLY, electronic control device applications have
increased in the automotive industry, and vehicle-to-
vehicle (V2V) and vehicle-to-infrastructure (V2I) technologies
are developing, increasing the potential for vehicle cyberat-
tacks [1]. Controller area network (CAN) communication is
the most widely used method because it efficiently manages
data transmission between electronic control units (ECUs)
and offers flexibility through its multimaster structure, allow-
ing any node to initiate data transmission. However, CAN
communication lacks security mechanisms, such as message
encryption and authentication, making it vulnerable to attacks.
Therefore, attackers can easily inject manipulated messages
Received 21 August 2024; revised 13 September 2024; accepted
30 September 2024. Date of publication 7 October 2024; date of current
version 18 April 2025. This work was supported in part by the Research
and Development Program of the Ministry of Trade, Industry, and Energy
(MOTIE) and Korea Evaluation Institute of Industrial Technology (KEIT)
under Grant RS-2022-00155731 and Grant RS-2022-00154973, and in part
by the Korea Institute for Advancement of Technology (KIAT) Grant funded
by the Korea Government (MOTIE) under Grant P0012451. This manuscript
was recommended for publication by C. Yang. (Corresponding author:
Seongsoo Lee.)
The authors are with the Department of Intelligent Semiconductors,
Soongsil University, Seoul 06978, Republic of Korea (e-mail: tory@
soongsil.ac.kr; sslee@ssu.ac.kr).
Digital Object Identifier 10.1109/LES.2024.3475470
from inside and outside a vehicle, giving them control over
the vehicle regardless of the driver’s intention [2], [3]. Such
vulnerabilities in CAN communication can lead to extremely
dangerous situations while driving, making it essential to
monitor the internal systems of vehicles and detect attacks.
Various approaches for ML-based intrusion detection systems
(IDSs) have been proposed, leveraging their capability to
process substantial data volumes without necessitating domain-
specific expertise. Among them, the deep convolutional neural
network (DCNN) IDS proposed by Song et al. [4] is a prominent
convolutional neural network (CNN)-based IDS. The DCNN
effectively simplifies the inception-ResNet model. Similarly,
Desta et al. [5] proposed the Rec-CNN model that generates data
by combining recurrent plots to add temporal dependencies of
sequences to the input data. Furthermore, the HyDL-IDS model
was proposed, which combines a CNN and an LSTM to learn
spatial and temporal sequences in CAN traffic [6]. Seo et al. [7]
proposed a generative adversarial network (GAN)-based model
that can detect new attacks that have not been used in training.
Agrawaletal.[8] developed the NovelADS model to address the
typically lower detection performance of unsupervised learning-
based IDS than that of supervised learning-based IDS. Owing to
the limited computing resources of automotive devices, CanNet
was designed as a lightweight detection method [9]. However,
CanNet still requires a high computational load, which is not
suitable for deployment on edge devices.
The main contributions of this letter are summarized as
follows.
1) We propose a low-complexity intrusion detection system
(LC-IDS) for deployment on resource-constrained
devices as a tiny machine learning (TinyML) solution.
The floating-point operations (FLOPs) demonstrate that
the complexity of this model is significantly lower than
that of existing models.
2) Based on experimental results, the proposed LC-IDS
model performs significantly well in attack detection.
Additionally, it detects attacks on a per-frame basis.
3) We investigate the LC-IDS in terms of RAM and
flash usage, as well as energy consumption, for its
applicability in deployment on low-power platforms.
II. P
ROPOSED INTRUSION DETECTION SYSTEM
A. Feature Extraction
To train the LC-IDS, the appearance patterns of CAN IDs
occurring on the CAN bus and the data field of the “last frame”
are used as features, as shown in Fig. 1. The term “last frame”
1943-0671
c
2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See https://www.ieee.org/publications/rights/index.html for more information.
Authorized licensed use limited to: MCKV Institute of Engineering. Downloaded on April 15,2026 at 05:56:36 UTC from IEEE Xplore. Restrictions apply.