MixSATGEN: Learning Graph Mixing for SAT Instance Generation

Xinyan Chen, Yang Li, Runzhong Wang, Junchi Yan

Introduction

The Boolean Satisfiability Problem (SAT) is the "gold standard" for NP-complete tasks, with massive implications for hardware verification, planning, and cryptography. However, researchers face a persistent "data scarcity" problem: real-world SAT instances are hard to come by, yet they are essential for training modern machine-learning-based solvers and tuning the hyperparameters of traditional ones.

Existing SAT generators usually fall into two traps. First, hand-crafted methods often fail to capture the nuanced global structures of real-world problems. Second, learning-based construction methods—which build instances from scratch—often produce "trivial" instances that are solved in milliseconds, even when trained on "hard" data. This happens because these models frequently create repetitive, conflicting substructures that lead to small, easily identifiable "unsatisfiable cores."

To address this, researchers have introduced MixSATGEN, a novel framework for generating hard SAT instances by "mixing" existing ones. By treating SAT instances as bipartite graphs and using a learned matching-and-mixing pipeline, it interpolates between reference instances to produce new data that preserves both complex structural patterns and computational hardness.

Methodology: Graph Interpolation

MixSATGEN moves away from construction and toward graph interpolation. Instead of building a graph from nothing, it takes two existing SAT instances and "mixes" them.

Overview of the MixSATGEN framework, illustrating the graph matching and mixing pipeline.

The process follows a two-stage pipeline:

  1. Graph Matching: The model represents SAT instances as Literal-Clause Graphs (LCG). It uses a Graph Neural Network (GNN) to extract features for every literal. It then computes a correspondence map between the variables of two different instances. To make this process robust and differentiable, the authors employ the Gumbel-Sinkhorn algorithm, which allows the model to learn the best way to align two different logic problems.
  2. Graph Mixing: Once the variables are aligned, the model iteratively exchanges pairs of clauses between the two instances. It selects clauses with the highest "correspondence scores" (meaning they fit well into the other graph's structure) until a target replacement ratio is reached.

A critical addition to this pipeline is Gumbel noise. The authors found that adding a controlled amount of randomness during the matching phase prevents the "hardness degradation" seen in other models, essentially keeping the resulting logic puzzle difficult to solve.

Key Insights and Ideas

Interpolation Over Construction

By modifying existing "real" graphs rather than generating new ones from a latent distribution, the model naturally inherits the complex structural priors (like community structure) of the reference data.

Graph distribution illustrating the interpolation between reference instances.

The Hardness Paradox

Counter-intuitively, making a generator "smarter" at finding similarities can make the resulting instances easier because it creates predictable conflicts. Introducing moderate randomness via Gumbel noise is the "secret sauce" that maintains computational hardness, preventing the solver from finding trivial shortcuts.

Datasets and Key Results

The authors evaluated MixSATGEN using real-world benchmarks from SATLIB (a classic benchmark library) and the SAT Competition 2021 (modern, high-difficulty instances). They categorized these into EASY (solved in <1s by the CaDiCaL solver) and HARD (requiring substantial solving time) to test how well the generator preserves difficulty.

  • Hardness Maintenance: MixSATGEN significantly outperformed previous learning-based generators (like G2SAT and GCN2S) in maintaining solving time. While other generators often produced instances solved in under a second, MixSATGEN's outputs remained challenging for modern solvers.
  • Structural Resemblance: The generated instances closely matched the reference data across metrics like modularity and clustering coefficients.
  • Speed: Because the model isn't building a graph node-by-node, it is significantly faster than previous state-of-the-art generators—roughly 2000x faster at the generation phase than G2SAT.
  • Practical Utility: The authors used MixSATGEN-generated instances to tune the hyperparameters of the Kissat solver. This tuning resulted in a 50% reduction in solver runtime on test instances, proving the generated data is high-quality enough for real-world engineering tasks.

Limitations and Future Work

The primary limitation of MixSATGEN is scalability. The graph matching process involves constructing an affinity matrix, which becomes computationally expensive (memory-wise) as the number of variables and clauses grows into the tens of thousands. Currently, the method is best suited for instances with hundreds of variables and thousands of clauses.

Future work includes scaling the matching algorithm to handle massive industrial-scale SAT instances and exploring how this "mixing" approach could be used as a data augmentation technique for training end-to-end neural SAT solvers.

Summary updated

BibTeX
@inproceedings{chen2024mixsatgen,
  author = {Xinyan Chen and Yang Li and Runzhong Wang and Junchi Yan},
  title = {{MixSATGEN: Learning Graph Mixing for SAT Instance Generation}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=PXXuLvIH5r},
}
Figure