## 3 System Design and the Proposed SEAC-Based Resource Allocation Methodology  
In this work, we focus specifically on aperiodic traffic in 5G-NR-V2X Mode 2, which presents unique challenges in resource allocation. Traditional methods like SB-SPS and DS have limitations in this context. SB-SPS struggles with variations in message size, packet generation latency, and the intervals between packet generations, leading to underutilized resources and frequent collisions. On the other hand, while DS is more flexible in handling aperiodic and variable-sized traffic, it has a high collision probability in environments with dense vehicular traffic. Moreover, DS does not consider packet delay budget (PDB) constraints, which are crucial for latency-sensitive applications such as autonomous driving and real-time video streaming [16; 17].  
To address these challenges, we propose the Shared Experience Actor-Critic (SEAC) reinforcement learning technique, which optimizes resource allocation in aperiodic traffic scenarios by overcoming the limitations of both SB-SPS and DS. SEAC leverages shared experiences among vehicular agents to reduce collisions and to improve resource utilization. It dynamically allocates resources by considering both real-time decisions and long-term impacts, ensuring sustained performance in high-density vehicular environments [18].  
Figure 3 provides a general framework that illustrates both the existing (DS and SB-SPS) and the proposed SEAC techniques for a better understanding. While this figure includes a comparison of the traditional and proposed methods, the main focus of our work is on aperiodic traffic and how SEAC enhances resource allocation in such scenarios. The decision-making process shown in the figure is based on the traffic type (aperiodic vs. periodic), with SEAC addressing the challenges specifically associated with aperiodic traffic.  
In the 5G-NR-V2X Mode 2 network, the radio resource allocation task is addressed through a fully decentralized multi-agent networked MDP. Vehicular agents operate in a shared road traffic environment, constantly exchanging CAMs and CPMs. These messages provide critical information such as position, distance to neighboring vehicles, and forecasts of object locations. This decentralized model bases its actions on each agent's local observations and assigns rewards specific to each agent's context. The primary objective for all agents is to ensure the successful transmission of V2X messages within the selected radio resources while avoiding collisions with other agents. By employing experience-sharing techniques, the agents enhance their learning capabilities, gaining valuable insights from  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Work**} & \begin{tabular}{c} **AI-Based** \\ **Resource** **Allocation** \\ \end{tabular} & \multirow{2}{*}{**SB-SPS**} & \multirow{2}{*}{**DS**} & \begin{tabular}{c} **Periodic** \\ **Traffic** \\ \end{tabular} & \begin{tabular}{c} **Aperiodic** \\ **T Traffic** \\ \end{tabular} & \
\begin{tabular}{c} **Highway** \\ **Scenario** \\ \end{tabular} &
\begin{tabular}{c} **Urban** \\ **Scenario** \\ \end{tabular} \\ \hline
[1] & \(\mathcal{X}\) & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) \\ \hline
[2] & \(\checkmark\) & \(\checkmark\) & \(\mathcal{X}\) & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) \\  
the actions and outcomes experienced by their peers [18]. Our approach utilizes gated recurrent unit (GRU) layers to process and forecast the state information, optimizing resource allocation decisions and improving the overall network efficiency. To formulate an MDP, the components--state, action, reward, and experience--must be clearly defined in the context of radio resource allocation.