General Method for Solving Four Types of SAT Problems

Anqi Li, Congying Han, Tiande Guo, Haoran Li, Bonan LiarXiv 2023 · DOI · arXiv

Introduction

Boolean Satisfiability (SAT) is a foundational NP-complete problem with numerous practical applications. Over time, several specialized variants have emerged to handle different constraints: MaxSAT (maximizing satisfied clauses), Weighted MaxSAT (maximizing total weight), Partial MaxSAT (handling hard and soft constraints), and Weighted Partial MaxSAT (WPMS). While specialized solvers exist for each, they often lack generality—a solver optimized for standard SAT may perform poorly on WPMS. This paper introduces DCSAT, a unified framework designed to solve all four types efficiently within a single mathematical and algorithmic structure.

The DCSAT Framework

The authors propose a three-stage pipeline that transforms diverse SAT problems into a reinforcement learning (RL) task.

Overview of the DCSAT pipeline, showing the transition from a SAT problem to a Binary Linear Programming (BLP) model, and finally to a Monte Carlo Tree Search (MCTS) solver.
  1. Unified Mathematical Encoding: All SAT variants are converted into Binary Linear Programming (BLP). By adjusting objective function coefficients, the framework represents weights and hard/soft constraints in a consolidated format.
  2. SAT Tableaux (State Representation): To facilitate RL, the current state of variable assignments is represented using "SAT Tableaux." This compact format, inspired by the simplex method, serves as the input for the search algorithm.
  3. Monte Carlo Tree Search (MCTS): The search space is navigated as a binary tree of variable assignments. DCSAT uses a modified Upper Confidence Bound for Trees (UCT) with a "soft max" relaxation ($\alpha$) to balance exploration and exploitation.

Encoding and Representation

The core of DCSAT's generality lies in its ability to map raw SAT instances into a structured state representation suitable for sequential decision-making.

Detailed view of the transformation process from a .wcnf input instance to a Transformed BILP and the resulting SAT Tableaux state representation.

As shown in the figure above, the input instance (e.g., in .wcnf format) is first translated into a BILP. This model is then converted into a matrix-based state representation ($z, w, b, A_y, y^T$) that captures the relationships between variables and constraints, allowing the MCTS agent to evaluate the potential reward of different assignment paths.

Key Results and Insights

DCSAT was evaluated against specialized solvers like sat4j and CCEHC2akms on benchmarks including SATLIB and the 2016 Max-SAT Evaluation.

  • Superior Generality: On the Max-SAT Evaluation, while sat4j solved only 10 instances, DCSAT solved all 1,166. It also outperformed CCEHC2akms, which solved 865 instances.
  • Theoretical Guarantees: Using the Wiener-Khinchin law of large numbers, the authors prove that DCSAT will identify every optimal Boolean assignment as the number of explorations approaches infinity.
  • Multi-Solution Discovery: Unlike many solvers that stop at the first optimal solution, DCSAT can discover multiple diverse "pivot paths" that yield the same maximum objective value, which is useful for generating high-quality training data for other models.

Limitations and Future Work

While DCSAT offers unprecedented generality, the computational overhead of MCTS can be higher than hand-tuned local search heuristics for specific instances. Future work aims to integrate Deep Neural Networks (DNNs) to approximate search policies and value functions, potentially accelerating the decision-making process. Additionally, the authors plan to extend this BLP-to-RL approach to other combinatorial optimization domains.

Summary updated

Abstract

Existing methods provide varying algorithms for different types of Boolean satisfiability problems (SAT), lacking a general solution framework. Accordingly, this study proposes a unified framework DCSAT based on integer programming and reinforcement learning (RL) algorithm to solve different types of SAT problems such as MaxSAT, Weighted MaxSAT, PMS, WPMS. Specifically, we first construct a consolidated integer programming representation for four types of SAT problems by adjusting objective function coefficients. Secondly, we construct an appropriate reinforcement learning models based on the 0-1 integer programming for SAT problems. Based on the binary tree search structure, we apply the Monte Carlo tree search (MCTS) method on SAT problems. Finally, we prove that this method can find all optimal Boolean assignments based on Wiener-khinchin law of large Numbers. We experimentally verify that this paradigm can prune the unnecessary search space to find the optimal Boolean assignments for the problem. Furthermore, the proposed method can provide diverse labels for supervised learning methods for SAT problems.
BibTeX
@misc{li2023general,
  author = {Anqi Li and Congying Han and Tiande Guo and Haoran Li and Bonan Li},
  title = {{General Method for Solving Four Types of SAT Problems}},
  year = {2023},
  eprint = {2312.16423},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.16423},
}
Figure