DiffSlack: Learning under Nonlinear Inequality Constraints via Learnable Slack Variables

arXiv cs.LG Papers

Summary

DiffSlack proposes a differentiable projection layer that enforces nonlinear inequality constraints in neural networks by reformulating them as equalities with learnable slack variables, achieving improved feasibility and planning success in vehicle path planning.

arXiv:2606.05247v1 Announce Type: new Abstract: Enforcing nonlinear inequality constraints in neural networks remains challenging, especially when the output is subject to many coupled constraints. Existing hard constraint methods often impose structural restrictions on the constraint set or introduce substantial computational overhead for large-scale nonlinear problems. Here, we propose DiffSlack, a differentiable projection layer for nonlinear inequality-constrained neural prediction. DiffSlack reformulates inequalities as equalities with learnable slack variables, which are predicted as part of the augmented network output and provide a data-driven warm start for damped Gauss-Newton projection. The projection layer maps raw predictions onto the augmented feasible manifold while preserving end-to-end differentiability. A two-stage curriculum further stabilizes training and improves constraint satisfaction. We evaluate DiffSlack on vehicle path planning with 200 nonlinear inequality constraints from collision avoidance, curvature limits, and waypoint spacing. Compared with existing learning-based baselines, DiffSlack achieves a higher planning success rate and stronger geometric constraint satisfaction under a comparable inference budget. Ablation studies further show that the hard projection layer reduces sensitivity to supervision quality. Closed-loop tracking in CARLA and real-world vehicle experiments confirms the executability of the generated trajectories. These results demonstrate that DiffSlack provides a practical and scalable approach to embedding hard inequality constraints into neural networks for engineering applications.
Original Article
View Cached Full Text

Cached at: 06/05/26, 08:09 AM

# DiffSlack: Learning under Nonlinear Inequality Constraints via Learnable Slack Variables
Source: [https://arxiv.org/html/2606.05247](https://arxiv.org/html/2606.05247)
Ziqian Wang &Chenxi Fang &Zhen ZhangCorresponding author: Z\. Zhang \(e\-mail: zzhang@tsinghua\.edu\.cn\)\. Ziqian Wang and Zhen Zhang are with the State Key Laboratory of Tribology in Advanced Equipment, Tsinghua University, Beijing 100084, China and are with the Beijing Key Laboratory of Transformative High\-end Manufacturing Equipment and Technology, Department of Mechanical Engineering, Tsinghua University, Beijing 100084, China\. Chenxi Fang is with the Automotive Electronics Business Unit at Hirain Inc\., China\.

###### Abstract

Enforcing nonlinear inequality constraints in neural networks remains challenging, especially when the output is subject to many coupled constraints\. Existing hard constraint methods often impose structural restrictions on the constraint set or introduce substantial computational overhead for large\-scale nonlinear problems\. Here, we propose DiffSlack, a differentiable projection layer for nonlinear inequality\-constrained neural prediction\. DiffSlack reformulates inequalities as equalities with learnable slack variables, which are predicted as part of the augmented network output and provide a data\-driven warm start for damped Gauss\-Newton projection\. The projection layer maps raw predictions onto the augmented feasible manifold while preserving end\-to\-end differentiability\. A two\-stage curriculum further stabilizes training and improves constraint satisfaction\. We evaluate DiffSlack on vehicle path planning with 200 nonlinear inequality constraints from collision avoidance, curvature limits, and waypoint spacing\. Compared with existing learning\-based baselines, DiffSlack achieves a higher planning success rate and stronger geometric constraint satisfaction under a comparable inference budget\. Ablation studies further show that the hard projection layer reduces sensitivity to supervision quality\. Closed\-loop tracking in CARLA and real\-world vehicle experiments confirms the executability of the generated trajectories\. These results demonstrate that DiffSlack provides a practical and scalable approach to embedding hard inequality constraints into neural networks for engineering applications\.

## 1Introduction

Embedding domain knowledge into neural networks has become an important direction for improving the reliability and physical consistency of learned models\[[21](https://arxiv.org/html/2606.05247#bib.bib33),[13](https://arxiv.org/html/2606.05247#bib.bib37),[50](https://arxiv.org/html/2606.05247#bib.bib41)\]\. Feasibility constraints are a central form of such knowledge\. They encode physical laws, safety limits, and operational requirements that model outputs must satisfy during deployment\. However, standard neural networks are primarily trained to minimize prediction losses and do not guarantee constraint satisfaction at inference time\. As a result, even accurate predictors may produce infeasible or unsafe outputs when deployed in safety\-critical systems\. This gap between predictive accuracy and feasibility has motivated growing interest in constrained neural prediction\[[11](https://arxiv.org/html/2606.05247#bib.bib49),[41](https://arxiv.org/html/2606.05247#bib.bib50),[28](https://arxiv.org/html/2606.05247#bib.bib48)\]\.

Existing approaches can be broadly grouped into three categories, as illustrated in Fig\.[1](https://arxiv.org/html/2606.05247#S1.F1)\. The first incorporates constraints as soft penalty terms in the training objective\[[34](https://arxiv.org/html/2606.05247#bib.bib35),[19](https://arxiv.org/html/2606.05247#bib.bib34),[36](https://arxiv.org/html/2606.05247#bib.bib31)\]\. This strategy is simple and widely applicable, but constraint satisfaction depends on penalty weights and training data coverage\. Consequently, violations can still occur at inference time, especially under distribution shift or competing task objectives\. The second category applies post\-hoc safety filters, such as control barrier functions and predictive safety shields\[[49](https://arxiv.org/html/2606.05247#bib.bib14),[39](https://arxiv.org/html/2606.05247#bib.bib32),[42](https://arxiv.org/html/2606.05247#bib.bib30),[2](https://arxiv.org/html/2606.05247#bib.bib42)\]\. These methods can enforce safety during deployment, but the correction is usually applied outside the prediction model\. This weakens end\-to\-end supervision and can create a mismatch between the network output and the corrected action\. The third category embeds differentiable constraint enforcement layers into neural networks\[[25](https://arxiv.org/html/2606.05247#bib.bib27),[32](https://arxiv.org/html/2606.05247#bib.bib29),[29](https://arxiv.org/html/2606.05247#bib.bib4),[16](https://arxiv.org/html/2606.05247#bib.bib3),[3](https://arxiv.org/html/2606.05247#bib.bib18)\]\. These methods allow the learning objective to account for the corrected output and can provide stronger feasibility guarantees\. However, enforcing general nonlinear inequality constraints remains challenging, particularly when the number of constraints is large and the projection must be computed efficiently\.

![Refer to caption](https://arxiv.org/html/2606.05247v1/x1.png)Figure 1:Comparison of three approaches to constraint handling in neural networks\. \(a\) Soft constraints incorporate constraints as penalty terms in the loss function but provide no feasibility guarantee at inference time\. \(b\) Post\-hoc filters enforce constraints after prediction, which can create a mismatch between raw network outputs and corrected actions\. \(c\) Hard constraint neural networks embed a differentiable constraint layer that enforces feasibility while preserving end\-to\-end gradient flow\.To address these challenges, we propose DiffSlack, a differentiable hard constraint projection framework for high\-dimensional nonlinear inequality constraints\. The key idea is to reformulate inequalities as equalities with learnable slack variables\. Unlike conventional auxiliary variables that are introduced only inside a solver, the slack variables in DiffSlack are predicted together with the task output\. They therefore provide an amortized initialization of inactive constraint margins before projection\. A damped Gauss\-Newton projection layer then maps the augmented output onto the equality manifold defined by the slack reformulation\. This layer is differentiable and can be inserted into the network for end\-to\-end training\. To stabilize optimization, we further use a two\-stage curriculum learning\[[5](https://arxiv.org/html/2606.05247#bib.bib6)\]\. The first stage trains the predictor with soft constraint losses and slack calibration, while the second stage activates the hard projection layer\. This design allows the projection module to enforce feasibility while also providing task\-aware correction signals during training\.

We evaluate DiffSlack on constrained vehicle path planning, where the output trajectory must satisfy 200 coupled nonlinear inequality constraints from collision avoidance, curvature limits, and waypoint spacing\. Our experiments compare DiffSlack with classical planners, soft\-constrained learning, DC3\[[16](https://arxiv.org/html/2606.05247#bib.bib3)\], and ENFORCE\[[29](https://arxiv.org/html/2606.05247#bib.bib4)\]\. The results show that DiffSlack achieves a stronger trade\-off among planning success, geometric constraint satisfaction, and computation time than existing learning\-based methods\. We further validate the generated trajectories in CARLA\[[17](https://arxiv.org/html/2606.05247#bib.bib10)\]and on a physical vehicle\.

The main contributions of this work are as follows:

1. 1\.DiffSlack provides a scalable differentiable projection framework for neural prediction under nonlinear inequality constraints, with learnable slack variables serving as a data\-driven initialization for iterative projection\. Theoretical analysis characterizes the local convergence behavior and numerical conditioning\.
2. 2\.A two\-stage curriculum strategy is proposed to stabilize end\-to\-end training with the hard projection layer, enabling the network to approach the feasible manifold before projection is activated\.
3. 3\.Experiments on large\-scale constrained path planning with 200 nonlinear inequality constraints demonstrate that DiffSlack achieves higher success rates and better geometric constraint satisfaction than representative learning\-based baselines\. CARLA simulation and real\-world vehicle tracking further validate the executability of the generated trajectories\.

## 2Related Work

Soft constraint methods incorporate physical and operational requirements as penalty terms in the training objective, including penalty\-based regularization\[[12](https://arxiv.org/html/2606.05247#bib.bib53),[47](https://arxiv.org/html/2606.05247#bib.bib45),[36](https://arxiv.org/html/2606.05247#bib.bib31)\]and Lagrangian duality methods\[[19](https://arxiv.org/html/2606.05247#bib.bib34),[34](https://arxiv.org/html/2606.05247#bib.bib35)\]\. These approaches are simple and broadly applicable, but they do not guarantee constraint satisfaction at inference time\. Their effectiveness depends on penalty weights, optimization quality, and the coverage of the training data\. Post\-hoc safety filters, such as control barrier functions\[[49](https://arxiv.org/html/2606.05247#bib.bib14),[2](https://arxiv.org/html/2606.05247#bib.bib42)\]and predictive safety shields\[[42](https://arxiv.org/html/2606.05247#bib.bib30),[43](https://arxiv.org/html/2606.05247#bib.bib46)\], enforce constraints after prediction\. They can provide strong deployment\-time safety, but the correction is usually applied outside the prediction model\. This may create a mismatch between the raw network output and the corrected action, especially when large corrections are frequently required\. A more integrated strategy is to embed constraint satisfaction directly into the network architecture through differentiable enforcement layers\[[26](https://arxiv.org/html/2606.05247#bib.bib47)\]\. Such methods allow the training objective to account for the corrected output and can provide stronger feasibility guarantees\. We review them below according to the class of constraints they address\.

##### Linear constraints

A line of work exploits the algebraic structure of linear or affine constraints to design efficient enforcement layers with closed\-form or iterative solutions\. HCP\[[10](https://arxiv.org/html/2606.05247#bib.bib43)\]guarantees that network predictions satisfy finite\-difference discretizations of governing PDEs via closed\-form projection, but it is limited to linear equality constraints\. LOOP\-LC\[[30](https://arxiv.org/html/2606.05247#bib.bib52)\]maps neural outputs from anℓ∞\\ell\_\{\\infty\}\-norm unit ball to the feasible set through a gauge map, achieving iteration\-free feasibility for hard linear equality and inequality constraints, but relying on linear structure and an available interior point\. LinSATNet\[[45](https://arxiv.org/html/2606.05247#bib.bib19)\]proposes a Sinkhorn\-based iterative scheme for positive linear constraints on input\-independent outputs\. GLinSAT\[[48](https://arxiv.org/html/2606.05247#bib.bib20)\]extends this framework to general linear constraints, with feasibility guarantees that tighten as the number of iterations increases\. KKT\-hPINN\[[9](https://arxiv.org/html/2606.05247#bib.bib21)\]embeds input\-dependent linear equality constraints into physics\-informed networks via KKT conditions and achieves strict feasibility through a closed\-form projection, but it is confined to equality constraints\. HardNet\[[33](https://arxiv.org/html/2606.05247#bib.bib22)\]handles input\-dependent affine equality and inequality constraints through a parallel projection layer with a closed\-form forward pass, and establishes universal approximation guarantees under the constrained architecture\.

##### Convex constraints

Beyond methods that exploit linear or affine structure, another line of work formulates more general convex feasibility or optimization problems as differentiable layers\. OptNet\[[3](https://arxiv.org/html/2606.05247#bib.bib18)\]embeds a quadratic program into the network and computes gradients via implicit differentiation through the KKT conditions\. CvxpyLayers\[[1](https://arxiv.org/html/2606.05247#bib.bib23)\]generalizes this idea to convex programs expressible in CVXPY, enabling broader constraint coverage at the cost of solving an optimization problem during the forward pass\. To reduce this overhead, RAYEN\[[40](https://arxiv.org/html/2606.05247#bib.bib24)\]guarantees feasibility by scaling the step length along a ray from a known interior point\. It supports linear, convex quadratic, second\-order cone, and linear matrix inequality constraints with low computational cost\. PiNet\[[23](https://arxiv.org/html/2606.05247#bib.bib25)\]appends an orthogonal projection layer computed by Douglas\-Rachford splitting, with gradients obtained through the implicit function theorem\. It supports general convex constraints, including input\-dependent ones\.

##### General nonlinear constraints

Extending hard constraint enforcement to general nonlinear constraints is more challenging\. DC3\[[16](https://arxiv.org/html/2606.05247#bib.bib3)\]addresses nonlinear equality and inequality constraints by combining equality completion with gradient\-based correction\. However, its convergence can be sensitive to step size selection and may require many iterations for tight feasibility\. BarrierNet\[[46](https://arxiv.org/html/2606.05247#bib.bib26)\]embeds differentiable control barrier functions into quadratic program layers for end\-to\-end safe learning, targeting systems whose safety constraints are defined through control\-affine dynamics\. ENFORCE\[[29](https://arxiv.org/html/2606.05247#bib.bib4)\]applies adaptive\-depth Gauss\-Newton projection with closed\-form updates at each step and handles inequality constraints through a Fischer\-Burmeister reformulation in an augmented multiplier space\. KKT\-HardNet\[[25](https://arxiv.org/html/2606.05247#bib.bib27)\]constructs the full KKT system of the projection problem and solves it with Newton or Gauss\-Newton iterations, optionally after log\-exponential transformations of nonlinear algebraic terms\. Although this formulation can enforce nonlinear equality and inequality constraints to high precision, each inequality introduces additional slack variables, dual multipliers, and complementarity equations, leading to a large primal\-dual nonlinear system\. This overhead can become prohibitive for large\-scale inequality\-constrained prediction problems\. Homeomorphic Projection\[[31](https://arxiv.org/html/2606.05247#bib.bib28)\]learns a minimum\-distortion mapping between the constraint set and a unit ball via an invertible neural network, then recovers feasibility through bisection along the mapped radius\. This provides feasibility guarantees for ball\-homeomorphic constraint sets, but the optimality bound depends on the distortion of the learned mapping\. Bisection Projection\[[32](https://arxiv.org/html/2606.05247#bib.bib29)\]relaxes the topological requirement by training an auxiliary network to predict interior points of the feasible set, followed by bisection from these points to recover feasibility for general compact sets\. Both methods introduce additional networks, which increase training complexity and may introduce approximation error\. These limitations motivate a direct and scalable projection mechanism for nonlinear inequality\-constrained neural prediction\.

## 3Methodology

Letfθ:𝒳→ℝNOf\_\{\\theta\}:\\mathcal\{X\}\\rightarrow\\mathbb\{R\}^\{N\_\{O\}\}be a neural network that maps an input𝐱∈𝒳\\mathbf\{x\}\\in\\mathcal\{X\}to a raw prediction𝐩^=fθ​\(𝐱\)\\hat\{\\mathbf\{p\}\}=f\_\{\\theta\}\(\\mathbf\{x\}\)\. The prediction is required to satisfyNCN\_\{C\}input\-dependent nonlinear inequality constraints

𝐠​\(𝐱,𝐩\)≤𝟎,𝐠:𝒳×ℝNO→ℝNC\.\\mathbf\{g\}\(\\mathbf\{x\},\\mathbf\{p\}\)\\leq\\mathbf\{0\},\\qquad\\mathbf\{g\}:\\mathcal\{X\}\\times\\mathbb\{R\}^\{N\_\{O\}\}\\rightarrow\\mathbb\{R\}^\{N\_\{C\}\}\.\(1\)The ideal correction is the nearest feasible point to the raw prediction:

𝐩∗=argmin𝐩12∥𝐩−𝐩^∥22s\.t\.𝐠\(𝐱,𝐩\)≤𝟎\.\\mathbf\{p\}^\{\*\}=\\underset\{\\mathbf\{p\}\}\{\\mathrm\{argmin\}\}\\;\\frac\{1\}\{2\}\\\|\\mathbf\{p\}\-\\hat\{\\mathbf\{p\}\}\\\|\_\{2\}^\{2\}\\quad\\mathrm\{s\.t\.\}\\quad\\mathbf\{g\}\(\\mathbf\{x\},\\mathbf\{p\}\)\\leq\\mathbf\{0\}\.\(2\)During projection,𝐱\\mathbf\{x\}is fixed\. We therefore write𝐠​\(𝐩\)\\mathbf\{g\}\(\\mathbf\{p\}\)for brevity, while all input\-dependent quantities are treated as constants with respect to𝐩\\mathbf\{p\}\.

###### Assumption 1\(Feasibility\)\.

For every𝐱∈𝒳\\mathbf\{x\}\\in\\mathcal\{X\}, the feasible set\{𝐩∈ℝNO∣𝐠​\(𝐱,𝐩\)≤𝟎\}\\\{\\mathbf\{p\}\\in\\mathbb\{R\}^\{N\_\{O\}\}\\mid\\mathbf\{g\}\(\\mathbf\{x\},\\mathbf\{p\}\)\\leq\\mathbf\{0\}\\\}is non\-empty\.

DiffSlack embeds the correction in Eq\. \([2](https://arxiv.org/html/2606.05247#S3.E2)\) as a differentiable projection layer\. The main idea is to convert inequalities into an augmented equality manifold with learnable slack variables, and then project raw predictions onto this manifold through a Gauss\-Newton layer\. Figure[2](https://arxiv.org/html/2606.05247#S3.F2)illustrates the overall framework\.

![Refer to caption](https://arxiv.org/html/2606.05247v1/x2.png)Figure 2:Overall framework and geometric intuition of DiffSlack\. The network predicts both the task output𝐩^\\hat\{\\mathbf\{p\}\}and slack variables𝐬^\\hat\{\\mathbf\{s\}\}\. Inequality constraints are reformulated as an equality manifoldℳ\\mathcal\{M\}through𝐡​\(𝐲\)=𝟎\\mathbf\{h\}\(\\mathbf\{y\}\)=\\mathbf\{0\}\. Stage I learns slack variables that approximate the inactive\-side constraint margin and moves raw predictions toward the reach tube ofℳ\\mathcal\{M\}\. Stage II activates the differentiable Gauss\-Newton projection layer, producing feasible outputs while preserving end\-to\-end gradient flow\.### 3\.1Slack Variable Reformulation

Inequality constraints define a feasible region rather than a smooth equality manifold\. To obtain a differentiable projection target, we introduce slack variables𝐬∈ℝNC\\mathbf\{s\}\\in\\mathbb\{R\}^\{N\_\{C\}\}and define the augmented state

𝐲=\[𝐩⊤𝐬⊤\]⊤∈ℝNO\+NC\.\\mathbf\{y\}=\\begin\{bmatrix\}\\mathbf\{p\}^\{\\top\}&\\mathbf\{s\}^\{\\top\}\\end\{bmatrix\}^\{\\top\}\\in\\mathbb\{R\}^\{N\_\{O\}\+N\_\{C\}\}\.\(3\)Each inequality is reformulated as

𝐡​\(𝐲\)=𝐠​\(𝐩\)\+𝐬⊙𝐬=𝟎,\\mathbf\{h\}\(\\mathbf\{y\}\)=\\mathbf\{g\}\(\\mathbf\{p\}\)\+\\mathbf\{s\}\\odot\\mathbf\{s\}=\\mathbf\{0\},\(4\)where⊙\\odotdenotes the Hadamard product\. Since𝐬⊙𝐬\\mathbf\{s\}\\odot\\mathbf\{s\}is elementwise nonnegative, feasibility on the augmented manifold implies feasibility of the original inequalities\.

###### Theorem 1\(Inequality satisfaction\)\.

For any𝐲=\[𝐩⊤,𝐬⊤\]⊤\\mathbf\{y\}=\[\\mathbf\{p\}^\{\\top\},\\mathbf\{s\}^\{\\top\}\]^\{\\top\}, if𝐡​\(𝐲\)=𝟎\\mathbf\{h\}\(\\mathbf\{y\}\)=\\mathbf\{0\}, then𝐠​\(𝐩\)≤𝟎\\mathbf\{g\}\(\\mathbf\{p\}\)\\leq\\mathbf\{0\}\.

###### Proof\.

From Eq\. \([4](https://arxiv.org/html/2606.05247#S3.E4)\),𝐡​\(𝐲\)=𝟎\\mathbf\{h\}\(\\mathbf\{y\}\)=\\mathbf\{0\}gives𝐠​\(𝐩\)=−𝐬⊙𝐬\\mathbf\{g\}\(\\mathbf\{p\}\)=\-\\mathbf\{s\}\\odot\\mathbf\{s\}\. Since𝐬⊙𝐬≥𝟎\\mathbf\{s\}\\odot\\mathbf\{s\}\\geq\\mathbf\{0\}elementwise, the result follows\. ∎

The augmented Jacobian is

𝐉𝐡​\(𝐲\)=\[𝐉𝐠​\(𝐩\)\|diag​\(2​𝐬\)\],\\mathbf\{J\}\_\{\\mathbf\{h\}\}\(\\mathbf\{y\}\)=\\left\[\\mathbf\{J\}\_\{\\mathbf\{g\}\}\(\\mathbf\{p\}\)\\;\\Big\|\\;\\mathrm\{diag\}\(2\\mathbf\{s\}\)\\right\],\(5\)where𝐉𝐠​\(𝐩\)∈ℝNC×NO\\mathbf\{J\}\_\{\\mathbf\{g\}\}\(\\mathbf\{p\}\)\\in\\mathbb\{R\}^\{N\_\{C\}\\times N\_\{O\}\}\. The diagonal slack block provides an independent correction direction for each inequality constraint in the augmented space\. This structure improves the local conditioning of the linearized projection system whenever the corresponding slack variables are nonzero, while near\-degenerate cases are stabilized by the damped solve in Section[3\.3](https://arxiv.org/html/2606.05247#S3.SS3)\.

### 3\.2Learned Slack as Margin Prediction

The slack variables in DiffSlack are not passive solver variables\. They are predicted by the network and serve as a data\-driven estimate of the inactive\-side constraint margin\. For a raw prediction𝐩^\\hat\{\\mathbf\{p\}\}, define

𝐪​\(𝐩^\):=\[−𝐠​\(𝐩^\)\]\+,\[𝐯\]\+=\(max⁡\{vi,0\}\)i=1NC\.\\mathbf\{q\}\(\\hat\{\\mathbf\{p\}\}\):=\[\-\\mathbf\{g\}\(\\hat\{\\mathbf\{p\}\}\)\]\_\{\+\},\\qquad\[\\mathbf\{v\}\]\_\{\+\}=\(\\max\\\{v\_\{i\},0\\\}\)\_\{i=1\}^\{N\_\{C\}\}\.\(6\)Here,\[𝐠​\(𝐩^\)\]\+\[\\mathbf\{g\}\(\\hat\{\\mathbf\{p\}\}\)\]\_\{\+\}denotes active constraint violation, while𝐪​\(𝐩^\)\\mathbf\{q\}\(\\hat\{\\mathbf\{p\}\}\)denotes the margin of constraints that are already satisfied\. Let𝐪^=𝐬^⊙𝐬^\\hat\{\\mathbf\{q\}\}=\\hat\{\\mathbf\{s\}\}\\odot\\hat\{\\mathbf\{s\}\}\. The equality residual can then be decomposed as

𝐡​\(𝐲^\)=𝐠​\(𝐩^\)\+𝐪^=\[𝐠​\(𝐩^\)\]\+\+\(𝐪^−𝐪​\(𝐩^\)\)\.\\mathbf\{h\}\(\\hat\{\\mathbf\{y\}\}\)=\\mathbf\{g\}\(\\hat\{\\mathbf\{p\}\}\)\+\\hat\{\\mathbf\{q\}\}=\[\\mathbf\{g\}\(\\hat\{\\mathbf\{p\}\}\)\]\_\{\+\}\+\\big\(\\hat\{\\mathbf\{q\}\}\-\\mathbf\{q\}\(\\hat\{\\mathbf\{p\}\}\)\\big\)\.\(7\)This decomposition separates the residual into active constraint violation and slack estimation error\. With zero slack initialization, the equality residual also contains the inactive\-margin term−𝐪​\(𝐩^\)\-\\mathbf\{q\}\(\\hat\{\\mathbf\{p\}\}\), even for constraints that are already satisfied\. In contrast, when the predicted squared slack𝐪^\\hat\{\\mathbf\{q\}\}approximates𝐪​\(𝐩^\)\\mathbf\{q\}\(\\hat\{\\mathbf\{p\}\}\), this inactive\-margin component is absorbed before projection\.

To quantify this effect, suppose the learned squared slack𝐪^L\\hat\{\\mathbf\{q\}\}\_\{L\}approximates𝐪​\(𝐩^\)\\mathbf\{q\}\(\\hat\{\\mathbf\{p\}\}\)with mean\-square errorεL2\\varepsilon\_\{L\}^\{2\}, and the estimation error is conditionally zero\-mean given𝐩^\\hat\{\\mathbf\{p\}\}:

𝔼​\[‖𝐪^L−𝐪​\(𝐩^\)‖22\]=εL2\.\\mathbb\{E\}\\left\[\\\|\\hat\{\\mathbf\{q\}\}\_\{L\}\-\\mathbf\{q\}\(\\hat\{\\mathbf\{p\}\}\)\\\|\_\{2\}^\{2\}\\right\]=\\varepsilon\_\{L\}^\{2\}\.\(8\)Taking the squared norm of Eq\. \([7](https://arxiv.org/html/2606.05247#S3.E7)\) and using the zero\-mean assumption to remove the cross term gives

𝔼​\[‖𝐡​\(𝐲^L\)‖22\]=𝔼​\[‖\[𝐠​\(𝐩^\)\]\+‖22\]\+εL2\.\\mathbb\{E\}\\left\[\\\|\\mathbf\{h\}\(\\hat\{\\mathbf\{y\}\}\_\{L\}\)\\\|\_\{2\}^\{2\}\\right\]=\\mathbb\{E\}\\left\[\\\|\[\\mathbf\{g\}\(\\hat\{\\mathbf\{p\}\}\)\]\_\{\+\}\\\|\_\{2\}^\{2\}\\right\]\+\\varepsilon\_\{L\}^\{2\}\.\(9\)For zero slack initialization𝐪^0=𝟎\\hat\{\\mathbf\{q\}\}\_\{0\}=\\mathbf\{0\}, the residual becomes𝐡​\(𝐲^0\)=𝐠​\(𝐩^\)\\mathbf\{h\}\(\\hat\{\\mathbf\{y\}\}\_\{0\}\)=\\mathbf\{g\}\(\\hat\{\\mathbf\{p\}\}\)\. Since\[𝐠\]\+\[\\mathbf\{g\}\]\_\{\+\}and\[−𝐠\]\+\[\-\\mathbf\{g\}\]\_\{\+\}have disjoint elementwise support,

𝔼​\[‖𝐡​\(𝐲^0\)‖22\]=𝔼​\[‖\[𝐠​\(𝐩^\)\]\+‖22\]\+𝔼​\[‖\[−𝐠​\(𝐩^\)\]\+‖22\]\.\\mathbb\{E\}\\left\[\\\|\\mathbf\{h\}\(\\hat\{\\mathbf\{y\}\}\_\{0\}\)\\\|\_\{2\}^\{2\}\\right\]=\\mathbb\{E\}\\left\[\\\|\[\\mathbf\{g\}\(\\hat\{\\mathbf\{p\}\}\)\]\_\{\+\}\\\|\_\{2\}^\{2\}\\right\]\+\\mathbb\{E\}\\left\[\\\|\[\-\\mathbf\{g\}\(\\hat\{\\mathbf\{p\}\}\)\]\_\{\+\}\\\|\_\{2\}^\{2\}\\right\]\.\(10\)Therefore, learned slack reduces the expected equality residual whenever its estimation error is smaller than the inactive\-margin energy\.

Letℳ=\{𝐲∈ℝNO\+NC∣𝐡​\(𝐲\)=𝟎\}\\mathcal\{M\}=\\\{\\mathbf\{y\}\\in\\mathbb\{R\}^\{N\_\{O\}\+N\_\{C\}\}\\mid\\mathbf\{h\}\(\\mathbf\{y\}\)=\\mathbf\{0\}\\\}be the augmented feasible manifold\. We consider a regular local tube aroundℳ\\mathcal\{M\}, where𝐡\\mathbf\{h\}is twice continuously differentiable,𝐉𝐡\\mathbf\{J\}\_\{\\mathbf\{h\}\}is Lipschitz continuous, and its smallest singular value is uniformly bounded below by a constantσ−\>0\\sigma\_\{\-\}\>0:

σmin​\(𝐉𝐡​\(𝐲\)\)≥σ−\.\\sigma\_\{\\min\}\\left\(\\mathbf\{J\}\_\{\\mathbf\{h\}\}\(\\mathbf\{y\}\)\\right\)\\geq\\sigma\_\{\-\}\.\(11\)Under this standard local regularity condition, the residual controls the Euclidean distance to the manifold:

dist⁡\(𝐲^,ℳ\)≤2​σ−−1​‖𝐡​\(𝐲^\)‖2\.\\operatorname\{dist\}\(\\hat\{\\mathbf\{y\}\},\\mathcal\{M\}\)\\leq 2\\sigma\_\{\-\}^\{\-1\}\\\|\\mathbf\{h\}\(\\hat\{\\mathbf\{y\}\}\)\\\|\_\{2\}\.\(12\)This follows from a first\-order Taylor expansion of𝐡\\mathbf\{h\}around the nearest point onℳ\\mathcal\{M\}, where the second\-order remainder is dominated in a sufficiently small neighborhood\. Combining Eq\. \([9](https://arxiv.org/html/2606.05247#S3.E9)\) and Eq\. \([12](https://arxiv.org/html/2606.05247#S3.E12)\) gives

𝔼\[dist\(𝐲^L,ℳ\)2\]≤4σ−−2\(𝔼\[∥\[𝐠\(𝐩^\)\]\+∥22\]\+εL2\)\.\\mathbb\{E\}\\left\[\\operatorname\{dist\}\(\\hat\{\\mathbf\{y\}\}\_\{L\},\\mathcal\{M\}\)^\{2\}\\right\]\\leq 4\\sigma\_\{\-\}^\{\-2\}\\left\(\\mathbb\{E\}\\left\[\\\|\[\\mathbf\{g\}\(\\hat\{\\mathbf\{p\}\}\)\]\_\{\+\}\\\|\_\{2\}^\{2\}\\right\]\+\\varepsilon\_\{L\}^\{2\}\\right\)\.\(13\)Hence, learned slack variables provide a principled mechanism for reducing the expected local distance to the augmented feasible manifold by estimating inactive margins before projection\.

### 3\.3Differentiable Gauss\-Newton Projection Layer

Given a raw augmented prediction𝐲^=\[𝐩^⊤,𝐬^⊤\]⊤\\hat\{\\mathbf\{y\}\}=\[\\hat\{\\mathbf\{p\}\}^\{\\top\},\\hat\{\\mathbf\{s\}\}^\{\\top\}\]^\{\\top\}, DiffSlack projects it ontoℳ\\mathcal\{M\}by solving

𝐲∗=argmin𝐲12∥𝐲−𝐲^∥𝐖2s\.t\.𝐡\(𝐲\)=𝟎,\\mathbf\{y\}^\{\*\}=\\underset\{\\mathbf\{y\}\}\{\\mathrm\{argmin\}\}\\;\\frac\{1\}\{2\}\\\|\\mathbf\{y\}\-\\hat\{\\mathbf\{y\}\}\\\|\_\{\\mathbf\{W\}\}^\{2\}\\quad\\mathrm\{s\.t\.\}\\quad\\mathbf\{h\}\(\\mathbf\{y\}\)=\\mathbf\{0\},\(14\)where

‖𝐯‖𝐖2=𝐯⊤​𝐖𝐯,𝐖=diag​\(wo​𝟏NO,ws​𝟏NC\),wo\>ws\>0\.\\\|\\mathbf\{v\}\\\|\_\{\\mathbf\{W\}\}^\{2\}=\\mathbf\{v\}^\{\\top\}\\mathbf\{W\}\\mathbf\{v\},\\qquad\\mathbf\{W\}=\\mathrm\{diag\}\(w\_\{o\}\\mathbf\{1\}\_\{N\_\{O\}\},w\_\{s\}\\mathbf\{1\}\_\{N\_\{C\}\}\),\\qquad w\_\{o\}\>w\_\{s\}\>0\.\(15\)The larger task\-output weight discourages unnecessary changes to the original prediction coordinates, while the smaller slack weight allows residual mismatch to be absorbed by the auxiliary slack variables whenever possible\.

##### Reach tube\.

The projection layer is local\. Letreach⁡\(ℳ\)\\operatorname\{reach\}\(\\mathcal\{M\}\)denote the largest radius such that every point within that distance fromℳ\\mathcal\{M\}has a unique nearest point onℳ\\mathcal\{M\}\[[18](https://arxiv.org/html/2606.05247#bib.bib44)\]\. For anyρ<reach⁡\(ℳ\)\\rho<\\operatorname\{reach\}\(\\mathcal\{M\}\), define the reach tube

𝒯ρ=\{𝐲∣dist⁡\(𝐲,ℳ\)<ρ\}\.\\mathcal\{T\}\_\{\\rho\}=\\\{\\mathbf\{y\}\\mid\\operatorname\{dist\}\(\\mathbf\{y\},\\mathcal\{M\}\)<\\rho\\\}\.\(16\)Inside this tube, the nearest\-point projection is geometrically well\-defined\. Under the local regularity condition in Eq\. \([11](https://arxiv.org/html/2606.05247#S3.E11)\), a sufficiently small sub\-tube also forms a local convergence basin for the Gauss\-Newton projection\. Therefore, Stage I is designed to move raw outputs toward this reach tube before the hard projection layer is activated\. Since

ℙ\(𝐲^∈𝒯ρ\)≥1−𝔼\[dist𝐖\(𝐲^,ℳ\)2\]/ρ2,\\mathbb\{P\}\(\\hat\{\\mathbf\{y\}\}\\in\\mathcal\{T\}\_\{\\rho\}\)\\geq 1\-\\mathbb\{E\}\[\\operatorname\{dist\}\_\{\\mathbf\{W\}\}\(\\hat\{\\mathbf\{y\}\},\\mathcal\{M\}\)^\{2\}\]/\\rho^\{2\},\(17\)reducing the expected distance to the manifold increases this distribution\-free lower bound on the probability of entering the reach tube\.

##### Gauss\-Newton update\.

Solving Eq\. \([14](https://arxiv.org/html/2606.05247#S3.E14)\) exactly would require second\-order constraint derivatives\. We instead linearize𝐡\\mathbf\{h\}around the current iterate𝐲k\\mathbf\{y\}\_\{k\}and solve a weighted minimum\-norm correction problem:

𝐲k\+1=argmin𝐲12∥𝐲−𝐲k∥𝐖2s\.t\.𝐡\(𝐲k\)\+𝐉𝐡\(𝐲k\)\(𝐲−𝐲k\)=𝟎\.\\mathbf\{y\}\_\{k\+1\}=\\underset\{\\mathbf\{y\}\}\{\\mathrm\{argmin\}\}\\;\\frac\{1\}\{2\}\\\|\\mathbf\{y\}\-\\mathbf\{y\}\_\{k\}\\\|\_\{\\mathbf\{W\}\}^\{2\}\\quad\\mathrm\{s\.t\.\}\\quad\\mathbf\{h\}\(\\mathbf\{y\}\_\{k\}\)\+\\mathbf\{J\}\_\{\\mathbf\{h\}\}\(\\mathbf\{y\}\_\{k\}\)\(\\mathbf\{y\}\-\\mathbf\{y\}\_\{k\}\)=\\mathbf\{0\}\.\(18\)The closed\-form update is

𝐲k\+1=𝐲k−𝐖−1​𝐉𝐡⊤​\(𝐲k\)​\(𝐉𝐡​\(𝐲k\)​𝐖−1​𝐉𝐡⊤​\(𝐲k\)\)−1​𝐡​\(𝐲k\)\.\\mathbf\{y\}\_\{k\+1\}=\\mathbf\{y\}\_\{k\}\-\\mathbf\{W\}^\{\-1\}\\mathbf\{J\}\_\{\\mathbf\{h\}\}^\{\\top\}\(\\mathbf\{y\}\_\{k\}\)\\left\(\\mathbf\{J\}\_\{\\mathbf\{h\}\}\(\\mathbf\{y\}\_\{k\}\)\\mathbf\{W\}^\{\-1\}\\mathbf\{J\}\_\{\\mathbf\{h\}\}^\{\\top\}\(\\mathbf\{y\}\_\{k\}\)\\right\)^\{\-1\}\\mathbf\{h\}\(\\mathbf\{y\}\_\{k\}\)\.\(19\)The Gram matrix is solved by Cholesky decomposition with diagonal dampingδ​𝐈\\delta\\mathbf\{I\}, whereδ=10−4\\delta=10^\{\-4\}in our experiments\. Iteration stops when‖𝐡​\(𝐲k\)‖∞<ϵ\\\|\\mathbf\{h\}\(\\mathbf\{y\}\_\{k\}\)\\\|\_\{\\infty\}<\\epsilonor the number of iterations reachesImaxI\_\{\\max\}\.

##### Local convergence and conditioning\.

Around a feasible point𝐲∗∈ℳ\\mathbf\{y\}^\{\*\}\\in\\mathcal\{M\}satisfying the regularity condition, the update in Eq\. \([19](https://arxiv.org/html/2606.05247#S3.E19)\) satisfies

‖𝐞\(k\+1\)‖𝐖≤‖𝐌𝐖‖𝐖​‖𝐞\(k\)‖𝐖\+O​\(‖𝐞\(k\)‖𝐖2\),\\\|\\mathbf\{e\}^\{\(k\+1\)\}\\\|\_\{\\mathbf\{W\}\}\\leq\\\|\\mathbf\{M\}\_\{\\mathbf\{W\}\}\\\|\_\{\\mathbf\{W\}\}\\\|\\mathbf\{e\}^\{\(k\)\}\\\|\_\{\\mathbf\{W\}\}\+O\(\\\|\\mathbf\{e\}^\{\(k\)\}\\\|\_\{\\mathbf\{W\}\}^\{2\}\),\(20\)where𝐞\(k\)=𝐲k−𝐲∗\\mathbf\{e\}^\{\(k\)\}=\\mathbf\{y\}\_\{k\}\-\\mathbf\{y\}^\{\*\}and

𝐌𝐖=𝐈−𝐖−1​𝐉𝐡⊤​\(𝐉𝐡​𝐖−1​𝐉𝐡⊤\)−1​𝐉𝐡\\mathbf\{M\}\_\{\\mathbf\{W\}\}=\\mathbf\{I\}\-\\mathbf\{W\}^\{\-1\}\\mathbf\{J\}\_\{\\mathbf\{h\}\}^\{\\top\}\\left\(\\mathbf\{J\}\_\{\\mathbf\{h\}\}\\mathbf\{W\}^\{\-1\}\\mathbf\{J\}\_\{\\mathbf\{h\}\}^\{\\top\}\\right\)^\{\-1\}\\mathbf\{J\}\_\{\\mathbf\{h\}\}\(21\)is the𝐖\\mathbf\{W\}\-weighted tangent projector\. Since𝐌𝐖\\mathbf\{M\}\_\{\\mathbf\{W\}\}is a𝐖\\mathbf\{W\}\-orthogonal tangent projector, the linearized update suppresses the normal component of the local error to first order\.

The slack block also stabilizes the linear solve\. From Eq\. \([5](https://arxiv.org/html/2606.05247#S3.E5)\), the Gram matrix is

𝐉𝐡​𝐖−1​𝐉𝐡⊤=wo−1​𝐉𝐠​𝐉𝐠⊤\+4​ws−1​diag​\(𝐬2\)\.\\mathbf\{J\}\_\{\\mathbf\{h\}\}\\mathbf\{W\}^\{\-1\}\\mathbf\{J\}\_\{\\mathbf\{h\}\}^\{\\top\}=w\_\{o\}^\{\-1\}\\mathbf\{J\}\_\{\\mathbf\{g\}\}\\mathbf\{J\}\_\{\\mathbf\{g\}\}^\{\\top\}\+4w\_\{s\}^\{\-1\}\\mathrm\{diag\}\(\\mathbf\{s\}^\{2\}\)\.\(22\)Thus nonzero slack components lift the spectral floor:

λmin​\(𝐉𝐡​𝐖−1​𝐉𝐡⊤\)≥wo−1​λmin​\(𝐉𝐠​𝐉𝐠⊤\)\+4​ws−1​mini⁡si2\.\\lambda\_\{\\min\}\\\!\\left\(\\mathbf\{J\}\_\{\\mathbf\{h\}\}\\mathbf\{W\}^\{\-1\}\\mathbf\{J\}\_\{\\mathbf\{h\}\}^\{\\top\}\\right\)\\geq w\_\{o\}^\{\-1\}\\lambda\_\{\\min\}\\\!\\left\(\\mathbf\{J\}\_\{\\mathbf\{g\}\}\\mathbf\{J\}\_\{\\mathbf\{g\}\}^\{\\top\}\\right\)\+4w\_\{s\}^\{\-1\}\\min\_\{i\}s\_\{i\}^\{2\}\.\(23\)This reduces residual amplification in the linear solve, especially when𝐉𝐠\\mathbf\{J\}\_\{\\mathbf\{g\}\}is nearly rank\-deficient\.

### 3\.4Gradient Flow and Implicit Constraint Supervision

The projection layer is differentiable\. Instead of backpropagating through all solver iterations, we differentiate the KKT conditions of Eq\. \([14](https://arxiv.org/html/2606.05247#S3.E14)\) at the projected point, following implicit differentiation for optimization layers\[[22](https://arxiv.org/html/2606.05247#bib.bib40),[7](https://arxiv.org/html/2606.05247#bib.bib38),[6](https://arxiv.org/html/2606.05247#bib.bib39)\]\. Locally, this gives the first\-order sensitivity

∂𝐲∗/∂𝐲^=𝐌𝐖\.\\partial\\mathbf\{y\}^\{\*\}/\\partial\\hat\{\\mathbf\{y\}\}=\\mathbf\{M\}\_\{\\mathbf\{W\}\}\.\(24\)Therefore, gradients passed to the network are projected onto the tangent space ofℳ\\mathcal\{M\}at𝐲∗\\mathbf\{y\}^\{\*\}under the𝐖\\mathbf\{W\}\-weighted geometry\. Since𝐌𝐖\\mathbf\{M\}\_\{\\mathbf\{W\}\}is a projector with spectral radius no larger than one, the projection step does not locally amplify gradients\. More importantly, gradient components normal to the constraint manifold are suppressed, while tangent components are preserved\. The network is therefore trained through directions that are locally compatible with the constraint geometry\. We refer to this effect as implicit constraint supervision: even when the external task supervision is coarse, the projection layer filters the output gradient toward feasible directions\.

### 3\.5Two\-Stage Curriculum Training

Directly activating the hard projection layer from random initialization is unstable, because Gauss\-Newton projection is local and assumes that raw augmented outputs are close to the reach tube ofℳ\\mathcal\{M\}\. DiffSlack therefore uses a two\-stage curriculum learning\[[5](https://arxiv.org/html/2606.05247#bib.bib6)\]\.

##### Stage I: slack\-calibrated soft training\.

In Stage I, the projection layer is disabled\. The network is trained with

ℒStage1=ℒtask\+λsoft​ℒsoft\+λslack​ℒslack\.\\mathcal\{L\}\_\{\\mathrm\{Stage1\}\}=\\mathcal\{L\}\_\{\\mathrm\{task\}\}\+\\lambda\_\{\\mathrm\{soft\}\}\\mathcal\{L\}\_\{\\mathrm\{soft\}\}\+\\lambda\_\{\\mathrm\{slack\}\}\\mathcal\{L\}\_\{\\mathrm\{slack\}\}\.\(25\)The soft constraint loss penalizes active inequality violations:

ℒsoft=NC−1​‖\[𝐠​\(𝐩^\)\]\+‖1\.\\mathcal\{L\}\_\{\\mathrm\{soft\}\}=N\_\{C\}^\{\-1\}\\left\\\|\[\\mathbf\{g\}\(\\hat\{\\mathbf\{p\}\}\)\]\_\{\+\}\\right\\\|\_\{1\}\.\(26\)The slack loss fits the squared slack variables to the inactive\-side margin of the current prediction:

ℒslack=NC−1​‖𝐠​\(sg​\(𝐩^\)\)\+𝐬^⊙𝐬^‖1,\\mathcal\{L\}\_\{\\mathrm\{slack\}\}=N\_\{C\}^\{\-1\}\\left\\\|\\mathbf\{g\}\(\\mathrm\{sg\}\(\\hat\{\\mathbf\{p\}\}\)\)\+\\hat\{\\mathbf\{s\}\}\\odot\\hat\{\\mathbf\{s\}\}\\right\\\|\_\{1\},\(27\)wheresg​\(⋅\)\\mathrm\{sg\}\(\\cdot\)denotes the stop\-gradient operator\. The stop\-gradient preventsℒslack\\mathcal\{L\}\_\{\\mathrm\{slack\}\}from altering the task prediction and ensures that this term only calibrates the slack variables\. By Eq\. \([7](https://arxiv.org/html/2606.05247#S3.E7)\),ℒsoft\\mathcal\{L\}\_\{\\mathrm\{soft\}\}reduces the active\-violation term, whileℒslack\\mathcal\{L\}\_\{\\mathrm\{slack\}\}reduces the slack estimation error\. Together, they reduce the distance from raw augmented outputs toℳ\\mathcal\{M\}and increase the probability that samples lie inside the local reach tube\.

##### Stage II: end\-to\-end hard projection training\.

In Stage II, the projection layer is activated\. The network produces𝐲^\\hat\{\\mathbf\{y\}\}, the projection layer returns𝐲∗=𝒫​\(𝐲^\)\\mathbf\{y\}^\{\*\}=\\mathcal\{P\}\(\\hat\{\\mathbf\{y\}\}\), and the task loss is computed on the projected output\. The slack loss is removed because feasibility is now enforced by the projection layer\. The objective becomes

ℒStage2=ℒtask​\(𝐲∗\)\+λproj​ℒproj\+λsoft​ℒsoft\.\\mathcal\{L\}\_\{\\mathrm\{Stage2\}\}=\\mathcal\{L\}\_\{\\mathrm\{task\}\}\(\\mathbf\{y\}^\{\*\}\)\+\\lambda\_\{\\mathrm\{proj\}\}\\mathcal\{L\}\_\{\\mathrm\{proj\}\}\+\\lambda\_\{\\mathrm\{soft\}\}\\mathcal\{L\}\_\{\\mathrm\{soft\}\}\.\(28\)The projection loss is

ℒproj=‖𝐲^−𝐲∗‖22\.\\mathcal\{L\}\_\{\\mathrm\{proj\}\}=\\\|\\hat\{\\mathbf\{y\}\}\-\\mathbf\{y\}^\{\*\}\\\|\_\{2\}^\{2\}\.\(29\)It encourages raw predictions to remain close to the feasible manifold, which stabilizes the subsequent projection\. The soft constraint loss is retained as an auxiliary regularizer that discourages large raw violations before projection\.

Overall, Stage I calibrates slack variables to estimate inactive\-side margins and moves raw outputs toward the reach tube\. Stage II then imposes hard feasibility through differentiable projection and propagates constraint\-aware gradients back to the network\.

## 4EXPERIMENTS

### 4\.1Problem Formulation

We consider the problem of generating a kinematically feasible and collision\-free path for a vehicle navigating through obstacle\-dense unstructured environments\[[24](https://arxiv.org/html/2606.05247#bib.bib51)\]\. The path is represented as a sequence ofT=40T=40discrete waypoints𝐏=\(𝐩1,…,𝐩T\)∈ℝT×2\\mathbf\{P\}=\(\\mathbf\{p\}\_\{1\},\\dots,\\mathbf\{p\}\_\{T\}\)\\in\\mathbb\{R\}^\{T\\times 2\}, where each𝐩t=\(xt,yt\)\\mathbf\{p\}\_\{t\}=\(x\_\{t\},y\_\{t\}\)denotes a 2D position in the workspace\. The vehicle starts from a fixed initial position𝐩0=\(0,0\)\\mathbf\{p\}\_\{0\}=\(0,0\)\. The planning objective is to minimize the total path length while satisfying a set of hard constraints:

min𝐏​∑t=0T−1‖𝐩t\+1−𝐩t‖2s\.t\.𝒞col​\(𝐏\)≤0,𝒞kin​\(𝐏\)≤0,𝒞spc​\(𝐏\)≤0\.\\min\_\{\\mathbf\{P\}\}\\sum\_\{t=0\}^\{T\-1\}\\\|\\mathbf\{p\}\_\{t\+1\}\-\\mathbf\{p\}\_\{t\}\\\|\_\{2\}\\quad\\text\{s\.t\.\}\\quad\\mathcal\{C\}\_\{\\text\{col\}\}\(\\mathbf\{P\}\)\\leq 0,\\quad\\mathcal\{C\}\_\{\\text\{kin\}\}\(\\mathbf\{P\}\)\\leq 0,\\quad\\mathcal\{C\}\_\{\\text\{spc\}\}\(\\mathbf\{P\}\)\\leq 0\.\(30\)
The three constraint categories are defined as follows\.

##### Collision Avoidance Constraint

The vehicle body is approximated by three overlapping circles centered at positions\{𝐪t,r\}r=13\\\{\\mathbf\{q\}\_\{t,r\}\\\}\_\{r=1\}^\{3\}derived from each waypoint𝐩t\\mathbf\{p\}\_\{t\}\. Each obstacle is modeled as a convex polygon described byMjM\_\{j\}half\-plane inequalitieslj,m​\(𝐩\)≥0l\_\{j,m\}\(\\mathbf\{p\}\)\\geq 0\. To obtain a differentiable signed distance for each obstacle, we apply the Log\-Sum\-Exp \(LSE\) approximation\[[8](https://arxiv.org/html/2606.05247#bib.bib12)\]:

cj​\(𝐩\)≈−α−1​log⁡\(∑m=1Mjexp⁡\(−α​lj,m​\(𝐩\)\)\),c\_\{j\}\(\\mathbf\{p\}\)\\approx\-\\alpha^\{\-1\}\\log\\\!\\left\(\\sum\_\{m=1\}^\{M\_\{j\}\}\\exp\\\!\\left\(\-\\alpha\\,l\_\{j,m\}\(\\mathbf\{p\}\)\\right\)\\right\),\(31\)wherecj​\(𝐩\)<0c\_\{j\}\(\\mathbf\{p\}\)<0indicates that𝐩\\mathbf\{p\}lies inside obstaclejj, andα=10\\alpha=10controls the approximation tightness\. The collision constraint then requires that every circlerrat waypointttlies outside all obstacles simultaneously, which is enforced by a second LSE aggregation over theNobsN\_\{\\text\{obs\}\}obstacles:

𝒞colt,r​\(𝐩t\)=α−1​log⁡\(∑j=1Nobsexp⁡\(α​cj​\(𝐪t,r\)\)\)≤0,\\mathcal\{C\}\_\{\\text\{col\}\}^\{t,r\}\(\\mathbf\{p\}\_\{t\}\)=\\alpha^\{\-1\}\\log\\\!\\left\(\\sum\_\{j=1\}^\{N\_\{\\text\{obs\}\}\}\\exp\\\!\\left\(\\alpha\\,c\_\{j\}\(\\mathbf\{q\}\_\{t,r\}\)\\right\)\\right\)\\leq 0,\(32\)yielding3​T3Tcollision constraints in total\. At evaluation time, collision detection is performed using exact rectangle\-obstacle intersection checks to ensure accurate assessment of the success rate\.

##### Curvature Constraint

The vehicle is modeled by the kinematic bicycle model\[[35](https://arxiv.org/html/2606.05247#bib.bib2)\], which imposes a minimum turning radiusRminR\_\{\\text\{min\}\}determined by the maximum steering angle\. The curvature constraint requires that the local curvatureκt\\kappa\_\{t\}at each waypoint does not exceed the maximum allowable valueκmax=1/Rmin\\kappa\_\{\\text\{max\}\}=1/R\_\{\\text\{min\}\}:

𝒞kint​\(𝐏\)=κt−κmax≤0,∀t∈\{1,…,T\},\\mathcal\{C\}\_\{\\text\{kin\}\}^\{t\}\(\\mathbf\{P\}\)=\\kappa\_\{t\}\-\\kappa\_\{\\text\{max\}\}\\leq 0,\\quad\\forall t\\in\\\{1,\\dots,T\\\},\(33\)yieldingTTcurvature constraints in total\.

##### Waypoint Spacing Constraint

To ensure geometric regularity and suppress interpolation errors during path tracking, the Euclidean distance between consecutive waypoints is constrained not to exceed a threshold ofdmax=1\.0​\\unit​md\_\{\\text\{max\}\}=1\.0\\,\\unit\{m\}:

𝒞spct​\(𝐏\)=‖𝐩t\+1−𝐩t‖2−dmax≤0,∀t∈\{0,…,T−1\}\.\\mathcal\{C\}\_\{\\text\{spc\}\}^\{t\}\(\\mathbf\{P\}\)=\\\|\\mathbf\{p\}\_\{t\+1\}\-\\mathbf\{p\}\_\{t\}\\\|\_\{2\}\-d\_\{\\text\{max\}\}\\leq 0,\\quad\\forall t\\in\\\{0,\\dots,T\-1\\\}\.\(34\)
Altogether, the three constraint categories produce200200inequality constraints forT=40T=40waypoints\.

### 4\.2Environment Setup

##### Environment and Data

The experimental environment is spatially partitioned into an obstacle generation zone \(x∈\[4,28\]​\\unit​mx\\in\[4,28\]\\,\\unit\{m\},y∈\[−10,10\]​\\unit​my\\in\[\-10,10\]\\,\\unit\{m\}\) and a goal sampling zone \(x∈\[30,34\]​\\unit​mx\\in\[30,34\]\\,\\unit\{m\},y∈\[−8,8\]​\\unit​my\\in\[\-8,8\]\\,\\unit\{m\}\)\. Each scenario containsNobs=8N\_\{\\text\{obs\}\}=8randomly generated quadrilateral obstacles with side lengths sampled froml∼𝒰​\(1,4\)​\\unit​ml\\sim\\mathcal\{U\}\(1,4\)\\,\\unit\{m\}, as illustrated in Fig\.[3](https://arxiv.org/html/2606.05247#S4.F3)\(a\)\. A safety margin is enforced around each obstacle during generation to ensure the existence of at least one feasible path in every scenario\. A total of 200,000 scenarios are generated and partitioned into training, validation, and testing sets at a ratio of 6:3:1\.

![Refer to caption](https://arxiv.org/html/2606.05247v1/x3.png)Figure 3:Experimental environment and G\-APF supervision construction\. \(a\) Static path\-planning scenario with randomly generated convex polygonal obstacles and a sampled target area\. \(b\) Global\-guided artificial potential field, where high values are assigned near obstacles and low values near the target\. For each waypoint, bilinear interpolation provides the potential value, and the local attraction target is selected from the lowest\-potential point in the local neighborhood\.
##### Supervision Signal

Rather than relying on kinematically feasible expert demonstrations, which require expensive online solvers such as NMPC, we construct a Global\-guided Artificial Potential Field \(G\-APF\)\[[27](https://arxiv.org/html/2606.05247#bib.bib36)\]as a cost\-effective training signal\. A global reference path𝒫∗\\mathcal\{P\}^\{\*\}is first computed via Dijkstra’s algorithm\[[14](https://arxiv.org/html/2606.05247#bib.bib11)\], and a dense potential fieldV​\(𝐮\)V\(\\mathbf\{u\}\)is propagated from𝒫∗\\mathcal\{P\}^\{\*\}into the free space using multi\-source wavefront expansion, with high penalties imposed within obstacle regions to create repulsive gradients at obstacle boundaries\. The resulting field forms a convex valley along𝒫∗\\mathcal\{P\}^\{\*\}, providing dense gradient guidance across the workspace\. The supervision loss combines a potential energy term that aligns each waypoint with the global energy valley, and a local attraction term that prevents stagnation in obstacle\-dense regions where the potential gradient may become nearly orthogonal to the desired direction of progress:

ℒpot=T−1​∑t=1T\(Vinterp​\(𝐩t\)\+β​min𝐮∈𝒩​\(𝐧t\)⁡‖𝐩t−𝐮‖22\)\.\\mathcal\{L\}\_\{\\text\{pot\}\}=T^\{\-1\}\\sum\_\{t=1\}^\{T\}\\left\(V\_\{\\text\{interp\}\}\(\\mathbf\{p\}\_\{t\}\)\+\\beta\\min\_\{\\mathbf\{u\}\\in\\mathcal\{N\}\(\\mathbf\{n\}\_\{t\}\)\}\\\|\\mathbf\{p\}\_\{t\}\-\\mathbf\{u\}\\\|\_\{2\}^\{2\}\\right\)\.\(35\)Compared to expert demonstrations, the G\-APF provides only global topological guidance rather than precise waypoint supervision, making it a coarser but significantly cheaper training signal\. The constructed potential field is illustrated in Fig\.[3](https://arxiv.org/html/2606.05247#S4.F3)\(b\)\.

##### Baselines

We compare the proposed framework against six representative baselines spanning classical and learning\-based planning paradigms, with implementation details provided in Appendix[A](https://arxiv.org/html/2606.05247#A1)\. \(1\)Hybrid A\*\[[15](https://arxiv.org/html/2606.05247#bib.bib1)\]is a search\-based planner that employs Reeds\-Shepp curves to ensure kinematic feasibility\. \(2\)Informed RRT\*\[[20](https://arxiv.org/html/2606.05247#bib.bib5)\]is a sampling\-based planner with obstacle inflation of\\qty1\.2m\. \(3\)NMPC\[[37](https://arxiv.org/html/2606.05247#bib.bib7)\]is an optimization\-based planner implemented via the CasADi framework\[[4](https://arxiv.org/html/2606.05247#bib.bib8)\]and the IPOPT solver\[[44](https://arxiv.org/html/2606.05247#bib.bib9)\], sharing the same kinematic model and obstacle representation as our method\. \(4\)IL \(Pure\)is an imitation learning baseline trained directly on NMPC expert demonstrations without any constraint handling\. \(5\)IL \+ Softextends IL \(Pure\) by incorporating soft\-constraint penalties during training\. \(6\)DC3\[[16](https://arxiv.org/html/2606.05247#bib.bib3)\]handles nonlinear equality and inequality constraints by applying gradient\-based correction to reduce constraint violation\. \(7\)ENFORCE\[[29](https://arxiv.org/html/2606.05247#bib.bib4)\]is a differentiable projection\-based method using adaptive\-depth Gauss\-Newton iterations\. For inequality constraints, ENFORCE adopts a Fischer\-Burmeister reformulation in an augmented multiplier space\. For a fair comparison, DC3, ENFORCE, and DiffSlack are implemented with the same policy network, input representation, and G\-APF supervision signal\. In all three methods, the gradients of the constraint functions are computed by automatic differentiation\.

##### Metrics

We evaluate performance using two sets of metrics\.

Static Planning Metricsinclude: \(1\) Computation Time \(CT\), the average inference latency per scenario; \(2\) Average Path Length \(APL\), the mean total path length computed over collision\-free paths only; \(3\) Average Goal Distance \(AGD\), the mean Euclidean distance from the final waypoint to the goal, computed over collision\-free paths only; \(4\) Success Rate \(SR\), the percentage of trials in which the planner produces a valid collision\-free path; \(5\) Kinematic Compliance \(𝒮kin\\mathcal\{S\}\_\{\\text\{kin\}\}\), the mean ratio of maximum allowable curvature to local curvature:

𝒮kin=T−1​∑t=1Tmin⁡\(κmax/κt,1\);\\mathcal\{S\}\_\{\\text\{kin\}\}=T^\{\-1\}\\sum\_\{t=1\}^\{T\}\\min\\left\(\\kappa\_\{\\text\{max\}\}/\\kappa\_\{t\},\\ 1\\right\);\(36\)and \(6\) Spacing Compliance \(𝒮spc\\mathcal\{S\}\_\{\\text\{spc\}\}\), the degree to which consecutive waypoint spacings satisfy the upper bounddmaxd\_\{\\text\{max\}\}:

𝒮spc=1−dmax−1​∑t=0T−1max⁡\(‖𝐩t\+1−𝐩t‖2−dmax,0\)\.\\mathcal\{S\}\_\{\\text\{spc\}\}=1\-d\_\{\\text\{max\}\}^\{\-1\}\\sum\_\{t=0\}^\{T\-1\}\\max\\left\(\\\|\\mathbf\{p\}\_\{t\+1\}\-\\mathbf\{p\}\_\{t\}\\\|\_\{2\}\-d\_\{\\text\{max\}\},\\ 0\\right\)\.\(37\)Metrics \(4\), \(5\), and \(6\) respectively quantify the satisfaction of the three physical constraints embedded in the projection layer: collision avoidance, kinematic feasibility, and waypoint spacing\.

Dynamic Tracking Metricsassess physical feasibility through tracking experiments in CARLA\[[17](https://arxiv.org/html/2606.05247#bib.bib10)\]and real car scenarios\. They include: \(1\) RMSE Cross\-Track Error \(CTE\); \(2\) Average Heading Error \(AHE\); and \(3\) Steering Smoothness \(𝒥smooth\\mathcal\{J\}\_\{\\text\{smooth\}\}\):

𝒥smooth=T−1​∑t=0T−1\|δt\+1−δt\|,\\mathcal\{J\}\_\{\\text\{smooth\}\}=T^\{\-1\}\\sum\_\{t=0\}^\{T\-1\}\|\\delta\_\{t\+1\}\-\\delta\_\{t\}\|,\(38\)whereδt\\delta\_\{t\}denotes the steering angle at time steptt\.

Table 1:Network Configurations and Hyperparameters

### 4\.3Implementation Details

The specific configurations for the policy network, training curriculum, and inference solver are summarized in Table[1](https://arxiv.org/html/2606.05247#S4.T1)\. The policy network takes a 66\-dimensional vector as input, comprising the target coordinates and the vertices of the obstacles\. All learning\-based methods are trained for a total of 400 epochs on an Intel i9\-14900KF CPU paired with an NVIDIA RTX 2080 Ti GPU\. For inference, learning\-based methods are evaluated on the NVIDIA RTX 2080 Ti GPU, while non\-learning methods run on the Intel i9\-14900KF CPU to reflect their respective deployment conditions\.

### 4\.4Comparative Analysis of Planning Performance

![Refer to caption](https://arxiv.org/html/2606.05247v1/x4.png)Figure 4:Qualitative comparison on a representative planning scenario\. The upper panels show final trajectories produced by representative classical planners and learning\-based baselines\. The lower panels compare projection\-based neural methods, where each column shows the raw prediction before projection and the projected trajectory after correction\. DiffSlack yields a smoother projected trajectory in the obstacle\-dense region, consistent with its higher planning success and geometric constraint satisfaction\.Table 2:Comparative Analysis of Path Planning Performance\.↑\\uparrow\(↓\\downarrow\) indicates that higher \(lower\) values are better\.Boldvalues indicate the best results in each category\.Table[2](https://arxiv.org/html/2606.05247#S4.T2)and Fig\.[4](https://arxiv.org/html/2606.05247#S4.F4)report the quantitative and qualitative planning results on 20,000 test scenarios\. Non\-learning planners achieve strong constraint satisfaction because feasibility is explicitly considered during search or optimization\. However, their computation time is much higher than that of learning\-based methods\. In contrast, pure imitation learning is extremely fast but has a low success rate and large goal deviation, showing that feed\-forward prediction alone is insufficient for reliable constrained planning in this setting\. Adding a soft constraint penalty improves feasibility, but the success rate remains clearly lower than that of hard\-constrained neural methods\.

Among projection\-based learning methods, DC3 improves feasibility through iterative gradient correction, but its spacing satisfaction remains relatively low, especially under the smaller correction budget\. Increasing its correction budget fromt=50t=50tot=100t=100improves the success rate and spacing satisfaction, but almost doubles the computation time\. ENFORCE provides a strong Gauss\-Newton projection baseline and achieves computation time comparable to DiffSlack\. Nevertheless, it still has lower success rate, lower curvature satisfaction, and lower spacing satisfaction than DiffSlack\. These results suggest that DiffSlack achieves more reliable geometric correction under a comparable computation budget, which is consistent with the intended role of the learned slack representation\.

Figure[4](https://arxiv.org/html/2606.05247#S4.F4)further illustrates this behavior\. The upper panels compare representative final trajectories, while the lower panels show raw and projected outputs of DC3, ENFORCE, and DiffSlack in the same scenario\. DC3 starts from a different raw prediction and shows a sharper projected correction near the goal\-side region\. In contrast, ENFORCE and DiffSlack start from more comparable raw predictions, but their projected trajectories differ noticeably near the obstacle\-dense region\. ENFORCE exhibits a sharper local correction, whereas DiffSlack produces a smoother projected trajectory with more stable obstacle\-avoidance behavior\. This qualitative result is consistent with the higher planning success and geometric constraint satisfaction reported in Table[2](https://arxiv.org/html/2606.05247#S4.T2)\.

### 4\.5Dynamic Validation and Path Tracking

![Refer to caption](https://arxiv.org/html/2606.05247v1/experiment.png)Figure 5:Dynamic validation environments\. \(a\) CARLA simulation\. \(b\) Real\-world experiment with physical obstacles\.![Refer to caption](https://arxiv.org/html/2606.05247v1/x5.png)Figure 6:Tracking error analysis for three representative real\-world runs\. Each row shows the lateral error spatial distribution along the driven path \(left\), lateral and longitudinal error profiles over path progress \(middle\), and the corresponding error histograms \(right\)\.Table 3:Comparative Analysis of Path Tracking Performance\.↑\\uparrow\(↓\\downarrow\) indicates that higher \(lower\) values are better\.Boldvalues indicate the best results for each metric\.To evaluate whether the planned paths can be reliably executed in practice, we conduct closed\-loop tracking experiments in both CARLA simulation and a real\-world outdoor environment, as shown in Fig\.[5](https://arxiv.org/html/2606.05247#S4.F5)\. The CARLA experiment is used for comparative evaluation across learning\-based planners\. For each learning\-based method, we forward 2,000 collision\-free planned paths to the same tracking controller\. Implementation details of the CARLA PD controller are provided in Appendix[B](https://arxiv.org/html/2606.05247#A2)\.

Table[3](https://arxiv.org/html/2606.05247#S4.T3)reports the CARLA tracking results\. DiffSlack achieves the best performance across all four metrics, showing that its planning advantage translates into better closed\-loop executability under the same tracking controller\. Although DC3 and ENFORCE improve planning feasibility over IL\+Soft in Table[2](https://arxiv.org/html/2606.05247#S4.T2), their tracking performance is slightly worse\. This trend is consistent with their lower curvature or spacing satisfaction in the static evaluation\. Their projection corrections can recover obstacle avoidance but may introduce sharper local geometric changes, which makes the resulting paths harder to track\. In contrast, DiffSlack preserves feasibility while producing smoother and more uniformly spaced trajectories, leading to the best tracking accuracy and control smoothness\.

To further assess deployment feasibility, we validate DiffSlack\-planned paths on a physical SUV in an outdoor test site with physical obstacles\. We execute eight planned paths under real vehicle dynamics\. Fig\.[6](https://arxiv.org/html/2606.05247#S4.F6)presents detailed error analysis for three representative runs\. The lateral errors remain small and are distributed around zero, while the longitudinal errors stay within a narrow range along the path\. Across all eight real\-world runs, the mean lateral tracking error is 0\.046 m and the mean maximum lateral error is 0\.152 m, demonstrating that DiffSlack\-planned paths remain executable beyond simulation\.

### 4\.6Sensitivity Analysis and Ablation Study

![Refer to caption](https://arxiv.org/html/2606.05247v1/x6.png)Figure 7:Ablation study on supervision signal quality under a2×22\\times 2design varying constraint enforcement \(Hard vs\. Soft\) and supervision signal \(Expert vs\. Coarse\)\. Each group of bars reports the gapΔ\\Deltabetween expert and coarse conditions\. Hard constraints compress the supervision quality gap by approximately 83% on the success rate metric, while kinematic compliance and spacing satisfaction remain largely insensitive to both factors\.#### 4\.6\.1Supervision Signal Quality

To examine whether hard projection reduces the dependence on supervision quality, we conduct a2×22\\times 2ablation study by varying the constraint enforcement mechanism \(Hard vs\. Soft\) and the supervision signal quality \(Expert demonstrations from NMPC vs\. Coarse G\-APF guidance\)\. Here, Hard \+ Coarse corresponds to the proposed DiffSlack, and Soft \+ Expert corresponds to IL\+Soft in Table[2](https://arxiv.org/html/2606.05247#S4.T2)\. The results are shown in Fig\.[7](https://arxiv.org/html/2606.05247#S4.F7)\.

The success\-rate results show two clear trends\. First, hard projection improves collision avoidance under both expert and coarse supervision, indicating that structural constraint enforcement provides a more reliable feasibility mechanism than penalty\-based regularization alone\. Second, hard projection substantially reduces the performance gap caused by supervision quality\. As shown by the annotated gaps in Fig\.[7](https://arxiv.org/html/2606.05247#S4.F7), hard projection reduces the expert\-coarse supervision gap in SR by approximately 83% compared with soft constraints\. This result suggests that the projection layer acts as an implicit corrective mechanism when the external supervision signal is coarse\.

The kinematic compliance and spacing satisfaction metrics vary much less across the four settings\. These two constraints are already close to saturation for both hard and soft methods, leaving limited room for further improvement\. In contrast, collision avoidance involves many obstacle\-dependent nonlinear inequalities and is more sensitive to the quality of the learned trajectory\. The larger gap reduction on SR therefore indicates that the benefit of hard projection is most pronounced when the constraint set is difficult and supervision is imperfect\.

#### 4\.6\.2Necessity of Two\-Stage Curriculum Training

Table 4:Ablation study on two\-stage curriculum training\. SR, APL, and AGD are reported for DiffSlack and DC3 with and without Stage 1 pretraining\. APL and AGD are computed over collision\-free paths only\.![Refer to caption](https://arxiv.org/html/2606.05247v1/x7.png)Figure 8:Training dynamics with and without Stage 1 \(S1\) of the curriculum training strategy, averaged over three random seeds with shaded regions indicating standard deviation\. \(a\) Task lossℒpot\\mathcal\{L\}\_\{\\text\{pot\}\}over training steps\. \(b\) Mean constraint valueggover training steps\. The vertical dashed line at step 300 marks the transition from Stage 1 to Stage 2 for the S1 variant\.Table[4](https://arxiv.org/html/2606.05247#S4.T4)and Figure[8](https://arxiv.org/html/2606.05247#S4.F8)present the results of removing Stage 1 pretraining from both DiffSlack and DC3\(t=50t=50\)\. In both cases, Stage 1 pretraining consistently improves performance, confirming that soft constraint warm\-up is beneficial regardless of the underlying projection mechanism\.

The two methods show different degradation patterns when Stage 1 is removed\. DiffSlack uses a damped Gauss\-Newton projection, which can recover feasibility efficiently but is sensitive to initialization\. Without Stage 1, the projected feasible points may correspond to poor task solutions, leading to a moderate drop in SR but a substantial deterioration in APL and AGD\. This is consistent with the persistently higher task loss of the no\-Stage\-1 variant in Fig\.[8](https://arxiv.org/html/2606.05247#S4.F8)\(a\)\. DC3 uses gradient\-based correction, which changes trajectories more gradually but converges more slowly\. Without Stage 1, the global path structure is less severely affected, but the fixed correction budget is more likely to be exhausted before feasibility is recovered, causing a larger drop in SR with smaller changes in APL and AGD\. Thus, Stage 1 mainly improves task\-relevant projection initialization for DiffSlack and finite\-step feasibility recovery for DC3\.

#### 4\.6\.3Impact ofImaxI\_\{\\max\}

![Refer to caption](https://arxiv.org/html/2606.05247v1/x8.png)Figure 9:Ablation study on the maximum iteration countImaxI\_\{\\max\}\. \(a\) SR and mean actual iteration count as a function ofImaxI\_\{\\max\}\. The vertical dashed line marks the selected valueImax=50I\_\{\\max\}=50\. \(b\) Average inference time as a function of fixed iteration countII, showing a linear relationship\.Figure[9](https://arxiv.org/html/2606.05247#S4.F9)examines how the maximum iteration countImaxI\_\{\\max\}affects planning performance and computational cost\. As shown in Figure[9](https://arxiv.org/html/2606.05247#S4.F9)\(a\), SR increases rapidly asImaxI\_\{\\max\}grows from 10 to 50, then plateaus with diminishing returns beyond this point\. Meanwhile, the mean actual iteration count remains substantially belowImaxI\_\{\\max\}across all settings, indicating that the early stopping criterion is triggered in most cases before the iteration budget is exhausted\. Together, these two observations suggest thatImax=50I\_\{\\max\}=50strikes a favorable balance between performance and efficiency, and is therefore adopted as the default setting\.

Figure[9](https://arxiv.org/html/2606.05247#S4.F9)\(b\) shows that average inference time increases linearly with the number of iterations, which is consistent with the fixed per\-step computational cost of the Gauss\-Newton update\. This confirms thatImaxI\_\{\\max\}serves as a direct and predictable control over inference latency\.

![Refer to caption](https://arxiv.org/html/2606.05247v1/x9.png)Figure 10:Representative failure cases of DiffSlack\. Each column shows the raw output \(top\) and the final output after Gauss\-Newton projection \(bottom\)\. \(a\) Case 1: Large collision correction displaces local waypoints, introducing curvature and spacing violations \(red\) that cannot be resolved within the iteration budget\. \(b\) Case 2: The raw output selects a route through a dense obstacle cluster\. No feasible path exists within this homotopy class and the projection terminates with collision constraints still violated\.

### 4\.7Failure Case Analysis

Although DiffSlack achieves a high success rate overall, failure cases still occur under challenging scenarios\. Both failure cases in Figure[10](https://arxiv.org/html/2606.05247#S4.F10)stem from network generalization error, though the causes differ\.

In Case 1, the raw output follows a correct global route but partially penetrates an obstacle locally\. Eliminating the collision violation requires a large lateral displacement of the affected waypoints, which inevitably perturbs the local heading angles and inter\-waypoint distances of the surrounding path\. This geometric coupling introduces curvature and spacing violations as a byproduct that the remaining iterations cannot fully resolve, leaving the solver at a partially feasible point atImaxI\_\{\\max\}\.

In Case 2, the raw output selects a route passing through a dense obstacle cluster where no feasible path exists\. Since the chosen homotopy class contains no feasible solution, local minimum\-norm corrections cannot alter the global path topology, and the projection terminates with the collision constraint still violated\.

Case 1 is in principle recoverable, since a sufficiently accurate initialization would allow the projection to converge along the correct global route\. Case 2 is not recoverable by any local projection method, as no feasible path exists within the homotopy class selected by the network\. Addressing Case 1 therefore calls for tighter initialization via stronger Stage 1 training\. Addressing Case 2 requires improving the network’s global routing decisions, for instance through augmented training coverage of obstacle\-dense configurations\.

## 5CONCLUSION

This paper presents DiffSlack, a differentiable projection layer for enforcing general nonlinear inequality constraints in neural networks\. By reformulating inequality constraints as equality constraints via learnable slack variables, the network warm\-starts the Gauss\-Newton projection solver and reduces the correction burden at inference time\. A two\-stage curriculum training strategy ensures stable optimization and promotes stricter constraint satisfaction\. Experiments on a vehicle path planning task with 200 inequality constraints demonstrate that DiffSlack achieves a higher success rate than existing learning\-based methods under a comparable computational budget\. Furthermore, the hard constraint projection layer acts as an implicit supervision mechanism, significantly reducing sensitivity to supervision signal quality\.

Several directions remain for future work\. First, relaxing the initialization requirement of the projection solver to handle cases where the raw output lies outside the convergence basin remains an open problem\. Second, the proposed framework is general and can potentially be applied to other engineering domains such as robot motion planning and power system optimization\.

## Appendix AImplementation details of baseline methods

### A\.1Hybrid A\*

The Hybrid A\* algorithm is implemented based on the PythonRobotics library\[[38](https://arxiv.org/html/2606.05247#bib.bib16)\]\.

The Hybrid A\* planner searches for kinematically feasible trajectories in the discretized configuration space\(x,y,θ\)\(x,y,\\theta\), using motion primitives generated from a discrete steering set\. To improve efficiency, Reeds\-Shepp analytic expansion is attempted near the goal region or at a fixed iteration frequency\. The search costf​\(n\)=g​\(n\)\+h​\(n\)f\(n\)=g\(n\)\+h\(n\)combines accumulated motion cost with a heuristic obtained from a 2D dynamic\-programming distance map\. The motion cost penalizes path length, reverse motion, gear changes, steering effort, and steering\-rate variation, while polygonal obstacles are inflated for safety and checked for collision along the generated primitives\. The hyperparameters are listed in Table[A\.1](https://arxiv.org/html/2606.05247#A1.T1)\.

Table A\.1:Hyperparameters for the Hybrid A\* Planner
### A\.2Informed RRT\*

The Informed RRT\* algorithm is also implemented based on the PythonRobotics library\[[38](https://arxiv.org/html/2606.05247#bib.bib16)\]\. The specific hyperparameters used in our implementation are detailed in Table[A\.2](https://arxiv.org/html/2606.05247#A1.T2)\.

Table A\.2:Hyperparameters for Informed RRT\* Planner
### A\.3NMPC

The NMPC problem is implemented using the CasADi framework and solved via the IPOPT interior\-point solver\. The optimization horizon is discretized intoT=40T=40steps with a sampling time ofΔ​t=\\qty​0\.5​s\\Delta t=\\qty\{0\.5\}\{s\}\. The objective functionJJis formulated to minimize the deviation from the target state while penalizing control efforts and enforcing trajectory smoothness:

J=wg​‖pT−pr​e​f‖2\+∑k=0T−1\(wu​\(vk2\+δk2\)\+ws​\(\(Δ​vk\)2\+\(Δ​δk\)2\)\)J=w\_\{g\}\\\|p\_\{T\}\-p\_\{ref\}\\\|^\{2\}\+\\sum\_\{k=0\}^\{T\-1\}\\left\(w\_\{u\}\(v\_\{k\}^\{2\}\+\\delta\_\{k\}^\{2\}\)\+w\_\{s\}\(\(\\Delta v\_\{k\}\)^\{2\}\+\(\\Delta\\delta\_\{k\}\)^\{2\}\)\\right\)\(A\.1\)wherepTp\_\{T\}is the terminal position,uk=\[vk,δk\]Tu\_\{k\}=\[v\_\{k\},\\delta\_\{k\}\]^\{T\}are the control inputs \(velocity and steering angle\), andΔ​uk\\Delta u\_\{k\}represents the rate of change in controls\. The optimization is subject to the kinematic bicycle model constraints, actuator limits, and the differentiable collision avoidance constraints described in the main text\. To improve convergence, the solver is warm\-started with a linear interpolation between the start and goal configurations\.

Table A\.3:Hyperparameters for NMPC Planner

## Appendix BImplementation details of CARLA simulation

Table B\.1:Parameters for CARLA Simulation and ControlThe experiments are conducted in the CARLA simulator using a flat asphalt environment\. The simulation operates in synchronous mode with a fixed time step ofΔ​t=\\qty​0\.02​s\\Delta t=\\qty\{0\.02\}\{s\}to ensure deterministic physics updates\. The ego vehicle is based on thevehicle\.tesla\.model3blueprint, with the front\-wheel maximum steering angle customized to40∘40^\{\\circ\}\.

Trajectory tracking is executed by a coupled feedforward\-feedback controller\. Longitudinal control utilizes a PD regulator to track a dynamic reference speedvcmdv\_\{\\text\{cmd\}\}derived from the local path curvatureκ\\kappa\. This target speed is computed as

vcmd=clip⁡\(alat,max/\(\|κ\|\+ϵ\),vmin,vmax\)\.v\_\{\\text\{cmd\}\}=\\operatorname\{clip\}\\left\(\\sqrt\{a\_\{\\text\{lat\},\\text\{max\}\}/\{\(\|\\kappa\|\+\\epsilon\)\}\},v\_\{\\text\{min\}\},v\_\{\\text\{max\}\}\\right\)\.\(B\.1\)For lateral control, the steering command integrates a PD feedback term with a geometric feedforward termδf​f=arctan⁡\(L⋅κ\)\\delta\_\{ff\}=\\arctan\(L\\cdot\\kappa\), calculated using the kinematic bicycle model whereLLis the wheelbase\.

## Declaration of Generative AI and AI\-assisted technologies in the writing process

During the preparation of this work the authors used Claude in order to refine the language and grammar of the manuscript\. After using this tool, the authors reviewed and edited the content as needed and take full responsibility for the content of the publication\.

## Acknowledgments

This work was supported in part by National Natural Science Foundation of China under Grant 52275564, U24A20109, and by Beijing Natural Science Foundation under Grant QY24251\.

The authors would like to thank Chengyun Ju, Donggang Sang, and Bingtao Zhang for their valuable discussions and technical support during the course of this work and would also like to thank Jing Ma for the support during the vehicle experiment phase of this work\.

## References

- \[1\]\(2019\)Differentiable convex optimization layers\.InAdvances in Neural Information Processing Systems,H\. Wallach, H\. Larochelle, A\. Beygelzimer, F\. d'Alché\-Buc, E\. Fox, and R\. Garnett \(Eds\.\),Vol\.32,pp\.\.Cited by:[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px2.p1.1)\.
- \[2\]A\. D\. Ames, X\. Xu, J\. W\. Grizzle, and P\. Tabuada\(2017\)Control barrier function based quadratic programs for safety critical systems\.IEEE Transactions on Automatic Control62\(8\),pp\. 3861–3876\.External Links:[Document](https://dx.doi.org/10.1109/TAC.2016.2638961)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p2.1),[§2](https://arxiv.org/html/2606.05247#S2.p1.1)\.
- \[3\]B\. Amos and J\. Z\. Kolter\(2017\)OptNet: differentiable optimization as a layer in neural networks\.InProceedings of the International Conference on Machine Learning,Vol\.70,pp\. 136–145\.Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p2.1),[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px2.p1.1)\.
- \[4\]J\. A\. E\. Andersson, J\. Gillis, G\. Horn, J\. B\. Rawlings, and M\. Diehl\(2019\)CasADi: a software framework for nonlinear optimization and optimal control\.Mathematical Programming Computation11\(1\),pp\. 1–36\.External Links:[Document](https://dx.doi.org/10.1007/s12532-018-0139-4)Cited by:[§4\.2](https://arxiv.org/html/2606.05247#S4.SS2.SSS0.Px3.p1.1)\.
- \[5\]Y\. Bengio, J\. Louradour, R\. Collobert, and J\. Weston\(2009\)Curriculum learning\.InProceedings of the International Conference on Machine Learning,pp\. 41–48\.Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p3.1),[§3\.5](https://arxiv.org/html/2606.05247#S3.SS5.p1.1)\.
- \[6\]Q\. Bertrand, Q\. Klopfenstein, M\. Massias, M\. Blondel, S\. Vaiter, A\. Gramfort, and J\. Salmon\(2022\)Implicit differentiation for fast hyperparameter selection in non\-smooth convex learning\.Journal of Machine Learning Research23\(149\),pp\. 1–43\.Cited by:[§3\.4](https://arxiv.org/html/2606.05247#S3.SS4.p1.5)\.
- \[7\]M\. Blondel, Q\. Berthet, M\. Cuturi, R\. Frostig, S\. Hoyer, F\. Llinares\-Lopez, F\. Pedregosa, and J\. Vert\(2022\)Efficient and modular implicit differentiation\.InAdvances in Neural Information Processing Systems,S\. Koyejo, S\. Mohamed, A\. Agarwal, D\. Belgrave, K\. Cho, and A\. Oh \(Eds\.\),Vol\.35,pp\. 5230–5242\.Cited by:[§3\.4](https://arxiv.org/html/2606.05247#S3.SS4.p1.5)\.
- \[8\]S\. P\. Boyd and L\. Vandenberghe\(2004\)Convex optimization\.Cambridge Univ\. Press\.Cited by:[§4\.1](https://arxiv.org/html/2606.05247#S4.SS1.SSS0.Px1.p1.4)\.
- \[9\]H\. Chen, G\. E\. C\. Flores, and C\. Li\(2024\)Physics\-informed neural networks with hard linear equality constraints\.Computers & Chemical Engineering189,pp\. 108764\.External Links:ISSN 0098\-1354,[Document](https://dx.doi.org/10.1016/j.compchemeng.2024.108764)Cited by:[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px1.p1.1)\.
- \[10\]Y\. Chen, D\. Huang, D\. Zhang, J\. Zeng, N\. Wang, H\. Zhang, and J\. Yan\(2021\)Theory\-guided hard constraint projection \(HCP\): a knowledge\-based data\-driven scientific machine learning method\.Journal of Computational Physics445,pp\. 110624\.External Links:ISSN 0021\-9991,[Document](https://dx.doi.org/https%3A//doi.org/10.1016/j.jcp.2021.110624)Cited by:[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px1.p1.1)\.
- \[11\]R\. Cristian, P\. Harsha, G\. Perakis, B\. L\. Quanz, and I\. Spantidakis\(2023\)End\-to\-end learning for optimization via constraint\-enforcing approximators\.Proceedings of the AAAI Conference on Artificial Intelligence37\(6\),pp\. 7253–7260\.External Links:[Document](https://dx.doi.org/10.1609/aaai.v37i6.25884)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p1.1)\.
- \[12\]D\. Csuzdi, T\. Bécsi, and O\. Törő\(2026\)Physics\-informed neural particle flow for the bayesian update step\.Knowledge\-Based Systems346,pp\. 116209\.External Links:ISSN 0950\-7051,[Document](https://dx.doi.org/https%3A//doi.org/10.1016/j.knosys.2026.116209)Cited by:[§2](https://arxiv.org/html/2606.05247#S2.p1.1)\.
- \[13\]Z\. Cui, T\. Gao, K\. Talamadupula, and Q\. Ji\(2025\)Knowledge\-augmented deep learning and its applications: a survey\.IEEE Transactions on Neural Networks and Learning Systems36\(2\),pp\. 2133–2153\.External Links:[Document](https://dx.doi.org/10.1109/TNNLS.2023.3338619)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p1.1)\.
- \[14\]E\. W\. Dijkstra\(1959\)A note on two problems in connexion with graphs\.Numerische Mathematik1\(1\),pp\. 269–271\.External Links:[Document](https://dx.doi.org/10.1007/BF01386390)Cited by:[§4\.2](https://arxiv.org/html/2606.05247#S4.SS2.SSS0.Px2.p1.4)\.
- \[15\]D\. Dolgov, S\. Thrun, M\. Montemerlo, and J\. Diebel\(2010\)Path planning for autonomous vehicles in unknown semi\-structured environments\.International Journal of Robotics Research29\(5\),pp\. 485–501\.External Links:[Document](https://dx.doi.org/10.1177/0278364909359210)Cited by:[§4\.2](https://arxiv.org/html/2606.05247#S4.SS2.SSS0.Px3.p1.1)\.
- \[16\]P\. Donti, D\. Rolnick, and J\. Z\. Kolter\(2021\)DC3: a learning method for optimization with hard constraints\.InProceedings of the International Conference on Learning Representations,Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p2.1),[§1](https://arxiv.org/html/2606.05247#S1.p4.1),[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px3.p1.1),[§4\.2](https://arxiv.org/html/2606.05247#S4.SS2.SSS0.Px3.p1.1)\.
- \[17\]A\. Dosovitskiy, G\. Ros, F\. Codevilla, A\. Lopez, and V\. Koltun\(2017\)CARLA: an open urban driving simulator\.InProceedings of the Conference on Robot Learning,pp\. 1–16\.Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p4.1),[§4\.2](https://arxiv.org/html/2606.05247#S4.SS2.SSS0.Px4.p3.1)\.
- \[18\]H\. Federer\(1959\)Curvature measures\.Transactions of the American Mathematical Society93\(3\),pp\. 418–491\.Cited by:[§3\.3](https://arxiv.org/html/2606.05247#S3.SS3.SSS0.Px1.p1.4)\.
- \[19\]F\. Fioretto, P\. Van Hentenryck, T\. W\. Mak, C\. Tran, F\. Baldo, and M\. Lombardi\(2020\)Lagrangian duality for constrained deep learning\.InJoint European conference on machine learning and knowledge discovery in databases,pp\. 118–135\.Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p2.1),[§2](https://arxiv.org/html/2606.05247#S2.p1.1)\.
- \[20\]J\. D\. Gammell, S\. S\. Srinivasa, and T\. D\. Barfoot\(2014\)Informed RRT\*: optimal sampling\-based path planning focused via direct sampling of an admissible ellipsoidal heuristic\.InProceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems,pp\. 2997–3004\.Cited by:[§4\.2](https://arxiv.org/html/2606.05247#S4.SS2.SSS0.Px3.p1.1)\.
- \[21\]Y\. Gao, X\. Wang, and X\. Gao\(2026\)ACDA: anatomically constrained distribution alignment for robust medical image segmentation\.Knowledge\-Based Systems341,pp\. 115749\.External Links:ISSN 0950\-7051,[Document](https://dx.doi.org/10.1016/j.knosys.2026.115749)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p1.1)\.
- \[22\]S\. Gould, B\. Fernando, A\. Cherian, P\. Anderson, R\. Santa Cruz, and E\. Guo\(2016\)On differentiating parameterized argmin and argmax problems with application to bi\-level optimization\.arXiv preprint arXiv:1607\.05447\.External Links:[Document](https://dx.doi.org/10.48550/arXiv.1607.05447)Cited by:[§3\.4](https://arxiv.org/html/2606.05247#S3.SS4.p1.5)\.
- \[23\]P\. D\. Grontas, A\. Terpin, E\. C\. Balta, R\. D’Andrea, and J\. Lygeros\(2026\)Pinet: optimizing hard\-constrained neural networks with orthogonal projection layers\.InProceedings of the International Conference on Learning Representations,Cited by:[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px2.p1.1)\.
- \[24\]Y\. Guo, Z\. Guo, Y\. Wang, D\. Yao, B\. Li, and L\. Li\(2024\)A survey of trajectory planning methods for autonomous driving—part i: unstructured scenarios\.IEEE Transactions on Intelligent Vehicles9\(9\),pp\. 5407–5434\.External Links:[Document](https://dx.doi.org/10.1109/TIV.2023.3337318)Cited by:[§4\.1](https://arxiv.org/html/2606.05247#S4.SS1.p1.4)\.
- \[25\]A\. Iftakher, R\. Golder, B\. N\. Roy, and M\.M\. Faruque Hasan\(2026\)Physics\-informed neural networks with hard nonlinear equality and inequality constraints\.Computers & Chemical Engineering204,pp\. 109418\.External Links:ISSN 0098\-1354,[Document](https://dx.doi.org/10.1016/j.compchemeng.2025.109418)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p2.1),[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px3.p1.1)\.
- \[26\]L\. Jin, S\. Li, B\. Hu, and M\. Liu\(2019\)A survey on projection neural networks and their applications\.Applied Soft Computing76,pp\. 533–544\.External Links:ISSN 1568\-4946,[Document](https://dx.doi.org/https%3A//doi.org/10.1016/j.asoc.2019.01.002)Cited by:[§2](https://arxiv.org/html/2606.05247#S2.p1.1)\.
- \[27\]O\. Khatib\(1985\)Real\-time obstacle avoidance for manipulators and mobile robots\.InProceedings\. 1985 IEEE International Conference on Robotics and Automation,Vol\.2,pp\. 500–505\.External Links:[Document](https://dx.doi.org/10.1109/ROBOT.1985.1087247)Cited by:[§4\.2](https://arxiv.org/html/2606.05247#S4.SS2.SSS0.Px2.p1.4)\.
- \[28\]M\. Kim and H\. Kim\(2022\)Projection\-aware deep neural network for dc optimal power flow without constraint violations\.In2022 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids \(SmartGridComm\),pp\. 116–121\.External Links:[Document](https://dx.doi.org/10.1109/SmartGridComm52983.2022.9961047)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p1.1)\.
- \[29\]G\. Lastrucci and A\. M\. Schweidtmann\(2025\)ENFORCE: nonlinear constrained learning with adaptive\-depth neural projection\.arXiv preprint arXiv:2502\.06774\.External Links:[Document](https://dx.doi.org/10.48550/arXiv.2502.06774)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p2.1),[§1](https://arxiv.org/html/2606.05247#S1.p4.1),[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px3.p1.1),[§4\.2](https://arxiv.org/html/2606.05247#S4.SS2.SSS0.Px3.p1.1)\.
- \[30\]M\. Li, S\. Kolouri, and J\. Mohammadi\(2023\-01\)Learning to solve optimization problems with hard linear constraints\.IEEE AccessPP,pp\. 1–1\.External Links:[Document](https://dx.doi.org/10.1109/ACCESS.2023.3285199)Cited by:[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px1.p1.1)\.
- \[31\]E\. Liang, M\. Chen, and S\. H\. Low\(2024\)Homeomorphic projection to ensure neural\-network solution feasibility for constrained optimization\.Journal of Machine Learning Research25\(329\),pp\. 1–55\.External Links:[Link](http://jmlr.org/papers/v25/23-1577.html)Cited by:[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px3.p1.1)\.
- \[32\]E\. Liang and M\. Chen\(2025\)Efficient bisection projection to ensure neural\-network solution feasibility for optimization over general set\.InProceedings of the International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.267,pp\. 37071–37099\.Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p2.1),[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px3.p1.1)\.
- \[33\]Y\. Min and N\. Azizan\(2024\)HardNet: hard\-constrained neural networks with universal approximation guarantees\.arXiv preprint arXiv:2410\.10807\.Cited by:[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px1.p1.1)\.
- \[34\]S\. Park and P\. Van Hentenryck\(2023\)Self\-supervised primal\-dual learning for constrained optimization\.Proceedings of the AAAI Conference on Artificial Intelligence37\(4\),pp\. 4052–4060\.External Links:[Document](https://dx.doi.org/10.1609/aaai.v37i4.25520)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p2.1),[§2](https://arxiv.org/html/2606.05247#S2.p1.1)\.
- \[35\]P\. Polack, F\. Altché, B\. d’Andréa\-Novel, and A\. de La Fortelle\(2017\)The kinematic bicycle model: a consistent model for planning feasible trajectories for autonomous vehicles?\.InProceedings of the IEEE Intelligent Vehicles Symposium,Los Angeles, CA, USA,pp\. 812–818\.Cited by:[§4\.1](https://arxiv.org/html/2606.05247#S4.SS1.SSS0.Px2.p1.3)\.
- \[36\]M\. Raissi, P\. Perdikaris, and G\.E\. Karniadakis\(2019\)Physics\-informed neural networks: a deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations\.Journal of Computational Physics378,pp\. 686–707\.External Links:ISSN 0021\-9991,[Document](https://dx.doi.org/10.1016/j.jcp.2018.10.045)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p2.1),[§2](https://arxiv.org/html/2606.05247#S2.p1.1)\.
- \[37\]J\.B\. Rawlings, D\.Q\. Mayne, and M\. Diehl\(2017\)Model predictive control: theory, computation, and design\.Nob Hill Publishing\.External Links:ISBN 9780975937730Cited by:[§4\.2](https://arxiv.org/html/2606.05247#S4.SS2.SSS0.Px3.p1.1)\.
- \[38\]A\. Sakai, D\. Ingram, J\. Dinius, K\. Chawla, A\. Raffin, and A\. Paques\(2018\)PythonRobotics: a Python code collection of robotics algorithms\.arXiv preprint arXiv:1808\.10703\.External Links:[Document](https://dx.doi.org/10.48550/arXiv.1808.10703)Cited by:[§A\.1](https://arxiv.org/html/2606.05247#A1.SS1.p1.1),[§A\.2](https://arxiv.org/html/2606.05247#A1.SS2.p1.1)\.
- \[39\]M\. Silvestri, A\. De Filippo, M\. Lombardi, and M\. Milano\(2024\)UNIFY: a unified policy designing framework for solving integrated constrained optimization and machine learning problems\.Knowledge\-Based Systems303,pp\. 112383\.External Links:ISSN 0950\-7051,[Document](https://dx.doi.org/10.1016/j.knosys.2024.112383)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p2.1)\.
- \[40\]J\. Tordesillas, V\. Klemm, J\. P\. How, and M\. Hutter\(2026\)RAYEN: imposition of hard convex constraints on neural networks\.arXiv preprint arXiv:2307\.08336\.External Links:[Document](https://dx.doi.org/10.48550/arXiv.2307.08336)Cited by:[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px2.p1.1)\.
- \[41\]Q\. Van Baelen and P\. Karsmakers\(2023\)Constraint guided gradient descent: training with inequality constraints with applications in regression and semantic segmentation\.Neurocomputing556,pp\. 126636\.External Links:ISSN 0925\-2312,[Document](https://dx.doi.org/https%3A//doi.org/10.1016/j.neucom.2023.126636)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p1.1)\.
- \[42\]K\. P\. Wabersich and M\. N\. Zeilinger\(2023\)Predictive control barrier functions: enhanced safety mechanisms for learning\-based control\.IEEE Transactions on Automatic Control68\(5\),pp\. 2638–2651\.External Links:[Document](https://dx.doi.org/10.1109/TAC.2022.3175628)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p2.1),[§2](https://arxiv.org/html/2606.05247#S2.p1.1)\.
- \[43\]K\. P\. Wabersich and M\. N\. Zeilinger\(2021\)A predictive safety filter for learning\-based control of constrained nonlinear dynamical systems\.Automatica129,pp\. 109597\.External Links:ISSN 0005\-1098,[Document](https://dx.doi.org/https%3A//doi.org/10.1016/j.automatica.2021.109597)Cited by:[§2](https://arxiv.org/html/2606.05247#S2.p1.1)\.
- \[44\]A\. Wächter and L\. T\. Biegler\(2006\)On the implementation of an interior\-point filter line\-search algorithm for large\-scale nonlinear programming\.Mathematical Programming106\(1\),pp\. 25–57\.External Links:[Document](https://dx.doi.org/10.1007/s10107-004-0559-y)Cited by:[§4\.2](https://arxiv.org/html/2606.05247#S4.SS2.SSS0.Px3.p1.1)\.
- \[45\]R\. Wang, Y\. Zhang, Z\. Guo, T\. Chen, X\. Yang, and J\. Yan\(2023\)LinSATNet: the positive linear satisfiability neural networks\.InProceedings of the International Conference on Machine Learning,Vol\.202,pp\. 36605–36625\.Cited by:[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px1.p1.1)\.
- \[46\]W\. Xiao, T\. Wang, R\. Hasani, M\. Chahine, A\. Amini, X\. Li, and D\. Rus\(2023\)BarrierNet: differentiable control barrier functions for learning of safe robot control\.IEEE Transactions on Robotics39\(3\),pp\. 2289–2307\.External Links:[Document](https://dx.doi.org/10.1109/TRO.2023.3249564)Cited by:[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px3.p1.1)\.
- \[47\]Y\. Yu and S\. Atamturktur\(2023\)Knowledge\-informed generative adversarial network for functional calibration of computer models\.Knowledge\-Based Systems263,pp\. 110294\.External Links:ISSN 0950\-7051,[Document](https://dx.doi.org/https%3A//doi.org/10.1016/j.knosys.2023.110294)Cited by:[§2](https://arxiv.org/html/2606.05247#S2.p1.1)\.
- \[48\]H\. Zeng, C\. Yang, Y\. Zhou, C\. Yang, and Q\. Guo\(2024\)GLinSAT: the general linear satisfiability neural network layer by accelerated gradient descent\.InAdvances in Neural Information Processing Systems,A\. Globerson, L\. Mackey, D\. Belgrave, A\. Fan, U\. Paquet, J\. Tomczak, and C\. Zhang \(Eds\.\),Vol\.37,pp\. 122584–122615\.External Links:[Document](https://dx.doi.org/10.52202/079017-3896)Cited by:[§2](https://arxiv.org/html/2606.05247#S2.SS0.SSS0.Px1.p1.1)\.
- \[49\]C\. Zhang, L\. Dai, H\. Zhang, and Z\. Wang\(2025\)Control barrier function\-guided deep reinforcement learning for decision\-making of autonomous vehicle at on\-ramp merging\.IEEE Transactions on Intelligent Transportation Systems26\(6\),pp\. 8919–8932\.External Links:[Document](https://dx.doi.org/10.1109/TITS.2025.3540862)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p2.1),[§2](https://arxiv.org/html/2606.05247#S2.p1.1)\.
- \[50\]W\. Zhang, F\. Liu, C\. M\. Nguyen, Z\. L\. Ou Yang, S\. Ramasamy, and C\. Foo\(2024\)Training neural networks with classification rules for incorporating domain knowledge\.Knowledge\-Based Systems294,pp\. 111716\.External Links:ISSN 0950\-7051,[Document](https://dx.doi.org/10.1016/j.knosys.2024.111716)Cited by:[§1](https://arxiv.org/html/2606.05247#S1.p1.1)\.

Similar Articles

Neural Slack Variables for Shape Constraints

arXiv cs.LG

This paper introduces neural slack variables, a primal-side approach that converts constraint enforcement into a regression problem by coupling the primary network with a jointly learned auxiliary network, achieving zero violations on monotonicity and convexity tests and enabling arbitrage-free learning of volatility surfaces.