Combining Multiple Heuristics in an Adversarial Online Setting
Daniel Golovin Stephen F. Smith Matthew Streeter CMU theory lunch 2/14/07
Combining Multiple Heuristics in an Adversarial Online Setting CMU - - PowerPoint PPT Presentation
Combining Multiple Heuristics in an Adversarial Online Setting CMU theory lunch 2/14/07 Daniel Golovin Stephen F. Smith Matthew Streeter Why heuristics? Many interesting problems are NP-hard, sometimes even to approximate
Daniel Golovin Stephen F. Smith Matthew Streeter CMU theory lunch 2/14/07
even to approximate
hardware and software verification
heuristics (e.g., SAT conference holds annual competitions)
2
hard to predict
heuristics in parallel
3
Instance SatELiteGTI MiniSat CPU (s) CPU (s) liveness-unsat-2-01dlx c bp u f liveness 33 15 vliw-sat-2-0/9dlx vliw at b iq6 bug4 376 ≥ 120000 vliw-sat-2-0/9dlx vliw at b iq6 bug9 ≥ 120000 131
across different random seeds
distributions (Gomes et al. 1998)
4
satz-rand running on logistics.d
0.2 0.4 0.6 0.8 1 0.1 1 10 100 1000
time (s)
Pr[run not finished]
proportion of CPU time, plus a fixed restart threshold
known run length distribution that does not vary across instances
5
ties perpendicular to the magnetic field. The frequen- cy of the lower hybrid waves is between the gyro- frequencies of the electrons (ce) and the ions (ci) which means that these waves can be in simulta- neous Cherenkov resonance with the relatively slow but unmagnetized ions perpendicular to the magnet- ic field and fast magnetized (hence magnetic field aligned) electrons. Cherenkov resonance occurs when the phase velocity of the wave and the particle velocity are equal; under these conditions strong in- teraction between the waves and particles is possi- ble and results in energy transfer from the wave to the particle or vice versa. The lower hybrid waves provide the intermediary step in transferring energy between the ions and electrons.An Economics Approach to Hard Computational Problems
Bernardo A. Huberman, Rajan M. Lukose, Tad Hogg
A general method for combining existing algorithms into new programs that are un- equivocally preferable to any of the component algorithms is presented. This method, based on notions of risk in economics, offers a computational portfolio design procedure that can be used for a wide range of problems. Tested by solving a canonical NP- complete problem, the method can be used for problems ranging from the combinatoricsExtremely hard computational problems
are pervasive in fields ranging from molec- ular biology to physics and operations re-REPORTS
SCIENCEMansour, STACS 2006)
schedules
6
assume deterministic)
heuristics, stopping as soon as one of them returns an answer
7
h1 h2 time h3 . . .
8
= heuristic to run from time t to time t+1
h1 h2 time h3 . . .
8
= heuristic to run from time t to time t+1
h1 h2 time h3 . . .
8
h1 h2 h3 I1 2 7 7
Completion times
= heuristic to run from time t to time t+1
in memory and switch between them at zero cost
(will come back to this later)
h1 h2 time h3 . . .
8
h1 h2 h3 I1 2 7 7
Completion times
9
10
1 2 3 4 1 2 3 4
h1 h2
11
switching schedule as a path in a k- dimensional grid with sides of length B+1 (here B=4)
1 2 3 4 1 2 3 4
h1 h2
11
switching schedule as a path in a k- dimensional grid with sides of length B+1 (here B=4)
seconds, then run h2 for 3 seconds...”
1 2 3 4 1 2 3 4
h1 h2 h1 h2 I1 I2 I3 I4 Completion times Shortest path problem
12
1 2 3 4 1 2 3 4
h1 h2 h1 h2 I1 I2 I3 I4 Completion times Shortest path problem
12
1 1 1 1 1 1 1 1 1 1 1 1
1 2 3 4 1 2 3 4
h1 h2 3 4 h1 h2 I1 I2 I3 I4 Completion times Shortest path problem
12
1 2 3 4 1 2 3 4
h1 h2 3 4 2 1 1 1 1 1 1 1 1 1 1 2 2 1 h1 h2 I1 I2 I3 I4 Completion times Shortest path problem
12
1 2 3 4 1 2 3 4
h1 h2 3 4 2 1 2 4 2 2 1 2 2 1 2 2 1 3 3 1 h1 h2 I1 I2 I3 I4 Completion times Shortest path problem
12
1 2 3 4 1 2 3 4
h1 h2 3 4 2 1 2 4 3 1 2 2 1 2 2 1 2 2 1 4 4 2 h1 h2 I1 I2 I3 I4 Completion times Shortest path problem
12
1 2 3 4 1 2 3 4
h1 h2 3 4 2 1 2 4 3 1 2 2 1 2 2 1 2 2 1 4 4 2 2 2 1 2 2 1 2 2 1 4 4 2 h1 h2 I1 I2 I3 I4 Completion times Shortest path problem
12
1 2 3 4 1 2 3 4
h1 h2 2 2 1 2 2 1 2 2 1 4 4 2 2 2 1 2 2 1 2 2 1 4 4 2 Shortest path problem
12
O(nk(B+1)k)
1 2 3 4 1 2 3 4
h1 h2 2 2 1 2 2 1 2 2 1 4 4 2 2 2 1 2 2 1 2 2 1 4 4 2 Shortest path problem
12
O(nk(B+1)k)
approximation in time O(nk(1+logα B)k)
1 2 3 4 1 2 3 4
h1 h2 2 2 1 2 2 1 2 2 1 4 4 2 2 2 1 2 2 1 2 2 1 4 4 2 Shortest path problem
12
O(nk(B+1)k)
approximation in time O(nk(1+logα B)k)
with n (Theorem 12
13
14
(Feige, Lovász, & Tetali, 2002)
Σelements x coverage-time(x)
where coverage-time(x) = position of first set containing x
coverage-time(a)=1 and coverage-time(c)=2
14
(Feige, Lovász, & Tetali, 2002)
Σelements x coverage-time(x)
where coverage-time(x) = position of first set containing x
coverage-time(a)=1 and coverage-time(c)=2
(sets = heuristics, elements = instances)
14
(Feige, Lovász, & Tetali, 2002)
set that covers the max #elements to go next in the
switching schedules
15
(Feige, Lovász, & Tetali, 2002)
greedy ordering); let Ri = Ci + Ci+1 + ... + Ck
elements have coverage time > t (for all i,t)
16
(Feige, Lovász, & Tetali, 2002) C1 C2 C3 C4 C5 R2
17
(Feige, Lovász, & Tetali, 2002)
17
OPT = area under curve (Feige, Lovász, & Tetali, 2002)
17
OPT = area under curve (Feige, Lovász, & Tetali, 2002)
½R1 ½R1/C1 ½R2 ½R2/C2 ½R3
½R3/C3
½R4
½R4/C4
½R5
½R5/C5
17
OPT = area under curve ≥ shaded area (Feige, Lovász, & Tetali, 2002)
½R1 ½R1/C1 ½R2 ½R2/C2 ½R3
½R3/C3
½R4
½R4/C4
½R5
½R5/C5
17
OPT = area under curve ≥ shaded area = Σi (½Ri/Ci)*(½Ri-½Ri+1) = Σi Ri/4 = GREEDY/4 (Feige, Lovász, & Tetali, 2002)
½R1 ½R1/C1 ½R2 ½R2/C2 ½R3
½R3/C3
½R4
½R4/C4
½R5
½R5/C5
t (additional) time steps maximizes #(new instances solved)/t
18
t (additional) time steps maximizes #(new instances solved)/t
18
# solved by h1 time # solved by h2 time
Schedule
t (additional) time steps maximizes #(new instances solved)/t
18
# solved by h1 time # solved by h2 time
Schedule
t (additional) time steps maximizes #(new instances solved)/t
18
# solved by h1 time # solved by h2 time
Schedule run h1 for 1 time step
t (additional) time steps maximizes #(new instances solved)/t
18
# solved by h1 time # solved by h2 time
Schedule run h1 for 1 time step
t (additional) time steps maximizes #(new instances solved)/t
18
# solved by h1 time # solved by h2 time
Schedule run h1 for 1 time step
t (additional) time steps maximizes #(new instances solved)/t
18
# solved by h1 time # solved by h2 time
Schedule run h1 for 1 time step run h2 for 4 time steps
t (additional) time steps maximizes #(new instances solved)/t
18
# solved by h1 time # solved by h2 time
Schedule run h1 for 1 time step run h2 for 4 time steps Can show any schedule has at least Ri - t*Ci instances unsolved at time t, where Ci = ith slope and Ri = #(instances unsolved before ith phase) Then use similar proof by picture
t (additional) time steps maximizes #(new instances solved)/t
18
# solved by h1 time # solved by h2 time
Schedule run h1 for 1 time step run h2 for 4 time steps Can show any schedule has at least Ri - t*Ci instances unsolved at time t, where Ci = ith slope and Ri = #(instances unsolved before ith phase) Then use similar proof by picture
In fact, we obtain a 4- approximation even if we keep just one heuristic in memory at a time, and restart from scratch whenever we switch
Then:
19
20
every day; following expert e’s advice on day j costs cj(e)
regret O((n log M)1/2)
20
every day; following expert e’s advice on day j costs cj(e)
regret O((n log M)1/2)
C that is added to regret. Running RWM using data from a random subset of the days gives regret O(n2/3(C log M)1/3) (Cesa-Bianchi et al., 2005)
20
in “bandit” feedback setting would give regret poly(#edges)
Bianchi et al. (2005) gives regret O(Bkn2/3(Lk log k)1/3), where L = length of sides of grid
decision-making time is O(#edges) (György et al., 2006)
21
22
(ongoing work)
instances, using the following pool of experts:
behaves as follows: w/prob. 1/t it runs h for t time steps; and w/prob. 1-1/t it does nothing
22
(ongoing work)
instances, using the following pool of experts:
behaves as follows: w/prob. 1/t it runs h for t time steps; and w/prob. 1-1/t it does nothing
22
(ongoing work)
instances, using the following pool of experts:
behaves as follows: w/prob. 1/t it runs h for t time steps; and w/prob. 1-1/t it does nothing
as possible per unit time (like offline greedy)
22
(ongoing work)
23
R W M 1 R W M 2 R W M 3
(ongoing work)
RWM algorithms, operating independently
23
R W M 1 R W M 2 R W M 3
(ongoing work)
RWM algorithms, operating independently
that is o(1), but exponential in #heuristics
23
R W M 1 R W M 2 R W M 3
(ongoing work)
problem” (ICDT 2005) — asymptotic O(log n) competitive ratio in adversarial online setting
2005) — asymptotically 4-competitive with better bounds than ours, but only in distributional online setting
24
augmented with flag that says whether to restart at each time slice (i.e., mapping S:ℤ↦H×{0,1})
thresholds t1, t2, ...
h1 h2 time h3 . . .
25
r r
26
competitions with the following format:
instances (subject to time limit)
various instance categories
(approximately) optimal task-switching schedules, and compared them to best individual solver
28
limit per instance
six
29
30
Solver
Greedy schedule (x-val) 358 (407) 98 (97) Single-run greedy (x-val) 476 (586) 96 (95) SATPLAN 507 83 Maxplan 641 88 MIPS-BDD 946 54 CPT2 969 53 FDP 1079 46 Parallel schedule 1244 89 IPPLAN-1SC 1437 23
30
Solver
Greedy schedule (x-val) 358 (407) 98 (97) Single-run greedy (x-val) 476 (586) 96 (95) SATPLAN 507 83 Maxplan 641 88 MIPS-BDD 946 54 CPT2 969 53 FDP 1079 46 Parallel schedule 1244 89 IPPLAN-1SC 1437 23
Greedy schedule:
SATPLAN Maxplan MIPS-BDD CPT2 FDP
time
1 10 100 1000 0.1
31
Solver competition Domain Speedup factor (range across categories) SAT 2005 satisfiability 1.2–2.0 ICAPS 2006 planning 1.4 CP 2006 constraint satisfaction 1.0–1.5 IJCAR 2006 theorem proving 1.0–7.7
32
for 0/1 integer programming
33
(time to find feasible solution) + (time to find optimal solution) + (time to prove optimality)
1000 2000 3000 4000 5000 6000 0.1 1 10 100 1000 10000
Time Best solution
bsolo MiniSat 1.14 SAT4J SAT4J Heur.
P = proof of optimality P P
Used greedy algorithm to minimize
solver with respect to all three criteria
34
Solver
to Prove Opt. to Find Opt. to Find Feas. Greedy schedule 116 85 29 MiniSat 1.14 277 257 86 bsolo 279 211 94 SAT4J 433 323 56 SAT4J Heur. 408 302 44
35