Graph-Based Traffic Signal Control for Heterogeneous Road Networks

Explore a graph-based interface for traffic signals using GNN and PPO. Tested on synthetic grids and real city graphs, showing feasibility for heterogeneous

martes, 28 de julio de 2026 • 4 min read • Q2BSTUDIO Team

Interfaz inteligente para redes de tráfico heterogéneas

Urban traffic control is one of the greatest challenges in modern cities. Traditional traffic lights, based on fixed timers or inductive loops, fail to adapt to the changing dynamics of vehicle flow. In recent years, graph neural networks (GNNs) have emerged as a promising technology to optimize traffic signal timing, treating intersections as nodes and roads as edges of a graph. This approach allows modeling complex relationships and learning more efficient control policies. By sharing contextual information across the graph, a traffic light at a congested intersection can adjust its timings based on flow from neighboring crossings, something isolated methods cannot achieve.

GNNs capture the topology of the road network and the interdependencies between junctions. Specifically, a feature vector is assigned to each traffic movement (e.g., left turn, through movement) and a deterministic incidence matrix is used to map those movements to valid signal phases. Mean aggregation produces a scalar per movement, keeping phase definitions and signal timing outside the trained network. This makes graph size and the number of actions per junction independent of learned parameters, facilitating generalization to new geometries.

Recent research shows that these models, trained with algorithms like PPO, can maintain performance on unseen synthetic grids, though they exhibit sensitivity to changes in signal coverage. Transferring to real-world, heterogeneous road networks remains a challenge that requires custom software solutions, IoT sensor integration, and robust cloud infrastructure. This is where companies like Q2BSTUDIO bring their expertise in custom software development, adapting GNN algorithms to the particularities of each city.

To deploy a GNN-based traffic signal control system in production, a platform that processes large volumes of real-time data is necessary. Cloud services from AWS and Azure, like those offered by Q2BSTUDIO, provide the scalability and reliability needed to run AI models, store historical data, and serve monitoring dashboards. Managing data pipelines from sensor ingestion to continuous training benefits from cloud infrastructure with load balancing and auto-scaling.

Cybersecurity is another critical pillar. A connected traffic system is a potential target for cyberattacks that could paralyze a city. Q2BSTUDIO includes cybersecurity and pentesting services to ensure communications between sensors, servers, and traffic lights are protected through encryption, authentication, and network segmentation. Likewise, business intelligence (BI) plays a key role in continuous monitoring and optimization. With tools like Power BI, it is possible to visualize traffic patterns, predict congestions, and adjust GNN model parameters. Q2BSTUDIO offers BI solutions that transform data into actionable insights for mobility managers.

Implementing autonomous AI agents that make real-time decisions is the next frontier. These agents, trained with reinforcement learning techniques and based on GNNs, can act as distributed controllers that collaborate to optimize global flow. Process automation, another service from Q2BSTUDIO, allows these agents to integrate with existing traffic management systems without disrupting operations. Thus, an agent can adjust green times at each crossing based on the current graph state, reducing waiting times and emissions.

A concrete use case would be a medium-sized city wanting to modernize its traffic light network. First, historical traffic data is analyzed with Power BI to identify bottlenecks. Then, a custom GNN model is designed representing each intersection and its connections, including attributes such as number of lanes, queue lengths, and average speeds. The model is trained in the cloud on AWS or Azure using AI-optimized hardware. Once trained, it is deployed as an AI agent that receives real-time data from sensors and cameras, and adjusts traffic light timings every second. This inference cycle requires custom software that orchestrates communication between components: from data acquisition to actuation on traffic light controllers. Q2BSTUDIO can develop that platform, ensuring cybersecurity at every layer and providing BI dashboards for supervision.

Research results, such as those showing experiments on synthetic grids and five heterogeneous cities, indicate that GNNs have great potential, but their success depends on careful implementation. Policies trained in simulation can be transferred to real environments if the right technological infrastructure is in place. The flexibility of GNNs to handle different graph sizes and variable signal phase sets makes them ideal for dynamic urban environments. However, sensitivity to changes in signal coverage underscores the need for robust system design.

In conclusion, traffic signal control with graph neural networks represents a significant step toward smarter and more sustainable cities. Bringing this technology from the lab to the streets requires multidisciplinary collaboration. Companies like Q2BSTUDIO, with experience in custom software development, cloud, cybersecurity, BI, and automation, are uniquely positioned to guide municipalities through this process. The combination of advanced AI with solid business services ensures that systems are not only efficient but also secure and scalable. The future of urban mobility lies in the integration of these technologies, and Q2BSTUDIO is the perfect ally to make it happen.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.