Road safety at urban intersections is one of the most complex challenges in modern mobility. Every year, thousands of accidents occur at these critical points due to the heterogeneous interaction between vehicles, pedestrians and cyclists. Traditional conflict assessment methods, based on pairwise indicators or fixed feature vectors, fail to capture the temporal dynamics and relational topology of multiple agents. In this context, the HERMES model (Heterogeneous Edge-Relational Graph Neural Network with SSM-informed Multi-head Attention) represents a significant advance by formulating conflict prediction as a temporal classification of heterogeneous scene graphs.
HERMES models vehicles and pedestrians as heterogeneous nodes, while vehicle-vehicle, vehicle-pedestrian and pedestrian-pedestrian interactions are encoded as relation-specific edges with continuous kinematic descriptors and surrogate safety measures (SSM). Through SSM-informed multi-head attention, dynamic node and edge updates, safety-aware graph pooling and temporal sequence learning, the network estimates scene-level conflict probability. Results obtained from 109,028 trajectory sequences at a signalized urban intersection show an AUC-ROC of 0.9898 and an AUC-PR of 0.9412, outperforming Transformer and XGBoost models. In zero-shot external evaluation, HERMES achieved an AUC-ROC of 0.9752, demonstrating its transferability.
This approach not only improves safety monitoring at intersections but also illustrates how heterogeneous graph architectures with temporal learning can be applied to complex risk analysis problems. Behind this innovation are advanced software engineering principles and intelligent system design that companies like Q2BSTUDIO integrate into their developments. Q2BSTUDIO, as a software and technology development company, offers custom artificial intelligence solutions for sectors such as mobility, logistics and road safety. The ability to model complex interactions between multiple entities is directly applicable to real-time incident prediction systems where accuracy and latency are critical.
The development of HERMES required the integration of multiple technologies: from trajectory data capture and processing to the implementation of dynamic graphs with multi-head attention. This reflects the need for a robust technology ecosystem, including cloud infrastructure, real-time databases and machine learning pipelines. Q2BSTUDIO, with its expertise in cloud services on AWS and Azure, provides the foundation for deploying models like HERMES in production environments, ensuring scalability and high availability. Furthermore, cybersecurity is a fundamental pillar: when handling sensitive traffic and mobility data, it is essential to protect both data in transit and trained models. Q2BSTUDIO includes cybersecurity and pentesting services to ensure that AI solutions are robust against adversarial attacks.
Another key aspect is the analysis of results. HERMES generates a large amount of data on potential conflicts that must be visualized and exploited for decision-making. Business Intelligence (BI) tools allow transforming those predictions into interactive dashboards that mobility managers can use to prioritize interventions. Q2BSTUDIO develops BI solutions with Power BI and other platforms, integrating data from heterogeneous sources and generating automated reports. In fact, the combination of AI models with BI creates a virtuous cycle: models detect risk patterns, and dashboards allow urban planners to validate and adjust safety policies.
Beyond road safety, the HERMES architecture is transferable to other domains where heterogeneous agent interactions are relevant: from autonomous vehicle fleet management to robot coordination in smart warehouses. In each case, the need for custom software applications is evident, as there are no generic solutions that capture all the specificities of the problem. Q2BSTUDIO specializes in custom software development, adapting frameworks such as graph neural networks, transformers and sequential models to the specific needs of each client.
A differentiating factor of HERMES is the use of SSM (surrogate safety measures) to inform multi-head attention. This idea can be transferred to other predictive systems where partial safety metrics or proxies are available. For example, in industrial environments, surrogate risk measures (such as vibrations, temperature or pressure) can be defined and graph networks used to anticipate machinery failures. Q2BSTUDIO has worked on predictive maintenance projects integrating IoT sensors, cloud computing and AI models, demonstrating that knowledge transfer between sectors is viable and profitable.
HERMES's performance in detecting conflicts with a 5% false alarm rate (detecting 95.7% of conflict sequences) is a milestone that opens the door to early warning systems in real intersections. However, operational implementation requires a comprehensive approach that includes not only the model but also real-time data collection, preprocessing, edge inference and integration with traffic control systems. In this regard, Q2BSTUDIO offers consulting and development of end-to-end solutions, from hardware selection to cloud deployment.
The model's transferability (zero-shot and source-target joint training) is especially relevant for cities that do not have large volumes of historical data. HERMES allows adaptation to new intersections with few examples, reducing implementation costs. Similarly, in the business sphere, Q2BSTUDIO's solutions are designed to be modular and reusable, facilitating adaptation to different contexts without having to start from scratch each time.
In conclusion, HERMES is an example of how the combination of heterogeneous graphs, safety-informed attention and temporal learning can revolutionize conflict prediction at intersections. Beyond technology, the success of these systems depends on rigorous software engineering, robust cloud infrastructure, comprehensive cybersecurity and data analysis capabilities. Companies like Q2BSTUDIO are at the forefront of offering these capabilities in an integrated manner, helping public and private organizations turn AI innovation into practical and scalable solutions. The mobility of the future will be safer thanks to models like HERMES, and custom software development will be the vehicle that makes it possible.





