TraCo: Learning Virtual Traffic Coordinator for Cooperation with Multi-Agent Reinforcement Learning

Weiwei Liu, Wei Jing, Lingping Gao, Ke Guo, Gang Xu, Yong LiuCoRL 2023

Abstract

Multi-agent reinforcement learning (MARL) has emerged as a popular technique in diverse domains due to its ability to automate system controller design and facilitate continuous intelligence learning. For instance, traffic flow is often trained with MARL to enable intelligent simulations for autonomous driving. However, existing MARL algorithms only characterize the relative degree of each agent’s contribution to the team and cannot express the contribution that the team needs from the agent. Especially in the field of autonomous driving, the team changes over time, and the agent needs to act directly according to the needs of the team. To address these limitations, we propose an innovative method inspired by realistic traffic coordinators called the Traffic Coordinator Network (TraCo). Our approach leverages a combination of cross-attention and counterfactual advantage function, allowing us to extract distinctive characteristics of domain agents and accurately quantify the contribution that a team needs from an agent. Through experiments conducted on four traffic tasks, we demonstrate that our method outperforms existing approaches, yielding superior performance. Furthermore, our approach enables the emergence of rich and diverse social behaviors among vehicles within the traffic flow.

Introduction

In Multi-Agent Reinforcement Learning (MARL), achieving seamless cooperation among independent agents remains a significant challenge, primarily due to the credit assignment problem. When a group of autonomous vehicles successfully navigates a complex scenario, it is difficult to determine the specific contribution of each individual agent to the collective success.

Current MARL algorithms typically attempt to calculate an agent's relative contribution retrospectively. However, in dynamic environments like busy intersections or highway bottlenecks, this approach is often too slow or imprecise. Existing models fail to articulate what the team requires from an agent in real-time. Without top-down guidance, agents often default to selfish behaviors, leading to congestion or collisions. To bridge this gap, we introduce the Traffic Coordinator Network (TraCo), a framework that provides prospective guidance to agents based on global team needs.

The TraCo Framework

The core of our approach is the Traffic Coordinator Network (TraCo), which functions as a virtual centralized authority. It observes the global "in-domain" state and issues "orders" to individual vehicles to optimize collective performance.

The TraCo architecture integrates a virtual coordinator with a counterfactual advantage function to guide agent behavior.

The framework consists of several key components:

  • Virtual Traffic Coordinator: This network processes observations of surrounding traffic to generate order embeddings ($z_i$) for each agent.
  • Cross-Attention Mechanism: To manage the varying number of vehicles in a scene, TraCo employs an attention mechanism that weighs the importance of nearby agents based on proximity and interaction potential.
  • Counterfactual Advantage Function (CAF): Inspired by the COMA algorithm, CAF quantifies the impact of the coordinator's guidance. It calculates the difference between the team's total reward when an agent follows the coordinator's order versus when it acts solely on local observations. This allows the system to precisely measure how much the coordinator's intervention improves the collective outcome.
  • PPO Integration: Agents are trained using Proximal Policy Optimization (PPO), combining their individual advantages with the team-based counterfactual advantage.

Experimental Evaluation

We evaluated TraCo using MetaDrive, a compositional simulator for autonomous driving, across four challenging scenarios:

  1. Bottleneck: Eight lanes merging into one, requiring efficient queuing.
  2. Tollgate: Vehicles must stop for a set duration, testing patience and order.
  3. Parking Lot: High-density area with simultaneous entry and exit.
  4. Intersection: Unprotected negotiation at a crossroad.

TraCo was benchmarked against three strong baselines: Independent PPO (IPPO), Mean-Field PPO (MFPO), and Collaborative PPO (CoPO).

Results and Emergent Behaviors

TraCo consistently outperformed the baselines across all metrics, particularly in high-density scenarios.

Success rates for Tollgate and Intersection tasks show TraCo's superior performance over baseline MARL algorithms.

In the Tollgate task, which features the highest agent density, TraCo achieved nearly double the success rate of the CoPO baseline at certain intervals. Beyond quantitative metrics, TraCo-trained agents exhibited sophisticated emergent social behaviors. Vehicles were observed reversing to allow others to pass, merging gracefully, and maintaining orderly queues—behaviors that were not explicitly programmed but emerged from the drive to maximize team benefit.

Furthermore, TraCo demonstrated superior robustness. When tested with varying numbers of agents (e.g., training with 40 cars but testing with 10 or 50), the attention-based architecture allowed it to adapt to different traffic densities more effectively than its competitors.

Conclusion

TraCo represents a shift from retrospective credit assignment to prospective guidance in MARL. By quantifying what a team needs from an agent in real-time, it fosters higher levels of cooperation and safety in autonomous driving simulations. Future work will focus on bridging the reality gap by incorporating real-world driving data and integrating external traffic infrastructure like signal lights into the coordination framework.

Summary updated

BibTeX
@inproceedings{liu2023traco,
  author = {Weiwei Liu and Wei Jing and Lingping Gao and Ke Guo and Gang Xu and Yong Liu},
  title = {{TraCo: Learning Virtual Traffic Coordinator for Cooperation with Multi-Agent Reinforcement Learning}},
  booktitle = {Conference on Robot Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=Y5Lo1KKVB6},
}
Figure