Table of Contents
Fetching ...

SnareNet: Flexible Repair Layers for Neural Networks with Hard Constraints

Ya-Chi Chu, Alkiviades Boukas, Madeleine Udell

TL;DR

SnareNet addresses the problem of enforcing nonlinear, input-dependent constraints in neural networks by introducing a differentiable repair layer guided by adaptive relaxation. The method combines an adaptive Newton update with Levenberg–Marquardt regularization to navigate toward the intersection of the constraint range and the feasible set, progressively tightening constraints during training. Empirically, SnareNet yields higher-quality solutions while satisfying constraints with user-defined tolerance across optimization-learning tasks and neural control policies, outperforming soft-constraint and several hard-constraint baselines. This approach offers a practical, end-to-end framework for safety- and feasibility-critical applications where constrained outputs are essential for real-world deployment.

Abstract

Neural networks are increasingly used as surrogate solvers and control policies, but unconstrained predictions can violate physical, operational, or safety requirements. We propose SnareNet, a feasibility-controlled architecture for learning mappings whose outputs must satisfy input-dependent nonlinear constraints. SnareNet appends a differentiable repair layer that navigates in the constraint map's range space, steering iterates toward feasibility and producing a repaired output that satisfies constraints to a user-specified tolerance. To stabilize end-to-end training, we introduce adaptive relaxation, which designs a relaxed feasible set that snares the neural network at initialization and shrinks it into the feasible set, enabling early exploration and strict feasibility later in training. On optimization-learning and trajectory planning benchmarks, SnareNet consistently attains improved objective quality while satisfying constraints more reliably than prior work.

SnareNet: Flexible Repair Layers for Neural Networks with Hard Constraints

TL;DR

SnareNet addresses the problem of enforcing nonlinear, input-dependent constraints in neural networks by introducing a differentiable repair layer guided by adaptive relaxation. The method combines an adaptive Newton update with Levenberg–Marquardt regularization to navigate toward the intersection of the constraint range and the feasible set, progressively tightening constraints during training. Empirically, SnareNet yields higher-quality solutions while satisfying constraints with user-defined tolerance across optimization-learning tasks and neural control policies, outperforming soft-constraint and several hard-constraint baselines. This approach offers a practical, end-to-end framework for safety- and feasibility-critical applications where constrained outputs are essential for real-world deployment.

Abstract

Neural networks are increasingly used as surrogate solvers and control policies, but unconstrained predictions can violate physical, operational, or safety requirements. We propose SnareNet, a feasibility-controlled architecture for learning mappings whose outputs must satisfy input-dependent nonlinear constraints. SnareNet appends a differentiable repair layer that navigates in the constraint map's range space, steering iterates toward feasibility and producing a repaired output that satisfies constraints to a user-specified tolerance. To stabilize end-to-end training, we introduce adaptive relaxation, which designs a relaxed feasible set that snares the neural network at initialization and shrinks it into the feasible set, enabling early exploration and strict feasibility later in training. On optimization-learning and trajectory planning benchmarks, SnareNet consistently attains improved objective quality while satisfying constraints more reliably than prior work.
Paper Structure (31 sections, 22 equations, 8 figures, 8 tables, 2 algorithms)

This paper contains 31 sections, 22 equations, 8 figures, 8 tables, 2 algorithms.

Figures (8)

  • Figure 1: Architecture design of SnareNet.
  • Figure 2: The infeasible point $\hat{y} = \mathcal{M}_{\theta}(x)$ is mapped to an image point $g(\hat{y}) \in \mathbb{R}^m$ that lies outside the box $\mathbf{B}(\ell, u)$. The box projection $\mathcal{P}_{\mathbf{B}_{(\ell, u)}}(g(\hat{y}))$ might have no preimage under non-linear $g$ since it might not lie in joint numerical range $\mathbf{R}(g)$. SnareNet finds a path to approach an image point in the intersection $\mathbf{R}(g) \cap \mathbf{B}(\ell, u)$, the preimage of which will be feasible.
  • Figure 3: Illustration of adaptive constraints relaxation. The figure illustrates a schedule in which $\varepsilon^{(t)} = 0$ for $t \geq 500$. At epoch $t$, the repair layer $\mathcal{R}$ enforces the output $\check{y}^{(t)}$ lies in the relaxed constraint set $\mathcal{C}_{\varepsilon^{(t)}} = \{ y \in \mathbb{R}^n \mid \ell - \varepsilon^{(t)} \leq g(y) \leq u + \varepsilon^{(t)} \}$.
  • Figure 4: Training dynamics on 833 validation instances of NCPs and QCQPs. Shaded region indicate the standard deviation across seeds.
  • Figure 5: Evaluation metrics on 833 test instances of NCPs and QCQPs. Black error bars indicate the standard deviation across seeds.
  • ...and 3 more figures

Theorems & Definitions (1)

  • Example 1