Elamur Research

Improved Geometric Path Enumeration for Verifying ReLU Neural Networks

Paper · 2020 · Stanley Bak, Hoang-Dung Tran, Kerianne L. Hobbs et al.

Summary

A neural network can give sensible answers on test inputs while behaving differently somewhere between them. For a system that helps aircraft avoid collisions, the question is whether any input in a specified region can lead to a forbidden advisory. Bak and colleagues study how to answer that question for feedforward networks with rectified linear units, or ReLUs. They start from a geometric method that follows whole sets of inputs through the network. At each ReLU, the method separates inputs that make the unit pass its value through from those that make it return zero. Each resulting path represents a region of inputs whose outputs can be checked together.

The paper makes this exact search faster by changing how it visits paths and how it decides whether a split is needed. A depth-first search can reach a forbidden output early and stop. A concrete point carried along with each set can establish that a ReLU input has a particular sign, while a simple geometric enclosure can sometimes show that all values have that sign. The verifier reuses sign decisions across related paths and tightens those enclosures after splits. When the shortcut is inconclusive, the verifier consults the exact set. Parallel workers share unfinished paths so that several parts of the search can advance at once.

The optimized implementation, nnenum, completed all 180 checks for ACAS Xu properties 1–4 within a 10 min timeout per check on the authors’ laptop. It was the only verifier in the comparison to complete the whole group within that budget. Neurify was often faster on cases it completed, especially for property 1, where an approximate enclosure could establish safety quickly. For the more difficult properties 2–4, the authors found that nnenum generally pulled ahead once verification took more than about two seconds. On a separate property 9 check, nnenum and the earlier exact enumerator in NNV both reported exploring 338,600 paths, yet NNV took about 150x as long.

The result shows how much the cost per path matters when comparing verification methods. Carefully implemented enumeration can compete with methods that try to prove safety by enclosing whole groups of paths at once. The evidence is strongest for the fully connected ACAS Xu networks and the properties studied. The authors expect the number of paths to become a practical barrier on larger perception networks as the input region grows. Their implementation also leaves the effect of floating-point rounding outside its correctness analysis.

Deep dive: Improved Geometric Path Enumeration for Verifying ReLU Neural Networks

Bak and colleagues show how faster geometric path enumeration gives exact answers for ReLU network safety checks on the ACAS Xu benchmarks. · about 37 minutes to read

The problem and its context

From a proposed input to a whole region

A network evaluation starts with a point. For ACAS Xu, that point encodes a particular aircraft situation, and the output supplies scores used to select an advisory. A safety specification starts with a region. It describes a family of situations and asks whether the network can produce an unacceptable output anywhere in that family. Giving the verifier examples from the region could reveal a violation. To establish that the property holds, however, the verifier has to account for the entire region.

ACAS Xu is the paper’s running example because the network stands in for a mapping that already had a role in a collision-avoidance system. The original mapping, derived using a partially observable Markov decision process, occupied a 2 GB lookup table. A collection of 45 neural networks compressed it to 3 MB. Discretized inputs select the applicable network, and the chosen network receives the remaining inputs for the current situation. Compression was approximate, so the properties of the original mapping needed to be checked for the resulting networks.

The verification question specifies which inputs count and which outputs would matter. For example, the paper describes property 3 in terms of aircraft approaching head-on and a turn advisory being required. In the verifier, the set of situations and the condition on the output are encoded through linear constraints. The verifier can then treat the network function and the two sets as the ingredients of a mathematical decision problem. A safe result establishes that the image of the permitted input region is disjoint from the forbidden output region. An unsafe result establishes that some permitted input reaches it.

There is an important difference between a violation and a verification run that expires. A violation has an input that demonstrates it. A run that reaches a time limit supplies no decision either way. An algorithm can be sound and complete in the mathematical sense, with correct answers and a decision in principle, and still be impractical on an individual instance. The paper identifies runtime as the obstacle for exact ReLU verification and notes that the problem is NP-complete. Its goal is to improve practical performance on a group of checks for which the search sometimes already succeeds and sometimes takes much longer.

A fully connected layer first forms weighted combinations of the values it receives, adds biases, and then applies an activation to the resulting coordinates. The paper focuses on the rectified linear unit. A ReLU returns its input when that input is positive and returns zero when it is negative. At zero, the two rules agree. The value entering the unit determines which rule applies.

For a single input point, the sign at each unit is known as soon as its value has been calculated. Across a region of input points, the sign may vary. Some members of the region can make a unit active while others make it inactive. The collection of sign choices through the network determines a path through the computation. Along such a path, the layer operations and each fixed activation rule act affinely. Geometric enumeration exploits this structure by keeping the points governed by each sequence of sign choices together.

A path is therefore a piece of the input region described by the network’s internal decisions. Its output set may contain a continuum of points. The verifier can process this continuum with matrices and linear inequalities. The expense comes from how many distinct pieces it may have to consider and how frequently it must solve a linear problem to decide what happens next.

The number of paths depends on the input region as well as the network. A unit whose value can vary widely across the original input might have a fixed sign once earlier choices have narrowed the region. Conversely, a larger region may encounter sign combinations excluded by a smaller region. Counting units alone gives a worst-case bound from the number of possible sign choices. The authors’ practical question is what it costs to discover and process the paths that the specified inputs can actually reach.

Approaches already in use

The paper groups earlier verification methods into geometric propagation, satisfiability modulo theories, and mixed-integer linear programming. The groups differ in what they represent explicitly and where they spend their computation. A geometric method transforms sets as it moves through the network. A solver-based method can encode the relationships among inputs, intermediate values, activations, and outputs, then search for an assignment consistent with the property being violated. The paper also describes methods that combine elements of these approaches.

One geometric option is to store a region as a polytope specified by linear inequalities. That makes adding another inequality natural. Propagating a set through an affine layer can be expensive with this representation, especially when the operation requires moving between descriptions by inequalities and by vertices. Earlier star-based reachability work addressed this by storing the polytope in a separate coordinate space and recording its image under an affine map. NNV provided the original implementation of the enumeration procedure that Bak and colleagues improve.

Geometric methods can also propagate enclosing sets. AI² and DeepZ use zonotopes in the framework of abstract interpretation. A zonotope is the image of a box under an affine map. Its structure makes some calculations inexpensive, but an enclosure can include points the exact computation could never reach. If the whole enclosure avoids the unsafe region, it still proves safety. If the enclosure overlaps that region, the overlap may come from reachable outputs or from the extra points introduced by the approximation.

ReluVal and Neurify use symbolic intervals followed by refinement. The intervals give a provisional enclosure, and gradient information guides the choice of regions to split when the provisional result leaves the property unresolved. A coarse enclosure may settle an easy instance with little work. For a tighter property, the cost depends on how much refinement is required. The same input and output question can thus favor different methods depending on how far the reachable outputs lie from the forbidden region and how the enclosure behaves.

Reluplex and its successor Marabou adapt the Simplex approach to linear programming to reason about the relationship between a ReLU’s input and output. Mixed-integer formulations can encode each branching choice with a Boolean variable and use linear constraints to connect that choice to the unit’s behavior. The paper also describes a combination of mixed-integer methods with local search guided by gradients, and identifies Planet as combining ideas from mixed-integer programming, Boolean satisfiability, and linear overapproximation.

The formulation extends beyond advisories. For image classification, the paper connects it to the perturbation question in Explaining and Harnessing Adversarial Examples. A bounded change to the pixels can define an input box, and an undesired classification can be expressed as an output condition. The paper also mentions earlier work that turns changes such as rotation or lighting into input and output verification problems. These examples explain the appeal of a formulation that takes a network and sets as inputs. The reported benchmark study concentrates on ACAS Xu.

The method, step by step

Specify the map and the sets

The algorithm begins with a fixed network. Its weights and biases are already available, as are the constraints for the property. There is no training stage in the procedure. A verification run pairs one network with a permitted input region and a description of forbidden outputs. It then uses the actual network operations to decide whether that forbidden region can be reached.

The paper writes the network as a map between two real coordinate spaces.

NN : ℝⁿⁱ → ℝⁿᵒ

Here NN denotes the function computed by the network, and ℝ denotes the real numbers. The superscripts nⁱ and nᵒ stand for the input and output counts, respectively. The arrow indicates that the function takes a vector of input coordinates to a vector of output coordinates.

Within each layer, the calculation starts with an affine map, meaning a matrix multiplication followed by addition of a fixed vector.

x⁽ⁱ⁾ = Wᵢ yᵢ₋₁ + bᵢ

The index i identifies the layer. The vector yᵢ₋₁ is the input to that layer, Wᵢ is its weight matrix, and bᵢ is its bias vector. The result x⁽ⁱ⁾ contains the values immediately before activation. The matrix and vectors have compatible sizes, with the number of rows in Wᵢ setting the size of that layer’s intermediate vector.

yᵢ = f(x⁽ⁱ⁾)

Here yᵢ is the output of layer i. The vector function f applies the activation separately to each component of the intermediate vector x⁽ⁱ⁾. The network starts with y₀ as the external input and ends with yₖ as the external output, where k is the number of layers in the paper’s general notation.

ReLU(x) = max(x, 0)

The symbol x in this formula is a scalar entering one activation. The operation max selects the larger of x and zero. The unit leaves positive values as they are and maps negative values to zero. Both pieces give the same result at their boundary.

The permitted inputs and forbidden outputs each have their own coordinate space and their own inequalities.

I = {x ∈ ℝⁿⁱ | Aᵢx ≤ bᵢ}

The set I contains the permitted inputs. Here x is an input vector and ℝⁿⁱ is the space with as many coordinates as the network accepts. In this formula the subscript on Aᵢ and bᵢ labels the input constraints. Aᵢ is their coefficient matrix and bᵢ is the vector of their right-hand sides. The inequality applies row by row, and the vertical bar introduces the conditions for belonging to the set.

U = {x ∈ ℝⁿᵒ | Aᵤx ≤ bᵤ}

The set U contains the forbidden outputs. Here x is an output vector and ℝⁿᵒ is the space with as many coordinates as the network produces. The matrix Aᵤ and vector bᵤ specify the output inequalities, again read row by row. The subscript u distinguishes these constraints from the input constraints.

With the sets specified, the paper defines the output range directly from network evaluations.

Range(NN, I) = {yₖ | yₖ = NN(y₀), y₀ ∈ I}

The expression Range(NN, I) denotes every reachable output of the network function NN on the permitted set I. The vector y₀ is an input from I, and yₖ is the output at the final layer k. The braces collect those outputs as y₀ varies over I.

Range(NN, I) ∩ U = ∅

The intersection operator ∩ collects the vectors that belong to both sets, and ∅ denotes the empty set. The equality is the safety condition. If the intersection is nonempty, an input y₀ in I whose output belongs to U is a counterexample. An exact procedure can stop when it establishes the existence of such an input. On a safe instance, it must establish that every relevant part of the output range avoids U.

Exact ReLU verification with geometric path enumeration

The steps in order.

Exact ReLU verification with geometric path enumerationStep 1: Encode the permitted inputs as a star set1. Encode the permitted inputs as a star setStep 2: Apply the next layer’s affine map2. Apply the next layer’s affine mapStep 3: Test signs using bounds and feasible points3. Test signs using bounds and feasible pointsStep 4: Split the star where both signs occur4. Split the star where both signs occurStep 5: Contract the enclosure and update cached signs5. Contract the enclosure and update cached signsStep 6: Continue unfinished paths across workers6. Continue unfinished paths across workersStep 7: Test completed output sets against forbidden outputs7. Test completed output sets against forbidden outputs

Carry the geometry in a star set

The exact set in a search state is a linear star set. A star combines a region in a parameter space with a map to the coordinates at the current point in the network. The parameter space can stay tied to the original inputs even when the number of layer coordinates changes. Accordingly, a layer can transform the current image while keeping the inequalities that describe which original parameter values remain feasible.

S = {x ∈ ℝⁿ | x = c + Gα, α ∈ P}

The symbol S denotes a star, and x is one of its points in the current n-dimensional space ℝⁿ. The vector c is the fixed offset in that space. The matrix G maps a parameter vector α to the current coordinates, and its columns are the generators. The set P is a polytope of feasible parameter vectors in a p-dimensional space, so G has n rows and p columns. A star is specified by c, G, and P together.

At the beginning, the verifier can take P to be the input polytope itself. The offset c is then the zero vector and G is the identity matrix. The image is simply the original input set. As the search advances, the current coordinates may stand for hidden-unit values or output scores, while P records the input restrictions for that path. This gives the representation two separate jobs. The affine map records how feasible inputs are carried forward, and the polytope records which inputs qualify.

Consider an affine transformation in the current coordinates.

x′ = Ax + b

The vector x is a point before the operation, and x′ is its image. The matrix A has q rows and n columns for a map from n coordinates to q coordinates. The vector b is the offset in the q-dimensional destination space. In the verifier, the weights and biases of a layer supply the corresponding transformation.

S′ = (Ac + b, AG, P)

The symbol S′ denotes the resulting star. Its new offset is Ac + b and its new generator matrix is AG. The parameter polytope P stays the same because the transformation acts on the image of each allowed parameter vector. The expression follows by applying A and b to the point c + Gα. It also covers setting a coordinate to zero, which amounts to changing the affine map so that coordinate is zero throughout the image.

Changing the feasible part of a path is the other kind of operation. To describe a half-space restriction on the current set, the paper begins with an inequality in the current coordinates.

dx ≤ e

Here d is a row of coefficients, x is a point in the current space, and e is the scalar bound. The product dx is the linear combination constrained by that bound. A split at a ReLU uses an inequality of this form with coefficients that select the relevant coordinate and a sign that chooses the desired side.

(dG)α ≤ e − dc

In the parameter-space inequality, d, G, and c are the same coefficients and affine map as above, and α ranges over the polytope P. The row dG acts on α, while dc is the contribution of the fixed offset to the original left-hand side. Subtracting dc from the bound e moves that contribution to the right. Appending the resulting inequality to P produces the exact intersection under the same map.

This distinction makes star sets well suited to enumeration. Layer calculations update the image map. Branch conditions accumulate as inequalities in the parameter space. A sign test asks how far the current image extends in one coordinate. Pulling that question back through G turns it into a linear programming problem over P. Checking the final set against U likewise amounts to asking whether some feasible parameter vector satisfies the translated output conditions.

w = (vG)ᵀ

In this optimization formula, v is a row giving a direction in the current space, G is the generator matrix, and ᵀ denotes transpose. The column w gives the objective direction in the parameter space. The offset c contributes the same value to the objective for every α, so the optimizer can choose among feasible α using w.

x* = c + Gα*

Here α* is a feasible parameter vector that attains the optimum for the objective, and x* is the corresponding point in the current space. The asterisks mark optimizing points. The ability to obtain an actual point along with a bound becomes useful when the verifier carries a concrete witness forward.

Process one activation and then the next

The enumerator maintains unfinished search states. Each state stores its exact star and where it has reached in the network. The initial state represents the input polytope, with the first layer’s affine map still to apply. After applying a layer map to a state, the algorithm examines that layer’s activations one at a time. Each successor advances to a later activation or to the next layer.

The current coordinate determines the operation. If the star lies entirely on the non-negative side for that coordinate, the layer can keep the coordinate as it is. If the coordinate is nonpositive everywhere, the entire star can use the rule that sends it to zero. If the coordinate takes both positive and negative values, the verifier restricts copies of the star to the two closed half-spaces meeting at zero. On the nonpositive branch it projects the coordinate to zero. On the non-negative branch it keeps the coordinate. The shared boundary gives identical ReLU values under either rule.

The order of these operations matters. The half-space restriction on the nonpositive branch describes the values before activation. Applying it first records which inputs land on that branch. The zero projection then describes what happens to those inputs afterward. Recording the restriction in P preserves the branch information even when the corresponding current coordinate has become zero for the whole set.

When a state finishes all the layers, the verifier checks its exact output star for intersection with U. If an intersection exists, the search can return unsafe immediately. If the intersection is empty, that particular path is safe, and any unfinished paths still matter. Exhausting the waiting collection with no intersection establishes safety for the full input region. The prior star-based method supplies the soundness and completeness argument for this search. The paper’s changes aim to preserve that behavior while lowering the cost of reaching a verdict.

The generic path bound grows exponentially with the number of units.

2ᴺ

Here N is the total number of neurons under consideration, and the exponent counts the potential assignments of two activation sides across those neurons. The bound counts combinations before checking feasibility. The actual search follows paths reachable from the specified region, and earlier sign constraints may rule out later choices.

Choose which unfinished path to visit

A breadth-first search favors states that have progressed the least through the network. A depth-first search favors states further along. The authors use the current layer and neuron indices to describe that priority. Both schedules work with the same geometric states. What changes is which states get processed before the next completed output set becomes available.

Depth-first search is valuable when the property fails because one completed path can settle the result. It gives a search state the chance to advance through the remaining layers while alternatives wait. Breadth-first search can spend substantial time examining shallow alternatives before any one of them yields a final output. A depth-first schedule also keeps a smaller pending frontier, a consideration when many paths are possible. For a safe instance, both traversal orders ultimately need to account for every reachable path.

Use exact bounds, then reuse a feasible point

The Copy implementation of the sign test makes copies of the star, adds a half-space restriction to each, and uses linear programming to test feasibility. The Bounds implementation asks for the minimum and maximum of the coordinate on the current star. Both translate the same geometric question into linear programs. The extrema reveal where the set lies relative to zero. They also avoid the overhead of copying and intersecting stars merely to find out whether copies will be needed.

Even without additional information, the first bound sometimes settles the decision. A positive lower bound establishes that every point is positive, making the upper bound unnecessary for the sign test. A negative upper bound has the analogous consequence for the lower bound. The cost of this shortcut depends on asking for the informative bound first.

The Sim variant gives the verifier a way to choose the order. It stores one concrete point known to lie in the exact star. The point can be found by linear programming, or chosen as the center when the initial region is a box. Whenever the state applies an affine map or projects a coordinate to zero, it performs the same operation on the point. At a split, the optimizer can provide a feasible point for the new child, and the original point can be carried into the child containing it.

Suppose the stored point has a positive value at the current coordinate. It already establishes that the set reaches the positive side. The verifier checks the lower bound to see whether the negative side is also possible. A non-negative lower bound means the whole set can use the non-negative rule. A negative lower bound establishes that the branch must split. A stored point on the negative side provides symmetrical information and directs the verifier to the upper bound first. When the stored coordinate is exactly zero, it provides neither strict sign and the verifier can need both bounds.

The feasible point and the bound supply different kinds of evidence. The point shows that a particular value occurs. The bound constrains every value that occurs. Combining them saves a linear program in a case where either result alone would have left the sign decision open. The justification depends on maintaining the point inside its own exact state throughout the search.

Test a cheap enclosure before calling the solver

The next variant adds a zonotope to each search state. A zonotope is easier to optimize over than a general star because its parameters vary independently across intervals. In a standard zonotope, the parameter domain is a box centered at the origin.

Z = {x ∈ ℝⁿ | x = c + Gα, α ∈ [−1, 1]ᵖ}

Here Z is the zonotope, x is a point in the current n-dimensional space, c is the offset, and G is the matrix with p generator columns. The vector α has p coordinates. The notation [−1, 1]ᵖ means that each parameter independently ranges over the closed interval from −1 to 1. A star can represent this same geometry by choosing that box as P, or represent a more general shape by choosing a different polytope.

The affine transformation of a zonotope works like the transformation of a star.

Z′ = (Ac + b, AG)

The symbol Z′ denotes the transformed zonotope, A and b give the affine map, and c and G are the old offset and generator matrix. The standard parameter box is implicit and stays the same. Each parameter vector therefore gives the transformed image of the point it described before.

For a linear objective, the contribution of each generator can be maximized independently. The endpoint rule underlying the paper’s standard zonotope optimization can be written as follows.

αᵢ* = 1 if v · gᵢ ≥ −v · gᵢ, and −1 otherwise

The index i identifies a generator column gᵢ of G and its associated coefficient αᵢ*. The vector v gives the direction to maximize, and the dot denotes the dot product. The two sides of the comparison are the objective contributions of the two possible endpoints. Choosing the endpoint with the larger contribution maximizes that parameter’s part of the objective.

x* = c + ∑ᵢ αᵢ*gᵢ

Here x* is a maximizing point, c is the offset, and the summation runs over all generator columns gᵢ. Each column is scaled by its maximizing coefficient αᵢ*. Because the parameter choices are independent, combining them gives a maximizing point for the entire zonotope. The verifier can use the direction that selects the current coordinate to find an upper bound and the opposite direction to find a lower bound.

For the prefilter, the zonotope is initialized to enclose the exact star. On an input box, the initial sets can coincide. On a more general input polytope, linear programs can find coordinate bounds for an enclosing box. The verifier then applies the same affine operations to both sets, including setting activated coordinates to zero on the inactive branch. At a split, the half-space restrictions are applied to the exact star. The basic zonotope prefilter skips them and so may keep points eliminated from the star.

The inclusion is the basis for trusting the prefilter. Applying the same map to a set and its enclosure preserves containment. Restricting the inner set while keeping the enclosure also preserves containment. If the enclosing zonotope lies completely on one strict side of zero for a coordinate, every point of the star lies on that side as well. A zonotope that crosses zero leaves the question open and sends the test back to the exact star.

The paper calls the variants Zono-Bounds and Zono-Sim, depending on which exact sign test follows an inconclusive zonotope check. The benefit is a chance to decide some activations without a solver call. Meanwhile, all final intersection tests use the exact propagated sets. The enclosing geometry serves to certify local sign decisions, and the exact search supplies the verdict.

Reuse decisions within a layer

The noneager schedule checks each activation when a search state reaches it. Eager bounds computation checks the layer’s coordinates after applying the affine map and stores the sign information with the state. If an early activation causes a split, the two resulting states inherit decisions for later coordinates that are already confined to one side.

The reason is that a split reduces the feasible parameter region for each child. For a later coordinate, applying the earlier ReLU also leaves that later coordinate’s current value alone. A later coordinate that was entirely positive in the parent therefore stays positive in both children. The same reasoning applies to a negative coordinate. The inherited information is the sign decision. The precise numerical extrema can move inward as more restrictions are imposed.

An earlier split can also make a previously ambiguous coordinate unambiguous, which is why the eager implementation recomputes unresolved signs for the remaining neurons in each child. The benefit depends on how many reusable decisions it finds before the branches multiply. Its cost includes work on coordinates that remain ambiguous, storage for the decisions, and copying that information when constructing child states.

Make the enclosure tighter after a split

A zonotope that keeps all of its parameter values after a series of splits may lose much of its value as a filter. Increasingly many points in the enclosure can fall outside the exact star. Their presence can cause the zonotope to cross zero even when the exact star lies entirely on one side. The contraction procedures in the paper try to remove some of these extra points while keeping all feasible star points.

The authors use an offset zonotope whose parameter intervals can have arbitrary endpoints.

B = [l₁, u₁] × ⋯ × [lₚ, uₚ]

Here B denotes the box used as the zonotope’s parameter domain. Each interval has lower endpoint lᵢ and upper endpoint uᵢ, where i indexes the p parameters. The multiplication signs denote a Cartesian product, so choosing one value from each interval gives a point in B. The current-space enclosure is the image of this box through c and G.

αᵢ* = uᵢ if uᵢ(v · gᵢ) ≥ lᵢ(v · gᵢ), and lᵢ otherwise

Here αᵢ* is the maximizing coefficient at parameter i, gᵢ is the associated generator column, and v is the objective direction. The expression compares the contributions of the upper and lower endpoints uᵢ and lᵢ. As for the standard zonotope, the maximizing point combines the selected generator contributions with the fixed offset. This version allows the optimizer to use the contracted interval endpoints directly.

An offset box lets the zonotope and the star begin with the same zero offset and identity generator matrix. The same affine operations are then applied to both, so the implementation can share the map. The star stores its polytope P, and the zonotope stores its enclosing box B. Reducing B while keeping P inside it preserves the enclosure after mapping to the current coordinates. The method can therefore do its contraction work in the original parameter space.

Contract-LP finds the tight coordinate bounds of P by minimizing and maximizing each parameter over the polytope. The paper describes the cost as 2p linear programs per contraction, where p is the number of parameter dimensions. The resulting box is the smallest axis-aligned box that contains P in that space. Because the solver considers all the accumulated constraints together, it can tighten coordinates even when the newest restriction would do little by itself.

Contract-Simple uses the current box and the newest half-space restriction. The earlier constraints may already have helped shrink the current box, but the contraction calculation considers only that box and the new inequality. Since P lies inside both, any box containing their intersection remains an enclosure for P. The authors give a geometric calculation for obtaining the tight box of this particular intersection without linear programming.

fα ≤ g

In this formula, α is the parameter vector, f is the row of coefficients of the new restriction, and g is its scalar right-hand side. The verifier gets this inequality by translating the ReLU split from current coordinates into the parameter space. Here f denotes a coefficient row, distinct from the activation function earlier.

vᵢ* = lᵢ if fᵢ ≥ 0, and uᵢ otherwise

The coordinate vᵢ* belongs to a box vertex v* that minimizes the linear objective defined by f. The coefficient fᵢ determines whether the lower endpoint lᵢ or upper endpoint uᵢ minimizes that coordinate’s contribution. Combining those choices gives the cheapest point in the box for the left-hand side of the new inequality.

If this vertex violates the inequality, the intersection is empty. Otherwise, the calculation tries to improve the bound at the opposite end of each coordinate. Holding the other coordinates at their minimizing choices gives the tested coordinate the most room to vary while still satisfying the inequality. The method finds where that edge of the box meets the boundary of the half-space.

q · f = g

Here q is the point on the tested edge, f defines the half-space, and g is its boundary value. All components of q except the one being tested are fixed at the corresponding components of v*. If the coefficient of the tested coordinate is non-zero, the equation determines where the boundary cuts the edge’s line. When that cut lies within the relevant interval, it becomes the new endpoint. A zero coefficient means the inequality is independent of that coordinate, so it yields no contraction there.

The paper illustrates the difference with a box in a plane. A half-space can clip the box so that an edge intersection, marked q by the authors, determines a smaller upper endpoint. Both contraction procedures can find it. In another configuration, each half-space separately permits points at the original upper endpoint, while their joint intersection forces that endpoint down. The point marked r in the paper depends on both restrictions. Contract-LP can account for their interaction. Contract-Simple can retain extra points there, at the cost of occasional additional exact sign tests later.

Share work across threads

The parallel implementation distributes unfinished states through work stealing. Each worker has a local collection and runs the same propagation and branching procedure. Workers periodically publish the sizes of their collections in shared state. When a worker has no local work, other workers can move some of their pending states to a global queue where they become available.

A transferred state carries its position and the geometry for its path. The worker receiving it can continue applying precisely the same steps. A split supplies opportunities for independent work because each child already has its own branch restriction. Parallel execution changes the order in which outputs are reached, and an unsafe verdict can still terminate the search. On a completed safe check, the union of the paths accounted for is the same as in the sequential procedure.

Experiments and results

What the runs measure

ACAS Xu provides 45 networks. Each has five inputs and five output scores, with six ReLU layers of 50 neurons each and a total of 300 neurons as described by the authors. The inputs characterize the aircraft situation relevant to the selected network. The outputs determine the advisory through their relative values. The original benchmark defines ten properties. In the main experiment, properties 1–4 apply across the full network collection, producing 180 verification instances. A row in the resulting data represents a specific property paired with a specific network.

The benchmark supplies networks and conditions to verify. The experiments vary the verifier and measure wall-clock performance on those fixed checks. The outcomes are safe, unsafe, or unresolved within the timeout. For the main comparisons each check had a 10 min budget. The paper reports runtime per completed instance and plots how many instances each configuration can finish at different time limits. The runtime measures include the work needed to arrive at a decision, which can mean completing a full proof of safety or locating a reachable violation.

Most experiments ran on a laptop with Ubuntu Linux 18. 04, with 32 GB of RAM and a 2-speed Intel Xeon E-2176M.7 GHz. The machine had 6 physical cores and 12 virtual cores with hyperthreading. The final nnenum configuration used 12 threads. It combined depth-first local search, the Zono-Sim sign test, eager bounds, and Contract-Simple contraction. The authors identify nnenum as the implementation of their exact procedure and describe an accompanying artifact package for reproducing the measurements.

The main comparison includes Marabou, Neurify, and exact NNV. Marabou ran in its parallel divide-and-conquer mode. Neurify used its symbolic interval method with refinement. Exact NNV supplied the closest comparison in algorithmic terms, since it implements the earlier star-based enumerator. The authors report agreement on verification outcomes where the methods reached a decision. That agreement helps check the implementations against one another. Timing and completion then distinguish procedures that reach the same verdict.

The main ACAS Xu comparison

Nnenum was the only tool in the comparison to finish all 180 property 1–4 checks within the 10 min cutoff. The authors also report that it was often the fastest among the tools and that improvements over exact NNV could exceed 100x. The completed-instance curves give a fuller picture than either of these observations alone. A verifier can finish more instances within the cutoff while another reaches a large group of easier decisions sooner.

Neurify usually finished sooner on the cases it solved, except at the difficult end of the full comparison. The paper attributes much of that advantage to property 1. This property puts a threshold of 1500 on the first output score, associated with the clear-of-conflict advisory. For network 1-1, the authors report that the score is always below 1. A coarse enclosure can already fit comfortably on the safe side of the threshold. Exact enumeration can still spend time visiting activation paths, since its procedure checks the output sets produced by those paths.

Verification runtime for ACAS Xu property 1 on network 1-1

Neurify settles this widely separated output threshold sooner than exact enumeration.

Verification runtime for ACAS Xu property 1 on network 1-1Marabou: 95Marabou95nnenum (this paper): 10nnenum (this paper)10Neurify: .1Neurify.1
The numbers
System or settingseconds
Marabou95
nnenum (this paper)10
Neurify.1

Exact NNV exceeded the 10 min limit on that instance. The chart compares the completed times for a single property and network. It helps explain the aggregate curves because this kind of easy output separation favors Neurify even when the activation geometry still gives an enumerator work to do. The authors also point out that advisory selection depends on relative scores, whereas property 1 asks about the absolute magnitude of a particular score. That makes the property a distinct part of the benchmark from checks that more directly concern which advisory is selected.

The authors therefore also plot results for properties 2–4 alone. In that group nnenum generally ran faster than Neurify once the analysis took more than about two seconds. Neurify retained an advantage on many quick checks. The paper identifies implementation startup as part of the explanation for that end of the curve. Starting the Python process and reaching the verification script took about 0.6 s for nnenum. The authors report that the C++ implementation of Neurify could complete 80 benchmark checks within that amount of time. Fixed overhead matters when the search itself takes little time, while the cost of the verification procedure becomes more visible on longer runs.

The difference between the full curves and the restricted comparison matters for interpretation. Both use the same check-by-check budgets and procedures. They answer questions about different mixes of instances. The full group tests coverage across all four properties. The restricted group gives more weight to cases in which a faraway absolute threshold cannot account for much of the speed advantage. The paper presents both, along with the per-instance results, so that the overall ranking can be read against the property being tested.

Replacing the search with a single enclosing star

The authors also compare exact enumeration with the approximate-star option in NNV. That option propagates a single enclosing star through activations, instead of keeping separate exact stars for the ReLU branches. If its output enclosure avoids the unsafe region, it can prove safety without enumerating paths. It completed 68 of the 180 checks. The authors found that those completed instances were already quick for exact enumeration.

The greatest timing advantage for the single-set method among the 68 resolved cases was on property 3 for network 3-3. Approximate-star took 1.2 s, while exact enumeration took 3.1 s. The comparison shows what the shortcut can deliver on this group when its enclosure is adequate, alongside the much smaller number of instances it can resolve. A single-set result also addresses a different question from the zonotope prefilter inside nnenum. The prefilter can defer a local decision to exact geometry whenever needed, so a loose enclosure costs extra work instead of leaving the final property undecided.

The other ACAS Xu properties

The paper extends the tool comparison to properties 5–10. These have designated networks instead of being checked across all 45. The input condition of property 6 is a disjunction of two boxes, which the authors analyze as separate cases. Both nnenum and Neurify completed every check in this group, with the faster tool varying across instances. The paper distinguishes this follow-up experiment from the main 10 min coverage comparison.

Property 9 on network 3-3 is the case the authors could run with ERAN. ERAN supplements its geometric overapproximation with mixed-integer solving and, for this property, uses a fixed partition of the input domain into 6300 regions. The authors note that the measured runtime excludes the effort to select that partition size. Nnenum was faster than ERAN and Neurify on this case. The result compares the available configurations for the designated network and property, including ERAN’s preset partition.

Exact NNV and nnenum both report 338600 explored paths on that property. Exact NNV took about 150x as long. In this comparison, the earlier and newer enumerators faced the same reported path count. A comparison based only on the original implementation would have favored approximation and refinement over enumeration for this instance. The optimized implementation reverses that ranking, making implementation cost central to what the benchmark establishes about the underlying methods.

Property 7 illustrates a different end of the workload. Its input region covers the whole input space used for the property. The authors describe the search as exploring hundreds of millions of paths before finding an unsafe case. An instance can therefore be both unsafe and expensive. The early-exit rule helps once a violating path has been found. The region and traversal determine how much work must happen first.

What the ablations show

Traversal order mostly helps where a search can stop early

The authors build up the optimizations in stages and compare neighboring configurations. On the 180 checks for properties 1–4, breadth-first search completed around 90 within the 10 min limit, while depth-first search completed 120. Every check completed by breadth-first search was also completed by depth-first search. These counts concern the search-order comparison before the final set of optimizations and parallel execution.

The paper attributes most of the advantage to unsafe instances. Depth-first search can finish a path and examine its output while many other states are still waiting. Breadth-first search covers shallow parts of the search before reaching comparable output states. For safe cases, the authors found similar runtimes for the two traversal choices. Both must show that all completed output pieces avoid U. The comparison connects the speedup to when the algorithm can terminate, as well as identifying the smaller pending collection as a memory advantage of depth-first search.

The sequence of sign tests changes the cost of a path

The Bounds comparison tests a suggestion from the original enumeration work. Solving for extrema takes a stronger mathematical result than asking whether the star intersects a half-space, since the extrema specify how far the set extends. The measured benefit comes from avoiding the copies and extra restrictions required by the Copy procedure. In the benchmark, the extra information returned by an optimization call was cheaper overall than arranging the separate feasibility tests.

Sim asks whether maintaining a concrete point costs less than the solver calls it saves. The results generally favor Sim over the earlier variants. This makes sense in terms of the work exchanged. The point undergoes ordinary affine operations along with its star, then supplies one side of a sign decision. Where that point has a strict sign, an optimization in the opposite direction can settle whether the star reaches both sides. The point’s value lies in being feasible for its particular branch.

The zonotope comparisons ask whether a further layer of bookkeeping can avoid exact optimization often enough to pay for itself. Zono-Sim was the strongest of those variants overall, resolving about 145 checks within 10 min. Its fast path uses simple sums to certify a sign. Its fallback uses the feasible point to save solver work even when the enclosing zone spans zero. The authors observe cases at the difficult end of the curves where the loose enclosure becomes less useful and performance approaches that of Sim. An enclosure earns its keep through the decisions it can certify.

Reuse helps, and the cheapest tightening wins overall

Eager bounds made a small overall improvement over the noneager variant. Computing signs early can eliminate repeated tests across the descendants of a split. It also increases the work on a parent when its coordinates remain ambiguous and need to be considered again after branching. The observed improvement shows that, on this workload, the savings generally outweighed early computation, extra storage, and copying. The size of the improvement is consistent with a tradeoff that varies by path and by layer.

The contraction comparison shows why a tighter enclosure and a faster verifier can favor different settings. Contract-LP has access to the whole parameter polytope and can tighten a box when constraints act together. Contract-Simple considers only the latest half-space when deciding how to shrink the current box. The authors found Contract-Simple best overall on the ACAS Xu suite. The results favor a tightening calculation that is cheap to run repeatedly, even though some later sign tests still have to consult the exact star.

One safe instance makes the stages concrete. The chart uses the reported optimization times for property 4 on network 1-1. The sequential configurations inherit earlier choices in the optimization sequence. The parallel row adds worker-level concurrency to the configuration using simple contraction.

Optimization runtimes for ACAS Xu property 4 on network 1-1

Faster sign checks reduce runtime across these settings, and the parallel configuration finishes earliest.

Optimization runtimes for ACAS Xu property 4 on network 1-1Breadth-first Copy: 149Breadth-first Copy149Depth-first Copy: 150Depth-first Copy150Bounds: 72Bounds72Sim: 34Sim34Zono-Bounds: 33Zono-Bounds33Zono-Sim: 22Zono-Sim22Eager: 16Eager16Contract-LP: 23Contract-LP23Contract-Simple: 16Contract-Simple16Parallel nnenum (this paper): 4Parallel nnenum (this paper)4
The numbers
System or settingseconds
Breadth-first Copy149
Depth-first Copy150
Bounds72
Sim34
Zono-Bounds33
Zono-Sim22
Eager16
Contract-LP23
Contract-Simple16
Parallel nnenum (this paper)4

On this safe check, the two traversal orders have similar times, as the aggregate discussion would lead a reader to expect. The larger gains begin when the sign-test procedure changes. Contract-LP then increases the runtime relative to eager bounds alone, while Contract-Simple matches the reported eager time. The suite-level result favoring simple contraction comes from performance across the checks. This individual row shows a case where the added geometry of contraction yields little visible benefit in the sequential timings.

Parallelism scales on a case with substantial work

For the parallel study, the authors chose property 2 on network 4-2. They wanted an instance on which computation time would dominate the measurement. The prior ACAS Xu evaluation they cite reported that every tested tool either timed out after more than 55 min or exhausted memory on that check. In the paper’s single-threaded laptop run, enumeration took 655 s and covered 484,555 paths.

The authors varied the number of available cores on the laptop and on a rented server. The server had 384 GB of memory and 48 physical cores, which provided 96 threads with hyperthreading. With every core active, it took roughly 15 seconds to explore the same 484,555 paths. The identical reported path count supports reading the timing as a change in the rate of processing this search, with the server and laptop also differing as platforms. Within each platform, the measurements show sustained improvement as more physical cores become available, with smaller gains from hyperthreading.

The authors report that even with all cores in use, about 90% of computation time went into the search step itself. Time spent managing shared work was therefore a smaller part of this run. The result supports work stealing as a way to keep the workers busy on this difficult case. The authors assess scaling on a deliberately computation-heavy instance, so the experiment speaks most directly to searches with enough states to distribute.

Limitations

Limits the authors identify

The study concentrates on ACAS Xu. The authors acknowledge that choosing and assessing optimizations on the same benchmark family can favor changes suited to its particular workload. They argue that the family still offers useful variation because it contains both safe and unsafe checks and runtimes ranging from seconds to days in earlier work. They also regard the input dimensions and network sizes as representative of some control applications. Their measurements already required over five days, a practical constraint on expanding the evaluation.

The supported architecture in the experiments consists of fully connected layers and ReLUs. The paper places this focus within the broader applicability of earlier piecewise-linear geometric propagation. Some competing tools also support other types of layers or nonlinear activations. The reported comparative results apply to the network class shared by the ACAS Xu runs. Additional architectures can present different geometric operations and would require their own implementation and runtime evidence.

The authors mention testing bounded perturbation properties on larger perception networks that had hundreds of inputs and thousands of neurons. They report that the procedure can succeed when the perturbation is small enough. These runs are described qualitatively and fall outside the timed evaluation. The authors expect enumeration to become the wrong approach for such systems once the region admits too many paths. They suggest that approximation with refinement is more promising in that regime.

Floating-point rounding is another explicit limit. The paper justifies the geometric operations, sign decisions, and scheduling changes at the algorithmic level. It leaves the effect of numerical rounding outside the analysis for this implementation. The authors note that some competing geometric implementations account for rounding and that the choice of linear programming library affects both available guarantees and runtime. They used GLPK and point out that some other tools used Gurobi. The exactness of the set operations and the numerical guarantees of an implementation are separate questions.

Limits visible in the experimental design

The main benchmark is a family of checks on related networks with a common architecture and low-dimensional input sets. The solutions are meaningful for the individuals checked, and the performance curves reflect repeated runs in that setting. They give limited evidence about how the same prefilters and box contraction would behave when the parameter space is much larger or the initial regions are more complicated. In particular, the paper’s own contraction analysis ties the cost of Contract-LP to the number of parameter dimensions.

The staged optimization comparisons support decisions about the particular sequence used to build nnenum. They do not isolate every interaction among settings. For example, the benefit of contraction depends on how the sign test uses the resulting enclosure, and the benefit of eager bounds depends on what it costs to compute a sign under the preceding configuration. The final package establishes that these choices work well together on the suite. The sequential comparisons show where gains appeared as the package was assembled.

The tool timings compare implementations as run, including their programming environments, solvers, parallel settings, and approach to splitting. That is relevant to a reader choosing among those configurations for the benchmark. Isolating the effect of the verification strategy itself would require keeping more of those implementation choices fixed. The strongest evidence for lower per-path cost comes from property 9, where the two exact enumerators report the same number of paths. Even there, the reported speed ratio describes the implementations as a whole.

The main timeout also bounds what can be inferred about tools that leave cases unresolved. A table entry for a timeout establishes that the tool failed to reach a decision within the allotted time. It cannot determine how much longer the run would have needed. Relatedly, the ERAN comparison is limited to the property supported by the configuration tested, and its runtime omits the effort of selecting the hard-coded partition size. The parallel scaling evidence comes from one selected property and network, so it cannot establish how well a short or unevenly branching search would keep the workers occupied.

Finally, the verdicts concern the specified input and output constraints of the individual networks. A safe verdict says that the encoded forbidden region is unreachable under the encoded input conditions. The evaluation derives its application relevance from those conditions and how they express an advisory requirement. Property 1 makes the distinction visible because its absolute score threshold is mathematically clear and easy for some enclosures to settle, while the advisory itself depends on relative scores. Benchmark coverage and the full safety of a collision-avoidance system address different scopes.

What came after

No later citing work is documented for this paper, so a follow-up comparison cannot be established. The paper closes with directions for further verification research. The authors propose studying comparable optimizations for methods that combine overapproximation with refinement, especially for larger networks on which feasible path counts rise quickly. They also anticipate common input formats and categorized benchmarks that would make it easier to compare methods across different architectures and workloads. Those are directions the authors identify at the end of their study.

Cite

Cite as Stanley Bak, Hoang-Dung Tran, Kerianne L. Hobbs and Taylor Thomas Johnson. 2020. Improved Geometric Path Enumeration for Verifying ReLU Neural Networks. Lecture notes in computer science.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1007/978-3-030-53288-8_4

@inproceedings{bak2020improved,
  title = {{Improved Geometric Path Enumeration for Verifying ReLU Neural Networks}},
  author = {Stanley Bak, Hoang-Dung Tran, Kerianne L. Hobbs and Taylor Thomas Johnson},
  booktitle = {Lecture notes in computer science},
  year = {2020},
  doi = {10.1007/978-3-030-53288-8\_4},
  url = {https://doi.org/10.1007/978-3-030-53288-8_4}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/bak-2020-improved-geometric-path-enumeration-verifying/