Skip to content

acfr/RobustNeuralNetworks.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RobustNeuralNetworks.jl

Build Status

DOI DOI

A Julia package for robust neural networks built from the Recurrent Equilibrium Network (REN) and Lipschitz-Bounded Deep Network (LBDN) model classes. Please visit the docs page for detailed documentation

Installation

To install the package, type the following into the REPL.

] add RobustNeuralNetworks

You should now be able to construct robust neural network models. The following example constructs a contracting REN and evalutates it given a batch of random initial states x0 and inputs u0.

using Random
using RobustNeuralNetworks

# Setup
rng = Xoshiro(42)
batches = 10
nu, nx, nv, ny = 4, 2, 20, 1

# Construct a REN
contracting_ren_ps = ContractingRENParams{Float64}(nu, nx, nv, ny; rng)
ren = REN(contracting_ren_ps)

# Some random inputs
x0 = init_states(ren, batches; rng)
u0 = randn(rng, ren.nu, batches)

# Evaluate the REN over one timestep
x1, y1 = ren(x0, u0)

println(round.(y1;digits=2))

The output should be:

[-1.49 0.75 1.34 -0.23 -0.84 0.38 0.79 -0.1 0.72 0.54]

Citing the Package

If you use RobustNeuralNetworks.jl for any research or publications, please cite our work as necessary.

@article{barbara2025robustneuralnetworksjl, 
   title = {RobustNeuralNetworks.jl: a Package for Machine Learning and Data-Driven Control with Certified Robustness}, 
   author = {Nicholas H. Barbara and Max Revay and Ruigang Wang and Jing Cheng and Ian R. Manchester}, 
   journal = {Proceedings of the JuliaCon Conferences},
   publisher = {The Open Journal}, 
   year = {2025}, 
   volume = {7}, 
   number = {68}, 
   pages = {163}, 
   doi = {10.21105/jcon.00163}, 
   url = {https://doi.org/10.21105/jcon.00163}, 
}

Contact

Please contact Nic Barbara ([email protected]) with any questions.