For years, we've treated safety as just another objective to optimize — and unsurprisingly, it often gets sacrificed when training converges, if it converges at all. ShardNet flips that by embedding hard, non-convex safety constraints directly into the neural network's architecture.
Why Optimizing Safety as a Metric Fails
Every controller designer knows the tension: optimize for performance, and the policy sneaks into unsafe regions; penalize violations in the loss, and you're still hoping the optimizer finds a feasible solution. Existing approaches treat safety as a soft metric that competes with other objectives. ShardNet's authors call this out explicitly — safety should not be something you optimize for; it should be something you guarantee by construction.
That's a fundamentally different philosophy. Instead of trying to coax a plain neural network into obeying constraints via penalty terms or Lagrangian methods, ShardNet forces the output to always land inside a union of polyhedral safe regions. The performance optimizer then does whatever it wants, because the safety guarantees are structural, not learned.
ShardNet's Key Trick: A Differentiable Projection Layer
The architecture uses a classification network to select which polyhedron the current state belongs to, then a differentiable projection layer maps the raw control output onto that polyhedron. Because the projection is parameterized and differentiable, you can train the whole thing end-to-end with standard gradient methods.
Critically, this works for non-convex unions of polyhedra — something no prior safe-by-construction neural architecture could handle. The authors also introduce a technique to verify and train value functions as ReLU networks correctly, which was previously impossible. That unlocks forward-invariant safety guarantees for closed-loop systems where the safe region is a learned value function level set.
100% Safety, Lower Loss, Larger Verified Regions
On double integrator benchmarks taken directly from the control literature, ShardNet policies maintain 100% safety on the verified sets — zero violations. At the same time, they achieve significantly lower objective loss compared to existing formal methods (the paper doesn't sugarcoat that competing approaches either fail to converge or produce far more conservative behaviors).
More striking: the value function training technique produces safe sets more than 3 times larger than existing verification approaches. That means you can certify a much larger operating envelope without sacrificing safety guarantees.
ShardNet makes one thing clear: if safety constraints are known (even as complex polyhedral unions), we should build them into the network, not hope the optimizer respects them. The next step is scaling this beyond toy benchmarks — I want to see it on quadrotors or autonomous driving stacks where the constraint sets are massive and the cost of violation is real.
Source: ShardNet: Training Neural Controllers with Hard, Non-Convex Constraints
Domain: arxiv.org
Comments load interactively on the live page.