# Cybersecurity-Focused Anomaly Detection in Connected Autonomous Vehicles Using Machine Learning

arXiv: https://arxiv.org/abs/2506.22984 · HTML: https://mlsanity.com/paper/2506.22984/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 4 of its 35 references that are in the map.
- First posted on arXiv 28 Jun 2025.

## Builds on (most cited first, 4 of 4)

- [Anomaly Detection in Connected and Automated Vehicles using an Augmented State Formulation](https://mlsanity.com/paper/2004.09496/) (2020)
- [Location Anomalies Detection for Connected and Autonomous Vehicles](https://mlsanity.com/paper/1907.00811/) (2019)
- [Exploring Traffic Simulation and Cybersecurity Strategies Using Large Language Models](https://mlsanity.com/paper/2506.16699/) (2025)
- [United States Road Accident Prediction using Random Forest Predictor](https://mlsanity.com/paper/2505.06246/) (2025)

## Abstract (arXiv)

Anomaly detection in connected autonomous vehicles (CAVs) is crucial for maintaining safe and reliable transportation networks, as CAVs can be susceptible to sensor malfunctions, cyber-attacks, and unexpected environmental disruptions. This study explores an anomaly detection approach by simulating vehicle behavior, generating a dataset that represents typical and atypical vehicular interactions. The dataset includes time-series data of position, speed, and acceleration for multiple connected autonomous vehicles. We utilized machine learning models to effectively identify abnormal driving patterns. First, we applied a stacked Long Short-Term Memory (LSTM) model to capture temporal dependencies and sequence-based anomalies. The stacked LSTM model processed the sequential data to learn standard driving behaviors. Additionally, we deployed a Random Forest model to support anomaly detection by offering ensemble-based predictions, which enhanced model interpretability and performance. The Random Forest model achieved an R2 of 0.9830, MAE of 5.746, and a 95th percentile anomaly threshold of 14.18, while the stacked LSTM model attained an R2 of 0.9998, MAE of 82.425, and a 95th percentile anomaly threshold of 265.63. These results demonstrate the models' effectiveness in accurately predicting vehicle trajectories and detecting anomalies in autonomous driving scenarios.
