Decentralized and Lightweight Transformer-Based Framework for Cybersecurity in Vehicular Networks

Ankit Mundra

Pankaj Vyas

Vivek Kumar VermaEmail

Department of Information Technology, Manipal University Jaipur, Jaipur, Rajasthan, 303007, India

Abstract

The seamless incorporation of communication and computer control systems in today's vehicles has increased the capability but created serious security risks. In this work, we propose a decentralized and lightweight transformer-based intrusion detection system (IDS) for automotive cybersecurity to address the above issues in a scalable and flexible fashion. By utilizing the car hacking dataset (CHD), the proposed approach not only introduces advanced feature engineering by considering temporal features like time differences and message frequency, as well as payload entropy, to efficiently represent vehicular communication patterns, but also considers structural information within the vehicular network. Uses a transformer model for sequence-to-sequence (Seq2Seq) for processing controller area network (CAN) bus data; thus, sophisticated anomalies such as denial of service (DoS), fuzzy, and spoofing attacks can be accurately detected. These attention mechanisms and positional encoding in the model improve the capability of learning the sequence dependencies and context interdependence in vehicular data. Evaluation results showed that the framework has a high precision (96.7%), recall (95.3%) and attack detection rate (ADR, 97.5%), and low false alarm rate (FAR, 3.4%), with a real-time detection capability at average time to detect (ATD) of 22 milliseconds. These results confirm that the IDS is a trusted, effective, and cost-effective technique to protect modern vehicular networks from new cyber threats. The framework is planned to be taken forward so that additional vehicular protocols and deployment can be valid for the real world.