Closed darioguidotti closed 1 month ago
I second the idea in point 1. to use a dictionary for the verification parameters. It is the way we handle it in SearchVerification and it could be a dictionary defined by the base class, with all verification strategies using it to store their parameters.
Some notes and considerations:
LocalRobustnessProperty
should probably removed, as right now I do not think is of any use. It would likely make more sense as an alternate constructor for NeverProperty
.NeverProperty
and how we manage the input/output ids (e.g., if in the forward the AbsElement assume the identifier of the last node they traversed, we will likely need to force the output ids to be the same as the leaf node ids).mixed_single_relu_forward
).node.__class__.__name__
) and whose values depend on the specific nodes but contains all the needed data, functions etc.We decided to structure the properties like this:
NeverProperty
which is characterized by a predicate_matrix
and a predicate_bias
Cx <= dVnnLibProperty
initialized by a SMT-LIB file and LocalRobustnessProperty
initialized by a sample and a noise
As we add support for non-sequential NNs, I believe we should refactor the class NeverVerification as, right now, it is very specialised for ReLU FC NNs. In particular we need to solve the following issues:
we need to find a better way to pass the heuristic and parameters to use for the abstract transformers of the node (maybe a dictionary?) since, in principle, we could need specifications regarding heuristic and related parameters for non-ReLU nodes.
__build_abst_network(...)
need to be rewritten to support non-sequential networks. We also need to understand if this kind of function wouldn't make more sense inconversion.py
. (Eventually connected to #26)__compute_output_starset(...)
should be rewritten to make use of (or substituted altogether with) theforward(...)
methods of the related concrete AbsNeuralNetworks (or corresponding class following #25 and #23).