  Vehicle-to-Everything (V2X) communications play a crucial role in ensuring
safe and efficient modern transportation systems. However, challenges arise in
scenarios with buildings, leading to signal obstruction and coverage
limitations. To alleviate these challenges, reconfigurable intelligent surface
(RIS) is regarded as an effective solution for communication performance by
tuning passive signal reflection. RIS has acquired prominence in 6G networks
due to its improved spectral efficiency, simple deployment, and
cost-effectiveness. Nevertheless, conventional RIS solutions have coverage
limitations. Therefore, researchers have started focusing on the promising
concept of simultaneously transmitting and reflecting RIS (STAR-RIS), which
provides 360\degree coverage while utilizing the advantages of RIS technology.
In this paper, a STAR-RIS-assisted V2X communication system is investigated. An
optimization problem is formulated to maximize the achievable data rate for
vehicle-to-infrastructure (V2I) users while satisfying the latency and
reliability requirements of vehicle-to-vehicle (V2V) pairs by jointly
optimizing the spectrum allocation, amplitudes, and phase shifts of STAR-RIS
elements, digital beamforming vectors for V2I links, and transmit power for V2V
pairs. Since it is challenging to solve in polynomial time, we decompose our
problem into two sub-problems. For the first sub-problem, we model the control
variables as a Markov Decision Process (MDP) and propose a combined double deep
Q-network (DDQN) with an attention mechanism so that the model can potentially
focus on relevant inputs. For the latter, a standard optimization-based
approach is implemented to provide a real-time solution, reducing computational
costs. Extensive numerical analysis is developed to demonstrate the superiority
of our proposed algorithm compared to benchmark schemes.
