BoxRL-NNV : Boxed Refinement of Latin Hypercube Samples for Neural Network Verification

Sarthak Das · 2025

Read BoxRL-NNV : Boxed Refinement of Latin Hypercube Samples for Neural Network Verification by Sarthak Das (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-03650.txt.

Introduction

Sarthak Das presents a Python tool to check neural networks for safety faults, in a solo 2025 paper. The tool finds the bounds of a network's outputs given bounds on its inputs. If an output can cross a safety line inside those bounds, the network may fail in use.

The method first samples the input space with a Latin hypercube design to guess global highs and lows. A local optimizer then refines those guesses around the best points. Results are shown for part of a known aircraft collision avoidance benchmark. A full comparison with leading tools is set for a 2025 verification contest.

Catalog record

CREATORSarthak Das
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE9 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-03650

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

BoxRL-NNV : Boxed Refinement of Latin Hypercube Samples for Neural Network Verification Sarthak Das Abstract BoxRL-NNV is a Python tool for the detection of safety violations in neural networks by computing the bounds of the output variables, given the bounds of the input variables of the network. This is done using global extrema estimation via Latin Hypercube Sampling, and further refinement using L-BFGS-B for local optimization around the initial guess. This paper presents an overview of BoxRL-NNV , as well as our results for a subset of the ACAS Xu benchmark. A complete evaluation of the tool’s performance, including benchmark comparisons with state-of-the-art tools, shall be presented at the Sixth International Verification of Neural Networks Competition (VNN-COMP’25). K eywords Neural Network Verification \cdot Latin Hypercube Sampling \cdot L-BFGS-B 1 Introduction BoxRL-NNV (available at https://github.com/dassarthak18/R2X-NNV/tree/BoxRL-NNV ) is a tool written in Python for the detection of safety violations in neural networks. The software takes as inputs a neural network given in an ONNX (Open Neural Network Exchange) format, and a safety specification given as a VNNLIB file. Thereafter, BoxRL-NNV verifies whether the given neural network satisfies the safety properties specified by the VNNLIB file. ONNX is an industry standard format for interchange of neural networks between different frameworks such as PyTorch and Tensorflow. VNNLIB [ DGPT23 ] , likewise, is an international benchmarks standard for the verification of neural networks, which specifies safety properties as propositional logic satisfiability problems written in a subset of the SMT-LIB2 standard [ BFT17 ] . 2 Related Work Neural networks, while powerful, are inherently complex structures that can be regarded as multi-input multi-output (MIMO) black boxes. As such, interpreting them becomes very difficult. With their heavy deployment in a wide variety of safety-critical domains such as healthcare and autonomous navigation, it is becoming increasingly necessary to build trust and accountability in their use [ ZTLT21 ] . One approach is to leverage surrogate models such as decision trees [ YMH18 ] and Gaussian processes [ LGG23 ] to increase interpretability on a global level, or use sophisticated model-agnostic methods such as LIME [ RSG16 ] and SHAP [ LL17 ] to generate local explanations for a given prediction. Another promising approach is neural network verification, which generates mathematical guarantees that a neural network respects its safety specifications, such as input-output bounds. With the advent of friendly competitions such as International Verification of Neural Networks Competition (VNN-COMP) [ BBLJ23 ] , the problem of safety verification of neural networks is becoming more standardized, and we are seeing a shift from theoretical approaches to practical, measurable efforts. This tool, much like current state-of-the-art such as Marabou [ WIZ+24 ] , \alpha,\beta -crown [ Zha18 ] and NeuralSAT [ DND23 ] , is a step in this direction. 3 Methodology BoxRL-NNV treats neural networks as non-convex multi-input multi-output (MIMO) black boxes. As such, its verification algorithm assumes limited resources (no GPU acceleration) and no domain-specific knowledge (no encoding of the neural network architecture). It extracts input bounds for any given neural network directly from the VNNLIB file and generates a sample of input points using Latin Hypercube Sampling (LHS), which is a Monte Carlo simulation method used to generate a near-random sample of parameter values from a multidimensional distribution [ MBC79 ] . LHS is scalable and requires fewer samples to achieve the same level of accuracy as uniform sampling. This makes it particularly useful in complex simulations where computational resources are limited. Moreover, LHS ensures that samples are more evenly distributed across the range of each variable, reducing the correlation between samples and ensuring a better coverage of the entire distribution. In particular, we use a variant called LHS with multidimensional uniformity (LHSMDU) [ DD12 ] for better coverage, and therefore stronger guarantees. By computing the neural network outputs across these points, BoxRL-NNV identifies promising regions where global optima might be found. Thereafter, BoxRL-NNV picks the most promising region and performs a limited-memory boxed BFGS (L-BFGS-B) optimization [ BLNZ95 ] to quickly converge to a local optima around that region and refine the preliminary estimate obtained from LHS. This ensures a good estimate of the output bounds of the neural network. Once these extrema estimates are obtained, they are fed into an SMT solver (Microsoft Z3 Theorem Prover [ dMB08 ] ) along with the safety violation properties to analyze the safety of the neural network. • If the analysis determines that a safety violation is not possible given the computed output bounds, the tool returns holds . • If the analysis finds an LHS sample that is a valid safety violation, the tool returns violated along with the counterexample. • If the tool encounters safety specifications with complex disjunctions on input variables, or if the analysis is inconclusive, the tool quits gracefully and returns unknown . BoxRL-NNV also implements caching to reduce computational overheads over incremental runs. Algorithm 1 BoxRL-NNV Verification Algorithm 0: Neural network N (ONNX), safety specification S (VNNLIB) 0: Verification result: holds , violated (with counterexample CE ) or unknown 1: inputSize\leftarrow getInputSize(N) 2: Solver\leftarrow Z3Solver(S) 3: if complexDisjunction(Solver) then 4: return unknown 5: end if 6: \mathcal{B}\leftarrow extractInputBounds(Solver) 7: X\leftarrow LHS\_MDU(20\times inputSize,\mathcal{B}) 8: R\leftarrow extractOptima(N,X) 9: O\leftarrow L\text{\_}BFGS\text{\_}B(R) 10: Solver.add(boundaryConstraints(O)) 11: if Solver.check()=unsat then 12: return holds 13: end if 14: for x\in X do 15: if Solver.evaluate(x,N(x)) then 16: \texttt{CE}\leftarrow Solver.model() 17: return violated, CE 18: end if 19: end for 20: return unknown 4 Results ACAS Xu is a family of 45 real-world deep neural networks (further grouped into 5 batches of 9 networks each), developed as an early prototype for the next-generation airborne collision avoidance system for unmanned aircraft. All of these networks are fully connected, having 8 layers and 300 ReLU nodes each [ KBD+17 ] . There are a total of 10 properties that can be verified for each network. For the purposes of this paper, we evaluated BoxRL-NNV on one network from each batch for each of the 10 properties, that is, a total of 50 evaluations. The evaluation was done on a Google Colaboratory notebook with Python 3 Google Compute Engine backend (with CPU and 12.7GB RAM). BoxRL-NNV verified 20 instances as holds and 15 instances as violated (with CE ), while returning unknown on 15 instances. The total time taken was 318.65 seconds. ACASXU_run2a_1_1_batch_2000.onnx Safety Spec Result Time Taken (s) prop_1.vnnlib holds 12.141 prop_2.vnnlib holds 0.953 prop_3.vnnlib unknown 7.265 prop_4.vnnlib unknown 10.028 prop_5.vnnlib unknown 10.955 prop_6.vnnlib unknown 1.042 prop_7.vnnlib violated 9.661 prop_8.vnnlib violated 6.801 prop_9.vnnlib unknown 7.888 prop_10.vnnlib holds 6.640 ACASXU_run2a_2_1_batch_2000.onnx Safety Spec Result Time Taken (s) prop_1.vnnlib holds 9.327 prop_2.vnnlib violated 0.762 prop_3.vnnlib holds 7.825 prop_4.vnnlib holds 7.093 prop_5.vnnlib violated 7.570 prop_6.vnnlib unknown 0.728 prop_7.vnnlib violated 7.402 prop_8.vnnlib violated 7.358 prop_9.vnnlib unknown 7.806 prop_10.vnnlib holds 7.118 ACASXU_run2a_3_1_batch_2000.onnx Safety Spec Result Time Taken (s) prop_1.vnnlib holds 7.794 prop_2.vnnlib violated 0.774 prop_3.vnnlib holds 7.624 prop_4.vnnlib holds 7.229 prop_5.vnnlib unknown 7.622 prop_6.vnnlib unknown 0.727 prop_7.vnnlib violated 6.769 prop_8.vnnlib violated 7.735 prop_9.vnnlib violated 7.774 prop_10.vnnlib holds 7.074 ACASXU_run2a_4_1_batch_2000.onnx Safety Spec Result Time Taken (s) prop_1.vnnlib holds 7.769 prop_2.vnnlib holds 0.752 prop_3.vnnlib holds 6.805 prop_4.vnnlib holds 7.594 prop_5.vnnlib violated 7.428 prop_6.vnnlib unknown 0.957 prop_7.vnnlib violated 6.882 prop_8.vnnlib violated 7.746 prop_9.vnnlib unknown 7.029 prop_10.vnnlib holds 7.611 ACASXU_run2a_5_1_batch_2000.onnx Safety Spec

Read the complete text