networkVerificationOptions
Options for network robustness verification for ONNX and PyTorch networks
Since R2026a
Description
Add-On Required: This feature requires the Deep Learning Toolbox Interface for alpha-beta-CROWN Verifier add-on.
Use a NetworkVerificationOptions object to set options for the
α-β-CROWN verifier. You can use the
NetworkVerificationOptions object as input to the verifyNetworkRobustness and findAdversarialExamples functions with ONNX™ or PyTorch® networks.
α-β-CROWN is an algorithm for neural network verification. The algorithm efficiently propagates input bounds through the neural network to produce bounds on the output. You can use the output bounds to verify properties of a neural network, such as the robustness of the network to input perturbations.
Creation
Create a NetworkVerificationOptions object using the
networkVerificationOptions function.
Description
returns
verification options for use with the Deep Learning Toolbox™ Interface for alpha-beta-CROWN
Verifier support package. To use the interface to verify the robustness of a
classification neural network, use the options object as input to the options = networkVerificationOptionsverifyNetworkRobustness function. To use the interface to find adversarial
examples of a classification neural network, use the options object as input to the
findAdversarialExamples function.
returns additional options specified by one or more name-value arguments.options = networkVerificationOptions(Property=Value)
Properties
The following properties can be used in MATLAB to interface with the alpha-beta-CROWN verifier using the Deep Learning Toolbox Interface for alpha-beta-CROWN Verifier support package. To learn more about these properties and example configurations, see the alpha-beta-CROWN Github repository.
Note
The default values documented here are used internally at runtime and are not visible
at the time of object creation. The default values are dependent on the specified
Algorithm in verifyNetworkRobustness. For more information see, Algorithm-Specific Internal Defaults.
General Options
| Field | Data Type | Description |
|---|---|---|
GeneralSeed | positive integer scalar | Random seed |
GeneralConvMode | character vector or string scalar | Convolution mode during bound propagation. Specified as
|
GeneralDeterministic | logical | Specified as
|
GeneralLossReductionFunc | character vector or string scalar | Reduction function applied to reduce bounds into a scalar when batch size is not 1. Specified as
|
GeneralSparseAlpha | logical | Specified as
|
GeneralSparseInterm | logical | Specified as
|
GeneralCompleteVerifier | character vector or string scalar | Complete verification verifier. Specified as
See Algorithm-Specific Internal Defaults for default behavior. |
GeneralEnableIncompleteVerification | logical | Specified as
|
Solver Options
| Field | Data Type | Description |
|---|---|---|
SolverBatchSize | positive integer scalar | Batch size in bound solver that controls number of parallel splits. Default value is 64. |
SolverEarlyStopPatience | positive integer scalar | Number of iterations before early stopping if no improvement is observed. Default value is 10. |
SolverStartSaveBest | positive numeric scalar | Start to save best optimized bounds when i > int(iteration*SolverStartSaveBest). Early iterations are skipped for better efficiency. Default value is 0.5. |
SolverBoundPropMethod | character vector or string scalar | Bound propagation algorithm used for incomplete verification and input split based branch and bound. Specified as
This algorithm is run before branch and bound. See Algorithm-Specific Internal Defaults for default behavior. |
SolverPruneAfterCrown | logical | Specified as
|
SolverCrownBatchSize | positive integer scalar | Batch size in batched CROWN. Default is value is 109. |
SolverAlphaCrownLrAlpha | positive numeric scalar | Learning rate for the optimizable parameter α in α -CROWN bound. Default value is 0.1. |
SolverAlphaCrownIteration | positive integer scalar | Number of iterations for α in α -CROWN incomplete verifier. Default value is 100. |
SolverAlphaCrownShareAlphas | logical | Specified as
|
SolverAlphaCrownLrDecay | positive numeric scalar | Learning rate decay factor during α -CROWN optimization. Default value is 0.98. Use a larger value such as 0.99 when increasing number of iterations. |
SolverAlphaCrownDisableOptimization | string array | A list of the names of operators which have bound optimization disabled for
improved speed and efficiency. E.g. ["Exp","MaxPool"] |
SolverBetaCrownLrAlpha | positive numeric scalar | Learning rate for optimizing parameter α during branch and bound. Default value is 0.01. |
SolverBetaCrownLrBeta | positive numeric scalar | Learning rate for optimizing parameter β during branch and bound. Default value is 0.05. |
SolverBetaCrownLrDecay | positive numeric scalar | Learning rate decay factor during β -CROWN optimization. Default value is 0.98. Use a larger value such as 0.99 when increasing number of iterations. |
SolverBetaCrownIteration | positive integer scalar | Number of iterations for optimizing α and β during branch and bound. Default value is 50. |
SolverMultiClassLabelBatchSize | positive integer scalar | Maximum target labels to handle in α -CROWN, constrained by the GPU memory limit. Default value is 32. |
Branch and Bound Options
| Field | Data Type | Description |
|---|---|---|
BabInitialMaxDomains | positive integer scalar | Number of domains that can be added to the domain list at the same time before branch and bound. For multiclass problems this number can be as large as the number of labels. Default value is 1. |
BabBranchingMethod | character vector or string scalar | Branching heuristic. Specified as
|
BabBranchingCandidates | positive integer scalar | Number of candidates to consider when using "fsb" or
"kfsb". More candidates lead to slower but better branching.
Default value is 3. |
BabBranchingReduceOp | character vector or string scalar | Reduction operation to compute branching scores from two sides of a branch. Specified as
|
BabBranchingNonlinearSplitMethod | character vector or string scalar | Branching heuristic. Specified as
|
BabBranchingNonlinearSplitNumBranches | positive integer scalar | Number of branches for nonlinear branching. Default value is 2. |
BabBranchingNonlinearSplitFilter | logical | Specified as
|
BabBranchingInputSplitEnable | logical | Specified as
|
BabBranchingInputSplitEnhancedBoundPropMethod | character vector or string scalar | Bound propagation method if a problem
cannot be verified after
|
BabBranchingInputSplitEnhancedBranchingMethod | character vector or string scalar | Branching method if a problem cannot be verified after
|
BabBranchingInputSplitEnhancedBoundPatience | positive numeric scalar | Time in seconds that will use an enhanced bound propagation method (e.g. α-CROWN) to bound input split subdomains. Default value is 108 seconds. |
BabBranchingInputSplitAttackPatience | positive numeric scalar | Time in seconds after which to start PGD attack to find adversarial examples during input split. Default value is 108 seconds. |
BabBranchingInputSplitSbCoeffThresh | positive numeric scalar | Threshold at which to clamp values of coefficient matrix for
sb (split-by-score) branching heuristic. |
Attack Options
| Field | Data Type | Description |
|---|---|---|
AttackPgdOrder | character vector or string scalar | Projected Gradient Descent (PGD) attack order. Specified as
|
AttackPgdSteps | positive integer scalar | Steps of PGD attack. Default value is 100. |
AttackPgdRestarts | positive integer scalar | Number of random PGD restarts. Default value is 64. |
AttackPgdBatchSize | positive integer scalar | Batch size for number of restarts in PGD. Default value is 108. |
AttackPgdEarlyStop | logical | Specified as
|
AttackPgdLrDecay | positive numeric scalar | Learning rate decay factor used in PGD attack. Default value is 0.99. |
AttackPgdAlpha | positive numeric scalar | Step size of PGD attack. Default value is (XUpper - Xlower)/8. |
AttackPgdAlphaScale | logical | Specified as
|
AttackPgdLossMode | character vector or string scalar | Loss mode for choosing best delta. Specified as
|
AttackAttackMode | character vector or string scalar | Attack algorithm. Specified as
|
AttackGamaLambda | positive numeric scalar | Regularization parameter in GAMA attack. Default value is 10. |
AttackGamaDecay | positive numeric scalar | Decay of regularization parameter in GAMA attack. Default value is 0.9. |
Examples
Algorithms
References
[1] Zhang, Huan, Tsui-Wei Weng, Pin-Yu Chen, Cho-Jui Hsieh, and Luca Daniel. “Efficient Neural Network Robustness Certification with General Activation Functions.” arXiv, 2018. https://doi.org/10.48550/ARXIV.1811.00866.
[2] Xu, Kaidi, Huan Zhang, Shiqi Wang, Yihan Wang, Suman Jana, Xue Lin, and Cho-Jui Hsieh. “Fast and Complete: Enabling Complete Neural Network Verification with Rapid and Massively Parallel Incomplete Verifiers.” arXiv, 2020. https://doi.org/10.48550/ARXIV.2011.13824.
[3] Wang, Shiqi, Huan Zhang, Kaidi Xu, Xue Lin, Suman Jana, Cho-Jui Hsieh, and J. Zico Kolter. "Beta-crown: Efficient bound propagation with per-neuron split constraints for neural network robustness verification." Advances in neural information processing systems 34 (2021)
Version History
Introduced in R2026a