Training machine learning models to solve combinatorial problems like Boolean Satisfiability (SAT) usually requires a massive amount of "labeled" data. This presents a frustrating chicken-and-egg dilemma: getting those labels requires solving the very NP-complete problems we want the ML models to help us solve.
While Deep Learning—specifically Graph Neural Networks (GNNs)—has shown promise in speeding up combinatorial optimization solvers, computing thousands of solved instances for hard problems is computationally exhausting or even impossible. This paper introduces a contrastive learning framework that uses label-preserving augmentations to learn powerful representations from unlabeled data. The approach matches supervised performance with 100x fewer labels and shows superior transferability to new, larger problem domains.
The Problem with Standard Augmentations
The researchers tackle a fundamental question: How can we learn the underlying structure of combinatorial problems without needing the answers upfront?
Self-supervised "contrastive learning" has revolutionized computer vision by teaching models that a cropped or rotated image of a cat is still a cat. However, applying this to logic is tricky. In a SAT formula, flipping a single bit or removing one constraint can instantly turn a "Satisfiable" (SAT) problem into an "Unsatisfiable" (UNSAT) one. Standard data augmentations used in graphs (like dropping random nodes or edges) are "label-agnostic." For combinatorial problems, these standard tweaks act as label noise, destroying the logical properties the model needs to learn and confusing the system by implying two logically different problems are the same.
A Tailored Contrastive Framework
To solve this, the authors propose a contrastive learning framework tailored specifically for SAT, shifting from Label-Agnostic Augmentations (LAAs) to Label-Preserving Augmentations (LPAs).
The framework takes an unlabeled SAT instance and creates two different "views" of it using LPAs. These views are passed through a GNN encoder (NeuroSAT, which treats the SAT formula as a bipartite graph of literals and clauses). The model is trained to maximize the similarity between representations of the same instance while minimizing similarity with different instances.
Instead of random graph tweaks, the LPAs use subroutines from classical logic solvers that are mathematically guaranteed to preserve the satisfiability of a formula. These include:
- Clause Resolution (CR): Combining two clauses to derive a new, logically implied one.
- Variable Elimination (VE): Systematically removing variables while maintaining the formula's logic.
- Subsumed Clause Elimination (SC): Removing redundant constraints.
Key Insights and Results
The study evaluates the method across four distinct SAT generators: SR (standard random), PR (power random), and two "pseudo-industrial" generators, DP and PS, which mimic the structural properties found in real-world engineering problems.
The shift to LPAs yielded dramatic improvements in representation quality and efficiency:
- Massive Accuracy Gains: When using linear evaluation (testing the quality of frozen representations), LPAs achieved up to 97% accuracy. In stark contrast, standard graph augmentations (LAAs) hovered around 54-70%, which is barely better than a coin flip in some scenarios.
- 100x Label Efficiency: On multiple datasets, the contrastive model trained with only 100 labels matched or exceeded the performance of a fully supervised model trained on 10,000 labels.
- Hard Positives Matter: Simply adding a few clauses isn't enough. The best results came from combining Clause Resolution with Subsumed Clause Elimination. This forces the model to recognize the same logical problem even when its "surface" appearance is significantly altered, creating "hard positives" that drive better feature learning.
- Superior Transferability: Surprisingly, the self-supervised representations transferred to larger, unseen problem types better than fully supervised models. Supervised models tend to overfit to the specific "shortcuts" or biases in their training labels, whereas contrastive learning learns the general "language" of SAT.
Limitations and Future Work
While highly effective, the current work focuses heavily on SAT. The authors suggest these principles could apply to Mixed-Integer Linear Programming (MILP) via "cuts" or to Vertex Cover via "dominant vertices," but these remain to be experimentally validated.
Additionally, while LPAs are computationally cheaper than solving the problem entirely, complex augmentations like Variable Elimination can still introduce overhead if not carefully bounded. Future work will need to explore how well these representations hold up on true industrial-scale instances with millions of variables, where even "cheap" augmentations might become bottlenecks.
Summary updated