Gaussian Elimination Meets Maximum Satisfiability

Mate Soos, Kuldeep S. Meel

Abstract

Maximum Satisfiability (MaxSAT) is a critical optimization framework for artificial intelligence, yet traditional solvers struggle with the linear structures found in XOR constraints. This paper presents GaussMaxHS, the first MaxSAT solver to integrate native Gaussian Elimination (GE) at every level of the search process. By efficiently processing XOR constraints as linear equations rather than Conjunctive Normal Form (CNF) clauses, GaussMaxHS achieves substantial performance gains—frequently reaching 10x to 100x speedups—on complex benchmarks such as discrete integration and network reliability.

Introduction

Maximum Satisfiability (MaxSAT) involves finding an assignment that satisfies the maximum weight of a given set of constraints. It is a fundamental tool for tasks ranging from probabilistic inference to automated planning. While standard SAT solvers have successfully integrated Gaussian Elimination to handle XOR constraints, MaxSAT solvers have historically lacked this capability.

When XOR constraints—common in "discrete integration" tasks used to calculate solution space weights—are translated into CNF, solvers lose the underlying linear algebraic structure. This translation often leads to an exponential explosion in the number of clauses, causing traditional solvers to stall. GaussMaxHS addresses this "linear blind spot" by augmenting the state-of-the-art MaxHS solver with a native, multi-level GE module.

The core innovation of GaussMaxHS is the seamless integration of Gaussian Elimination into the MaxSAT search tree. Unlike previous approaches that only applied GE at the top level, GaussMaxHS executes linear reasoning at every node of the search process. Key technical components include:

Dual Matrix System

To efficiently track implications and conflicts without expensive recomputations, the solver maintains two distinct matrices: the S-matrix and the R-matrix. The S-matrix is kept in an upper-triangular form to facilitate rapid unit propagation. Simultaneously, the R-matrix tracks the relationship between the current rows and the original constraints, which is essential for generating conflict clauses when a contradiction is identified.

The dual matrix system (S and R) used to track propagations and generate conflict clauses.

Optimization and Hardware Efficiency

  • Soft XOR Transformation: Soft XOR constraints (which can be violated for a penalty) are transformed into hard XORs linked to soft unit clauses. This allows the GE engine to treat all XORs uniformly as linear equations.
  • Matrix Partitioning: The solver performs a component search to break large matrices into smaller, independent sub-matrices. Because GE complexity is cubic relative to matrix size, solving multiple small matrices is significantly more efficient.
  • Hardware Acceleration: The matrices are stored in a bit-packed, interlaced format. This allows the solver to use SIMD (Single Instruction, Multiple Data) instructions to perform row operations on multiple bits simultaneously, reducing GE time by up to a third.

Experimental Evaluation

The performance of GaussMaxHS was evaluated against the baseline MaxHS solver using a massive suite of 9,628 benchmarks. These benchmarks were derived from two real-world domains: Spin Glass Models (statistical physics) and Network Reliability (calculating connectivity probabilities in US city power grids during failures). These instances were generated by the WISH algorithm, a leading tool for discrete integration that relies heavily on XOR constraints.

Results and Discussion

GaussMaxHS demonstrated a clear superiority over the original MaxHS solver. Within a 5,000-second timeout, GaussMaxHS solved 6,120 benchmarks, compared to 5,473 by the baseline.

Cactus plot showing the number of solved instances over time for MaxHS and GaussMaxHS.

The performance gap widened significantly as the number of XOR constraints increased. On many complex instances, GaussMaxHS was 10x to 100x faster than the baseline. This confirms that native GE support effectively resolves the bottlenecks traditional solvers face when encountering linear structures, allowing the solver to "see" implications that would take a CNF-based solver thousands of steps to deduce.

Conclusion

GaussMaxHS represents a significant advancement in MaxSAT solving by bridging the gap between logic-based search and linear algebra. By re-introducing Gaussian Elimination into the search process, the solver overcomes the inherent limitations of CNF translations for XOR-heavy problems. While future work aims to integrate even more advanced architectures, the current implementation provides a powerful new tool for discrete integration and infrastructure reliability analysis.

Summary updated

BibTeX
@inproceedings{soos2021gaussian,
  author = {Mate Soos and Kuldeep S. Meel},
  title = {{Gaussian Elimination Meets Maximum Satisfiability}},
  booktitle = {KR},
  year = {2021},
  doi = {10.24963/kr.2021/55},
}
Figure