Autonomous vehicles (AV) have been developed as a transformative innovation in the perspective of restructuring the transportation background. There vehicles are developing with innovative features like autonomous ability, which improve road safety and expand mobility. But Autonomous vehicles are vulnerable to cyberattacks due to their dependence on communication and computer processes. These processes contain flaws that hackers can employ to obtain unauthorized access, steal data and handle vehicle control, which result in accidents and severe damage. In Autonomous vehicles, there is need for Intrusion Detection System (IDS) mechanism to improve characteristics then detect cyber-threats. This research introduces a novel-based transformer method to enhance safety and predict intrusion detection in Autonomous vehicles. In this work, a publicly available Car-Hacking dataset contains injected and normal messages. Here, investigator extract related information from dataset based on time stamped sensor and event data. Initially, data are pre-processed by data cleaning and normalization methods that enhance quality of data which are structured into log formation to easy analysis. Here, the Cuckoo Hashing function was utilized to log creation and store based on their timestamps. Then improved transformer used to analysis log events and predict potential incidents. Lastly, Forensic examination includes different kinds of working processes to enhance safety in Autonomous vehicles. Forensic processes collect evidence from crime scenarios, and then the collected evidence is further investigated to generate detailed reports about Autonomous vehicles malicious activity. The experimental result displays proposed transformer model attains an accuracy of 99.69%. The proposed model enhances the safety of Autonomous vehicles data and provides better processes for describing and analyzing Autonomous vehicles incidents.