## 1 Introduction  
Current intelligent transportation systems remain in the development stage due to the complexity of their numerous components, including the control of urban roads, pedestrians, and vehicles [1]. On the other hand, intelligent driving support systems, which are suggested based on the active safety principle and attempts to shorten drivers' reaction times, have been evolving quickly. Autonomous vehicles (AVs), which are part of intelligent transportation, are starting to appear on commercial roads and are moving towards full autonomy [2]. In order to drive safely and effectively today, AVs rely on sensors like cameras and LiDAR to monitor the road [3]. However, with the presence of other AVs on the road, they can enhance their capabilities through vehicle-to-vehicle (V2V) communication. By sharing real-time information among AVs, driving becomes safer and more efficient [4]. Through this V2V communication, AVs can exchange information, predict one another's movements, and react appropriately, improving traffic flow and boosting road safety. The incorporation of V2V communication is becoming increasingly important as AV technology develops if completely autonomous and intelligent transportation systems are to be realized [5]. As AVs gain popularity and move closer to universal use, the fundamental necessity for smooth communication and connectivity becomes more obvious. Vehicle-to-Infrastructure (V2I) and Vehicle-to-Vehicle (V2V) communications play a role here by improving typical autonomous driving duties [6]. Additionally, they will also connect AVs to the Internet of Things (IoT) as a whole, enabling for a more connected environment [7]. IoT is a term without a clear definition; however, it refers to the networking of everyday objects, typically through wireless links [8]. It is worth mentioning the 5G technology, which promotes autonomous driving and improves vehicle connectivity. Different techniques have been developed to enhance the performance of 5G networks [9; 10]. Furthermore, Beyond 5G (B5G) and 6G communication technologies are widely regarded as the future of V2V communications because of their high throughput, high bandwidth, and low latency [11]. Machine learning (ML) techniques, particularly deep neural networks, are currently the foundation of advanced technology autonomous driving systems [12]. Deep neural networks are utilized in autonomous cars for many different purposes, such as localization, path planning, and perception [13]. However, in order to operate effectively, these algorithms need sources of informative data, which vehicular communications can offer. Furthermore, the relevance of employing optimization algorithms in many types of applications to address a number of concerns and problems should be emphasized [14; 15]. Optimization algorithms are critical in the development and operation of autonomous vehicles, allowing them to operate more efficiently, safely, and reliably in a variety of real-world circumstances. Future progress and broad adoption of autonomous vehicles will be further aided by ongoing improvements in optimization techniques [16]. In the previous work proposed in [4], the authors focused on enhancing the connectivity between AVs and everything based on finding the best relay position using an optimization technique. Consequently, this proposed model has been enhanced to a new effective model by using a deep learning model with the optimization technique. As a result, the following are the main contributions of this article:  
* The suggested approach mixes an optimization technique with a deep learning algorithm to create a new, effective way to improve connectivity between AVs and everything (X). * To determine the reliability and efficiency of the communication between AVs and everything, an optimization problem is established utilizing the Lagrange optimization technique and a 1D Convolutional Neural Network (1D-CNN) network.