Infrastructure-Based Multi-Agent Reinforcement Learning with Attention for Highway Ramp Merging

Chenhao Tong, Steffen MüllerarXiv 2026

TL;DR

Researchers have developed a transformer-based multi-agent reinforcement learning (MARL) model that uses vehicle-to-infrastructure (V2I) communication to coordinate highway ramp merging. By applying self-attention mechanisms, the system allows vehicles to filter out irrelevant traffic data and focus only on the cars that matter, significantly improving throughput and safety even when mixed with human drivers or facing communication delays.

What Problem Does This Paper Address?

Highway on-ramps are notorious bottlenecks. They require two high-speed traffic streams to converge into one, often leading to "merging conflicts" where drivers hesitate, speed up aggressively, or fail to maintain safe gaps.

While Connected and Autonomous Vehicles (CAVs) offer a solution through coordination, current Multi-Agent Reinforcement Learning (MARL) approaches face a "Goldilocks" problem with observations:

  1. Local views: If a vehicle only looks at its immediate neighbors, it makes locally optimal decisions that might cause a traffic jam further down the road.
  2. Global views: If a vehicle observes every car in a 300-meter zone, the "noise" of irrelevant vehicles makes learning difficult and computationally expensive.
  3. Communication Overhead: Traditional vehicle-to-vehicle (V2V) communication scales quadratically; as traffic density doubles, the number of messages quadruples, potentially crashing the network.

Methods

The authors propose TRAN (Transformer-based traffic control), a hierarchical MARL framework that shifts the heavy lifting to a roadside infrastructure controller.

  • V2I Architecture: Instead of vehicles talking to each other ($O(N^2)$ complexity), every vehicle sends its state to a central roadside unit and receives a command back ($O(N)$ complexity). This makes the system much more scalable for dense traffic.
  • The Attention Mechanism: Borrowing from Large Language Models (LLMs), the model uses a Transformer encoder. Each vehicle acts as a "query" that looks at other vehicles ("keys") to determine their relevance. This allows an ego vehicle to "attend" to a car 50 meters ahead at the merge point while ignoring a car in the far-left lane that poses no threat.
  • Hierarchical Control: The MARL policy handles tactical decisions (e.g., "accelerate," "change lane left"). These are then executed by a low-level controller (like a PID or MPC) that handles the physics of the maneuver.
  • Action Masking: To speed up training and ensure safety, the model uses "masks" to prevent the agent from even considering illegal or dangerous moves, such as changing lanes into a wall or another car.

Datasets

The study utilizes SUMO (Simulation of Urban MObility), a standard open-source traffic simulation suite.

  • Scenario: A 300-meter highway segment with three main lanes and one on-ramp.
  • Baselines: The model was compared against:
  • HOMO: A neighbor-only observation model.
  • CAE: A global observation model using Convolutional Autoencoders.
  • SUMO Rule-based: The default "Krauss" car-following and "LC2013" lane-changing models.

Key Insights and Ideas

  • Relevance is Dynamic: The "aha moment" comes from the attention visualization. The model doesn't just look at the car in front. When entering the zone, it focuses on the merge point; after merging, it shifts attention to vehicles entering the zone behind it to ensure it isn't "cut off."
  • V2I > V2V for Scaling: By centralizing the observation processing, the researchers bypassed the communication bottleneck that plagues many decentralized MARL papers.
  • Zero-Shot Robustness: Perhaps most surprisingly, the model—trained under "perfect" conditions—remained collision-free when subjected to realistic communication errors (30% message loss and 100ms delays) without any additional training.

Key Results

  • Throughput: TRAN achieved a traffic flow of 579.44 veh/episode on the main road, significantly higher than the rule-based SUMO model (471.68) and other MARL baselines.
  • Stability: In a 4-hour stress test with fluctuating traffic demand, TRAN was the only model that successfully avoided "gridlock" traffic jams. Baselines like CAE and HOMO fell into jams within the first 10 minutes of high-density flow.
  • Mixed Traffic: The model remained effective even when 40% of the vehicles were human-driven (HDVs), though performance naturally degrades as the "uncontrollable" element of traffic increases.
  • Safety: After approximately 70 training episodes, the model reached a state of zero collisions across all test scenarios.

Limitations and Future Work

While the model is robust, the authors noted that traffic smoothness (hard braking) degrades under high communication stress. When messages are lost or delayed, vehicles tend to brake more abruptly to maintain safety margins.

Future directions include: * Improving safety awareness specifically for high-latency/high-loss environments. * Better predicting the intent of human drivers (HDVs) to allow CAVs to "proactively" yield or merge. * Investigating how the attention weights can be used to provide "explainable AI" for traffic managers.

Summary updated

Abstract

On-ramp merging is a typical safety and throughput problem on highways. Without proper coordination, human drivers and self-interested autonomous vehicles may make risky manoeuvres and cause accidents or congestion. With recent advances in connected autonomous vehicles (CAVs) and multi-agent reinforcement learning (MARL), vehicles can be trained to coordinate for safe and efficient merging. However, in dense traffic, forming an effective observation of the traffic state is challenging. For example, observing only the neighbouring vehicles may lead to locally optimal decisions, while observing the entire traffic can introduce much irrelevant information. In this paper, we propose a transformer-based MARL vehicle control model to address these problems. A roadside infrastructure controller receives the states of all CAVs via vehicle-to-infrastructure (V2I) communication and sends control commands back to them. An attention-based observation encoder is designed where each vehicle can filter the relevant vehicle information from the global traffic state. The proposed model is evaluated in SUMO against three baselines: a model that observes only the neighbouring vehicles, a model that encodes the global traffic information, and the rule-based SUMO model. The results show that our model achieves the highest traffic flow, safety and smoothness. Furthermore, in a four-hour simulation with dynamic traffic demand, our model successfully avoids traffic jams, while other baseline models fail at high traffic flow. We also show that our model remains effective when human-driven vehicles are present. We further show that our model, trained in ideal communication conditions, can still remain collision-free and maintain throughput under realistic V2I communication errors. Finally, we visualise the relevance weights that an ego vehicle assigns to other vehicles in multiple traffic situations.
BibTeX
@misc{tong2026infrastructure,
  author = {Chenhao Tong and Steffen Müller},
  title = {{Infrastructure-Based Multi-Agent Reinforcement Learning with Attention for Highway Ramp Merging}},
  year = {2026},
  eprint = {2611.20078},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.20078},
}
Figure