[Paper Review] Can $Q$-Learning with Graph Networks Learn a Generalizable Branching Heuristic for a SAT Solver?
This paper proposes Graph-Q-SAT, a reinforcement learning-based branching heuristic for CDCL SAT solvers using graph neural networks (GNNs) and deep Q-learning. It achieves 2-3x reduction in iterations over VSIDS by learning from problem structure, generalizes to 5x larger and unsatisfiable instances, and shows data efficiency and zero-shot transfer, demonstrating strong potential for scalable, generalizable heuristic learning in SAT solving.
We present Graph-$Q$-SAT, a branching heuristic for a Boolean SAT solver trained with value-based reinforcement learning (RL) using Graph Neural Networks for function approximation. Solvers using Graph-$Q$-SAT are complete SAT solvers that either provide a satisfying assignment or proof of unsatisfiability, which is required for many SAT applications. The branching heuristics commonly used in SAT solvers make poor decisions during their warm-up period, whereas Graph-$Q$-SAT is trained to examine the structure of the particular problem instance to make better decisions early in the search. Training Graph-$Q$-SAT is data efficient and does not require elaborate dataset preparation or feature engineering. We train Graph-$Q$-SAT using RL interfacing with MiniSat solver and show that Graph-$Q$-SAT can reduce the number of iterations required to solve SAT problems by 2-3X. Furthermore, it generalizes to unsatisfiable SAT instances, as well as to problems with 5X more variables than it was trained on. We show that for larger problems, reductions in the number of iterations lead to wall clock time reductions, the ultimate goal when designing heuristics. We also show positive zero-shot transfer behavior when testing Graph-$Q$-SAT on a task family different from that used for training. While more work is needed to apply Graph-$Q$-SAT to reduce wall clock time in modern SAT solving settings, it is a compelling proof-of-concept showing that RL equipped with Graph Neural Networks can learn a generalizable branching heuristic for SAT search.
Motivation & Objective
- To develop a data-efficient, generalizable branching heuristic for SAT solvers using reinforcement learning.
- To replace or improve upon hand-crafted heuristics like VSIDS without relying on domain expertise.
- To evaluate whether graph neural networks can enable generalization across SAT problem sizes and types.
- To investigate zero-shot transfer and wall-clock time improvements in SAT solving.
- To demonstrate the feasibility of combining GNNs with value-based RL for symbolic reasoning tasks.
Proposed method
- Uses a graph representation of CNF formulas, with variables as nodes and clauses as edges, enabling permutation and variable relabeling invariance.
- Employs a Graph Neural Network (GNN) as a function approximator to estimate Q-values for state-action pairs in Q-learning.
- Trains the model via deep Q-learning (DQN-style) using a binary reward signal: +1 for solving, -1 for failing to solve within a limit.
- Interfaces with the MiniSat solver to enable environment interaction and policy learning during search.
- Uses a simple state representation based on variable degrees and clause counts, avoiding complex feature engineering.
- Modifies only the branching heuristic of a CDCL solver, preserving completeness and correctness.
Experimental results
Research questions
- RQ1Can Q-learning with GNNs learn a branching heuristic that generalizes across SAT problem instances of varying sizes?
- RQ2Does the learned heuristic outperform the standard VSIDS heuristic in terms of iteration count and wall-clock time?
- RQ3Can the model generalize to unsatisfiable (unSAT) instances and to problems significantly larger than those in the training distribution?
- RQ4Does the model exhibit zero-shot transfer when tested on a different task family than the one used for training?
- RQ5How data-efficient is the training process, and can performance be achieved with minimal data, such as a single problem instance?
Key findings
- Graph-Q-SAT reduces the number of iterations required to solve SAT problems by 2-3x compared to VSIDS on training distributions.
- The model generalizes to unsatisfiable (unSAT) instances, achieving similar iteration reductions as for satisfiable problems.
- It generalizes to problems with up to 5 times more variables than in the training set, maintaining performance gains.
- Reduced iteration counts translate to wall-clock time reductions on larger problems, indicating practical performance benefits.
- The method exhibits positive zero-shot transfer when tested on a different task family than the one used for training.
- Training on a single SAT problem instance still yields measurable improvements, demonstrating high data efficiency.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.