Top Banner
Introduction to Active Learning AL & Continuous Black-Box Optimization Active Learning in Regression Tasks Jakub Repick´ y Faculty of Mathematics and Physics, Charles University Institute of Computer Science, Czech Academy of Sciences Selected Parts of Data Mining Dec 01 2017, Prague Jakub Repick´ y Active Learning in Regression Tasks
41

Active Learning in Regression Tasks - cvut.cz

Jun 09, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Active Learning in Regression Tasks

Jakub Repicky

Faculty of Mathematics and Physics,Charles University

Institute of Computer Science,Czech Academy of Sciences

Selected Parts of Data MiningDec 01 2017, Prague

Jakub Repicky

Active Learning in Regression Tasks

Page 2: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

1 Introduction to Active LearningMotivationActive Learning ScenariosUncertainty SamplingVersion Space ReductionVariance Reduction

2 AL & Continuous Black-Box OptimizationMotivationBayesian OptimizationSurrogate Models

Jakub Repicky

Active Learning in Regression Tasks

Page 3: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Bibliography

Burr Settles. Active Learning.Synthesis Lectures on ArtificialIntelligence and MachineLearning 6 (1), 1-114.

Jakub Repicky

Active Learning in Regression Tasks

Page 4: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Motivation

Definition

Active learning

Machine learning algorithms that aim at reducing the trainingeffort by posing queries to an oracle.

Targets tasks, in which:

Unlabeled data are abundant

Obtaining unlabeled instances is cheap

Labeling is expensive

Jakub Repicky

Active Learning in Regression Tasks

Page 5: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Motivation

Motivation

Examples of expensive labeling tasks

Annotation of domain-specific data

Extracting structured information from documents ormulti-media

Transcribing speech

Testing scientific hypotheses

Evaluating engineering designs by numerical simulations

. . .

Jakub Repicky

Active Learning in Regression Tasks

Page 6: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Active Learning Scenarios

Query Synthesis

Learner may inquire about any instance from the input space

May create uninterpretable queries

Applicable for non-human oracles (e. g., scientific experiments)

(Lang and Baum, 1992) (King, 2004)

Jakub Repicky

Active Learning in Regression Tasks

Page 7: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Active Learning Scenarios

Selective (Stream-Based) Sampling

Drawing (observing) instances from an inputsource

The learner decides whether to discard orquery the instance

Applicable on sequential or large data

Jakub Repicky

Active Learning in Regression Tasks

Page 8: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Active Learning Scenarios

Pool-Based Sampling

A small set L of labeled instances

A large pool U of unlabeled instances

Instances selected from L according to a utility measureevaluated on UMost widely used in applications (information extraction, textclassification, speech recognition, . . . )

Jakub Repicky

Active Learning in Regression Tasks

Page 9: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Uncertainty Sampling

Pool-Based Uncertainty Sampling

1 L – initial set of labeled instances

2 U – pool of unlabeled instances

3 while true1 θ Ð model trained on L2 x˚ Ð the most uncertain instance according to θ3 y˚ Ð label for x˚ from the oracle4 LÐ LY px˚, y˚q

5 U Ð U px˚q

Jakub Repicky

Active Learning in Regression Tasks

Page 10: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Uncertainty Sampling

Uncertainty Measures – Least confident

x˚LC “ argminx

Pθpy|xq

“ argmaxx

1´ Pθpy|xq

y “ argmaxy Pθpy|xq

minimizes the expected zero-one loss

Only the most likely prediction is considered

Jakub Repicky

Active Learning in Regression Tasks

Page 11: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Uncertainty Sampling

Uncertainty Measures – Margin

x˚M “ argminx

pPθpy1|xq ´ Pθpy2|xqq

“ argmaxx

pPθpy2|xq ´ Pθpy1|xqq

y1 and y2 – the first and second most likely classes,respectively

Still ignores the remainder of the predictive distribution

Jakub Repicky

Active Learning in Regression Tasks

Page 12: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Uncertainty Sampling

Uncertainty Measures – Entropy

x˚H “ argmaxx

HpY |xq

“ argmaxx

´ÿ

y

Pθpy|xq logPθpy|xq

Maximizes the expected log-loss

Shannon entropy H – the expected self-information of arandom variable

Jakub Repicky

Active Learning in Regression Tasks

Page 13: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Uncertainty Sampling

Uncertainty Measures

least confident margin entropy

Ternary distributions

Jakub Repicky

Active Learning in Regression Tasks

Page 14: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Uncertainty Sampling

Uncertainty Sampling in RegressionNormal distribution maximizes entropy given a varianceVariance-based uncertainty sampling equivalent toentropy-based sampling under assumption of normalityRequires estimation of variance

(Settles, 2012)

Variance-based sampling for a 2-layer perceptron

Jakub Repicky

Active Learning in Regression Tasks

Page 15: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Uncertainty Sampling

Uncertainty Sampling Caveats

Utility measures based on a single hypothesis

Training set L is very small

As a result, sampling bias is introduced

(Settles, 2012)

Jakub Repicky

Active Learning in Regression Tasks

Page 16: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Version Space Reduction

Version Space

Hypothesis H – a concrete modelparametrization

Hypothesis space H – the set of allhypotheses allowed by the model class

Version space V Ď H – the set of allhypotheses consitent with data

Active learning Ñ try to reduce V as quicklyas possible

(Settles, 2012)

Jakub Repicky

Active Learning in Regression Tasks

Page 17: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Version Space Reduction

Query by Disagreement

1 V Ď H – the version and hypothesis spaces, resp.

2 L – the initial set of labeled instances

3 repeat1 receive x „ X {the stream scenario}2 if Dh1, h2 P V, h1pxq ‰ h2pxq then

query label y for xL Ð L Y px, yq

V Ð th : h consistent with Lu

3 else

discard x

4 return L

Jakub Repicky

Active Learning in Regression Tasks

Page 18: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Version Space Reduction

Practical Query by Disagreement

Version space V might be uncountable and thus unrepresentable

Speculative hypotheses approach

h1 Ð trainpLY px,‘qqh2 Ð trainpLY px,aqq

Specific-General (SG) approach

A conservative hS and a liberal hG hypothesisApproximation of region of disagreement byDISpVq « tx P X : hSpxq ‰ hGpxquObtaining hS and hG: assign ‘ and a, in turn, to a sample ofbackground points B Ď U

Jakub Repicky

Active Learning in Regression Tasks

Page 19: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Version Space Reduction

Query by Disagreement – Example

(Settles, 2012)

Jakub Repicky

Active Learning in Regression Tasks

Page 20: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Variance Reduction

Previous heuristics were not aimed at predictive accuracy

The goal: select points that minimize the future expectederror

Equivalent to reducing output variance (Geman et al., 1992):

x˚VR “ argminxPL

ÿ

x1PUVarθ`pY |x

1q

θ` – model after retraining on LY px, yqA straightforward implementation leads to complexityexplosion

Jakub Repicky

Active Learning in Regression Tasks

Page 21: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Variance Reduction

Score

Given a model of random variable Y with parameters θ, the scoreis the gradient of the log likelihood w. r. t. θ:

uθpxq “ ∇θ logLpY |x; θq

“B

BθlogPθpY |xq

Jakub Repicky

Active Learning in Regression Tasks

Page 22: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Variance Reduction

Fisher information is the variance of the score

F pθq “ Varpuθpxqq.

Under some mild assumptions, Eruθpxqs “ 0. Further, it can beshown:

F pθq “ E

«

ˆ

B

BθlogPθpY |xq

˙2ff

“ ´E

B2

Bθ2logPθpY |xq

Expected value of negative Hessian matrix of log likelihood

Expresses the amount of sensitivity of log likelihood w. r. t. tochanges in θ

Jakub Repicky

Active Learning in Regression Tasks

Page 23: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Variance Reduction

Optimal Experimental Design

Cramer–Rao bound

F pθq´1 is a lower bound on the variance of any unbiased estimatorθ of parameters θ.

“Minimize” Fisher information matrix inverse

In general, F is a covariance matrix – what to optimize?

Optimal Experimental Design (Fedorov, 1972) – strategies ofoptimizing real-valued statistics of Fisher information

Using Fisher information, Varθ`pY |xq can be estimatedwithout retraining at each x

Jakub Repicky

Active Learning in Regression Tasks

Page 24: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Variance Reduction

D-Optimal Design

x˚D “ argminx

det´

`

FL ` uθpxquθpxqT˘´1

¯

Can be viewed as a version space reduction strategy

Reduces the amount of uncertainty in the parameter estimates

Jakub Repicky

Active Learning in Regression Tasks

Page 25: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Variance Reduction

A-Optimal Design

x˚A “ argminx

trpAF´1L q

A – a reference matrix

Using Ax “ uθpxquθpxqT as the reference matrix leads to a

variance sampling strategy

trpAxF´1L q “ uθpxq

TF´1L uθpxq

Minimizes the average variance of the parameter estimates

Jakub Repicky

Active Learning in Regression Tasks

Page 26: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Variance Reduction

Fisher information ratio

x˚FIR “ argminx

ÿ

x1PUVarθ`pY |x

1q

“ argminx

ÿ

x1PUtr´

Ax1`

FL ` uθpxquθpxqT˘´1

¯

“ argminx

tr´

FU`

FL ` uθpxquθpxqT˘´1

¯

Ax1 “ uθpx1quθpx

1qT

Indirectly reduces the future output variance after labeling x

Jakub Repicky

Active Learning in Regression Tasks

Page 27: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Variance Reduction

Comparison of Reviewed Strategies (Settles, 2012)Uncertainty sampling

+ simple, fast

– myopic, might be overly confident about incorrect predictions

Query by committee / disagreement

+ usable with any learning algorithm, some theoreticalguarantees

– difficult to train multiple hypotheses, does not try to reducethe expected error

Error / variance reduction

+ optimizes the objection of interest, empiricaly successful

– computationally expensive, difficult to implement

Jakub Repicky

Active Learning in Regression Tasks

Page 28: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Motivation

Definition

Optimize f : X Ñ R on compact X Ď RD

x˚ “ argminxPX

fpxq,

under conditions

Unknown analytical definition of f

Unknown (analytical) derivatives, continuity, convexityproperties

f considered expensive to evaluate

Observations of f -values possibly noisy

Jakub Repicky

Active Learning in Regression Tasks

Page 29: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Motivation

Motivation

Optimization of

Empirical functions:material science,chemistry,. . .

Numerically simulatedfunctions: engineeringdesign optimization

Example: Photonic couplerdesign

(Bekasiewicz and Koziel, 2017)

Jakub Repicky

Active Learning in Regression Tasks

Page 30: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Bayesian Optimization

1 f – the objective function

2 A – initial set of labeled instances

3 repeat1 f Ð build the acquisition function on A2 x˚ Ð argminx f {optimize f}3 y Ð fpx˚q {expensive evaluation}4 AÐ AY px˚, yq

Jakub Repicky

Active Learning in Regression Tasks

Page 31: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Bayesian Optimization

Acquisition Functions

Lower Confidence Bound:

LCBpxq “ fpxq ´ αVarpY |xq

Probability of Improvement

POIpxq “ PY pfpxq ď T q

Expected Improvement

EIpxq “ E`

max

ymin ´ fpxq, 0(˘

Jakub Repicky

Active Learning in Regression Tasks

Page 32: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Surrogate Models

Evolution Strategies

Population-based randomized search using operators ofselection, mutation and recombination

Covariance Matrix Adaptation Evolution Strategy – one of themost successful continuous black-box optimizer

Derandomized mutative parametersInvariant towards rigid transformations of the input spaceInvariant towards strictly monotonic transformations of theoutput space

Jakub Repicky

Active Learning in Regression Tasks

Page 33: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Surrogate Models

pµ , λq-CMA-ES (Hansen, 2001)

<1C1

m1 m1

<1C1 <1C1

m1

<1C1

<1C1<1C1

m1 m2

<1C1

m1 m2

<1C1

<2C2

Jakub Repicky

Active Learning in Regression Tasks

Page 34: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Surrogate Models

Surrogate modeling

Stochastic optimization still requires large no. of functionevaluations

Surrogate models of the objective can be utilized as a heuristic

Two levels of evolution control (EC) are distinguished (Jin,2002)

Generation-based – a fraction of populations is whollyevaluated with the objective functionIndividual-based – a fraction of each population is evaluatedwith the objective function

Jakub Repicky

Active Learning in Regression Tasks

Page 35: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Surrogate Models

Evolution Control

x1

· · ·

g g + 1

Objective function

Surrogate model

x1

· · ·

x1

· · ·

x1

· · ·

Generation-based EC

· · ·

x1 x2

· · ·

xλPre

· · ·

x1 x2

· · ·

xλPre

g g + 1

Objective function

Surrogate model

Individual-based EC

Jakub Repicky

Active Learning in Regression Tasks

Page 36: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Surrogate Models

Active Learning in Individual-Based EC

Given an extended population and a surrogate model of theobjective function

Select the most promising points

Combine optimality w. r. t. to the objective and utility forimproving the model

The same functions as in Bayesian optimization may be used

Lower confidence boundProbability of improvementExpected improvement

Jakub Repicky

Active Learning in Regression Tasks

Page 37: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Surrogate Models

Example – Metamodel Assisted Evolution Strategy(Emmerich, 2002)

1 pop – an initial population

2 f – the objective function

3 C – a pre-selection criterion

4 µ – parent number

5 λ, λPre – population number, extended pop. number

6 repeat1 offspring Ð reproduce(pop)2 offspring Ð mutate(pop)3 offspring Ð select λ best according to C4 pop Ð select µ best according to f

Jakub Repicky

Active Learning in Regression Tasks

Page 38: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Surrogate Models

Experimental comparison

0 1 2log10 of (# f-evals / dimension)

0.0

0.2

0.4

0.6

0.8

1.0Pro

port

ion o

f fu

nct

ion+

targ

et

pair

s

GPOP

CMA-ES

MAES-POI

MAES-MMP

best 2009bbob - f1-f24, 20-D31 target RLs/dim: 0.5..50 from refalgs/best2009-bbob.tar.gz15 instances

v2.1

Selected model-based optimizers and CMA-ES compared on theBlack-Box optimization benchmarking framework

Jakub Repicky

Active Learning in Regression Tasks

Page 39: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Surrogate Models

Further Reading I

Robert Burbidge, Jem J. Rowland, and Ross D. King, Activelearning for regression based on query by committee,pp. 209–218, Springer Berlin Heidelberg, 2007.

David A. Cohn, Neural network exploration using optimalexperiment design, Neural Networks 9 (1996), no. 6, 1071 –1083.

Valerii Fedorov, Theory of optimal experiments designs,Academic press, 01 1972.

Stuart Geman, Elie Bienenstock, and Rene Doursat, Neuralnetworks and the bias/variance dilemma, Neural Computation4 (1992), no. 1, 1–58.

Jakub Repicky

Active Learning in Regression Tasks

Page 40: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Surrogate Models

Further Reading II

David J. C. MacKay, Information-based objective functions foractive data selection, Neural Computation 4 (1992), no. 4,590–604.

Burr Settles, Active learning, Morgan & Claypool Publ., 2012.

Jakub Repicky

Active Learning in Regression Tasks

Page 41: Active Learning in Regression Tasks - cvut.cz

Introduction to Active Learning AL & Continuous Black-Box Optimization

Surrogate Models

Thank you!repicky at cs.cas.cz

Jakub Repicky

Active Learning in Regression Tasks