torchmSAT: A GPU-Accelerated Approximation To The Maximum Satisfiability Problem

Abdelrahman Hosny,Sherief Reda
2024-02-06
Abstract:The remarkable achievements of machine learning techniques in analyzing discrete structures have drawn significant attention towards their integration into combinatorial optimization algorithms. Typically, these methodologies improve existing solvers by injecting learned models within the solving loop to enhance the efficiency of the search process. In this work, we derive a single differentiable function capable of approximating solutions for the Maximum Satisfiability Problem (MaxSAT). Then, we present a novel neural network architecture to model our differentiable function, and progressively solve MaxSAT using backpropagation. This approach eliminates the need for labeled data or a neural network training phase, as the training process functions as the solving algorithm. Additionally, we leverage the computational power of GPUs to accelerate these computations. Experimental results on challenging MaxSAT instances show that our proposed methodology outperforms two existing MaxSAT solvers, and is on par with another in terms of solution cost, without necessitating any training or access to an underlying SAT solver. Given that numerous NP-hard problems can be reduced to MaxSAT, our novel technique paves the way for a new generation of solvers poised to benefit from neural network GPU acceleration.
Artificial Intelligence
What problem does this paper attempt to address?
### What problem does this paper attempt to solve? This paper aims to solve the **Maximum Satisfiability Problem (MaxSAT)**, which is a classic combinatorial optimization problem. Specifically, the author proposes a new method to approximately solve the MaxSAT problem, which utilizes neural networks and GPU acceleration techniques. #### Background of the MaxSAT Problem - **Satisfiability (SAT) Problem**: Given a set of Boolean variables and logical clauses (usually represented in Conjunctive Normal Form, CNF), determine whether there exists an assignment such that all clauses are true. - **Maximum Satisfiability (MaxSAT) Problem**: When the formula is unsatisfiable, the goal of the MaxSAT problem is to find an assignment such that as many clauses as possible are true. The MaxSAT problem is very important in many practical applications because it can model optimization scenarios where a certain degree of constraint violation is allowed. #### Limitations of Existing Methods Existing MaxSAT solvers are mainly divided into two categories: 1. **Complete Methods**: Such as the Branch and Bound algorithm. These methods guarantee to find the optimal solution through exhaustive search. 2. **Incomplete Methods**: Such as local search algorithms. Although these methods cannot guarantee the optimal solution, they can find high - quality solutions in a relatively short time. Existing methods usually rely on SAT solvers as core components, and they evaluate and update the clauses in the formula by iteratively calling SAT solvers to reduce the number of unsatisfied clauses. However, this method has the following limitations: - It needs to call SAT solvers frequently, which is less efficient. - It depends on labeled data or the training phase, which increases complexity and computational cost. #### The Solution Proposed in the Paper The author proposes a novel MaxSAT solver named **torchmSAT**, with the following main features: 1. **Single Differentiable Function**: By relaxing binary constraints and representing Boolean variables as values in the continuous domain, a single differentiable function is constructed to approximately solve the MaxSAT problem. 2. **Neural Network Architecture**: A novel neural network architecture is designed, which can directly encode MaxSAT instances and gradually optimize variable assignments through back - propagation. 3. **No Need for Training Data or SAT Solvers**: The entire solving process does not require labeled data or calling the underlying SAT solvers, and the training process itself is the solving process. 4. **GPU Acceleration**: Make full use of the computing power of the GPU to accelerate the solving process, enabling the solver to traverse the feasible solution space in a shorter time. #### Experimental Results The experimental results show that torchmSAT outperforms two existing MaxSAT solvers on multiple challenging MaxSAT instances, and is comparable to another solver in terms of solution quality. In addition, through GPU acceleration, torchmSAT can explore the solution space more quickly, further improving the solving efficiency. In conclusion, this paper proposes a brand - new MaxSAT solving method based on neural networks and GPU acceleration, which is expected to bring new breakthroughs in the field of combinatorial optimization.