Abstract
There have been recent efforts for incorporating Graph Neural Network models for learning full-stack solvers for constraint satisfaction problems (CSP) and particularly Boolean satisfiability (SAT). Despite the unique representational power of these neural embedding models, it is not clear how the search strategy in the learned models actually works. On the other hand, by fixing the search strategy (e.g. greedy search), we would effectively deprive the neural models of learning better strategies than those given. In this paper, we propose a generic neural framework for learning CSP solvers that can be described in terms of probabilistic inference and yet learn search strategies beyond greedy search. Our framework is based on the idea of propagation, decimation and prediction (and hence the name PDP) in graphical models, and can be trained directly toward solving CSP in a fully unsupervised manner via energy minimization, as shown in the paper. Our experimental results demonstrate the effectiveness of our framework for SAT solving compared to both neural and the state-of-the-art baselines.
Introduction
Constraint Satisfaction Problems (CSPs), particularly Boolean Satisfiability (SAT), are fundamental to combinatorial optimization. While classical solvers like Glucose have achieved remarkable efficiency through decades of hand-crafted heuristics, these heuristics are often either too general or fail to exploit the specific structural nuances of diverse problem domains, such as hardware verification or scheduling.
Recent "neural solvers" have attempted to bridge this gap using Graph Neural Networks (GNNs). However, these models typically face two significant hurdles: a heavy reliance on large supervised datasets of solved instances and a lack of clarity regarding their internal search strategies. By restricting these models to simple greedy search, researchers may inadvertently prevent them from discovering more efficient, non-obvious strategies. The PDP framework addresses these challenges by reframing CSP solving as a dynamic, learned process on a factor graph.
The PDP Framework: Propagation, Decimation, and Prediction
The PDP framework treats solving a CSP as an iterative process involving three core operations that mimic and extend classical probabilistic inference:
- Propagation: This step utilizes neural message passing where messages are represented as vectors in a latent space, serving as a neural version of algorithms like Belief Propagation.
- Decimation: Unlike classical decimation, which involves "hard" variable assignments, PDP employs a stateful, learned transformation using Recurrent Neural Networks (GRUs or LSTMs). This allows the model to "softly" alter messages while maintaining a memory of previous steps, enabling the discovery of complex search trajectories.
- Prediction: A final layer produces "soft" assignments (probabilities) for each variable based on the current state of the graph.
Unsupervised Training via Energy Minimization
A key innovation of PDP is its unsupervised training regime. Instead of requiring ground-truth solutions, the model is trained via energy minimization. The authors define an energy function based on the negative log-probability of constraint satisfaction. By using a differentiable "smooth max" proxy for logical disjunctions (OR gates), gradients can flow through the SAT formula. This allows the model to train on an infinite stream of unlabeled, randomly generated formulas, learning to minimize the degree to which constraints are violated.
Experimental Evaluation and Results
The framework was evaluated on uniform random k-SAT and "pseudo-industrial" modular k-SAT benchmarks. PDP demonstrated a remarkable ability to scale, handling 100-variable problems with ease, whereas previous models like NeuroSAT struggled to scale effectively beyond 20 variables.
As shown in Figure 1, PDP significantly outperforms classical inference-based algorithms like Survey Propagation (SP) and the Reinforce algorithm. On uniform 4-SAT problems, PDP performed on par with Glucose, a top-tier industrial solver, within a 3-second timeout. Furthermore, the model exhibits strong domain adaptation; when trained on modular data (mimicking real-world industrial structures), it significantly outperformed versions trained on uniform data when tested on modular problems. This confirms the framework's ability to "pick up" on structural patterns inherent in specific domains.
Conclusion and Future Work
PDP represents a significant step forward for neural CSP solvers, proving that powerful solvers can be trained without supervision by discovering domain-specific search strategies. While highly optimized Conflict-Driven Clause Learning (CDCL) solvers like Glucose still maintain an edge in certain complex modular scenarios, PDP's ability to learn non-greedy search trajectories and adapt to problem structure opens new avenues for combinatorial optimization. Future research will focus on integrating neural backtracking to undo suboptimal decisions and scaling the framework to the millions of variables found in industrial hardware verification tasks.
Summary updated