neural networks - pages.cs.wisc.edu

28
slide 1 Neural Networks Part 1 Yingyu Liang [email protected] Computer Sciences Department University of Wisconsin, Madison [Based on slides from Jerry Zhu]

Upload: others

Post on 22-May-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Neural Networks - pages.cs.wisc.edu

slide 1

Neural NetworksPart 1

Yingyu Liang

[email protected]

Computer Sciences Department

University of Wisconsin, Madison

[Based on slides from Jerry Zhu]

Page 2: Neural Networks - pages.cs.wisc.edu

slide 2

Motivation I: learning features

• Example task

indoor outdoor

Experience/Data: images with labels

Indoor

Page 3: Neural Networks - pages.cs.wisc.edu

slide 3

Motivation I: learning features

• Featured designed for the example task

Indoor 0

Extract features

Page 4: Neural Networks - pages.cs.wisc.edu

slide 4

Motivation I: learning features

• More complicated tasks: hard to design

• Would like to learn features

Page 5: Neural Networks - pages.cs.wisc.edu

slide 5

Motivation II: neuroscience

• Inspirations from human brains

• Networks of simple and homogenous units

Page 6: Neural Networks - pages.cs.wisc.edu

slide 7

Motivation II: neuroscience

• Human brain: 100, 000, 000, 000 neurons

• Each neuron receives input from 1,000 others

• Impulses arrive simultaneously

• Added together*

▪ an impulse can either

increase or decrease the

possibility of nerve pulse firing

• If sufficiently strong, a nerve pulse is generated

• The pulse forms the input to other neurons.

• The interface of two neurons is called a synapse

http://www.bris.ac.uk/synaptic/public/brainbasic.html

Page 7: Neural Networks - pages.cs.wisc.edu

slide 8

Successful applications

• Computer vision: object location

Slides from Kaimin He, MSRA

Page 8: Neural Networks - pages.cs.wisc.edu

slide 9

Successful applications

• NLP: Question & Answer

Figures from the paper “Ask Me Anything: Dynamic Memory Networks for Natural Language Processing ”,

by Ankit Kumar, Ozan Irsoy, Peter Ondruska, Mohit Iyyer, James Bradbury, Ishaan Gulrajani, Richard Socher

Page 9: Neural Networks - pages.cs.wisc.edu

slide 10

Successful applications

• Game: AlphaGo

Page 10: Neural Networks - pages.cs.wisc.edu

slide 11

Outline

• A single neuron

▪ Linear perceptron

▪ Non-linear perceptron

▪ Learning of a single perceptron

▪ The power of a single perceptron

• Neural network: a network of neurons

▪ Layers, hidden units

▪ Learning of neural network: backpropagation

▪ The power of neural network

▪ Issues

• Everything revolves around gradient descent

Page 11: Neural Networks - pages.cs.wisc.edu

slide 13

Linear perceptron

1

Page 12: Neural Networks - pages.cs.wisc.edu

slide 14

Learning in linear perceptron

Page 13: Neural Networks - pages.cs.wisc.edu

slide 15

Learning in linear perceptron

Page 14: Neural Networks - pages.cs.wisc.edu

slide 16

Visualization of gradient descent

Page 15: Neural Networks - pages.cs.wisc.edu

slide 17

The (limited) power of linear perceptron

1

Page 16: Neural Networks - pages.cs.wisc.edu

slide 18

Non-linear perceptron

1

Page 17: Neural Networks - pages.cs.wisc.edu

slide 19

Non-linear perceptron

1

Now we see the reason

for bias terms

Page 18: Neural Networks - pages.cs.wisc.edu

slide 20

Non-linear perceptron for AND

Page 19: Neural Networks - pages.cs.wisc.edu

slide 21

Example Question

?Weather

Company

Proximity

• Will you go to the festival?

• Go only if at least two conditions are favorable

All inputs are binary; 1 is favorable

Page 20: Neural Networks - pages.cs.wisc.edu

slide 22

Example Question

?Weather

Company

Proximity

• Will you go to the festival?

• Go only if Weather is favorable and at least one of

the other two conditions is favorable

All inputs are binary; 1 is favorable

Page 21: Neural Networks - pages.cs.wisc.edu

slide 23

Sigmod activation function:

Our second non-linear perceptron•

Page 22: Neural Networks - pages.cs.wisc.edu

slide 24

Sigmod activation function:

Our second non-linear perceptron•

Page 23: Neural Networks - pages.cs.wisc.edu

slide 25

Sigmod activation function:

Our second non-linear perceptron•

Page 24: Neural Networks - pages.cs.wisc.edu

slide 26

Learning in non-linear perceptron

Page 25: Neural Networks - pages.cs.wisc.edu

slide 27

The (limited) power of non-linear perceptron

• Even with a non-linear sigmoid function, the decision

boundary a perceptron can produce is still linear

• AND, OR, NOT revisited

• How about XOR?

Page 26: Neural Networks - pages.cs.wisc.edu

slide 28

The (limited) power of non-linear perceptron

• Even with a non-linear sigmoid function, the decision

boundary a perceptron can produce is still linear

• AND, OR, NOT revisited

• How about XOR?

• This contributed to the first AI winter

Page 27: Neural Networks - pages.cs.wisc.edu

slide 29

Brief history of neural networks

Page 28: Neural Networks - pages.cs.wisc.edu

slide 30

(Multi-layer) neural network

• Given sigmoid perceptrons

• Can you produce output like

• which had non-linear decision boundarys

0 1 0 1 0