End-to-End Training of High-Dimensional Optimal Control with Implicit Hamiltonians via Jacobian-Free Backpropagation

Eric Gelphman, Deepanshu Verma, Nicole Tianjiao Yang, Stanley J. Osher, Samy Wu Fung

Introduction

Optimal control aims to find a feedback law that minimizes a cost function for a given system. Traditionally, this relies on the Value Function, where the optimal control is derived by maximizing the Hamiltonian. However, for many complex systems—such as drones or non-linear steering mechanisms—this maximization lacks a closed-form solution, creating a computational bottleneck. Existing methods often require solving expensive linear systems ($O(m^3)$ complexity) or backpropagating through iterative solvers, which is both slow and memory-intensive.

This paper introduces a novel framework for training high-dimensional optimal controllers using Implicit Neural Networks (INN) combined with Jacobian-Free Backpropagation (JFB). This approach enables efficient, end-to-end training that scales quadratically ($O(m^2)$) with control dimensions, significantly outperforming standard automatic differentiation (AD) in speed and memory efficiency.

Methodology

The proposed framework consists of three primary components:

  1. Value Function Parameterization: A neural network approximates the value function $\phi$, ensuring the learned behavior adheres to Pontryagin’s Maximum Principle.
  2. Implicit Control Layer: The optimal control $u^*$ is defined as the fixed point of an operator based on the Hamiltonian's optimality condition, treating the controller as an INN.
  3. Jacobian-Free Backpropagation (JFB): To differentiate through the implicit layer, JFB replaces the standard Jacobian inverse with an identity matrix. The authors provide a theoretical proof that this approximation still yields valid descent directions, reducing complexity from cubic to quadratic.

A key theoretical contribution is extending JFB to time-integral problems (trajectories), where temporal coupling exists between steps. Furthermore, JFB offers constant memory usage because it does not need to store intermediate states of the fixed-point solver during backpropagation.

Experimental Evaluation

The method was evaluated on simulated physical systems:

  • Quadrotor with Exponential Cost: A drone model with a non-quadratic cost function, resulting in an implicit Hamiltonian.
  • Multi-Bicycle Dynamics: A high-dimensional tracking problem involving up to 20 bicycles (80-dimensional state, 40-dimensional control), characterized by non-convex dynamics.

Key Results

The experiments demonstrate significant advantages for JFB across multiple metrics:

  • Scalability and Memory Efficiency: In high-dimensional tasks like the 20-bicycle experiment, standard AD failed due to memory limits, whereas JFB maintained constant memory usage.
  • Computational Efficiency: JFB achieved convergence using several orders of magnitude fewer "work units" (computational steps) compared to standard AD, as shown in the multi-bicycle tracking task.
Loss vs. Work Units for the multi-bicycle experiment, illustrating that JFB (blue) achieves convergence with significantly fewer computational steps than standard AD (red).
  • Training Speed: For the quadrotor task, JFB reached target loss values much faster than CVXPYLayers, which was slowed down by the need to solve linear systems at each step.
Performance summary for the Quadrotor experiment. JFB (blue) outperforms AD (red) and CVXPYLayers (green) in training time and computational work units while maintaining a significantly lower memory footprint.

Conclusion

By circumventing the need for closed-form Hamiltonian solutions and utilizing Jacobian-Free Backpropagation, this work provides a scalable path for high-dimensional optimal control. While the method currently relies on contraction requirements for the fixed-point operator, future work may extend these techniques to stochastic optimal control, mean-field games, and real-world hardware testing.

Summary updated

Abstract

Neural network approaches that parameterize value functions have succeeded in approximating high-dimensional optimal feedback controllers when the Hamiltonian admits explicit formulas. However, many practical problems, such as the space shuttle reentry problem and bicycle dynamics, among others, may involve implicit Hamiltonians that do not admit explicit formulas, limiting the applicability of existing methods. Rather than directly parameterizing controls, which does not leverage the Hamiltonian's underlying structure, we propose an end-to-end implicit deep learning approach that directly parameterizes the value function to learn optimal control laws. Our method enforces physical principles by ensuring trained networks adhere to the control laws by exploiting the fundamental relationship between the optimal control and the value function's gradient; this is a direct consequence of the connection between Pontryagin's Maximum Principle and dynamic programming. Using Jacobian-Free Backpropagation (JFB), we achieve efficient training despite temporal coupling in trajectory optimization. We show that JFB produces descent directions for the optimal control objective and experimentally demonstrate that our approach effectively learns high-dimensional feedback controllers across multiple scenarios involving implicit Hamiltonians, which existing methods cannot address.
BibTeX
@misc{gelphman2025end,
  author = {Eric Gelphman and Deepanshu Verma and Nicole Tianjiao Yang and Stanley J. Osher and Samy Wu Fung},
  title = {{End-to-End Training of High-Dimensional Optimal Control with Implicit Hamiltonians via Jacobian-Free Backpropagation}},
  year = {2025},
  eprint = {2510.00359},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.00359},
}

Loading related content...

Figure