{"id":"80a8393e-f962-42f9-a929-65f57cd1eac7","arxiv_id":"2608.04189","paper_version":1,"verdict":"CONDITIONAL","confidence":"HIGH","novelty_score":7.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":3,"one_line_summary":"DiffAPQP accelerates end-to-end decision-focused learning on IEEE 118-bus power systems by 2.27x to 6.39x over CvxpyLayers while keeping decision costs within 0.2%.","lead":"A new Python package, DiffAPQP, makes decision-focused learning practical for large power networks by solving and differentiating quadratic optimization models much faster than the existing CvxpyLayers tool. On a 118-bus test system it cuts training time by 2.3 to 6.4 times while keeping operating costs nearly unchanged.","discovery_kind":"new_method","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Degenerate zero-renewable curtailment bounds are likely frequent in the 118-bus ED data, so the paper's own Appendix E excludes exactly the points where the reduced-KKT/value gradients are non-unique; the speedups measure over all samples but correctness of the training signal at these points is…","rationale":"Reader's weakest_assumption is the same as my main concern. The paper's own Appendix E is an explicit admission that zero renewable forecasts create degenerate KKT points; it then masks these points out of the controlled gradient-fidelity table, but does not report how many training samples are affected. Because the ED/RD models are 24-hour and solar is zero at night, the affected fraction is likely not negligible. This makes the concern load-bearing for the 'exact differentiable optimization' narrative, though not for the raw runtime speedups, which are wall-clock measurements and remain credible. The open-source release and extensive ablation of solver backends are independent support, and the runtime claims are well supported. The correct verdict is unchanged from the reader's CONDITIONAL: the concern warrants a quantitative check before the exactness claim can be accepted at face value, but it does not invalidate the measured speedups.","tokens_in":38888,"tokens_out":11003,"duration_ms":113936,"concrete_test":"Add an instrumentation pass to DiffAPQP over the exact Table III/V configuration (255 daily training samples, 5 epochs, SCS and Clarabel): for every ED/RD solve record whether any curtailment bound is degenerate (b_solar or b_wind within the forward tolerance of zero), whether both bounds enter the active set, and the condition estimate of K_s in (16). Then, at a random subset of degenerate points, re-solve the same ED with two solvers that can return different dual optima (e.g., Clarabel and Gurobi) and compute the value-function gradient (19) for the solar forecast using each dual. If the fraction of degenerate samples is below 1% or the two-dual gradient directions agree to cosine >=0.999 and produce the same Adam update direction, the concern is resolved; otherwise the exact-gradient and cost-parity claims must be qualified to the regular subset.","verdict_should_be":"UNCHANGED","load_bearing_attack":"Prop. 1's equivalence between full and reduced KKT rests on A2 (strict complementarity) and A4 (LICQ). In the ED model, the curtailment constraint 0<=p_curtail<=b_solar degenerates whenever the forecast b_solar=0: both bounds are active, their gradients are linearly dependent, and the reduced KKT matrix K_s in (16) is singular. Appendix E explicitly acknowledges this: 'At a zero renewable forecast, the lower and upper curtailment bounds are simultaneously active... resulting in a degenerate KKT point,' and consequently the controlled gradient-fidelity Table VI reports statistics only for 'Solar>0' and 'Wind>0'. Because solar generation is exactly zero at night for the 24-hour ED horizon and the forecaster clamps outputs to nonnegative values, this degeneracy is plausibly systematic rather than rare in the 255 training samples. The headline speedups (2.27-3.58x closed-loop, 3.62-4.38x counterfactual) are averaged over all epochs and samples, including these points, while the differentiability guarantee used to justify the 'free' value-function backward pass and the reduced-KKT backward pass only holds away from them. The paper does not report the frequency of singular K_s, the fraction of value-function gradients taken at degenerate points, or how the choice of dual returned by the forward solver affects the training update. The timing claims are not threatened, but the exactness of the DfL gradient and the 0.2% cost-parity claim are.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper presents DiffAPQP, an open-source framework for differentiable affine-parametric quadratic programs (APQPs) aimed at decision-focused learning (DfL) in power systems. The forward pass automatically canonicalizes CVXPY models into APQP form and accelerates repeated solves through solver warm-start and solver-data update. The backward pass offers full-KKT and reduced-KKT implicit differentiation, with a proof that eliminating inactive inequalities from the adjoint system is equivalent to the full system under LICQ, strict complementarity, and second-order sufficient conditions; for value-function losses, an envelope-theorem gradient avoids the adjoint solve altogether. Experiments on the IEEE 118-bus system with a 24-hour coupled economic-dispatch and redispatch horizon report 2.27x--3.58x closed-loop and 3.62x--4.38x counterfactual training speedups over CvxpyLayers under matched SCS and Clarabel backends, roughly 50% peak-memory reduction, and test operating costs within 0.2% of CvxpyLayers.","tokens_in":39173,"tokens_out":8177,"duration_ms":82961,"significance":"If the open issues are resolved, this is a valuable contribution with a sound theoretical core and unusually careful empirical methodology. The APQP canonicalization removes a real usability bottleneck; the reduced-KKT equivalence is standard perturbation analysis but is proved cleanly; the value-function gradient is a correct application of the envelope theorem rather than circular reuse of the forward solve. The evaluation is exemplary in matching solver backends, capping CPU cores, reporting decomposed timings, and measuring gradient fidelity, with open-source code. The main risk is that the gradient-fidelity analysis explicitly excludes degenerate zero-renewable forecasts, which are likely systematic in a 24-hour solar-wind horizon, leaving the exactness of the training signal at those points unquantified.","major_comments":[{"comment":"Appendix E explicitly acknowledges that zero renewable forecasts create simultaneously active curtailment bounds (0 <= p_curtail <= b_solar with b_solar = 0) and that the derivative need not be unique; Tables VI and VII consequently report gradient similarity only for 'Solar>0' and 'Wind>0'. Since the 24-hour ED/RD horizon includes night hours and the forecaster outputs are clamped to nonnegative values before entering the optimization, this degeneracy is plausibly systematic rather than rare in the 255 training samples. The paper does not report the frequency of degenerate samples, the number of singular reduced-KKT systems encountered, or how the solver-selected dual at a degenerate point affects the value-function gradient. Table VII's value-function solar mean cosine of 0.7138 with P05 of 0.0507 is attributed to training-path divergence and mask mismatch, but degeneracy is a competing explanation that is not ruled out. This matters for the claim that DiffAPQP matches CvxpyLayers' training signal within 0.2% cost: at these points the 'free' gradient is a subgradient selected by solver internals. Please quantify the degeneracy frequency and either verify that the clamp blocks backpropagation at all such samples or report gradient fidelity on degenerate samples separately.","section":"Appendix E, Tables VI-VII"},{"comment":"The reduced-KKT equivalence in Proposition 1 assumes exact active-set identification via strict complementarity and LICQ, but the implementation identifies the active set through numerical tolerances (epsilon_abs, epsilon_rel). A misclassified constraint changes the reduced derivative matrix K_s, and an over-inclusive tolerance can make K_s singular. The controlled single-batch comparison in Table VI is a useful first step, but it covers only 32 samples before any optimizer update and does not report how often active-set misclassification occurs over the full 255-sample training set or across epochs. Given that the power-system model contains exactly binding curtailment, ramping, and line-limit constraints, please report the distribution of |G_j z* - h_j| on the ED/RD training data and the sensitivity of the reduced-KKT gradients to the active-set tolerance, for example a sweep over epsilon_abs in the appendix.","section":"Section IV-B, Eq. (16), Table VI"}],"minor_comments":[{"comment":"The phrase 'resulting in eligible backward time' appears to be a typo for 'negligible backward time'.","section":"Abstract"},{"comment":"The text alternates between 'work space' and 'workspace'; please use one term and clarify how the reused KKT factorization is stored across solvers and how its memory footprint is bounded.","section":"Section III-C2"},{"comment":"Section V-A states that solar and wind forecasts are 'restricted to positive values' before the optimization layers, while Appendix C3 says they are 'constrained to be nonnegative'; please make the exact clamping operation explicit and consistent.","section":"Section V-A vs. Appendix C3"},{"comment":"The columns 'Solar>0' and 'Wind>0' should be accompanied by the number of samples excluded at each epoch, since the mask reconstructed from the initial AbL forecaster may not match later forecasts, as the text itself acknowledges.","section":"Tables VI and VII"},{"comment":"The inset panels have very small fonts and no labeled axes; please enlarge them or describe in the caption what quantity is plotted on the y-axis.","section":"Fig. 3"}],"recommendation":"major_revision","confidential_remarks":"The manuscript is well within the scope of an IEEE power-systems journal and the open-source contribution is substantial. The main unresolved point is the quantification and handling of degenerate zero-renewable forecasts, which the authors should be asked to address explicitly before publication. I have no concerns about citation patterns or novelty disclosure."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Xu and Teng have built a genuine workhorse: a differentiable affine-parametric QP layer that parses CVXPY models, caches solver factorizations, warm-starts across epochs, and gives both a reduced-KKT adjoint and an envelope-theorem value gradient. The engineering is thorough, the open-source release is real, and the benchmarking against CvxpyLayers is honestly matched (same solvers, same tolerances, cores capped). The speedups—2–4x closed-loop, faster counterfactual—are credible. The proof that full and reduced KKT differentiation coincide under strict complementarity and LICQ is standard but cleanly executed, and Proposition 3 correctly identifies the value-gradient as a subgradient at non-differentiable points rather than overclaiming.\n\nThe main soft spot is exactly the one the stress-test note lands on: the degeneracy at zero renewable forecasts. When b_solar = 0, both curtailment bounds are active, LICQ fails, K_s is singular, and the gradient is non-unique. Appendix E openly says this and then reports gradient fidelity only over positive forecasts. That is honest, but it leaves the central training-signal claim unquantified: we don't know how often these degenerate points occur in the 255 training samples, nor whether the arbitrary dual selection systematically biases the DfL update. Nighttime solar is pervasive, so this is not a corner case. The speedup numbers and the 0.2% cost-parity claim are empirical and likely robust, but the paper should report the frequency of singular K_s and show that excluding those points does not change the cost comparison.\n\nThe LP discussion in the appendix is a second, milder soft spot: q-gradients depend on which optimal primal the solver returns. The authors note this honestly and show regularization helps, but the main text's claim of similar operating costs is only tested on the QP cases; the LP behavior is left for the appendix. Minor.\n\nThe citation pattern looks fine; connecting to the DfL power-systems literature and dQP/BPQP is accurate. There are a few self-citations, but they are to the authors' own GridForge and E2E-AT framework, which are legitimately the tools used.\n\nVerdict: this deserves referee time. It is a useful piece of infrastructure with an honest, well-executed evaluation. I would send it to review with a request to quantify the degeneracy frequency and its effect on the reported gradients and costs. The claims as stated are probably right, but they are not yet fully pinned down.","headline":"Solid, well-engineered differentiable QP layer for DfL with honest benchmarking; the degeneracy at zero renewable forecasts is openly disclosed but under-quantified.","tokens_in":39698,"tokens_out":2381,"would_cite":true,"duration_ms":21513,"reading_group":"yes","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":["90C20","90C31"],"pacs":[],"model":"deepseek-v4-flash","headline":"DiffAPQP shows that structuring the optimization layer as an affine-parametric QP with cached forward solves and a reduced-KKT backward pass makes decision-focused power-system training several times faster at nearly unchanged operating…","keywords":["decision-focused learning","differentiable optimization","affine-parametric quadratic program","economic dispatch","redispatch","implicit differentiation","KKT reduction","warm starting"],"falsifier":"Run the same 118-bus batch through full-KKT and reduced-KKT adjoints while sweeping the active-set tolerance from $10^{-7}$ to $10^{-2}$ and record gradient cosine similarity; a sharp drop below 0.99, or a divergence in training cost, would show where the reduction misclassifies constraints. Separately, count the fraction of training samples with zero renewable forecasts at which both curtailment bounds bind; if that fraction is nontrivial, the non-unique gradients at those points are a measurable part of the training signal and the speedup claims should be reported conditional on those samples.","tokens_in":38659,"feed_emoji":"⚡","tokens_out":12251,"duration_ms":96195,"temperature":0.7,"pith_summary":"Decision-focused learning trains a forecaster against the cost of the operational decisions it feeds, but it is usually too slow for realistic networks because every training step must solve and differentiate a large optimization problem. This paper claims that the cost can be reclaimed by keeping the optimization layer in the form of an affine-parametric quadratic program, where forecasts enter through fixed affine maps, and by exploiting the fact that training repeatedly solves the same template: solver factorizations and warm-start iterates are reused across samples and epochs. For the backward pass, the paper proves that differentiating the full KKT system is equivalent to differentiating a smaller reduced system built only from the active inequality constraints, and that for losses depending only on the optimal value an envelope-theorem formula supplies the gradient without any adjoint solve. On the IEEE 118-bus system with a 24-hour economic-dispatch and redispatch horizon, this combination trims the fastest measured epoch times by factors of about 3.9 (closed loop) and 6.4 (counterfactual) while roughly halving peak memory and keeping operating costs within about 0.2% of the reference. If the claims hold, decision-focused learning moves from small test systems toward operational-scale power-system training.","feed_headline":"Power-grid forecast training 6x faster via structured optimization","feed_subtitle":"On the 118-bus system, end-to-end dispatch training keeps costs equal while cutting time and memory roughly in half.","key_machinery":"The central object is the affine-parametric quadratic program (APQP), a QP whose linear objective coefficient $q(\\hat{y})$ and constraint right-hand sides $b(\\hat{y}), h(\\hat{y})$ are affine in the forecast parameters, so that all gradients with respect to the forecasts are analytic. The load-bearing mechanism is the reduced KKT system $K_s$ built from $P$, $A$, and the active rows $G_{\\mathcal{A}}$ after eliminating inactive inequalities; the paper proves its solution equals the full system's derivative. For value-function losses, the envelope theorem gives $D_{\\hat{y}_i} \\alpha = z^\\top Q_i + d_i - \\nu^\\top B_i - \\lambda^\\top H_i$ directly from the stored primal-dual solution. Because the KKT matrix is constant across training solves, factorization caching and warm-starting accelerate the forward pass.","core_discovery":"DiffAPQP's central claim is that the derivative of a QP solution map can be obtained from a reduced equality-constrained KKT system built from the active inequalities, and that this reduced derivative is exactly the full-KKT derivative provided strict complementarity and LICQ hold; the same holds for LPs at a non-degenerate vertex. This replaces an asymmetric adjoint system of dimension $n_d+n_{\\mathrm{eq}}+n_{\\mathrm{in}}$ with a symmetric system of dimension $n_d+n_{\\mathrm{eq}}+|\\mathcal{A}|$, solvable by MINRES, and it removes the inactive complementarity rows that make the full system ill-conditioned. When the training loss depends only on the optimal value, the paper further proves an envelope-theorem identity $D_{y_i} \\alpha = z^\\top Q_i + d_i - \\nu^\\top B_i - \\lambda^\\top H_i$, so the backward pass needs no adjoint linear solve at all. On the IEEE 118-bus system with a 24-hour economic-dispatch and redispatch horizon, the fastest configurations take closed-loop epochs from 38.65 to 9.55 minutes and counterfactual epochs from 10.73 to 1.68 minutes, roughly halve peak memory, and keep operating costs within about 0.2% of the baseline. To the authors' knowledge this is the first solver-based end-to-end decision-focused learning demonstration at that scale.","pith_inferences":["Going beyond the paper's testbed, the same affine-parametric structure appears in model predictive control, portfolio optimization, and market bidding, so the repeated-solve caching and reduced-KKT backward pass should transfer to any fixed-template differentiable optimization loop; a direct test would be to benchmark those tasks with the same layer.","The envelope-theorem gradient suggests a general design pattern: whenever a training loss is a function of the optimal value rather than the optimal decision, backward differentiation can be made nearly free, which invites custom cost-aware losses whose gradients can be validated by finite differences.","The active-set tolerance is effectively a hyperparameter of the reduced-KKT method; an adaptive tolerance schedule could reduce the impact of degenerate points such as zero renewable forecasts, where both curtailment bounds bind and the gradient is non-unique.","The reported speedups are measured on CPU under a fixed core cap; on accelerator hardware or with unrolled solver differentiation the trade-offs between forward reuse and backward structure may shift, so the practical advantage on GPUs remains an open question."],"forward_implications":["End-to-end decision-focused learning becomes practical at operational scale: the 118-bus, 24-hour dispatch-redispatch case trains in minutes per epoch instead of tens of minutes.","Because the optimization layer dominates epoch time, the speedups benefit any training loop that repeatedly solves the same convex program, not just power-system economic dispatch and redispatch.","Value-function training losses can be differentiated almost for free, so counterfactual learning is no longer bottlenecked by the backward pass.","Reduced-KKT gradients match the full-KKT gradients closely (mean cosine similarity above 0.997 in controlled first-batch comparisons), indicating the learning signal is preserved.","Peak memory savings of roughly 50%, with even larger savings in counterfactual runs, allow larger models or batches on the same hardware."],"supporting_citations":[{"why":"It supplies the implicit-differentiation and Danskin-theorem background used to derive both the KKT adjoint and the envelope-theorem value gradient.","marker":"[17]"},{"why":"It defines the differentiable conic-program layer that serves as the reference baseline and motivates the full-KKT differentiation route.","marker":"[18]"},{"why":"It provides the modeling-language compilation pipeline that DiffAPQP extends with automatic APQP canonicalization.","marker":"[19]"},{"why":"It is one of the matched forward solver backends, and its factorization-reuse and warm-start behavior are benchmarked.","marker":"[20]"},{"why":"It is the other matched forward solver backend, supplying the interior-point baseline for runtime and memory comparisons.","marker":"[21]"},{"why":"It introduces active-set-reduced KKT differentiation for QPs, which DiffAPQP extends to affine-parametric structure and automatic canonicalization.","marker":"[26]"},{"why":"It shows how to decouple QP differentiation from the forward solver, the design lineage behind DiffAPQP's disentangled forward and backward passes.","marker":"[27]"},{"why":"It is the operator-splitting solver whose warm-start and update APIs are refactored and evaluated in the forward-pass experiments.","marker":"[32]"},{"why":"It is the augmented-Lagrangian solver used as another forward backend for warm-start and update ablations.","marker":"[33]"},{"why":"It supplies the perturbation analysis and convex-optimization facts behind the value-function derivative with respect to parameters.","marker":"[37]"}],"fun_headline_variants":["6x faster grid forecast training, half memory, same cost","QP shortcut speeds power-grid training 6x, cuts memory 50%","First end-to-end DfL on 118-bus: 6x speedup, 50% less memory","DiffAPQP: 6x faster dispatch training, 50% memory cut","Reduced KKT trick makes power-grid DfL 6x faster"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The reduced-KKT backward pass is only as correct as the numerically identified active set, and it assumes strict complementarity and LICQ at the optimum; at degenerate points such as zero renewable forecasts where both curtailment bounds are active, the gradient is not unique, and the paper reports its main speedups without quantifying how often such degeneracies occur in the 118-bus data.","fun_headline_variants_meta":{"raw":{"variants":["6x faster grid forecast training, half memory, same cost","QP shortcut speeds power-grid training 6x, cuts memory 50%","First end-to-end DfL on 118-bus: 6x speedup, 50% less memory","DiffAPQP: 6x faster dispatch training, 50% memory cut","Reduced KKT trick makes power-grid DfL 6x faster"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000783,"raw_usage":{"total_tokens":3577,"prompt_tokens":1186,"completion_tokens":2391,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":802,"completion_tokens_details":{"reasoning_tokens":2283}},"tokens_in":802,"tokens_out":2391,"duration_ms":16259,"temperature":1.0,"reasoning_tokens":2283,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-15T14:41:21.883304+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Run the same 118-bus batch through full-KKT and reduced-KKT adjoints while sweeping the active-set tolerance from $10^{-7}$ to $10^{-2}$ and record gradient cosine similarity; a sharp drop below 0.99, or a divergence in training cost, would show where the reduction misclassifies constraints. Separately, count the fraction of training samples with zero renewable forecasts at which both curtailment bounds bind; if that fraction is nontrivial, the non-unique gradients at those points are a measurable part of the training signal and the speedup claims should be reported conditional on those samples.","supporting_citations":[{"cited_title":"Operator splitting for a homogeneous embedding of the linear complementarity problem,","cited_arxiv_id":null,"evidence_quote":"It is one of the matched forward solver backends, and its factorization-reuse and warm-start behavior are benchmarked."},{"cited_title":"Bpqp: A differentiable convex optimization framework for efficient end-to-end learning,","cited_arxiv_id":null,"evidence_quote":"It introduces active-set-reduced KKT differentiation for QPs, which DiffAPQP extends to affine-parametric structure and automatic canonicalization."},{"cited_title":"Differentiation through black-box quadratic programming solvers,","cited_arxiv_id":null,"evidence_quote":"It shows how to decouple QP differentiation from the forward solver, the design lineage behind DiffAPQP's disentangled forward and backward passes."},{"cited_title":"Qpalm: A proximal aug- mented lagrangian method for nonconvex quadratic programs,","cited_arxiv_id":null,"evidence_quote":"It is the augmented-Lagrangian solver used as another forward backend for warm-start and update ablations."}],"review_version":2}