Reluplex: An Efficient SMT Solver for Verifying Deep Neural NetworksReluplex: An Efficient SMT Solver for Verifying Deep Neural Networks
The authors propose Reluplex, extending simplex to ReLU constraints, and verified 8 of 10 properties on 45 ACAS Xu networks (300 ReLU nodes each).
- DNNs are used as controllers in safety-critical systems such as ACAS Xu, but their behavior is difficult to give formal guarantees for; verification of DNNs with ReLU is an NP-complete problem, and general SMT/LP solvers and existing specialized tools can only handle very small networks.
- The authors propose Reluplex: extending simplex to the theory TRR of reals and ReLU, allowing ReLUs to temporarily not satisfy the semantics, then repairing them with Updateb/Updatef/PivotForRelu, splitting with ReluSplit when necessary, together with bound derivation, conflict analysis, and floating-point arithmetic.
- On 45 ACAS Xu networks (300 ReLU nodes each), Reluplex solved all 8 comparison instances (CVC4/Z3 solved 0, Table 1); of the 10 properties, 8 reached a conclusion, φ2 does not hold on 35 networks, and φ7 times out (Table 2); local adversarial robustness tests at 5 points × 5 δ were also performed (Table 3).
- The authors state that floating-point arithmetic does not guarantee soundness, and that providing true soundness is a future goal; global adversarial robustness was only proven successfully on small networks; φ1 has 4 networks and φ7 times out overall; the authors plan to improve scalability and extend to other piecewise-linear layers such as max-pooling.
- Benchmarks
- ACAS Xu DNNs(45 个全连接网络,每个 8 层、300 个 ReLU 节点)
- Metrics
- 求解时间(秒)SAT/UNSAT/TIMEOUTStack(最大嵌套 case-split 深度)Splits(case-split 总数)
Stanford University researchers proposed Reluplex, an SMT solver that extends the simplex algorithm to ReLU constraints, which can verify properties of deep neural networks or provide counterexamples. The method splits ReLU nodes into forward and backward variables, allows temporary violation of ReLU semantics and then iteratively corrects it, splits individual ReLU branches only when necessary, and improves performance with tighter bound derivation, conflict analysis and floating-point arithmetic. On the 45 fully connected DNNs of the ACAS Xu drone collision avoidance system prototype (each with 8 layers and 300 ReLU nodes), the authors proved several recommended properties (such as always giving a conflict-free advisory when the intruder is far enough away) and local adversarial robustness at some input points, and also found a counterexample input inconsistent with the lookup table; Reluplex solved all 8 test instances, while the compared CVC4, Z3, Yices, MathSat and Gurobi solved at most 3.
Why it was selectedThe paper extends the simplex algorithm to ReLU constraints, verifying the ACAS Xu drone collision avoidance system networks at a scale an order of magnitude larger than existing methods; the code is open source.
Paper analysis
What problem does this paper attempt to solve?
On how to provide formal behavioral guarantees for large DNNs with ReLUs, the authors propose Reluplex and verify it on ACAS Xu networks.
Core problem: how to formally verify deep neural networks with ReLU activation functions (prove that a property holds or give a counterexample), at a scale beyond what existing methods can handle.
- Problem setting: DNNs are being used as controllers in safety-critical systems, such as autonomous driving and the unmanned aircraft collision avoidance system ACAS Xu; DNNs are trained on limited data and expected to generalize, but the authors point out that existing observations show DNNs produce unexpected and erroneous reactions to small perturbations of the input.
- Shortcomings of existing methods: verifying DNNs with ReLU is an NP-complete problem (Appendix I); the authors state that general LP/SMT solvers cannot handle it experimentally, and existing specialized tools can only verify very small networks (e.g., a single hidden layer with only 10 to 20 hidden nodes); previous work on ReLU networks required simplifying assumptions, such as considering only small input regions where all ReLU states are fixed, turning the problem into a convex problem, but this can only verify an approximation of the desired property.
- Core observation: ReLU is piecewise linear, and based on this the authors extend the simplex algorithm to ReLU constraints, allowing ReLUs to temporarily violate the semantics and be gradually repaired during the search; experiments show that many ReLUs can be ignored or discarded, and the authors state that the search space is thereby reduced by an order of magnitude or more.
- What the paper presents: Reluplex—an SMT solver for the theory of linear arithmetic over the reals plus ReLU constraints; the encoding of DNNs and their properties; several implementation techniques critical to performance (floating-point arithmetic, bound derivation for ReLU variables, conflict analysis); and an evaluation on ACAS Xu prototype DNNs.
- Verification targets: 45 ACAS Xu prototype DNNs, fully connected, 8 layers, 300 ReLU nodes each, with inputs being sensor data of the ownship and intruder (distance, angle, speed, etc.) and outputs being scores for 5 horizontal maneuver advisories.
What related research exists?
Related work includes early SMT verification of small networks, LP encodings for finding adversarial examples, discretization to prove robustness, and hybrid system analysis of ACAS X lookup tables.
SMT-based neural network verification
- Pulina and Tacchella [29, 30]—replace the sigmoid activation function with a piecewise-linear approximation, then call a black-box SMT solver, refining the approximation when spurious counterexamples are found. The paper points out that this method is difficult to scale and can only handle small networks with at most 20 hidden nodes.
LP-based adversarial example search
- Bastani et al. [3]—for DNNs with ReLU, given an input point x, encode the problem as a linear program and call a black-box LP solver to find local adversarial examples; they avoid the activation function problem by considering only a small neighborhood around x where all ReLU states are fixed. The paper points out that, as a result, it is unclear how to handle x lying on the ReLU activation/inactivation boundary, whereas Reluplex can be used for input domains where ReLUs have multiple possible states.
Discretization-based robustness verification
- Huang et al. [10]—for a specific input point x, discretize the infinite neighborhood into a finite set of points and propagate layer by layer to check label consistency, in order to prove local adversarial robustness. The paper points out that its UNSAT results hold only under the assumption that "the finite set of points correctly represents the infinite domain," and the authors state that their technique can guarantee that there are no hidden counterexamples between the discrete points.
Formal analysis of the ACAS X system
- Jeannin et al. [12]—use hybrid system techniques to analyze the ACAS X controller in lookup-table form, identifying safe input regions where collisions cannot occur. The authors express interest in future work combining that work with the technique of this paper to verify that following the DNN advisories indeed avoids collisions.
Comparison baselines and benchmarks: Section 6 compares Reluplex with the SMT solvers CVC4, Z3, Yices, MathSat and the LP solver Gurobi, with benchmarks being 8 simple satisfiable properties on 2 ACAS Xu networks (Table 1).
The authors position this paper as a verification method that makes no simplifying assumptions and treats the DNN as a whole, and the authors state that it can verify networks an order of magnitude larger than existing methods can analyze.
How does the paper address this problem?
Extending simplex to the theory TRR with the ReLU predicate: allowing ReLU pairs to temporarily violate the semantics, repairing them with update rules, splitting when necessary, and combining this with bound derivation, conflict analysis, and floating-point arithmetic.
Overall approach: encode the DNN and the property to be verified directly as a conjunction of atoms in the theory of reals and ReLU, and use the extended simplex algorithm Reluplex to decide its satisfiability; UNSAT means the property holds, and a SAT assignment is an input that violates the property.
Problem formalization
- Define the theory TRR: add the binary predicate ReLU to the signature of linear arithmetic over the reals TR, interpreted as ReLU(x, y) if and only if y = max(0, x); atoms in formulas are linear inequalities or applications of the ReLU predicate.
- Each ReLU node v is encoded as a pair of variables: a backward variable v b (connecting to the previous layer) and a forward variable v f (connecting to the next layer), and ReLU(v b, v f) is asserted (Figure 4).
- Appendix I proves that deciding whether a linear property ϕ is satisfiable on a DNN with ReLU is NP-complete (reduction from 3-SAT).
Reluplex derivation rules
- The configuration adds a set R of ReLU connections to the simplex ⟨B, T, l, u, α⟩; the simplex Pivot1, Pivot2, and Update rules are retained to handle out-of-bounds variables.
- New rules (Figure 5): Updateb and Updatef repair ReLU pairs that violate the semantics by updating the backward/forward variable respectively (requiring that variable to be non-basic); PivotForRelu pivots out a basic variable appearing in a ReLU so that it can be updated; ReluSplit splits on a ReLU with l(xi) < 0 且 u(xi) > 0, guessing it to be active (l(xi) := 0) or inactive (u(xi) := 0).
- ReluSuccess rule: return SAT when all variables are within bounds and all ReLU pairs satisfy α(xf) = max(0, α(xb)).
- Appendix II proves that the calculus is sound and complete; Appendix III gives a strategy that guarantees termination: prioritize repairing out-of-bounds variables, and split when the number of repairs to the same ReLU pair exceeds a fixed threshold.
Key implementation techniques (Section 4)
- Tighter bound derivation: use the two rules deriveLowerBound/deriveUpperBound to derive tighter variable bounds from the tableau equations; if l(xb) or l(xf) of a ReLU is strictly positive, fix it as active; when u(xb) < 0 则固定为非激活,无需拆分即可消除该 ReLU。
- 冲突分析:界推导发现 l(x) > u(x), multiple levels of nested splits can be undone at once (rather than only the previous level).
- Floating-point arithmetic: use double-precision floating point instead of exact arithmetic; measure accumulated rounding error every 5000 pivots, and when it exceeds 10⁻⁶, rebuild the current tableau from the initial tableau T0. The authors explicitly state that this technique only increases confidence and does not guarantee soundness.
- Appendix IV also discusses under-approximation: tightening variable intervals by ǫ may fix a ReLU to a certain state; solutions found are valid for the original problem, but infeasibility conclusions cannot be extrapolated.
Search strategy and parameters (Section 6)
- The implementation consists of three parts: a simplex engine (based on a modified GLPK open-source LP solver), a Reluplex engine (driving the search, bound derivation, ReLU pivots and updates), and a simple SMT core (splitting-on-demand).
- Strategy: first repair all out-of-bounds variables, then repair violated ReLUs; after each pivot, tighten bounds on the entering variable, and every few thousand pivots perform a more thorough bound tightening over the entire tableau.
- Split threshold: count the number of times each ReLU pair is processed by Updateb/Updatef/PivotForRelu, and split only when it reaches 5 (the authors state this number was determined empirically).
Success determination
- For each property, search for an input that violates it: UNSAT means the property holds, and a SAT assignment is a counterexample; local adversarial robustness is defined as: for all x′ satisfying ‖x − x′‖∞ ≤ δ, the network gives x and x′ the same label (in ACAS Xu, the same output score is lowest).
What experiments did the paper conduct?
Comparison with 4 SMT solvers and Gurobi, verification of 10 properties on 45 ACAS Xu networks, and testing of local adversarial robustness at 5 points × 5 δ.
Experimental Setup
- Verified objects: 45 ACAS Xu DNNs, fully connected, 8 layers (6 hidden layers), each with 300 ReLU nodes, 5 inputs and 5 outputs; indexed as Nx,y by the discrete combinations of aprev (5 values) and τ (9 values).
- Comparison solvers: SMT solvers CVC4, Z3, Yices, MathSat and LP solver Gurobi; the SMT/LP encoding of ReLU is given in Appendix V.
- Comparison instances: 8 simple satisfiable properties ϕ1…ϕ8 on 2 arbitrarily selected ACAS Xu networks, of the form x ≥ c (x is a fixed output variable), with a timeout limit of 4 hours.
- Property set: 10 quantitative properties φ1…φ10 (formal definitions in Appendix VI), e.g., φ1 requires that when the intruder is far and clearly slower than ownship, the COC score does not exceed 1500; φ5 requires that when the intruder approaches from the left, the "strong right" score is lowest.
- Metrics: solving time (seconds), SAT/UNSAT/TIMEOUT, Stack (maximum nested splitting depth, averaged over the tested networks), Splits (total number of splits).
- Robustness testing: 1 ACAS Xu network, 5 arbitrarily selected input points, 5 δ values (0.1, 0.075, 0.05, 0.025, 0.01).
Main Results
Table 1: Time (seconds) for each solver to solve the 8 instances, "-" indicates timeout without solving within 4 hours.
Swipe horizontally to read the table
Solver ϕ1 ϕ2 ϕ3 ϕ4 ϕ5 ϕ6 ϕ7 ϕ8 CVC4 - - - - - - - - Z3 - - - - - - - - Yices 1 37 - - - - - - MathSat 2040 9780 - - - - - - Gurobi 1 1 1 - - - - - Reluplex 8 2 7 7 93 4 7 9 - The authors attribute the SMT solvers' performance to the lack of direct support for ReLU and the use of exact arithmetic.
- The authors state that Gurobi's log shows: it can solve quickly when case-splitting is not needed, and times out when case-splitting is needed.
Table 2: Verification results for the 10 properties (UNSAT indicates the property holds).
Swipe horizontally to read the table
Property Number of networks Result Time (seconds) Stack Splits φ1 41 / 4 UNSAT / TIMEOUT 394517 47 1522384 φ2 1 / 35 UNSAT / SAT 463 / 82419 55 / 44 88388 / 284515 φ3 42 UNSAT 28156 22 52080 φ4 42 UNSAT 12475 21 23940 φ5 1 UNSAT 19355 46 58914 φ6 1 UNSAT 180288 50 548496 φ7 1 TIMEOUT — — — φ8 1 SAT 40102 69 116697 φ9 1 UNSAT 99634 48 227002 φ10 1 UNSAT 19944 49 88520 - The maximum nested splitting depth for all properties is below the total number of ReLU nodes, 300, based on which the authors state that Reluplex does not split most ReLUs.
- Negative results and exceptions: φ2 does not hold (SAT) on 35 of the 36 tested networks; the authors state that this was later determined to be acceptable behavior—the DNN tends to repeat the previous advisory, and if the previous advisory is not COC, a distant intruder may also receive a non-COC advisory. φ7 (do not advise a strong turn when vertical separation is large, tested on N1,9) times out; the authors state that the large input domain and this particular network are difficult to verify.
Counterexample Discovery (φ8)
- What was tested: on N2,9, "when vertical separation is large and the previous advisory is weak left, the network outputs COC or continues weak left".
- Result: SAT (40102 seconds), an input was found where the DNN is inconsistent with the lookup table.
- The authors state that this confirms the existence of the inconsistency already observed in simulation, and that this DNN will be fixed by retraining.
Local Adversarial Robustness (Table 3)
- What was tested: δ-local robustness of 5 arbitrary points × 5 δ values on 1 network; SAT indicates an adversarial input was found within the neighborhood, UNSAT indicates none exists.
- Results: point 1 is SAT at δ = 0.1, 0.075, 0.05, and UNSAT at δ = 0.025, 0.01; point 4 is SAT at δ = 0.1, 0.075, 0.05, and UNSAT at δ = 0.025, 0.01; points 2, 3, 5 are UNSAT at all 5 δ values. The total time for each row is 1064, 7394, 1452, 2810, 20462 seconds respectively.
- The authors state that combined with binary search over δ, the optimal δ can be approximated (e.g., the optimal δ for point 4 is between 0.025 and 0.05), and note that acceptable thresholds for different input points need to be set separately.
Other Ablations and Analysis
- Global adversarial robustness (encoding two side-by-side networks N1, N2, requiring that when ‖x1 − x2‖∞ ≤ δ, the corresponding output difference |p1 − p2| ≤ ǫ): the authors state that success was only proven on small networks, because the number of ReLU nodes doubles and the input domain is unbounded.
- Effect of bound derivation: the authors state that it was often observed that after splitting about 10% of the ReLU variables, bound derivation can eliminate all remaining ReLUs.
- Floating-point errors: most experiments required no more than two tableau restorations.
What are some points that can be further explored?
The authors list directions such as floating-point soundness, scalability, global robustness, and extension to other layers; the experiments cover only 45 ACAS Xu networks.
Limitations and future directions noted by the authors
- The tableau restoration technique for floating-point arithmetic does not guarantee soundness; the authors state that "providing true soundness when using floating-point arithmetic remains a future goal" (Section 4).
- Global adversarial robustness was only proven successfully on small networks; the authors leave improving the scalability of this technique as future work (Section 6).
- The authors plan to improve scalability: improve the engineering implementation, explore better strategies for applying Reluplex rules, and use more advanced conflict analysis to reduce case-splitting (Section 8).
- The authors plan to provide better soundness guarantees without harming performance, e.g., replaying floating-point solutions with exact arithmetic, or producing correctness proofs that can be externally checked (Section 8).
- The authors plan to extend the method to other types of layers, and conjecture that the mechanism used for ReLU can be used for other piecewise-linear layers such as max-pooling (Section 8).
- The authors express interest in combining the technique of this paper with the hybrid system analysis of Jeannin et al. [12] to verify that following the DNN advisories indeed avoids collisions (Section 7).
Scope of experiments
- The verified networks are 45 ACAS Xu DNNs, each with 8 layers, 300 ReLU nodes, fully connected; networks of other structures or in other domains are not covered (Sections 5, 6).
- Property verification covers 10 properties in total: φ1 tested on 45 networks (41 UNSAT, 4 TIMEOUT), φ3 and φ4 each tested on 42, φ2 tested on 36, φ5–φ10 each tested on 1; φ7 timed out without a conclusion (Table 2).
- The solver comparison was performed only on 2 arbitrarily selected networks and 8 simple satisfiable properties, with a timeout limit of 4 hours (Table 1).
- Local adversarial robustness was tested on 1 network, 5 arbitrary input points, and 5 δ values (Table 3).
- The paper does not report the number of repetitions for each experiment; the split threshold of 5 was determined empirically by the authors (Section 6).
Summarize the main content of the paper
Reluplex extends simplex to ReLU constraints and verified multiple safety properties on 45 ACAS Xu networks, each containing 300 ReLU nodes.
This is a DNN formal verification paper: the authors propose the SMT solver Reluplex, for the theory of linear arithmetic over the reals plus ReLU constraints, and evaluate it on prototype DNNs of the ACAS Xu unmanned aircraft collision avoidance system.
- Problem to solve: verification of DNNs with ReLU is an NP-complete problem; the authors state that general SMT/LP solvers cannot handle it experimentally, existing specialized tools can only verify small networks with at most about 20 hidden nodes, and previous methods also need to approximate the problem as a convex problem.
- Method highlights: encode each ReLU node as a backward/forward variable pair, extend simplex so that ReLU pairs can temporarily violate the semantics, repair them with Updateb/Updatef/PivotForRelu, and split with ReluSplit when necessary; combine with bound derivation (which can fix ReLU states without splitting), conflict analysis, and floating-point arithmetic with error monitoring; the split threshold is set to 5 repairs of the same ReLU pair.
- Comparison results: on 8 simple properties of 2 ACAS Xu networks, Reluplex solved all of them (8–93 seconds), CVC4 and Z3 solved none, Yices and MathSat each solved 2, and Gurobi solved 3 (Table 1).
- Property verification: of the 10 properties, 8 reached a conclusion (Table 2); φ2 does not hold on 35 of 36 networks, which the authors state is acceptable behavior reflecting the DNN's bias toward repeating the previous advisory; on φ8 a counterexample was found where the DNN is inconsistent with the lookup table; φ7 times out.
- Robustness: local adversarial robustness was tested on 1 network, 5 points × 5 δ values, of which 2 points were proven robust at small δ and adversarial inputs were found at large δ, and 3 points were robust at all δ values (Table 3).
- Authors' conclusion: the authors state that the success on ACAS Xu networks shows the technique has potential for verifying real-world DNNs and can handle networks an order of magnitude larger than existing methods; they also acknowledge that floating-point arithmetic does not guarantee soundness and that global robustness succeeded only on small networks, and list scalability, soundness guarantees, and extension to layers such as max-pooling as future directions.