Soft-Radial Projection for Constrained End-to-End Learning

Philipp J. Schneider, Daniel KuhnNeurIPS 2026

TL;DR

When neural networks make real-world decisions—like allocating a financial portfolio or steering a robot—their raw outputs often violate hard physical or operational rules. Standard "fix-it" layers slam out-of-bounds predictions directly onto the boundary of allowed values, squashing the mathematical gradients needed for learning. Soft-Radial Projection (SRP) solves this by smoothly pulling all predictions into the interior of the safe zone like a rubber sheet, guaranteeing strict rule-compliance, fast inference, and healthy gradients everywhere.

What Problem Does This Paper Address?

Neural networks are fantastic function approximators, but they have no innate respect for boundaries. If you ask a network to divide a budget or command a robotic actuator, a naive prediction might easily overspend or break hardware limits.

To enforce feasibility by construction, engineers often bolt a projection layer onto the end of a network. If the network predicts an illegal point $u$, a standard orthogonal or "hard radial" projection snaps $u$ onto the nearest legal point on the boundary of the feasible set $\mathcal{C}$.

Here is the catch: dimensional collapse. Imagine shining a flashlight at a wall—every point along a beam of light lands on the exact same spot. Similarly, boundary projections map entire regions of out-of-bounds predictions to the exact same boundary face. Mathematically, this makes the mapping "many-to-one," causing its Jacobian (the matrix of derivatives) to lose rank. During backpropagation, gradients pointing into the wall get completely zeroed out—a bottleneck called gradient saturation. Furthermore, computing standard orthogonal projections onto complex shapes usually requires running slow, iterative quadratic program (QP) solvers for every single training example.

Figure 1: Impact of projection geometry on optimization. Comparison of (a) Orthogonal and (b) Soft-Radial Projection on a 2D constrained task (target ×). Main plots visualize the trajectory of the unconstrained candidate (◦) versus the feasible decision (+). Insets show the coordinate grid warping (A) and training loss (B). Soft-radial projection preserves nonzero radial derivatives for infeasible inputs.

Methods

Instead of clipping out-of-bounds predictions onto the boundary wall, the authors propose Soft-Radial Projection (SRP), which gently compresses the entire unconstrained space $\mathbb{R}^n$ into the strict interior of the convex feasible set $\text{Int}(\mathcal{C})$.

Here is how the recipe works:

  1. Pick an Anchor ($u_0$): Choose a known, strictly safe point inside $\mathcal{C}$ (like the center of a simplex).
  2. Find the Hard Boundary ($q(u)$): Draw a ray from the anchor $u_0$ through the network's raw output $u$. If $u$ is outside $\mathcal{C}$, find where that ray pierces the boundary $\partial\mathcal{C}$. (This ray-casting idea builds on prior gauge/radial layers like RAYEN).
  3. Apply a Soft Contraction ($r$): This is the novel twist. Instead of stopping at the boundary clip $q(u)$, SRP smoothly interpolates between $u_0$ and $q(u)$ using a strictly increasing sigmoidal scaling function $r(\|u - u_0\|^2) \in [0, 1)$—such as a rational or hyperbolic tangent curve.
Figure 2: Geometric intuition. For an infeasible input u, the ray from anchor u0 through u inter- sects the boundary ∂C at the hard radial projection q(u). Our soft-radial mapping p(u) strictly en- forces feasibility by smoothly interpolating along the segment [u0, q(u)] via the radial weight r.

Because $r$ never quite hits $1$, every raw vector in $\mathbb{R}^n$ is mapped one-to-one into $\text{Int}(\mathcal{C})$. And for common shapes like polytopes (defined by linear inequalities $Ax \le b$) and Euclidean balls, finding the ray intersection requires zero iterative solvers—just a fast, parallelizable closed-form formula. For general convex sets, it reduces to a simple 1D bisection search.

Datasets

The authors evaluate SRP on two decision-focused learning tasks (details of the raw underlying data sources are deferred to the paper's appendix, with no newly introduced benchmark datasets):

  • Global Portfolio Optimization: A financial dataset tracking $N = 11$ assets, where an LSTM policy allocates weights under a component-wise capped simplex (total budget sums to 1, max 25% per asset) while accounting for 10 bps transaction costs.
  • Ride-Sharing Dispatch: A dynamic resource allocation task across the top $N = 150$ activity zones, where an MLP dispatches a time-varying vehicle fleet $S_t$ to maximize fulfilled demand under per-zone capacity limits (10% of fleet size).

Key Insights and Ideas

  • Topology Saves Gradients: Because SRP is a homeomorphism (a continuous, reversible, one-to-one stretching of space) between $\mathbb{R}^n$ and $\text{Int}(\mathcal{C})$, its Jacobian is invertible almost everywhere. No two distinct predictions collapse to the same point, eliminating projection-induced spurious local minima inside the feasible set.
  • Expressivity isn't Lost: Even though SRP can never output a point exactly on the boundary, the authors prove a Universal Approximation Theorem: because interior points can get arbitrarily close to the boundary, a neural network topped with SRP can still uniformly approximate any continuous target function on $\mathcal{C}$.
  • The Boundary Asymptote Trade-off: Reaching an optimal solution that sits dead-on the boundary requires the raw network output norm $\|u\|$ to grow toward infinity. If network outputs are bounded by $M$ (via weight decay or clipping), the suboptimality gap is neatly bounded and shrinks directly with the radial saturation tail $1 - r(M^2)$.

Key Results

SRP matches or beats state-of-the-art constraint layers at a fraction of the computational cost:

  • Portfolio Optimization: SRP achieved the highest net Sharpe Ratio of 0.70 (with the lowest turnover of 0.04), outperforming Orthogonal Projection (0.44), HardNet (0.46), DC3 (0.25), and the hard radial baseline RAYEN (0.60). Inference took just 0.76 ms, roughly 7.6× to 11× faster than iterative/correction layers like O-Proj (5.81 ms), HardNet (6.87 ms), and DC3 (8.44 ms).
  • Ride-Sharing Dispatch: SRP matched the top demand fulfillment rate of 0.84 (tying DC3, HardNet, and RAYEN, while O-Proj lagged at 0.72 due to gradient saturation). Again, SRP shone in speed: 0.89 ms inference latency versus 10.65–17.15 ms for optimization/correction baselines, cutting training time from 80.25s (O-Proj) down to 15.52s.

Limitations and Future Work

  • Input-Dependent Constraints: If the feasible set changes shape for every single input (rather than simply scaling up and down like in the dispatch task), SRP must recompute a valid interior anchor $u_0$ and boundary intersection per instance, adding computational overhead.
  • Asymptotic Boundary Optima: Because boundary solutions are only approached as $\|u\| \to \infty$, pushing closer to a boundary optimum eventually causes radial derivatives to shrink, creating a fundamental trade-off between boundary precision and gradient conditioning.
  • End-to-End Only: Unlike standard projections, SRP is not idempotent ($p(p(u)) \neq p(u)$)—even already-feasible points get pulled slightly toward the anchor. Thus, it is built strictly for end-to-end training, not for slapping onto an already-trained model as a post-hoc fix. Future work aims to streamline anchor-finding for dynamic constraints and better navigate the boundary-conditioning trade-off.

Summary updated

Abstract

Constrained end-to-end learning trains neural networks whose outputs must satisfy feasibility constraints, such as resource, budget, or operational limits. While projection and optimization layers guarantee constraint satisfaction, boundary-based projections can introduce unfavorable optimization geometry: regions of the unconstrained output space are mapped to the same active face of the feasible set. This makes the resulting map locally rank-deficient, suppressing gradients in constrained directions and potentially impairing optimization—a bottleneck known as gradient saturation. We propose _Soft-Radial Projection (SRP)_, a differentiable reparameterization layer that maps unconstrained network outputs into the relative interior of a convex feasible set by smoothly rescaling rays from a strictly feasible anchor point. Unlike hard radial or orthogonal projections, the resulting map is one-to-one and has a full-rank Jacobian almost everywhere, while guaranteeing strict feasibility. We prove that constrained networks equipped with SRP retain universal approximation guarantees. For polytopes and balls, the layer admits a closed-form forward pass, while for general convex sets, the ray–boundary intersection reduces to a one-dimensional search. Experiments on decision-focused learning benchmarks demonstrate strong solution quality at low computational cost, with particularly favorable results in portfolio optimization and substantially lower inference latency than differentiable optimization layers in the evaluated settings.
BibTeX
@inproceedings{schneider2026soft,
  author = {Philipp J. Schneider and Daniel Kuhn},
  title = {{Soft-Radial Projection for Constrained End-to-End Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=flhcgCEqDM},
}
Figure