From Self-Play RL to Constrained Control: Distilling DiffMPC Students with DAgger
Organizations: University of California San Diego
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.
Figures & tables
| CARLA | nuPlan | Waymo (OOD) | |||||
|---|---|---|---|---|---|---|---|
| Size | Policy | Goals | Failures | Goals | Failures | Goals | Failures |
| 4x512 | Teacher | 1.67 | .245 | 0.77 | .181 | 0.40 | .298 |
| MLP | 1.66 | .226 .004 | 0.80 | .205 .006 | 0.36 | .299 .007 | |
| Unconstr. DiffMPC | 1.68 | .224 .003 | 0.82 | .220 .005 | 0.35 | .280 .008 | |
| Constr. DiffMPC | 1.68 | .180 .003 | 0.81 | .180 .006 | 0.38 | .261 .008 | |
| 4x1024 | Teacher | 3.95 | .052 | 1.05 | .039 | 0.59 | .059 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Stage | Change | Steps (4x512 / 4x1024) |
|---|---|---|
| Pretrain | from scratch, short episodes, collision 2, comfort 0 | 300M / 300M |
| Comfort | comfort auto | 200M / 200M |
| Collision | collision 2 4 | 200M / 200M |
| Long episodes | episode length 128 1280 | 200M / 1.6B |
| Mixed fine-tune | 3 CARLA + 7 nuPlan workers | 200M / 5.6B |
| Total | 1.1B / 7.9B |
| Optimizer | AdamW, learning rate with annealing |
|---|---|
| Discount , GAE | 0.999, 0.95 |
| Clip coefficient | 0.2 |
| Entropy coefficient | 0.01 |
| Value function coefficient | 0.5 |
| Gradient norm clip | 0.5 |
| Minibatch size | 65,536 |
| Size | Student | Labels/s | Min/10M | Val. (min) | Cost/label | Full run |
|---|---|---|---|---|---|---|
| 4x512 | MLP | 63,650 | 2.6 | 0.9 | 1.0 | 15–22 min |
| Unconstr. DiffMPC | 11,330 | 14.7 | 7.2 | 5.6 | 2.0 h | |
| Constr. DiffMPC | 6,630 | 25.1 | 13.1 | 9.6 | 2.8–4.7 h | |
| 4x1024 | MLP | 57,200 | 2.9 | 1.0 | 1.0 | 13–17 min |
| Unconstr. DiffMPC | 11,900 | 14.0 | 7.4 | 4.8 | 1.9–3.0 h | |
| Constr. DiffMPC | 7,180 | 23.2 | 13.2 | 8.0 | 2.0–3.3 h |
| 4x1024 | 10M | 20M | 30M | 40M | 50M | 60M | 70M | 80M |
|---|---|---|---|---|---|---|---|---|
| Constr. DiffMPC s1 | .049 | .053 | .056 | .066 | .060 | |||
| Constr. DiffMPC s2 | .055 | .061 | .056 | |||||
| Constr. DiffMPC s3 | .056 | .062 | .061 | .057 | ||||
| Unconstr. DiffMPC s1 | .047 | .048 | .045 | .052 | .041 | .046 | .050 | |
| Unconstr. DiffMPC s2 | .051 | .065 | .061 | .050 | .051 | .049 | .056 | .055 |
| Unconstr. DiffMPC s3 | .055 | .060 | .055 | .063 | .205 |
| 4x512 | 10M | 20M | 30M | 40M | 50M | 60M | 70M |
|---|---|---|---|---|---|---|---|
| Constr. DiffMPC s1 | .199 | .184 | .205 | .202 | |||
| Constr. DiffMPC s2 | .206 | .224 | .202 | .224 | .179 | .194 | .210 |
| Constr. DiffMPC s3 | .192 | .173 | .199 | .197 | .177 | ||
| Unconstr. DiffMPC s1 | .236 | .243 | .222 | .246 | .242 | ||
| Unconstr. DiffMPC s2 | .257 | .217 | .217 | .250 | .238 | ||
| Unconstr. DiffMPC s3 | .251 | .249 | .228 | .241 | .241 |
| Student | Collision + off-road |
|---|---|
| Unconstrained DiffMPC | 0.045 |
| + road boundary constraints at evaluation only | 0.135 |
| + road boundary constraints and agent ellipses at evaluation only | 0.307 |
| Trained with constraints, sigmoid weights | 0.110 |
| Trained with constraints, capped sigmoid weights | 0.326 |
| Trained with constraints, fixed-sum weights | 0.158 |