Revisiting Implicit Differentiation for Learning Problems in Optimal Control
Ming Xu, Timothy L. Molloy, Stephen Gould
Abstract
This paper proposes a new method for differentiating through optimal trajectories arising from non-convex, constrained discrete-time optimal control (COC) problems using the implicit function theorem (IFT). Previous works solve a differential Karush-Kuhn-Tucker (KKT) system for the trajectory derivative, and achieve this efficiently by solving an auxiliary Linear Quadratic Regulator (LQR) problem. In contrast, we directly evaluate the matrix equations which arise from applying variable elimination on the Lagrange multiplier terms in the (differential) KKT system. By appropriately accounting for the structure of the terms within the resulting equations, we show that the trajectory derivatives scale linearly with the number of timesteps. Furthermore, our approach allows for easy parallelization, significantly improved scalability with model size, direct computation of vector-Jacobian products and improved numerical stability compared to prior works. As an additional contribution, we unify prior works, addressing claims that computing trajectory derivatives using IFT scales quadratically with the number of timesteps. We evaluate our method on a both synthetic benchmark and four challenging, learning from demonstration benchmarks including a 6-DoF maneuvering quadrotor and 6-DoF rocket powered landing. 37th Conference on Neural Information Processing Systems (NeurIPS 2023).
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers6
- Accelerating Optimization via Differentiable Stopping TimeZhonglin Xie, Yiman Fong, Haoran Yuan, Zaiwen WenNeurIPS 2025 · 1 citation
- DiffOP: Reinforcement Learning of Optimization-Based Control Policies via Implicit Policy GradientsYuexin Bian, Jie Feng, Yuanyuan ShiAAAI 2026 · 1 citation
- DiLQR: Differentiable Iterative Linear Quadratic Regulator via Implicit DifferentiationShuyuan Wang, Philip D. Loewen, Michael G. Forbes, R. Bhushan Gopaluni et al.ICML 2025
- DiffTORI: Differentiable Trajectory Optimization for Deep Reinforcement and Imitation LearningWeikang Wan, Ziyu Wang, Yufei Wang, Zackory Erickson et al.NeurIPS 2024
- BADControl: Backdoor Attacks Against Control SystemsLuis Burbano, Hampei Sasahara, Ruoyu Song, Z. Berkay Celik et al.USENIX Security 2026
Builds on7
- Differentiation of Blackbox Combinatorial SolversMarin Vlastelica Pogancic, Anselm Paulus, Vít Musil, Georg Martius et al.ICLR 2020 · 341 citations
- Fast Differentiable Sorting and RankingMathieu Blondel, Olivier Teboul, Quentin Berthet, Josip DjolongaICML 2020 · 285 citations
- Pontryagin Differentiable Programming: An End-to-End Learning and Control FrameworkWanxin Jin, Zhaoran Wang, Zhuoran Yang, Shaoshuai MouNeurIPS 2020 · 133 citations
- Theseus: A Library for Differentiable Nonlinear OptimizationLuis Pineda, Taosha Fan, Maurizio Monge, Shobha Venkataraman et al.NeurIPS 2022 · 124 citations
- Safe Pontryagin Differentiable ProgrammingWanxin Jin, Shaoshuai Mou, George J. PappasNeurIPS 2021 · 65 citations
Related papers
- Alternating Differentiation for Optimization LayersHaixiang Sun, Ye Shi, Jingya Wang, Hoang Duong Tuan et al.ICLR 2023 · 3 citations
- Infinite-Horizon Differentiable Model Predictive ControlSebastian East, Marco Gallieri, Jonathan Masci, Jan Koutník et al.ICLR 2020 · 39 citations
- A Penalty Approach For Differentiation Through Black-box Quadratic Programming SolversYuxuan Linghu, Zhiyuan Liu, Qi DengICML 2026 · 1 citation
- Zeroth-Order Optimization with Trajectory-Informed Derivative EstimationYao Shu, Zhongxiang Dai, Weicong Sng, Arun Verma et al.ICLR 2023
- Learning Differential Equations that are Easy to SolveJacob Kelly, Jesse Bettencourt, Matthew J. Johnson, David DuvenaudNeurIPS 2020 · 134 citations
