API
ADA-VERONA
ADA-VERONA: Neural Network Robustness Analysis Framework
A framework for analyzing neural network robustness through verification and adversarial testing.
AttackEstimationModule
Bases: VerificationModule
A module for estimating the robustness of a model against adversarial attacks.
Source code in ada_verona/verification_module/attack_estimation_module.py
__init__(attack, top_k=1)
Initialize the AttackEstimationModule with a specific attack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
attack
|
Attack
|
The attack to be used for robustness estimation. |
required |
top_k
|
int
|
Number of top scores to take into account for checking the prediction. |
1
|
Source code in ada_verona/verification_module/attack_estimation_module.py
verify(verification_context, epsilon)
Verify the robustness of the model within the given epsilon perturbation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verification_context
|
VerificationContext
|
The context for verification, |
required |
epsilon
|
float
|
The perturbation magnitude for the attack. |
required |
Returns:
| Type | Description |
|---|---|
str | CompleteVerificationData
|
str | CompleteVerificationData: The result of the verification, either SAT or UNSAT, along with the duration. |
Source code in ada_verona/verification_module/attack_estimation_module.py
BinarySearchEpsilonValueEstimator
Bases: EpsilonValueEstimator
A class to get the critical epsilon value using binary search.
Source code in ada_verona/epsilon_value_estimator/binary_search_epsilon_value_estimator.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |
binary_search(verification_context, epsilon_status_list)
Perform binary search to find the highest UNSAT and smallest SAT epsilon values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verification_context
|
VerificationContext
|
The context for verification. |
required |
epsilon_status_list
|
list[EpsilonStatus]
|
The list of epsilon statuses. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The highest UNSAT and smallest SAT epsilon values. |
Source code in ada_verona/epsilon_value_estimator/binary_search_epsilon_value_estimator.py
compute_epsilon_value(verification_context)
Compute the epsilon value using binary search.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verification_context
|
VerificationContext
|
The context for verification. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
EpsilonValueResult |
EpsilonValueResult
|
The result of the epsilon value estimation. |
Source code in ada_verona/epsilon_value_estimator/binary_search_epsilon_value_estimator.py
get_highest_unsat(epsilon_status_list)
Get the highest UNSAT epsilon value from the list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epsilon_status_list
|
list[EpsilonStatus]
|
The list of epsilon statuses. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The highest UNSAT epsilon value. |
Source code in ada_verona/epsilon_value_estimator/binary_search_epsilon_value_estimator.py
get_smallest_sat(epsilon_status_list)
Get the smallest SAT epsilon value from the list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epsilon_status_list
|
list[EpsilonStatus]
|
The list of epsilon statuses. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The smallest SAT epsilon value. |
Source code in ada_verona/epsilon_value_estimator/binary_search_epsilon_value_estimator.py
EpsilonStatus
dataclass
A class to represent the status of the verification. It records the epsilon value, the result (SAT, UNSAT, TIMEOUT, ERROR) and running time.
Source code in ada_verona/database/epsilon_status.py
set_values(complete_verification_data)
Set values from the CompleteVerificationData
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
complete_verification_data
|
CompleteVerificationData
|
CompleteVerificationData |
required |
Source code in ada_verona/database/epsilon_status.py
to_dict()
Convert the EpsilonStatus to a dictionary.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The dictionary representation of the EpsilonStatus. |
Source code in ada_verona/database/epsilon_status.py
EpsilonValueEstimator
Bases: ABC
An abstract base class for estimating epsilon values.
Source code in ada_verona/epsilon_value_estimator/epsilon_value_estimator.py
__init__(epsilon_value_list, verifier)
Initialize the EpsilonValueEstimator with the given epsilon value list and verifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epsilon_value_list
|
list[float]
|
The list of epsilon values to estimate. |
required |
verifier
|
VerificationModule
|
The verifier to use for verification. |
required |
Source code in ada_verona/epsilon_value_estimator/epsilon_value_estimator.py
compute_epsilon_value(verification_context)
abstractmethod
Compute the epsilon value for the given verification context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verification_context
|
VerificationContext
|
The context for verification. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
EpsilonValueResult |
EpsilonValueResult
|
The result of the epsilon value estimation. |
Source code in ada_verona/epsilon_value_estimator/epsilon_value_estimator.py
EpsilonValueResult
dataclass
A dataclass defining the verification result of a single verification.
Source code in ada_verona/database/epsilon_value_result.py
to_dict()
Convert the EpsilonValueResult to a dictionary.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The dictionary representation of the EpsilonValueResult. |
Source code in ada_verona/database/epsilon_value_result.py
ExperimentRepository
Database to handle all the paths to the different files used.
Source code in ada_verona/database/experiment_repository.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | |
__init__(base_path, network_folder)
Initialize the ExperimentRepository with the base path and network folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_path
|
Path
|
The base path for the experiment repository. |
required |
network_folder
|
Path
|
The folder containing the network files. |
required |
Source code in ada_verona/database/experiment_repository.py
cleanup_tmp_directory()
Delete the temporary folder of the active experiment.
Source code in ada_verona/database/experiment_repository.py
create_verification_context(network, data_point, property_generator)
Create a verification context for the given network, data point, and property generator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
network
|
Network
|
The network to verify. |
required |
data_point
|
DataPoint
|
The data point to verify. |
required |
property_generator
|
PropertyGenerator
|
The property generator to use. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
VerificationContext |
VerificationContext
|
The created verification context. |
Source code in ada_verona/database/experiment_repository.py
get_act_experiment_path()
Get the path to the active experiment.
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The path to the active experiment. |
Raises:
| Type | Description |
|---|---|
Exception
|
If no experiment is loaded. |
Source code in ada_verona/database/experiment_repository.py
get_file_name(file)
Get the name of the file without the extension.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
Path
|
The file path. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The name of the file without the extension. |
Source code in ada_verona/database/experiment_repository.py
get_network_list()
Return a list of networks by scanning the network folder for ONNX files if a network folder is given.
Returns:
| Type | Description |
|---|---|
list[ONNXNetwork]
|
list[Network]: The list of networks. |
Source code in ada_verona/database/experiment_repository.py
get_per_epsilon_result_df()
Get the per-epsilon result DataFrame from the temporary folder.
Returns:
| Type | Description |
|---|---|
DataFrame
|
pd.DataFrame: The per-epsilon result DataFrame. |
Source code in ada_verona/database/experiment_repository.py
get_result_df()
Get the result DataFrame from the results CSV file.
Returns:
| Type | Description |
|---|---|
DataFrame
|
pd.DataFrame: The result DataFrame. |
Raises:
| Type | Description |
|---|---|
Exception
|
If no result file is found. |
Source code in ada_verona/database/experiment_repository.py
get_results_path()
Get the path to the results folder of the active experiment.
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The path to the results folder. |
get_tmp_path()
Get the path to the temporary folder of the active experiment.
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The path to the temporary folder. |
initialize_new_experiment(experiment_name)
Initialize a new experiment with the given name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
experiment_name
|
str
|
The name of the experiment. |
required |
Raises:
| Type | Description |
|---|---|
Exception
|
If a directory with the same name already exists. |
Source code in ada_verona/database/experiment_repository.py
load_experiment(experiment_name)
Load an existing experiment with the given name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
experiment_name
|
str
|
The name of the experiment. |
required |
Source code in ada_verona/database/experiment_repository.py
load_verification_context_from_yaml(file_path)
Load the verification context from a YAML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
Path
|
The path to the YAML file. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
VerificationContext |
VerificationContext
|
The loaded verification context. |
Source code in ada_verona/database/experiment_repository.py
save_configuration(data)
Save the configuration data to a JSON file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The configuration data to save. |
required |
Source code in ada_verona/database/experiment_repository.py
save_per_epsilon_result_df()
Save the per-epsilon result DataFrame to a CSV file.
Source code in ada_verona/database/experiment_repository.py
save_plots()
Save the plots generated from the result DataFrame.
Source code in ada_verona/database/experiment_repository.py
save_result(result)
Save a single epsilon value result to the CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
EpsilonValueResult
|
The epsilon value result to save. |
required |
Source code in ada_verona/database/experiment_repository.py
save_results(results)
Save the list of epsilon value results to a CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
list[EpsilonValueResult]
|
The list of epsilon value results to save. |
required |
Source code in ada_verona/database/experiment_repository.py
save_verification_context_to_yaml(file_path, verification_context)
Save the verification context to a YAML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
Path
|
The path to save the YAML file. |
required |
verification_context
|
VerificationContext
|
The verification context to save. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The path to the saved YAML file. |
Source code in ada_verona/database/experiment_repository.py
IterativeEpsilonValueEstimator
Bases: EpsilonValueEstimator
A class to estimate the epsilon value using an iterative search with configurable direction.
Source code in ada_verona/epsilon_value_estimator/iterative_epsilon_value_estimator.py
compute_epsilon_value(verification_context, reverse_search=False)
Compute the epsilon value using an iterative search.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verification_context
|
VerificationContext
|
The context for verification. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
EpsilonValueResult |
EpsilonValueResult
|
The result of the epsilon value estimation. |
Source code in ada_verona/epsilon_value_estimator/iterative_epsilon_value_estimator.py
iterative_search(verification_context, epsilon_status_list)
Perform search and determine results based on actual epsilon values. Find the highest UNSAT and smallest SAT epsilon values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verification_context
|
VerificationContext
|
The context for verification. |
required |
epsilon_status_list
|
list[EpsilonStatus]
|
The list of epsilon statuses. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The highest UNSAT epsilon value. |
float |
float
|
The smallest SAT epsilon value. |
list |
list
|
The epsilon status list. |
Source code in ada_verona/epsilon_value_estimator/iterative_epsilon_value_estimator.py
Network
Bases: ABC
Abstract base class for networks that can be either ONNX or PyTorch.
This class provides a common interface for both network types.
Source code in ada_verona/database/machine_learning_model/network.py
name
abstractmethod
property
Get the name of the network.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The name of the network. |
path
abstractmethod
property
Get the path of the network.
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The path of the network. |
from_dict(data)
abstractmethod
classmethod
Create a network from a dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The dictionary containing the network attributes. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
BaseNetwork |
Network
|
The created network. |
Source code in ada_verona/database/machine_learning_model/network.py
from_file(file)
classmethod
Create network from file Args: file (dict[Path]): contains the paths to the relevant weights (for ONNX) and additionally to the architecture file for PyTorch networks.
Returns:
| Type | Description |
|---|---|
|
Created network from the correct class OR error. |
Source code in ada_verona/database/machine_learning_model/network.py
get_input_shape()
abstractmethod
Get the input shape of the model.
Returns:
| Type | Description |
|---|---|
ndarray | tuple[int, ...]
|
Union[np.ndarray, tuple[int, ...]]: The input shape of the model. |
Source code in ada_verona/database/machine_learning_model/network.py
load_pytorch_model()
abstractmethod
Load the PyTorch model.
Returns:
| Type | Description |
|---|---|
Module
|
torch.nn.Module: The loaded PyTorch model. |
Source code in ada_verona/database/machine_learning_model/network.py
to_dict()
abstractmethod
Convert the network to a dictionary.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The dictionary representation of the network. |
Source code in ada_verona/database/machine_learning_model/network.py
ONNXNetwork
Bases: Network
Data class representing an ONNX network with its path.
Attributes:
| Name | Type | Description |
|---|---|---|
path |
Path
|
The path to the network file. |
onnx_model |
ModelProto
|
The loaded ONNX model. Defaults to None. |
torch_model_wrapper |
TorchModelWrapper
|
The PyTorch model wrapper. Defaults to None. |
Source code in ada_verona/database/machine_learning_model/onnx_network.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
name
property
Get the name of the network.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The name of the network. |
path
property
Get the path of the network.
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The path of the network. |
__init__(path)
Initialize the Network with the given path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path
|
The path to the network file. |
required |
Source code in ada_verona/database/machine_learning_model/onnx_network.py
from_dict(data)
classmethod
Create a Network from a dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The dictionary containing the Network attributes. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Network |
ONNXNetwork
|
The created Network. |
Source code in ada_verona/database/machine_learning_model/onnx_network.py
from_file(file)
classmethod
Create a ONNXNetwork from a dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
Path
|
Path at which the network is stored. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ONNXNetwork |
ONNXNetwork
|
The created ONNXNetwork. |
Source code in ada_verona/database/machine_learning_model/onnx_network.py
get_input_shape()
Get the input shape of the ONNX model.
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray: The input shape of the ONNX model. |
Source code in ada_verona/database/machine_learning_model/onnx_network.py
load_onnx_model()
Load the ONNX model from the network path.
Returns:
| Type | Description |
|---|---|
ModelProto
|
onnx.ModelProto: The loaded ONNX model. |
Source code in ada_verona/database/machine_learning_model/onnx_network.py
load_pytorch_model()
Load the PyTorch model from the ONNX model.
Returns:
| Type | Description |
|---|---|
Module
|
torch.nn.Module: The loaded PyTorch model. |
Source code in ada_verona/database/machine_learning_model/onnx_network.py
to_dict()
Convert the Network to a dictionary.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The dictionary representation of the Network. |
Source code in ada_verona/database/machine_learning_model/onnx_network.py
PyTorchNetwork
Bases: Network
A class representing a PyTorch network with architecture and weights files.
Attributes:
| Name | Type | Description |
|---|---|---|
model |
Module
|
The loaded PyTorch model. Defaults to None. |
torch_model_wrapper |
TorchModelWrapper
|
The PyTorch model wrapper. Defaults to None. |
name |
str
|
A chosen name for the model. |
input_shape |
tuple[int]
|
Input shape of the model. |
Source code in ada_verona/database/machine_learning_model/pytorch_network.py
name
property
Get the name of the network.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The name of the network. |
path
property
Get the path of the network.
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The path of the network. |
__init__(model, input_shape, name)
Initialize the PyTorchNetwork with architecture and weights paths.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
Module
|
The loaded PyTorch model. Defaults to None. |
required |
input_shape
|
tuple[int]
|
Input shape of the model. |
required |
name
|
str
|
A chosen name for the model. |
required |
Source code in ada_verona/database/machine_learning_model/pytorch_network.py
get_input_shape()
Get the input shape of the PyTorch model.
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray: the input_shape |
load_pytorch_model()
Load the PyTorch model and wrap it in a TorchModelWrapper.
Returns:
| Type | Description |
|---|---|
Module
|
torch.nn.Module: The wrapped PyTorch model. |
Source code in ada_verona/database/machine_learning_model/pytorch_network.py
TorchModelWrapper
Bases: Module
A wrapper class for a PyTorch model to reshape the input before passing it to the model.
Source code in ada_verona/database/machine_learning_model/torch_model_wrapper.py
__init__(torch_model, input_shape)
Initialize the TorchModelWrapper with the given PyTorch model and input shape.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
torch_model
|
Module
|
The PyTorch model to wrap. |
required |
input_shape
|
tuple[int]
|
The input shape to reshape the input tensor. Can be tuple[int] or np.ndarray. |
required |
Source code in ada_verona/database/machine_learning_model/torch_model_wrapper.py
forward(x)
Forward pass of the TorchModelWrapper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
Tensor
|
The input tensor. |
required |
Returns:
| Type | Description |
|---|---|
|
torch.Tensor: The output tensor from the wrapped PyTorch model. |
Source code in ada_verona/database/machine_learning_model/torch_model_wrapper.py
VNNLibProperty
dataclass
VerificationContext
A class to represent the context for verification. This class saves all the relevant information for a verification run.
Source code in ada_verona/database/verification_context.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
__init__(network, data_point, tmp_path, property_generator, save_epsilon_results=True)
Initialize the VerificationContext with the given parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
network
|
Network
|
The network to be verified. |
required |
data_point
|
DataPoint
|
The data point to be verified. |
required |
tmp_path
|
Path
|
The temporary path for saving intermediate results. |
required |
property_generator
|
PropertyGenerator
|
The property generator for creating verification properties. |
required |
save_epsilon_results
|
bool
|
Whether to save epsilon results. Defaults to True. |
True
|
Source code in ada_verona/database/verification_context.py
delete_tmp_path()
from_dict(data)
classmethod
Create a VerificationContext from a dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The dictionary containing the VerificationContext attributes. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
VerificationContext |
VerificationContext
|
The created VerificationContext. |
Source code in ada_verona/database/verification_context.py
get_dict_for_epsilon_result()
Get a dictionary representation of the epsilon result.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The dictionary representation of the epsilon result. |
Source code in ada_verona/database/verification_context.py
save_result(result)
Save a single epsilon status result to the CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
EpsilonStatus
|
The epsilon status result to save. |
required |
Source code in ada_verona/database/verification_context.py
save_status_list(epsilon_status_list)
Save the list of epsilon statuses to a CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epsilon_status_list
|
list[EpsilonStatus]
|
The list of epsilon statuses to save. |
required |
Source code in ada_verona/database/verification_context.py
save_vnnlib_property(vnnlib_property)
Save the VNNLib property to a file in the temporary path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vnnlib_property
|
VNNLibProperty
|
The VNNLib property object to be saved. |
required |
Source code in ada_verona/database/verification_context.py
to_dict()
Convert the VerificationContext to a dictionary.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The dictionary representation of the VerificationContext. |
Source code in ada_verona/database/verification_context.py
VerificationModule
Bases: ABC
Source code in ada_verona/verification_module/verification_module.py
verify(verification_context, epsilon)
abstractmethod
Main method to verify an image for a given network and epsilon value
Source code in ada_verona/verification_module/verification_module.py
VerificationResult
Bases: str, Enum
Class for saving the possible verification results. At this point we are using the same Result strings for complete verification and attacks.