Abstract
We propose a new abstraction refinement procedure based on machine learning to improve the performance of nonlinear constraint solving algorithms on large-scale problems. The proposed approach decomposes the original set of constraints into smaller subsets, and uses learning algorithms to propose sequences of abstractions that take the form of conjunctions of classifiers. The core procedure is a refinement loop that keeps improving the learned results based on counterexamples that are obtained from partial constraints that are easy to solve. Experiments show that the proposed techniques significantly improve the performance of state-of-the-art constraint solvers on many challenging benchmarks. The mechanism is capable of producing intermediate symbolic abstractions that are also important for many applications and for understanding the internal structures of hard constraint solving problems.
The Scalability Wall in Nonlinear Constraint Solving
In domains ranging from robotics and program analysis to hardware design, engineers frequently encounter Constraint Satisfaction Problems (CSPs). These problems require finding variable assignments that satisfy a set of requirements—for instance, determining if a self-driving car can navigate to a goal without collision while adhering to complex physics equations.
When these constraints involve nonlinear or transcendental functions (such as $sin$ or $exp$), the computational complexity often grows exponentially with the number of variables. Standard solvers like z3 or dReal eventually hit a "scalability wall," making it difficult to apply formal methods to large-scale, real-world engineering problems. The challenge lies in scaling these solvers without sacrificing mathematical rigor.
Methodology: Learning to Simplify
The researchers propose a framework that integrates machine learning with formal logic through a Counterexample-Guided Abstraction Refinement (CEGAR) loop. The core idea is to replace complex, difficult-to-solve constraints with simpler "abstractions" that are easier for solvers to process.
The Pipeline
- Decomposition: Large constraint sets are broken down into smaller, manageable subsets based on variable sharing (Hamming distance).
- Sampling: The system samples points to identify regions that satisfy or violate the constraints.
- Learning Abstractions: A specialized Semi-soft SVM learns a geometric "envelope" around the constraints.
- Antecedents (Under-approximations): Simpler regions entirely within the valid space. Finding a point here proves satisfiability.
- Consequents (Over-approximations): Simpler regions that contain the entire valid space. Proving this region empty proves unsatisfiability.
- Refinement and Boosting: If an abstraction is too coarse, the system identifies "counterexamples" to retrain the SVM. If a single linear or quadratic classifier is insufficient, the system uses "boosting" to create an intersection of multiple classifiers for a tighter fit.
Key Insights: Asymmetry and Simplicity
A critical innovation is the Semi-soft SVM. Unlike standard SVMs that balance errors on both sides of a boundary, logic-based abstractions require "one-sided" errors. For an over-approximation, the classifier must ensure it never excludes a valid point, even if it includes some invalid ones. Furthermore, the method prioritizes simplicity over precision; a simple quadratic shell that bounds a complex curve is often sufficient for a solver to reach a conclusion in milliseconds.
Evaluation and Results
The approach was tested on several benchmarks, including path planning for a Dubins car (Car Reachability), FPGA design, and high-dimensional Sphere Packing.
Performance Gains
- Scalability: In the "Randomized Spheres" benchmark, the abstraction-based approach maintained steady performance as the constraint count reached $6 \times 10^4$, whereas the standard
dRealsolver's runtime grew significantly. - Speed: On the "Hong Family" benchmarks, solving time after abstraction was approximately 133ms, compared to nearly 1800ms for raw solvers.
- Dimensionality: The method remained effective in high-dimensional spaces (up to 15 dimensions) where traditional symbolic methods like cylindrical algebraic decomposition typically fail.
Conclusion and Future Work
By "learning to simplify," this framework allows state-of-the-art solvers to tackle problems that were previously computationally out of reach. Future research will focus on improving decomposition heuristics and addressing the "sampling curse" that occurs as the number of variables in individual subsets increases.
Summary updated