Optimal and Adaptive Algorithms for Online Boosting Alina Beygelzimer - - PowerPoint PPT Presentation

optimal and adaptive algorithms for online boosting
SMART_READER_LITE
LIVE PREVIEW

Optimal and Adaptive Algorithms for Online Boosting Alina Beygelzimer - - PowerPoint PPT Presentation

Optimal and Adaptive Algorithms for Online Boosting Alina Beygelzimer 1 Satyen Kale 1 Haipeng Luo 2 1 Yahoo! Labs, NYC 2 Computer Science Department, Princeton University December 11, 2015 Boosting: An Example Idea: combine weak rules of


slide-1
SLIDE 1

Optimal and Adaptive Algorithms for Online Boosting

Alina Beygelzimer1 Satyen Kale1 Haipeng Luo2

1Yahoo! Labs, NYC 2Computer Science Department, Princeton University

December 11, 2015

slide-2
SLIDE 2

Boosting: An Example

Idea: combine weak “rules of thumb” to form a highly accurate predictor.

2 / 18

slide-3
SLIDE 3

Boosting: An Example

Idea: combine weak “rules of thumb” to form a highly accurate predictor. Example: email spam detection.

2 / 18

slide-4
SLIDE 4

Boosting: An Example

Idea: combine weak “rules of thumb” to form a highly accurate predictor. Example: email spam detection. Given: a set of training examples.

◮ (“Attn: Beneficiary Contractor Foreign Money Transfer ...”, spam) ◮ (“Let’s meet to discuss QPR –Edo”, not spam) 2 / 18

slide-5
SLIDE 5

Boosting: An Example

Idea: combine weak “rules of thumb” to form a highly accurate predictor. Example: email spam detection. Given: a set of training examples.

◮ (“Attn: Beneficiary Contractor Foreign Money Transfer ...”, spam) ◮ (“Let’s meet to discuss QPR –Edo”, not spam)

Obtain a classifier by asking a “weak learning algorithm”:

◮ e.g. contains the word “money” ⇒ spam. 2 / 18

slide-6
SLIDE 6

Boosting: An Example

Idea: combine weak “rules of thumb” to form a highly accurate predictor. Example: email spam detection. Given: a set of training examples.

◮ (“Attn: Beneficiary Contractor Foreign Money Transfer ...”, spam) ◮ (“Let’s meet to discuss QPR –Edo”, not spam)

Obtain a classifier by asking a “weak learning algorithm”:

◮ e.g. contains the word “money” ⇒ spam.

Reweight the examples so that “difficult” ones get more attention.

◮ e.g. spam that doesn’t contain “money”. 2 / 18

slide-7
SLIDE 7

Boosting: An Example

Idea: combine weak “rules of thumb” to form a highly accurate predictor. Example: email spam detection. Given: a set of training examples.

◮ (“Attn: Beneficiary Contractor Foreign Money Transfer ...”, spam) ◮ (“Let’s meet to discuss QPR –Edo”, not spam)

Obtain a classifier by asking a “weak learning algorithm”:

◮ e.g. contains the word “money” ⇒ spam.

Reweight the examples so that “difficult” ones get more attention.

◮ e.g. spam that doesn’t contain “money”.

Obtain another classifier:

◮ e.g. empty “to address” ⇒ spam. 2 / 18

slide-8
SLIDE 8

Boosting: An Example

Idea: combine weak “rules of thumb” to form a highly accurate predictor. Example: email spam detection. Given: a set of training examples.

◮ (“Attn: Beneficiary Contractor Foreign Money Transfer ...”, spam) ◮ (“Let’s meet to discuss QPR –Edo”, not spam)

Obtain a classifier by asking a “weak learning algorithm”:

◮ e.g. contains the word “money” ⇒ spam.

Reweight the examples so that “difficult” ones get more attention.

◮ e.g. spam that doesn’t contain “money”.

Obtain another classifier:

◮ e.g. empty “to address” ⇒ spam.

......

2 / 18

slide-9
SLIDE 9

Boosting: An Example

Idea: combine weak “rules of thumb” to form a highly accurate predictor. Example: email spam detection. Given: a set of training examples.

◮ (“Attn: Beneficiary Contractor Foreign Money Transfer ...”, spam) ◮ (“Let’s meet to discuss QPR –Edo”, not spam)

Obtain a classifier by asking a “weak learning algorithm”:

◮ e.g. contains the word “money” ⇒ spam.

Reweight the examples so that “difficult” ones get more attention.

◮ e.g. spam that doesn’t contain “money”.

Obtain another classifier:

◮ e.g. empty “to address” ⇒ spam.

...... At the end, predict by taking a (weighted) majority vote.

2 / 18

slide-10
SLIDE 10

Online Boosting: Motivation

Boosting is well studied in the batch setting, but become infeasible when the amount of data is huge.

3 / 18

slide-11
SLIDE 11

Online Boosting: Motivation

Boosting is well studied in the batch setting, but become infeasible when the amount of data is huge. Online learning has proven extremely useful:

  • ne pass of the data, make prediction on the fly.

3 / 18

slide-12
SLIDE 12

Online Boosting: Motivation

Boosting is well studied in the batch setting, but become infeasible when the amount of data is huge. Online learning has proven extremely useful:

  • ne pass of the data, make prediction on the fly.

works even in an adversarial environment.

◮ e.g. spam detection. 3 / 18

slide-13
SLIDE 13

Online Boosting: Motivation

Boosting is well studied in the batch setting, but become infeasible when the amount of data is huge. Online learning has proven extremely useful:

  • ne pass of the data, make prediction on the fly.

works even in an adversarial environment.

◮ e.g. spam detection.

An natural question: how to extend boosting to the online setting?

3 / 18

slide-14
SLIDE 14

Related Work

Several algorithms exist (Oza and Russell, 2001; Grabner and Bischof, 2006; Liu and Yu,

2007; Grabner et al., 2008).

mimic offline counterparts. achieve great success in many real-world applications. no theoretical guarantees.

4 / 18

slide-15
SLIDE 15

Related Work

Several algorithms exist (Oza and Russell, 2001; Grabner and Bischof, 2006; Liu and Yu,

2007; Grabner et al., 2008).

mimic offline counterparts. achieve great success in many real-world applications. no theoretical guarantees. Chen et al. (2012): first online boosting algorithms with theoretical guarantees.

  • nline analogue of weak learning assumption.

connecting online boosting and smooth batch boosting.

4 / 18

slide-16
SLIDE 16

Batch Boosting

Given a batch of T examples, (xt, yt) ∈ X × {−1, 1} for t = 1, . . . , T. Learner A predicts A(xt) ∈ {−1, 1} for example xt.

5 / 18

slide-17
SLIDE 17

Batch Boosting

Given a batch of T examples, (xt, yt) ∈ X × {−1, 1} for t = 1, . . . , T. Learner A predicts A(xt) ∈ {−1, 1} for example xt. Weak learner A (with edge γ): T

t=1 1{A(xt) = yt} ≤ ( 1 2 − γ)T

5 / 18

slide-18
SLIDE 18

Batch Boosting

Given a batch of T examples, (xt, yt) ∈ X × {−1, 1} for t = 1, . . . , T. Learner A predicts A(xt) ∈ {−1, 1} for example xt. Weak learner A (with edge γ): T

t=1 1{A(xt) = yt} ≤ ( 1 2 − γ)T

Strong learner A′ (with any target error rate ǫ): T

t=1 1{A′(xt) = yt} ≤ ǫT

5 / 18

slide-19
SLIDE 19

Batch Boosting

Given a batch of T examples, (xt, yt) ∈ X × {−1, 1} for t = 1, . . . , T. Learner A predicts A(xt) ∈ {−1, 1} for example xt. Weak learner A (with edge γ): T

t=1 1{A(xt) = yt} ≤ ( 1 2 − γ)T

⇓ Boosting (Schapire, 1990; Freund, 1995) Strong learner A′ (with any target error rate ǫ): T

t=1 1{A′(xt) = yt} ≤ ǫT

5 / 18

slide-20
SLIDE 20

Online Boosting

Examples (xt, yt) ∈ X × {−1, 1} arrive online, for t = 1, . . . , T. Learner A observes xt and predicts A(xt) ∈ {−1, 1} before seeing yt. Weak Online learner A (with edge γ): T

t=1 1{A(xt) = yt} ≤ ( 1 2 − γ)T

Strong Online learner A′ (with any target error rate ǫ): T

t=1 1{A′(xt) = yt} ≤ ǫT

5 / 18

slide-21
SLIDE 21

Online Boosting

Examples (xt, yt) ∈ X × {−1, 1} arrive online, for t = 1, . . . , T. Learner A observes xt and predicts A(xt) ∈ {−1, 1} before seeing yt. Weak Online learner A (with edge γ and excess loss S): T

t=1 1{A(xt) = yt} ≤ ( 1 2 − γ)T + S

Strong Online learner A′ (with any target error rate ǫ and excess loss S′) T

t=1 1{A′(xt) = yt} ≤ ǫT + S′

5 / 18

slide-22
SLIDE 22

Online Boosting

Examples (xt, yt) ∈ X × {−1, 1} arrive online, for t = 1, . . . , T. Learner A observes xt and predicts A(xt) ∈ {−1, 1} before seeing yt. Weak Online learner A (with edge γ and excess loss S): T

t=1 1{A(xt) = yt} ≤ ( 1 2 − γ)T + S

⇓ Online Boosting (our result) Strong Online learner A′ (with any target error rate ǫ and excess loss S′) T

t=1 1{A′(xt) = yt} ≤ ǫT + S′

5 / 18

slide-23
SLIDE 23

Online Boosting

Examples (xt, yt) ∈ X × {−1, 1} arrive online, for t = 1, . . . , T. Learner A observes xt and predicts A(xt) ∈ {−1, 1} before seeing yt. Weak Online learner A (with edge γ and excess loss S): T

t=1 1{A(xt) = yt} ≤ ( 1 2 − γ)T + S

⇓ Online Boosting (our result) Strong Online learner A′ (with any target error rate ǫ and excess loss S′) T

t=1 1{A′(xt) = yt} ≤ ǫT + S′

this talk: S = 1

γ (corresponds to

√ T regret)

5 / 18

slide-24
SLIDE 24

Main Results

Parameters of interest: N = number of weak learners (of edge γ) needed to achieve error rate ǫ. Tǫ = minimal number of examples s.t. error rate is ǫ. Algorithm N Tǫ Optimal? Adaptive? Online BBM O( 1

γ2 ln 1 ǫ)

˜ O( 1

ǫγ2 )

√ × AdaBoost.OL O( 1

ǫγ2 )

˜ O(

1 ǫ2γ4 )

× √ Chen et al. (2012) O( 1

ǫγ2 )

˜ O( 1

ǫγ2 )

× ×

6 / 18

slide-25
SLIDE 25

Structure of Online Boosting

Booster x1

slide-26
SLIDE 26

Structure of Online Boosting

Booster x1 WL1 predict x1 ˆ y1

1

WL2 predict x1 ˆ y2

1

. . . WLN predict x1 ˆ yN

1

slide-27
SLIDE 27

Structure of Online Boosting

Booster x1 WL1 predict x1 ˆ y1

1

WL2 predict x1 ˆ y2

1

. . . WLN predict x1 ˆ yN

1

ˆ y1 y1

slide-28
SLIDE 28

Structure of Online Boosting

Booster x1 WL1 predict x1 ˆ y1

1

WL2 predict x1 ˆ y2

1

. . . WLN predict x1 ˆ yN

1

ˆ y1 y1 WL1 update w.p. p1

1

(x1, y1) WL2 update w.p. p2

1

(x1, y1) . . . WLN update w.p. pN

1

(x1, y1)

7 / 18

slide-29
SLIDE 29

Structure of Online Boosting

Booster x2 WL1 predict x2 ˆ y1

2

WL2 predict x2 ˆ y2

2

. . . WLN predict x2 ˆ yN

2

ˆ y2 y2 WL1 update w.p. p1

2

(x2, y2) WL2 update w.p. p2

2

(x2, y2) . . . WLN update w.p. pN

2

(x2, y2)

8 / 18

slide-30
SLIDE 30

Structure of Online Boosting

Booster xt WL1 predict xt ˆ y1

t

WL2 predict xt ˆ y2

t

. . . WLN predict xt ˆ yN

t

ˆ yt yt WL1 update w.p. p1

t

(xt, yt) WL2 update w.p. p2

t

(xt, yt) . . . WLN update w.p. pN

t

(xt, yt)

9 / 18

slide-31
SLIDE 31

Boosting as a Drifting Game

(Schapire, 2001; Luo and Schapire, 2014)

Batch boosting can be analyzed using drifting game.

10 / 18

slide-32
SLIDE 32

Boosting as a Drifting Game

(Schapire, 2001; Luo and Schapire, 2014)

Batch boosting can be analyzed using drifting game. Online version: sequence of potentials Φi(s) s.t. ΦN(s) ≥ 1{s ≤ 0}, Φi−1(s) ≥ ( 1

2 − γ 2)Φi(s − 1) + ( 1 2 + γ 2)Φi(s + 1).

10 / 18

slide-33
SLIDE 33

Boosting as a Drifting Game

(Schapire, 2001; Luo and Schapire, 2014)

Batch boosting can be analyzed using drifting game. Online version: sequence of potentials Φi(s) s.t. ΦN(s) ≥ 1{s ≤ 0}, Φi−1(s) ≥ ( 1

2 − γ 2)Φi(s − 1) + ( 1 2 + γ 2)Φi(s + 1).

Online boosting algorithm using Φi: prediction: majority vote.

10 / 18

slide-34
SLIDE 34

Boosting as a Drifting Game

(Schapire, 2001; Luo and Schapire, 2014)

Batch boosting can be analyzed using drifting game. Online version: sequence of potentials Φi(s) s.t. ΦN(s) ≥ 1{s ≤ 0}, Φi−1(s) ≥ ( 1

2 − γ 2)Φi(s − 1) + ( 1 2 + γ 2)Φi(s + 1).

Online boosting algorithm using Φi: prediction: majority vote. update: pi

t = Pr[(xt, yt) sent to ith weak learner] ∝ wi t where

wi

t = difference in potentials if example is misclassified or not.

10 / 18

slide-35
SLIDE 35

Mistake Bound

Generalized drifting games analysis implies T

t=1 1{A′(xt) = yt} ≤ Φ0(0) ≤ǫ

T + (S + 1

γ ) i wi∞

  • =S′

.

11 / 18

slide-36
SLIDE 36

Mistake Bound

Generalized drifting games analysis implies T

t=1 1{A′(xt) = yt} ≤ Φ0(0) ≤ǫ

T + (S + 1

γ ) i wi∞

  • =S′

. So we want small wi∞. exponential potential (corresponding to AdaBoost) does not work.

11 / 18

slide-37
SLIDE 37

Mistake Bound

Generalized drifting games analysis implies T

t=1 1{A′(xt) = yt} ≤ Φ0(0) ≤ǫ

T + (S + 1

γ ) i wi∞

  • =S′

. So we want small wi∞. exponential potential (corresponding to AdaBoost) does not work. Boost-by-Majority (Freund, 1995) potential works well!

11 / 18

slide-38
SLIDE 38

Mistake Bound

Generalized drifting games analysis implies T

t=1 1{A′(xt) = yt} ≤ Φ0(0) ≤ǫ

T + (S + 1

γ ) i wi∞

  • =S′

. So we want small wi∞. exponential potential (corresponding to AdaBoost) does not work. Boost-by-Majority (Freund, 1995) potential works well!

◮ w i

t = Pr[ki t heads in N − i flips of a γ 2 -biased coin]

11 / 18

slide-39
SLIDE 39

Mistake Bound

Generalized drifting games analysis implies T

t=1 1{A′(xt) = yt} ≤ Φ0(0) ≤ǫ

T + (S + 1

γ ) i wi∞

  • =S′

. So we want small wi∞. exponential potential (corresponding to AdaBoost) does not work. Boost-by-Majority (Freund, 1995) potential works well!

◮ w i

t = Pr[ki t heads in N − i flips of a γ 2 -biased coin] ≤ 4 √N−i

11 / 18

slide-40
SLIDE 40

Mistake Bound

Generalized drifting games analysis implies T

t=1 1{A′(xt) = yt} ≤ Φ0(0) ≤ǫ

T + (S + 1

γ ) i wi∞

  • =S′

. So we want small wi∞. exponential potential (corresponding to AdaBoost) does not work. Boost-by-Majority (Freund, 1995) potential works well!

◮ w i

t = Pr[ki t heads in N − i flips of a γ 2 -biased coin] ≤ 4 √N−i

Online BBM: to get ǫ error rate, needs N = O( 1

γ2 ln( 1 ǫ)) weak learners and Tǫ = O( 1 ǫγ2 ) examples. (Optimal)

11 / 18

slide-41
SLIDE 41

Drawback of Online BBM

The draw back of BBM (or Chen et al. (2012)) is the lack of adaptivity. requires γ as a parameter.

12 / 18

slide-42
SLIDE 42

Drawback of Online BBM

The draw back of BBM (or Chen et al. (2012)) is the lack of adaptivity. requires γ as a parameter. treats each weak learner equally: predicts via simple majority vote.

12 / 18

slide-43
SLIDE 43

Drawback of Online BBM

The draw back of BBM (or Chen et al. (2012)) is the lack of adaptivity. requires γ as a parameter. treats each weak learner equally: predicts via simple majority vote. Adaptivity is the key advantage of AdaBoost! different weak learners weighted differently based on their performance. Adapts to easy data

12 / 18

slide-44
SLIDE 44

Adaptivity via Online Loss Minimization

Batch boosting finds a combination of weak learners to minimize some loss function using coordinate descent. (Breiman, 1999)

13 / 18

slide-45
SLIDE 45

Adaptivity via Online Loss Minimization

Batch boosting finds a combination of weak learners to minimize some loss function using coordinate descent. (Breiman, 1999) AdaBoost: exponential loss AdaBoost.L: logistic loss

13 / 18

slide-46
SLIDE 46

Adaptivity via Online Loss Minimization

Batch boosting finds a combination of weak learners to minimize some loss function using coordinate descent. (Breiman, 1999) AdaBoost: exponential loss AdaBoost.L: logistic loss We generalize this to the online setting: replace line search with online gradient descent.

13 / 18

slide-47
SLIDE 47

Adaptivity via Online Loss Minimization

Batch boosting finds a combination of weak learners to minimize some loss function using coordinate descent. (Breiman, 1999) AdaBoost: exponential loss AdaBoost.L: logistic loss We generalize this to the online setting: replace line search with online gradient descent. exponential loss does not work again, use logistic loss to get adaptive

  • nline boosting algorithm AdaBoost.OL.

13 / 18

slide-48
SLIDE 48

Intuition and main ideas

Classifier f with real-valued output f (x): predict sign(f (x)) Logistic loss ln(1 + exp(−f (x)y)): surrogate for 1{sign(f (x)) = y}

14 / 18

slide-49
SLIDE 49

Intuition and main ideas

Classifier f with real-valued output f (x): predict sign(f (x)) Logistic loss ln(1 + exp(−f (x)y)): surrogate for 1{sign(f (x)) = y} In batch setting (AdaBoost.L):

◮ for each i, add output of weak learner with step-size α found by line

search to minimize logistic loss

14 / 18

slide-50
SLIDE 50

Intuition and main ideas

Classifier f with real-valued output f (x): predict sign(f (x)) Logistic loss ln(1 + exp(−f (x)y)): surrogate for 1{sign(f (x)) = y} In batch setting (AdaBoost.L):

◮ for each i, add output of weak learner with step-size α found by line

search to minimize logistic loss

◮ final prediction is weighted majority with weights α 14 / 18

slide-51
SLIDE 51

Intuition and main ideas

Classifier f with real-valued output f (x): predict sign(f (x)) Logistic loss ln(1 + exp(−f (x)y)): surrogate for 1{sign(f (x)) = y} In batch setting (AdaBoost.L):

◮ for each i, add output of weak learner with step-size α found by line

search to minimize logistic loss

◮ final prediction is weighted majority with weights α

In online setting (AdaBoost.OL): for each i, search for step-size α using online gradient descent over sequence of T data points

14 / 18

slide-52
SLIDE 52

Intuition and main ideas

Classifier f with real-valued output f (x): predict sign(f (x)) Logistic loss ln(1 + exp(−f (x)y)): surrogate for 1{sign(f (x)) = y} In batch setting (AdaBoost.L):

◮ for each i, add output of weak learner with step-size α found by line

search to minimize logistic loss

◮ final prediction is weighted majority with weights α

In online setting (AdaBoost.OL): for each i, search for step-size α using online gradient descent over sequence of T data points for each data point, final prediction is weighted majority with weights given by current α’s

14 / 18

slide-53
SLIDE 53

Mistake Bound

If WLi has edge γi, then

T

  • t=1

1{A′(xt) = yt} ≤ 2T

  • i γ2

i

+ ˜ O N2

  • i γ2

i

  • 15 / 18
slide-54
SLIDE 54

Mistake Bound

If WLi has edge γi, then

T

  • t=1

1{A′(xt) = yt} ≤ 2T

  • i γ2

i

+ ˜ O N2

  • i γ2

i

  • Suppose γi ≥ γ, then to get ǫ error rate AdaBoost.OL needs

N = O( 1

ǫγ2 ) weak learners and Tǫ = O( 1 ǫ2γ4 ) examples.

15 / 18

slide-55
SLIDE 55

Mistake Bound

If WLi has edge γi, then

T

  • t=1

1{A′(xt) = yt} ≤ 2T

  • i γ2

i

+ ˜ O N2

  • i γ2

i

  • Suppose γi ≥ γ, then to get ǫ error rate AdaBoost.OL needs

N = O( 1

ǫγ2 ) weak learners and Tǫ = O( 1 ǫ2γ4 ) examples.

Not optimal but adaptive.

15 / 18

slide-56
SLIDE 56

Results

Available in Vowpal Wabbit 8.0. command line option: --boosting. VW as the default “weak” learner (a rather strong one!)

Dataset VW baseline Online BBM AdaBoost.OL Chen et al. 12 20news 0.0812 0.0775 0.0777 0.0791 a9a 0.1509 0.1495 0.1497 0.1509 activity 0.0133 0.0114 0.0128 0.0130 adult 0.1543 0.1526 0.1536 0.1539 bio 0.0035 0.0031 0.0032 0.0033 census 0.0471 0.0469 0.0469 0.0469 covtype 0.2563 0.2347 0.2495 0.2470 letter 0.2295 0.1923 0.2078 0.2148 maptaskcoref 0.1091 0.1077 0.1083 0.1093 nomao 0.0641 0.0627 0.0635 0.0627 poker 0.4555 0.4312 0.4555 0.4555 rcv1 0.0487 0.0485 0.0484 0.0488 vehv2binary 0.0292 0.0286 0.0291 0.0284

16 / 18

slide-57
SLIDE 57

Conclusions

We propose A natural framework of online boosting. An optimal algorithm Online BBM. An adaptive algorithm AdaBoost.OL.

17 / 18

slide-58
SLIDE 58

Conclusions

We propose A natural framework of online boosting. An optimal algorithm Online BBM. An adaptive algorithm AdaBoost.OL. Open problem: optimal and adaptive algorithm?

17 / 18