Abstract
Traffic4cast is an annual competition to predict spatio-temporal traffic based on real-world data. We propose an approach using Graph Neural Networks (GNNs) that directly works on the road graph topology extracted from OpenStreetMap data. Our architecture incorporates a hierarchical graph representation to improve the information flow between key intersections and the shortest paths connecting them. Furthermore, we investigate how the road graph can be compacted to ease the flow of information and utilize a multi-task approach to predict congestion classes and Expected Time of Arrival (ETA) simultaneously.
Introduction
Predicting urban traffic is a notoriously difficult task due to its inherent spatial and temporal complexity. Traditional approaches often rely on grid-based representations, treating city traffic like pixels in an image. However, real-world traffic is constrained by the underlying road network. The Traffic4cast 2022 challenge shifted this paradigm by requiring predictions directly on road graphs derived from OpenStreetMap (OSM).
Despite the logical appeal of graph-based modeling, two major hurdles persist. First, OSM data is highly redundant; it includes numerous "degree-2" nodes simply to represent the physical curves of a road. For a GNN, these nodes act as unnecessary bottlenecks. Second, traffic exhibits long-range dependencies, where congestion at one major artery can impact distant intersections. Standard GNNs, which rely on local message passing, struggle to propagate information across these vast distances efficiently.
Methodology
To address these challenges, we developed a multi-step pipeline centered on a custom GNN architecture designed for city-scale networks.
Graph Compaction
The first step in our pipeline is graph compaction. We simplified the road network by identifying and removing nodes that do not represent intersections (degree-2 nodes). By merging the edges connected to these nodes, we reduced the total node count by approximately 30% across all target cities. This reduction allows information to travel across the logical structure of the city in fewer "hops," mitigating the issues of oversmoothing and vanishing gradients common in deep GNNs.
Hierarchical Graph Extensions
To solve the long-range dependency problem, we introduced "supersegments"—pre-defined shortest paths between key intersections. We explored three distinct hierarchical strategies to integrate these into the GNN:
- Direct Supernode Edges: Adding edges directly between the endpoints of supersegments.
- Virtual Supersegment Nodes: This approach, which proved most effective, involves creating a single "virtual node" for each supersegment. Information from all constituent road nodes is pooled into this virtual node and then broadcast back, enabling near-instantaneous long-distance communication.
- Supersegment Graph Nodes: Adding nodes for every element in a dedicated supersegment graph to allow overlapping paths to share context.
Multi-Task Learning and Feature Engineering
Our model utilizes a shared GNN backbone to perform multi-task learning. It simultaneously predicts discrete congestion classes for individual edges and continuous ETA values for supersegments. To provide the model with a "global pulse" of the city, we augmented node features with global statistics derived from sparse loop counter data, ensuring the model understands the overall traffic state before beginning local message passing.
Results
The proposed methods were evaluated using the Traffic4cast 2022 Challenge Dataset, covering London, Madrid, and Melbourne. Graph compaction significantly improved efficiency, reducing London's node count from approximately 59,000 to 40,000.
In performance benchmarks, the "Virtual Node" hierarchical approach consistently yielded the lowest training loss. By effectively "teleporting" traffic context across the city, this method outperformed both the original flat graph topology and other hierarchical variants. The multi-task architecture successfully handled the dual requirements of classification (congestion) and regression (ETA) within a single, unified training pipeline.
Conclusion and Future Work
Our findings suggest that the representation of the road network is as critical as the neural architecture itself. While graph compaction and hierarchical virtual nodes significantly improved performance, several avenues for future research remain. Currently, our hierarchy is limited to two levels; exploring multi-level abstractions, such as neighborhood or district-level nodes, could further optimize information flow. Additionally, a tighter integration of compaction and hierarchical layers represents a promising direction for scaling GNNs to even larger urban environments.
Summary updated