330 likes | 344 Views
Formal Models of Heavy-Tailed Behavior in Combinatorial Search. Hubie Chen, Carla P. Gomes, and Bart Selman {hubes,gomes,selman}@cs.cornell.edu Department of Computer Science Cornell University. Background. Randomized backtrack search methods demonstrate high variability of run time
E N D
Formal Models of Heavy-Tailed Behavior in Combinatorial Search Hubie Chen, Carla P. Gomes, and Bart Selman {hubes,gomes,selman}@cs.cornell.edu Department of Computer Science Cornell University
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)
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.
Intuition • 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.
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)
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
Empirical Evidence • of Heavy-Tailed Behavior
Quasigroups or Latin Squares:An Abstraction for Real World Applications Quasigroup or Latin Square (Order 4) A quasigroup is an n-by-n matrix such that each row and column is a permutation of the same n colors 32% preassignment Gomes and Selman 96
Time: 7 11 30 (*) (*) (*)no solution found - reached cutoff: 2000 Randomized Backtrack Search Easy instance – 15 % preassigned cells Gomes et al. 97
2000 500 Erratic Behavior of Search CostQuasigroup Completion Problem 3500! sample mean Median = 1! number of runs
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...
Power Law Decay Exponential Decay Standard Distribution (finite mean & variance) Decay of Distributions Standard Exponential Decay e.g. Normal: Heavy-Tailed Power Law Decay e.g. Pareto-Levy:
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 variance 18% unsolved (1-F(x))(log) Unsolved fraction 0.002% unsolved =>Infinite mean Number backtracks (log)
70% unsolved 1-F(x) Unsolved fraction 0.001% unsolved 250 (62 restarts) Number backtracks (log) 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)
Tree Search Models: • Balanced Tree Model
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
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
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)
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:
Balanced Tree Model • 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.
Tree Search Models: Imbalanced Tree Model
Imbalanced Tree Model • Algorithm requires time b^i • with probability (1-p)p^i • Intuition: lower p corresponds to “smarter” search b=2 Let T denote the runtime of the algorithm: the number of leaf nodes visited up to and including the successful node.
Imbalanced Tree Model:Three Regimes of Behavior (see paper for formal proofs) • 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
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
Bounded Imbalanced Tree Model: Three Regimes of Behavior (see paper for formal proofs) • Regime 1: • polynomial expected time, polynomial variance • Regime 2: • polynomial expected time, exponential variance • Regime 3: • exponential expected time, exponential variance Restart strategy - Expected polynomial time
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.
Demos, papers, etc. www.cs.cornell.edu/hubeswww.cs.cornell.edu/gomesCheck also:www.cis.cornell.edu/iisi