Positioning: why hard feasibility matters
Many neural decision systems are not allowed to be merely accurate on average. A dispatch model for DC optimal power flow must balance supply and demand. A portfolio model must respect budget and exposure limits. A process-control surrogate may need to output actions that remain inside actuator, safety, or material-balance constraints. In these settings, a small average violation can still be operationally unacceptable.
The paper studies neural network outputs that must satisfy an input-dependent linear feasible set:
Here, is the input or uncertain parameter, such as demand, load, market condition, or system state. The vector is the neural network decision output, such as generation dispatch, portfolio allocation, or control action. The equality constraints represent balance equations or conservation laws. The inequalities represent capacity, safety, line-flow, allocation, or actuator limits.
The practical issue is not just whether violations are rare. In feasibility-critical settings, a learned model can be useless if it needs a separate repair step every time it is deployed. The question is therefore precise: can a neural decision model preserve much of the accuracy of a task-trained network while enforcing hard linear constraints without solving an optimization problem at inference time?
Problem setting
The model receives an input from a specified domain and returns a decision vector . The constraints are linear in , but their coefficients and right-hand sides may depend on . This captures a useful class of engineering problems: the feasible dispatch region changes with load, the feasible portfolio region changes with market features, and the feasible control set changes with state or operating condition.
The paper’s goal is not to learn constraints from data. The constraints are assumed to be known. The learning problem is to produce useful predictions while respecting those constraints by construction. This distinction matters: feasibility is not delegated to statistical generalization alone.
Prior research gap
Several existing strategies can encourage or enforce constraints in neural outputs.
Activation-based designs, such as softmax, sigmoid, or normalization layers, are simple and fast. They work well for special structures such as simplex, box, or positivity constraints. Their limitation is expressiveness: general input-dependent equality and inequality systems cannot usually be encoded by a fixed activation function.
Penalty and regularization methods add violation terms to the loss. They are easy to train and often improve empirical feasibility, but they do not guarantee zero violation unless additional assumptions and limiting arguments hold. A small penalty loss is not the same as hard feasibility.
Projection methods and differentiable optimization layers can map an unconstrained prediction back into the feasible set. These methods can give feasibility when the projection problem is solved correctly, but they require solving an optimization problem at inference time. That cost can be significant when decisions must be made repeatedly or under tight latency.
Other approaches, including gauge mappings, homeomorphic transformations, and feasible-region sampling, can be powerful for particular geometries. The difficulty is that they may require nontrivial characterization of the feasible region or may not scale cleanly to input-dependent linear systems.
The paper targets the middle ground: avoid pure penalties, avoid per-query projection, and still obtain hard feasibility for linear constraints under stated assumptions.
Core idea: safe anchor plus minimal interpolation
The architecture combines two outputs:
The task network is trained for prediction quality and may violate inequalities. The safe network is constructed to be feasible for all . The scalar is the smallest correction amount needed to remove constraint violation along the line segment from the task output to the safe output.
task output, possibly infeasible
f_TN(x)
\
\ move only as much as needed
\
f_psi(x)
\
\
f_SN(x), always feasible
This is best understood as a line-segment correction toward a robustly feasible anchor. The method does not ask a neural network to discover feasibility from examples. It constructs one endpoint that is feasible by robust optimization logic, then uses only as much interpolation toward that endpoint as the violated constraints require.
Mathematical structure: equality and inequality handling
Equality constraints can be handled separately by a closed-form equality projection or adjustment of the task output. After that step, the remaining question is inequality feasibility.
Define the slack of constraint for the task network and safe network:
A nonnegative slack means the constraint is satisfied. A negative slack means it is violated. For the final interpolated output, linearity gives
If a task output already satisfies all inequalities, then is enough. If a constraint is violated, then the interpolation coefficient must be large enough to make its slack nonnegative. The final coefficient is the maximum required correction over the violated constraints.
The intuition is simple. If the safe point has positive or nonnegative slack and the task point violates a constraint, the line segment from the task point to the safe point eventually crosses back into the feasible halfspace. Taking the largest required crossing fraction across constraints enforces all inequalities simultaneously.
Why the safe network is a decision rule
The safe network is not a normal task-trained neural network. It is closer to a robust optimization decision rule. In its basic form,
The matrix is chosen offline so that satisfies the constraints for every . This is analogous to adjustable robust optimization: the decision may depend on the uncertain input, but it must remain feasible over the whole uncertainty set.
The safe output should ideally lie inside the feasible region with useful slack rather than exactly on the boundary. A deeper feasible anchor can reduce the amount of interpolation needed. If the safe point is barely feasible, many task outputs may need large corrections, which can damage prediction quality.
Tractable formulations
The supplied material distinguishes two cases.
In the more general input-dependent left-hand-side case, the constraint matrix depends on . Robust feasibility of a linear decision rule can then lead to quadratic constraints. The paper uses an SDP-type inner approximation for tractability. This can be conservative: failure to find such a decision rule does not necessarily mean no feasible rule exists.
In the jointly linear case, the left-hand side is fixed while the right-hand side depends linearly on . Robust linear constraints can then be reformulated using LP duality. This is cleaner and more directly useful for problems such as DC-OPF, where linear physics and uncertain loads naturally produce structured linear constraints.
The distinction is important. The hard-feasibility architecture is conceptually simple, but the offline construction of the safe anchor may still be the difficult part.
What is mathematically guaranteed
The core feasibility guarantee is conditional and structural. Under the stated assumptions, if the task output satisfies the equality constraints, if the safe output is feasible for all , if the feasible set is defined by linear equality and inequality constraints, and if is computed exactly as the minimum required interpolation amount, then the final output satisfies the hard linear constraints.
This guarantee is independent of neural network prediction accuracy. The task network may generalize poorly, but feasibility still follows from the safe anchor and interpolation rule as long as the input lies in the assumed domain and the safe decision rule is valid.
For the robust reformulation, the LP formulation in the jointly linear case is relatively clean because it follows from robust linear constraint duality. The SDP formulation for more general input dependence is an inner approximation, so it may be conservative.
The supplied material also points to a universal approximation result. That result should be read cautiously. It depends on strong expressiveness assumptions and should not be interpreted as saying that a practical linear decision-rule implementation is universally expressive in finite data, finite width, or numerically constrained settings.
Distinctive contribution
The distinctive contribution is the way the paper separates feasibility certification from task prediction. A standard task network is allowed to focus on predictive quality. A separate decision-rule anchor is constructed offline to be feasible over the uncertainty set. The final output is then obtained by an explicit interpolation rule whose only job is to restore hard linear feasibility.
This is more specific than adding a penalty to the loss and less computationally heavy than solving a projection problem at every inference call. The paper’s original design choice is to make the safe endpoint a robust decision rule, then compute the minimum line-segment movement needed to satisfy the violated linear inequalities. Feasibility comes from the geometry of linear constraints and the validity of the safe anchor, not from the task network learning the feasible set.
This contribution is especially relevant to safe and constrained learning because many safety filters repair a learned action by solving an online optimization problem. Here, after the safe rule has been built, the repair is algebraic: check slacks, identify the most restrictive violated constraint, and interpolate only as much as required. The result is a fast feasibility layer with a clear certificate, while still leaving objective optimality and nonlinear constraint handling outside the guarantee.
Assumptions and limitations
First, the method is mainly suited to linear equality and inequality constraints. It does not directly handle nonlinear process constraints, complementarity constraints, binary decisions, or strongly nonconvex feasible regions.
Second, the method may become harder to use when the number of constraints is very large. The interpolation coefficient depends on constraint-wise slacks, and the most restrictive violated constraints dominate the correction.
Third, the method may be sensitive when constraint scales differ substantially. Poorly scaled constraints can make the interpolation correction numerically unbalanced, so constraint normalization or scaling may be necessary.
Fourth, the correction is feasibility-oriented rather than objective-oriented. The interpolation coefficient is chosen to remove linear constraint violations, not to minimize the original cost, reward loss, economic objective, or downstream control objective over the feasible region. Therefore, the corrected output can be hard-feasible without being the best feasible decision for the task objective.
These limitations do not undermine the main idea. They specify where the guarantee lives: linear constraints, a valid uncertainty set, and a tractable safe decision rule.
Critical assessment
The paper’s strongest point is the clean separation between accuracy and feasibility. The task network carries predictive power. The safe decision rule carries robust feasibility. The interpolation coefficient links them through a transparent algebraic correction.
The main caveat is that the burden has not disappeared. It has moved offline into the construction of a robustly feasible decision-rule anchor and into the assumption that the deployment input belongs to the specified uncertainty set. If that set is misspecified, if the safe rule is too conservative, or if the constraint representation omits important nonlinear physics, the practical value can weaken even though the linear feasibility statement remains true within its scope.
This is a useful contribution precisely because it avoids a common overclaim. It does not make a neural network magically learn feasibility. It uses robust optimization to construct a feasible anchor, then corrects a task-trained output toward that anchor by the minimum amount required to satisfy hard linear constraints. The main strength is the combination of hard feasibility and fast inference. The main restriction is that the guarantee is tied to linear constraints, a valid uncertainty set, and a tractable safe decision rule.
References
- Constante-Flores, G. E., Chen, H., & Li, C. (2025). Enforcing hard linear constraints in deep learning models with decision rules. arXiv preprint arXiv:2505.13858.