Structured Differentiable Optimization for Efficient Decision-focused Learning in Power Systems
Wangkun Xu, Fei Teng
Abstract
Decision-focused learning (DfL) trains forecasting models to align downstream decision consequences, such as power-system operating costs. However, its application to realistic power networks is limited by the need to repeatedly solve and differentiate large optimization problems during training. This paper presents DiffAPQP, a solver-flexible framework and open-source Python package for scalable DfL with affine-parametric quadratic programs. To accelerate the forward pass, DiffAPQP automatically canonicalizes quadratic power-system models written in CVXPY into a differentiation-ready representation and takes advantage of the repetitive solving structure through solver warm-start and solver-data update during training. For the backward pass acceleration, we establish the equivalence between differentiation through the full KKT system and a reduced system obtained by eliminating inactive inequality constraints. For training losses depending solely on the optimal value, we further derive an envelope-theorem-based gradient that avoids solving an adjoint KKT system, resulting in eligible backward time. To our knowledge, this work presents the first solver-based end-to-end DfL demonstration on the IEEE 118-bus system with a 24-hour coupled economic-dispatch and redispatch horizon. Under matched SCS and Clarabel backends on a Linux machine, DiffAPQP achieves 2.27×--3.58× closed-loop and 3.62×--4.38× counterfactual end-to-end DfL training speedups over CvxpyLayers. The best solver configurations increase these speedups to 3.91× (from 38.65 to 9.55 min/epoch) and 6.39× (from 10.73 to 1.68 min/epoch), respectively. Additionally, DiffAPQP reduces peak memory usage by approximately 50\%, while keeping similar operating costs as CvxpyLayers.
Create a lesson
Related papers
Leader-Follower Formation Control with Prescribed Convergence Rates under Bearing Persistence of Excitation
Tarek Bouazza, Zhiqi Tang, Soulaimane Berkane et al.
On asymptotic stability of the time-varying Kalman filter for unstabilizable linear systems: an optimization perspective
James B. Rawlings, Titus Quah, Matthias A. Müller
Designing Grid-Aware Dynamic Specifications for Large Data Center Loads
Ashutossh Gupta, Vassilis Kekatos
Time-Optimal Operation of a Load-Hoisting Gantry Crane
Eric Mountain, Tarunraj Singh
Learning to Solve Two-Stage Stochastic Unit Commitment Problems with Quality Guarantees
Andrea Fusco, Andrea Lodi, Lavanya Marla
Towards Interaction Regulation from Human Feedback via Free Energy Minimization
Maria Paula Diaz Monfort, Cinzia Tomaselli, Michael Richardson et al.