Skip to Content
TechnologiesTechnologies
  • Article
  • Open Access

18 June 2026

CAN-TEMPO: Unsupervised CAN Bus Intrusion Detection via Temporal Multi-Period Oscillation Encoding

,
,
,
and
1
C3S Laboratory, Hassan II University of Casablanca, Casablanca 20010, Morocco
2
College of Computing, Mohammed VI Polytechnic University, Ben Guerir 43150, Morocco
3
Faculty of Sciences Dhar El Mahraz, Sidi Mohamed Ben Abdellah University, Fez 30003, Morocco
*
Authors to whom correspondence should be addressed.

Abstract

The security of Controller Area Network (CAN) systems is critical for modern automotive safety, as their lack of built-in security mechanisms makes them vulnerable to cyberattacks. In this work, we propose CAN-TEMPO, an unsupervised anomaly detection framework that explicitly models the multi-periodic structure of CAN traffic. The proposed approach leverages a Temporal Multi-Periodic Oscillation (TEMPO) block, which uses frequency-domain analysis to transform one-dimensional CAN sequences into multi-scale two-dimensional representations. This design enables the model to capture both intra-period correlations and inter-period temporal variations. We evaluate CAN-TEMPO on multiple public CAN intrusion detection benchmarks under diverse attack scenarios and generalization settings. Experimental results show that CAN-TEMPO consistently outperforms state-of-the-art methods in terms of AUC-ROC and F1-score, while maintaining lower false positive rates and improved robustness across different vehicles and attack types. These findings demonstrate that explicitly modeling periodic structures enables more reliable and generalizable anomaly detection in automotive networks.

1. Introduction

The integration of computation and communication into critical infrastructures has transformed cybersecurity into a safety-critical concern. In cyber–physical systems (CPS), software-driven decisions directly influence physical processes, making them vulnerable to attacks that can cause operational disruption and safety hazards [1,2]. Among these systems, the automotive domain has emerged as a particularly sensitive environment due to the increasing connectivity and complexity of modern vehicles [3,4]. As vehicles evolve into interconnected platforms, cyberattacks are no longer limited to data breaches but can directly affect vehicle behavior, potentially endangering human life [5,6].
Modern vehicles are now highly integrated cyber–physical systems composed of numerous Electronic Control Units (ECUs) that coordinate sensing, computation, and actuation through in-vehicle communication networks [7,8,9]. The Controller Area Network (CAN) bus remains one of the most widely adopted protocols for real-time communication among safety-critical subsystems. However, the increasing exposure of vehicles through external interfaces, wireless connectivity, and integration with broader IoT ecosystems significantly expands the attack surface [10]. While such connectivity enables advanced functionalities, it also introduces security risks that directly impact system reliability and passenger safety, motivating regulatory frameworks such as UNECE R155 and R156 [11,12].
Despite its widespread adoption, the CAN protocol was not designed with security in mind and lacks essential protections such as authentication, integrity verification, and encryption [13,14,15]. Messages are broadcast without source validation, allowing compromised nodes to inject or manipulate traffic without detection. This fundamental limitation creates a gap between modern security requirements and the capabilities of legacy in-vehicle networks [16]. Although cryptographic mechanisms could mitigate these risks, their deployment is constrained by strict real-time requirements, limited computational resources, and backward compatibility. Consequently, Intrusion Detection Systems (IDS) have emerged as a practical complementary solution, enabling runtime monitoring of CAN traffic to identify anomalous or malicious behavior.
Existing IDS approaches for vehicular networks include signature-based [17], specification-based [18], and anomaly-based methods [19]. While signature- and specification-based techniques are effective for detecting known attacks and protocol violations, they lack adaptability to evolving threats. This limitation has led to the increasing adoption of anomaly-based methods, which model normal CAN traffic patterns using statistical techniques, classical machine learning, and, more recently, deep learning architectures [20,21,22,23,24]. Despite their effectiveness, most of these approaches represent CAN traffic as one-dimensional temporal sequences. Such representations capture coarse temporal dependencies but fail to explicitly model the inherent multi-periodic structure of CAN communication, which arises from periodic control messages generated by distributed ECUs. As a result, subtle but structured deviations introduced by sophisticated attacks may remain indistinguishable from benign variations [25].
To the best of our knowledge, existing IDS approaches do not explicitly exploit the multi-periodic nature of CAN traffic for anomaly detection. This limitation motivates the need for representations that capture periodic structures more effectively. In this work, we introduce CAN-TEMPO, a new framework that models CAN traffic through its intrinsic temporal periodicities. By leveraging the Fast Fourier Transform (FFT) for automated period discovery, the proposed approach transforms raw one-dimensional CAN sequences into multi-scale two-dimensional representations that expose underlying periodic patterns. This transformation enables the detection of subtle deviations in rhythmic structures that are difficult to identify using conventional sequential models (anomaly-based approach).
The main contributions of this work are summarized as follows:
1.
FFT-based Automated Period Extraction: We introduce a method that leverages the Fast Fourier Transform (FFT) to automatically identify dominant periodicities in raw CAN traffic, capturing latent control loop behaviors without manual feature engineering.
2.
Unified Period-Aware Framework (CAN-TEMPO): We propose an end-to-end framework that integrates feature extraction, sliding window segmentation, period encoding, and reconstruction into a unified pipeline. This design enables effective learning of multi-scale periodic representations and facilitates anomaly detection through deviations from reconstructed normal behavior.
3.
Comprehensive Experimental Evaluation: We conduct extensive experiments on benchmark CAN datasets, demonstrating that CAN-TEMPO outperforms state-of-the-art IDS approaches in detecting injection attacks, particularly in scenarios involving subtle temporal anomalies.
The remainder of this paper is organized as follows. Section 2 provides a brief overview of related work in CAN bus security. Section 3 presents the CAN protocol fundamentals, the data representation for learning models, and the threat model. Section 4 describes the proposed CAN-TEMPO framework, including its architecture, training objective, and anomaly scoring mechanism. Section 5 details the experimental setup and evaluation protocol. Section 6 reports the evaluation results. Finally, Section 7 concludes the paper and outlines future directions.

3. CAN Bus Protocol: Behaviors and Attacks

This section introduces the foundational elements required for the proposed approach. It first outlines the key characteristics of the Controller Area Network (CAN) protocol, including its communication model, frame structure, and temporal behavior. It then presents the adopted data representation used to transform raw CAN traffic into structured inputs for learning-based models. Finally, it defines the threat model considered in this work, detailing the characteristics of DoS/flooding, fuzzy, malfunction, and spoofing attacks and their impact on CAN traffic patterns.

3.1. CAN Protocol

CAN [43] is a robust, multi-master serial communication protocol widely adopted in automotive systems. As shown in Figure 1, multiple Electronic Control Units (ECUs) are connected to a shared two-wire bus, enabling all nodes to access the communication medium. Communication follows a broadcast paradigm: each transmitted message is received by all ECUs, which selectively process it based on the message identifier. This shared-bus architecture eliminates the need for point-to-point connections while ensuring efficient and reliable data exchange.
Figure 1. Typical CAN bus topology showing ECUs and termination. Labels are positioned at the bus ends to prevent crowding with the 120 Ω resistor indicators.
CAN communication relies on a well-defined frame structure, illustrated in Figure 2, which governs message transmission over the bus. Each frame begins with a Start of Frame (SOF) bit that synchronizes all nodes. The arbitration field, comprising the identifier and the Remote Transmission Request (RTR) bit, determines message priority, where lower identifier values correspond to higher priority and enable non-destructive, collision-free arbitration. The control field specifies the frame format and payload size via the Data Length Code (DLC). The data field carries the payload, limited to 8 bytes in classical CAN. Data integrity is ensured by a Cyclic Redundancy Check (CRC) field, followed by an acknowledgment (ACK) field in which receivers indicate successful reception. The frame terminates with the End of Frame (EOF) sequence. This structured format enables efficient and deterministic communication suitable for real-time automotive applications.
Figure 2. Structure of a CAN data frame as defined by ISO 11898 [43]. Each frame carries the identifier, payload, and integrity fields necessary for prioritized broadcast communication.
In practical deployments, in-vehicle CAN communication exhibits highly regular temporal behavior. ECUs periodically transmit messages associated with control and monitoring functions, typically governed by hardware-timed control loops. As a result, CAN traffic is characterized by strong periodicity, stable transmission frequencies, and consistent payload structures tied to specific vehicle functions. From a signal-processing perspective, the aggregate bus traffic can be modeled as a superposition of multiple temporally structured processes, each corresponding to an individual ECU. This inherent determinism provides a reliable baseline for characterizing nominal system behavior and motivates the use of temporal modeling techniques for anomaly detection. To leverage these properties in a learning-based setting, raw CAN traffic must be transformed into a structured numerical representation.

3.2. Data Representation of CAN-TEMPO

Raw CAN bus traffic is naturally modeled as an asynchronous event stream, where each frame is defined by a timestamp, an arbitration identifier, and a payload of up to 8 bytes. In line with our objective of capturing the intrinsic temporal and periodic structure of CAN communications, we transform this heterogeneous stream into a structured numerical representation tailored for period-aware modeling. Specifically, each frame is mapped to a fixed-length feature vector x t R F where F = 10 is the feature dimension per CAN frame, preserving identifier priority, payload semantics, and fine-grained temporal dynamics. This representation forms a key component of the proposed CAN-TEMPO framework, enabling subsequent periodicity extraction and multi-scale temporal analysis. We define the fixed-length feature vector x t by:
x t = [ a t / 0 x 7 F F Normalized ID , b t ( 0 ) / 255 , , b t ( 7 ) / 255 Normalized Payload Bytes , δ t IAT ] .
where a t denotes the 11-bit arbitration ID, normalized to the interval [ 0 , 1 ] , and b t ( j ) represents the j-th payload byte, each scaled by 255. For frames with a Data Length Code (DLC) smaller than 8, zero-padding is applied. The temporal behavior is captured through the raw inter-arrival time (IAT), defined as Δ t t = timestamp t timestamp t 1 . To ensure numerical stability, the IAT is clipped and normalized as:
δ t = min ( Δ t t , 10 ms ) 10 ms .
where the upper bound mitigates the effect of long idle periods.

3.3. Threat Model

Despite its deterministic and structured operation, the CAN protocol lacks intrinsic security mechanisms such as authentication or encryption, making it vulnerable to message injection by adversaries with access to the bus. In this work, we consider four representative attack types: DoS/flooding, fuzzy, malfunction, and spoofing attacks.
  • DoS/Flooding attacks (a form of Denial-of-Service) exploit the arbitration mechanism by transmitting high-priority messages at a high rate. Since lower numerical identifiers correspond to higher priority, an attacker can monopolize the bus and prevent legitimate ECUs from transmitting. This results in channel saturation, reduced message diversity, and disruption of the periodic communication patterns characteristic of normal operation. Both attack variants share the same underlying injection mechanism and are instantiated under different names across the evaluated benchmarks (see Section 5.1).
  • Fuzzy attacks consist of injecting a large number of messages with random or semi-random identifiers and payloads. Their objective is not targeted manipulation but rather to induce unpredictable behavior or stress the network. Such attacks significantly alter both the statistical distribution and temporal structure of CAN traffic, leading to irregular message occurrences and loss of periodicity.
  • Malfunction attacks emulate faulty ECU behavior by transmitting messages with a valid identifier but anomalous or inconsistent payload values. Unlike fuzzy attacks, the identifier remains fixed, which preserves the apparent message structure while corrupting the semantic content. These attacks introduce deviations in payload consistency and may also affect the expected temporal patterns associated with the compromised signal.
  • Spoofing attacks target specific ECU signals by injecting frames with a fixed, valid CAN identifier but manipulated payload values. Unlike malfunction attacks, which emulate gradual ECU degradation, spoofing attacks are deliberate and targeted, introducing abrupt deviations in specific sensor readings while leaving the rest of the bus traffic structurally intact (see Section 5.1 for the concrete instantiations used in our benchmarks).
Overall, while normal CAN traffic exhibits strong periodicity and stable statistical properties, the considered attack scenarios introduce observable deviations in timing, frequency, and payload structure. This motivates the need for detection approaches capable of capturing both message-level characteristics and their temporal dependencies.

4. Proposed Method

This section introduces the proposed CAN-TEMPO framework for anomaly detection in CAN bus traffic. We first define the input and formalize the problem. We then describe the overall architecture of the model, followed by the detailed design of the period-aware encoder, reconstruction module, and anomaly score mechanism.

4.1. Problem Formulation

Given a sequence of N consecutive CAN frames, we represent CAN traffic as a multivariate time series X = { x t } t = 1 N , where each observation encodes the normalized arbitration ID, payload bytes, and IAT (refer to Equation (1) of Section 3.2). Owing to the periodic nature of ECU transmissions, X can be interpreted as the superposition of multiple latent periodic processes associated with different control functions.
CAN-TEMPO Objective: Let D normal denote the distribution of CAN traffic under normal operating conditions. Since attack labels are unavailable during training, anomaly detection must be framed as an unsupervised learning problem over normal traffic only. The objective is to learn a model f ( · ) that captures the temporal dynamics of D normal and assigns an anomaly score to an input window X R N × F , i.e., s ( X ) = f ( X ) . A window is classified as anomalous if s ( X ) > τ , where τ is a data-driven threshold determined from the distribution of reconstruction scores on normal training data. A key challenge lies in capturing both pointwise and structural deviations in CAN traffic. While reconstruction-based methods effectively penalize local discrepancies, they may fail to detect distributional shifts in higher-order statistical properties. In particular, CAN traffic exhibits multi-periodic behavior with structured dependencies across time. Different attack types affect these properties in distinct ways:
  • DoS and Flooding attacks primarily disrupt temporal regularity and periodic structure by injecting high-frequency frames.
  • Fuzzy attacks increase variance through randomized payloads.
  • Gear, RPM, and Malfunction attacks introduce gradual signal-level deviations reflected in measures such as mean absolute deviation (MAD).
Consequently, models that rely solely on one-dimensional temporal representations may be insufficient to capture such effects. Therefore, the problem reduces to learning representations that jointly encode temporal dependencies and periodic structure, enabling the detection of deviations in the underlying rhythmic patterns of the bus. This formulation motivates the proposed CAN-TEMPO framework, which integrates time-series modeling with periodicity-aware representations for robust and generalizable intrusion detection.

4.2. System Overview

Figure 3 presents the overall architecture of the proposed CAN-TEMPO framework for anomaly detection. The pipeline begins with raw in-vehicle CAN traffic, which is first transformed into structured message-level features. These features are then grouped into sliding windows to capture the temporal evolution of the system. Each window is processed by a period-aware encoder that models the underlying temporal patterns in the data. The encoder extracts a compact representation that summarizes the behavior of the window. This representation is subsequently passed to a decoder, which attempts to reconstruct the original input sequence. Finally, an anomaly score is computed by measuring both pointwise reconstruction error and statistical consistency between the reconstructed and original sequences. Deviations between the two indicate abnormal behavior, enabling the detection of potential attacks or system faults. This end-to-end pipeline allows the model to identify disruptions in the normal communication patterns of the CAN bus.
Figure 3. Overview of the CAN-TEMPO pipeline. Raw CAN traffic is transformed into feature representations and segmented into sliding windows. These sequences are processed by a period-aware encoder–decoder model, and an anomaly score is computed to detect deviations from normal behavior.

4.3. CAN-TEMPO Architecture

The proposed CAN-TEMPO framework follows the processing pipeline illustrated in Figure 4, where each stage progressively transforms raw CAN traffic into a window-level anomaly score. The components of this pipeline are detailed below.
Figure 4. Detailed architecture of the CAN-TEMPO framework.

4.3.1. Vehicle CAN Traffic

The input to the system consists of raw CAN messages generated by distributed ECUs. These messages form an asynchronous stream of communication events reflecting the operational state of the vehicle.

4.3.2. Message Features

Each CAN message is transformed into a structured feature vector x t R F , as defined in Section 3.2. This representation encodes the arbitration ID, payload content, and temporal information, enabling the conversion of heterogeneous CAN frames into a consistent numerical format.

4.3.3. Sliding Windows

To incorporate temporal context, the feature vectors are grouped into overlapping sliding windows of length N, forming an input matrix X R N × F . Each window represents a short segment of CAN activity and allows the model to capture temporal dependencies across consecutive messages.

4.3.4. Period Encoder

Each window X is processed by a period-aware encoder that models the underlying temporal and periodic structure of CAN traffic. The encoder consists of L stacked TEMPO blocks, where L denotes the number of blocks. The process begins by projecting the input into a d-dimensional latent space, where d is the embedding dimension:
H ( 0 ) = X W in + b in .
The embedded sequence is then transformed into the frequency domain using the FFT (Fast Fourier Transform) function F , yielding an amplitude spectrum that captures the dominant periodic components.
A k = 1 B × d b = 1 B j = 1 d F ( H b ) k , j .
where B denotes the batch size. The top-K most relevant frequency indices { k i } i = 1 K are selected, where K denotes the number of dominant periods. Each index corresponds to a period:
p i = max 2 , N k i .
ranging from slow-varying trends to rapid signal fluctuations, allowing it to capture temporal patterns at different granularities. Their amplitudes are used to derive weights w i that quantify the importance of each period:
w i = exp ( A k i ) j = 1 K exp ( A k j ) .
For each selected period p i , the embedded sequence is reshaped through a folding operation that converts the one-dimensional signal into a two-dimensional representation.
H ˜ i R d × T i × p i , T i = N p i .
This transformation exposes intra-period and inter-period structures, which are processed by parallel Inception-based convolutional blocks to extract multi-scale features:
H ^ i = BN W 1 × 1 σ ( BN ( Conv 3 × 3 ( H ˜ i ) ) ) σ ( BN ( Conv 5 × 5 ( H ˜ i ) ) ) .
where BN ( · ) denotes batch normalization, σ ( · ) denotes the GELU activation function, and denotes channel-wise concatenation. The resulting feature maps H ^ i are combined through a weighted aggregation mechanism guided by the spectrum-derived weights w i .
H ( l + 1 ) = LN H ( l ) + i = 1 K w i H ^ i .
where LN ( · ) denotes layer normalization. This process is repeated across L stacked TEMPO blocks, progressively refining the periodic representation. After L blocks, a final normalization is applied:
H ¯ ( L ) = LN ( H ( L ) ) .

4.3.5. Reconstruction

The final representation H ¯ ( L ) is compressed via max pooling to obtain a latent vector z :
z = max t = 1 N H ¯ t ( L ) .
The latent representation z R d is passed to a lightweight multi-layer perceptron (MLP) decoder, consisting of two linear layers with a GELU activation, which expands z to the full sequence dimension and reshapes the output to reconstruct X ^ R N × F . This reconstruction enforces the model to learn a compact representation of normal CAN traffic.

4.4. Training Objective

The proposed CAN-TEMPO framework is trained in an unsupervised manner using only benign CAN traffic. The objective is to learn a representation that accurately reconstructs the input while preserving the underlying statistical properties of the signal. To achieve this, the standard reconstruction loss is augmented with a statistical consistency term that captures distributional characteristics of the time series.

4.4.1. Statistical Descriptor

To capture distributional properties of CAN signals, we define a statistical descriptor ϕ ( X ) computed independently for each feature dimension. Let X ¯ f = 1 N t = 1 N X t , f denote the mean of the f-th feature. The descriptor consists of three complementary statistics:
ϕ f var = 1 N t = 1 N ( X t , f X ¯ f ) 2 ,
ϕ f ac = 1 N 1 t = 1 N 1 ( X t , f X ¯ f ) ( X t + 1 , f X ¯ f ) ϕ f var + ϵ ,
ϕ f mad = 1 N 1 t = 1 N 1 | X t + 1 , f X t , f | .
These statistics respectively measure dispersion, temporal dependence, and local variation of the signal. They are concatenated to form the descriptor ϕ ( X ) R 3 F .

4.4.2. Loss Function

The training objective combines pointwise reconstruction accuracy, statistical consistency, and spectral fidelity:
L = 1 N F X X ^ F 2 L MSE + λ stat 1 3 F ϕ ( X ) ϕ ( X ^ ) 2 2 L stat + λ fft 1 M F | F ( X ) | | F ( X ^ ) | F 2 L fft .
where λ stat > 0 controls the trade-off between reconstruction fidelity and statistical consistency, λ fft > 0 weights the spectral term, F ( · ) denotes the real FFT along the time axis, | · | denotes element-wise amplitude, and M = N / 2 + 1 is the number of frequency bins.

4.4.3. Anomaly Score

An anomaly score is then computed by comparing the reconstructed sequence with the original input:
s ( X ) = 1 N F X X ^ F 2 + λ stat 1 3 F ϕ ( X ) ϕ ( X ^ ) 2 2 + λ fft 1 M F | F ( X ) | | F ( X ^ ) | F 2 .
Windows that deviate from learned normal patterns yield higher scores and are flagged as anomalous.

5. Experiments

This section evaluates the effectiveness of the proposed CAN-TEMPO framework for anomaly detection in in-vehicle networks. We assess performance on two publicly available benchmarks under diverse attack scenarios, with particular emphasis on generalization across vehicles and attack types. The evaluation considers both detection accuracy and robustness, and includes comparisons with baseline methods as well as ablation studies to quantify the contribution of each component of the proposed approach.

5.1. Experimental Setup

We evaluate the proposed CAN-TEMPO framework by comparing it against a representative selection of unsupervised and deep learning-based intrusion detection methods for CAN networks, spanning convolutional, recurrent, and graph-based approaches. For standard reconstruction-based baselines, we consider a CNN autoencoder (CNN-AE), alongside LSTM autoencoders [36] and GRU autoencoders [44], all of which characterize normal traffic patterns and isolate anomalies via reconstruction error. To capture more complex temporal and spatial dynamics, our baselines extend to several advanced and hybrid architectures. These include AutoCoder [41], which combines stacked convolutional layers with multi-head self-attention for sequence reconstruction; DESC-IDS [42], which leverages dilated convolutional feature extraction constrained by sparse regularization; and CGTS [39], which models CAN traffic as message graphs to apply transformer-based representations. Finally, we include RL-IDS [40], a lightweight unsupervised framework that diverges from pure reconstruction, utilizing teacher–student learning paired with generative modeling. Table 2 summarizes the training and testing partitions of both datasets, including the attack categories and the corresponding numbers of normal and attack messages.
Table 2. Dataset statistics. Training sets contain only benign traffic. Test sets correspond to attack-specific captures and contain both normal and attack messages.
  • CHD [45] contains CAN bus recordings collected from a real vehicle under four injection attack types: DoS, Fuzzy, RPM spoofing, and Gear spoofing. Models are trained exclusively on benign traffic and evaluated separately on each attack type, providing a controlled benchmark for single-vehicle and known-attack detection.
  • SAD [46] contains CAN bus recordings from three vehicles (Hyundai Sonata, Kia Soul, and Chevrolet Spark), including labeled instances of flooding, fuzzy, and malfunction attacks. For each vehicle, models are trained on normal traffic and evaluated across all attack types, enabling the assessment of detection performance under varying attack characteristics within a fixed vehicular platform.
Preprocessing: Raw CAN traffic is segmented into overlapping sliding windows of N = 100 consecutive messages with a stride of 50. Each window is represented as a feature matrix X R N × F , following the representation described in Section 3. A window is labeled as anomalous if it contains at least one injected message; otherwise, it is considered normal. This window-level labeling is consistent with the formulation adopted in Section 4.1.
Training protocol: All models are trained in an unsupervised manner using only normal-traffic windows from the designated training splits. No attack labels are used during training, model selection, or threshold determination. Since both CHD and SAD provide predefined benign and attack captures, no additional train-validation-test split is introduced. Instead, models are trained exclusively on benign traffic and evaluated on the corresponding attack-specific test captures. Furthermore, no validation set or test data is used for hyperparameter tuning or threshold optimization. The anomaly detection threshold is computed solely from the distribution of anomaly scores on the training data. To ensure robustness and reduce variance due to random initialization, each experiment is repeated with three random seeds { 42 , 123 , 7 } , and the reported results correspond to the mean and standard deviation across runs.
Testing protocol: We adopt a strict train-once, test-on-held-out-splits protocol with no data leakage between training and evaluation.
  • On the CHD dataset, a single training partition of normal (attack-free) traffic is used for unsupervised training. The model is never exposed to labeled anomalies during training. Testing is conducted on four held-out attack-specific test sets, each covering one attack type: DoS, Fuzzy, Gear, and RPM. Each test set is constructed from the corresponding attack capture file, which contains interleaved normal and attack frames, preserving realistic class proportions.
  • On the SAD dataset, each of the three vehicles (Sonata, Soul, Spark) is treated independently. The model is trained exclusively on the vehicle’s normal free-driving traffic (FreeDriving files) and evaluated separately on three attack-type test sets: Flooding, Fuzzy, and Malfunction. Each test set is constructed from the corresponding attack capture file, which contains interleaved normal and attack frames, preserving realistic class proportions.
In both benchmarks, raw CAN messages are segmented into overlapping windows of N = 100 messages with a stride of 50 (i.e., a 50% overlap). During inference, the anomaly score is computed as the mean squared reconstruction error for each window. Window-level labels are assigned using a majority vote over the labels of the constituent messages. Furthermore, all thresholds are computed exclusively from the training data to avoid data leakage.
Implementation details: The input feature matrix X R N × F with F = 10 and N = 100 is projected to a latent space of dimension d = 256 via a linear embedding layer. The period encoder consists of L = 4 TEMPO blocks, each performing FFT-based period selection with K = 2 dominant frequencies. For each selected period, the sequence is folded into a 2D representation and processed using an Inception-style module [47] (only the architecture) with parallel 3 × 3 and 5 × 5 convolutional branches, followed by BatchNorm and GELU activation [48], and projected back to the model dimension. The resulting representations are combined through amplitude-weighted aggregation, and the final latent vector z R d is obtained via max pooling. The decoder is implemented as a lightweight two-layer MLP with GELU activation, mapping z back to X ^ R N × F . In addition to reconstruction loss, a statistical consistency term is applied using a descriptor ϕ ( X ) R 3 F , computed from variance, autocorrelation, and mean absolute difference, with weight λ stat = 4.0 . A spectral consistency term L fft penalizing deviations in FFT amplitude between input and reconstruction is also included, with weight λ fft = 0.1 . The full model comprises 5.4M trainable parameters, making it suitable for deployment on a resource-constrained environment.
The hyperparameters of CAN-TEMPO are summarized in Table 3. The model is optimized using Adam with a learning rate of 10 4 and a batch size of 64, and trained for 50 epochs. Gradient clipping with a maximum norm of 1.0 is applied to stabilize training.
Table 3. CAN-TEMPO hyperparameters.
All experiments are conducted on a server equipped with two NVIDIA RTX A6000 GPUs (48 GB VRAM each), dual Intel Xeon Gold 6240R CPUs (48 physical cores), and 256 GB of system memory.

5.2. Evaluation Metrics

We evaluate detection performance using complementary threshold-independent and threshold-dependent metrics, capturing both ranking quality and operational effectiveness.
  • AUC-ROC: We report the area under the receiver operating characteristic curve (AUC-ROC) as a primary metric to assess the model’s ability to discriminate between normal and anomalous windows across all possible decision thresholds. As a threshold-independent measure, AUC-ROC evaluates the trade-off between true positive rate and false positive rate, providing a global view of detection performance.
  • Accuracy, Precision, Recall, and FPR: To assess performance at a fixed operating point, we explicitly report accuracy, precision, recall, and false positive rate (FPR). Accuracy measures the proportion of correctly classified windows over the entire dataset. Precision measures the proportion of detected anomalies that are true attacks, recall quantifies the proportion of actual attacks that are correctly identified, and FPR reflects the rate at which normal windows are incorrectly classified as anomalous.
  • F1-score: To summarize the trade-off between precision and recall, we report the F1-score at a fixed threshold. Specifically, the decision threshold τ is set as the 95th percentile of anomaly scores on the training data, and predictions are obtained by classifying a window as anomalous if s ( X ) > τ . The resulting F1-score reflects the effectiveness of the model under a concrete and reproducible decision boundary.
Together, these metrics provide a comprehensive evaluation: AUC-based measures assess the intrinsic separability of the learned representations, while accuracy, precision, recall, FPR, and F1-score characterize performance under a fixed operating condition.

5.3. Baseline Methods

We compare the proposed CAN-TEMPO framework against a set of representative unsupervised and deep learning-based intrusion detection methods for CAN networks, including convolutional, recurrent, and graph-based approaches. Specifically, we consider standard reconstruction-based models such as a CNN autoencoder (CNN-AE), as well as LSTM autoencoders [36] and GRU autoencoders [44], which learn normal traffic patterns and detect anomalies via reconstruction error. In addition, we include more advanced architectures such as DESC-IDS [42], which leverages dilated convolutional feature extraction with sparse regularization, and CGTS [39], which models CAN traffic as message graphs and applies transformer-based representations. We also consider RL-IDS [40], a lightweight unsupervised framework based on teacher–student learning and generative modeling.
All baseline methods are re-implemented and evaluated under a unified experimental protocol. Unlike prior work, which often reports performance using accuracy or fixed thresholds without assessing generalization, all models in this study are trained exclusively on normal traffic, thresholds are derived from training score distributions, and performance is evaluated using AUC-ROC and window-level F1 across multiple datasets and test configurations. This ensures a fair and consistent comparison under realistic unsupervised intrusion detection settings.

5.4. Code Source and Reproducibility

Since the source code for the compared methods was not publicly available, all baseline models were independently reimplemented based on the architectural descriptions and experimental settings reported in the original papers. For methods whose implementation details were insufficiently specified, we contacted the corresponding authors to request clarification or access to official implementations. However, no source code was made available at the time of this study. To ensure fairness, all baselines were evaluated under the same preprocessing, training protocol, thresholding strategy, and evaluation metrics used for CAN-TEMPO. The implementation of CAN-TEMPO, together with the training and evaluation pipelines used in this work, is publicly available at: https://github.com/sooualil/CAN-TEMPO (accessed on 5 June 2026).

6. Evaluation

This section evaluates the effectiveness of CAN-TEMPO through a comprehensive analysis across multiple dimensions. We first compare overall performance against representative baselines on standard benchmarks. We then assess generalization under varying vehicle and attack conditions, followed by a detailed analysis across attack types and datasets. Finally, we investigate model behavior through ablation studies to quantify the contribution of individual components.

6.1. Main Results

We evaluate CAN-TEMPO against representative baseline methods on the CHD and SAD benchmarks. Table 4 reports the micro-averaged performance across attack types, including the mean and standard deviation over three random seeds. This evaluation aims to assess both detection effectiveness and robustness under heterogeneous conditions.
Table 4. Overall results per dataset group (micro-averaged across attacks, mean ± std over 3 seeds).
  • On the CHD benchmark, CAN-TEMPO achieves the strongest overall performance across all evaluated metrics, obtaining an AUC-ROC of 0.995 ± 0.001 , an accuracy of 0.984 ± 0.004 , and an F1-score of 0.980 ± 0.006 . Compared to the strongest competing baseline, DESC-IDS ( 0.960 ± 0.019 AUC-ROC, 0.775 ± 0.054 F1), CAN-TEMPO improves the F1-score by approximately + 26.5 % while simultaneously achieving substantially higher recall ( 0.970 ± 0.010 vs. 0.641 ± 0.066 ). These results indicate that the proposed framework is able to detect a significantly larger proportion of attack windows while preserving strong precision ( 0.989 ± 0.001 ).
    In contrast, several baseline methods exhibit highly unbalanced operating points. For example, CGTS achieves perfect recall ( 1.000 ± 0.000 ), but at the cost of an extremely large false positive rate ( 1.000 ± 0.000 ), rendering the model impractical for deployment in realistic settings. Similarly, AutoCoder achieves competitive AUC-ROC ( 0.937 ± 0.041 ), yet also suffers from excessive false positives ( 0.920 ± 0.027 ). Reconstruction-based recurrent models such as LSTM-AE and GRU-AE achieve very low FPR values, but their lower recall indicates that a substantial fraction of attacks remains undetected.
    Compared to these approaches, CAN-TEMPO maintains a substantially more balanced trade-off between detection sensitivity and false positive control. Although its FPR ( 0.007 ± 0.001 ) is marginally higher than that of DESC-IDS ( 0.006 ± 0.005 ), it remains very low while preserving near-perfect recall and the highest overall F1-score. These results suggest that explicitly modeling the multi-periodic structure of CAN traffic significantly improves discriminative capability and robustness across diverse attack behaviors.
  • On the SAD dataset, CAN-TEMPO again achieves the strongest overall trade-off across the evaluated metrics, with an AUC-ROC of 0.994 ± 0.002 , an accuracy of 0.962 ± 0.001 , and an F1-score of 0.962 ± 0.001 . Compared to the strongest baseline, AutoCoder ( 0.918 ± 0.013 AUC-ROC, 0.843 ± 0.010 F1), CAN-TEMPO provides consistent gains across all major metrics, including substantially higher recall ( 0.980 ± 0.004 vs. 0.766 ± 0.015 ) and improved precision ( 0.945 ± 0.005 vs. 0.936 ± 0.001 ).
    CNN-AE also achieves competitive performance on SAD, with an F1-score of 0.707 ± 0.012 and precision of 0.917 ± 0.002 , but remains substantially below CAN-TEMPO in both recall and AUC-ROC. In contrast, sequence-based approaches such as LSTM-AE and GRU-AE exhibit significantly lower recall values (approximately 0.39 ), indicating limited ability to capture diverse attack patterns. Similarly, RL-IDS achieves relatively high precision but suffers from very low recall ( 0.160 ± 0.012 ), resulting in weak overall detection performance.
    As observed on CHD, CGTS again demonstrates extreme behavior, achieving near-perfect recall ( 0.995 ± 0.007 ) at the cost of an exceptionally large false positive rate ( 0.991 ± 0.012 ). CAN-TEMPO, in contrast, maintains a stable and well-balanced operating point, combining high recall with a controlled false positive rate ( 0.055 ± 0.005 ), resulting in substantially better practical reliability.
Overall, these results demonstrate that CAN-TEMPO consistently provides the most balanced and reliable detection performance across both datasets. Unlike several baseline methods that achieve competitive performance only under extreme operating conditions, the proposed framework simultaneously maintains high precision, high recall, and a controlled false-positive rate. This behavior suggests that explicitly modeling the multi-periodic structure of CAN traffic enables learning more robust and generalizable representations that adapt across different attack types, vehicle environments, and traffic distributions.
Note: We observe that CGTS exhibits an FPR close to 1 on both datasets, indicating that the approach produces a very large number of false alarms despite its high recall. Similarly, AutoCoder shows a relatively high FPR on the CHD dataset, suggesting a less stable operating point under certain attack conditions.

6.2. Per-Attack Analysis and Generalization

Beyond aggregate performance, we further analyze the robustness of CAN-TEMPO across different attack categories on both the CHD and SAD benchmarks. While Table 4 summarizes the overall micro-averaged performance across datasets, Figure 5 reports the per-attack AUC-ROC values and Table 5 summarizes the corresponding F1-score and false positive rate, providing a more detailed view of model behavior under different attack scenarios.
Figure 5. Per-attack AUC-ROC on CHD (top) and SAD (bottom). Error bars show standard deviation over 3 seeds.
Table 5. F1-score and FPR per attack type on CHD and SAD (micro-averaged over 3 seeds).
  • On the CHD benchmark, CAN-TEMPO achieves the strongest aggregate performance, with an F1-score of 0.980 ± 0.006 , substantially outperforming all baseline methods. As shown in Figure 5, the proposed framework maintains consistently strong AUC-ROC performance across all attack categories, remaining stable on Fuzzy, Gear, and RPM attacks while also achieving the strongest behavior on DoS attacks. This behavior is reflected in the model’s simultaneously high precision ( 0.989 ± 0.001 ) and recall ( 0.970 ± 0.010 ), indicating that CAN-TEMPO effectively detects anomalous windows without relying on extreme operating points.
    In particular, CAN-TEMPO achieves almost perfect discrimination on RPM and Fuzzy attacks, indicating that the learned periodic representations effectively capture disruptions in temporal communication patterns. Performance on Gear attacks also remains highly stable, substantially outperforming baseline methods such as DESC-IDS, which exhibits noticeably lower robustness on this category.
    A more pronounced difference is observed for DoS attacks. While recurrent models such as LSTM-AE and GRU-AE collapse almost entirely under heavy flooding conditions, achieving near-zero F1-scores, CAN-TEMPO maintains near-perfect discrimination. This behavior suggests that explicit modeling of multi-periodic temporal structure substantially improves robustness against disruptions that alter message timing and broadcast regularity.
    In contrast, methods such as CGTS and AutoCoder achieve extremely high recall values, but this behavior is accompanied by excessive false positive rates, indicating poor discrimination between normal and anomalous traffic and resulting in unstable operating behavior.
  • On the SAD dataset, CAN-TEMPO again achieves the strongest aggregate performance, obtaining an F1-score of 0.962 ± 0.001 . Figure 5 shows that this behavior remains consistent across Flooding, Fuzzy, and Malfunction attacks, where the proposed framework maintains strong AUC-ROC performance across all categories. This strong performance is further supported by the model’s high precision ( 0.945 ± 0.005 ) and exceptionally strong recall ( 0.980 ± 0.004 ), substantially outperforming sequence-based reconstruction models such as LSTM-AE and GRU-AE, whose F1-scores remain close to 0.54 .
    In particular, the proposed model achieves strong and consistent performance on Flooding and Fuzzy attacks, while also maintaining the strongest performance on the more challenging Malfunction category. These results indicate that the model remains effective not only against abrupt injection attacks but also against gradual payload deviations that more closely resemble normal traffic behavior.
    In contrast, CGTS again demonstrates unstable behavior across all attack categories, despite achieving near-perfect recall in aggregate metrics. This suggests that high recall alone is insufficient to characterize practical detection performance when accompanied by excessive false positives. Similarly, AutoCoder achieves strong aggregate performance on SAD, but remains consistently below CAN-TEMPO across all metrics.
Overall, these results indicate that CAN-TEMPO generalizes effectively across heterogeneous attack behaviors and maintains a stable detection capability under both abrupt and gradual attack patterns. This behavior is consistent with the proposed design, in which FFT-based period discovery and multi-scale temporal modeling enable the extraction of robust periodic representations that remain stable across diverse attack conditions.

6.3. Cross-Vehicle Robustness

To further evaluate robustness across different vehicle platforms, we analyze the performance of CAN-TEMPO separately on the three vehicles included in the SAD benchmark: Hyundai Sonata, Kia Soul, and Chevrolet Spark. Table 6 reports the micro-averaged results across attack categories for each vehicle.
Table 6. Per-vehicle results on SAD (micro-averaged over attacks and 3 seeds).
Across all vehicles, CAN-TEMPO consistently achieves the strongest overall performance, simultaneously maintaining high AUC-ROC, F1-score, precision, and recall. On the Sonata vehicle, CAN-TEMPO achieves an AUC-ROC of 0.993 and an F1-score of 0.962 , substantially outperforming all baselines while maintaining controlled false positive rates. Although CGTS achieves a relatively high F1-score ( 0.704 ), this behavior is accompanied by an extremely large false positive rate ( 0.967 ), indicating poor discrimination between normal and anomalous traffic. In contrast, CAN-TEMPO maintains balanced precision ( 0.958 ) and recall ( 0.966 ), resulting in substantially more reliable operating behavior.
A similar trend is observed on the Soul vehicle, where CAN-TEMPO achieves near-perfect performance across all metrics, including an AUC-ROC of 1.000 and an F1-score of 0.970 . While AutoCoder also performs strongly on this vehicle ( 0.960 F1), CAN-TEMPO maintains superior recall ( 0.999 ), indicating more reliable detection of anomalous windows across attack scenarios. On the Spark vehicle, CAN-TEMPO again achieves the strongest aggregate performance, with an AUC-ROC of 0.991 and an F1-score of 0.943 . In contrast, several baseline methods exhibit noticeably lower robustness, particularly recurrent autoencoder approaches such as LSTM-AE and GRU-AE, whose F1-scores remain below 0.66 . Similarly, RL-IDS demonstrates weak recall across all vehicles, indicating a limited ability to capture diverse attack patterns.
Overall, these results demonstrate that CAN-TEMPO remains robust across heterogeneous vehicle platforms and traffic distributions. The consistency of the obtained results suggests that the learned periodic representations capture invariant temporal structures that generalize effectively across different vehicles and communication patterns.

6.4. Statistical Significance

To assess whether the observed performance improvements are statistically significant, we compare CAN-TEMPO against the strongest competing baseline on each dataset using the Wilcoxon signed-rank test. Unlike parametric tests such as the paired t-test, the Wilcoxon test does not assume normality of the underlying score distributions, making it more appropriate for the relatively small number of evaluation configurations considered in this study.
  • On the CHD benchmark, CAN-TEMPO is compared against DESC-IDS, which represents the strongest practically stable baseline on this dataset. CAN-TEMPO achieves an average AUC-ROC of 0.9950 ± 0.0050 , compared to 0.9603 ± 0.0583 for DESC-IDS. The Wilcoxon signed-rank test yields W = 70 with a p-value of 0.0061 , indicating that the improvement achieved by CAN-TEMPO is statistically significant.
  • On the SAD benchmark, CAN-TEMPO is compared against AutoCoder, which achieves the strongest baseline performance on this dataset. CAN-TEMPO attains an average AUC-ROC of 0.9944 ± 0.0093 , compared to 0.9178 ± 0.0739 for AutoCoder. The corresponding Wilcoxon signed-rank test yields W = 378 with p < 0.0001 , further confirming that the observed performance gains are highly significant.
These results indicate that the improvements obtained by CAN-TEMPO are consistent across evaluation settings and are unlikely to arise from random variation. The statistical analysis therefore, supports the robustness and reliability of the proposed framework across different datasets and attack scenarios.

6.5. Ablation Study

To quantify the contribution of individual components in CAN-TEMPO, we conduct ablation studies focusing on both architectural design choices and hyperparameter sensitivity. These experiments aim to isolate the impact of each component on detection performance and robustness.
Hyperparameter Tuning. The final configuration of CAN-TEMPO is obtained through a grid search over the main hyperparameters (Table 7), including the number of periods (K), the number of encoder blocks (L), the embedding dimension (d), the statistical loss weight ( λ stat ), and the spectral loss weight ( λ fft ). Each combination is evaluated on the validation splits, and the best-performing configuration is selected based on a balance between AUC-ROC and F1-score. This systematic exploration ensures that the reported results correspond to a well-calibrated model that achieves a robust trade-off between detection performance and generalization.
Table 7. Hyperparameter search space for CAN-TEMPO.
The selected configuration corresponds to the best trade-off between discrimination capacity and detection calibration, as observed in the ablation analysis, namely K = 2 , L = 4 , d = 256 , λ stat = 4.0 , and λ fft = 0.1 .
Ablation Study: We evaluate the contribution of the main architectural and optimization components of CAN-TEMPO through the ablation study reported in Table 8.
Table 8. Ablation study on CHD (micro-averaged over 3 seeds).
  • Removing the TEMPO-based period encoder causes a severe degradation in performance. Although the transformer-based variant maintains a high AUC-ROC ( 0.994 ), its F1-score drops dramatically to 0.561 , while the false positive rate increases to 0.990 . This behavior indicates that the model classifies nearly all windows as anomalous, resulting in unstable and impractical operating behavior. These results confirm that explicit modeling of periodic temporal structure is essential for reliable anomaly detection in CAN traffic. The discrepancy between AUC-ROC and F1-score arises because AUC-ROC evaluates ranking performance across all possible thresholds, whereas F1-score is computed at a fixed operating point. The absence of the TEMPO block prevents the model from explicitly capturing the periodic structure of normal CAN traffic. Consequently, the learned latent representations become less discriminative, leading to higher reconstruction errors for many normal windows. This shifts the anomaly score distribution, causing a large number of normal samples to exceed the detection threshold, which results in an extremely high false positive rate and a substantially lower F1-score despite the high AUC-ROC.
  • Replacing the proposed max pooling strategy with simple mean pooling reduces the F1-score from 0.980 to 0.614 and substantially increases the false positive rate (from 0.007 to 0.115 ). This suggests that preserving dominant activations is important for retaining discriminative temporal features in the latent representation.
  • Removing the FFT-based periodic supervision term leads to a major performance drop, reducing the F1-score to 0.600 and significantly lowering recall ( 0.466 ). Interestingly, this degradation is nearly as severe as removing the TEMPO period encoder itself, indicating that frequency-domain reconstruction supervision contributes strongly to detection performance alongside the architectural periodic modeling mechanism. These results demonstrate that explicit frequency-domain guidance plays a central role in helping the model capture periodic communication patterns.
  • Removing the statistical consistency term produces a smaller but still noticeable degradation, reducing the F1-score from 0.980 to 0.895 . While the resulting model maintains high precision ( 0.988 ), its lower recall ( 0.820 ) indicates reduced sensitivity to certain attack patterns. This suggests that the statistical consistency objective complements reconstruction learning by improving robustness to subtle deviations in temporal behavior.
Overall, the ablation study provides direct evidence regarding the contribution of the main components of CAN-TEMPO. Removing the TEMPO block results significant performance degradation, highlighting the importance of explicit period-aware modeling. Similarly, removing the frequency-domain reconstruction supervision term ( L fft ) causes a substantial drop in performance, demonstrating the value of frequency-domain information for anomaly detection. The degradation observed when replacing the proposed pooling strategy or removing the statistical consistency term further confirms that these components contribute to the final performance. These results indicate that the reported improvements are primarily driven by the combination of period-aware temporal modeling and frequency-domain supervision, while the remaining components provide complementary gains.

6.6. Limitations

Despite the strong performance achieved by CAN-TEMPO, several limitations should be acknowledged.
  • First, although CAN-TEMPO achieves strong performance across the evaluated CHD and SAD benchmarks, the reported results still exhibit non-negligible variance across certain attack categories and vehicle configurations, as reflected by the standard deviations in Table 4. In particular, performance variability is more noticeable under heterogeneous attack settings such as DoS and Flooding scenarios, indicating sensitivity to differences in traffic dynamics and attack behavior.
  • Second, while CAN-TEMPO achieves competitive recall across most evaluation settings, certain attack categories remain intrinsically challenging. In general, subtle or weak deviations from normal traffic patterns can be difficult to distinguish reliably, particularly when anomalous behavior preserves portions of the original temporal structure.
  • Third, the evaluation relies on a fixed decision threshold, where the F1-score is computed using the 95th percentile of training scores across all datasets. Although this provides a consistent and reproducible operating point, performance may still be sensitive to threshold selection under distribution shifts. This effect is particularly visible in methods such as CGTS and AutoCoder, which achieve extremely high recall but suffer from excessive false positive rates, demonstrating that threshold selection can strongly influence practical operating behavior.
  • Fourth, the evaluation is conducted on two publicly available benchmarks, which may not fully capture the diversity and complexity of real-world CAN traffic. In particular, controlled datasets may underestimate environmental noise, evolving attack strategies, sensor uncertainty, and long-term concept drift, potentially limiting the generalization capability of the proposed framework under real deployment conditions.
  • Finally, the current model focuses primarily on temporal periodicity and statistical consistency, without explicitly incorporating semantic or contextual information such as signal-level decoding or message interpretation. While the results demonstrate strong performance using raw CAN traffic alone, integrating higher-level vehicular semantics could further improve robustness, particularly against stealthy attacks that preserve temporal structure while manipulating signal meaning.
Future work will therefore focus on improving robustness under distribution shifts, developing adaptive thresholding strategies, evaluating long-term deployment stability, and integrating semantic signal-level information into the periodic modeling framework.

7. Conclusions and Future Work

In this paper, we presented CAN-TEMPO, a novel unsupervised intrusion detection framework that explicitly models the inherent periodic oscillations of the Controller Area Network. By transforming 2D CAN traffic into multi-scale 2D representations through FFT-based period discovery, our model successfully captures the periodic structure of vehicle communications, which remains difficult to model using standard sequential architectures. Our extensive evaluation across the CHD and SAD datasets demonstrates that CAN-TEMPO consistently achieves the strongest overall detection performance among the evaluated methods, reaching aggregate AUC-ROC scores above 0.99 on both benchmarks while maintaining high precision, recall, and stable false positive rates. Specifically, our results highlight the importance of modeling temporal alignment to detect flooding and injection-based attacks, where CAN-TEMPO achieves substantial improvements over recurrent autoencoder baselines. Furthermore, the integration of a statistical consistency loss helps the model remain sensitive to subtle distributional shifts in signal variance and autocorrelation. The ablation study further confirms that both the TEMPO period encoder and the frequency-domain reconstruction supervision term contribute critically to the final detection performance, demonstrating the importance of explicitly incorporating periodic structure into CAN intrusion detection for the evaluated datasets and attack scenarios.
Future work will focus on improving robustness under distribution shifts and adaptive attack behaviors. We also plan to explore the hardware-in-the-loop deployment of CAN-TEMPO to evaluate its real-time inference latency on resource-constrained embedded ECUs.

Author Contributions

Conceptualization, S.O. and I.A.Y.; methodology, S.O. and I.A.Y.; validation, S.O., I.B. and I.A.Y.; formal analysis, S.O.; investigation, S.O.; resources, S.O., I.B. and M.E.K.; writing—original draft preparation, S.O.; writing—review and editing, S.O., I.B., M.E.K. and K.F.; visualization, S.O.; supervision, M.E.K. and I.B.; project administration, M.E.K. and I.B. 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.

Data Availability Statement

The datasets analyzed in this study are publicly available from the corresponding benchmark repositories cited in the manuscript. The implementation of CAN-TEMPO and the experimental pipeline are publicly available at: https://github.com/sooualil/CAN-TEMPO (accessed on 5 June 2026).

Acknowledgments

During the preparation of this manuscript, the authors used ChatGPT 5.5 (OpenAI) for grammar correction, orthographic revision, and language refinement. All scientific content—encompassing the experimental design and its implementation and the results, analysis, and conclusion—was produced and validated by the authors. The authors reviewed and edited the generated output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Maglaras, L.; Kantzavelou, I.; Ferrag, M.A. Digital Transformation and Cybersecurity of Critical Infrastructures. Appl. Sci. 2021, 11, 8357. [Google Scholar] [CrossRef] [Scilit]
  2. OECD. Digital Security and Resilience in Critical Infrastructure and Essential Services; OECD Publishing: Paris, France, 2019. [Google Scholar] [CrossRef] [Scilit]
  3. Morris, D.; Madzudzo, G.; Garcia-Perez, A. Cybersecurity threats in the auto industry: Tensions in the knowledge environment. Technol. Forecast. Soc. Change 2020, 157, 120102. [Google Scholar] [CrossRef] [Scilit]
  4. Raina, R. Cybersecurity in Connected Vehicles: How Automakers and Consumers Can Stay Secure. Available online: https://www.ust.com/en/insights/cybersecurity-in-connected-vehicles-how-automakers-and-consumers-can-stay-secure (accessed on 3 May 2026).
  5. Yaacoub, J.P.A.; Salman, O.; Noura, H.N.; Kaaniche, N.; Chehab, A.; Malli, M. Cyber-physical systems security: Limitations, issues and future trends. Microprocess. Microsyst. 2020, 77, 103201. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  6. Ribeiro, A. Zetter Details How Stuxnet Marked a Turning Point in Cyberwarfare by Enabling Physical Sabotage Through Code—Industrial Cyber. Available online: https://industrialcyber.co/industrial-cyber-attacks/zetter-details-how-stuxnet-marked-a-turning-point-in-cyberwarfare-by-enabling-physical-sabotage-through-code/ (accessed on 3 May 2026).
  7. Oualil, S.; Oucheikh, R.; El Kamili, M.; Berrada, I. Benchmarking Classical and AI-based Caching Strategies in Internet of Vehicles. In Proceedings of the 2021 IEEE International Conference on Communications Workshops (ICC Workshops); IEEE: Piscataway, NJ, USA, 2021; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
  8. Oualil, S.; Oucheikh, R.; El Kamili, M.; Berrada, I. A Personalized Learning Scheme for Internet of Vehicles Caching. In Proceedings of the 2021 IEEE Global Communications Conference (GLOBECOM); IEEE: Piscataway, NJ, USA, 2021; pp. 1–6. [Google Scholar]
  9. Bouhoute, A.; Berrada, I.; El Kamili, M. A formal model of human driving behavior in vehicular networks. In Proceedings of the 2014 International Wireless Communications and Mobile Computing Conference (IWCMC); IEEE: Piscataway, NJ, USA, 2014; pp. 231–236. [Google Scholar] [CrossRef] [Scilit]
  10. Khanna, R. Securing the Internet of Things and Connected Cars. Available online: https://cloudsecurityalliance.org/blog/2018/03/05/securing-internet-things-connected-cars (accessed on 3 May 2026).
  11. European Commission. UN Regulation No 155—Uniform Provisions Concerning the Approval of Vehicles with Regards to Cybersecurity and Cybersecurity Management System [2021/387]. Available online: https://eur-lex.europa.eu/eli/reg/2021/387/oj (accessed on 3 May 2026).
  12. European Commission. UN Regulation No 156—Uniform Provisions Concerning the Approval of Vehicles with Regards to Software Update and Software Updates Management System [2021/388]. Available online: https://eur-lex.europa.eu/eli/reg/2021/388/oj (accessed on 3 May 2026).
  13. Chain. Understanding CAN Bus Vulnerabilities and How Blockchain Can Amplify Security|by Chain|Medium. Available online: https://medium.com/@chaincom/understanding-can-bus-vulnerabilities-and-how-blockchain-can-amplify-security-a58388bf1fb4 (accessed on 3 May 2026).
  14. Rai, R.; Grover, J.; Sharma, P.; Pareek, A. Securing the CAN bus using deep learning for intrusion detection in vehicles. Sci. Rep. 2025, 15, 13820. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  15. Bozdal, M.; Samie, M.; Aslam, S.; Jennions, I. Evaluation of CAN Bus Security Challenges. Sensors 2020, 20, 2364. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  16. Lin, C.W.; Sangiovanni-Vincentelli, A. Cyber-Security for the Controller Area Network (CAN) Communication Protocol. In Proceedings of the 2012 International Conference on Cyber Security; IEEE: Piscataway, NJ, USA, 2012. [Google Scholar] [CrossRef] [Scilit]
  17. Khan, J.A.; Khan, M.A.; Saeed, N.; Cayrel, P.L.; Hahn, C. Intrusion Detection Systems for In-Vehicle Networks: Protocols, Applications, and Challenges. IEEE Access 2025, 13, 215219–215250. [Google Scholar] [CrossRef] [Scilit]
  18. Olufowobi, H.; Young, C.; Zambreno, J.; Bloom, G. SAIDuCANT: Specification-Based Automotive Intrusion Detection Using Controller Area Network (CAN) Timing. IEEE Trans. Veh. Technol. 2020, 69, 1484–1494. [Google Scholar] [CrossRef]
  19. Lampe, B.; Meng, W. A survey of deep learning-based intrusion detection in automotive applications. Expert Syst. Appl. 2023, 221, 119771. [Google Scholar] [CrossRef] [Scilit]
  20. Marchetti, M.; Stabili, D. Anomaly detection of CAN bus messages through analysis of ID sequences. In Proceedings of the 2017 IEEE Intelligent Vehicles Symposium (IV); IEEE: Piscataway, NJ, USA, 2017; pp. 1577–1583. [Google Scholar] [CrossRef] [Scilit]
  21. Tomlinson, A.; Bryans, J.; Shaikh, S. Detection of Automotive CAN Cyber-Attacks by Identifying Packet Timing Anomalies. In Proceedings of the IEEE/IFIP International Conference on Dependable Systems and Networks Workshops (DSN-W); IEEE: Piscataway, NJ, USA, 2018; pp. 231–238. [Google Scholar]
  22. Bozdal, M.; Samie, M.; Jennions, I. A Survey on CAN Bus Protocol: Attacks, Challenges, and Potential Solutions. In Proceedings of the 2018 International Conference on Computing, Electronics & Communications Engineering (iCCECE); IEEE: Piscataway, NJ, USA, 2018; pp. 201–205. [Google Scholar] [CrossRef] [Scilit]
  23. Wang, X.; Xu, Y.; Xu, Y.; Wang, Z.; Wu, Y. Intrusion Detection System for In-Vehicle CAN-FD Bus ID Based on GAN Model. IEEE Access 2024, 12, 82402–82412. [Google Scholar] [CrossRef] [Scilit]
  24. Zhao, W.; Yang, Y.; Hu, H.; Chen, Y.; Yu, F. A lightweight intrusion detection approach for CAN bus using depthwise separable convolutional Kolmogorov Arnold network. Sci. Rep. 2025, 15, 17550. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  25. Jia, H.; Xiong, X.; Luo, H.; Cao, Y. Driveshield: Unmasking stealthy attacks on CAN bus via adversarial spatiotemporal feature learning. J. King Saud Univ. Comput. Inf. Sci. 2025, 37, 286. [Google Scholar] [CrossRef] [Scilit]
  26. Cervantes, J.; Garcia-Lamont, F.; Rodríguez-Mazahua, L.; Lopez, A. A comprehensive survey on support vector machine classification: Applications, challenges and trends. Neurocomputing 2020, 408, 189–215. [Google Scholar] [CrossRef] [Scilit]
  27. Alshamy, R.; Ghurab, M.; Othman, S.; Alshami, F. Intrusion Detection Model for Imbalanced Dataset Using SMOTE and Random Forest Algorithm. In Advances in Cyber Security; Springer: Singapore, 2021; pp. 361–378. [Google Scholar] [CrossRef] [Scilit]
  28. Bari, B.S.; Yelamarthi, K.; Ghafoor, S. Intrusion Detection in Vehicle Controller Area Network (CAN) Bus Using Machine Learning: A Comparative Performance Study. Sensors 2023, 23, 3610. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  29. Song, J.; Li, F.; Li, R.; Li, Y.; Zhou, Q.; Zhang, J. Research on CAN Bus Anomaly Detection Based on LSTM And ResNet. J. Phys. Conf. Ser. 2021, 1757, 012044. [Google Scholar] [CrossRef] [Scilit]
  30. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. arXiv 2015, arXiv:1512.03385. [Google Scholar] [CrossRef] [Scilit]
  31. Saba, T.; Rehman, A.; Sadad, T.; Kolivand, H.; Bahaj, S.A. Anomaly-based intrusion detection system for IoT networks through deep learning model. Comput. Electr. Eng. 2022, 99, 107810. [Google Scholar] [CrossRef] [Scilit]
  32. Bhosale, S. Network Intrusion Detection. Available online: https://www.kaggle.com/datasets/sampadab17/network-intrusion-detection (accessed on 3 May 2026).
  33. Koroniotis, N.; Moustafa, N.; Sitnikova, E.; Turnbull, B. Towards the development of realistic botnet dataset in the Internet of Things for network forensic analytics: Bot-IoT dataset. Future Gener. Comput. Syst. 2019, 100, 779–796. [Google Scholar] [CrossRef] [Scilit]
  34. Wang, Y.; Qin, G.; Zou, M.; Liang, Y.; Wang, G.; Wang, K.; Feng, Y.; Zhang, Z. A lightweight intrusion detection system for internet of vehicles based on transfer learning and MobileNetV2 with hyper-parameter optimization. Multimed. Tools Appl. 2023, 83, 22347–22369. [Google Scholar] [CrossRef] [Scilit]
  35. Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.C. MobileNetV2: Inverted Residuals and Linear Bottlenecks. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: Piscataway, NJ, USA, 2018; pp. 4510–4520. [Google Scholar] [CrossRef] [Scilit]
  36. Ashraf, J.; Bakhshi, A.D.; Moustafa, N.; Khurshid, H.; Javed, A.; Beheshti, A. Novel Deep Learning-Enabled LSTM Autoencoder Architecture for Discovering Anomalous Events From Intelligent Transportation Systems. IEEE Trans. Intell. Transp. Syst. 2021, 22, 4507–4518. [Google Scholar] [CrossRef] [Scilit]
  37. Chen, M.; Wu, B.; Sun, H.; Wang, Z. FedGAN-ID: Federated-Learning-Based Intrusion Detection for In-Vehicle Network Using GANs. IEEE Internet Things J. 2025, 12, 36155–36167. [Google Scholar] [CrossRef] [Scilit]
  38. Kang, H.; Vo, T.; Kim, H.K.; Hong, J.B. CANival: A multimodal approach to intrusion detection on the vehicle CAN bus. Veh. Commun. 2024, 50, 100845. [Google Scholar] [CrossRef] [Scilit]
  39. Zhou, X.; Qin, G.; Liang, Y.; Song, J.; Liu, W.; Liu, Q. CGTS: Graph transformer-based anomaly detection in controller area networks. Cybersecurity 2025, 8, 62. [Google Scholar] [CrossRef] [Scilit]
  40. Yuan, J.; Sun, H.; Cao, R.; Huang, G. RL-IDS: A robust and lightweight intrusion detection system for in-vehicle network. J. Inf. Secur. Appl. 2026, 97, 104361. [Google Scholar] [CrossRef] [Scilit]
  41. Xu, H.; Fang, L.; Dong, J.; Shi, J. An efficient vehicular network anomaly detection framework based on encoder and dynamic threshold adjustment. Peer-to-Peer Netw. Appl. 2025, 18, 265. [Google Scholar] [CrossRef] [Scilit]
  42. Cheng, P.; Han, M.; Liu, G. DESC-IDS: Towards an efficient real-time automotive intrusion detection system based on deep evolving stream clustering. Future Gener. Comput. Syst. 2023, 140, 266–281. [Google Scholar] [CrossRef] [Scilit]
  43. ISO 11898-1:2024; Road Vehicles—Controller Area Network (CAN)—Part 1: Data Link Layer and Physical Coding Sublayer. International Organization for Standardization: Geneva, Switzerland, 2024. Available online: https://www.iso.org/standard/86384.html (accessed on 6 June 2026).
  44. Kukkala, V.K.; Pasricha, S.; Bradley, T. SEDAN: Security-Aware Design of Time-Critical Automotive Networks. IEEE Trans. Veh. Technol. 2020, 69, 9017–9030. [Google Scholar] [CrossRef] [Scilit]
  45. HCRL—Car-Hacking Dataset for the Intrusion Detection. Available online: https://ocslab.hksecurity.net/Datasets/car-hacking-dataset (accessed on 3 May 2026).
  46. HCRL—Survival Analysis Dataset for Automobile IDS. Available online: https://ocslab.hksecurity.net/Datasets/survival-ids (accessed on 3 May 2026).
  47. Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.E.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going Deeper with Convolutions. arXiv 2014, arXiv:1409.4842. [Google Scholar]
  48. Hendrycks, D.; Gimpel, K. Bridging Nonlinearities and Stochastic Regularizers with Gaussian Error Linear Units. arXiv 2016, arXiv:1606.08415. [Google Scholar]
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.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.