acceptodds
Under review as a conference paper at ICLR 2027

Active-Set Projection Layers for Hard-Constrained Neural Networks

Abstract

Differentiable projection layers make a network's outputs satisfy hard constraints exactly, but the projection can dominate both training and inference cost, and with the fixed iterative budget used in practice its gradient loses accuracy as more constraints become tight. We show that, for any solver of the projection, the implicit-differentiation system is block-triangular with respect to the active manifold cut out by the tight constraints: the backward pass reduces to one solve on its normal and curved tangent directions, where the curvature enters. Building on this structure, we propose ASPL (Active-Set Projection Layer), which identifies the active manifold in the forward pass and differentiates through the reduced system. We prove finite-time identification and an end-to-end training rate. We evaluate ASPL on parametric quadratic programs, multi-robot motion planning, inverse kinematics on real teleoperation logs, maze trajectory planning, and constrained flow matching. Its exact gradient costs less than ambient implicit differentiation of equal accuracy, and on quadratic programs its accuracy holds as more constraints bind.

Primary area:
optimization
Keywords:
Hard-Constrained Optimization, Robotics, Active Set

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.00 over 3 reviews, above 27% of the others.
Reviewer_5AUjOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The main strength of this paper is that the backward pass is largely solver-independent. Unlike PiNet to unroll/differentiate solver iterates, ASPL doesn’t depend on specific solver like DR, Dystra, but just differentiate through the optimality condition of the projection geometry. This makes the method more general and easy to apply.

Critical strengths

The main strength of this paper is that the backward pass is largely solver-independent. Unlike PiNet to unroll/differentiate solver iterates, ASPL doesn’t depend on specific solver like DR, Dystra, but just differentiate through the optimality condition of the projection geometry. This makes the method more general and easy to apply.

Critical weaknesses
  1. My main concern is about the contribution of this paper. Identifying the active set in the forward pass to reduce the backward pass cost is not a new idea in (differentiable) constrained optimization (like FFOLayer, dQP, and BPQP), and some of these methods are solver-agnostic as well. Furthermore, the constraint block decomposition idea comes from PiNet. The paper extends it to curved active manifolds and gives a reduced IFT formulation, but I am not fully convinced how large the conceptual gap is from existing active-set sensitivity methods, and the paper doesn’t present any experimental results comparing with existing methods. Although the paper compares with PiNet and JAXOpt, a comparison with dQP or BPQP on the QP task would help show the gain over existing active-set methods.

  2. Another issue of this paper is the computation cost. Although Eq. (5) provides an analytical expression for the projection Jacobian, computing it still requires solving a reduced linear system. The efficiency depends heavily on the dimension dNd_N, which may not be small when many constraints are active or the active manifold is curved. Also, if using CG, it depends on the conditional number as well. Could the author give more discussion on when the reduced system is actually cheaper than existing implicit differentiation methods, especially for more general constraints?

  3. The method seems to rely strongly on correctly identifying a stable active manifold. The theory uses strict complementarity and local regularity assumptions. If the solution is close to a degenerate point, or the active set changes frequently during training, it is less clear how robust the reduced backward is in practice. Could the authors discuss how the implementation handles active-set changes or failed identification during training?

  4. How to decompose the constraint for general constraints (like having both SOC and SD constraints) into C1 and C2 blocks is not introduced. The paper mentions that more constraint blocks can be converted to two blocks using a product-space construction, but there is no very concrete recipe for complicated cases, for example when affine, SOC, and semidefinite constraints all appear together. A practical example would make the generality claim more convincing.

  5. Also Eq. 5 depends on t, but how to compute it when C2 is not convex?

Minor: This paper has submission format issue of missing the “Under review as conference paper at ICLR 2027” in the page header.

Questions for authors

See weaknesses.

6 comments
AuthorsOpenReview ↗

Response to Reviewer 5AUj - Part I

We thank the reviewer for the concrete questions. They sit inside the weakness paragraphs, so we answer each weakness paragraph in turn. Blue text in the revised PDF marks every change. Under each answer we quote the text that we added and show the added tables; figures are cited by their number.

Weakness 1 (contribution vs FFOLayer, dQP, BPQP, PiNet): My main concern is about the contribution of this paper. … task would help show the gain over existing active-set methods.

Response: We thank the reviewer for this assessment. ASPL differs from these methods in three ways, and we added the comparison the reviewer asks for.

First, we show that, independent of the overall optimization method (active-set or not), the backward system of implicit projection layers that split the feasible set into two or more sets is block lower-triangular (Theorem 1). In the triangular form the free directions form a scalar block that needs no solve, and only the dNd_N normal and curved directions need one small solve.

  • Against implicit layers: Πnet runs truncated BiCGSTAB on the full system in Rd\mathbb{R}^d; we show that its system is exactly this triangular one, and ASPL solves it exactly in the reduced dimension, a significantly smaller system when dNd_N is smaller than dd (Table 2).

  • Against active-set and KKT-sensitivity methods: dQP and BPQP keep every primal variable and equality multiplier, so they solve a system of size d+neq+∣J∣d+n_{\mathrm{eq}}+|J|; on polyhedra ASPL factors ∣J∣×∣J∣|J|\times|J| and returns the same gradient as dQP (newly added Proposition 2). FFOLayer also uses only the active constraints, but it assumes that the active set is correct and returns an approximate gradient. For curved sets, dQP does not apply, and BPQP needs the Lagrangian Hessian with the linear independence constraint qualification (LICQ), which fails at the SOC apex and at low-rank PSD points; ASPL works with any forward solver and uses only the block projections.

Second, unlike existing active-set extensions, which need a nearly accurate active set to build their KKT systems, ASPL switches adaptively between the ambient space and the active manifold, with theoretical guarantees (Theorems 2–4). Methods such as dQP, BPQP, DDN and FFOLayer obtain the active set by thresholding the solver output or assume it is correct, and guarantee neither that it is correct nor that training converges for (PCO) (Table 2). ASPL's training (Algorithm 2, Appendix A2.6) introduces a new switching rule: the forward pass stays on the active manifold while the share of the projection displacement in the candidate normal cone stays above a threshold, and returns to the ambient space when it drops below. This rule is what makes active-set identification adaptive during training while keeping its guarantees. To the best of our knowledge, this is the first theoretical guarantee for stochastic active-set optimization in (PCO).

Third, we added the experimental comparison the reviewer asks for. With the same forward pass, active set and code, ASPL and dQP return the same gradient, and ASPL's backward pass is more than an order of magnitude faster (newly added Table 5). We also trained dQP, BPQP and FFOLayer end to end with their released code on the QP task, at sizes that these baselines can run (newly added Table 9). ASPL is faster than BPQP and FFOLayer at every size and faster than dQP from d=200d=200 on, and its advantage grows with the problem size.

(this answer continues in the next part)

AuthorsOpenReview ↗

Response to Reviewer 5AUj - Part II

Revisions made to the paper.

Section 1 (lines 82–90), revised text:

Dropping inactive constraints from the backward pass is known for polyhedral or partly smooth problems with known support (Niculae et al., 2018; Bertrand et al., 2022), and dQP (Magoon et al., 2025) applies it to any QP solver; BPQP (Pan et al., 2024), FFOLayer (Zhao et al., 2026) and deep declarative networks (Gould et al., 2022) also restrict the backward pass to the active constraints (Appendix A1). For a polyhedral projection, ASPL returns the same gradient as these active-set KKT methods from a smaller per-sample matrix whose condition number is at most theirs (Proposition 2). New here are the block lower-triangular form of the implicit-differentiation system of a projection onto two simple sets, which also covers curved and prox-regular sets (dQP is QP-only), and active-set identification by the layer's own solver before it converges.

Appendix A4.1, Table 5 added (backward passes on the lifted QP set; backward time in ms at four active-set ratios):

methodmatrix factored (size at ratio 0.45)condrel. err.ms at 0.05ms at 0.25ms at 0.45ms at 0.75
ASPL$\vert \mathcal{A}\vert $ (900)112.5e-141.85.81434
Schur$n_{\mathrm{eq}}+\vert \mathcal{A}\vert $ (1000)192.3e-142.26.515.738
dQP$d+n_{\mathrm{eq}}+\vert \mathcal{A}\vert $ (3000)952.3e-143896089431520
Dense IFT4000162.5e-141790179017901790
BPQP3000952.8e-61.3e52.1e52.8e55.7e5

Appendix A4.1, Table 9 added (total training time in seconds at three active-set ratios; medians over seeds):

methodd=100 0.05d=100 0.25d=100 0.45d=200 0.05d=200 0.25d=200 0.45
ASPL7172779392101
ASPL-B666366140138170
dQP688198207287384
BPQP5966578392,3012,8973,164
FFOLayer6546507571,5791,5581,598

Also changed: Table 2 (Appendix A1.1); Proposition 2 and its proof (Appendix A2.5); Figure 3 (Section 4.1).


Weakness 2 (when is the reduced system cheaper): Another issue of this paper is the computation cost. Although … than existing implicit differentiation methods, especially for more general constraints?

Response: We thank the reviewer for this question. ASPL reduces the cost of training and inference in three ways.

  • A smaller backward system. The reduced system is significantly smaller than the systems of full-space layers such as OptNet, cvxpylayers and Πnet. On polyhedra it is also smaller than those of active-set methods: dQP, for example, solves a system of size d+neq+∣J∣d+n_{\mathrm{eq}}+|J|, while ASPL solves one of size ∣J∣|J| (Table 2).

  • Our switching approach: staying on the active face. Each sample's forward pass stays on its stored active set and switches to the full solver only when the check fails (Algorithm 1). Algorithm 2 states this switch as a rule with convergence guarantees (Theorem 4). After the first epoch almost no sample needs the full solver (newly added Table 8), so training and inference are faster (Table 1 and newly added Table 9). This is often the larger saving.

  • A pooled warm start. One warm-start state, shared across the dataset, starts each forward pass near its solution, so O(log⁡T)\mathcal{O}(\log T) solver steps per iteration suffice (Theorems 3 and 4).

When the reduced system is the smaller one depends on the constraint class:

(this answer continues in the next part)

AuthorsOpenReview ↗

Response to Reviewer 5AUj - Part III

On polyhedra, ASPL's system is smaller than dQP's however many constraints are active. dQP solves for all dd variables, the neqn_{\mathrm{eq}} equality multipliers and the ∣J∣|J| active multipliers, a system of size d+neq+∣J∣d+n_{\mathrm{eq}}+|J|. ASPL eliminates the variables and the equality multipliers and solves only for the ∣J∣|J| active multipliers. This gives the same gradient with a well-conditioned matrix, whose condition number is never larger than that of dQP's matrix (newly added Proposition 2). The elimination needs one factorization of the equality block. This block does not depend on the active set, so it is not refactored when our switching approach adds or removes active constraints. Only the small ∣J∣×∣J∣|J|\times|J| matrix depends on the active set: ASPL factors it once for a reference active set per batch, handles each sample's differences from that set (a few added or removed constraints) by a low-rank update instead of a new factorization, and reuses the factor of the accepted face in the backward pass (Appendix A4.1). This significantly reduces the computation when the active set changes from step to step (newly added Table 7). On the QP benchmark, ASPL's backward pass is 4545–217×217\times faster than dQP's, even when three quarters of the inequalities are active (newly added Table 5).

On curved sets, its size depends on the cones. On second-order cones it is the smaller system as soon as the variables outside the cones outnumber the curved directions, as in large layers, where ASPL's backward pass is much faster than KKT differentiation on the active cones (newly added Table 12). With few such variables, as in the SOCP benchmark of the paper, the two are comparable. On semidefinite cones its size is set by the rank of the solution and falls as the rank grows (newly added Table 13).

CG is an option, not our default. Cholesky, our default, does not depend on the condition number. CG is an option for large reduced systems on flat faces. Its iteration count depends on the condition number of the reduced matrix, and on flat faces it is set by the angle between the two active manifolds. In the QP training runs this condition number stayed between 3.53.5 and 2323, and CG matched Cholesky (Appendix A4.1).

Revisions made to the paper.

Appendix A2.5, after Proposition 2, revised text:

The gradient is therefore the same, and only the matrix factored per sample differs. On the QP benchmark, ASPL's backward pass is the fastest at equal accuracy (Table 5). dQP covers QP layers with any positive definite Hessian and returns derivatives with respect to all QP data, while ASPL is a projection layer, so neither contains the other. On curved sets, the formulas of declarative networks (Gould et al., 2022), BPQP (Pan et al., 2024) and Vaiter et al. (2017) solve a system of size about d+∣A∣d+|\mathcal{A}|, one row per variable and per active constraint, while Theorem 1 factors dNd_{\mathbf{N}} directions; on second-order cones of dimension kk, dNd_{\mathbf{N}} is the smaller exactly when the variables outside the cones exceed k−2k-2 per boundary cone (Appendix A4.2).

Appendix A4.2, Table 12 added (reduced backward against KKT differentiation on the active cones, time per sample in ms, by the number of variables outside the cones):

cones × dimnboundary conesASPL rowsKKT rowsASPLactive-cone KKTdense adjointfull KKT
50×102515135400.0170.0120.150.79
50×1020001513520150.0244.70.1522.8
50×1040001513540150.08720.70.5528.1
200×420006018020600.0355.10.4138.6
200×1020006054020600.0955.24.237.8
200×10400010897241080.5023.714.565.0
800×4400024072042400.4723.514.9106
800×102000240216022401.711.066.7346

Section 4.1 (lines 362–420), revised text:

A CG solve of the reduced system is as accurate as Cholesky and slower (ASPL-B (CG) in Table 1), so ASPL uses Cholesky.

Appendix A4.1 (robustness of identification), revised text:

Conditioning. In the runs of Table 1 the reduced system has condition number 3.53.5 at ratio 0.050.05 and 2323 at ratio 0.450.45, and warm-started CG solves it to relative tolerance 10−810^{-8} in 13.713.7 to 34.634.6 iterations on average.

(continued in Part IV)


Reviewer_mvf5OpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The authors propose a new differentiable projection layer that focuses only on active constraints at the solution, making it cheaper and more efficient than existing solutions. The layer is used in a QP benchmark and multiple robotics applications.

Critical strengths

If the technical questions below are addressed to satisfaction, this paper promises an interesting contribution: a fast, accurate method for constrained-output neural networks. The results are promising (provided they can pass tests against more recent methods, as listed below).

Critical weaknesses

I found that several points crucial to the paper's core contributions are insufficiently detailed (see the long list in the questions to authors). Most importantly, the authors claim exactness of the backward step before convergence, but it is not clear how this holds for nonlinear constraints.

Second, the paper uses a lot of vague, somewhat non-scientific language. Many passages sound LLM-generated. Indeed, the authors acknowledge using LLMs for writing, and it seems that, in doing so, some scientific rigor was compromised. Again, the questions to the authors include a long list of examples of vague language.

Questions for authors

As a general comment, the authors are kindly asked to consider reducing the Appendix. The paper is 39 pages long, and much of the appendix is tangential to the core contribution. Parts that could be substantially cut are: A1.2, A2.1, A4.6.1, and A2.5.

1. Method

1.a. Constraint sets

i. Exactness of the backward derivative before forward convergence.

  • Lines 211–214 This paragraph is hard to understand because the language is vague. “The two passes need the face at different times” – what does this mean? What “face” is referred to? And what is meant by “so it runs at every step”?

  • Lines 258–263 Why does the solver not need to converge for active constraints to be known? Figure 1a), which is used for visualization, is overly simplified and a little confusing. How does that Figure change when there are multiple constraints, some of which may be curved?

ii. Constraints definitions

  • Lines 130–137 It is not clear what the assumptions on C_a and C_2 are exactly. Why are the projections closed-form? This is not generally the case. Is the fact that C_1 is affine in all examples a coincidence, or is that intended? How is t in (4) found when C_2 is not convex?

  • Lines 175–178:

iii. Practical implications and restrictiveness of the theoretical assumptions. References: Lines 85–92 and 172–186; Assumptions A–D.

  • Lines 116–119, 126–128 The comparison with existing methods such as implicit differentiation or unrolling is unclear. For example, the phrase “ASPL obtains it from the projection map itself” is misleading because the projection map is also an optimization problem; how is it different from the others? It seems like the main difference is that inactive constraints are factored out efficiently. The backward pass depends only on the projection map, not on the procedure that evaluates it; this is a general concept of implicit differentiation. So this is not a contribution of the method per se.

iv. Definition, implementation, and certification of active-set identification.

  • Line 156–161 The definition of “active set” is very vague. Why not simply give the definition? A phrase like “The active set is the special case of a set cut out by constraint functions” is very confusing. Even when the authors provide a more mathematical definition, they still use vague language, such as “A(y) [...] contains every equality.” It contains the indices of the constraints that hold with equality.

Later in the same paragraph, the authors make other vague statements, such as “a polyhedron needs no independence condition”; what does that mean? A polyhedron may also have multiple linearly dependent (redundant) constraints, so it could very much require this. And what is meant by “the definition needs no constraint functions”? In general, all of this description would be more readable and understandable if the authors introduced and consistently used standard terms like active manifold, convex face, and feasible tangent cone.

  • Lines 81-83 The term “identification” is used without a qualifier – add “active-set identification” and explain how exactly this identification happens; it is only alluded to in Algorithm 1 and on an abstract level within Theorem 2.

1.b Clarity of other aspects of method

i. Theorem 1 lacks an introduction and a reference to the proof in the appendix, and the forms in (6) seem detached from Figure 1. It would be useful to use the same notation within the figure.

ii. In Proposition 1, the list of possible algorithms (operator splitting, Dykstra’s algorithm, and active-set QP) is weirdly specific: is this supposed to be an exhaustive list or just some examples? If it is a list of examples, it does not belong within a Proposition. Again, this proposition appears without an introduction or a link to the proof in the Appendix.

iii. The authors are asked to please clarify the novelty of the proposed method w.r.t. existing active-set differentiation and KKT sensitivity methods, including dQP [1] and Deep Declarative Networks [2]. In particular, it seems like the method in [1] may need to be added to the benchmark in Section 4.1.

[1] C. W. Magoon, F. Yang, N. Aigerman, and S. Z. Kovalsky. “Differentiation Through Black-Box Quadratic Programming Solvers.” Advances in Neural Information Processing Systems (NeurIPS), vol. 38, 2025.

[2] S. Gould, R. Hartley, and D. Campbell. “Deep Declarative Networks.” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 44, no. 8, pp. 3988–4004, 2022.

2. Questions about results

2.a. Experimental details missing

  • Lines 416-418 Cvxpylayer is a wrapper that allows automatic differentiation for many supported solvers. The authors need to specify which solver is used in particular. What differentiation backend, tolerances, and iteration limits are used?

  • Table 1 Why are only ASPL medians over four seeds? Are the other results reported for one seed only? It would also be desirable to report standard deviations.

  • Line 354 The results are clipped at zero because infeasible solutions can yield negative objectives. This seems likely to falsely favor methods that often return infeasible solutions, which would then be misclassified as zero-cost. It seems more sensible to use the absolute value?

  • Line 372 In terms of methodology, how is the active-set ratio varied across cells? Is this achieved by increasing the number of workspace constraints?

  • Section 4.3 In all robotic experiments, but particularly in 4.3, the experimental setup is unclear. What is the learned backbone? What constraints are imposed at the output (e.g., for 4.3, what is the meaning of the terms in J(q_t)v_t = e_t)?

  • Section 4.4 In 4.4, what is the advantage of having a neural network predict the path as opposed to just solving for it analytically? Again, the experimental setup here is not clear.

2.b. Discussion of Results

  • Table 1 and Line 360 Why does DC3 perform so poorly? The authors do not provide any compelling justification of why the results would be this bad.

  • Figure 3 Some results are reported on r5h25, some on r8h50. Why are not all results reported on all benchmarks? Please consider reporting all results or justifying why only a subset is possible/sufficient. Also, why does the position error increase as the ratio of active constraints goes up?

  • Section 4.5 The authors discuss that the algorithm is not statistically significant (again, please report standard deviations in Figure 6). What is the message of this experiment? Why is projection not beneficial here?

4. Minor edits and exposition

Please fix the following minor problems.

Overall, avoid excessive negations. Negations sound very LLM-generated and are confusing to the reader. It is more useful to know what a method, result, theory, etc. is doing and not what it is not doing.

  • Clearer main-text guidance to the appendix contents.
  • Correction of the duplicated appendix reference: lines 504–505, “Appendices A4 and A4.”
  • Consistent labeling: Figure 2, “test RS” versus “final test RS.”
  • Redundant and ambiguous wording concerning curvature: Lines 15–17, 81–83, and 88–89; particularly “curved tangent directions, where the curvature enters” and “the solve adds curvature.”
  • Line 76 “on every backward pass” -> in every backward pass
  • Line 91: what is meant by “any solver whose block-projection arguments converge”?
  • Avoid shorthand expressions that are missing subjects, like in “are the fourth” (Line 51), “The forward” (Line 214), “first pass is full (Algorithm 1, Line 1), “The reduced backward” (Lines 249, 263), “wall-clock” (Lines 271, 356)
  • Use Phi (Theorem 3) or varphi (PCO) consistently.
  • Line 116-117: “the middle factor is the backward pass”: this is ambiguous; it is the backward pass of the projection layer, but isn’t every element of (1) part of the full backward pass? Or are you redefining the standard term “backward pass”?
13 comments
AuthorsOpenReview ↗

Response to Reviewer mvf5 -Part I

We thank the reviewer for the detailed and constructive list. We answer each item below. Blue text in the revised PDF marks every change. Under each answer we quote the text that we added and show the added tables; figures are cited by their number.

Weakness 1 (exactness before convergence): I found that several points crucial to the paper's core … it is not clear how this holds for nonlinear constraints.

Question 1.a.i (exactness before convergence): Lines 211–214 This paragraph is … what is meant by "so it runs at every step"?

Lines 258–263 Why does the solver not need to converge … there are multiple constraints, some of which may be curved?

Response: We thank the reviewer for these questions; Section 2.3 now states the claim precisely for nonlinear constraints, whose active manifolds are curved.

Lines 211–214. The sentence about the two passes meant that the backward pass uses the active manifold read from the current solver state, while the forward pass can reuse the one from the previous iteration; the paragraph now says so. The "face" is the active manifold of Definition 1; for a polyhedron it is the face that contains the point in its relative interior. "So it runs at every step" meant that the reduced backward pass is used at every training step, even before the forward pass has converged; we removed the phrase.

Why the solver need not converge. Under strict complementarity there is a radius ϱ>0\varrho\gt 0 within which each set projection lands on the same active manifold, so the active constraints stop changing once the solver is that close to its limit. This is the identification theorem of Hare and Lewis (2004) applied to the two projections (Theorem 2), and it holds for flat and curved sets.

Exactness on nonlinear constraints has two parts. The reduction is exact at every solver state: for the splitting solver, the reduced solve of Theorem 1 returns exactly the vector of the full (ambient) implicit-differentiation system at the current state, converged or not, on curved constraints as on flat ones. After identification, the error is set by the distance to the limit: on a curved manifold the derivatives of the two set projections also depend on the point, so every implicit-differentiation method, ambient or reduced, carries the distance of the solver state to its limit. Appendix A2.4 bounds this error by a constant times the distance, and on the SOCP benchmark it is a few percent in the median at identification and then falls in proportion to the distance, down to round-off (newly added Figure 9). On flat constraints these derivatives depend only on the identified face, so there the gradient is exact from identification on, before convergence (Figure 8, panel a).

Figure 1. Panel (a) now shows two constraints, a flat one that is tight and a curved one that is not, and its caption covers the general case.

Revisions made to the paper.

Section 2.3 (lines 245–271), revised text:

The backward pass uses the face read off the current solver state. The forward pass can reuse the face from the previous iteration.

Section 2.3 (lines 245–271), revised text:

The backward pass uses P\mathbf{P} and Q\mathbf{Q} taken at the current solver state. Two facts govern its accuracy. (a) For the splitting step (8), I−DsT=ωK1/2⊤\mathbf{I}-D_{\mathbf{s}}\mathcal{T}=\omega\mathbf{K}_{1/2}^\top holds at every state, converged or not, so the reduced two-stage solve with t=1/2t=1/2 returns exactly the vector of the ambient implicit-differentiation solve at that state. (b) On flat active manifolds (polyhedra), P\mathbf{P} and Q\mathbf{Q} depend only on the identified face, so the gradient is exact as soon as the face is identified (Theorem 2), before the forward pass converges (Figure 8). On curved manifolds (nonlinear constraints) Q\mathbf{Q} also depends on the point, so the gradient is exact only at convergence, with error proportional to the distance of the state from its limit (Appendix A2.4).

Section 3 (lines 274–305), revised text:

The reason is that strict complementarity keeps the residual strictly inside the normal cone, so every point within ϱ\varrho of the argument of each block projection is mapped onto the same active manifold. This holds with any number of constraints, flat or curved; ϱ\varrho is the smallest such radius over the two blocks.

Also changed: the bound for curved faces before convergence (Appendix A2.4) and its test in Figure 9 (Appendix A4.2); Figure 8 (Appendix A4.1); Figure 1, panel (a).

(continued in Part II)

AuthorsOpenReview ↗

Response to Reviewer mvf5 -Part II

Weakness 2 (vague language): Second, the paper uses a lot of vague, somewhat non-scientific … authors include a long list of examples of vague language.

Question 4 (minor edits): Overall, avoid excessive negations. …

Clearer main-text guidance to the appendix contents.

Correction of the duplicated appendix reference: lines 504–505, "Appendices A4 and A4."

Consistent labeling: Figure 2, "test RS" versus "final test RS."

Redundant and ambiguous wording concerning curvature: Lines 15–17, 81–83, and 88–89; particularly "curved tangent directions, where the curvature enters" and "the solve adds curvature."

Line 76 "on every backward pass" -> in every backward pass

Line 91: what is meant by "any solver whose block-projection arguments converge"?

Avoid shorthand expressions that are missing subjects, like in "are the fourth" … "The reduced backward" (Lines 249, 263), "wall-clock" (Lines 271, 356)

Use Phi (Theorem 3) or varphi (PCO) consistently.

Line 116-117: "the middle factor is the backward pass": this … element of (1) part of the full backward pass? …

Response: We thank the reviewer for this frank remark and for the careful list. We rewrote the passages the reviewer quotes and went through Sections 2 and 3 with the same aim, replacing loose phrases by plain statements of what is done; our answers to Weakness 1 above and to Questions 1.a.ii to 1.b.ii below quote the rewritten sentences. From the list above, we corrected "Appendices A4 and A4" and "in every backward pass", the wording about curvature, and the label "final test RS" in Figure 2. Contribution (C2) now states the condition on the solver iterates. We added the missing subjects ("forward pass", "backward pass", "wall-clock time") in the places the reviewer lists, and the sentence about the middle factor now reads "The middle factor, the Jacobian of the projection layer, is what the layer's backward pass computes".

To guide the reader to the appendix, we added pointers to the proofs of Theorem 1 and Proposition 1 and to the worked example in Section 2.1. On the notation, φ\varphi and Φ\Phi are different objects: φ\varphi is the per-context loss and Φ\Phi is its average in (PCO), and the paper now says so where they first appear. Finally, we reduced the negations in the passages we rewrote.

Revisions made to the paper.

Section 2, after equation (1), revised text:

ASPL differentiates the optimality identities (3) of the projection on its active manifold. The result is a smaller system (Theorem 1).

Also changed: the abstract (lines 11–25); the contributions (lines 91–107); the caption of Figure 2; the other rewritten sentences of Sections 2.1 to 3 are quoted under Weakness 1 above and Questions 1.a.ii to 1.b.ii below.


Question (appendix length): As a general comment, the authors are kindly asked to … could be substantially cut are: A1.2, A2.1, A4.6.1, and A2.5.

Response: We thank the reviewer for this suggestion. At the reviewer's request, we cut A4.6.1 to two short paragraphs and removed its figure. We also removed the separate notation section (the few definitions the proofs use now appear where they are first needed), shortened the text throughout Appendix A4, and removed figures and tables that convey messages similar to those of other figures and tables in the paper.

At the same time, the other reviewers asked for additional comparisons and experiments, and some of this material belongs in the sections the reviewer mentions. The comparison with active-set KKT methods extends the related work (A1.2 in the submission), and a worked example with affine, second-order-cone, and semidefinite constraints extends the section on constraint sets (A2.1). With these requested additions, the appendix is still longer than in the submission. We will shorten the section on the training procedure and the stochastic variant (A2.5 in the submission) further in the final version.

Changes to the paper: Appendices A1 and A4.6.

(continued in Part III)

AuthorsOpenReview ↗

Response to Reviewer mvf5 -Part III

Question 1.a.ii (constraint sets): Lines 130–137 It is not clear what the assumptions on … is t in (4) found when C_2 is not convex?

Response: We thank the reviewer for these questions, and we agree with the reviewer that these assumptions may need more explanation. The assumptions on the two sets are Assumptions A and B. Assumption A asks that the feasible set be prox-regular at the solution. Intuitively, the set has no inward corners there: every point closer to the set than a distance RR, its reach, has a unique nearest point, so the projection is well defined and Lipschitz. Convex sets are the case R=∞R=\infty, and nonconvex sets such as spheres and the region outside a ball-shaped obstacle have positive reach, equal to their radius. Assumption B asks that each of the two sets be partly smooth at the solution, that is, look locally like a smooth surface, its active manifold, along which the projection varies smoothly. This surface is a face for a polyhedron, the boundary or the apex for a Lorentz cone, and the matrices of fixed rank for the semidefinite cone. All sets in our experiments satisfy both assumptions (Appendix A2.4).

That C1C_1 is affine in all examples is intended. Splitting the constraints into two sets is a modeling choice, and Section 2.1 now says so: we put the affine constraints in C1C_1, because projecting onto them costs one linear solve with a factor that is computed once, and the remaining constraints in C2C_2. The reviewer is right that projections have no closed form in general. We need one only for C2C_2, and the sets we use there have it (boxes, orthants and Lorentz cones); the semidefinite cone needs one eigendecomposition, and we now also train networks with it.

Finally, tt is not solved for. It only has to keep the point yˉ+tn2\bar y+tn_2 where the projection onto C2C_2 is single-valued, and the Jacobian does not depend on its value. For convex C2C_2 any tt in (0,1](0,1] is admissible, and all sets in our experiments are convex. For a nonconvex, prox-regular C2C_2 any small enough tt works, and we checked this numerically: with C2C_2 a sphere, the Jacobian of Theorem 1 matches the exact one to a relative error below 2×10−132\times10^{-13} for every tt we tried (Appendix A2.4).

Revisions made to the paper.

Section 2.1 (lines 129–181), revised text:

We write C(x)=C1(x)∩C2(x)\mathcal{C}(\mathbf{x})=\mathcal{C}_1(\mathbf{x})\cap\mathcal{C}_2(\mathbf{x}), where each block has a projection that is cheap to evaluate and differentiate. This is a modeling choice, not a property of general sets: we put the affine constraints in C1\mathcal{C}_1, projected by one cached linear solve, and the structured ones in C2\mathcal{C}_2, which in all our experiments has a closed-form projection

Section 2.1 (lines 129–181), revised text:

The scalar tt is not computed: it is a free parameter that only keeps yˉ+tn2\bar{\mathbf{y}}+t\mathbf{n}_2 in the region where ΠC2\Pi_{\mathcal{C}_2} is single-valued. When C2\mathcal{C}_2 is convex we take t=1t=1; when C2\mathcal{C}_2 is prox-regular with radius r2r_2, any $t\lt r_2/\Vert \mathbf{n}_2\Vert $ works (Appendix A2.4).

Appendix A2.4 (nonconvex block), revised text:

We checked this on a nonconvex block: with C2\mathcal{C}_2 a sphere of radius ρ\rho, prox-regular with radius ρ\rho, and C1\mathcal{C}_1 an affine subspace, C\mathcal{C} is again a sphere and its projection has a closed-form Jacobian. On 600600 random instances (dd from 1010 to 200200, 11 to 5050 affine rows, residuals pointing into and out of the sphere), (5) matched it to a relative error below 2×10−132\times10^{-13} for every tt tried, from 0.050.05 to 0.950.95 of the admissible range.

Appendix A4.2, Table 13 added (RS and training time in seconds):

setrankdNd_{\mathbf{N}}ASPL RS / TimeΠ\Pinet RS / Time
PSD 20×2022074.934e-7 / 1821.335e-6 / 450
61891.307e-6 / 1174.649e-6 / 456
101553.331e-6 / 961.511e-5 / 451
141054.314e-6 / 882.045e-5 / 454
18391.820e-6 / 801.042e-5 / 453
PSD 30×3054508.709e-6 / 2981.126e-5 / 665
153454.175e-5 / 1707.277e-5 / 677
251401.256e-5 / 1255.233e-5 / 675
mixed (SOC, PSD, orthant)61461.071e-2 / 2602.628e-2 / 310

Also changed: the examples of constraint sets in Appendix A2.1 (polyhedra, second-order cones, semidefinite cones, balls, intersections).

(continued in Part IV)

Reviewer_uNesOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes Active-Set Projection Layers (ASPL) for neural networks with hard output constraints.

The method first projects the network output onto the feasible set using an optimization solver. It then identifies the active constraints at the projected solution and uses this information to simplify backpropagation. Instead of differentiating through the full optimization system, ASPL solves a smaller linear system involving only the constrained and curved directions.

The authors derive this reduced differentiation system for both flat and curved constraints. They also establish theoretical results for finite-time active-set identification and end-to-end training convergence under regularity assumptions.

Experiments on quadratic programming, robot motion planning, inverse kinematics, maze planning, and constrained flow matching demonstrate accurate constraint satisfaction and improved computational efficiency.

Critical strengths
  1. Efficient differentiation through projection layers. ASPL uses the structure of active constraints to reduce the cost of backpropagation. When relatively few directions are constrained, the backward pass only needs to solve a much smaller linear system. The method also provides a general formulation that handles curved constraints and does not depend on a particular forward solver. This is useful for learning systems that must satisfy hard constraints.

  2. Good theoretical analysis and extensive experiments. The paper provides a detailed derivation of the reduced backward system, together with results on active-set identification and training convergence. The experiments cover both synthetic optimization problems and practical robotics applications. In particular, ASPL achieves accurate gradients and substantial training-time improvements on large quadratic programs. These results demonstrate the practical value of exploiting active constraints during differentiation.

Critical weaknesses
  1. The novelty over existing active-set KKT differentiation is not sufficiently clear. My understanding is that ASPL first solves the projection problem, identifies the active constraints, and then computes the gradient using a reduced linear system. However, this procedure is closely related to classical active-set optimization and KKT sensitivity analysis. Once the active constraints are known, the local optimization problem can be differentiated through its KKT conditions. This approach can also exploit the active constraints to reduce the backward computation. More specifically, dQP (Magoon et al., NeurIPS 2025) already uses the active set to differentiate through black-box QP solvers. For curved constraints, classical KKT differentiation also accounts for curvature through the Hessian of the Lagrangian. ASPL introduces a different matrix decomposition that may provide additional computational advantages, particularly for curved manifolds. However, the paper does not clearly establish how much this formulation improves upon existing reduced KKT approaches. Without a direct theoretical or experimental comparison, it is difficult to assess the novelty and practical significance of the proposed differentiation method.

  2. The experiments do not fully validate the additional benefits claimed for the complete method. The main experimental results demonstrate that reduced backward computation is effective, especially for polyhedral constraints. However, two other important parts of ASPL are not fully evaluated. First, Algorithm 1 proposes reusing previously identified active sets to accelerate the forward projection. Yet the experiments still run the full forward solver during training. Therefore, the reported improvements mainly come from the backward pass, rather than the complete proposed algorithm. Second, extending reduced differentiation to curved constraints is an important theoretical contribution. However, the SOCP experiment uses a dense adjoint solve instead of the proposed reduced system. As a result, the experiments do not directly demonstrate the computational advantage of the curvature-aware reduction. These limitations do not invalidate the demonstrated improvements, but they leave the benefits of the complete method less clear, especially beyond polyhedral constraints.

Questions for authors
  1. Relationship to existing KKT methods: Could the authors explain more explicitly how ASPL differs from active-set KKT differentiation, particularly methods such as dQP? For polyhedral constraints, both approaches identify active constraints and use them to simplify gradient computation. Does ASPL produce a smaller or better-conditioned system, or offer other computational advantages? A comparison under the same forward solver and gradient-accuracy requirements would help clarify the contribution.

  2. Curved constraints: The proposed reduced backward system also handles curved manifolds, but the SOCP experiments use a dense adjoint solve. Could the authors evaluate the reduced formulation directly and compare it with standard KKT differentiation in terms of accuracy, runtime, and system size? This would help establish the practical value of the curvature-aware extension.

  3. Forward acceleration: Algorithm 1 proposes reusing active sets to reduce the cost of the forward solver, but this mechanism is not used in the training experiments. How much additional speedup does it provide in practice? In particular, how often can an active set be reused, and how does its effectiveness change when constraints frequently become active or inactive?

5 comments
AuthorsOpenReview ↗

Response to Reviewer uNes - Part I

We thank the reviewer for the clear summary and the focused questions. Blue text in the revised PDF marks every change. Under each answer we quote the text that we added and show the added tables; figures are cited by their number.

Weakness 1 (novelty over active-set KKT differentiation): The novelty over existing active-set KKT differentiation is not sufficiently … the novelty and practical significance of the proposed differentiation method.

Question 1 (relationship to KKT methods): Relationship to existing KKT … forward solver and gradient-accuracy requirements would help clarify the contribution.

Response: We thank the reviewer for pointing us to dQP and other active-set methods; Section 1 and Appendix A1.1 now discuss them. ASPL differs from them in three ways.

First, we show that, independent of the overall optimization method (active-set or not), the backward system of implicit projection layers that split the feasible set into two or more sets is block lower-triangular (Theorem 1). In the triangular form the free directions form a scalar block that needs no solve, and only the dNd_N normal and curved directions need one small solve.

  • Against implicit layers: Π\Pinet (Grontas et al., ICLR 2026) runs truncated BiCGSTAB on the full system in Rd\mathbb{R}^d, and OptNet (Amos and Kolter, ICML 2017) and cvxpylayers (Agrawal et al., NeurIPS 2019) factor the full KKT-type system. On the other hand, ASPL solves a significantly reduced system compared with these methods when dNd_N is smaller than dd (Table 2).

  • Against active-set and KKT-sensitivity methods: dQP (Magoon et al., NeurIPS 2025) and BPQP (Pan et al., NeurIPS 2024) drop the inactive constraints but keep every primal variable and equality multiplier, so they solve a system of size d+neq+∣J∣d+n_{\mathrm{eq}}+|J|, where dd is the output dimension, neqn_{\mathrm{eq}} the number of equality constraints and ∣J∣|J| the number of active inequality constraints (Table 2); on polyhedra ASPL factors ∣J∣×∣J∣|J|\times|J| (newly added Proposition 2). For curved sets, dQP does not apply (QPs only), and BPQP needs constraint functions and the Lagrangian Hessian with the linear independence constraint qualification (LICQ), which fails at the SOC apex and at low-rank PSD points; ASPL uses only the block projections, which remain differentiable there.

Second, unlike existing active-set extensions, which need a nearly accurate active set to build their KKT systems, ASPL switches adaptively between the ambient space and the active manifold, with theoretical guarantees (Theorems 2–4). Methods such as dQP, BPQP, DDN (Gould et al., TPAMI 2022) and FFOLayer (Zhao et al., ICML 2026) obtain the active set by thresholding the solver output or assume it is correct, and guarantee neither that it is correct nor that training converges for (PCO) (Table 2). ASPL's training (Algorithm 2, Appendix A2.6) introduces a new switching rule: the forward pass stays on the active manifold while the share of the projection displacement in the candidate normal cone stays above a threshold, and returns to the ambient space when it drops below. This rule is what makes active-set identification adaptive during training while keeping its guarantees. To the best of our knowledge, this is the first theoretical guarantee for stochastic active-set optimization in (PCO).

Third, ASPL identifies the active set during training and reuses it in both training and inference, which gives large gains in accuracy and especially in speed, the latter critical in many applications such as control loops.

(this answer continues in the next part)

AuthorsOpenReview ↗

Response to Reviewer uNes - Part II

After the first epoch, on the QP cells of Section 4.1, 9696–9898% of the training samples need no repair, the rest are repaired by changing about two constraints, and no output is wrong (newly added Table 8). Trained this way, ASPL has the best RS among the baselines at 8 of 9 active-set ratios on quadratic programs and the fastest training, and it trains faster than the same layer with the full forward pass at every ratio at d=2000d=2000, at the same RS (Table 1). Its backward pass is 45–217$\times$ faster than dQP's. On second-order cone programs it is feasible on every instance, within 1.5e-3 of the RS of SCS, with the fastest batched inference. On semidefinite programs it has the best RS in every cell and trains 2–6$\times$ faster than the baseline. In multi-robot motion planning it reaches the best objective in 23 of 24 cells, trains faster in 23 and infers faster in 17. In inverse kinematics on real teleoperation logs it has the lowest error and is the fastest, and in flow matching for robot manipulation it has the highest success on all four tasks.

Question 1. Beyond the three high-level points above, we clarify how ASPL differs from dQP when both solve the same quadratic program. As the reviewer asks, we compared them under the same forward solver and the same active set: both return the same gradient to round-off (newly added Table 5), and they differ in three ways:

  • System size. dQP's system grows with all optimization variables, the equality multipliers and the active constraints (d+neq+∣J∣d+n_{\mathrm{eq}}+|J|). ASPL's depends only on the active-set size (∣J∣|J|), and the equality block is factored once when the equality constraints are fixed (newly added Proposition 2).

  • Conditioning. ASPL's reduced system is never worse conditioned than dQP's (Proposition 2) and is better conditioned in our benchmark (Table 5).

  • Exactness. On polyhedra, ASPL identifies the active face automatically, and Theorem 2 guarantees that this face is correct after finitely many solver steps. From then on its gradient is exact, even before the forward pass converges (Figure 8; newly added text in Section 2.3). In training, a stored face that passes the feasibility and sign check gives the exact projection (Algorithm 1). dQP reads its active set off the solver output by a threshold, with no guarantee that it is correct, so its gradient is exact only when that set is right.

Revisions made to the paper.

Section 1 (lines 82–90), revised text:

Dropping inactive constraints from the backward pass is known for polyhedral or partly smooth problems with known support (Niculae et al., 2018; Bertrand et al., 2022), and dQP (Magoon et al., 2025) applies it to any QP solver; BPQP (Pan et al., 2024), FFOLayer (Zhao et al., 2026) and deep declarative networks (Gould et al., 2022) also restrict the backward pass to the active constraints (Appendix A1). For a polyhedral projection, ASPL returns the same gradient as these active-set KKT methods from a smaller per-sample matrix whose condition number is at most theirs (Proposition 2). New here are the block lower-triangular form of the implicit-differentiation system of a projection onto two simple sets, which also covers curved and prox-regular sets (dQP is QP-only), and active-set identification by the layer's own solver before it converges.

(this answer continues in the next part)

AuthorsOpenReview ↗

Response to Reviewer uNes - Part III

Revisions made to the paper (continued).

Appendix A1.1, Table 2 added (ASPL and existing differentiable optimization layers; dd: output dimension, neqn_{\mathrm{eq}}, nineqn_{\mathrm{ineq}}: equalities and inequalities, ∣J∣|J|: active inequalities, dNd_{\mathbf{N}}: size of the reduced system of ASPL; marks: see Appendix A1.1):

MethodConstraint classUses active setActive set guaranteedSystem sizeBackward costRate
OptNetlinear (QP)✗–d+neq+nineqd+n_{\mathrm{eq}} + n_{\mathrm{ineq}}O((d+neq+nineq)3)\mathcal{O}((d+n_{\mathrm{eq}} + n_{\mathrm{ineq}})^3)—
cvxpylayersconvex cones✗––solver-dependent—
Π\Pinet (BiCG)convex, simple projection✗–ddO(κlog⁡1ϵd2)\mathcal{O}(\kappa\log\tfrac{1}{\epsilon} d^2)—
DDNsmooth constraints✓✗$d+\vert J\vert $O((d+∣J∣)3)\mathcal{O}((d+\vert J\vert )^3)—
dQPlinear (QP)✓✗$d+n_{\mathrm{eq}}+\vert J\vert $O((d+neq+∣J∣)3)\mathcal{O}((d+n_{\mathrm{eq}}+\vert J\vert )^3)—
BPQPconvex, smooth✓✗$d+n_{\mathrm{eq}}+\vert J\vert $first-order solver—
FFOLayerconvex✓✗–one extra solve—‡^{\ddagger}
ASPLprox-regular (convex and nonconvex)✓✓dNd_{\mathbf{N}}O(dN3)\mathcal{O}(d_{\mathbf{N}}^3)O(T−1/2)\mathcal{O}(T^{-1/2})
ASPL (CG)prox-regular, on flat faces✓✓dNd_{\mathbf{N}}O(κNlog⁡1ϵdN2)\mathcal{O}(\sqrt{\kappa_{\mathbf{N}}}\log\tfrac{1}{\epsilon} d_{\mathbf{N}}^2)O(T−1/2)†\mathcal{O}(T^{-1/2})^{\dagger}

Appendix A2.5, after Proposition 2, revised text:

The gradient is therefore the same, and only the matrix factored per sample differs. On the QP benchmark, ASPL's backward pass is the fastest at equal accuracy (Table 5). dQP covers QP layers with any positive definite Hessian and returns derivatives with respect to all QP data, while ASPL is a projection layer, so neither contains the other. On curved sets, the formulas of declarative networks (Gould et al., 2022), BPQP (Pan et al., 2024) and Vaiter et al. (2017) solve a system of size about d+∣A∣d+|\mathcal{A}|, one row per variable and per active constraint, while Theorem 1 factors dNd_{\mathbf{N}} directions; on second-order cones of dimension kk, dNd_{\mathbf{N}} is the smaller exactly when the variables outside the cones exceed k−2k-2 per boundary cone (Appendix A4.2).

Appendix A4.1, Table 5 added (backward passes on the lifted QP set; backward time in ms at four active-set ratios):

methodmatrix factored (size at ratio 0.45)condrel. err.ms at 0.05ms at 0.25ms at 0.45ms at 0.75
ASPL$\vert \mathcal{A}\vert $ (900)112.5e-141.85.81434
Schur$n_{\mathrm{eq}}+\vert \mathcal{A}\vert $ (1000)192.3e-142.26.515.738
dQP$d+n_{\mathrm{eq}}+\vert \mathcal{A}\vert $ (3000)952.3e-143896089431520
Dense IFT4000162.5e-141790179017901790
BPQP3000952.8e-61.3e52.1e52.8e55.7e5

Appendix A4.1, Table 9 added (total training time in seconds at three active-set ratios; medians over seeds):

methodd=100 0.05d=100 0.25d=100 0.45d=200 0.05d=200 0.25d=200 0.45
ASPL7172779392101
ASPL-B666366140138170
dQP688198207287384
BPQP5966578392,3012,8973,164
FFOLayer6546507571,5791,5581,598

Appendix A4.1 (backward pass against dQP and BPQP), revised text:

With the same forward, backbone and optimizer, training at ratio 0.450.45 takes 499499 s with ASPL-B (median of 44 seeds) and 6,1906{,}190 s with dQP's KKT backward (median of 22 seeds).

(this answer continues in the next part)


From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.