33
HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Embed Size (px)

Citation preview

Page 1: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

HAITHAM BOU AMMAR

MAASTRICHT UNIVERSITY

Transfer for Supervised Learning Tasks

Page 2: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Motivation

Model

y

x

x€

y

Training Data

?

Test Data

Assumptions: 1.Training and Test are from same distribution 2.Training and Test are in same feature space

Not

Tru

e in

man

y re

al-

wor

ld a

pplica

tion

s

Page 3: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Examples: Web-document Classification

Model

?

PhysicsMachine Learning

Life Science

Page 4: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Examples: Web-document Classification

Model

?

PhysicsMachine Learning

Life Science

Content Change !

Assumption violated!

Learn a new model

Page 5: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Learn new Model :

1.Collect new Labeled Data2.Build new model

Reuse & Adapt already learned model !

Page 6: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Examples: Image Classification

Model OneFeatures Task One

Task O

ne

Page 7: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Examples: Image Classification

Cars

Motorcycles

Task Two

Features Task One

Features Task Two

Reuse

Model Two

Page 8: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Traditional Machine Learning vs. Transfer

Source Task

Knowledge

Target Task

Learning System

Different Tasks

Learning System

Learning System

Learning System

Traditional Machine Learning

Transfer Learning

Page 9: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Questions ?

Page 10: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Transfer Learning Definition

Notation: Domain :

Feature Space: Marginal Probability Distribution:

with

Given a domain then a task is :

Labe

l

Space P(Y

|X)

Page 11: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Transfer Learning Definition

Given a source domain and source learning task, a target domain and a target learning task, transfer learning aims to help improve the learning of the target predictive function using the source knowledge, where

or

Page 12: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Transfer Definition

Therefore, if either : Domain Differences

Task Differences

Page 13: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Examples: Cancer Data

Age Smoking

Age Height Smoking

Page 14: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Examples: Cancer Data

Task

Sour

ce: C

lass

ify

into

can

cer o

r no

canc

erTa

sk T

arge

t: C

lass

ify

into

can

cer le

vel o

ne,

canc

er le

vel t

wo,

canc

er le

vel t

hree

Page 15: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Quiz

When doesn’t transfer help ? (Hint: On what should you

condition?)

Page 16: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Questions ?

Page 17: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Questions to answer when transferringW

hat to

Tra

nsfe

r ?

How

to T

ransf

er ?

When

to

Tra

nsf

er ?

Inst

ance

s

?

Mod

el ?

Featu

res ?

Map

M

odel

?

Uni

fy

Feat

ures

?

Wei

ght

Inst

ance

s ?

In w

hich

Situ

atio

ns

Page 18: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Algorithms: TrAdaBoost

Assumptions: Source and Target task have same feature space:

Marginal distributions are different:

Not all source data might be helpful !

Page 19: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Algorithms: TrAdaBoost (Quiz)

Wha

t to

Trans

fer ?

How

to T

rans

fer ?

Inst

ance

s

Wei

ght I

nsta

nces

Page 20: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Algorithm: TrAdaBoost

Idea: Iteratively reweight source samples such that:

reduce effect of “bad” source instances encourage effect of “good” source instances

Requires: Source task labeled data set Very small Target task labeled data set Unlabeled Target data set Base Learner

Page 21: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Algorithm: TrAdaBoost

Weights Initialization

Hypothesis Learning and error calculation

Weights Update

Page 22: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Questions ?

Page 23: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Algorithms: Self-Taught Learning

Problem Targeted is :

1.Little labeled data

2.A lot of unlabeled data

Build a model on the labeled data

Natural scenes

Car

Motorcycl

e

Page 24: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Algorithms: Self-Taught Learning

Assumptions: Source and Target task have different feature space:

Marginal distributions are different:

Label Space is different:

Page 25: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Algorithms: Self-Taught Learning (Quiz)

Wha

t to

Trans

fer ?

How

to T

rans

fer ?

1. D

iscov

er

Featu

res

2. U

nify

Fea

ture

s

Featu

res

Page 26: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Algorithms: Self-Taught Learning

Framework: Source Unlabeled data set:

Target Labeled data set: Natural

scenes

Build classifier for cars and Motorbikes

Page 27: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Algorithms: Self-Taught Learning

Step One: Discover high level features from Source data by

Regularization Term Re-construction Error

Constraint on the Bases

Page 28: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Algorithm: Self-Taught Learning

Unlabeled Data Set

Hig

h Le

vel F

eatu

res

Page 29: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Algorithm: Self-Taught Learning

Step Two: Project target data onto the attained features by

Informally, find the activations in the attained bases such that: 1.Re-construction is minimized 2.Attained vector is sparse

Page 30: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Algorithms: Self-Taught Learning

Hig

h Lev

el F

eatu

res

Page 31: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Algorithms: Self-Taught Learning

Step Three: Learn a Classifier with the new features

Target Task

Source Task

Learn new features (Step 1)

Project target data (Step 2)Learn Model (Step 3)

Page 32: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

Conclusions

Transfer learning is to re-use source knowledge to help a target learner

Transfer learning is not generalization

TrAdaBoot transfers instances

Self-Taught learning transfer unlabeled features

Page 33: HAITHAM BOU AMMAR MAASTRICHT UNIVERSITY Transfer for Supervised Learning Tasks

hmm