MHQ-SAT: An End-to-End SAT Solver with a Multi-Head Hierarchical Query Mechanism

Authors

  • Yingyu Shi

DOI:

https://doi.org/10.54691/w97q1928

Keywords:

Boolean Satisfiability Problem, Graph Neural Networks, End-to-End Solving, Multi-Head Query, Hierarchical Attention.

Abstract

The Boolean Satisfiability Problem (SAT), as a representative NP-complete problem, plays a crucial role in integrated circuit verification, automated reasoning, and combinatorial optimization. In recent years, end-to-end SAT solvers based on graph neural networks (GNNs) have alleviated the reliance on handcrafted heuristics by learning the structural relationships between variables and clauses. However, existing neural SAT solvers with query-based mechanisms typically rely on a single query perspective, which limits their ability to capture diverse reasoning paths within complex constraint structures. As a result, their reasoning stability and generalization performance on large-scale instances remain insufficient. To address these limitations, this paper proposes MHQ-SAT, an end-to-end SAT solving model based on a multi-head hierarchical query mechanism. Built upon the QuerySAT framework, MHQ-SAT introduces a multi-head variable query mechanism and clause-level hierarchical attention modeling. By constructing multiple query perspectives in parallel, the proposed model enhances the expressive capacity of implicit reasoning processes. Meanwhile, a clause-level attention mechanism is employed to dynamically characterize the relative importance of different clauses during reasoning, enabling the model to focus on critical constraint structures. Furthermore, MHQ-SAT integrates query-driven clause updates with gated variable update mechanisms, achieving efficient information interaction between variables and clauses as well as stable iterative reasoning. Extensive experiments on randomly generated 3-SAT and k-SAT benchmarks demonstrate that MHQ-SAT consistently outperforms NeuroSAT, QuerySAT, and other baseline methods across various variable scales and reasoning step settings. In particular, on medium- and large-scale SAT instances, MHQ-SAT exhibits superior robustness and reasoning stability in terms of solution accuracy and the proportion of unsolved instances. Ablation studies further validate the effectiveness of the multi-head query mechanism and clause-level hierarchical modeling in improving overall performance. These results indicate that the proposed multi-head hierarchical query mechanism provides an effective and learnable reasoning enhancement paradigm for end-to-end SAT solving.

Downloads

Download data is not yet available.

References

[1] Alyahya, Tasniem Nasser, Mohamed El Bachir Menai, and Hassan Mathkour. "On the structure of the boolean satisfiability problem: a survey." ACM Computing Surveys (CSUR) 55.3 (2022): 1-34.

[2] Qian, Yuhang, et al. "X-SAT: An Efficient Circuit-Based SAT Solver." 2025 62nd ACM/IEEE Design Automation Conference (DAC). IEEE, 2025.

[3] Ivančić, Franjo, et al. "Efficient SAT-based bounded model checking for software verification." Theoretical Computer Science 404.3 (2008): 256-274.

[4] Holden, Sean B. "Machine learning for automated theorem proving: Learning to solve SAT and QSAT." Foundations and Trends® in Machine Learning 14.6 (2021): 807-989.

[5] Nieuwenhuis, Robert, Albert Oliveras, and Cesare Tinelli. "Solving SAT and SAT modulo theories: From an abstract Davis--Putnam--Logemann--Loveland procedure to DPLL (T)." Journal of the ACM (JACM) 53.6 (2006): 937-977.

[6] Cai, Shaowei, and Xindi Zhang. "Deep cooperation of CDCL and local search for SAT." International Conference on Theory and Applications of Satisfiability Testing. Cham: Springer International Publishing, 2021.

[7] Markidis, Stefano. "The old and the new: Can physics-informed deep-learning replace traditional linear solvers?." Frontiers in big Data 4 (2021): 669097.

[8] Liang, Fan, et al. "Survey of graph neural networks and applications." Wireless Communications and Mobile Computing 2022.1 (2022): 9261537.

[9] Mejia-Lavalle, Manuel, et al. "Modified Neural Net for the Boolean Satisfiability Problem." 2015 International Conference on Mechatronics, Electronics and Automotive Engineering (ICMEAE). IEEE, 2015.

[10] Selsam, Daniel, et al. "Learning a SAT solver from single-bit supervision." arXiv preprint arXiv:1802.03685 (2018).

[11] Chukharev, Konstantin, et al. "Effective Partitioning Method with Predictable Hardness for CircuitSAT." IEEE Access (2025).

[12] Zhang, Yu, et al. "DiffSAT: Differential MaxSAT Layer for SAT Solving." Proceedings of the 43rd IEEE/ACM International Conference on Computer-Aided Design. 2024.

[13] Ozolins, Emils, et al. "Goal-aware neural SAT solver." 2022 International joint conference on neural networks (IJCNN). IEEE,

Downloads

Published

28-02-2026

Issue

Section

Articles