PoSafeNet: Structured Safety Learning via Compositional Projection

Kiwan Wong, Wei Xiao, Daniela RusNeurIPS 2026

TL;DR

When an autonomous robot faces conflicting safety rules—like staying in a lane versus swerving to avoid a crash—traditional neural safety layers rely on slow optimization solvers that either freeze up or arbitrarily bend the rules. PoSafeNet solves this by structuring safety rules as a flexible hierarchy (a partial order) and enforcing them via lightning-fast, sequential geometric projections. The result is a QP-free neural controller that runs up to 130× faster, never crashes due to solver infeasibility, and knows exactly which rules it is allowed to break in an emergency.

What Problem Does This Paper Address?

Teaching a neural network to control a robot is great until it decides to drive through a wall. To prevent this, researchers wrap neural policies in "safety layers," often using mathematical guardrails called Control Barrier Functions (CBFs) to keep the robot in a safe state.

Usually, these safety layers enforce all constraints simultaneously by solving a Quadratic Program (QP) online at every timestep. This works beautifully for a single rule, but reality is messy. Avoiding an obstacle might force a car out of its lane; respecting a robotic arm's joint limit might ruin its trajectory tracking.

When rules conflict, standard QP solvers hit a wall:

  1. Without relaxation, the math becomes impossible to solve (infeasible), and the controller fails to output an action.
  2. With "slack" variables (letting rules bend for a penalty), the neural policy often learns to exploit the slack during training, eroding actual safety—a trap the authors call the slack dilemma.
  3. With strict total hierarchies, designers are forced to rank every constraint against every other constraint, even when two rules (like left-lane vs. right-lane boundaries, or two separate obstacles) shouldn't have a fixed priority over one another.

The core question is: How do we explicitly tell a neural network which safety overrides make semantic sense, and how do we compute safe actions quickly without brittle online solvers?

Methods

Instead of dumping all rules into a single optimization blender, PoSafeNet separates conflict semantics from computation.

Figure 1: Overview of PoSafeNet. The framework replaces QP-based safety layers with multiple closed-form projection heads, each following a valid constraint ordering derived from the given poset.
  • Safety as a Partial Order (Poset): Designers define a Partially Ordered Set (poset) over safety rules. For example, avoid_obstacle $\succ$ {left_lane, right_lane}. Obstacle avoidance beats lane-keeping, while the two lane boundaries remain incomparable (neither inherently outranks the other).
  • Closed-Form Halfspace Projections (Standard Math, Novel Composition): For standard control-affine systems, a single CBF rule defines a flat boundary—a halfspace—in the control space. Projecting an unsafe nominal action onto a single halfspace has a simple, exact, closed-form mathematical formula (using a basic ReLU operation). No iterative QP solver required!
  • Sequential Projections via Multi-Head Networks: If you project an action onto Rule A, and then project the result onto Rule B, Rule B gets the final say—potentially overriding Rule A. PoSafeNet turns this quirk into its superpower. It enumerates valid linear extensions (sequences of rules where higher-priority rules always come after lower-priority ones). Each head of a multi-head neural network executes one valid sequence of closed-form projections.
  • Head Combination: Outputs from these heads are combined either Hard (picking a single head via Gumbel-softmax during training and argmax at test time, unconditionally guaranteeing poset-respecting safety) or Soft/Mixture (a learned convex combination of heads, preserving safety when incomparable rules don't actively clash). The network also jointly learns the CBF tightness gains ($\kappa_j$) via end-to-end imitation learning.

Datasets

Rather than static benchmark datasets, the models are trained via imitation learning on expert demonstrations and evaluated in closed-loop simulation across three control tasks (with no new standalone public datasets introduced):

  1. 2D Unicycle Multi-Obstacle Navigation: Navigating to a goal around three mutually incomparable circular obstacles under stochastic perturbations.
  2. 2-Link Planar Manipulator: End-effector trajectory tracking where strict joint limits outrank obstacle avoidance and tracking accuracy.
  3. Vision-Based Autonomous Driving (VISTA Simulator): Mapping RGB camera images to steering/acceleration while using simulator ground-truth geometry for a 2-layer and 4-layer safety poset (obstacle $\succ$ {L lane, R lane} $\succ$ {speed max, min} $\succ$ centerline).

Key Insights and Ideas

  • Execution Order Is Priority: In sequential geometric projections, whatever projects last wins. By aligning projection sequences with the linear extensions of a poset, priority semantics become baked directly into the forward pass of the network architecture.
  • 100% Operational Feasibility by Construction: Because projecting a point onto a single halfspace always has an exact closed-form answer, PoSafeNet never crashes or freezes due to solver infeasibility, completely side-stepping the slack dilemma.
  • Graceful Rule-Breaking: In the VISTA driving task, strict hierarchical QPs (HQP) got stuck or made very slow progress because they were overly conservative. PoSafeNet knew it was allowed to briefly cross a lane line (sacrificing a lower-priority rule) to safely navigate past an obstacle, dramatically boosting forward progress while keeping crashes at zero.

Key Results

Across all tasks, PoSafeNet outperformed end-to-end policies, slack-based differentiable QPs (BarrierNet, DFBNet, ABNet), and Hierarchical QPs (HQP):

Figure 2: Trajectory comparison across tasks under stochastic perturbations. For PoSafeNet, multiple trajectories arise from different uncertainty realizations, reflecting alternative admissible execution modes. We show a representative rollout here.
  • 2D Navigation: Achieved 100% operational feasibility (vs. 35%–83% for strict/slacked BarrierNet and ABNet) and the best goal distance (10.95) among safe methods. PoSafeNet (Hard) ran in 0.276s per rollout—27× faster than BarrierNet and 130× faster than ABNet.
  • Robot Manipulation: The only method to achieve 0.00 joint-limit violation alongside positive obstacle safety margins and 100% feasibility, running 17× faster than BarrierNet (0.095s vs. 1.60s).
  • Autonomous Driving (VISTA): Achieved 0.00 crashes across all random seeds (matching HQP, whereas BarrierNet/DFBNet/ABNet crashed 75%–98% of the time). Meanwhile, 4-layer PoSafeNet achieved 61.61–75.82 forward progress compared to just 27.14 for 4-layer HQP.

Limitations and Future Work

The authors are refreshingly candid about where the boundaries lie:

  • Manual Specifications & Scalability: Both the CBF math and the poset priority structures must be hand-crafted by human designers. Furthermore, the number of linear extensions can grow exponentially with the number of constraints, requiring designers to select a subset of canonical heads for massive rulebooks.
  • Control-Affine & Sim-Only: The closed-form halfspace trick relies on safety conditions being affine in the control input. Also, all experiments were conducted in simulation using ground-truth state/geometry for the safety layer—meaning noisy camera perception wasn't yet piped directly into the CBF math.
  • Future Directions: Learning safety posets directly from human interventions or demonstrations, handling perception-derived constraints on physical robots, and extending structured safety composition into latent spaces and contact-rich manipulation.

Summary updated

Abstract

Safe robot learning often involves multiple heterogeneous safety constraints that cannot always be satisfied simultaneously. Existing neural safety layers typically treat multi-constraint safety as a numerical optimization problem, enforcing all constraints through a single QP-based projection or relaxing conflicts with slack variables. This hides the semantic question of which constraints may be sacrificed under conflict inside solver geometry, penalty weights, or a fixed total hierarchy. We propose PoSafeNet, a poset-structured composable safety layer that makes these conflict semantics explicit. PoSafeNet encodes admissible safety override relations as a partial order and realizes each admissible execution by composing closed-form projections onto CBF-induced halfspaces. Across multi-obstacle navigation, constrained manipulation, and vision-based autonomous driving, PoSafeNet improves operational feasibility, computational efficiency, and task performance over dQP-based, slack-based, and hierarchical safety layers.
BibTeX
@inproceedings{wong2026posafenet,
  author = {Kiwan Wong and Wei Xiao and Daniela Rus},
  title = {{PoSafeNet: Structured Safety Learning via Compositional Projection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=7K93T7me9y},
}
Figure