SAT-Encodings, Search Space Structure, and Local Search Performance

Holger H. Hoos

Abstract

This paper challenges the intuition that smaller search spaces are always better for solving hard combinatorial problems. By comparing "compact" versus "sparse" SAT-encodings, the author demonstrates that while compact encodings use fewer variables, they create "flatter" search landscapes with complex local minima that significantly hinder Stochastic Local Search (SLS) performance.

Introduction

Stochastic Local Search (SLS) algorithms, such as WalkSAT, are highly efficient at solving Propositional Satisfiability (SAT) problems. Researchers often translate other hard problems (like scheduling or planning) into SAT to leverage these solvers. However, a major open question remains: how should we encode these problems? Common wisdom suggests minimizing the number of variables to keep the search space small (a "compact" encoding). This paper investigates whether that's actually true and explores how the structural properties of the resulting search space—not just its size—dictate how fast an algorithm can find a solution.

Encoding Strategies and Search Space Features

The author compares two primary encoding strategies:

  1. Sparse Encoding: Each possible value for a variable in the original problem gets its own propositional variable in SAT (similar to one-hot encoding). This results in more variables but simpler constraints.
  2. Compact Encoding: Values are represented binarily using a logarithmic number of propositional variables. This drastically reduces the search space size but creates more complex, tightly coupled constraints.

To understand why one performs better than the other, the study measures three search space features: solution density, ruggedness ($sdnclu$), and local minima branching ($blmin$). High ruggedness usually helps local search "feel" the gradient toward a solution, while high branching suggests a "flat" region where it's easy to get lost in loops.

Table 1: Quantitative comparison of search space features for sparse and compact encodings. Note the significantly higher local minima branching (blmin) in compact encodings.

Key Results and Insights

Smaller Isn't Always Faster

Compact encodings reduce the search space size, but they make the "landscape" much harder to navigate. They produce "flatter" search spaces with fewer clear paths to the global minimum. WalkSAT performed roughly 7 times slower on compact encodings compared to sparse encodings, despite the compact versions having fewer variables.

The "Branching" Trap and Syntactic Overhead

Compact encodings lead to much higher local minima branching ($blmin$). In these regions, the algorithm spends more time wandering through plateaus and is more likely to get stuck in non-deterministic loops. Beyond the search space structure, compact encodings are computationally "heavier." Because variables are more tightly coupled in clauses, flipping a single variable affects more constraints, increasing the CPU time required for every single step of the search.

SAT vs. Native Solvers

Even though SAT is a "generic" representation, SAT-based solvers were only slightly slower than highly specialized, native CSP solvers. This suggests that the availability of hyper-optimized SAT implementations often outweighs the benefits of a domain-specific solver.

Figure 3: Correlation between the hardness of instances for the SAT solver Novelty and the native Tabu Search solver.

As shown in Figure 3, there is a very strong correlation ($r = 0.95$ to $0.98$) between the hardness of an instance in its native form and its hardness when encoded into SAT. If a problem is "inherently" hard, encoding it differently won't easily hide that difficulty.

Conclusion

The research demonstrates that encoding efficiency is not merely a matter of minimizing variables. The structural properties of the search landscape, particularly the prevalence of flat regions (branching), play a dominant role in local search performance. Future work should focus on designing SAT solvers that can detect and exploit specific features of an encoding's search space and developing new encoding strategies that find a "sweet spot" between being sparse enough to search easily and compact enough to fit in memory.

Summary updated

BibTeX
@inproceedings{hoos1999sat,
  author = {Holger H. Hoos},
  title = {{SAT-Encodings, Search Space Structure, and Local Search Performance}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1999},
}
Figure