Learning Branching Heuristics for Propositional Model Counting

Pashootan Vaezipoor, Gil Lederman, Yuhuai Wu, Chris J. Maddison, Roger B. Grosse, Sanjit A. Seshia, Fahiem Bacchus

Introduction

Propositional model counting (#SAT) is the task of determining the exact number of satisfying assignments for a Boolean formula. As a #P-complete problem, it is significantly more challenging than standard SAT and serves as a critical component in probabilistic inference, planning under uncertainty, and formal verification. Modern solvers like SharpSAT typically employ the DPLL search algorithm, where the choice of branching variable at each step is governed by hand-crafted heuristics. While these heuristics are generally effective, they often fail to leverage the unique structural patterns inherent in specific problem domains.

The Neuro# Framework

Neuro# addresses this limitation by replacing traditional heuristics with a deep learning-based "brain." The framework represents Boolean formulas as Literal-Clause Incidence Graphs (LIGs) and processes them using a Graph Neural Network (GNN). Through message passing, the GNN computes embeddings that capture both local and global structural context for each variable.

To train the model, the authors utilize Evolution Strategies (ES) rather than standard Reinforcement Learning. ES optimizes network weights by mutating them and evaluating performance based on the total number of search steps. This approach is highly parallelizable and robust to the long horizons and sparse rewards typical of SAT solving. For temporal problems like planning, Neuro# incorporates time-step features into variable embeddings to preserve sequential semantics.

Learned Strategies and Generalization

A key strength of Neuro# is its ability to learn sophisticated, domain-specific strategies. In cellular automata tasks, the GNN autonomously discovered a strategy of branching on variables starting from the "known" final state and working backward row-by-row—a method similar to how a human expert would manually decompose the problem.

Learned branching patterns for Cellular Automata (Rule 110) instances. Neuro# learns to branch systematically, mirroring human-expert strategies by working backward from known states.

Furthermore, Neuro# exhibits impressive "upward generalization." Models trained on small, easily solvable instances (e.g., 10x5 grids) successfully generalized to much larger, industrial-scale problems (e.g., 12x14 grids), indicating that the network learns the underlying logic of the problem family rather than memorizing specific instances.

Performance and Wall-Clock Speedups

The primary challenge in applying GNNs to SAT solving is the computational overhead; querying a neural network is significantly slower than executing a C++ heuristic. To be practical, the GNN must reduce the search tree size superlinearly. Neuro# achieves this, providing over a 70x reduction in branching decisions on Grid World domains.

Cactus plots comparing search steps and wall-clock time for Neuro# and SharpSAT. Neuro# achieves significant step reductions that translate into real-time speedups for harder instances.

As shown in the performance metrics, while Neuro# may be slower on very easy problems due to overhead, it becomes increasingly superior as problem complexity grows. On large-scale instances, the "intelligence" of the GNN-driven branching leads to substantial wall-clock speedups, solving in seconds what takes vanilla solvers minutes. In extreme cases, the model provided a 613x improvement in decision efficiency.

Conclusion and Future Work

Neuro# demonstrates that deep learning can provide practical, real-world speedups for #SAT by learning problem-specific structure. By successfully generalizing from tiny training examples to massive industrial-scale instances, it overcomes the traditional performance gap between neural and symbolic solvers. Future work includes migrating the GNN implementation to native C++/TensorRT for further acceleration and integrating ML into other solver components like clause learning and component caching.

Summary updated

BibTeX
@inproceedings{vaezipoor2021learning,
  author = {Pashootan Vaezipoor and Gil Lederman and Yuhuai Wu and Chris J. Maddison and Roger B. Grosse and Sanjit A. Seshia and Fahiem Bacchus},
  title = {{Learning Branching Heuristics for Propositional Model Counting}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i14.17474},
}
Figure