Joint Dynamic Lane Reversal and Variable Speed Limit Control: A Graphormer-Based Approach
Authors: Hamed Araab, Abbas Ahmadi, Mohammad Hossein Basiri
Organizations: Department of Industrial Engineering and Management Systems, Amirkabir University of Technology (Tehran Polytechnic), Tehran, Iran · Department of Electrical Engineering, Amirkabir University of Technology (Tehran Polytechnic), Tehran, Iran
Connected and automated vehicles could allow reassigning lane directions and speed limits on every road frequently, but the benefit hinges on how traffic reroutes, and one-way roads can isolate junctions. We formulate network-wide dynamic lane allocation and directional speed limit control with one-way roads, lane clearing before each reversal, and a navigable graph kept strongly connected at all times. An action-resolution algorithm grounded in graph orientation theory admits a proposal closing a direction only if the network stays strongly connected and otherwise relaxes or reverts it, keeping all junctions mutually reachable within the model, even during clearing. All road controllers share one transformer whose attention, Global Endpoint Relation-Aware Spatio-Temporal Self-Attention (GERASTSA), spans all road-time tokens, biased by the endpoint relations between roads. It is pretrained on action-conditioned traffic forecasting and fine-tuned with per-road proximal policy optimization under a mixed reward that also credits neighboring roads and the network. On a 6 x 6 grid with commuter rush hours, the learned policy makes about two thirds of roads one-way in the peak direction and cuts daily delay by 90% against the initial configuration held fixed and by 85% against a tuned two-way load balancer. Restricted to two-way roads at test time, it gains only about as much as this balancer, whereas its learned speed limits add delay. Pretraining roughly halves the updates needed to surpass the fixed configuration. Of the ablations, only removing the relational bias or the spatial embedding clearly matters, multiplying delay about fivefold.
Figures & tables
Fig. 1: An example network with ∣J∣=7 junctions and ∣R∣=8 roads. (a) Each stroke is one lane. Road r5 (heavy) is the only bridge road, R↔={r5} , so it has at least two lanes, and strong connectivity requires it to keep at least one open lane in each direction. (b) A strongly connected navigable arc set R(t)∈S : arrows show the navigable arcs (solid: forward; dashed: backward), with one stroke per open lane ℓˉr,d(t) ; most roads are one-way, yet G(t) is strongly connected. (c) One road controller per road; controllers of roads that share a junction are neighbors.
Fig. 2: Clearing two lanes of a road with Lr=5 (lane 1, the first forward lane, at the bottom). When the target lanes ℓ^r drop below the active lanes ℓr , lanes ℓ^r+1,…,ℓr are closed to both directions (dark grey) while vehicles traveling in their old direction leave them. Clearing is atomic: once it completes, all of these lanes open at once to the backward direction (hatched; forward lanes are tinted) and ℓr=ℓ^r . The open lanes ℓˉr,d below each state need not sum to Lr while the road is clearing.
Fig. 3: One decision step. The policy of the road controllers proposes an action a(t) , consisting of proposed lanes and proposed normalized speed limits for every road. Action resolution rejects closing proposals that would break strong connectivity, relaxing them on multi-lane roads and reverting them on single-lane roads, yielding the next target lanes ℓ^(t+1) ; proposed normalized speed limits are always accepted and become the next active normalized speed limits u(t+1) . The traffic network applies the resulting active speed limits immediately, and each clearing road completes clearing once its clearing lanes are empty.
Fig. 4: Relations κ(r5,⋅) on the controller graph of the example network, with Λmax=2 (heavy border: r5 ; shaded: roads adjacent to r5 ; white: roads at hop distance at least 2 ). Roads adjacent to r5 , with ω(r5,fwd)=(j3,j5) , are told apart by the directions in which the two roads flow into their shared junction, e.g. r2 , with ω(r2,fwd)=(j2,j3) , flows into j3 forward while r5 flows into it backward. Each relation κ(r5,r) selects the learned relational bias BR,h,ξ(κ(r5,r)) of every head h .
Fig. 5: The GERASTSA block. Queries, keys, and values are split into H heads and flattened over the WR road–time tokens of each sample. The relational bias BR′ is gathered from the learned table BR through the relation index matrix Ξ and shared across all window positions and samples, and the flattened mask M′ forbids attention as specified by M , which in the transformer is the mask of ( 32 ).
Fig. 6: The GERASTSA transformer. The histories X⟨k⟩ are left-padded to the longest window length W , and the mask M of ( 32 ) is built from their window lengths Wk . The embedded input Z[0] passes through N pre-norm layers, each mapping Z[n−1] to Z[n] with a GERASTSA block and a SwiGLU feedforward network in residual connections; a final layer normalization and a linear map produce the output Y .
Symbol
Hyperparameter
Value
Environment
Lmax
Maximum total lanes
6
εR
Rerouting threshold
0.1
GERASTSA transformer
FY
Output width
128
FZ
Model width
128
TABLE I: Hyperparameters of the experiments.
Feature
Value
Count
Road length
Dr/maxr′∈RDr′
1
Total lanes
Lr/Lmax
1
Nominal speed limit
sr,d(0)/max(r′,d′)∈R×Dsr′,d′(0)
2
Bridge indicator
\mathds1(r∈R↔)
1
Congestion
cr,d(t)
2
Density
cˉr,d(t)
2
TABLE II: Input features of road r at time step t .
Fig. 7: Return against the PPO update when fine-tuning from the pretrained encoder and from an untrained one. (a) Greedy policy on the 8 days evaluated during fine-tuning (shaded: standard error). (b) Mean return of the training episodes that end in each update, under sampled actions; until update 18 (shaded), these episodes began under the baseline of the warm-up, and the drops at updates 5 and 6 and at updates 12 to 14 mark the policy taking over the evening and the morning rush hour. Dotted: mean return of the baseline on the days of (a).
Policy
Return
Return change (%)
Delay
Trips
Travel time
Adm. wait
Removed
Rejected
( 103 veh·h)
vs. baseline
vs. full model
(veh·h)
( 103 )
(min)
(s)
Baseline
14.36±0.04
−18.6±0.3
3565±43
107.58±0.07
5.20±0.02
25.4±0.6
583±23
0
Load balancer
15.41±0.03
+7.3±0.2
−12.7±0.2
2524±29
107.62±0.07
4.61±0.02
39.0±0.7
535±17
0
Full model
17.65±0.01
+22.9±0.3
374±9
108.16±0.07
3.52±0.01
3.1±0.1
0
161±2
Untrained encoder
17.11±0.03
+19.1±0.3
−3.1±0.2
911±29
108.14±0.07
3.88±0.02
6.7±0.8
13±4
211±16
Lane-only
17.85±0.01
+24.3±0.3
+1.1±0.1
174±7
108.16±0.07
3.410±0.005
2.8±0.1
0
154±1
TABLE III: Performance on the 32 evaluation days: means and standard errors over the days, with changes in return paired by day. Load balancer: the heuristic baseline of Section VI-B ; full model: the learned policy; untrained encoder: the full model fine-tuned without pretraining; the six rows from lane-only on: the full model restricted at test time (Section VI-C ); the last five rows: the ablations (Section VI-D ). Removed: vehicles removed from gridlocked queues by the safeguard; rejected: closing proposals rejected by action resolution, both per day.
Fig. 8: Metrics per decision step over the day under the baseline and the learned policy, averaged over the 32 evaluation days: (a) delay, (b) completed trips, (c) vehicles on the network, (d) one-way roads, (e) mean normalized speed limit over all roads and directions, and (f) closing proposals rejected by action resolution. Dotted verticals mark 08:00 and 17:30, the times shown in Fig. 9 .
Fig. 9: Congestion and open lanes of every road and direction at 08:00 and 17:30 under the baseline and the learned policy, averaged over the 32 evaluation days. Each direction of a road is drawn on its right-hand side, with its luminance giving the congestion and its width the open lanes, so that a one-way road shows a single stroke. North is up; C and R mark the corners of the commercial and the residential zone.
Fig. 10: Ablations of the GERASTSA transformer against the full model. (a) Return of the greedy policy against the PPO update on the 8 days evaluated during fine-tuning (shaded: standard error); dotted: mean return of the baseline on the same days. (b) Validation MSE of pretraining against the pretraining step.
We present a traffic-signal control interface in which a shared graph neural network assigns scores to individual traffic movements. Each junction converts these scores into its own variable-sized set of legal signal phases using a deterministic incidence matrix. Directed corridor nodes provide traffic context, while movement nodes represent controlled input-to-output paths through junctions. Typed mean aggregation produces one scalar per movement; phase definitions and signal timing remain outside the learned network. This makes graph size and junction-specific action count independent of the learned parameter shapes. PPO experiments evaluate the interface on unseen synthetic grid geometries, altered signal coverage, and five heterogeneous city graphs. The policies retained performance across unseen geometries within the synthetic grid family, while changes in signal coverage exposed sensitivity to a signal-coverage distribution shift. A single trained city-policy instance executed across all five city graphs, with heterogeneous outcomes. These results provide feasibility evidence rather than a general estimate of transfer to arbitrary road networks.
Successive weaving segments (SWSs) on urban expressways are bottlenecks prone to recurrent congestion and collisions, requiring fine-grained active traffic management (ATM). Existing approaches struggle to balance the adaptive performance of data-driven optimization with the resilience and transferability of model-based control. We propose a hybrid framework to coordinate lane-level variable speed limits (VSLs) and ramp metering across SWSs. First, we reconstruct L-METANET, a lane-level macroscopic traffic flow model that captures free and forced lane changes. Second, we combine XGBoost-SHAP with a random-parameters binary logit (RPBL) model to derive analytical equations for merging and diverging collision risks and formulate system cost and reward functions. Third, we develop MPC-STMAPPO, a hierarchical controller integrating model predictive control (MPC) and multi-agent reinforcement learning (MARL). Its upper MPC layer uses L-METANET for long-horizon rolling optimization and generates baseline commands; its lower spatiotemporal MAPPO (ST-MAPPO) layer, enhanced with Mamba cells and graph attention, produces residual actions for short-horizon adjustment. Real-world experiments on the 18-km Eastern Expressway in Changchun, China, show that L-METANET accurately reproduces lane-changing-induced flow redistribution and capacity drops, with state evolution aligned with ground truth. XGBoost-SHAP-RPBL achieves AUCs above 0.80 in most tasks, outperforming conventional logit models. MPC-STMAPPO converges faster and performs better across multiple metrics than MPC- and MARL-based baselines. Under randomly fluctuating demand, it also significantly outperforms pure MARL in generalization, demonstrating strong potential for industrial deployment.
Guodong Ma, Baofeng Sun, Wenyu Yang +1
School of Transportation, Jilin University, Changchun 130022, China · School of Transportation and Logistics, Southwest Jiaotong University, Chengdu 610031, China
In this work, we extend our systematic capacity region perspective to multi-junction traffic networks, focussing on the special case of an urban corridor network. In particular, we train and evaluate centralized, fully decentralized, and parameter-sharing decentralized RL controllers, and compare their capacity regions and ATTs together with a classical baseline MaxPressure controller. Further, we show how the parametersharing controller may be generalised to be deployed on a larger network than it was originally trained on. In this setting, we show some initial findings that suggest that even though the junctions are not formally coordinated, traffic may self organise into `green waves'.