A Structure-Based Variable Ordering Heuristic for SAT

Jinbo Huang, Adnan DarwicheIJCAI 2003

Abstract

We propose a variable ordering heuristic for SAT, which is based on a structural analysis of the SAT problem. We show that when the heuristic is used by a Davis-Putnam SAT solver that employs conflict-directed backtracking, it produces a divide-and-conquer behavior in which the SAT problem is recursively decomposed into smaller problems that are solved independently. We discuss the implications of this divide-and-conquer behavior on our ability to provide structure-based guarantees on the complexity of Davis-Putnam SAT solvers. We also report on the integration of this heuristic with ZChaff—a state-of-the-art SAT solver—showing experimentally that it significantly improves performance on a range of benchmark problems that exhibit structure.

Introduction

The Boolean Satisfiability (SAT) problem is a fundamental NP-complete problem with critical applications in hardware verification, artificial intelligence, and formal methods. Modern solvers typically rely on the Davis-Putnam (DP) procedure, whose efficiency is heavily influenced by the variable ordering heuristic—the strategy used to select the next variable for assignment. While dynamic heuristics like VSIDS are effective at capturing local conflict information, they often overlook the global structural properties of the problem instance. This paper introduces a heuristic that leverages structural analysis to recursively decompose a problem into independent sub-problems.

Methodology: Decomposition Trees and Cutsets

The core of the proposed approach is a structural analysis that enables a divide-and-conquer search strategy. This is achieved through the use of Decomposition Trees (dtrees). A dtree is a binary tree where each leaf corresponds to a clause in the SAT theory. Internal nodes represent clusters of clauses, and each node is associated with a cutset—the set of variables shared between its left and right subtrees that have not been assigned by ancestor nodes.

Example of a decomposition tree (dtree) where internal nodes represent variable cutsets that partition the problem.

By selecting variables from the cutsets in a top-down manner (starting from the root), the solver systematically decomposes the SAT problem into independent sub-problems. This structural ordering, when combined with conflict-directed backtracking, ensures that the solver avoids redundant work in unrelated components of the search space. This synergy allows the search process to mimic a recursive decomposition algorithm, providing theoretical complexity guarantees linked to the problem's treewidth.

Experimental Evaluation

The heuristic was integrated into the ZChaff solver to create Dtree-ZChaff. The performance was evaluated against standard ZChaff across a variety of structured and random benchmarks. Structured instances included Pigeonhole problems, FPGA routing, and URQ benchmarks, while random instances were drawn from the UF250 suite.

Performance comparison across various benchmarks, highlighting significant speedups on structured unsatisfiable (UNSAT) problems.

The results demonstrate that Dtree-ZChaff provides substantial performance gains on structured problems. For instance, on the Pigeonhole benchmark, Dtree-ZChaff reduced the total solving time from 7,368 seconds to 944 seconds—a nearly 8-fold improvement. Similar gains were observed in FPGA-UNSAT and URQ instances. The heuristic was most effective on "structured" unsatisfiable problems, whereas on random 3-SAT or very simple problems, the overhead of generating the dtree outweighed the search benefits.

Key Insights and Conclusion

The primary contribution of this work is the formalization of search as a recursive decomposition process. By leveraging the inherent structure of SAT instances through dtrees, solvers can achieve a divide-and-conquer behavior that is both theoretically grounded and practically efficient.

However, the approach is not without limitations. The overhead of generating a high-quality dtree via hypergraph partitioning can be significant, sometimes exceeding the solve time for simpler or less structured problems. Furthermore, the heuristic offers minimal benefits for random SAT instances, which lack the small cutsets necessary for effective decomposition. Future work may involve implementing component caching for satisfiable sub-results to further enhance the solver's efficiency. In summary, structure-based variable ordering transforms SAT solving from a heuristic-driven search into a more predictable engineering discipline, offering a powerful tool for tackling complex, structured real-world problems.

Summary updated

BibTeX
@inproceedings{huang2003structure,
  author = {Jinbo Huang and Adnan Darwiche},
  title = {{A Structure-Based Variable Ordering Heuristic for SAT}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2003},
  url = {https://openreview.net/forum?id=ByWcPQM_-B},
}
Figure