On the benefits of output sparsity for multi-label classification - - PowerPoint PPT Presentation

on the benefits of output sparsity for multi label
SMART_READER_LITE
LIVE PREVIEW

On the benefits of output sparsity for multi-label classification - - PowerPoint PPT Presentation

On the benefits of output sparsity for multi-label classification Evgenii Chzhen http://echzhen.com Universit Paris-Est, Tlcom Paristech Joint work with: Christoph Denis, Mohamed Hebiri, Joseph Salmon 1 / 13 Outline Introduction


slide-1
SLIDE 1

On the benefits of output sparsity for multi-label classification

Evgenii Chzhen http://echzhen.com Université Paris-Est, Télécom Paristech Joint work with: Christoph Denis, Mohamed Hebiri, Joseph Salmon

1 / 13

slide-2
SLIDE 2

Outline

Introduction Framework and notation Motivation Our approach Add weights Numerical results Conclusion

2 / 13

slide-3
SLIDE 3

Outline

Introduction Framework and notation Motivation Our approach Add weights Numerical results Conclusion

3 / 13

slide-4
SLIDE 4

Framework and notation

We have N observations and each observation belongs to a set of labels.

§ Observations: Xi P RD, § Label vectors = binary vectors: Yi “ pY 1 i , . . . , Y L i qJ P t0, 1uL, § N, L, D - huge and probably N L, § Yi consists of at most K ones (active labels) and K ! L.

4 / 13

slide-5
SLIDE 5

Outline

Introduction Framework and notation Motivation Our approach Add weights Numerical results Conclusion

5 / 13

slide-6
SLIDE 6

Motivation

0-type error vs 1-type error ˆ Y l “ 1 when Y l “ 0 ˆ Y l “ 0 when Y l “ 1

6 / 13

slide-7
SLIDE 7

Motivation

0-type error vs 1-type error ˆ Y l “ 1 when Y l “ 0 ˆ Y l “ 0 when Y l “ 1

Example

Y “ p1, . . . , 1 loomoon

10

, 0, . . . , 0 loomoon

90

qJ , ˆ Y0 “ p1, . . . , 1 loomoon

10

, 1, . . . , 1 loomoon

5

, 0, . . . , 0 loomoon

85

qJ , ˆ Y1 “ p1, . . . , 1 loomoon

5

, 0, . . . , 0 loomoon

5

, 0, . . . , 0 loomoon

90

qJ .

§ Same amount of mistakes but of different type § Which one is better for a user?

6 / 13

slide-8
SLIDE 8

Motivation

0-type error vs 1-type error ˆ Y l “ 1 when Y l “ 0 ˆ Y l “ 0 when Y l “ 1

Hamming loss

LHpY, ˆ Y q “

L

ÿ

l“1

1tY l‰ ˆ

Y lu “

ÿ

Y l“0

1t ˆ

Y l“1u `

ÿ

Y l“1

1t ˆ

Y l“0u § For Hamming loss ˆ

Y0 and ˆ Y1 are the same,

§ Hamming loss does not know anything about sparsity K, § But Hamming is separable, hence easy to optimize.

6 / 13

slide-9
SLIDE 9

Outline

Introduction Framework and notation Motivation Our approach Add weights Numerical results Conclusion

7 / 13

slide-10
SLIDE 10

Our approach: add weights

Weighted Hamming loss

LpY, ˆ Y q “ p0 ÿ

Y l“0

1t ˆ

Y l“1u ` p1

ÿ

Y l“1

1t ˆ

Y l“0u ,

such that p0 ` p1 “ 1.

8 / 13

slide-11
SLIDE 11

Our approach: add weights

Weighted Hamming loss

LpY, ˆ Y q “ p0 ÿ

Y l“0

1t ˆ

Y l“1u ` p1

ÿ

Y l“1

1t ˆ

Y l“0u ,

such that p0 ` p1 “ 1.

Examples

§ Hamming loss: p0 “ p1 “ 0.5 § [Jain et al., 2016] : p0 “ 0 and p1 “ 1 § Our choice: p0 “ 2K L and p1 “ 1 ´ p0

8 / 13

slide-12
SLIDE 12

Why our choice of weights?

Consider the following situation

§ Y “ p1, . . . , 1

loomoon

K

, 0, . . . , 0 loomoon

L´K

qJ

§ ˆ

Y0 “ p0, . . . , 0qJ: predicts all labels inactive,

§ ˆ

Y1 “ p1, . . . , 1qJ: predicts all labels active,

§ ˆ

Y2K “ p1, . . . , 1 loomoon

2K

, 0, . . . , 0 loomoon

L´2K

q: makes K mistakes of 0-type

§ Do not forget that K ! L

9 / 13

slide-13
SLIDE 13

Why our choice of weights?

Consider the following situation

§ Y “ p1, . . . , 1

loomoon

K

, 0, . . . , 0 loomoon

L´K

qJ

§ ˆ

Y0 “ p0, . . . , 0qJ: predicts all labels inactive,

§ ˆ

Y1 “ p1, . . . , 1qJ: predicts all labels active,

§ ˆ

Y2K “ p1, . . . , 1 loomoon

2K

, 0, . . . , 0 loomoon

L´2K

q: makes K mistakes of 0-type

§ Do not forget that K ! L

Classical Hamming loss

§ ˆ

Y1 is almost the worst

§ ˆ

Y0 is the same as ˆ Y2K

9 / 13

slide-14
SLIDE 14

Why our choice of weights?

Consider the following situation

§ Y “ p1, . . . , 1

loomoon

K

, 0, . . . , 0 loomoon

L´K

qJ

§ ˆ

Y0 “ p0, . . . , 0qJ: predicts all labels inactive,

§ ˆ

Y1 “ p1, . . . , 1qJ: predicts all labels active,

§ ˆ

Y2K “ p1, . . . , 1 loomoon

2K

, 0, . . . , 0 loomoon

L´2K

q: makes K mistakes of 0-type

§ Do not forget that K ! L

[Jain et al., 2016]

§ ˆ

Y0 is the worst

§ ˆ

Y1 is the same as ˆ Y2K

9 / 13

slide-15
SLIDE 15

Why our choice of weights?

Consider the following situation

§ Y “ p1, . . . , 1

loomoon

K

, 0, . . . , 0 loomoon

L´K

qJ

§ ˆ

Y0 “ p0, . . . , 0qJ: predicts all labels inactive,

§ ˆ

Y1 “ p1, . . . , 1qJ: predicts all labels active,

§ ˆ

Y2K “ p1, . . . , 1 loomoon

2K

, 0, . . . , 0 loomoon

L´2K

q: makes K mistakes of 0-type

§ Do not forget that K ! L

Our choice

§ ˆ

Y0, ˆ Y1 are almost the worst

§ ˆ

Y2K is almost the best

9 / 13

slide-16
SLIDE 16

Outline

Introduction Framework and notation Motivation Our approach Add weights Numerical results Conclusion

10 / 13

slide-17
SLIDE 17

Numerical results

Synthetic dataset with controlled sparsity: N “ 2D “ 2L “ 200

Settings Median output sparsity Recall (micro) Precision (micro) Our Std Our Std Our Std K “ 2 2.47 0.04 1.0 0.02 0.80 1.0 K “ 6 6.83 0.43 1.0 0.07 0.88 1.0 K “ 10 9.85 1.81 0.90 0.18 0.91 1.0 K “ 14 10.90 4.11 0.72 0.29 0.93 0.99 K “ 18 10.98 6.61 0.58 0.36 0.95 0.99

§ When K ! L we output MORE active labels, § Hence, better Recall and worse Precision, § When K ą 10 our setting are violated.

11 / 13

slide-18
SLIDE 18

Conclusion

§ For sparse datasets: errors of 0/1-type are not the same for a

user;

§ Use our framework if you agree with the previous idea; § We do not introduce a new algorithm per se, but we construct

a new loss;

§ We provide a theoretical justification to our framework

(generalization bounds and analysis of convex surrogates).

12 / 13

slide-19
SLIDE 19

Thank you for your attention!

13 / 13