CP Formal Models of Heavy-Tailed Behavior in Combinatorial Search Hubie Chen, Carla P. Gomes, and Bart Selman Department of Computer Science Cornell University
CP Background Randomized backtrack search methods demonstrate high variability of run time (relative to fixed instance): Heavy-tailed behavior (Gomes et. al. CP ‘97, JAR ‘00) New insights into the the design of search algorithms restart strategies Randomization and restart strategies are now an integral part of state-of-the-art SAT Solvers (Chaff, GRASP, RELSAT, SATZ-Rand)
CP Goals Our goals: Formal analysis of tree search models: show under what conditions heavy-tailed distributions can and cannot arise. Understand when restart strategies are/are not effective. Research on heavy-tails in search thus far largely based on empirical studies.
CP IntuitionIntuition How does heavy-tailed behavior arise? The procedure is characterized by a large variability, which leads to highly different trees from run to run. Wrong branching decisions may lead the search procedure to explore exponentially large subtrees of the search space containing no solutions. A lucky sequence of good branching decisions may lead the search to find a solution after exploring only a small subtree.
CP Intuition Pump: Restarts When are restarts effective? Suppose a search procedure requires (on inputs of size n): Time p(n) (for a polynomial p) with probability ½ Time 2^n with probability ½ No restarts: expected time exponential: equal to ½ * (p(n) + 2^n) Restart with time interval p(n): expected time drops to polynomial: equal to 2*p(n)
CP Outline of Talk Empirical evidence of Heavy-Tailed behavior Tree Search Models Balanced Tree Search Model Imbalanced Tree Search Model Bounded Heavy-Tailed Behavior: finite distributions
CP Empirical Evidence of Heavy-Tailed Behavior
CP Quasigroups or Latin Squares: An Abstraction for Real World Applications Quasigroup or Latin Square (Order 4) 32% preassignment Gomes and Selman 96 A quasigroup is an n-by-n matrix such that each row and column is a permutation of the same n colors
CP Randomized Backtrack Search (*) no solution found - reached cutoff: 2000 Time:(*)3011(*)7 Easy instance – 15 % preassigned cells Gomes et al. 97
CP Median = 1! sample mean 3500! Erratic Behavior of Search Cost Quasigroup Completion Problem number of runs
CP Heavy-Tailed Distributions
CP Heavy-Tailed Distributions Infinite variance, infinite mean Introduced by Pareto in the 1920’s --- “probabilistic curiosity.” Mandelbrot established the use of heavy-tailed distributions to model real-world fractal phenomena. Examples: stock-market, earthquakes, weather, web traffic...
CP Decay of Distributions Standard Exponential Decay e.g. Normal: Heavy-Tailed Power Law Decay e.g. Pareto-Levy: Power Law Decay Standard Distribution (finite mean & variance) Exponential Decay
CP Visualization of Heavy Tailed Behavior Log-log plot of tail of distribution should be approximately linear. Slope gives value of infinite mean and infinite variance infinite mean and infinite variance infinite variance infinite variance Number backtracks (log) (1-F(x))(log) Unsolved fraction => Infinite mean 18% unsolved 0.002% unsolved
CP Exploiting Heavy-Tailed Behavior Heavy Tailed behavior has been observed in several domains: QCP, Graph Coloring, Planning, Scheduling, Circuit synthesis, Decoding, etc. Consequence for algorithm design: Use restarts or parallel / interleaved runs to exploit the extreme variance performance. Restarts provably eliminate heavy-tailed behavior (Gomes et al. 2000) 70% unsolved 1-F(x) Unsolved fraction Number backtracks (log) 250 (62 restarts) 0.001% unsolved
CP Tree Search Models: Balanced Tree Model
CP Balanced Tree Model, Described Trees All leaves occur at the same depth Branching factor 2 Exactly one “satisfying” leaf Search algorithm Chronological backtrack search model Random child selection with no propagation mechanisms
CP Balanced Tree Model: Analysis Let denote the runtime: number of leaf nodes visited (including “satisfying” leaf), on tree of depth n. Let denote choice at (unique) node above satisfying leaf at depth i : 1 = bad choice, 0 = good choice Then, There is exactly one choice of zero-one assignments to the variables for each possible value of T(n); any such assignment has probability T(n) has an uniform distribution. T=4 T=64
CP Balanced Tree Model: Distribution The expected run time and variance scale exponentially, in the height of the search tree (number of variables); The run time distribution is uniform -- shape not heavy tailed. (see paper for formal proofs)
CP Balanced Tree Model: Restarts Restart strategies are not effective for this model: no restart strategy with expected polynomial time. Define a restart strategy to be a sequence of times Applied to a search procedure by running procedure for time ; restarting and running for time, etc., until solution found. Luby et al. (IPL ‘93) show that optimal performance (minimum expectation) obtained by a purely uniform restart strategy:
CP What sort of improvements can be made to an algorithm so that behavior not like backtrack in balanced tree model? Very clever search heuristics that lead quickly to the solution node - but that is hard in general Combination of pruning, propagation, dynamic variable ordering: prune subtrees that do not contain the solution, allowing for runs that are short. Resulting trees may vary dramatically from run to run. Balanced Tree Model
CP Tree Search Models: Imbalanced Tree Model
CP Imbalanced Tree Model Algorithm requires time b^i with probability (1-p)p^i Intuition: lower p corresponds to “smarter” search Let T denote the runtime of the algorithm: the number of leaf nodes visited up to and including the successful node. b=2
CP Imbalanced Tree Model
CP Imbalanced Tree Model: Three Regimes of Behavior Regime 1: finite expected time, finite variance Regime 2: finite expected time, infinite variance Regime 3: infinite expected time, infinite variance Tail: when we have (see paper for formal proofs)
CP Bounded Imbalanced Tree Model
CP Bounded Imbalanced Tree Model Unbounded model Single infinite distribution. Bounded model Infinite number of distributions, one for each n. Arises from truncating successively larger finite segments of unbounded distribution. Given that: We define: with
CP Bounded Imbalanced Tree Model: Three Regimes of Behavior Regime 1: polynomial expected time, polynomial variance Regime 2: polynomial expected time, exponential variance Regime 3: exponential expected time, exponential variance (see paper for formal proofs) Restart strategy - Expected polynomial time
CP Bounded Heavy-Tailed Behavior
CP Balanced, Unbounded, and Imbalanced Trees
CP Conclusions
CP Conclusions Heavy-tailed behavior yields insight into backtrack search methods, providing an explanation for the effectiveness of restart strategies. Tree Search Models: can be analyzed rigorously. Balanced Tree Search Model Uniform distribution (not heavy-tailed); restarts are not effective Imbalanced Tree Search Model (Bounded/Unbounded) Heavy-tailed; restarts are effective Consequence for algorithm design: aim for strategies which have highly asymmetric distributions.
CP Check also: Check also: Demos, papers, etc.