Alternating Differentiation for Optimization Layers
Haixiang Sun, Ye Shi, Jingya Wang, Hoang Duong Tuan, H. Vincent Poor, Dacheng Tao
Abstract
The idea of embedding optimization problems into deep neural networks as optimization layers to encode constraints and inductive priors has taken hold in recent years. Most existing methods focus on implicitly differentiating Karush-Kuhn-Tucker (KKT) conditions in a way that requires expensive computations on the Jacobian matrix, which can be slow and memory-intensive. In this paper, we developed a new framework, named Alternating Differentiation (Alt-Diff), that differentiates optimization problems (here, specifically in the form of convex optimization problems with polyhedral constraints) in a fast and recursive way. Alt-Diff decouples the differentiation procedure into a primal update and a dual update in an alternating way. Accordingly, Alt-Diff substantially decreases the dimensions of the Jacobian matrix especially for optimization with large-scale constraints and thus increases the computational speed of implicit differentiation. We show that the gradients obtained by Alt-Diff are consistent with those obtained by differentiating KKT conditions. In addition, we propose to truncate Alt-Diff to further accelerate the computational speed. Under some standard assumptions, we show that the truncation error of gradients is upper bounded by the same order of variables' estimation error. Therefore, Alt-Diff can be truncated to further increase computational speed without sacrificing much accuracy. A series of comprehensive experiments validate the superiority of Alt-Diff.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
15 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Differentiation Through Black-Box Quadratic Programming Solvers cites Multiscale Deep Equilibrium Models
- Differentiation Through Black-Box Quadratic Programming Solvers cites Efficient and Modular Implicit Differentiation
- Differentiation Through Black-Box Quadratic Programming Solvers cites Reduced Policy Optimization for Continuous Control with Hard Constraints
- Differentiation Through Black-Box Quadratic Programming Solvers cites BPQP: A Differentiable Convex Optimization Framework for Efficient End-to-End Learning
- End-to-End Probabilistic Framework for Learning with Hard Constraints cites Efficient and Modular Implicit Differentiation
- BPQP: A Differentiable Convex Optimization Framework for Efficient End-to-End Learning cites Efficient and Modular Implicit Differentiation
- BPQP: A Differentiable Convex Optimization Framework for Efficient End-to-End Learning cites Smart Predict-and-Optimize for Hard Combinatorial Optimization Problems
Cited by top-tier papers15
- BPQP: A Differentiable Convex Optimization Framework for Efficient End-to-End LearningJianming Pan, Zeqi Ye, Xiao Yang, Xu Yang et al.NeurIPS 2024 · 18 citations
- IKOL: Inverse Kinematics Optimization Layer for 3D Human Pose and Shape Estimation via Gauss-Newton DifferentiationJuze Zhang, Ye Shi, Yuexin Ma, Lan Xu et al.AAAI 2023 · 18 citations
- Differentiation Through Black-Box Quadratic Programming SolversConnor W. Magoon, Fengyu Yang, Noam Aigerman, Shahar Z. KovalskyNeurIPS 2025 · 14 citations
- End-to-End Probabilistic Framework for Learning with Hard ConstraintsUtkarsh Utkarsh, Danielle C. Maddix, Ruijun Ma, Michael W. Mahoney et al.ICLR 2026 · 13 citations
- Reduced Policy Optimization for Continuous Control with Hard ConstraintsShutong Ding, Jingya Wang, Yali Du, Ye ShiNeurIPS 2023 · 10 citations
Builds on11
- Efficient and Modular Implicit DifferentiationMathieu Blondel, Quentin Berthet, Marco Cuturi, Roy Frostig et al.NeurIPS 2022 · 386 citations
- Multiscale Deep Equilibrium ModelsShaojie Bai, Vladlen Koltun, J. Zico KolterNeurIPS 2020 · 272 citations
- Implicit Graph Neural NetworksFangda Gu, Heng Chang, Wenwu Zhu, Somayeh Sojoudi et al.NeurIPS 2020 · 188 citations
- Smart Predict-and-Optimize for Hard Combinatorial Optimization ProblemsJayanta Mandi, Emir Demirovic, Peter J. Stuckey, Tias GunsAAAI 2020 · 184 citations
- Is Attention Better Than Matrix Decomposition?Zhengyang Geng, Meng-Hao Guo, Hongxu Chen, Xia Li et al.ICLR 2021 · 171 citations
Related papers
- Nonsmooth Implicit Differentiation for Machine-Learning and OptimizationJérôme Bolte, Tam Le, Edouard Pauwels, Antonio Silveti-FallsNeurIPS 2021 · 85 citations
- Revisiting Implicit Differentiation for Learning Problems in Optimal ControlMing Xu, Timothy L. Molloy, Stephen GouldNeurIPS 2023 · 16 citations
- Efficient Riemannian Meta-Optimization by Implicit DifferentiationXiaomeng Fan, Yuwei Wu, Zhi Gao, Yunde Jia et al.AAAI 2022 · 3 citations
- Efficient Differentiable Simulation of Articulated BodiesYi-Ling Qiao, Junbang Liang, Vladlen Koltun, Ming C. LinICML 2021 · 68 citations
- A Penalty Approach For Differentiation Through Black-box Quadratic Programming SolversYuxuan Linghu, Zhiyuan Liu, Qi DengICML 2026 · 1 citation
