Machine Learning. Neural Networks. (slides from Domingos, Pardo, others)

Similar documents
Machine Learning. Neural Networks. (slides from Domingos, Pardo, others)

Machine Learning. Neural Networks. (slides from Domingos, Pardo, others)

Machine Learning. Neural Networks

Artificial Neural Networks

Neural networks. Chapter 19, Sections 1 5 1

Neural Networks. Chapter 18, Section 7. TB Artificial Intelligence. Slides from AIMA 1/ 21

(Feed-Forward) Neural Networks Dr. Hajira Jabeen, Prof. Jens Lehmann

CSE446: Neural Networks Spring Many slides are adapted from Carlos Guestrin and Luke Zettlemoyer

Neural networks. Chapter 20, Section 5 1

Last update: October 26, Neural networks. CMSC 421: Section Dana Nau

Classification goals: Make 1 guess about the label (Top-1 error) Make 5 guesses about the label (Top-5 error) No Bounding Box

Introduction Biologically Motivated Crude Model Backpropagation

Introduction to Neural Networks

Neural Networks biological neuron artificial neuron 1

Artificial Neural Networks

Data Mining Part 5. Prediction

Neural networks. Chapter 20. Chapter 20 1

Feedforward Neural Nets and Backpropagation

Introduction To Artificial Neural Networks

Administration. Registration Hw3 is out. Lecture Captioning (Extra-Credit) Scribing lectures. Questions. Due on Thursday 10/6

Neural Networks (Part 1) Goals for the lecture

Machine Learning. Neural Networks. Le Song. CSE6740/CS7641/ISYE6740, Fall Lecture 7, September 11, 2012 Based on slides from Eric Xing, CMU

Artificial Neural Networks

Grundlagen der Künstlichen Intelligenz

AN INTRODUCTION TO NEURAL NETWORKS. Scott Kuindersma November 12, 2009

Plan. Perceptron Linear discriminant. Associative memories Hopfield networks Chaotic networks. Multilayer perceptron Backpropagation

Sections 18.6 and 18.7 Artificial Neural Networks

CMSC 421: Neural Computation. Applications of Neural Networks

Artificial Neural Networks" and Nonparametric Methods" CMPSCI 383 Nov 17, 2011!

Multilayer Neural Networks. (sometimes called Multilayer Perceptrons or MLPs)

Course 395: Machine Learning - Lectures

Multilayer Neural Networks. (sometimes called Multilayer Perceptrons or MLPs)

Lecture 4: Perceptrons and Multilayer Perceptrons

Neural Networks. Nicholas Ruozzi University of Texas at Dallas

SPSS, University of Texas at Arlington. Topics in Machine Learning-EE 5359 Neural Networks

COMP9444 Neural Networks and Deep Learning 2. Perceptrons. COMP9444 c Alan Blair, 2017

Neural Networks. CSE 6363 Machine Learning Vassilis Athitsos Computer Science and Engineering Department University of Texas at Arlington

CS:4420 Artificial Intelligence

Unit III. A Survey of Neural Network Model

Artificial Neural Networks. Historical description

Sections 18.6 and 18.7 Artificial Neural Networks

Artificial Neural Networks The Introduction

Artificial Neural Networks. Edward Gatt

DEEP LEARNING AND NEURAL NETWORKS: BACKGROUND AND HISTORY

Machine Learning

Neural Networks and Deep Learning

Artificial Neural Network

ARTIFICIAL INTELLIGENCE. Artificial Neural Networks

Artificial Intelligence

Multilayer Perceptrons (MLPs)

Apprentissage, réseaux de neurones et modèles graphiques (RCP209) Neural Networks and Deep Learning

Artificial Neural Networks (ANN) Xiaogang Su, Ph.D. Department of Mathematical Science University of Texas at El Paso

Incremental Stochastic Gradient Descent

22c145-Fall 01: Neural Networks. Neural Networks. Readings: Chapter 19 of Russell & Norvig. Cesare Tinelli 1

Artificial Neural Networks Examination, June 2005

4. Multilayer Perceptrons

Artifical Neural Networks

How to do backpropagation in a brain

Neural Networks Lecturer: J. Matas Authors: J. Matas, B. Flach, O. Drbohlav

Machine Learning

Neural Networks. Mark van Rossum. January 15, School of Informatics, University of Edinburgh 1 / 28

Machine Learning for Large-Scale Data Analysis and Decision Making A. Neural Networks Week #6

Multilayer Neural Networks

CSE446: Neural Networks Winter 2015

Neural Networks. Single-layer neural network. CSE 446: Machine Learning Emily Fox University of Washington March 10, /9/17

COMP 551 Applied Machine Learning Lecture 14: Neural Networks

Sections 18.6 and 18.7 Analysis of Artificial Neural Networks

Simple Neural Nets For Pattern Classification

Neural Networks DWML, /25

Comments. Assignment 3 code released. Thought questions 3 due this week. Mini-project: hopefully you have started. implement classification algorithms

Introduction to Artificial Neural Networks

Artificial Neural Networks

Neural Networks and the Back-propagation Algorithm

Lecture 4: Feed Forward Neural Networks

Machine Learning Lecture 10

AI Programming CS F-20 Neural Networks

Neural Networks. Xiaojin Zhu Computer Sciences Department University of Wisconsin, Madison. slide 1

Artificial Neural Networks. Q550: Models in Cognitive Science Lecture 5

Revision: Neural Network

Artificial Neural Networks. MGS Lecture 2

COMP-4360 Machine Learning Neural Networks

Neural Networks: Introduction

Artificial Neural Networks. Introduction to Computational Neuroscience Tambet Matiisen

Neural Networks. Fundamentals of Neural Networks : Architectures, Algorithms and Applications. L, Fausett, 1994

Artificial Neural Networks D B M G. Data Base and Data Mining Group of Politecnico di Torino. Elena Baralis. Politecnico di Torino

Classification with Perceptrons. Reading:

Statistical NLP for the Web

EEE 241: Linear Systems

Chapter 2 Single Layer Feedforward Networks

Neural Networks and Fuzzy Logic Rajendra Dept.of CSE ASCET

Artificial Neural Network and Fuzzy Logic

Need for Deep Networks Perceptron. Can only model linear functions. Kernel Machines. Non-linearity provided by kernels

Unit 8: Introduction to neural networks. Perceptrons

Machine Learning Lecture 12

Artificial Neural Networks Examination, March 2004

Neural Networks. Bishop PRML Ch. 5. Alireza Ghane. Feed-forward Networks Network Training Error Backpropagation Applications

Lab 5: 16 th April Exercises on Neural Networks

Pattern Classification

Artificial Neural Networks. Part 2

Multilayer Perceptron

Transcription:

Machine Learning Neural Networks (slides from Domingos, Pardo, others)

For this week, Reading Chapter 4: Neural Networks (Mitchell, 1997) See Canvas For subsequent weeks: Scaling Learning Algorithms toward AI Learning Deep Architectures for AI

Human Brain

Neurons

Input-Output Transformation Input Spikes Output Spike Spike (= a brief pulse) (Excitatory Post-Synaptic Potential)

Human Learning Number of neurons: ~ 10 11 Connections per neuron: ~ 10 3 to 10 5 Neuron switching time: ~ 0.001 second Scene recognition time: ~ 0.1 second 100 inference steps doesn t seem much

Machine Learning Abstraction

Artificial Neural Networks Typically, machine learning ANNs are very artificial, ignoring: Time Space Biological learning processes More realistic neural models exist Hodgkin & Huxley (1952) won a Nobel prize for theirs (in 1963) Nonetheless, very artificial ANNs have been useful in many ML applications

Perceptrons The first wave in neural networks Big in the 1960 s McCulloch & Pitts (1943), Woodrow & Hoff (1960), Rosenblatt (1962)

Problem def: Perceptrons Let f be a target function from X = <x 1, x 2, > where x i {0, 1} to y {0, 1} Given training data {(X 1, y 1 ), (X 2, y 2 ) } Learn h (X ), an approximation of f (X )

A single perceptron x 1 x 0 Bias (x 0 =1,always) w 1 w 0 x 2 Inputs x 3 w 2 w 3 n 1 if σ = i= 0 0 else w i x i > 0 x 4 w 4 x 5 w 5

Logical Operators x 1 x 2 0.5 0.5 x 0-0.8 n 1 if = w i x σ i i= 0 0 else x 0-0.3 > 0 AND x 1-1.0 x 0 0.1 n 1 if = w i x σ i i= 0 0 else > 0 NOT x 1 x 2 0.5 0.5 n 1 if = w i x σ i i= 0 0 else > 0 OR

Learning Weights Perceptron Training Rule Gradient Descent (other approaches: Genetic Algorithms) x 1? x 0? x 2? n 1 if = w i x σ i i= 0 0 else > 0

Perceptron Training Rule Weights modified for each training example Update Rule: w i w i + w i where w = η( t o) x i i learning rate target value perceptron output input value

Perception Training for NOT Initialize: w w = 0, 1 0 x 1 x 0 w 1 w 0 n 1 if = w i x σ i i= 0 0 else > 0 NOT w i w i + w w = η( t o) x i i Work i Start End Bryan Pardo, Machine Learning: EECS 349 Fall 2009 15

What weights make XOR? x 1 x 0? x 2?? n 1 if = w i x σ i i= 0 0 else > 0 No combination of weights works Perceptrons can only represent linearly separable functions

Linear Separability x 2 + + OR + x 1

Linear Separability x 2 + AND x 1

Linear Separability x 2 + XOR + x 1

Perceptron Training Rule Converges to the correct classification IF Cases are linearly separable Learning rate is slow enough Proved by Minsky and Papert in 1969 Killed widespread interest in perceptrons till the 80 s

XOR x 0 0 x 1 x 2-0.6-0.6 0.6 0.6 n 1 if = w i x σ i i= 0 0 else x 0 0 n 1 if = w i x σ i i= 0 0 else > 0 > 0 1 1 x 0 0 n 1 if = w i x σ i i= 0 0 else > 0 XOR

What s wrong with perceptrons? You can always plug multiple perceptrons together to calculate any function. BUT who decides what the weights are? Assignment of error to parental inputs becomes a problem.

Perceptrons use a step function x 1 x 2?? x 0? n 1 if = w i x σ i i= 0 0 else > 0 Perceptron Threshold Step function Small changes in inputs -> either no change or large change in output.

Solution: Differentiable Function x 0? Simple linear function x 1 x 2?? σ = n i= 0 w i x i Varying any input a little creates a perceptible change in the output We can now characterize how error changes w i even in multi-layer case

Measuring error for linear units Output Function σ ( x) = w x Error Measure: E( w ) 1 2 d D ( t o d d 2 ) data target value linear unit output

Gradient Descent Gradient: Training rule:

Gradient Descent Rule D d d d i i o t w w E 2 ) ( 2 1 = D d d i d d x o t ) )( (, + D d d i d d i i x o t w w, ) ( η Update Rule:

Gradient Descent for Multiple Layers x 0 x 1 w ij σ = x 0 n i= 0 w i x i x 0 σ = n i= 0 w i x i XOR? x 2 σ = n i= 0 w i x i We can compute: E w ij =

Gradient Descent vs. Perceptrons Perceptron Rule & Threshold Units Learner converges on an answer ONLY IF data is linearly separable Can t assign proper error to parent nodes Gradient Descent (locally) Minimizes error even if examples are not linearly separable Works for multi-layer networks But linear units only make linear decision surfaces (can t learn XOR even with many layers) And the step function isn t differentiable

Perceptron A compromise function output n 1 if w > = i x i 0 i= 0 0 else Linear output = net = n w i x i i= 0 Sigmoid (Logistic) output = σ ( net) = 1+ 1 e net

The sigmoid (logistic) unit Has differentiable function Allows gradient descent Can be used to learn non-linear functions x 1? σ = n 1+ 1 w i x i e i= 0 x 2?

Logistic function Inputs Output Age 34 Gender 1 Stage 4.5.4.8 Σ 0.6 Probability of beingalive Independent variables Coefficients σ = n 1+ 1 w i x i i= e 0 Prediction

Neural Network Model Inputs Age 34 Gender 2 Stage 4.6.2.1.3.7.2 Σ Σ.4.2.5.8 Σ Output 0.6 Probability of beingalive Independent variables Weights Hidden Layer Weights Dependent variable Prediction

Getting an answer from a NN Inputs Age 34.6 Output Gender 2 Stage 4.1.7.5.8 Σ 0.6 Probability of beingalive Independent variables Weights Hidden Layer Weights Dependent variable Prediction

Getting an answer from a NN Inputs Age 34 Gender 2 Stage 4.3.2.2.5.8 Σ Output 0.6 Probability of beingalive Independent variables Weights Hidden Layer Weights Dependent variable Prediction

Getting an answer from a NN Inputs Age 34 Gender 1 Stage 4.6.2.1.3.7.2.5.8 Σ Output 0.6 Probability of beingalive Independent variables Weights Hidden Layer Weights Dependent variable Prediction

Minimizing the Error Error surface initial error negative derivative final error local minimum w initial w trained positive change

Differentiability is key! Sigmoid is easy to differentiate σ ( y) = σ ( y) (1 σ ( y)) y For gradient descent on multiple layers, a little dynamic programming can help: Compute errors at each output node Use these to compute errors at each hidden node Use these to compute weight gradient

The Backpropagation Algorithm For each input training example, x,t 1. Input instance x to the network and compute the output for every unit u in the network 2. For each output unit k, δ δ k h w ji o o k h w (1 o (1 o ji k h +ηδ )( t kii k hk k outputs x ji o k w 4.Update each network weight ) ) calculateits error term δ 3. For each hidden unit h, calculateits error term δ δ k w ji k h o u

Learning Weights Inputs Age 34 Gender 1 Stage 4.6.2.1.3.7.2.5.8 Σ Output 0.6 Probability of beingalive Independent variables Weights Hidden Layer Weights Dependent variable Prediction

The fine print Don t implement back-propagation Use a package Second-order or variable step-size optimization techniques exist Feature normalization Typical to normalize inputs to lie in [0,1] (and outputs must be normalized) Problems with NN training: Slow training times (though, getting better) Local minima

Minimizing the Error Error surface initial error negative derivative final error local minimum w initial w trained positive change

Expressive Power of ANNs Universal Function Approximator: Given enough hidden units, can approximate any continuous function f Need 2+ hidden units to learn XOR Why not use millions of hidden units? Efficiency (training is slow) Overfitting

Overfitting Real Distribution Overfitted Model

Combating Overfitting in Neural Nets Many techniques Two popular ones: Early Stopping (most popular) Use a lot of hidden units Just don t over-train Cross-validation Test different architectures to choose right number of hidden units

Early Stopping error Overfitted model error a min ( error) a = validation set b = training set error b Stopping criterion Epochs

Learning Rate? A knob you twist empirically Important One popular option: look for validation set acc to decrease/stabilize, then halve learning rate

Modern Neural Networks (Deep Nets) Local minima in large networks is less of an issue Early stopping is useful, but so is initializing at zero and training until almost zero training error count on stochastic gradient descent to perform implicit regularization Also: Dropout Many layers are now common And specific structure: convolution, max pooling

Summary of Neural Networks When are Neural Networks useful? Instances represented by attribute-value pairs Particularly when attributes are real valued The target function is Discrete-valued Real-valued Vector-valued Training examples may contain errors Fast evaluation times are necessary When not? Fast training times are necessary Understandability of the function is required

Summary of Neural Networks Non-linear regression technique that is trained with gradient descent. Question: How important is the biological metaphor?

Other Topics in Neural Nets Batch Move vs. stochastic Auto-Encoders Neural Networks on Silicon

Stochastic vs. Batch Mode Stochastic Gradient Descent

Incremental vs. Batch Mode In Batch Mode we minimize: Same as computing: Δww DD = dd DD Δww dd Then setting ww = ww + Δww DD

Advanced Topics in Neural Nets Batch Move vs. incremental Auto-Encoders Neural Networks on Silicon

Hidden Layer Representations Input->Hidden Layer mapping: representation of input vectors tailored to the task Can also be exploited for dimensionality reduction Form of unsupervised learning in which we output a more compact representation of input vectors <x 1,,x n > -> <x 1,,x m > where m < n Useful for visualization, problem simplification, data compression, etc.

Dimensionality Reduction Model: Function to learn:

Dimensionality Reduction: Example

Dimensionality Reduction: Example

Dimensionality Reduction: Example

Dimensionality Reduction: Example

Advanced Topics in Neural Nets Batch Move vs. incremental Auto-encoders Neural Networks on Silicon

Neural Networks on Silicon Currently: Simulation of continuous device physics (neural networks) Why not skip this? Digital computational model (thresholding) Continuous device physics (voltage)

Example: Silicon Retina Simulates function of biological retina Single-transistor synapses adapt to luminance, temporal contrast Modeling retina directly on chip => requires 100x less power!

Example: Silicon Retina Synapses modeled with single transistors

Luminance Adaptation

Comparison with Mammal Data Real: Artificial:

Graphics and results taken from:

General NN learning in silicon? People seem more excited about / satisfied with GPUs But, that could change