NeuroBack: Improving CDCL SAT Solving using Graph Neural Networks

Wenxi Wang, Yang Hu, Mohit Tiwari, Sarfraz Khurshid, Kenneth McMillan, Risto Miikkulainen

Overview

Propositional satisfiability (SAT) is a fundamental NP-complete problem, essential for applications ranging from software verification to hardware design. Most modern solvers rely on the Conflict-Driven Clause Learning (CDCL) algorithm, which uses heuristics to decide which variable to branch on and what initial value (true or false) to assign it.

While researchers have attempted to use Graph Neural Networks (GNNs) to improve these heuristics, they have consistently hit a major practicality wall. Previous neural approaches required frequent "online" inferences—querying a model thousands of times while the solver is running. This creates a massive computational bottleneck, often requiring a cluster of GPUs just to keep up with a single CPU-based solver. NeuroBack addresses this by shifting neural inference to a one-time offline step, eliminating the need for expensive GPU resources during solving while significantly boosting the performance of state-of-the-art solvers like Kissat.

The NeuroBack Approach

The core innovation of NeuroBack is offline model inference. Instead of querying a model constantly during the search process, NeuroBack queries it exactly once at the very start.

NeuroBack overall workflow
  1. Graph Representation: The framework converts a SAT formula (in Conjunctive Normal Form, or CNF) into a bipartite graph. To solve the problem of "long-distance" communication in large graphs, the authors introduce meta nodes that connect to all clause nodes. This effectively shrinks the graph's diameter and allows information to flow more efficiently during message passing.
Graph representation with meta nodes
  1. Architecture: NeuroBack utilizes a hybrid "Graph Transformer" architecture. It combines a GNN subnet to capture local structure with a Transformer subnet using both Graph Self-Attention (GSA) and Local Self-Attention (LSA). This design keeps memory usage linear rather than quadratic, making it feasible for large-scale formulas.
  2. Phase Prediction: The model is trained to predict the "backbone" of a formula—variables that must take a specific value in every satisfying assignment.
  3. Integration: These predictions are used to initialize the "phase saving" heuristic in the Kissat solver. If the model is highly confident in a prediction, the solver starts with that predicted value.

The DataBack Dataset

To train the model effectively, the authors introduced a massive new dataset called DataBack, containing 120,286 labeled formulas.

  • Sources: It aggregates problems from CNFgen, SATLIB, model counting competitions (MCC), and various SAT Competitions (2004–2021).
  • Data Augmentation: To solve the label imbalance problem—where some variables are more likely to be true than false in the training set—they created "dual formulas" by negating all backbone variables. This ensures a perfect 50/50 balance for training.

Key Insights

  • The Power of the Backbone: The authors hypothesize that the knowledge required to identify strictly constrained backbone variables generalizes well to identifying "important variables" (those that hold the same value in most satisfying assignments).
  • One-and-Done Inference: A single, static prediction at the start is enough to provide a significant "warm start" for the solver, bypassing the need for GPUs during the actual search process.
  • Structural Efficiency: By using meta nodes and a specialized linear-complexity Transformer, the authors addressed the two biggest hurdles of GNNs for SAT: the "over-smoothing" problem in deep graphs and the "memory explosion" problem in large formulas.

Results and Performance

The researchers implemented their approach in a tool called NeuroBack-Kissat and tested it against the default Kissat solver and a version with randomized initial phases.

  • Increased Solving Capacity: On the SATCOMP-2022 dataset, NeuroBack solved 5.2% more problems than the base solver. On SATCOMP-2023, it solved 7.4% more problems.
  • Efficiency: The average inference time on a CPU was only 1.7 seconds, a negligible overhead compared to the 5,000-second time limit typically allowed in competitions.
  • Hardware Independence: Unlike previous neural solvers that required multiple GPUs to run in parallel, NeuroBack runs entirely on standard CPUs once the model is trained.

Limitations and Future Work

While NeuroBack is a major step toward practical neural SAT solving, the authors note a few areas for improvement:

  • Data Dependency: Training the GNN still requires a massive, diverse dataset. The model's performance is inherently tied to how well the training data represents the target problems.
  • Static vs. Dynamic: Currently, the predictions are only used as an initial setting. Performance could potentially be higher if these neural insights were integrated dynamically, such as re-applying predictions during the solver's "rephasing" stages.
  • Memory Limits: For extremely large formulas (hundreds of megabytes), the graph representation can still hit memory limits, requiring a size threshold for when to apply the neural enhancement.

Summary updated

BibTeX
@inproceedings{wang2024neuroback,
  author = {Wenxi Wang and Yang Hu and Mohit Tiwari and Sarfraz Khurshid and Kenneth McMillan and Risto Miikkulainen},
  title = {{NeuroBack: Improving CDCL SAT Solving using Graph Neural Networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=samyfu6G93},
}
Figure