Safe-by-Design Learning via Energy-based Neural Networks
Organizations: RIAS Lab The Italian Institute of Artificial Intelligence for Industry Torino, 10129, ITA · RECUV University of Colorado Boulder Boulder, CO 80303, USA · Delft Center for Systems and Control, TU Delft, Delft, 2600 AA, The Netherlands
Abstract
Learning neural-network models of dynamical systems with safety guarantees is a fundamental requirement for their deployment in safety-critical settings. Safety is commonly established by proving the invariance of a desired subset in state-space, ensuring that every trajectory initialized in this subset remains confined to it for all time under admissible inputs. Existing frameworks, however, either rely on computationally expensive post-hoc verification or employ safety-enforcing mechanisms without formal correctness guarantees. In this paper, we introduce a novel neural architecture grounded in energy-based modern Hopfield networks to guarantee safety-by-design while retaining sufficient expressiveness to model complex nonlinear dynamics. Specifically, we integrate modern Hopfield networks with a port-Hamiltonian neural ODE, enabling by design the construction of barrier functions yielding explicit admissible-input sets and quantitative robustness radii. Across several benchmarks, including an 12-dimensional nanodrone model, our framework achieves state-of-the-art performance while producing certified invariant sets that are more robust to external solicitations than comparable existing approaches.
Figures & tables
| Benchmark | Published | portHNN-u | pH-EBM |
|---|---|---|---|
| Metrics | RMSE | RMSE | RMSE |
| Silverbox | [ ,-] | [ , ] | [ , ] |
| CED | [ , -] | [ , ] | [ , ] |
| Duffing double-well | [-, -] | [ , ] | [ , ] |
| -link pendulum | [ , -] | [ , ] | [ , ] |
| NanoDrone | [ , -] | [-, -] | [ , ] |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Benchmark | Metric | Published | portHNN-u | pH-EBM |
|---|---|---|---|---|
| Silverbox | RMSE | |||
| CED | RMSE | |||
| Duffing double-well | RMSE | - | ||
| -link pendulum | RMSE | |||
| NanoDrone | RMSE | - | ||
| NanoDrone (Melon) | RMSE |
| Benchmark | Hamiltonian architecture | Activation | Parameters | ||||
|---|---|---|---|---|---|---|---|
| Silverbox | 4 | softmax( ) poly( ) | free skew | free | k | ||
| CED | 4 | softmax( ) poly( ) | free skew | free | k | ||
| Duffing double-well | 2 | poly( ) | free skew | free | k | ||
| -link pendulum | 8 | poly( ) | free skew | free | k | ||
| NanoDrone † | 12 | poly( ) | free pH field | learned PSD | unrestricted 4-port | 43,738 |