1 / 31

Lecture 1: Learning without Over-learning

Lecture 1: Learning without Over-learning. Isabelle Guyon isabelle@clopinet.com. Machine Learning. Learning machines include : Linear discriminant (including Naïve Bayes) Kernel methods Neural networks Decision trees Learning is tuning: Parameters (weights w or a , threshold b)

tarmon
Download Presentation

Lecture 1: Learning without Over-learning

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 1:Learning withoutOver-learning Isabelle Guyon isabelle@clopinet.com

  2. Machine Learning • Learning machines include: • Linear discriminant (including Naïve Bayes) • Kernel methods • Neural networks • Decision trees • Learning is tuning: • Parameters (weights w or a, threshold b) • Hyperparameters (basis functions, kernels, number of units)

  3. How to Train? • Define a risk functional R[f(x,w)] • Find a method to optimize it, typically “gradient descent” wj wj -  R/wj or any optimization method (mathematical programming, simulated annealing, genetic algorithms, etc.)

  4. What is a Risk Functional? • A function of the parameters of the learning machine, assessing how much it is expected to fail on a given task. R[f(x,w)] Parameter space (w) w*

  5. Example Risk Functionals • Classification: • the error rate • Regression: • the mean square error

  6. x2 x1 Fit / Robustness Tradeoff x2 x1 15

  7. Overfitting Example: Polynomial regression Target: a 10th degree polynomial + noise Learning machine: y=w0+w1x + w2x2 …+ w10x10

  8. Ockham’s Razor • Principle proposed by William of Ockham in the fourteenth century: “Pluralitas non est ponenda sine neccesitate”. • Of two theories providing similarly good predictions, prefer the simplest one. • Shave off unnecessary parameters of your models.

  9. The Power of Amnesia • The human brain is made out of billions of cells or Neurons, which are highly interconnected by synapses. • Exposure to enriched environments with extra sensory and social stimulation enhances the connectivity of the synapses, but children and adolescents can lose them up to 20 million per day.

  10. x1 w1 x2 w2 S f(x) wn xn b 1 Artificial Neurons Cell potential Axon Activation of other neurons Activation function Dendrites Synapses f(x) = w x + b McCulloch and Pitts, 1943

  11. Activation of another neuron xj wj y S Dendrite Synapse Hebb’s Rule wj wj + yi xij Axon Link to “Naïve Bayes”

  12. Weight Decay wj wj + yi xij Hebb’s rule wj(1-g) wj + yi xij Weigh decay g [0, 1], decay parameter

  13. Overfitting Avoidance Example: Polynomial regression Target: a 10th degree polynomial + noise Learning machine: y=w0+w1x + w2x2 …+ w10x10

  14. S xj S S Weight Decay for MLP Replace: wj wj + back_prop(j) by: wj(1-g) wj + back_prop(j)

  15. Theoretical Foundations • Structural Risk Minimization • Bayesian priors • Minimum Description Length • Bayes/variance tradeoff

  16. loss function unknown distribution Risk Minimization • Learning problem: find the best function f(x; w) minimizing a risk functional • R[f] =  L(f(x; w), y) dP(x, y) • Examples are given: (x1, y1), (x2, y2), … (xm, ym)

  17. L(y, f(x)) Decision boundary Margin SVC loss, b=2 max(0, (1- z))2 Adaboost loss e-z logistic loss log(1+e-z) square loss (1- z)2 SVC loss, b=1 max(0, 1-z) 0/1 loss Perceptron loss max(0, -z) z=y f(x) missclassified well classified Loss Functions

  18. Approximations of R[f] • Empirical risk: Rtrain[f] = (1/n)i=1:m L(f(xi; w), yi) • 0/1 loss 1(F(xi)yi) : Rtrain[f] = error rate • square loss (f(xi)-yi)2 : Rtrain[f] = mean square error • Guaranteed risk: With high probability (1-d), R[f]Rgua[f] Rgua[f] =Rtrain[f]+ e(d,C)

  19. Vapnik, 1974 Nested subsets of models, increasing complexity/capacity: S1 S2 … SN S3 Increasing complexity Ga, Guaranteed risk Ga= Tr + e(C) S2 e, Function of Model Complexity C S1 Tr, Training error Complexity/Capacity C Structural Risk Minimization

  20. S1 S2 … SN R capacity SRM Example • Rank with ||w||2 = Si wi2 Sk = { w | ||w||2< wk2 }, w1<w2<…<wk • Minimization under constraint: min Rtrain[f] s.t. ||w||2< wk2 • Lagrangian: Rreg[f,g] = Rtrain[f] + g ||w||2

  21. Gradient Descent Rreg[f] = Remp[f] + l ||w||2SRM/regularization wj wj-  Rreg/wj wj wj-  Remp/wj- 2  l wj wj(1- g)wj-  Remp/wj Weight decay

  22. Multiple Structures • Shrinkage (weight decay, ridge regression, SVM): Sk = { w | ||w||2< wk }, w1<w2<…<wk g1 > g2 > g3 >… > gk (gis the ridge) • Feature selection: Sk = { w | ||w||0< sk }, s1<s2<…<sk (sis the number of features) • Data compression: k1<k2<…<kk (kmay be the number of clusters)

  23. y X Training data: Make K folds Test data Prospective study / “real” validation Hyper-parameter Selection • Learning = adjusting: parameters(w vector). • hyper-parameters(g, s, k). • Cross-validation with K-folds: For various values of g, s, k: - Adjust w on a fraction (K-1)/K of training examples e.g. 9/10th. - Test on 1/K remaining examples e.g. 1/10th. - Rotate examples and average test results (CV error). - Select g, s, k to minimize CV error. - Re-compute w on all training examples using optimal g, s, k.

  24. Bayesian MAP  SRM • Maximum A Posteriori (MAP): f = argmax P(f|D) = argmax P(D|f) P(f) = argmin –log P(D|f) –log P(f) • Structural Risk Minimization (SRM): f = argmin Remp[f] + W[f] Negative log prior = Regularizer W[f] Negative log likelihood = Empirical risk Remp[f]

  25. Example: Gaussian Prior w2 • Linear model: f(x) = w.x • Gaussian prior: P(f) = exp -||w||2/s2 • Regularizer: W[f] = –log P(f) = l ||w||2 w1

  26. Minimum Description Length • MDL: minimize the length of the “message”. • Two part code: transmit the model and the residual. • f = argmin –log2 P(D|f)–log2 P(f) Length of the shortest code to encode the model (model complexity) Residual: length of the shortest code to encode the data given the model

  27. Bias-variance tradeoff • f trained on a training set D of size m (m fixed) • For the square loss: ED[f(x)-y]2 = [EDf(x)-y]2 + ED[f(x)-EDf(x)]2 Variance Bias2 Expected value of the loss over datasets D of the same size Variance f(x) EDf(x) Bias2 y target

  28. The Effect of SRM Reduces the variance… …at the expense of introducing some bias.

  29. Ensemble Methods • Variance can also be reduced with committee machines. • The committee members “vote” to make the final decision. • Committee members are built e.g. with data subsamples. • Each committee member should have a low bias (no use of ridge/weight decay).

  30. Summary • Weight decay is a powerful means of overfitting avoidance (||w||2 regularizer). • It has several theoretical justifications: SRM, Bayesian prior, MDL. • It controls variance in the learning machine family, but introduces bias. • Variance can also be controlled with ensemble methods.

  31. Want to Learn More? • Statistical Learning Theory, V. Vapnik. Theoretical book. Reference book on generatization, VC dimension, Structural Risk Minimization, SVMs, ISBN : 0471030031. • Structural risk minimization for character recognition, I. Guyon, V. Vapnik, B. Boser, L. Bottou, and S.A. Solla. In J. E. Moody et al., editor, Advances in Neural Information Processing Systems 4 (NIPS 91), pages 471--479, San Mateo CA, Morgan Kaufmann, 1992. http://clopinet.com/isabelle/Papers/srm.ps.Z • Kernel Ridge RegressionTutorial, I. Guyon. http://clopinet.com/isabelle/Projects/ETH/KernelRidge.pdf • Feature Extraction: Foundations and Applications. I. Guyon et al, Eds.Book for practitioners with datasets of NIPS 2003 challenge, tutorials, best performing methods, Matlab code, teaching material.http://clopinet.com/fextract-book

More Related