## 3 Proposed Framework
### Offline Training Phase
#### 3.1.4 Track Classifications  
The interaction dictionary is constructed based on the mean position and velocity of each cluster, considering both the ego vehicle and tracks. Therefore, for each timestamp, a cluster index is calculated using the Euclidean distance. As part of the initialization of the interaction array, the positions of the ego vehicle, time, cluster indices, and interaction labels for both the ego vehicle and tracks are recorded. The timing analysis was conducted for interactive clusters where both the ego vehicle and each track were simultaneously present in the space at the same time. Track 14 interacted with the ego vehicle from 1 to 14.7 s. Similarly, Track 20 had interactions with the ego vehicle from 0.7 to 14.5 s. Interactions for Track 1416 began at 15.8 s and ended at 18 s. Track 1682's interaction took 18 to 24.8 s. Track 1929 interacted with ego vehicle from 20 to 23.4 s. The interaction time between track 3159 and ego vehicle occurs from 32.1 to 33.7 s. Finally, Track 3549 interacted with the ego vehicle between 36 and 39.3 s. Table 1 shows the initial part of the interaction array which belongs to the interactions between the ego vehicle and track 14. The track cluster index of 0 indicates that there was no interaction at that time, so the first interaction began at 1.00 s. Note that this interaction continues until the end of a particular interaction, maintaining separate interaction arrays for the ego vehicle and for each track. Figure 4: Clustering results for the generalized states of the seven tracks and the ego vehicle. The hierarchical DBN model is illustrated in Figure 5. Odometry data is used to determine the position of the ego vehicle on the left side of the DBN. There are seven different tracks on the right side, provided by the LiDAR sensor. A layer of observations is located at the bottom, where raw sensor data have been collected. The middle level of the model (i.e., a continuous level) represents our generalized states. Through the use of the GNG algorithm, the third upper layer is a discrete layer that allows us to group the generalized states into clusters. Lastly, dictionary interactions occur at the top of the DBNs, where clusters derived from GNG are considered, enabling interaction between tracked objects and the ego vehicle. A switching variable is incorporated into the DBN to distinguish static tracks from dynamic tracks according to predefined mathematical equations. As a result, these classifications play a crucial role in extending learned vocabularies during testing, particularly for localizing the ego vehicle. For this purpose, separate dictionaries are maintained for each track and ego vehicle, each containing six columns of information: time, the cluster index of the ego vehicle, the cluster index of the track, the interaction label, as well as the x and y positions of the ego vehicle. It is especially useful for predicting the position of the ego vehicle to have the interaction label, which indicates whether it is interacting with a specific track at a given time. Using these dictionaries to analyze interaction labels and spatial data, the model can more accurately predict the ego vehicle's position relative to static tracks. This is achieved using an MJPF, which combines the strengths of Kalman filters and particle filters. Utilizing the consistent patterns in the static tracks' data, the MJPF refines the positional estimates by comparing predictions from the DBN with real-time observations. Whenever the switching variable indicates a static state, the DBN leverages the corresponding dictionary entries to provide more accurate and robust localization of the ego vehicle. The use of this approach ensures that the localization process is both data-driven and mathematically based, greatly improving the accuracy and reliability of navigation on the ego vehicle.