Skip to content

Branch-and-bound methods for verifying piecewise-linear neural networksBranch and Bound for Piecewise Linear Neural Network Verification

arXiv· arXiv:1909.06588· Rudy Bunel, Jingyue Lu, Ilker Turkaslan, Philip H. S. Torr, Pushmeet Kohli, M. Pawan KumarDepartment of Engineering Science, University of Oxford; Department of Statistics, University of Oxford; DeepmindIndexed by this site · 27 days ago· Originally publishedDefenses

Quick read

Other

Based on the paper PDF (AI-generated); refer to the original

The authors propose using a unified Branch-and-Bound framework for complete verification of piecewise-linear neural networks, and propose branching strategies such as BaBSB/BaBSR; on ACAS, BaBSB verifies 98.40% of properties in one hour, while Reluplex verifies 79.26% in two hours.

Questions
Neural networks are difficult to deploy in safety-critical scenarios because testing cannot prove that safety properties hold. Existing complete verification methods are difficult to scale to networks of realistic size, and the authors aim to improve complete verification of piecewise-linear neural networks.
Methods
The authors formulate verification as a global optimization problem, use Branch-and-Bound to uniformly describe search, branching, and bounding, and show that methods such as Reluplex and Planet are special cases. On this basis, they propose new methods such as input-domain branching BaB/BaBSB and ReLU branching BaBSR/BaBSRL.
Experiments and results
Multiple methods are compared on CollisionDetection, ACAS, PCAMNIST, two Robust MNIST networks, and TwinStream. On ACAS, BaBSB verifies 98.40% of properties in one hour, while Reluplex verifies 79.26% in two hours; on large networks, BaBSR is overall better than MIPplanet, but is slightly worse on the hardest properties of reduced Robust MNIST.
Limitations and future work
The authors state that LP solving is the main bottleneck of BaB methods, branching heuristics may fail, and tight intermediate bounds are computationally expensive. The experiments cover six datasets; PCAMNIST has only 27 properties, and the TwinStream weights are randomly generated, which the authors caution may not represent real use cases.
Experimental setupCollisionDetection、ACAS et al. · CollisionDetection、ACAS et al. · % of properties verified、computation time et al.
Evaluated models
CollisionDetectionACASRobust MNIST Networkreduced Robust MNIST NetworkPCAMNISTTwinStream
Benchmarks
CollisionDetectionACASPCAMNISTreduced Robust MNIST NetworkRobust MNIST NetworkTwinStream
Metrics
% of properties verifiedcomputation timenumber of nodes visitedaverage time per node
AI summaryResearchers propose a family of Branch-and-Bound-based algorithms for proving or disproving whether a neural network satisfies given input-output properties. This work targets formal verification of neural networks in safety-critical applications, uses a mixed integer linear programming (MIP) formulation, unifies several previous verification methods as special cases of this framework, and combines the advantages of each method to achieve performance significantly exceeding the previous best. The authors also propose a branching strategy for ReLU nonlinearities, enabling the algorithm to effectively handle high-dimensional input convolutional network problems on which previous methods often fail. The paper also proposes a comprehensive test dataset and benchmark, aggregates previously published test cases, systematically compares existing and new algorithms, and analyzes factors affecting the difficulty of verification problems.

Researchers propose a family of Branch-and-Bound-based algorithms for proving or disproving whether a neural network satisfies given input-output properties. This work targets formal verification of neural networks in safety-critical applications, uses a mixed integer linear programming (MIP) formulation, unifies several previous verification methods as special cases of this framework, and combines the advantages of each method to achieve performance significantly exceeding the previous best. The authors also propose a branching strategy for ReLU nonlinearities, enabling the algorithm to effectively handle high-dimensional input convolutional network problems on which previous methods often fail. The paper also proposes a comprehensive test dataset and benchmark, aggregates previously published test cases, systematically compares existing and new algorithms, and analyzes factors affecting the difficulty of verification problems.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors study how to perform complete formal verification of piecewise-linear neural networks, and unify existing methods into a Branch-and-Bound framework to improve scalability.

    Core question: how to perform complete formal verification of input-output properties of piecewise-linear neural networks (PL-NN), and improve the scalability of verification methods to larger networks.

    • Problem setting and importance: The authors argue that deployment of deep networks in safety-critical scenarios is limited because their behavior is difficult to predict; held-out test sets alone cannot prove that properties hold. The paper focuses on proving or disproving that "all inputs in input domain C satisfy output property P".
    • Shortcomings of existing methods: The authors state that existing complete methods can handle some ReLU networks but remain far from networks of realistic size; input-domain branching is costly or ineffective on high input dimensions or convolutional networks, and existing ReLU branching strategies have similar problems.
    • Core observation: Verification can be written as a mixed-integer linear programming (MIP) or global optimization problem, and Branch-and-Bound (BaB) can uniformly describe search strategies, branching rules, and bounding methods, and includes existing methods as special cases.
    • What the paper proposes: The authors propose a unified BaB framework, design the input-domain branching methods BaB/BaBSB and the ReLU branching methods BaBSR/BaBSRL, and construct datasets including CollisionDetection, ACAS, PCAMNIST, Robust MNIST, reduced Robust MNIST, and TwinStream for systematic comparison.
    • Problem scope: The paper focuses only on complete algorithms; networks are limited to piecewise-linear structures, which may include fully connected, convolutional, MaxPooling, and ReLU, as well as Batch-Normalization and Dropout that remain piecewise-linear at test time, but do not include sigmoid or tanh networks.
  2. What related research exists?

    Related work is divided into early verification, SMT methods, MIP/relaxation and bounding methods, and BaB-type methods; the authors position their method as unifying and improving these lines.

    Early and conditionally limited verification methods

    • Zakrzewski (2001) — the paper states that, to its knowledge, this is the earliest method proposed for verifying simple single-hidden-layer neural networks; this paper does not adopt its approach of making additional assumptions about the network.
    • Bastani et al. (2016), Hein and Andriushchenko (2017), Cheng et al. (2017b), Narodytska et al. (2017) — these rely on additional assumptions such as a single linear domain, second-order differentiability, or binary activations, respectively; the paper explicitly excludes these methods from its scope.

    SMT and constraint-solving complete methods

    • Reluplex (Katz et al., 2017a) — uses the SMT splitting-on-demand framework to verify networks containing linear functions and ReLUs; the paper reconstructs it as a special case of BaB and notes that its ReLU relaxation is looser than Planet's.
    • Planet (Ehlers, 2017a) — explicitly assigns phases to nonlinear units and uses the convex hull of each ReLU for linear approximation; the paper notes that it has no branching priority heuristic and no early termination mechanism based on feasible-point search.
    • Neurify (Wang et al., 2018a) — improves on ReluVal, uses a gradient measure to branch on unfixed ReLU nodes, and calls an LP solver for bounding.

    MIP, relaxation, and bounding methods

    • Tjeng and Tedrake (2019) — gives the big-M MIP encoding adopted in this paper; Lomuscio and Maganti (2017) and Cheng et al. (2017a) give another encoding with looser bounds.
    • Wong and Kolter (2018) — originally aimed at robust optimization, provides a formula that estimates a lower bound with a single backward pass; this paper uses it for branching evaluation in BaBSB and BaBSR.
    • Anderson et al. (2019) — proposes a neural network MIP formulation using stronger relaxations; the paper lists it as a direction that could be drawn on in the future.

    BaB-type methods and baselines

    • ReluVal (Wang et al., 2018b) — input-domain branching, computing bounds with symbolic interval propagation; Royo et al. (2019), inspired by it, use shadow prices to make input partition decisions.
    • ERAN (Singh et al., 2018, 2019a,b) — based on abstract interpretation, mainly performs incomplete verification, and also supports a complete mode; in the large-network experiments, this paper compares against its complete version with the refinepoly domain and a 10-second MILP timeout.
    • Baselines and benchmarks: Experimental baselines include BlackBox, Reluplex, Planet, MIPplanet, ERAN, and Neurify; the datasets are CollisionDetection, ACAS, PCAMNIST, reduced Robust MNIST Network, Robust MNIST Network, and TwinStream.

    The authors position this paper's distinction as: using the BaB framework to unify the above methods, analyzing their strengths and weaknesses along the three dimensions of bounding, branching type, and branching strategy, and combining them into new complete verification algorithms.

  3. How does the paper address this problem?

    The authors unify verification as Branch-and-Bound global optimization, and combine BaB, BaBSB, reluBaB, BaBSR, and BaBSRL by choosing search strategies, branching rules, and bounding methods.

    The overall idea is to turn PL-NN verification into a global optimization problem over a scalar output: if the network's minimum output is positive, the property holds; if the minimum output is negative, the minimizing point gives a counterexample. The authors organize the solving with Branch-and-Bound (BaB), and within this framework combine different branching and bounding choices.

    Problem Setting and Normalization

    • Verification goal: Given a network x̂n = f(x0), a bounded input domain C, and a property P, prove that x0 ∈ C and x̂n = f(x0) imply P(x̂n). The paper writes the property as a Boolean formula of linear inequalities on the output.
    • Normalization: By adding linear layers and MaxPooling layers, OR/AND clauses are incorporated into the network, so that the property becomes "the scalar output is always positive within the input domain." Finding a counterexample is equivalent to adding the constraint x̂n ≤ 0 and then deciding satisfiability.
    • MIP encoding: The big-M encoding writes ReLUs as binary variables δi and linear constraints; the input bounds l0, u0 and intermediate bounds li, ui can be obtained by propagating interval arithmetic layer by layer.

    BaB Framework

    • Algorithm skeleton: Maintain a global upper bound global_ub and a global lower bound global_lb; each time take out a subproblem, split it into several subproblems, compute prob_ub and prob_lb for each, and then prune subproblems whose lower bound is not lower than the current global upper bound.
    • Three replaceable components: pick_out determines the search order, split determines input-domain or ReLU branching, and compute_UB/compute_LB determine the upper/lower bound algorithms. The paper states that Reluplex, Planet, ReluVal, Neurify, etc. can all be viewed as special cases of this framework.
    • Satisfiability simplification: When only deciding whether the property is true or false, global_ub can be initialized to 0; if the lower bound of a subproblem is greater than 0, it is pruned, and if an upper bound less than 0 is found, the process can terminate early.

    Bounding and Approximation Strategies

    • Planet relaxation: For ReLUs with unknown sign, convex hull constraints are used, and the paper gives reasons why this relaxation is tighter than the Reluplex relaxation; Appendix A explains that it corresponds to level 0 of the Sherali-Adams hierarchy relaxation.
    • Rebuilding approximations: After branching, an LP solver can be used to recompute some or all intermediate bounds to obtain a tighter convex relaxation; the authors also note that there is a trade-off between tighter bounds and computational cost.
    • Source of upper bounds: BaB-type methods use random sampling points or directly use the network output corresponding to the LP solution as the upper bound; prob_lb is computed by the LP solver.

    Branching Strategies

    • Input-domain branching BaB: Split in half along the longest edge of the input domain; BaBSB estimates the splitting benefit for each candidate dimension using the fast lower-bound formula of Wong and Kolter (2018), and selects the dimension that maximizes min(fin0, fin1).
    • ReLU branching reluBaB: On the first layer containing an unfixed ReLU, select the first unfixed node, split it into two subproblems, blocked and passing, and use the LP solver to update all intermediate bounds.
    • ReLU branching BaBSR/BaBSRL: Use the ReLU score in equation (9) of the paper to estimate the splitting benefit of each unfixed node, and select the one with the largest score; BaBSR updates intermediate bounds using the better of the interval bound and the Wong-Kolter bound, and BaBSRL additionally uses the LP solver to update the bounds of the layer before the selected ReLU.
    • Handling convolutional networks: The authors state that if a large convolutional layer is very sparse after linearization, branching on that layer is often ineffective; when the estimated improvement from other layers is small, they switch to random selection and prefer non-sparse layers.

    Success Determination and Implementation

    • Determination method: When a property is false, the solver must give a valid counterexample; if the returned input is not a valid counterexample, even if the property is indeed satisfiable, it is not counted as a successful verification.
    • Implementation setup: The BaB methods are implemented in Python and call Gurobi to solve LPs; Reluplex and Planet use public C++ versions, and the underlying LP solver is still GLPK, and the paper reminds that this difference needs to be considered when comparing.
  4. What experiments did the paper conduct?

    The authors compare BaB variants with BlackBox, Reluplex, Planet, MIPplanet, ERAN, and others on six datasets; the main metric is the proportion of properties successfully verified under different time budgets.

    Experimental Setup

    • Compared methods: BlackBox, Reluplex, Planet, MIPplanet, ERAN, Neurify, as well as BaB, BaBSB, reluBaB, BaBSR, BaBSRL; MIPplanet is a variant reimplemented by the authors with Gurobi following the formulation of Tjeng and Tedrake (2019).
    • Datasets: CollisionDetection 500 properties; ACAS 188 properties; PCAMNIST 27 properties; reduced Robust MNIST Network 1200 properties; Robust MNIST Network 1000 properties; TwinStream 81 properties (Table 2).
    • Networks and properties: CollisionDetection is a shallow network; ACAS has 6 layers with 50 hidden units per layer; Robust MNIST contains 2 convolutional layers and 2 fully connected layers, with 4804 activation nodes in total, and the reduced version has 1226 ReLU nodes; the MNIST property is that the predicted label within the L∞ ball remains unchanged.
    • Metrics: Mainly reports the proportion of properties successfully verified within a given time budget; also reports the average time per node and the number of nodes that need to be visited.
    • Protocol: By default, a timeout of 2 hours per property, a memory limit of 20GB, and a single-core i7-5930K CPU; for the two Robust MNIST datasets, because of the large number of properties, the timeout is set to 1 hour.
    • Validity check: If a property is satisfiable, the solver must exhibit a valid counterexample; returning an invalid counterexample is not counted as success. The paper does not report the number of repeated runs.

    Main Results

    Swipe horizontally to read the table

    DatasetMethodResultSource
    ACASBaBSBVerified 98.40% of properties under a 1-hour budgetMain text 7.1
    ACASReluplexVerified 79.26% of properties under a 2-hour timeoutMain text 7.1
    ACAS 20-property subsetBaBSBAverage 1.81s per nodeTable 3
    ACAS 20-property subsetBaBAverage 2.11s per nodeTable 3
    ACAS 20-property subsetreluBaBAverage 1.69s per nodeTable 3
    ACAS 20-property subsetReluplexAverage 0.30s per nodeTable 3
    ACAS 20-property subsetMIPplanetAverage 0.017s per nodeTable 3
    ACAS 20-property subsetPlanetAverage 1.5e-3s per nodeTable 3
    • Small network results: The authors state that on CollisionDetection most solvers solve all properties within about 10 seconds, but reluBaB is slower and BlackBox produces several erroneous counterexamples (Figure 4a).
    • ACAS results: The authors state that the runtime required for BaBSB to reach the success rate that Reluplex achieves in two hours is two orders of magnitude smaller; Figure 4b shows that most methods time out on the hardest test cases.
    • Role of branching and bounding: The authors attribute the gap between BaBSB and BaB to intelligent branching, and the advantage of reluBaB over Planet to rebuilding approximations at each step; Figure 5 shows that better bounding and branching reduce the number of subdomains that need to be explored.

    Large Network Experiments

    • Simple property screening: On simple properties of reduced Robust MNIST, Figure 6 shows that Planet, reluBaB, Reluplex, and Neurify all time out within the 100-second limit; BaBSB solves some properties but is worse than MIPplanet, and only BaBSR and ERAN are not worse than MIPplanet.
    • reduced Robust MNIST: The authors state that BaBSR outperforms MIPplanet on easy properties, but the gap narrows as properties become harder, and MIPplanet is slightly better on the hardest properties (Figure 7a).
    • Robust MNIST: The authors state that BaBSR outperforms MIPplanet on all properties; ERAN is worse than the other two methods on the reduced dataset but outperforms MIPplanet on the Robust dataset (Figure 7b).
    • Authors' explanation: The authors believe that the degradation of BaBSR on hard properties of the reduced network may be because the branching heuristic becomes ineffective after many branches; the difference between ERAN and MIPplanet may come from different convex relaxations and intermediate bounds.

    Parameter Variation and TwinStream

    • PCAMNIST parameter experiments: Figure 8 shows that overall runtime increases with more inputs, larger layer width, and smaller satisfiability margin; the authors state that MIPplanet behaves inconsistently, possibly because Gurobi adopts different strategies for problems of different scales.
    • TwinStream results: Figure 9 shows that MIPplanet performs best on all properties, and input-domain branching BaBSB and BaB perform worst; the authors state that when hidden nodes in the same layer are highly correlated, the ReLU score of BaBSR becomes too loose.
    • Position of BaBSRL: The authors state that BaBSRL has a tighter relaxation than BaBSR and lower cost than reluBaB, and therefore outperforms BaBSR and reluBaB on TwinStream; they expect it may be more suitable for large and highly correlated networks.

    Other Ablations and Analyses

    • SAT/UNSAT split: Figure 13 shows that all BlackBox errors are on SAT properties of CollisionDetection; Figure 14 shows that Planet does not solve any SAT property of ACAS.
    • MIP encoding variants: In Figure 11a, on CollisionDetection only Planet-opt and BlackBox reach 100%; the authors state that other satisfiability encodings return spurious counterexamples due to the big-M constant.
    • Effect of bound quality: In Figure 11b, on ACAS the Interval variant is the slowest, and Planetsym-feasible is worse than Planet-feasible and Planet-opt, which the authors attribute to looser bounds.
    • PCAMNIST overall comparison: Figure 12 shows that BaBSR is best on easy properties but worse than MIPplanet on hard properties, consistent with the observation on reduced Robust MNIST.
    • Network training accuracy: The test accuracy of each PCAMNIST network in Table 4 ranges from 87.3% to 98.84%, used to describe the training of the verified networks.
  5. What are some points that can be further explored?

    The authors explicitly list directions including stronger relaxations, bounding for non-piecewise-linear networks, GPU acceleration, learning branching policies, and imitating LP decisions; the experiments cover six datasets.

    Limitations and future directions noted by the authors

    • Stronger relaxations: Section 5.3 states that higher-level relaxations in the Sherali-Adams hierarchy could be explored, jointly constraining a set of ReLUs rather than linearizing them independently.
    • Non-piecewise-linear networks: Section 5.3 states that BaB is not limited to PL-NN, but suitable bounding functions need to be developed for activations such as sigmoid and tanh.
    • Cheaper tight intermediate bounds: The Conclusion states that tighter intermediate bounds can speed up convergence but are computationally expensive, and that exploiting the layer-wise structure of GPUs may reduce the cost.
    • Branching heuristics may fail: The Conclusion states that existing branching methods mainly rely on heuristics and may fail when the problem changes; graph neural networks learning branching policies have potential but high offline cost.
    • LP is the main bottleneck: The Conclusion states that BaB methods require solving LPs, which is the main bottleneck hindering their development; learning to imitate LP decisions may accelerate the entire pipeline.
    • Data representativeness caveat: Appendix E explains that the TwinStream weights are randomly generated by Glorot initialization and are not the result of optimized training, so they may not represent real use cases.

    Experimental coverage

    • Datasets: The experiments cover six datasets: CollisionDetection, ACAS, PCAMNIST, reduced Robust MNIST Network, Robust MNIST Network, and TwinStream.
    • Number of properties: The numbers of properties for the datasets are 500, 188, 27, 1200, 1000, and 81, respectively (Table 2); PCAMNIST has only 27 networks, and the authors caution that generalization observations require care.
    • Method scope: BlackBox, Reluplex, Planet, MIPplanet, ERAN, Neurify, and five BaB variants were compared; for the full-property comparison on large networks, only BaBSR, ERAN, and MIPplanet were retained.
    • Computation protocol: By default, a single-core i7-5930K, 20GB of memory, and 2 hours per property; for the two Robust MNIST datasets this was changed to 1 hour.
    • Unreported information: The paper does not report the number of repeated runs, nor does it give a complete table of success counts for each method on all datasets; the main results are presented as cactus plots and percentages in the text.
  6. Summarize the main content of the paper

    The paper uses Branch-and-Bound to unify complete verification of PL-NNs, proposes algorithms such as BaBSB/BaBSR and six evaluation datasets, and systematically compares branching and bounding choices.

    This is a paper on neural network formal verification, whose goal is to give a complete proof or a valid counterexample for input-output properties of piecewise-linear neural networks.

    • Problem: Testing cannot prove that no counterexample to a safety property exists; existing complete verification methods are difficult to scale to high input dimensions, convolutional structures, or larger networks.
    • Method: The authors formulate verification as a global optimization problem with scalar output, use the BaB framework to unify search strategies, branching rules, and upper/lower bound computation, and show that methods such as Reluplex and Planet can be included as special cases.
    • New algorithms: BaBSB uses the Wong-Kolter fast lower-bound estimate to select input dimensions; BaBSR uses a ReLU score to evaluate the branching benefit of all unfixed ReLUs within a single backward pass; BaBSRL builds on BaBSR by using an LP to update the bounds of the layer preceding the selected ReLU.
    • Small-network results: On ACAS, BaBSB verifies 98.40% of properties in one hour, while Reluplex verifies 79.26% in two hours; the authors state that the time required to reach Reluplex's success rate is two orders of magnitude smaller.
    • Large-network results: On reduced Robust MNIST, BaBSR outperforms MIPplanet on easy properties, but MIPplanet is slightly better on the hardest properties; on Robust MNIST, BaBSR outperforms MIPplanet on all properties.
    • Conclusions and implications: The authors believe that branching quality and tightness of intermediate bounds jointly determine BaB performance, and that LP solving is the main bottleneck; future directions include stronger relaxations, GPU-accelerated bounding, learning branching policies, and imitating LP decisions.
Read originalarxiv.org