380 likes | 584 Views
Switching Among Non-Weighting, Clause Weighting, and Variable Weighting in Local Search for SAT. Wanxia Wei 1 , Chu Min Li 2 , and Harry Zhang 1 1 Faculty of Computer Science, University of New Brunswick, Canada 2 MIS, Universit'e de Picardie Jules Verne, France. Outline. Introduction
E N D
Switching Among Non-Weighting, Clause Weighting, and Variable Weighting in Local Search for SAT Wanxia Wei1, Chu Min Li2, and Harry Zhang1 1 Faculty of Computer Science, University of New Brunswick, Canada 2 MIS, Universit'e de Picardie Jules Verne, France
Outline • Introduction • Review of Algorithms adaptG2WSAT+, RSAPS,VW, and Hybrid • Motivation • A New Switching Criterion • A New Algorithm NCVW • Evaluation • Justification for Switching Strategy Used in NCVW • Conclusions
Outline • Introduction • Review of Algorithms adaptG2WSAT+, RSAPS,VW, and Hybrid • Motivation • A New Switching Criterion • A New Algorithm NCVW • Evaluation • Justification for Switching Strategy Used in NCVW • Conclusions
Intensification and Diversification • Intensification search strategies intend to improve solution quality [Hoos and Stűtzle 2004] • Diversification search strategies help achieve a reasonable coverage to avoid stagnation [Hoos and Stűtzle 2004]
Non-weighting, Clause Weighting, and Variable weighting Local Search Algorithms • A non-weighting algorithm • not use any weighting and focuses on intensifying search • adaptG2WSATP[Li, Wei, and Zhang SAT 2007] adaptG2WSAT0 [Li, Wei, and Zhang 2007] adaptG2WSAT+ [Wei,Li, and Zhang 2007] • A clause weighting algorithm • uses clause weighting to diversify the search • Breakout [Morris AAAI 93] SAPS, RSAPS[Hutter, Tompkins, and Hoos CP 2002] gNovelty+ [Pham and Gretton 2007] • A variable weighting algorithm • uses variable weighting to diversify the search • VW [Prestwich SAT 2005]
Single Local Search Algorithm or Heuristic • usually ineffective on many types of instance • allowing an algorithm to switch between heuristics • Unitwalk 0.98 [Hirsch and Kojevnikov AMAI 2005]: alternates between WalkSAT-like [Selman, Kautz, Cohen AAAI 94] and UnitWalk-like fragments of random walk • Hybrid[Wei,Li, and Zhang JSAT 2008]: switches between heuristicadaptG2WSATP and heuristicVW
A New Switching Criterion • A new switching criterion • evenness or unevenness of distribution of clause weights • Another switching criterion • evenness or unevenness of distribution of variables weights [Wei,Li, and Zhang JSAT 2008] • A new local search algorithm NCVW • NCVW (Non-, Clause, and Variable Weighting) • switches among heuristic adaptG2WSAT+, heuristic RSAPS, and heuristic VWaccording to these two criteria
Algorithm Heuristic Selection Problem • Work for NCVW • provides a solution to algorithm heuristic selection problem • SATZilla-2007 [Xu, Hutter, Hoos, and Leyton-Brown CP 2007] • per-instance solver portfolio for SAT • Difference between NCVW and SATZilla-2007 • NCVW chooses heuristics dynamically for an instance during search • SATzilla-2007 first chooses an algorithm for an instance and then runs this algorithm
Outline • Introduction • Review of Algorithms adaptG2WSAT+, RSAPS,VW, and Hybrid • Motivation • A New Switching Criterion • A New Algorithm NCVW • Evaluation • Justification for Switching Strategy Used in NCVW • Conclusions
Algorithm adaptG2WSAT+ • combines use of promising decreasing variables [Li and Huang SAT 2005] and adaptive noise mechanism [Hoos AAAI 02]
Algorithm RSAPS • uses clause weighting to help escape from local minima • scales weights of unsatisfied clauses and smoothes weights of all clauses probabilistically • modifies evaluation function
Algorithm VW • uses variable weighting to guide local search out of local minima • weight of a variable • flip numbers of this variable • time when this variable is flipped • favors variables with lower variable weights
Algorithm Hybrid • switches between heuristicadaptG2WSATPand heuristicVW according to evenness or unevenness of distribution of variable weights
Outline • Introduction • Review of Algorithms adaptG2WSAT+, RSAPS,VW, and Hybrid • Motivation • A New Switching Criterion • A New Algorithm NCVW • Evaluation • Justification for Switching Strategy Used in NCVW • Conclusions
Clause Weighting • Local minimum • a subset of unsatisfied clauses • attractions for local search towards local minimum • A poorly diversified search in terms of clause weights • same local minima by same unsatisfied clauses with strong attractions • Purposes of clause weighting • quantify attraction of clause • modify evaluation function
Two Hypotheses • Hybrid shows good performance usually when clause weights are generally balanced • RSAPS shows good performance usually when clause weights are unbalanced
Experiments • RSAPS and Hybrid on two groups of instances • instances leading to balanced clauses weights par16-1, par16-2, par16-3, par16-4, and par16-5 in PARITY (Maxtries=100, cutoff = 109) • instances leading to unbalanced clauses weights f*3995, f*3997, f*3999, f*4001, and f*4003 in Ferry (Maxtries=100, cutoff = 108) • Clause weights defined by Breakout[Morris AAAI 93] • summations of local minima in which a clause is unsatisfied • Reporting cv, div, and suc • cv: coefficient of variation of distribution of clause weights • div: division of maximum clause weight by average clause weight • suc: success rate
Higher coefficient of variation is, less balanced clause weights are • Weights for PARITY are more balanced than weights for Ferry avg: average of values in each column • Suggestions of above results • ignore clause weights and concentrate on intensifying search if clause weights are generally balanced • use clause weighting to diversify search otherwise • div over cv • whether clause weights are balanced ▪not time-consuming
Outline • Introduction • Review of Algorithms adaptG2WSAT+, RSAPS,VW, and Hybrid • Motivation • A New Switching Criterion • A New Algorithm NCVW • Evaluation • Justification for Switching Strategy Used in NCVW • Conclusions
Evenness or Unevenness of Distribution of Clause Weights • Definition • If (max_clause_weight ave_clause_weight) ( >1) the distribution of clause weights is uneven • Otherwise the distribution of clause weights is even • Unbalanced and balanced clause weights • A means to determine whether a search is undiversified in a step
Outline • Introduction • Review of Algorithms adaptG2WSAT+, RSAPS,VW, and Hybrid • Motivation • A New Switching Criterion • A New Algorithm NCVW • Evaluation • Justification for Switching Strategy Used in NCVW • Conclusions
NCVW (SAT-formula F) A← randomly generated truth assignment; forflip←1 toMaxstepsdo ifA satisfies F then return A; if distribution of variable weights is uneven thenheuristic← VW; elseif distribution of clause weights is uneven thenheuristic← RSAPS; elseheuristic ← adaptG2WSAT+; y ← use heuristic to choose a variable; if(y is a variable) thenA ← A with y flipped; update vw, max_vw, and ave_vw; if ((heuristic = RSAPS and (y is not a variable)) then update cw, max_cw, and ave_cw;
Three Objectives in NCVW • Objective 1: Ensure every variable has an equal chance of being flipped Way 1: Choose heuristicVW when distribution of variable weights is uneven • Objective 2: Avoid same local minima Way 2: Choose heuristicRSAPS when distribution of clause weights is uneven • Objective 3: Intensify search Way 3: Chooses heuristicadaptG2WSAT+ when distributions of both variable and clause weights are even
Outline • Introduction • Review of Algorithms adaptG2WSAT+, RSAPS,VW, and Hybrid • Motivation • A New Switching Criterion • A New Algorithm NCVW • Evaluation • Justification for Switching Strategy Used in NCVW • Conclusions
State-of-the-Art Algorithms to be Compared • RSAPS [Hutter, Tompkins, and Hoos CP 2002] one of the best local search algorithms in SAT 2004 competition • VW [Prestwich SAT 2005] silver medal in satisfiable random category in SAT 2005 competition • Hybrid[Wei,Li, and Zhang JSAT 2008] • adaptG2WSAT+ [Wei, Li, and Zhang 2007] bronze medal winner in satisfiable random category in SAT 2007 competition • adaptG2WSAT0 [Li, Wei, and Zhang 2007] silver medal in satisfiable random category in SAT 2007 competition • gNovelty+ [Pham and Gretton 2007] gold medal winner in satisfiable random category in SAT 2007 competition
11 Groups of Benchmark SAT Instances • SATLIB repository and SAT 2005 and 2007 competition benchmarks • A wide range of instances • structured instances from SATLIB repository • instances from industrial and crafted categories in SAT 2005 competition • hard random instances from SAT 2007 competition • Hard instances • widely used to evaluate local search algorithms
11 Groups of Benchmark SAT Instances (36 Instances) • Structured instances from SATLIB repository • ais12 from ais, bw_large.d in Blocksworld, e0ddr2*1 in Beijing • g250.29 in GCP, qg2-8 and qg7-13 in QG, par16-1 to par16-5 (5 ins) in PARITY • Industrial instances from SAT 2005 competition • f*3995, f*3997, f*3999, f*4001, and f*4003 in Ferry • Crafted instances from SAT 2005 competition • g*1334, g*1337, g*1339, g*1340, and g*1341 in grid-pebbling/sat • p*1318, p*1319, p*1320, p*1321, and p*1322 in random-pebbling/sat • Hard random instances from SAT 2007 competition • *v10000*03, *v10000*04, *v10000*05, *v10000*06, and *v10000*10 in 3SAT/v10000 • *v1100*04, *v1100*06, *v1100*08, *v1100*10, and *v1100*14 in 5SAT/v1100
Experiments • Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz, 2GB memory under Linux • Parameters • In NCVW ․(γ, , π, s , wp) = (7.5, 3.0, 15.0, 0.0, 0.05) ․adjusts parameters as constituent heuristics or uses same default values • In all other algorithms ․adjust parametersor use same default values • Maxtries = 100 • “suc”, “#steps”, and “time” ▪suc: success rate ▪#steps: median number of search steps ▪time: median run time • “> Maxsteps” and “n/a” (suc <= 50%)
An Algorithm Is Generally Effective Given a set of instances and a fixed cutoff for each instance, if an algorithm achieves a success rate greater than 50% for each instance, this algorithm is generally effective on these instances
Outline • Introduction • Review of Algorithms adaptG2WSAT+, RSAPS,VW, and Hybrid • Motivation • A New Switching Criterion • A New Algorithm NCVW • Evaluation • Justification for Switching Strategy Used in NCVW • Conclusions
Justification for Switching Strategy Used in NCVW NCVW_diff • uses heuristicadaptG2WSAT+ when distribution of variable weights is uneven or the distribution of clause weights is uneven • randomly selects a heuristic from heuristic RSAPS and heuristic VW otherwise NCVW_rand • randomly selects a heuristic from heuristicadaptG2WSAT+, heuristic RSAPS, and heuristic VW
Outline • Introduction • Review of Algorithms adaptG2WSAT+, RSAPS,VW, and Hybrid • Motivation • A New Switching Criterion • A New Algorithm NCVW • Evaluation • Justification for Switching Strategy Used in NCVW • Conclusions
Conclusions • A new switching criterion • evenness or unevenness of distribution of clause weights • A new local search algorithm NCVW • NCVW (Non-, Clause, and Variable Weighting) • switches among heuristicadaptG2WSAT+, heuristicRSAPS, and heuristic VW • Experimental results • NCVW is generally effective • adaptG2WSAT+, RSAPS, VW, gNovelty+, adaptG2WSAT0, and Hybrid are not