← News
Tech for Good Tech for Good Frontiers

A neural network that cannot step outside its safety rules

A neural network that cannot step outside its safety rules
Second-Order Cone Limits Constraint type
Safe Outputs For Every Input Guarantee
Contact Forces, Obstacle Avoidance Test areas
Faster Than Tested Baselines Speed

A friction-constrained controller in this study violated its physical limits by at most newtons—effectively floating-point round-off—and evaluated roughly 11,000 times faster than one tested optimization solver. That is the promise of SOC-Net: instead of asking a neural network to learn to obey constraints, it builds the constraints into the network’s output mechanism.

The distinction matters wherever software gives instructions to physical systems. A controller can perform beautifully on its training examples and still produce an impossible force or unsafe action on a new input. Penalties in a training objective can discourage such errors, but they do not rule them out. SOC-Net takes a harder line: under the paper’s stated assumptions, every output is feasible, including outputs for inputs outside the training distribution.

That guarantee is not a claim that the system is safe in every broader sense. It only covers the constraints represented in the model, assuming those constraints are feasible and correctly specified. But turning an important class of physical and safety limits into an architectural guarantee could make learned controllers easier to deploy and audit.

The Science

The paper, by Seungseok Oh, Youngjae Min, Navid Azizan, and Namhoon Cho, addresses a specific mathematical family: second-order cone constraints. These include limits on the size of a vector, such as a bound on thrust, and friction rules that restrict how much sideways force a contact can sustain relative to its normal force. They can also express robust inequalities—conditions required to hold despite bounded uncertainty in a system’s inputs or model.

A second-order cone is a set shaped like an infinite cone. A point belongs to it when the length of its sideways coordinates is no greater than its forward coordinate. In an engineering constraint, that geometry lets a single compact inequality describe a range of limits. For example, a robot’s contact force must not demand more friction than the surface can supply.

The challenge is that the allowed outputs change with the input. A particular aircraft state, for instance, may have a different set of safe control commands than another state. The network therefore needs to map each input to an output that lies inside that input’s own feasible set.

Existing approaches make tradeoffs. A general conic optimization solver can find a feasible output, but running a solver for every prediction can add latency. An iterative projection method can be efficient, but if it is stopped early, its answer may not yet satisfy the constraint. A ray-based construction may require an interior feasible point for every input—an anchor that can itself be difficult to compute.

SOC-Net instead takes the network’s raw output, maps it into a space where the rules become membership in fixed cones, and corrects it there. The map is called a lifting: it translates the original constraint into a geometrical representation. SOC-Net projects the lifted output onto the part of the cone that can actually be reached by some valid output, then maps the correction back.

That “reachable slice” is central. If the lifting can reach every point in a cone, ordinary cone projection has a closed-form answer. If it cannot, simply projecting onto the cone might land somewhere that does not correspond to any possible output. SOC-Net projects onto the intersection of the cone and the reachable affine subspace instead. For a single constraint, the authors show that this harder-looking geometry can be reduced to a scalar equation, regardless of the cone’s dimension.

For multiple constraints, the method can handle each separately when their lifted directions are separable. In that case, the whole projection breaks into one operation per cone. The paper’s examples use this structure: friction constraints at separate contacts in one task, and a single robust safety constraint in another.

Figure 3: (a) Nominal trajectories from one test state (“SOCP filter” is Raw N + SOCP filter) and SOC-Net’s random-uncertainty rollouts (thin blue). (b) Jnom against Ttest over five seeds.
Figure 3: (a) Nominal trajectories from one test state (“SOCP filter” is Raw N + SOCP filter) and SOC-Net’s random-uncertainty rollouts (thin blue). (b) Jnom against Ttest over five seeds. Source: Seungseok Oh, Youngjae Min

The schematic above captures the architecture’s core move: lift the raw prediction, correct it within the reachable part of the cone, then pull the correction back to the output. The method does not generally compute the ordinary nearest feasible output in the original output-space distance. It instead chooses a correction that is natural in the lifted geometry, and then selects the closest output realizing that correction.

The authors prove three main properties under explicit assumptions. First, the output satisfies the encoded constraints for every input, and a raw output that is already feasible is left unchanged. Second, the correction is Lipschitz continuous and differentiable almost everywhere, so gradients can flow through it during training. Third, under regularity conditions—including a constant-rank lifting and a continuous moving projection—the constrained network retains the backbone’s ability to approximate any continuous feasible target.

The implementation has a useful twist: in the non-surjective case, its scalar equation is solved with a safeguarded Newton procedure, but feasibility does not depend on finding the exact root. An approximate root gives a less accurate projection, the paper says, while a reconstruction step still places the result on the feasible boundary. That separates two questions often entangled in iterative methods: how close is the answer to the ideal correction, and does it obey the constraint at all?

What They Found

The first experiment allocates forces across four contacts supporting an object. The network receives a desired wrench—a combination of force and rotational effect—and outputs forces at the contacts. Each contact must satisfy a friction-cone limit, so its sideways force cannot be arbitrarily large compared with the force pressing it into the surface.

On 4,096 test inputs, the soft-penalty network violated a friction constraint on 0.19% of examples. SOC-Net’s largest reported violation was newtons, which the authors identify as floating-point round-off. In other words, within the reported numerical precision, the architecture enforced the constraints rather than merely learning to respect them.

Friction-constraint violations on test inputs

Reported violation rate for the penalty network and maximum violation magnitude for SOC-Net; distinct measures are kept distinct rather than plotted on one shared numerical scale.

Friction-constraint violations on test inputs
LabelValue
Penalty network: inputs with violation0.19 %
SOC-Net: maximum violation2.9e-16 %

The speed comparison is striking, though it needs its setup attached. SOC-Net processed the test set in 0.179 milliseconds, and the authors report that this was about times faster than ECOS and times faster than Clarabel. The learned methods ran on an RTX 5090 GPU; the conic solvers ran on one CPU core. These are comparisons in the paper’s particular implementation and hardware arrangement, not a universal promise that SOC-Net will always be thousands of times faster.

Contact-force test-set evaluation time

SOC-Net timing and solver speed ratios reported for the 4,096-test-wrench contact-force experiment.

Contact-force test-set evaluation time
LabelValue
SOC-Net0.179 ms
ECOS relative time11,000 ms
Clarabel relative time14,000 ms

The second experiment asks whether an aircraft can reach a goal while avoiding a spherical obstacle despite uncertain actuation. The model includes bounded actuator gain error and bounded external disturbance. The safety condition is a robust control barrier function, or CBF: a mathematical rule that requires the system to keep enough safety margin to avoid crossing into a forbidden region, even under the modeled uncertainty.

The paper reports that SOC-Net satisfies the robust CBF constraint at every evaluated input. Figure 3 contrasts nominal paths and random-uncertainty rollouts, and plots nominal objective performance against test duration across five seeds.

The supplied paper excerpt cuts off before the full numerical results and table for this experiment, so the exact aircraft-task latency, objective values, and baseline comparisons cannot be responsibly stated here.

That caveat matters. The abstract says SOC-Net had lower evaluation latency than the tested solver-based and iterative baselines in both demonstrations, but the material provided includes detailed timing only for force allocation. The aircraft experiment still establishes an important qualitative result in the excerpt: its modeled safety constraint held at all evaluated inputs, even as the system accounted for uncertainty.

The experiments are demonstrations, not field trials. They use two control settings chosen to illustrate different mathematical cases: several independently handled friction cones, and a non-surjective lifting for a robust aircraft constraint. That makes them useful tests of the architecture’s intended range, while leaving open how it behaves in more complex systems with tightly coupled constraints, changing dynamics, or imperfect safety models.

Why This Changes Things

In safety-critical machine learning, a good average is not always good enough. If a controller’s average force is acceptable but one rare prediction exceeds a physical limit, that outlier may be the one that breaks a grasp, destabilizes a vehicle, or damages equipment. Hard constraints shift the question from “Did training reduce violations?” to “Can this architecture produce a violation of the encoded rule at all?”

SOC-Net’s answer is conditional but meaningful: if the feasible set exists for every input and the assumptions behind the construction hold, its output remains feasible. This guarantee applies before training is complete and beyond the examples the network has seen. That makes the architecture potentially useful in settings where distribution shifts are expected but certain physical limits remain reliable.

It also offers a way to combine the pattern-recognition strengths of neural networks with the exact structure of mathematical optimization. Rather than replacing a learned policy with a solver, SOC-Net lets a conventional network propose an action and adds a lightweight correction layer. In the force-allocation task, the correction is closed form. In the more general sliced-cone case, it reduces to one scalar root per constraint rather than a full conic solve.

The guarantee is especially valuable because it is compatible with ordinary end-to-end training. A hard safety layer that cannot be differentiated can frustrate learning; one that requires repeatedly differentiating through a long solver can be expensive or fragile. SOC-Net provides an explicit Jacobian, and its backward pass need not unroll the Newton iterations used to find the scalar root.

There is, however, a distinction between satisfying constraints and choosing the best feasible action. SOC-Net’s correction is not generally the standard Euclidean projection onto the feasible outputs. Its optimization characterization measures the initial correction in the lifted space, then chooses the nearest output among those that realize the lifted correction. Depending on the task, that may or may not match the system designer’s preferred notion of “smallest adjustment.” The paper’s formulation makes a tractable choice, not a universal one.

Likewise, a mathematical guarantee cannot rescue a bad model of reality. If a friction coefficient is wrong, a disturbance exceeds its assumed bound, or the real system violates the dynamics used to define the constraint, feasibility in the modeled equations may not mean safety in the world. Robust constraints help account for specified uncertainty; they do not automatically include every possible failure mode.

The method also relies on feasibility and separability assumptions. Each constraint must admit at least one output at every input, and the lifted constraint blocks must have the required independent structure for projection to split cleanly. Many practical problems may fit this setup; others may require coupled constraints or additional machinery. The universal-approximation result also depends on regularity conditions, not merely on attaching the layer to any arbitrary model.

What’s Next

The next test is not just whether SOC-Net can enforce a cone constraint in a controlled example. It is whether the method scales to larger, more entangled control problems, where safety rules interact and the feasible region changes sharply with state. The paper’s separability condition suggests a clear boundary for current efficiency: when constraints couple, the independent per-cone projections may no longer be enough.

Deployment work will also need to measure end-to-end latency on matched hardware, include the cost of computing input-dependent constraint matrices, and test performance under model mismatch. The force-allocation result is an impressive speed comparison, but a fair practical decision will depend on the complete control pipeline, not only the projection layer.

A further question is how to choose the geometry of the correction. SOC-Net preserves feasible outputs and keeps the correction computationally manageable, but alternative metrics might better reflect energy, actuator wear, or task priorities. The architecture opens a route to asking those questions without giving up the central guarantee.

For now, the paper offers a concrete change in how learned control can be designed. A neural network can remain flexible about what it learns while being rigid about what it is allowed to output. That is not a substitute for careful physics, validation, or risk analysis. It is a promising way to make one important class of safety rules part of the machinery itself, rather than a hope that training will remember them.