On the fundamentals of gradient-based SAT solvers

Nikolaos Karalias, Saku Peltonen, Nikita Kostin, Stefanie JegelkaNeurIPS 2026

TL;DR

Trying to solve discrete logic puzzles (SAT) using smooth gradient descent sounds like trying to climb a staircase on rollerblades, yet neural networks and continuous optimizers do it surprisingly well. This paper pulls back the curtain on why gradient-based SAT solvers succeed or fail, uniting direct continuous optimization and neural SAT solvers under one mathematical roof. By diagnosing how formula symmetries trap gradients—and showing how standard SAT preprocessing tricks can break those traps—the authors provide a foundational playbook for differentiable logic solving.

What Problem Does This Paper Address?

Boolean Satisfiability (SAT)—finding True/False assignments to variables so a logical formula evaluates to True—is the quintessential hard discrete problem. Traditionally, it is ruled by specialized, discrete algorithms. Recently, however, researchers have thrown differentiable programming and Graph Neural Networks (GNNs) at SAT, relaxing binary choices into continuous probabilities and rolling down the loss landscape via gradient descent.

While empirical approaches have proliferated, the field lacks a unified theoretical compass. When does descending a smooth landscape actually land on a discrete, valid solution? How do symmetries in a logic puzzle paralyze gradient descent or blind a GNN? And how does rewriting a logically equivalent formula warp the continuous optimization landscape? This paper tackles these foundational questions.

Methods

The authors introduce a unified framework that views both direct gradient descent (optimizing variable probabilities directly) and neural-parametrized gradient descent (optimizing the weights of a neural network that outputs those probabilities) through the same lens.

  • The Standard Surrogate: Each Boolean variable is assigned a continuous probability $p_i \in [0, 1]$ of being True. The loss function is the expected number of violated clauses under independent coin flips—a smooth multilinear polynomial.
  • Theoretical Diagnostics (New): The authors derive exact conditions ("certified basins") guaranteeing when projected gradient descent will monotonically march toward a satisfying assignment. They also map out "invariant subspaces" using the 1-Weisfeiler-Leman (1-WL) graph coloring algorithm—a standard yardstick for GNN expressivity—to prove how symmetries trap both direct gradients and message-passing GNNs.
The variable–clause graph for the n = 3 exactly-one formula, where automorphic variable nodes create a diagonal symmetry trap.
  • Repurposing Transformations (New): To escape these symmetry traps and reshape the loss landscape, the authors repurpose classic, logic-preserving SAT preprocessing routines—like unit propagation (UP), unit-literal augmentation (AU), clause resolution (CR), and subsumed clause elimination (SC)—using them as landscape modulators and data augmentations for self-supervised GNNs (including a custom symmetry-breaking architecture, $\text{GNN}_{\text{WalkSAT}}$).

Datasets

Rather than introducing brand-new problem types, the authors evaluate their theory on synthetic symmetric benchmarks and established neural SAT suites:

  • Symmetric Diagnostic Families: Parity-one XOR cycles, cnfxorcard, and "exactly-one" CNF formulas (where literally only one variable can be True), designed specifically to stress-test symmetry traps and initialization boundaries.
  • G4SATBench Families: Instances generated using their own code following the standard G4SATBench benchmark families (covering 7 problem classes such as 3-sat, SR, CA, PS, k-Clique, k-Domset, and k-Vercov across Easy, Medium, and Hard splits).

Key Insights and Ideas

  • Hidden Equivalence: The expected violated-clause objective is mathematically identical (up to scaling and shifting) to the Walsh-Fourier expansion objectives popularized in continuous solvers like FourierSAT. Furthermore, it acts as a union bound on the true probability of unsatisfiability, becoming exact if and only if every pair of clauses clashes on at least one variable's sign (a "hitting CNF").
  • From Initialization Traps to Architectural Walls: In an "exactly-one" puzzle, all variables look identical. If you initialize direct gradient descent symmetrically, all variables receive identical updates forever, trapped on a diagonal with zero solutions. A biased initialization frees direct gradient descent. However, for a standard 1-WL GNN, this trap becomes architectural: because message passing cannot tell symmetric nodes apart, the network is forced to output identical probabilities regardless of initialization or optimizer.
  • Logical Equivalence $\neq$ Optimization Equivalence: Adding redundant clauses or unit literals doesn't change whether a puzzle is solvable, but it drastically alters continuous smoothness, loosens the union bound, and breaks graph symmetries. For instance, adding just $O(\log m)$ random unit literals (AU) allows a 1-WL GNN to uniquely identify nodes with high probability!

Key Results

  • Exact Certificate Boundaries: On $n=50$ XOR cycle and "exactly-one" puzzles, the authors' theoretical convergence condition cleanly separates initializations that solve the puzzle from those that fail. Furthermore, adding unit-literal augmentations (GNN + AU) breaks the 1-WL barrier, allowing a trapped GNN to successfully find one-hot solutions across $n=10$ to $50$.
Figure 2: Initialization, symmetry, and augmentation diagnostics. The left part shows certified-basin boundary diagnostics for the n = 50 parity-one XOR cycle (top) and exactly-one CNF (bottom). Blue points round to satisfying assignments and red points do not. The right part reports whether each method converges to a one-hot assignment on the original EO variables.
  • Simplification Wins in Direct GD: Across G4SATBench families, stripping away redundant structure helps direct gradient descent. Compared to a simplified baseline (mean final objective $4.91$), formulas bloated with unit literals ($19.15$), resolvents ($5.85$), or subsumed clauses ($5.09$) optimize noticeably worse.
  • Parametrization Power: While a basic 1-WL GNN ($\text{GNN}_{\text{Base}}$) struggles to beat simple Sigmoid GD on G4SATBench, the symmetry-breaking $\text{GNN}_{\text{WalkSAT}}$ consistently achieves the lowest unsatisfied clause counts across nearly all Easy, Medium, and Hard benchmarks.
  • Free Data Efficiency: In scarce-data self-supervised training, replacing half of a 200- or 400-instance training set with transformed copies nearly matches the performance of collecting fresh data on 3-sat, and dramatically outperforms both unaugmented training and random (non-label-preserving) augmentations on symmetric cnfxorcard instances.

Limitations and Future Work

  • Sufficient, Not Necessary: The convergence certificates guarantee success inside specific basins, but gradient descent can still succeed outside them; a complete characterization of convergence remains open.
  • No Silver Bullet: Formula transformations are double-edged swords—an operation that breaks a symmetry barrier for a GNN might simultaneously worsen landscape smoothness for direct gradient descent.
  • Exact Arithmetic vs. Reality: The symmetry-trapping theorems assume exact math. Over long runs in finite floating-point precision, tiny numerical rounding errors can accumulate and accidentally nudge symmetric trajectories apart.
  • Future Directions: The authors highlight analyzing hybrid learning-augmented discrete solvers and studying how entirely different SAT encodings warp the continuous optimization process as exciting next steps.

Summary updated

Abstract

Gradient-based methods have received increasing attention for Boolean satisfiability, both in neural-network-based solvers and broadly as continuous local search techniques. In this work, we provide a deeper understanding of the interplay of optimization process, problem structure, common formula transformations and neural network properties. Our unified view treats both direct gradient descent over variable marginals and neural-parametrized gradient descent as instances of the same continuous SAT framework. We show that its objective, the expected number of unsatisfied clauses under independent variable marginals, equals (up to constant shift) the clausewise Fourier objective commonly used in continuous SAT methods, and characterize its relation to the exact product-measure probability of unsatisfiability. Then, we derive convergence conditions for gradient descent. A central theme is symmetry: gradient descent can become trapped in invariant subspaces induced by formula symmetries. To remedy this, we show that formula transformations commonly used as SAT preprocessing tools can be repurposed to modulate the optimization landscape. We analyze their effect on problem structure, smoothness, tightness, and expressivity barriers of the neural network. Empirically, across several benchmarks, these transformations can improve gradient-descent performance. Our experiments also indicate that transformations can improve data efficiency and inference-time performance in self-supervised neural SAT solving. Finally, we demonstrate that neural-parametrized gradient descent can improve over input-space gradient descent across several datasets.
BibTeX
@inproceedings{karalias2026fundamentals,
  author = {Nikolaos Karalias and Saku Peltonen and Nikita Kostin and Stefanie Jegelka},
  title = {{On the fundamentals of gradient-based SAT solvers}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=CMd4XXXt1U},
}
Figure