machinelearningwithstructuredoutputs: a glimpseoverthetopic€¦ · amorecomplexsetting:...

38
Machine Learning With Structured Outputs: a Glimpse Over the Topic Rémi Lajugie Inria Junior Seminar April 21, 2015 1/22

Upload: others

Post on 30-Apr-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Machine Learning With Structured Outputs: aGlimpse Over the Topic

Rémi Lajugie

Inria Junior Seminar

April 21, 2015

1/22

Page 2: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

2/22

Page 3: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Introduction

Some topics of interest among SIERRA people:I Machine learning in a broad sense.

I Signal processing (image, videos, audio...).I Optimization (CONVEX !!!).I Statistics (change-point detection problem).I Structured prediction.

3/22

Page 4: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Introduction

Some topics of interest among SIERRA people:I Machine learning in a broad sense.I Signal processing (image, videos, audio...).

I Optimization (CONVEX !!!).I Statistics (change-point detection problem).I Structured prediction.

3/22

Page 5: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Introduction

Some topics of interest among SIERRA people:I Machine learning in a broad sense.I Signal processing (image, videos, audio...).I Optimization (CONVEX !!!).

I Statistics (change-point detection problem).I Structured prediction.

3/22

Page 6: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Introduction

Some topics of interest among SIERRA people:I Machine learning in a broad sense.I Signal processing (image, videos, audio...).I Optimization (CONVEX !!!).I Statistics (change-point detection problem).

I Structured prediction.

3/22

Page 7: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Introduction

Some topics of interest among SIERRA people:I Machine learning in a broad sense.I Signal processing (image, videos, audio...).I Optimization (CONVEX !!!).I Statistics (change-point detection problem).I Structured prediction.

3/22

Page 8: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

This presentation

SIERRA Team

Machine Learning in a Nutshell

Structured Outputs in Machine Learning

Dealing with Partial Information: Application to Computer Vision

4/22

Page 9: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Part I : Machine Learning in a nutshell

5/22

Page 10: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Supervised machine learning

Decision

function

Input space Output space

vs

Decision

function

Input space Output space

6/22

Page 11: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Standard Binary Classification Problem

I Ubiquitous in many real life applications (spam classification)I The goal is to build a prediction function from annotated data.I This is the supervised setting.

7/22

Page 12: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Toy example: Day/night classifier

I Sensor to measure light intensity let say x ∈ R, you want topredict whether it is night (0) or day (1).

I The goal is to build a prediction function from annotated data.I Modelize the classifier as being of the following form:

f (x) = 1F (x)>1. where F (x) = wx for some real w ∈ R.I Teacher gives you: (xi , yi ).I Learn f (or F ) by minw∈R

∑i 1f (x)6=yi (Empirical risk

minimization).

8/22

Page 13: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Toy example: Day/night classifier

I Sensor to measure light intensity let say x ∈ R, you want topredict whether it is night (0) or day (1).

I The goal is to build a prediction function from annotated data.I Modelize the classifier as being of the following form:

f (x) = 1F (x)>1. where F (x) = wx for some real w ∈ R.

I Teacher gives you: (xi , yi ).I Learn f (or F ) by minw∈R

∑i 1f (x)6=yi (Empirical risk

minimization).

8/22

Page 14: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Toy example: Day/night classifier

I Sensor to measure light intensity let say x ∈ R, you want topredict whether it is night (0) or day (1).

I The goal is to build a prediction function from annotated data.I Modelize the classifier as being of the following form:

f (x) = 1F (x)>1. where F (x) = wx for some real w ∈ R.I Teacher gives you: (xi , yi ).

I Learn f (or F ) by minw∈R∑

i 1f (x)6=yi (Empirical riskminimization).

8/22

Page 15: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Toy example: Day/night classifier

I Sensor to measure light intensity let say x ∈ R, you want topredict whether it is night (0) or day (1).

I The goal is to build a prediction function from annotated data.I Modelize the classifier as being of the following form:

f (x) = 1F (x)>1. where F (x) = wx for some real w ∈ R.I Teacher gives you: (xi , yi ).I Learn f (or F ) by minw∈R

∑i 1f (x)6=yi (Empirical risk

minimization).

8/22

Page 16: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

In higher dimension (2) : the overfitting problemI For now, the model is linear in the feature x , but what would

have happen if we have let (assuming the underlyingoptimization problem is tractable) F be any function ?

I Now let us consider to be in dimension 2 (imagine that wehave light intensity and volume of noise).

I

0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Light

Sou

nd

Overfitting example

9/22

Page 17: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

In higher dimension (2) : the overfitting problemI For now, the model is linear in the feature x , but what would

have happen if we have let (assuming the underlyingoptimization problem is tractable) F be any function ?

I Now let us consider to be in dimension 2 (imagine that wehave light intensity and volume of noise).

I

0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Light

Sound

Overfitting example

9/22

Page 18: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

OverfittingI Fundamental tradeoff in machine learning

Figure: From wikipedia.

I Two ways to handle overfitting: either by restricting the classof function f you learn: minf ∈F

∑i 1f (x)6=yi

I Or: minf∑

i 1f (x)6=yi +λΩ(f )

I We need to adjust λ or F carefully.

10/22

Page 19: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

OverfittingI Fundamental tradeoff in machine learning

Figure: From wikipedia.

I Two ways to handle overfitting: either by restricting the classof function f you learn: minf ∈F

∑i 1f (x)6=yi

I Or: minf∑

i 1f (x)6=yi +λΩ(f )

I We need to adjust λ or F carefully.

10/22

Page 20: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

OverfittingI Fundamental tradeoff in machine learning

Figure: From wikipedia.

I Two ways to handle overfitting: either by restricting the classof function f you learn: minf ∈F

∑i 1f (x)6=yi

I Or: minf∑

i 1f (x)6=yi +λΩ(f )

I We need to adjust λ or F carefully.10/22

Page 21: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Part II : What I care about: Structured outputs

11/22

Page 22: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Structured outputs

I Beyond binary classification.I Structured outputs arises everywhere: genomics, finance,

images, videos, audio signals,I Historical example: The Optical character recognition

problem.I The idea was not to treat OCR as a sequence of binary

classification problems.I Structure occurs naturally. If two words differs from only one

letter they should be closer.

12/22

Page 23: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

13/22

Page 24: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

What is different from binary classification ?

I Many classes... Y may be huge

I Not all errors are equivalent (“sheep” closer of “ship” than“rotor”), need for a good loss `.

I Overall optimization program is:minf

∑i `(f (x) 6= yi ) + λΩ(f ).

14/22

Page 25: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

What is different from binary classification ?

I Many classes... Y may be hugeI Not all errors are equivalent (“sheep” closer of “ship” than

“rotor”), need for a good loss `.

I Overall optimization program is:minf

∑i `(f (x) 6= yi ) + λΩ(f ).

14/22

Page 26: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

What is different from binary classification ?

I Many classes... Y may be hugeI Not all errors are equivalent (“sheep” closer of “ship” than

“rotor”), need for a good loss `.I Overall optimization program is:

minf∑

i `(f (x) 6= yi ) + λΩ(f ).

14/22

Page 27: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Introduction to my work

15/22

Page 28: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

A more complex setting: Learning a Metric for Audio toAudio Alignment (Lajugie, Garreau et al., 2014)

I Inputs are pair of signals X = (X1,X2) ∈ RT1×p × RT2×p.I We denote by ai the i-th row of X1, and bj the j-th row of X2.I The time warping problem consists in finding a path while

respecting some constraints. The set of paths respecting theseconstraints is Y.

I We assume to be given a similarity measure s(ai , aj)

I We consider the alignment as the maximization of a certaincriterion S(X i

1,X i2) = maxY∈Y Tr(CY ) where Ci ,j = s(i , j) is

some affinity matrix.I Y ∈ Y ⊂ 0, 1T1,T2 is a binary matrix respecting alignment

constraints.

16/22

Page 29: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

A more complex setting: Learning a Metric for Audio toAudio Alignment (Lajugie, Garreau et al., 2014)

I Inputs are pair of signals X = (X1,X2) ∈ RT1×p × RT2×p.I We denote by ai the i-th row of X1, and bj the j-th row of X2.I The time warping problem consists in finding a path while

respecting some constraints. The set of paths respecting theseconstraints is Y.

I We assume to be given a similarity measure s(ai , aj)

I We consider the alignment as the maximization of a certaincriterion S(X i

1,X i2) = maxY∈Y Tr(CY ) where Ci ,j = s(i , j) is

some affinity matrix.I Y ∈ Y ⊂ 0, 1T1,T2 is a binary matrix respecting alignment

constraints.16/22

Page 30: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Learning the Metric for Audio to Audio AlignmentI Problem: How to set the similarity measure S ?

I Learn it from data!I In some contexts we have audio representation in some high

dimensional space (whole spectrogram) with a groundtruthalignment.

I Given N such annotated pairs of signals (X i1,X i

2) with theiroptimal warping Y i , we want to use the empirical riskminimization framework as in the binary case.

I Namely we want to

minS∈S

N∑i=1

`(S(X i1,X i

2),Y i ) + λΩ(S).

I We need to find a good loss between alignments.

17/22

Page 31: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Learning the Metric for Audio to Audio AlignmentI Problem: How to set the similarity measure S ?I Learn it from data!I In some contexts we have audio representation in some high

dimensional space (whole spectrogram) with a groundtruthalignment.

I Given N such annotated pairs of signals (X i1,X i

2) with theiroptimal warping Y i , we want to use the empirical riskminimization framework as in the binary case.

I Namely we want to

minS∈S

N∑i=1

`(S(X i1,X i

2),Y i ) + λΩ(S).

I We need to find a good loss between alignments.

17/22

Page 32: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Learning the Metric for Audio to Audio AlignmentI Problem: How to set the similarity measure S ?I Learn it from data!I In some contexts we have audio representation in some high

dimensional space (whole spectrogram) with a groundtruthalignment.

I Given N such annotated pairs of signals (X i1,X i

2) with theiroptimal warping Y i , we want to use the empirical riskminimization framework as in the binary case.

I Namely we want to

minS∈S

N∑i=1

`(S(X i1,X i

2),Y i ) + λΩ(S).

I We need to find a good loss between alignments.

17/22

Page 33: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Good loss for the learning task.

I Simplest loss: Hamming (counting disagreements)I Loss we are interested in: area.I Have an interpretation in terms of delays with respect to

onset of notes.

Alignement 1

Alignement 2

18/22

Page 34: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

A practical problem: alignment of video scripts with video(Bojanowski, Lajugie et al., 2014)

I We only know the temporal order of actions.I We want to localize them.

19/22

Page 35: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Modelization of weak supervision (1)

I

Fully-supervised

20/22

Page 36: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Modelization of weak supervision (2)

I

Weakly-supervised

Uncertainty about the label

21/22

Page 37: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Conclusion and perspectives

I We are working on the problem of audio to partition.I Weak supervision is probably a major topic for the next few

years.

I Thanks for your attention!

22/22

Page 38: MachineLearningWithStructuredOutputs: a GlimpseOvertheTopic€¦ · Amorecomplexsetting: LearningaMetricforAudioto AudioAlignment(Lajugie,Garreauetal.,2014) I InputsarepairofsignalsX

Conclusion and perspectives

I We are working on the problem of audio to partition.I Weak supervision is probably a major topic for the next few

years.I Thanks for your attention!

22/22