Generalization bounds

Similar documents
The sample complexity of agnostic learning with deterministic labels

COMS 4771 Introduction to Machine Learning. Nakul Verma

IFT Lecture 7 Elements of statistical learning theory

Lecture Learning infinite hypothesis class via VC-dimension and Rademacher complexity;

The PAC Learning Framework -II

Computational Learning Theory: Probably Approximately Correct (PAC) Learning. Machine Learning. Spring The slides are mainly from Vivek Srikumar

An Introduction to Statistical Theory of Learning. Nakul Verma Janelia, HHMI

Introduction to Machine Learning (67577) Lecture 3

Computational and Statistical Learning Theory

Computational Learning Theory

Introduction and Models

Introduction to Statistical Learning Theory

Consistency of Nearest Neighbor Methods

Understanding Generalization Error: Bounds and Decompositions

On the Generalization Ability of Online Strongly Convex Programming Algorithms

Machine Learning. Computational Learning Theory. Eric Xing , Fall Lecture 9, October 5, 2016

Computational Learning Theory

Computational and Statistical Learning theory

Active Learning: Disagreement Coefficient

Introduction to Statistical Learning Theory

PAC Learning. prof. dr Arno Siebes. Algorithmic Data Analysis Group Department of Information and Computing Sciences Universiteit Utrecht

Machine Learning. Lecture 9: Learning Theory. Feng Li.

1 Review of The Learning Setting

Machine Learning. VC Dimension and Model Complexity. Eric Xing , Fall 2015

VC Dimension Review. The purpose of this document is to review VC dimension and PAC learning for infinite hypothesis spaces.

Support vector machines Lecture 4

Logistic Regression. Machine Learning Fall 2018

Empirical Risk Minimization

Introduction to Machine Learning

Machine Learning Theory (CS 6783)

Foundations of Machine Learning

1 Learning Linear Separators

Generalization Bounds

Does Unlabeled Data Help?

Introduction to Machine Learning

CSE 417T: Introduction to Machine Learning. Lecture 11: Review. Henry Chai 10/02/18

Hierarchical Concept Learning

Lecture 7 Introduction to Statistical Decision Theory

Discriminative Models

The No-Regret Framework for Online Learning

PAC Learning Introduction to Machine Learning. Matt Gormley Lecture 14 March 5, 2018

Agnostic Online learnability

Machine Learning. Computational Learning Theory. Le Song. CSE6740/CS7641/ISYE6740, Fall 2012

Online Convex Optimization

Lecture 8. Instructor: Haipeng Luo

Discriminative Models

Lecture 2 Machine Learning Review

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Intro to Learning Theory Date: 12/8/16

Generalization Bounds in Machine Learning. Presented by: Afshin Rostamizadeh

1 A Lower Bound on Sample Complexity

ORIE 4741: Learning with Big Messy Data. Generalization

Learning with multiple models. Boosting.

2 Upper-bound of Generalization Error of AdaBoost

CSE 417T: Introduction to Machine Learning. Final Review. Henry Chai 12/4/18

Computational and Statistical Learning Theory

Bregman Divergence and Mirror Descent

Machine Learning Lecture 7

COS 511: Theoretical Machine Learning. Lecturer: Rob Schapire Lecture #5 Scribe: Allen(Zhelun) Wu February 19, ). Then: Pr[err D (h A ) > ɛ] δ

Domain Adaptation Can Quantity Compensate for Quality?

Introduction to Bayesian Learning. Machine Learning Fall 2018

Information, Learning and Falsification

1 Differential Privacy and Statistical Query Learning

10.1 The Formal Model

COS 511: Theoretical Machine Learning. Lecturer: Rob Schapire Lecture 24 Scribe: Sachin Ravi May 2, 2013

Algorithm-Independent Learning Issues

1 Active Learning Foundations of Machine Learning and Data Science. Lecturer: Maria-Florina Balcan Lecture 20 & 21: November 16 & 18, 2015

The Perceptron algorithm

Online Learning, Mistake Bounds, Perceptron Algorithm

Computational and Statistical Learning Theory

THE VAPNIK- CHERVONENKIS DIMENSION and LEARNABILITY

Understanding Machine Learning A theory Perspective

Computational Learning Theory

Machine Learning

Statistical Learning Learning From Examples

Statistical Machine Learning

Course Notes for EE227C (Spring 2018): Convex Optimization and Approximation

Learning with Rejection

PAC-Bayesian Generalization Bound for Multi-class Learning

Stochastic Gradient Descent

Models of Language Acquisition: Part II

Foundations of Machine Learning On-Line Learning. Mehryar Mohri Courant Institute and Google Research

COS 511: Theoretical Machine Learning. Lecturer: Rob Schapire Lecture #24 Scribe: Jad Bechara May 2, 2018

Bennett-type Generalization Bounds: Large-deviation Case and Faster Rate of Convergence

Sample Complexity of Learning Independent of Set Theory

Computational Learning Theory. Definitions

Introduction to Machine Learning (67577) Lecture 5

1 Learning Linear Separators

Selective Prediction. Binary classifications. Rong Zhou November 8, 2017

Lecture 3: Introduction to Complexity Regularization

Lecture 21: Minimax Theory

Computational learning theory. PAC learning. VC dimension.

Deep Neural Networks: From Flat Minima to Numerically Nonvacuous Generalization Bounds via PAC-Bayes

Machine Learning. Model Selection and Validation. Fabio Vandin November 7, 2017

Advanced Introduction to Machine Learning CMU-10715

Lecture 4: Types of errors. Bayesian regression models. Logistic regression

Machine Learning

Generalization, Overfitting, and Model Selection

1 The Probably Approximately Correct (PAC) Model

COMP9444: Neural Networks. Vapnik Chervonenkis Dimension, PAC Learning and Structural Risk Minimization

Time Series Prediction & Online Learning

Transcription:

Advanced Course in Machine Learning pring 200 Generalization bounds Handouts are jointly prepared by hie Mannor and hai halev-hwartz he problem of characterizing learnability is the most basic question of learning theory A fundamental and long-standing answer, formally proven for supervised classification and regression, is that learnability is equivalent to uniform convergence, and that if a problem is learnable, it is learnable via empirical risk minimization Furthermore, for the problem of binary classification, uniform convergence is equivalent to finite VC dimension In this lecture we will talk about other methods for obtaining generalization bounds and establishing learnability We start with PAC-Bayes bounds which can be though of as an extension to Minimum Description Length (MDL) bounds and Occam s razor Next, we discuss a compression bound which states that if a learning algorithm only uses a small fraction of the training set to form its hypothesis then it generalizes Finally, we turn to online-to-batch conversions In the next lecture we will discuss the General Learning etting (introduced by Vapnik), which includes most statistical learning problems as special cases etup We now return to the familiar learning setup We assume that the data is distributed over some input space X and that the labels are in some space Y Generically, we equip X Y with a probability distribution D We let l : Y Y R be some loss function he hypothesis class is H, where h H is a function from X to Y We define L(h) = X Y D l(h(x), y) 2 PAC-Bayes here are several paradigms for preventing overfitting One popular approach is to restrict the search space to a hypothesis class with bounded VC dimension or a bounded Rademacher complexity Another approach is the Minimum Description Length (MDL) and Occam bounds in which we allow a potentially very large hypothesis class but define a hierarchy over hypotheses and prefer to choose hypotheses that appear higher in the hierarchy he PAC-Bayesian approach further generalizes this idea As in the MDL paradigm, we define a hierarchy over hypotheses in our class H Now, the hierarchy takes the form of a prior distribution over H hat is, we assign a probability (or density if H is continuous) P (h) 0 for each h H and refer to P (h) as the prior score of h Following the Bayesian reasoning approach, the output of the learning algorithm is not necessarily a single hypothesis Instead, the learning process defines a posterior probability over H, which we denote Q One can think on Q as defining a randomized prediction rule as follows Whenever we get a new instance x, we randomly pick a hypothesis h H according to Q and predict h(x) We analyze the expected performance of the probabilistic prediction rule, namely, we are interested in bounding L(h) he following theorem tells us that the difference between the generalization loss and the empirical loss of a posterior Q is bounded by an expression that depends on the Kullback-Leibler divergence between Q and the prior distribution P he Kullback-Leibler is a natural measure of the distance between two distributions and it has various usage in statistics and information theory he theorem suggests that if we would like to minimize the generalization loss of Q we should jointly minimize both the empirical loss of Q and the Kullback-Leibler distance between Q and the prior distribution Generalization bounds-

heorem Let D be an arbitrary distribution over X Y Let H be a hypothesis class and let l be a loss function such that for all h and z we have l(h, z) 0, Let P be a prior distribution over H and let δ (0, ) hen, with probability of at least δ over the choice of an iid training set = {z,, z m } sampled according to D, for all distributions Q over H (even such that depend on ), we have L(h) L (h) + D(Q P ) + ln m/δ, 2(m ) where is the Kullback-Leibler divergence D(Q P ) = ln(q(h)/p (h)) Proof For any function f(), using Markov s inequality: P f() ɛ = P e f() e ɛ e f() e ɛ () Let (h) = L(h) L (h) We will apply q () with the function f() = sup Q 2(m ) ( (h)) 2 D(Q P ) We now turn to bound e f() he main trick is to upper bound f() by using an expression that does not depend on Q but rather depend on the prior probability P o do so, fix some and note that from the definition of D(Q P ) we get that for all Q, 2(m ) ( (h)) 2 D(Q P ) = ln(e 2(m ) (h)2 P (h)/q(h)) ln e 2(m ) (h)2 P (h)/q(h) = ln h P e 2(m ) (h)2, where the inequality follows from Jensen s inequality and the concavity of the log function herefore, (2) e f() h P e 2(m ) (h)2 (3) he advantage of the expression on the right-hand side stems from the fact that we can switch orders of expectation (because P is a prior that does not depend on ) and get that e f() h P e 2(m ) (h)2 (4) Next, we show that for all h we have e 2(m ) (h)2 m o do so, recall that Hoeffding s inequality tells us that P (h) ɛ e 2mɛ2 In xercise we show that this implies that e 2(m ) (h)2 m Combining this with q (4) and plugging into q (2) we get P f() ɛ m e ɛ (5) Denote the right-hand side of the above δ, thus ɛ = ln(m/δ), and we therefore obtain that with probability of at least δ we have that for all Q 2(m ) ( (h)) 2 D(Q P ) ɛ = ln(m/δ) Generalization bounds-2

Rearranging the above and using Jensen s inequality again (the function x 2 is convex) we conclude that ( ) 2 (h) ( (h))2 ln(m/δ) + D(Q P ) 2(m ) (6) xercise Let X be a random variable that satisfies PX ɛ e 2mɛ2 Prove that e 2(m )X2 m 3 Compression Bounds Consider an algorithm which receives a training set of m examples but whose output hypothesis can be determined by only observing a subset of k examples Informally, in this case we can use the error on the rest m k examples as an estimator of the generalization error his is formalized in the following theorem that is stated for classification loss but is valid for any bounded loss We define L I (h) to be the empirical loss of hypothesis h on a subset I of the samples heorem 2 Let = (x, y ),, (x m, y m ) be a sequence of examples and let A() be a learning rule Let I = (i,, i k ) be a sequence of indices from m such that k < m and let J be the rest of the indices in m Assume that there is a deterministic mapping from (x i, y i ),, (x ik, y ik ) to a hypothesis h I such that for all j J we have A()(x j ) = h(x j ) hen, with probability of at least δ we have Proof (k + ) log(m/δ) L D (A()) L J (A()) + m k PL D (A()) L J (A()) ɛ P I st L D (h I ) L J (h I ) ɛ = m k= I: I =k m k= I: I =k PL D (h I ) L J (h I ) ɛ P I P J I L D (h I ) L J (h I ) ɛ By Hoeffding we know that P J I L D (h I ) L J (h I ) ɛ e J ɛ2 herefore, we obtain the bound P I P J I L D (h I ) L J (h I ) ɛ m k e J ɛ2 I: I =k he right-hand side of the above is bounded above by δ/m provided that (k + ) log(m/δ) ɛ J Generalization bounds-3

For such ɛ we obtain which concludes our proof PL D (A()) L J (A()) ɛ m k= δ/m δ, xercises Apply the compression bound given in heorem 2 to derive a generalization bound for the Perceptron algorithm 2 A compression scheme of size k for a concept class C picks from any set of examples consistent with some h C a subset of at most k examples that represents a hypothesis consistent with the whole original training set heorem 2 tells us that the existence of a compression scheme guarantees generalization and thus learnability Prove that the VC dimension of C should be bounded (and in fact, based on the bounds, it should equal k) he opposite question is an open problem proposed by Manfred Warmuth: Does any concept class of VC dimension d has a compression scheme of size d? 4 Online to batch conversions In this section we show that an online algorithm that attains low regret can be converted into a batch learning algorithm that attains low risk uch online-to-batch conversions are interesting both from the practical as from the theoretical perspective Recall that we assume that the sequence of examples are independently and identically distributed according to an unknown distribution D over X Y o emphasize the above fact and to simplify our notation, we denote by Z t the tth example in the sequence and use the shorthand Z j = (Z,, Z j ) = ((x, y ),, (x j, y j )) We denote the tth hypothesis that the online learning algorithm generates by h t Note that h t is a function of Z t and thus it is a random variable (wrt D but also randomization by the online algorithm) We denote the average loss of the online algorithm by M (Z ) = l(h t, Z t ) (7) t= We often omit the dependence of M on Z and use the shorthand M for denoting M (Z ) he rest of this section is organized as follows In ection 4 we show that the expected value of M equals the expected value of t= L D(h t ) hus, the online loss is an un-biased estimator for the average risk of the ensemble (h,, h ) Next, in ection 42 we underscore that regret bounds (ie, bounds on M ) can yield bounds on the average risk of (h,, h ) herefore, there exists at least one hypothesis in the ensemble (h,, h ) whose risk is low ince our goal in batch learning is typically to output a single hypothesis (with low risk), we must find a way to choose a single good hypothesis from the ensemble In ection 43, we discuss several simple procedures for choosing a single good hypothesis from the ensemble 4 Online loss and ensemble s risk Our first theorem shows that the expected value of M equals the expected value of the risk of the ensemble (h,, h ) Generalization bounds-4

heorem 3 Let Z,, Z be a sequence of independent random variables, each of which is distributed according to a distribution D over X Y Let h,, h be the sequence of hypotheses generated by an online algorithm when running on the sequence Z,, Z, and let L D (h) = Z D l(h, Z) hen, Z,,Z L D (h t ) t= = Z,,Z l(h t, Z t ) Proof Using the linearity of expectation and the fact that h t only depends on Z t we have, t= Z l(h t, Z t ) = t= l(h t, Z t ) = Z t= l(h t, Z t ) (8) Z t= t Recall that the law of total expectation implies that for any two random variables R, R 2, and a function f, R f(r ) = R2 R f(r ) R 2 etting R = Z t and R 2 = Z t we get that Z t l(h t, Z t ) = Z t Z t l(h t, Z t ) Z t = Z t L D (h t ) = Z L D (h t ) Combining the above with q (8) concludes our proof he above theorem tells us that in expectation, the online loss equals the average risk of the ensemble of hypotheses generated by the online algorithm he next step is to use our regret bounds from previous lectures to derive bounds on the batch loss 42 From Regret Bounds to Risk Bounds In the previous section we analyzed the risks of the hypotheses generated by an online learning algorithm based on the average online loss, M In previous lectures we analyzed the regret of online algorithms by bounding the online loss, M, in terms of the loss of any competing hypothesis in H In particular, the bound holds for the hypothesis in H whose risk is minimal Formally, assume that the minimum risk is achievable and denote by h a hypothesis st L D (h ) = min h H L D (h) In this section, we derive bounds on M in terms of L D (h ) In the simplest form of regret bounds, there exists a deterministic function B : N R such that h H, l(h t, Z t ) t= t= l(h, Z t ) + B( ) (9) g, for online convex optimization we had B( ) = O( ) We start by deriving a bound on the average risk of the ensemble of hypotheses that the online algorithm generates heorem 4 Assume that the condition stated in heorem 3 holds and that the online algorithm satisfies q (9) hen, Z L D (h t ) L D (h ) + B( ) t= Proof aking expectation of the inequality given in q (9) we obtain Z l(h t, Z t ) Z l(h, Z t ) + B( ) t= t= (0) Generalization bounds-5

ince h does not depend on the choice of Z, we have, Z l(h, Z t ) = Z l(h, Z t ) = t= Combining the above with q (0) and heorem 3 we conclude our proof t= Zt l(h, Z t ) = L D (h ) () t= 43 Choosing a hypothesis from the ensemble In the previous section we showed that regret bounds yield bounds on the average risk of (h,, h ) he goal of this section is two-fold First, we need to output a single hypothesis and thus we must choose a single good hypothesis from (h,, h ) econd, the analysis in the previous section focuses on the expected value of the risk whereas in practice we have a single training set herefore, we must analyze the concentration properties of our online-to-batch conversion schemes 43 Last (with random stopping time) he simplest conversion scheme runs the online algorithm on a sequence of r examples and returns the last hypothesis h r o analyze the risk of h r we assume that r is chosen uniformly at random from {, 2,, }, where is a predefined integer he following lemma shows that the bounds on t L D(h t ) we derived in the previous section can be transformed into a bound on L D (h r ) Lemma Assume that the conditions stated in heorem 3 hold Let h be a hypothesis in H whose risk is minimal and let δ (0, ) Assume that there exists a scalar α such that Z L D (h t ) L D (h ) + α t= Let r and assume that r is uniformly chosen at random from hen, with a probability of at least δ over the choices of Z and r we have L D (h r ) L D (h ) + α δ Proof Let R be the random variable (L D (h r ) L D (h )) From the definition of h as the minimizer of L D (h) we clearly have that R is a non-negative random variable In addition, the assumption in the lemma implies that R α hus, from the Markov inequality etting α a = δ we conclude our proof PR a R a α a Combining the above lemma with heorem 4 we obtain the following: Corollary Assume that the conditions stated in heorem 4 hold Let h be a hypothesis in H whose risk is minimal and let δ (0, ) hen, with a probability of at least δ over the choices of (Z,, Z ) and the index r we have that L D (h r ) L D (h ) + B( ) δ Corollary implies that by running the online algorithm on the first r examples and outputting h r we obtain a batch learning algorithm with a guaranteed risk bound However, the concentration bound given in Corollary depends linearly on /δ, where δ is the confidence parameter Our next conversion scheme is preferable when we are aiming for very high confidence Generalization bounds-6

432 Validation In the validation conversion scheme, we first pick a subset of hypotheses from h,, h and then use a fresh validation set to decide which hypothesis to output We start by using a simple amplification technique (aka boosting the confidence), to construct a few candidate hypotheses such that with confidence δ the risk of at least one of the hypotheses is low heorem 5 Assume that the conditions stated in heorem 3 hold Let s be a positive integer Assume that we reset the online algorithm after each block of /s examples Let h,, h s be a sequence of hypotheses where for each i {, 2,, s}, the hypothesis h i is picked uniformly at random from {h i s+,, h i s+s } hen with a probability of at least e s, there exists i {, 2,, s} such that L D (h i) L D (h ) + e s B(/s) Proof Using Corollary with a confidence value of /e, we know that for all i s, with a probability of at least /e we have that L D (h i) L D (h ) e α(/s) (2) where α(k) = B(k)/k herefore, the probability that for all blocks the above inequality does not hold is at most e s Hence, with a probability of at least e s, at least one of the hypotheses h i satisfies q (2) he above theorem tells us that there exists at least one hypothesis h g {h,, h s} such that L D (h g ) is small o find such a good hypothesis we can use a validation set and choose the hypothesis whose loss on the validation set is minimal Formally, let Z,, Z m be a sequence of random variables that represents a fresh validation set and let h o be the hypothesis in {h,, h s} whose loss over Z,, Z m is minimal Applying standard generalization bounds (eg, q (2) in Boucheron Bousquet and Lugosi, 2005) on the finite hypothesis class {h,, h s} we obtain that there exists a constant C such that L D (h o ) L D (h g ) C L D (h g ) log(s) log(m) + ln ( δ m ) + log(s) log(m) + ln ( ) δ m 433 Averaging If the set of hypotheses is convex and the loss function, l, is convex with respect to h then the risk function is also convex with respect to h herefore, Jensen s inequality implies that L D ( ) h t t= L D (h t ) We can use the above inequality in conjunction with heorem 4 to derive bounds on the expected risk of the averaged hypothesis h = t= h t In particular, the bounds we derived in Corollary hold for h as well If we want to have very high confidence, we can use the amplification technique described in the previous conversion scheme Alternatively, we can use Azuma s inequality to obtain a bound that holds with high probability his is left as an exercise t= Generalization bounds-7