neural networks: old and new · arti cial neural networks brain neural networks credit: max pixel...

31
Neural Networks: Old and New Ju Sun Computer Science & Engineering University of Minnesota, Twin Cities September 14, 2020 1 / 31

Upload: others

Post on 19-Oct-2020

48 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Neural Networks: Old and New

Ju Sun

Computer Science & Engineering

University of Minnesota, Twin Cities

September 14, 2020

1 / 31

Page 2: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Outline

Start from neurons

Shallow to deep neural networks

A brief history of AI

Suggested reading

2 / 31

Page 3: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Model of biological neurons

Credit: Stanford CS231N

Biologically ...

– Each neuron receives signals from its dendrites

– Each neuron outputs signals via its single axon

– The axon branches out and connects via synapese to dendrites

of other neurons

3 / 31

Page 4: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Model of biological neurons

Credit: Stanford CS231N

Mathematically ...

– Each neuron receives xi’s from its dendrites

– xi’s weighted by wi’s (synaptic strengths) and summed∑

i wixi

– The neuron fires only when the combined signal is above a certain

threshold:∑

i wixi + b

– Fire rate is modeled by an activation function f , i.e., outputting

f (∑

i wixi + b)4 / 31

Page 5: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Artificial neural networks

Brain neural networks

Credit: Max Pixel

Artificial neural networks

Why called artificial?

– (Over-)simplification on neural level

– (Over-)simplification on connection level

In this course, neural networks are always artificial.

5 / 31

Page 6: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Outline

Start from neurons

Shallow to deep neural networks

A brief history of AI

Suggested reading

6 / 31

Page 7: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Artificial neurons

f

(∑i

wixi + b

)= f (wᵀx+ b)

We shall use σ instead of f

henceforth.

Examples of activation function σ

Credit: [Hughes and Correll, 2016]

7 / 31

Page 8: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Neural networks

One neuron: σ (wᵀx+ b)

Neural networks (NN): structured organization of artificial

neurons

w’s and b’s are unknown and need to be learned

Many models in machine learning are neural networks

8 / 31

Page 9: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

A typical setup

Supervised Learning

– Gather training data (x1,y1) , . . . , (xn,yn)

– Choose a family of functions, e.g., H, so that there is f ∈ H to

ensure yi ≈ f (xi) for all i

– Set up a loss function ` to measure the approximation quality

– Find an f ∈ H to minimize the average loss

minf∈H

1

n

n∑i=1

` (yi, f (xi))

... known as empirical risk minimization (ERM) framework in

learning theory

9 / 31

Page 10: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

A typical setup

Supervised Learning from NN viewpoint

– Gather training data (x1,y1) , . . . , (xn,yn)

– Choose a NN with k neurons, so that there is a group of

weights, e.g., (w1, . . . ,wk, b1, . . . , bk), to ensure

yi ≈ {NN (w1, . . . ,wk, b1, . . . , bk)} (xi) ∀i

– Set up a loss function ` to measure the approximation quality

– Find weights (w1, . . . ,wk, b1, . . . , bk) to minimize the average

loss

minw′s,b′s

1

n

n∑i=1

` [yi, {NN (w1, . . . ,wk, b1, . . . , bk)} (xi)]

10 / 31

Page 11: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Linear regression

Credit: D2L

– Data: (x1, y1) , . . . , (xn, yn), xi ∈ Rd

– Model: yi ≈ wᵀxi + b

– Loss: ‖y − y‖22– Optimization:

minw,b

1

n

n∑i=1

‖yi − (wᵀxi + b)‖22

Credit: D2L

σ is the identity function 11 / 31

Page 12: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Perceptron

Frank Rosenblatt

(1928–1971)

– Data: (x1, y1) , . . . , (xn, yn),

xi ∈ Rd, yi ∈ {+1,−1}

– Model: yi ≈ σ (wᵀxi + b), σ sign

function

– Loss: 1 {y 6= y}

– Optimization:

minw,b

1

n

n∑i=1

1 {yi 6= σ (wᵀxi + b)}

12 / 31

Page 13: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Perceptron

Perceptron is a single artificial neuron for binary classification

dominated early AI (50’s – 70’s)

Logistic regression is similar but with sigmod activiation

13 / 31

Page 14: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Softmax regression

– Data: (x1, y1) , . . . , (xn, yn), xi ∈ Rd, yi ∈ {L1, . . . , Lp}, i.e.,

multiclass classification problem

– Data preprocessing: labels into vectors via one-hot encoding

Lk =⇒ [0, . . . , 0,︸ ︷︷ ︸k−1 0′s

, 1, 0, . . . , 0︸ ︷︷ ︸n−k 0′s

]ᵀ

So: yi =⇒ yi

– Model: yi ≈ σ (Wᵀxi + b), here σ is the softmax function (maps

vectors to vectors): for z ∈ Rp,

z 7→

[ez1∑j e

zj, . . . ,

ezp∑j e

zj

]ᵀ.

– Loss: cross-entropy loss −∑

j yj log yj

– Optimization ...

14 / 31

Page 15: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Softmax regression

... for multiclass classification

Credit: D2L

15 / 31

Page 16: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Multilayer perceptrons

Credit: D2L

Model: yi ≈ σ2 (Wᵀ2σ1(W

ᵀ1x+ b1) + b2)

Also called feedforward networks or fully-connected networks

Modern NNs: many hidden layers (deep), refined connection

structure and/or activations

16 / 31

Page 17: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

They’re all (shallow) NNs

– Linear regression

– Perception and Logistic regression

– Softmax regression

– Multilayer perceptron (feedforward NNs)

– Support vector machines (SVM)

– PCA (autoencoder)

– Matrix factorization

see, e.g., Chapter 2 of [Aggarwal, 2018].

17 / 31

Page 18: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Outline

Start from neurons

Shallow to deep neural networks

A brief history of AI

Suggested reading

18 / 31

Page 19: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Birth of AI

– Crucial precursors: first computer, Turing test

– 1956: Dartmouth Artificial Intelligence Summer Research

Project — Birth of AI

19 / 31

Page 20: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Turing test

Turing Test Alan Turing (1912–1954)

20 / 31

Page 21: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

First golden age

Symbolic AI: based on rules and logic

rules for recognizing dogs?21 / 31

Page 22: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

First AI winter

Gartner hype cycle

22 / 31

Page 23: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Perceptron

invented 1962

written in 1969, end of

Perceptron eraMarvin Minsky (1927–2016)

23 / 31

Page 24: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Birth of computer vision

1966

around 1980

24 / 31

Page 25: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Second golden age

expert system

Can we build comprehensive

knowledge bases and know all

rules?25 / 31

Page 26: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Big bang in DNNs

26 / 31

Page 27: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

After 2nd AI winter

Machine learning takes over ...

27 / 31

Page 28: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Golden age of Machine learning

Starting 1990’s

Support vector machines (SVM)

Adaboost

Decision trees and random forests

Deep learning

...

28 / 31

Page 29: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Outline

Start from neurons

Shallow to deep neural networks

A brief history of AI

Suggested reading

29 / 31

Page 30: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

Suggested reading

– Chap 2, Neural Networks and Deep Learning.

– Chap 3–4, Dive into Deep Learning.

– Chap 1, Deep Learning with Python.

30 / 31

Page 31: Neural Networks: Old and New · Arti cial neural networks Brain neural networks Credit: Max Pixel Arti cial neural networks Why called arti cial? {(Over-)simpli cation on neural level

References i

[Aggarwal, 2018] Aggarwal, C. C. (2018). Neural Networks and Deep Learning.

Springer International Publishing.

[Hughes and Correll, 2016] Hughes, D. and Correll, N. (2016). Distributed machine

learning in materials that couple sensing, actuation, computation and

communication. arXiv:1606.03508.

31 / 31