MPC-based Imitation Learning for Safe and Human-like Autonomous Driving

Flavia Sofia Acerbo, Jan Swevers, Tinne Tuytelaars, Tong Duy SonarXiv 2022 · DOI

Introduction

Autonomous vehicles (AVs) face a fundamental tension between safety and natural behavior. While Imitation Learning (IL) enables vehicles to adopt smooth, human-like driving styles from demonstrations, these "black-box" models often lack formal safety guarantees. Conversely, Model Predictive Control (MPC) provides a robust mathematical framework for satisfying hard constraints, such as staying within lane boundaries, but often results in robotic or overly cautious behavior due to hand-tuned cost functions.

Presented at ICML 2022, this research introduces MPC-IL, a hybrid framework that integrates MPC as a differentiable layer within a deep learning architecture. By backpropagating through the MPC optimization process, the system learns to mimic human driving objectives while maintaining the safety guardrails inherent to control theory.

Methodology: Differentiable MPC-BCO

The core of the proposed framework is MPC-BCO (Behavioral Cloning from Observations). Unlike traditional approaches where a neural network might predict control inputs directly, MPC-BCO treats the entire MPC solver as a single, differentiable layer.

Hierarchical Architecture

The system employs a hierarchical decomposition consisting of two main components:

  1. Indirect Controller: A deep neural network that processes environmental context (e.g., road curvature) to output parameters $\theta$ for the MPC cost function.
  2. Direct Controller (MPC): An MPC solver that computes the optimal control action $a_t$ by minimizing a cost function $L(\theta)$ subject to physical and safety constraints.
The MPC-IL architecture featuring an indirect neural network controller and a direct MPC controller.

End-to-End Learning

To enable learning, the authors derived gradients through the MPC solver using the Karush-Kuhn-Tucker (KKT) conditions and the Implicit Function Theorem. This allows the "indirect" neural network to learn exactly which cost function weights or goal states result in trajectories that match human demonstrations. Furthermore, the framework utilizes Backpropagation Through Time (BPTT) in a simulator, allowing the model to account for how current actions influence future states, thereby mitigating the covariate shift problem common in behavioral cloning.

Experimental Evaluation

The researchers evaluated MPC-BCO using human driving data collected in high-fidelity simulators (Simcenter Prescan and Amesim) across two scenarios:

  • D1 Dataset: A narrow lane-keeping task (4.5m lane).
  • D2 Dataset: A wider track (8m lane) where the driver demonstrated a "corner-cutting" style by staying on the inner radius of curves.

Key Results

The performance of MPC-BCO was compared against a standard Behavioral Cloning from Observations (BCO) baseline and human performance.

Comparison of performance metrics between standard BCO, the proposed MPC-BCO, and human drivers.

Safety and Constraint Satisfaction

A critical advantage of the MPC-IL approach is its inherent safety. Because the MPC layer enforces hard constraints, MPC-BCO achieved zero lane violations. In contrast, the pure BCO baseline, which lacks these mathematical guardrails, violated constraints 90 times during the evaluation.

Imitation Accuracy and Comfort

MPC-BCO significantly outperformed the baseline in mimicking human behavior. The mean L2 state error was reduced from 3.06m (BCO) to 0.58m (MPC-BCO). Furthermore, the system captured the "feel" of human driving; the lateral acceleration profile—a proxy for passenger comfort—was much closer to the human driver (59.49) than the jerky movements produced by the standard BCO (758.10).

Discussion and Future Work

By learning the "why" (objectives) rather than just the "what" (actions), MPC-IL offers greater interpretability than standard end-to-end neural networks. However, the authors identify several challenges for future research:

  • Computational Overhead: Solving MPC and its gradients during training is computationally intensive, currently limited by data transfer bottlenecks between GPU and CPU.
  • Scenario Complexity: Future iterations will expand from single-car lane-keeping to multi-agent environments involving traffic and intersections.
  • Perception Integration: The current model relies on low-level state inputs; the authors plan to extend this to "pixels-to-control" architectures using raw sensor data.

In conclusion, MPC-IL represents a significant step toward autonomous systems that are both demonstrably safe and naturally intuitive, bridging the gap between classical control and modern machine learning.

Summary updated

BibTeX
@misc{acerbo2022mpc,
  author = {Flavia Sofia Acerbo and Jan Swevers and Tinne Tuytelaars and Tong Duy Son},
  title = {{MPC-based Imitation Learning for Safe and Human-like Autonomous Driving}},
  year = {2022},
  eprint = {2206.12348},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.12348},
}
Figure