ForwardAlgorithms
This section of the manual describes the module for forward algorithms.
NeuralNetworkReachability.ForwardAlgorithms.ForwardAlgorithm
— TypeForwardAlgorithm
Abstract supertype of forward algorithms.
NeuralNetworkReachability.ForwardAlgorithms.DefaultForward
— TypeDefaultForward <: ForwardAlgorithm
Default forward algorithm, which works for vector-like inputs.
NeuralNetworkReachability.ForwardAlgorithms.ConcreteForward
— TypeConcreteForward <: ForwardAlgorithm
Forward algorithm that uses concrete set operations.
NeuralNetworkReachability.ForwardAlgorithms.LazyForward
— TypeLazyForward <: ForwardAlgorithm
Forward algorithm that uses lazy set operations.
NeuralNetworkReachability.ForwardAlgorithms.BoxForward
— TypeBoxForward{AMA<:ForwardAlgorithm} <: ForwardAlgorithm
Forward algorithm that uses a box approximation for non-identity activations and applies the affine map according to the specified algorithm.
Fields
affine_map_algorithm
– algorithm to apply for affine maps
NeuralNetworkReachability.ForwardAlgorithms.SplitForward
— TypeSplitForward{S<:ForwardAlgorithm,FS,FM} <: ForwardAlgorithm
Forward algorithm that splits a set, then computes the image under the neural network, and finally merges the resulting sets again, all according to a policy.
Fields
algo
– algorithm to be applied between splitting and mergingsplit_function
– function for splittingmerge_function
– function for merging
NeuralNetworkReachability.ForwardAlgorithms.DeepZ
— TypeDeepZ <: ForwardAlgorithm
Forward algorithm based on zonotopes for ReLU, sigmoid, and tanh activation functions from [1].
[1]: Singh et al.: Fast and Effective Robustness Certification, NeurIPS 2018.
NeuralNetworkReachability.ForwardAlgorithms.AI2Box
— TypeAI2Box <: AI2
AI2 forward algorithm for ReLU activation functions based on abstract interpretation with the interval domain from [1].
Notes
This algorithm is less precise than BoxForward
because it abstracts after every step, including the affine map.
[1]: Gehr et al.: AI²: Safety and robustness certification of neural networks with abstract interpretation, SP 2018.
NeuralNetworkReachability.ForwardAlgorithms.AI2Zonotope
— TypeAI2Zonotope <: AI2
AI2 forward algorithm for ReLU activation functions based on abstract interpretation with the zonotope domain from [1].
Fields
join_algorithm
– (optional; default:"join"
) algorithm to compute the join of two zonotopes
[1]: Gehr et al.: AI²: Safety and robustness certification of neural networks with abstract interpretation, SP 2018.
NeuralNetworkReachability.ForwardAlgorithms.AI2Polytope
— TypeAI2Polytope <: AI2
AI2 forward algorithm for ReLU activation functions based on abstract interpretation with the polytope domain from [1].
[1]: Gehr et al.: AI²: Safety and robustness certification of neural networks with abstract interpretation, SP 2018.
NeuralNetworkReachability.ForwardAlgorithms.PolyZonoForward
— TypePolyZonoForward{A<:PolynomialApproximation,N,R} <: ForwardAlgorithm
Forward algorithm based on poynomial zonotopes via polynomial approximation from [1].
Fields
polynomial_approximation
– method for polynomial approximationreduced_order
– order to which the result will be reduced after each layercompact
– predicate for compacting the result after each layer
Notes
The default constructor takes keyword arguments with the following defaults:
polynomial_approximation
:RegressionQuadratic(10)
, i.e., quadratic regression with 10 samplescompact
:() -> true
, i.e., compact after each layer
See the subtypes of PolynomialApproximation
for available polynomial approximation methods.
[1]: Kochdumper et al.: Open- and closed-loop neural network verification using polynomial zonotopes, NFM 2023.
NeuralNetworkReachability.ForwardAlgorithms.Verisig
— TypeVerisig{R} <: ForwardAlgorithm
Forward algorithm for sigmoid and tanh activation functions from [1].
Fields
algo
– reachability algorithm of typeTMJets
Notes
The implementation is known to be unsound in some cases.
The implementation currently only supports neural networks with a single hidden layer.
[1] Ivanov et al.: Verisig: verifying safety properties of hybrid systems with neural network controllers, HSCC 2019.