MPCFormer: A physics-informed data-driven approach for explainable socially-aware autonomous driving

Jia Hu, Zhexi Lian, Xuerun Yan, R. Bi, Dou Shen, Youci Ruan, Haoran WangarXiv 2025 · DOI · arXiv

TL;DR

MPCFormer is a novel autonomous driving (AD) framework that combines the interpretability of physics-informed state-space models with the predictive power of Transformers. By explicitly modeling multi-vehicle social interactions as learnable dynamics within a Model Predictive Control (MPC) planner, it enables self-driving cars to execute complex, human-like maneuvers—such as aggressive off-ramp lane changes—with significantly higher success rates and lower collision risks than traditional reinforcement learning or rule-based methods.

What Problem Does This Paper Address?

Current autonomous vehicles often struggle in "social" scenarios, such as merging into heavy traffic or navigating unprotected left turns. The authors identify a trilemma in existing approaches:

  1. Passively Socially-aware (PAS): These systems predict others' paths and then react. This often leads to overly cautious "frozen" behavior because the planner assumes other vehicles won't adapt to the ego vehicle's presence.
  2. Neutrally Socially-aware (NS): These use black-box neural networks to map environment states to actions. While flexible, they lack physical constraints (leading to jerky motions) and are notoriously difficult to explain.
  3. Proactively Socially-aware (PRS): These try to influence others but often rely on rigid, hand-crafted hypotheses about how humans drive, which fail when real-world behavior deviates from the model.

MPCFormer seeks to bridge these gaps by creating a model that is proactive, physically grounded, and explainable.

Methods

The core of MPCFormer is a physics-informed, data-driven coupled dynamics model.

  • State-Space Representation: Instead of just predicting coordinates, the model formulates the future state of the entire traffic scene using a discrete state-space equation. This equation splits the world into two parts:
  • Physics-informed components: Fixed kinematic bicycle models that handle the basic "laws of motion" for each vehicle.
  • Data-driven components: Learnable "social interaction matrices" that capture how one vehicle’s actions influence another’s (e.g., how my acceleration might cause the car behind me to brake).
  • Transformer-based Encoder-Decoder: The system uses a socially-aware Transformer to learn these interaction matrices from naturalistic driving data. It processes trajectories and local maps to output the coefficients for the state-space model.
  • Leader-Follower Game: The MPC planner treats the ego vehicle as the "leader" and surrounding vehicles as "followers." It optimizes the ego vehicle's path by anticipating how followers will react to its maneuvers, effectively "negotiating" for space in traffic.
  • Safety Constraints: It incorporates "Big-M" method collision avoidance and physical limits (speed, acceleration) as hard constraints within the MPC optimization.

Datasets

  • NGSIM (Next Generation Simulation): Specifically, the US Highway 101 dataset. This contains real-world vehicle trajectories used to train the Transformer and evaluate open-loop prediction accuracy.
  • Vissim: A high-fidelity traffic simulation tool used for closed-loop testing. The authors calibrated Vissim to match NGSIM statistics to ensure the simulation reflected realistic human driving behaviors.

Key Insights and Ideas

  • Explicit Interaction Modeling: Unlike standard predictors that output a "heat map" or a single trajectory, MPCFormer outputs the relationship between vehicles. This allows the planner to ask "what-if" questions: "If I speed up now, how much will the car in the next lane slow down?"
  • Explainability via Frobenius Norms: The authors use the Frobenius norm of the learned interaction matrices to quantify "interaction strength." They found, for instance, that the ego vehicle exerts the most significant influence on the vehicle directly in front (Front Vehicle), while having minimal impact on those far behind—validating that the neural network learned common-sense driving physics.
  • Coupled Prediction and Planning: By embedding the social dynamics directly into the MPC constraints, trajectory prediction and motion planning happen simultaneously. The future states of surrounding vehicles are solved as part of the ego vehicle's optimization problem.

Key Results

The authors compared MPCFormer against several state-of-the-art (SOTA) baselines, including S-GAN, STGAT, and Reinforcement Learning (RL) planners.

  • Superior Prediction: In open-loop tests on the NGSIM dataset, MPCFormer achieved an Average Displacement Error (ADE) of 0.86m over a 5-second horizon, outperforming all other models.
  • High Success in Dense Traffic: In a challenging off-ramp scenario requiring three consecutive lane changes, MPCFormer achieved a 94.67% success rate.
  • Safety and Efficiency: Compared to a frontier RL-based planner, MPCFormer reduced the collision rate from 21.25% to just 0.5% while improving driving efficiency (average speed) by 15.75%.
  • Human-like Flexibility: Speed distribution analysis showed that MPCFormer adjusts its speed more uniformly and flexibly than rule-based systems, which tend to stick to rigid target speeds.

Limitations and Future Work

While MPCFormer shows impressive results, a few areas remain for exploration:

  • Computational Complexity: Solving a leader-follower game within an MPC framework at high frequencies can be computationally expensive, especially as the number of surrounding vehicles increases.
  • Multi-Modal Reactions: While the model uses a Gaussian Mixture Model (GMM) to handle different possible reactions from other drivers, the current implementation selects the "most likely" modality. Real-world safety might require accounting for multiple high-probability "worst-case" reactions simultaneously.
  • Generalization: The model was tested primarily on highway data. Its performance in complex urban environments with pedestrians, cyclists, and traffic lights remains to be seen.

Summary updated

Abstract

Autonomous Driving (AD) vehicles still struggle to exhibit human-like behavior in highly dynamic and interactive traffic scenarios. The key challenge lies in AD's limited ability to interact with surrounding vehicles, largely due to a lack of understanding the underlying mechanisms of social interaction. To address this issue, we introduce MPCFormer, an explainable socially-aware autonomous driving approach with physics-informed and data-driven coupled social interaction dynamics. In this model, the dynamics are formulated into a discrete space-state representation, which embeds physics priors to enhance modeling explainability. The dynamics coefficients are learned from naturalistic driving data via a Transformer-based encoder-decoder architecture. To the best of our knowledge, MPCFormer is the first approach to explicitly model the dynamics of multi-vehicle social interactions. The learned social interaction dynamics enable the planner to generate manifold, human-like behaviors when interacting with surrounding traffic. By leveraging the MPC framework, the approach mitigates the potential safety risks typically associated with purely learning-based methods. Open-looped evaluation on NGSIM dataset demonstrates that MPCFormer achieves superior social interaction awareness, yielding the lowest trajectory prediction errors compared with other state-of-the-art approach. The prediction achieves an ADE as low as 0.86 m over a long prediction horizon of 5 seconds. Close-looped experiments in highly intense interaction scenarios, where consecutive lane changes are required to exit an off-ramp, further validate the effectiveness of MPCFormer. Results show that MPCFormer achieves the highest planning success rate of 94.67%, improves driving efficiency by 15.75%, and reduces the collision rate from 21.25% to 0.5%, outperforming a frontier Reinforcement Learning (RL) based planner.
BibTeX
@misc{hu2025mpcformer,
  author = {Jia Hu and Zhexi Lian and Xuerun Yan and R. Bi and Dou Shen and Youci Ruan and Haoran Wang},
  title = {{MPCFormer: A physics-informed data-driven approach for explainable socially-aware autonomous driving}},
  year = {2025},
  eprint = {2512.03795},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.03795},
  howpublished = {arXiv},
}
Figure