A Penalty Approach For Differentiation Through Black-box Quadratic Programming Solvers
Yuxuan Linghu, Zhiyuan Liu, Qi Deng
Abstract
Differentiating through the solution of a quadratic program (QP) is a central problem in differentiable optimization. Most existing approaches differentiate through the Karush--Kuhn--Tucker (KKT) system, but their computational cost and numerical robustness can degrade at scale. To address these limitations, we propose dXPP, a penalty-based differentiation framework that decouples QP solving from differentiation. In the solving step (forward pass), dXPP is solver-agnostic and can leverage any black-box QP solver. In the differentiation step (backward pass), we map the solution to a smooth approximate penalty problem and implicitly differentiate through it, requiring only the solution of a much smaller linear system in the primal variables. This approach bypasses the difficulties inherent in explicit KKT differentiation and significantly improves computational efficiency and robustness. We evaluate dXPP on various tasks, including randomly generated QPs, large-scale sparse projection problems, and a real-world multi-period portfolio optimization task. Empirical results demonstrate that dXPP is competitive with KKT-based differentiation methods and achieves substantial speedups on large-scale problems. Our implementation is open source and available at https://github.com/mmmmmmlinghu/dXPP.
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.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 3e821e8c-71ca-4c71-b0bb-6eb3487ebaf9Builds on8
- Efficient and Modular Implicit DifferentiationMathieu Blondel, Quentin Berthet, Marco Cuturi, Roy Frostig et al.NeurIPS 2022 · 386 citations
- Reinforcement-Learning Based Portfolio Management with Augmented Asset Movement Prediction StatesYunan Ye, Hengzhi Pei, Boxin Wang, Pin-Yu Chen et al.AAAI 2020 · 181 citations
- Theseus: A Library for Differentiable Nonlinear OptimizationLuis Pineda, Taosha Fan, Maurizio Monge, Shobha Venkataraman et al.NeurIPS 2022 · 124 citations
- 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
- Differentiation Through Black-Box Quadratic Programming SolversConnor W. Magoon, Fengyu Yang, Noam Aigerman, Shahar Z. KovalskyNeurIPS 2025 · 14 citations
Related papers
- Alternating Differentiation for Optimization LayersHaixiang Sun, Ye Shi, Jingya Wang, Hoang Duong Tuan et al.ICLR 2023 · 3 citations
- Decision-focused Sparse Tangent Portfolio OptimizationHaeun Jeon, Seunghoon Choi, Hyunglip Bae, Yongjae Lee et al.ICML 2026
- A Surrogate Objective Framework for Prediction+Programming with Soft ConstraintsKai Yan, Jie Yan, Chuan Luo, Liting Chen et al.NeurIPS 2021 · 6 citations
- Iskra: A System for Inverse Geometry ProcessingAna Dodik, Ahmed H. Mahmoud, Justin SolomonSIGGRAPH 2026
- Leveraging augmented-Lagrangian techniques for differentiating over infeasible quadratic programs in machine learningAntoine Bambade, Fabian Schramm, Adrien B. Taylor, Justin CarpentierICLR 2024 · 9 citations
