From Self-Play RL to Constrained Control: Distilling DiffMPC Students with DAgger

Luca M. Hartmann, Parinaz NaghizadeharXiv 2026

TL;DR

This paper introduces a pipeline to add verifiable safety constraints to high-performance "black-box" driving policies. By replacing the action head of a pre-trained reinforcement learning (RL) teacher with a Differentiable Model Predictive Control (DiffMPC) layer and distilling the behavior via DAgger, the authors create "constrained students" that match or exceed their teachers' performance while significantly improving safety and generalization in out-of-distribution scenarios.

What Problem Does This Paper Address?

Deep reinforcement learning has produced autonomous driving policies that can reach superhuman performance in simulation. However, these end-to-end neural networks are notoriously difficult to verify, interpret, or constrain. If a policy decides to drive off-road, it’s hard to pinpoint why or prevent it without retraining the entire system.

Conversely, Model Predictive Control (MPC) offers explicit, checkable constraints (like "don't cross this line"), but manually tuning MPC cost functions to match the nuanced behavior of a learned policy is a Herculean task. Differentiable MPC (DiffMPC) allows us to learn these parameters, but training DiffMPC from scratch using RL is computationally prohibitive.

The authors bridge this gap by treating DiffMPC as a post-training step: they take a strong, already-trained RL policy and "distill" its wisdom into a constrained MPC framework.

Methods

The authors propose a three-step pipeline:

  1. Teacher Training: A neural driving policy is trained using Proximal Policy Optimization (PPO) in a self-play simulator (PufferDrive).
  2. Architecture Transfer: The teacher's "backbone" (the encoder that processes observations) is frozen and transferred to a student. The teacher's original discrete action head is replaced with an MPC adapter and a DiffMPC layer.
  3. DAgger Distillation: The student is fine-tuned using DAgger (Dataset Aggregation). The student drives in the simulator, but its actions are supervised by the teacher's labels.
Figure 1: Overview of our pipeline, including the backbone transfer and DAgger distillation.

Key Technical Innovations:

  • Constraint Formulation: The DiffMPC enforces road boundary half-planes and agent ellipses (to avoid collisions).
  • Fixed-Sum Weights: To ensure the MPC solver respects constraints, the authors use a normalized cost function where weights sum to one, preventing the network from simply "ignoring" constraints by scaling up other costs.
  • Node Weights ($\kappa_k$): They introduce learnable weights for each timestep in the MPC horizon, allowing the network to prioritize different parts of its future path.
  • WarpMPC: To make training feasible, they utilize WarpMPC, a high-performance GPU-based solver that allows for fast forward and backward passes through the MPC optimization.
The geometric formulation of road boundary constraints as half-planes.

Datasets

  • Training/Validation: Conducted in the PufferDrive simulator using maps and scenarios from CARLA and nuPlan.
  • Out-of-Distribution (OOD) Testing: The policies were evaluated on the Waymo Open Dataset (WOD). This is a critical test, as neither the teacher nor the student saw Waymo data during training.

Key Insights and Ideas

  • Constraints as Redundancy: The explicit constraints (road boundaries, ellipses) act as a safety net. Even if the neural backbone encounters a scene it doesn't recognize, the MPC layer provides a "physical" boundary that the agent cannot easily cross.
  • Distillation is Efficient: Rather than the billions of steps required for RL, distillation reaches peak performance in just 10M to 60M labels. For large models, this adds only about 30% to the total training time.
  • The "Aha" Moment on OOD: The constrained student significantly outperformed the teacher on the Waymo dataset. This suggests that while neural policies struggle to generalize to new sensor distributions or map styles, the geometric constraints of road boundaries are universal and provide robust generalization.

Key Results

The authors compared three student types against the original PPO teacher: a standard MLP student, an unconstrained DiffMPC student, and their main contribution, the constrained DiffMPC student.

Comparison of the different policy architectures used in the experiments.
  • Performance Match: On the nuPlan benchmark, the constrained student matched the teacher's goal-reaching performance while maintaining lower failure rates.
  • OOD Safety: On the Waymo (OOD) test set, the constrained students left the road 16–26% less often than their teachers.
  • Interpretability: Failures in the student model can be traced back to specific constraints or cost weights, unlike the opaque failures of the teacher.
  • Expressiveness: The unconstrained DiffMPC student performed similarly to the MLP student, proving that the MPC head is expressive enough to capture complex driving behaviors.

Limitations and Future Work

  • Ground-Truth Dependency: The current implementation relies on ground-truth map data for constraints. In real-world deployment, these would need to come from a (potentially noisy) perception system.
  • Computational Overhead: While WarpMPC is fast, an MPC forward pass is still more expensive than a simple MLP pass.
  • Future Directions: The authors suggest exploring more complex constraints and applying this distillation pipeline to other robotics domains beyond autonomous driving, such as drone racing or industrial manipulation.

Summary updated

Abstract

Self-play reinforcement learning (RL) produces strong driving policies, but these policies are hard to verify or interpret. Differentiable model predictive control (DiffMPC) can enforce explicit constraints, but it is usually trained by imitating logged data or with costly RL. To add constraints to an already trained policy, we keep a PPO teacher's backbone and replace its action head with a DiffMPC that enforces road boundary half-planes and agent ellipses. We then distill the student with DAgger in the teacher's self-play simulator. Over 9 seeds, the constrained student of a smaller teacher matches its teacher on nuPlan and beats it on CARLA and on out-of-distribution Waymo scenes. For a stronger teacher, the student has fewer failures on nuPlan and Waymo, while staying level on CARLA. Its distillation takes no more than 30% of the teacher's training time.
BibTeX
@misc{hartmann2026from,
  author = {Luca M. Hartmann and Parinaz Naghizadeh},
  title = {{From Self-Play RL to Constrained Control: Distilling DiffMPC Students with DAgger}},
  year = {2026},
  eprint = {2611.25197},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.25197},
}
Figure