Driving from Vision through Differentiable Optimal Control

Flavia Sofia Acerbo, Jan Swevers, Tinne Tuytelaars, Tong Duy Son

Abstract

This paper proposes DriViDOC: a framework for Driving from Vision through Differentiable Optimal Control, and its application to learn autonomous driving controllers from human demonstrations. DriViDOC combines the automatic inference of relevant features from camera frames with the properties of nonlinear model predictive control (NMPC), such as constraint satisfaction. Our approach leverages the differentiability of parametric NMPC, allowing for end-to-end learning of the driving model from images to control. The model is trained on an offline dataset comprising various human demonstrations collected on a motion-base driving simulator. During online testing, the model demonstrates successful imitation of different driving styles, and the interpreted NMPC parameters provide insights into the achievement of specific driving behaviors. Our experimental results show that DriViDOC outperforms other methods involving NMPC and neural networks, exhibiting an average improvement of 20% in imitation scores.

Introduction: Bridging the Gap in Autonomous Architectures

Autonomous driving architectures typically diverge into two paradigms: end-to-end neural networks and modular control systems. End-to-end systems excel at learning complex features from raw sensor data but often lack interpretability and formal safety guarantees. Conversely, modular systems utilizing Nonlinear Model Predictive Control (NMPC) offer safety and transparency but are notoriously difficult to tune manually. Setting the weights in an NMPC cost function to mimic human behavior often involves a tedious process of trial and error.

DriViDOC addresses this dichotomy by integrating NMPC as a differentiable layer within a deep learning pipeline. This allows the system to learn optimal control parameters directly from visual data while maintaining the rigorous constraints and interpretability of classical control theory.

The DriViDOC Architecture

The core innovation of DriViDOC is the transformation of the NMPC solver into a differentiable component. The architecture consists of three primary stages:

  1. Visual Encoder: A Convolutional Neural Network (CNN) processes a sequence of camera frames to extract latent features ($\chi_t$).
  2. Parameter Predictor: Fully connected (FC) layers map these features to a vector of NMPC parameters ($p_t$), representing the "goals" and "priorities" of the controller.
  3. Differentiable NMPC Layer: The solver computes the control action ($a_t$) by optimizing a cost function defined by $p_t$, subject to vehicle dynamics and safety constraints.
Figure 1: The DriViDOC framework architecture, illustrating the end-to-end learning loop from camera frames to vehicle dynamics via a differentiable NMPC layer.

To enable backpropagation through the optimization process, the authors apply the Implicit Function Theorem to the Karush-Kuhn-Tucker (KKT) conditions of the optimization problem. This allows gradients to flow from the final control action all the way back to the CNN's pixels. Unlike previous works using simpler solvers, this framework utilizes IPOPT to handle complex nonlinear constraints robustly.

Experimental Setup and Data Collection

The framework was validated using a high-fidelity dataset collected on a 6-degree-of-freedom motion-base simulator. Eleven human participants performed multiple laps on a track with various curves. The resulting dataset comprises over 113,000 samples, including RGB images, vehicle states, and human control actions (steering and throttle). This setup provided a rich ground truth for behavioral cloning, capturing diverse driving styles in a controlled environment.

Key Results and Style Mimicry

DriViDOC demonstrated a significant performance advantage over standard NMPC and neural network baselines, achieving an average improvement of 20% in imitation scores. Beyond simple path following, the model successfully captured the nuances of individual driving styles.

Figure 4: (a) Longitudinal speed distributions for different learned models, showing distinct driving styles. (b) Global trajectories demonstrating the model's ability to replicate human-like lane positioning and cornering behavior.

Key insights from the experimental results include:

  • Dynamic Parameterization: The CNN learns to adjust NMPC weights contextually. For example, it might prioritize lane centering during sharp turns while allowing more natural drift on straightaways.
  • Interpretability via Weights: Because the network predicts NMPC parameters, the "brain" of the AI becomes observable. If the car misbehaves, developers can determine if the network assigned a low weight to a safety constraint or misjudged the required speed.
  • Robustness to Covariate Shift: Pure behavioral cloning often fails when a vehicle drifts into states not seen during training. Because DriViDOC uses NMPC, it inherently "knows" how to plan a feasible path back to the center even in unfamiliar states.

Conclusion

DriViDOC represents a significant step in combining the representational power of deep learning with the reliability of optimal control. While currently tested in simulated environments, the framework's ability to maintain safety constraints while imitating complex human behaviors provides a promising path toward more interpretable and robust autonomous driving systems. Future work will focus on bridging the sim-to-real gap and incorporating more complex traffic scenarios.

Summary updated

BibTeX
@inproceedings{acerbo2024driving,
  author = {Flavia Sofia Acerbo and Jan Swevers and Tinne Tuytelaars and Tong Duy Son},
  title = {{Driving from Vision through Differentiable Optimal Control}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2024},
  doi = {10.1109/iros58592.2024.10802306},
}
Figure