acceptodds
Published as a conference paper at NeurIPS 2026

Neural Slack Variables for Shape Constraints

Ruben Wiedemann, Antoine Jacquier, Lukas Gonon

Abstract

Enforcing functional inequality constraints such as monotonicity and convexity in neural networks is a fundamental challenge in many industrial and scientific applications. Classical one-sided penalty methods, just like primal-dual methods gated by complementary slackness, provide gradients only at violated locations, resulting in fragile constraint satisfaction. Hard architectural constraints, on the other hand, cover only the simplest cases and tend to compromise the network's expressive power. We introduce *neural slack variables*, a deep learning-native primal-side approach that converts constraint enforcement into a two-sided regression problem by coupling the primary network with a jointly learned auxiliary network. The auxiliary network serves as a valid target for the primary network's constraint quantities, inducing feasibility and regularity. Theoretically, neural slack variables can be understood as a variable splitting method with parametrized variable projection. Neural slack variables close the gap to hard constraints on monotonicity and low-dimensional convexity, and maintain effectiveness on nonlinear constraints in neural barrier certificates and no-arbitrage volatility surfaces.

Keywords:
Paris, Main Track

Reviews

Among:
Shape:
123456this paper, Bottom 49%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.33 over 3 reviews, above 49% of the others.
Reviewer_xkqdOpenReview ↗
Rating
4
Clarity
3
Confidence
3
Originality
3
Quality
3
Significance
3
Read review
Summary

This paper introduces a method called neural slack variables that enforces functional inequality constraints in neural networks. The main idea is to model the primary network with an architecturally constrained auxiliary network, then jointly train both via a quadratic matching loss in constraint space. As the demonstrated application, they have used the proposed method in volatility surface modeling.

Strengths and weaknesses

Strengths

  1. The overall idea of stable constraint enforcement in neural networks is interesting and important for the representation learning audience. The identified constraint-drifting failure mode is novel and practically important, in my opinion. Also, the authors have used a real-world application domain to demonstrate the method, which is compelling.

  2. Moving from a one-sided penalty in existing methods to a two-sided regression seems simple, yet the provided analysis is robust and in-depth.

  3. The authors have provided a nice breadth of experiments. Also, these experiments are designed well.

  4. The authors have demonstrated that the slack network's architecture shapes the constraint profile of the primary network, which is a useful insight for future research work.

Weaknesses.

  1. The proposed slack network introduces a new set of design decisions, making the overall model more complex. Unlike loss-based constraints, this might actually impact the overall training, generalizability, and overfitting of the model. A more in-depth analysis is needed on these aspects.

  2. The paper lacks formal guarantees. While the experimental results are compelling and justifiable, it would be interesting to have some theoretical guarantees of the proposed model. This is important, especially given that hard-constrained-based methods have theoretical guarantees.

  3. The proposed method mainly enforces constraints by checking them on a set of sampled points during training. However, it does not guarantee the constraint holds everywhere between those points. Also, the method seems to perform worse when the input dimension increases.

  4. While the paper introduces certain advantages over hard-constraint methods, the issues of those methods seem not to be completely alleviated. For instance, a new set of design decisions is introduced, which could make the training more difficult. For instance, selecting a proper slack network might be more difficult and costly than finding good weights in hard-constrained methods. A more detailed discussion is needed on this aspect.

Questions

Please refer to the weaknesses. I would like to see an author response on the trade-offs of the proposed slack network and some theoretical insights.

Limitations

Please refer to the weaknesses.

Paper formatting concerns

N/A

Final justification

Thank you for the rebuttal. It has addressed my concerns. I retain my original positive score

Reviewer_3mdzOpenReview ↗
Rating
4
Clarity
3
Confidence
4
Originality
3
Quality
2
Significance
2
Read review
Summary

This paper proposes Neural Slack Variables (NSVs) for enforcing functional inequality constraints Cf_{theta} over continuous domains. The method introduces an auxiliary networks \phi(x), constrained to be positive by construction, and jointly trains it to match the constraint profile Cf_{theta} This converts one-sided violation penalization into a two-sided regression problem.

Strengths and weaknesses

Strengths

  • 1, Simple, general, and compatible with largely unrestricted primary architectures.
    1. Intuitive reformulation of constraint enforcement as regression toward a feasible target.
    1. Interesting use of the slack architecture to regularize the constraint profile.

Weaknesses

  • The proposed gradient-persistence mechanism remains heuristic and provides no feasibility theorem.
  • Performance depends on an intermediate slack-capacity regime without a principled selection rule.
  • I think The contribution is confounded with normalization, asinh, initialization, and SIREN choices.
  • Zero finite-grid violation does not establish continuous-domain feasibility or certification.
  • NSV fails on all seeds for d=4,5d=4,5 convexity, limiting the scalability claim.
Questions

Please check weakness.

And additionally

  • Can the authors bound inf⁡xC[fθ](x)\inf_x C[f_\theta](x) using slack error and regularity assumptions?
  • Does NSV outperform penalties using exactly the same normalization and transformation?
  • Would fixed, projected, or EMA feasible targets yield the same benefit?
  • How should slack capacity be selected without knowledge of the desired constraint profile?
  • Do the financial results persist over seeds, held-out dates, and downstream pricing tasks?
Limitations

see weakness and questions

Paper formatting concerns

N/A

Final justification

I still have personal concerns, but I will raise the score.

1 comment

We sincerely thank the reviewer for this careful and constructive review. We are especially grateful for Q3’s suggestion to compare projected, fixed, and EMA feasible targets; the resulting experiment separates temporal smoothing, spatial coupling, and loss processing, and substantially sharpens our mechanism discussion.

W1, W2 and Q4 overlap with Reviewer xkqd’s questions about theory/capacity selection, which we will address in more detail in our response there shortly.

W3, Q2, Q3: Isolating target construction and loss processing

We compare neural slack variables with slack targets given by EMA st=(1−α)st−1+αpts_t=(1-\alpha)s_{t-1}+\alpha p_t of the projected constraint pt=max⁡(ε,stopgrad⁡(ct))p_t=\max(\varepsilon,\operatorname{stopgrad}(c_t)), where α=1−2−1/h\alpha=1-2^{-1/h}. Half life h=0h=0 gives the projected target st=pts_t=p_t; under untransformed slack loss this recovers exactly the squared hinge penalty (discussed in the paper). The EMA target corresponds to finite 0<h<∞0<h<\infty. h=∞h=\infty (where α=0\alpha=0) gives the fixed target st=s0≡1s_t=s_0\equiv1. We run all controls on the paper’s monotonicity experiment, using the same MLP for fθf_\theta and identical data and optimizer settings across five seeds. To address W3, we ablate the normalization and asinh-transformation of the slack error. We also compare the SIREN-based slack variable used in the paper (ω0=5\omega_0=5) with one using the same MLP architecture as fθf_\theta.

The table reports feasible seeds; MAE (pooled violation rate; conditional shortfall E[−c∣c<0]\mathbb{E}[-c\mid c<0]) computed on the evaluation grid. The conditional shortfall is reported as zero when the violation set is empty.

TargetUntransformedNormalizedNormalized + asinh
Projection/hinge, h=0h=00/5; 0.0825 (24.70%; 0.0406)0/5; 0.0880 (0.95%; 0.00012)0/5; 0.0879 (1.06%; 0.00018)
EMA, h=1h=10/5; 0.0832 (24.02%; 0.0424)2/5; 0.0902 (0.38%; 0.00024)0/5; 0.0876 (0.58%; 0.00034)
EMA, h=4h=40/5; 0.0835 (22.82%; 0.0450)5/5; 0.0955 (0%; 0)5/5; 0.0905 (0%; 0)
EMA, h=16h=160/5; 0.0850 (22.46%; 0.0467)5/5; 0.1000 (0%; 0)5/5; 0.0914 (0%; 0)
EMA, h=64h=640/5; 0.0961 (20.44%; 0.0599)5/5; 0.0948 (0%; 0)5/5; 0.0933 (0%; 0)
EMA, h=256h=2560/5; 0.1532 (8.67%; 0.1080)5/5; 0.1039 (0%; 0)5/5; 0.0966 (0%; 0)
EMA, h=1024h=10245/5; 0.3588 (0%; 0)5/5; 0.1357 (0%; 0)5/5; 0.1155 (0%; 0)
Fixed, h=∞h=\infty5/5; 0.7209 (0%; 0)5/5; 0.7209 (0%; 0)3/5; 0.3419 (0.12%; 0.6839)
NSV (MLP)5/5; 0.1293 (0%; 0)5/5; 0.1155 (0%; 0)5/5; 0.0980 (0%; 0)
NSV (SIREN)1/5; 0.0863 (8.27%; 0.0223)5/5; 0.1226 (0%; 0)5/5; 0.0905 (0%; 0)

This matched comparison answers Q2 affirmatively: under identical transformations, NSV and sufficiently smoothed EMA targets achieve higher feasibility than the equivalent h=0h=0 penalty. We next analyze the results in more detail to clarify the conclusions for W3/Q2/Q3.

1. Untransformed slack error: spatial coupling vs temporal smoothing

Pointwise EMA remains infeasible through h=256h=256 under an untransformed slack error. Increasing hh reduces the violation rate but increases conditional shortfall; EMA first reaches 5/5 at h=1024h=1024, with MAE .3588. NSV (MLP) reaches 5/5 at MAE .1293, showing that spatially coupled slack target can obtain feasibility at substantially lower fit cost than a temporally smoothed slack target. The SIREN slack reaches only 1/5 while its violation rate and conditional shortfall are lower than those of every infeasible EMA target. This comparison supports a role for the target function class and its spatial coupling.

2. Normalization: adaptive weighting

The normalization scheme relativizes the slack error by the slack target. It therefore emphasizes near-active constraints while retaining the gradients supplied across the domain by the particular method. This adaptive weighting raises every EMA with h≥4h\geq4 and both neural slacks to 5/5 feasibility, while exact projection remains 0/5. Relative normalization therefore obtains exact feasibility from a dense matching signal by concentrating the weight near active constraints, but not from a violation-based signal.

3. Asinh: improving fit

Adding asinh (attenuating large slack errors) generally improves fit while slightly weakening constraint enforcement. It preserves 5/5 feasibility for EMA with 4≤h<∞4\leq h<\infty and both neural slacks, although violation rates and conditional shortfalls increase slightly for projection and EMA with h=1h=1. EMA with h=4h=4 and NSV (SIREN) both obtain MAE .0905, while NSV (MLP) improves from .1155 to .0980. For the nonadaptive fixed target, this tradeoff is pronounced and can take the form of rare but deep violations: asinh improves MAE from .7209 to .3419 but reduces feasibility from 5/5 to 3/5, with violations on only .12% of the grid but conditional shortfall .6839.

From pointwise EMA to neural slack variables

The EMA comparison supports the inexact projection as the source of the dense constraint gradient signal that induces feasibility. EMA creates this through temporal smoothing, while NSV creates it through joint fitting and spatial coupling. At calibrated hh, EMA can match or exceed NSV on the fixed indexed grid of our experiment.

Randomized collocation or minibatched conditioning evaluates constraints at newly sampled inputs, which have no stored EMA history. When it is not feasible to maintain one EMA scalar per used grid point, a neural parametrization for the slack target is the natural move, with the "neural Lagrangian" as a clear literature precedent. For example, PDL represents the dual multiplier with a network and fits it to projected dual update targets (see our response to Reviewer EKp6) The corresponding construction in our setting would regress a network toward pointwise EMA values using the alternating PDL-curriculum. Because the network already couples values across inputs, we regard direct joint slack error minimization as the more direct and principled translation of the "inexact projection" construction, without an explicit half-life or separate target-regression stage. This leads precisely to neural slack variables.

W4, W5, Q1: Guarantees and dimensional scope

Neural slack variables are a soft constraint enforcement method for the functional setting, meaning that the constraint index x∈Ωx\in\Omega is continuous rather than finite. A soft method can enforce this constraint only through dense or randomized collocation. This necessarily scopes our claims to low-dimensional domains where this is practical, since maintaining comparable coverage becomes exponentially more expensive as the dimension increases (curse of dimensionality).

We did not intend to claim high-dimensional scalability. The abstract explicitly scopes the convexity result to “low-dimensional convexity,” while the conclusion restricts its all-seed claim to “dense-grid synthetic benchmarks” and states: “Soft enforcement on a sampled grid scales poorly with input dimension; neural slack variables degrade more slowly than the hinge penalty but do not avoid this scaling issue.” We nevertheless recognize that the contribution summary did not repeat this qualification and could be read more broadly than intended. We will revise its claim of unqualified robustness and make the intended scope impossible to misread.

In particular, we accept the convexity failures at d=4,5d=4,5 as a limitation. The fixed collocation budget in this d=2,…,5d=2,\ldots,5 study was chosen precisely to measure this degradation: “We read this as the curse of dimensionality acting on soft constraint enforcement: at fixed grid budget the per-volume sample density thins exponentially, and methods whose feasibility relies on dense pointwise supervision degrade accordingly.”

Q1 makes this limitation precise. Any method that enforces a continuous constraint through sampled supervision, including primal-dual methods, requires regularity to relate feasibility at the sampled points to feasibility throughout Ω\Omega. Under Lipschitz regularity, the resulting bound contains a term proportional to the relevant Lipschitz constant times the grid fill distance hπ:=sup⁡x∈Ωmin⁡xi∈π∣x−xi∣h_\pi:=\sup_{x\in\Omega}\min_{x_i\in\pi}|x-x_i|. With nn quasi-uniform samples, hπh_\pi scales as n−1/dn^{-1/d}, making the curse of dimensionality explicit. For neural slack variables, the relevant residual regularity invariably also depends on the constraint profile. We provide a more detailed discussion in our response to Reviewer xkqd.

Low-dimensional functional domains are important in their own right across science and engineering. In machine learning, the canonical d=2,3d=2,3 settings of implicit neural representations constitute a major research area concerned precisely with such domains. Our chosen application, volatility smoothing, provides a high-profile industrial example: Constructing an arbitrage-free surface is two-dimensional in expiry and log-moneyness, yet central to the daily practice of options trading. Wile the constraint domain is extended by high-dimensional conditioning variables, strong feasibility across fitted and held-out latent codes documents empirical generalization across conditioning, not uniform coverage or certification of an arbitrary high-dimensional domain. We will make this distinction explicit throughout.

Q5: Volatility surface results

We expanded the paper’s volatility surface experiment to four indices, five years of data (2020–2024), and three training seeds. Neural slack variables maintain their strong results, almost eliminating all measured violations on the fitted surfaces. To address Q5, we added a held-out latent calibration experiment: after freezing the autodecoder, we calibrate new latent codes to unseen 2025 data. NSV preserves densely measured no-arbitrage on nearly all surfaces and substantially outperforms every other tested method. Full protocols and results are reported in our response to Reviewer EKp6.

Reviewer_EKp6OpenReview ↗
Rating
5
Clarity
3
Confidence
3
Originality
3
Quality
3
Significance
3
Read review
Summary

this paper is enforcing shape constraints on NNs. In the introduced setting (monotonicity, convexity, no arbitrage on implied volatility surfaces), the network must fit data and also keep a functional inequality everywhere on the domain. They identify a failure mode named as drifting. in this case, penalty and primal dual methods lose the constraint gradient once a point becomes feasible, so the network falls back into violation during training, gets corrected, and falls back again. The proposed method adds a second non negative network, the neural slack variable, matched to the constraint quantity of the main network by a regression loss and trained jointly with it.

Strengths and weaknesses

Strengths

(1) The main idea is simple and the framing is good. Especially the point that the finite capacity is what keeps the matching gradient from vanishing in the feasible region is the point I find convincing.

(2) The experiments are well designed. For example, the barrier certificate experiment in section 4.2 is the strongest part of the evidence. Also, the result matches the argument.

(3) The inductive bias view is a nice second contribution. Eq. 7 shows that among feasible solutions of equal fit the slack loss selects the one whose constraint profile is closest to the slack class, so the slack architecture becomes a controllable prior on the shape.

Weaknesses

(1) The method reaches zero violation on the evaluation grid, but feasibility off the grid is not certified. somehow this is in conflict with how the paper motivates the work.

(2) The closest method is identified but not compared against. In App. B the authors explain that the PDL dual update of Park and hentenryck makes the same move as their method. then they write that PDL would transfer as a drop in replacement and do not pursue it. This is the comparison I most wanted to see.

(3) The scale is small throughout. Everything runs on a single mac machine in 1-2 days.

Questions

(1) Could you run the PDL dual update of Park & hentenryck as a baseline?

(2) Is there any guidance for choosing the slack width, or could it be set adaptively during training?

Limitations

yes

Paper formatting concerns

N.A.

Final justification

The expanded volatility study with the direct PDL comparison resolves my main concern. so I raised my score to 5.

Comments on the paper

1 comment
Meta-review

The neural slack variables idea replaces one-sided constraint penalties with regression toward a feasible auxiliary network. The reviewers find the idea simple and interesting, but several points need clarification.

Please address Reviewer EKp6’s concern that the closest target-based method is discussed but not compared, despite using a similar non-vanishing regression target. Reviewers 3mdz and xkqd also note that zero violation on an evaluation grid does not guarantee continuous-domain feasibility, and performance degrades in higher dimensions. The authors should clarify the supported scope and whether any useful off-grid bound follows under regularity assumptions. Please also comment on slack-network capacity and the possibility of a formal statement beyond heuristics, as raised by Reviewer 3mdz.

The reviews are currently borderline and lean toward rejection. However, I encourage the authors to address all questions in detail, which may improve the reviewers’ evaluation of the paper.

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.