introduction to neural networks

75
Introduction to Neural Networks Kenji Nakayama Kanazawa University, JAPAN 適適適適適適適適 適適適適適

Upload: colby

Post on 06-Jan-2016

32 views

Category:

Documents


0 download

DESCRIPTION

適応システム理論 ガイダンス. Introduction to Neural Networks. Kenji Nakayama Kanazawa University, JAPAN. PPT ファイルの入手方法 http://leo.ec.t.kanazawa-u.ac.jp/~nakayama/ Education 授業科目  Lecture Subjects 適応システム理論 平成22年度 ガイダンス PPT ファイル. Neural Networks. Network Structures Multi-layer Network - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Introduction to Neural Networks

Introduction to Neural Networks

Kenji NakayamaKanazawa University, JAPAN

適応システム理論ガイダンス

Page 2: Introduction to Neural Networks

PPT ファイルの入手方法

http://leo.ec.t.kanazawa-u.ac.jp/~nakayama/Education

授業科目  Lecture Subjects適応システム理論

平成22年度 ガイダンス PPT ファイル

Page 3: Introduction to Neural Networks

Neural Networks

Network Structures   Multi-layer Network   Recurrent Network

Learning Algorithms   Supervised Learning   Unsupervised Learning

Functions   Pattern Mapping and Classification   Estimation and Prediction   Associative Memory   Optimization and Minimization

Page 4: Introduction to Neural Networks

Multi-Layer Neural Networks

Page 5: Introduction to Neural Networks

Artificial Neuron Model

Page 6: Introduction to Neural Networks

Activation (Nonlinear) Function of Neuron

Active

Inactive

Space Separation

u

u

e

ey

1

1

uey

1

1

Page 7: Introduction to Neural Networks

Pattern Classification by Single Neuron

Page 8: Introduction to Neural Networks

Linearly Inseparable Problem

Page 9: Introduction to Neural Networks

Two Layer Neural Network

Page 10: Introduction to Neural Networks

Pattern Classification by Two-Layer NN- Region Separation by Hidden Units-

Page 11: Introduction to Neural Networks

Pattern Classification by Two-Layer NN- Class Separation by Output Unit -

Page 12: Introduction to Neural Networks

Learning of Connection Weights in Single-Layer NN

is minimizedGradient Method

][ 2eE

Page 13: Introduction to Neural Networks

Learning of Connection Weights in Multi-Layer NN- Error Back Propagation Algorithm -

Gradient Method

Chain Rule in Derivative

Page 14: Introduction to Neural Networks

Learning Process (Initial State)

u=0

Page 15: Introduction to Neural Networks

Learning Process (Middle State)

u=0

Page 16: Introduction to Neural Networks

Learning Process (Middle State)

u=0

Page 17: Introduction to Neural Networks

Learning Process (Convergence)

u=0

Page 18: Introduction to Neural Networks

Training and Testing for Pattern Classification

Page 19: Introduction to Neural Networks

Application 1

Prediction of Fog Occurrence

Page 20: Introduction to Neural Networks

Number of Fog Occurrence

Fog is observedevery 30 minutes

Page 21: Introduction to Neural Networks

Neural Network for Prediction

Page 22: Introduction to Neural Networks

Weather Data

・ Temperature・ Atmospheric Pressure・ Humidity ・ Force of Wind・ Direction of Wind・ Cloud Condition・ Past Fog Occurrence ・・・・・20 kinds of weather data are used

Page 23: Introduction to Neural Networks

Connection Weights from Input to Hidden Unit

Page 24: Introduction to Neural Networks

Connection Weights from Hidden to Output

Fog won’t occur

Fog will occur

Page 25: Introduction to Neural Networks

FFT of Connection Weights Used for Predicting Fog

Input→Hidden Unit #6 Input→Hidden Unit #10

Page 26: Introduction to Neural Networks

FFT of Connection Weights for Predicting No Fog

Input→Hidden Unit #3 Input→Hidden Unit #14

Page 27: Introduction to Neural Networks

Prediction Accuracy of Fog and No Fog

Page 28: Introduction to Neural Networks

Application 2

Nonlinear Time Series Prediction

Page 29: Introduction to Neural Networks

Examples of Nonlinear Time SeriesExamples of Nonlinear Time Series

Sunspot

ChaoticSeries

LakeLevel

Page 30: Introduction to Neural Networks

Nonlinear Predictor Combining NN and Linear Filter

Page 31: Introduction to Neural Networks

Prediction Accuracy by Several MethodsPrediction Accuracy by Several Methods

Page 32: Introduction to Neural Networks

Application 3

Prediction of Machine Deformation

Page 33: Introduction to Neural Networks

Numerically Controlled Cutting Machine

Objective

Cutting Tool

Page 34: Introduction to Neural Networks

Deformation of Cutting by Temperature Change

Page 35: Introduction to Neural Networks

Machine Temperature Change in Time

Page 36: Introduction to Neural Networks

Deviation of Cutting by Temperature Change

Tolerance

Page 37: Introduction to Neural Networks

Prediction of Deformation Using NN

Tolerance

Page 38: Introduction to Neural Networks

Predicting Protein Secondary Structure

Application 4

Page 39: Introduction to Neural Networks

Comparison of Predition Accuracy in (A)Single NN in [6], (B)Single NN with η=0.00001, (C)Singl

e NN with Random Noise and η=0.001

(A) (B) (C)Total accuracy Q3

(A) (B) (C) α-helix

(A) (B) (C) β-sheet

Page 40: Introduction to Neural Networks

Brain Computer Interface

Application 5

Page 41: Introduction to Neural Networks

Brain Computer Interface (BCI)

• Measure brain waveforms for subject thinking something (mental tasks).

• Analyze brain waveforms and estimate what kind of mental tasks does the subject imagine.

• Control computer or machine based on the estimation.Mental

tasks

BrainWF

Feature

FeatureExtraction

MeasureBrain WF

Classification

Classifier

ControlMachine

BrainWF

MeasureBrain WF

ControlMachine

Feature

FeatureExtraction

Classification

Classifier

Page 42: Introduction to Neural Networks

Approaches

• Feature  Amplitude of Fourier transform

• Classification  Multi-layer neural networks

• Brain waveforms  Colorado State University

http://www.cs.colorado.edu/eeg/

Page 43: Introduction to Neural Networks

Five Mental Tasks

• Baseline: Nothing to do (Relax).

• Multiplication: Calculate 49×78 for example.

• Letter: Writing a sentence of letter.

• Rotation: Imagine rotating a 3-D object.

• Count: Writing numbers in order on a board.

Page 44: Introduction to Neural Networks

Measuring Brain Waveform

• Number of electrodes: 7ch C3, C4, P3, P4, O1, O2, EOG

• Measuring time: 10 sec

• Sampling frequency: 250Hz2500 samples per channel

Page 45: Introduction to Neural Networks

Pre-Processing of Brain Waveform

• Segmental processing

• Amplitude of Fourier transform

• Reduction of # of samples by averaging

• Nonlinear normalization of data

SegmentalProcessing

Amplitudeof FFT

AveragingNonlinearNormali-

zation

Brain Waveform

Inputfor NN

Page 46: Introduction to Neural Networks

Segmental Processing

• Brain waveform of 10 sec is divided into segments of 0.5 sec.

• Mental tasks are estimated at each 0.25 sec.(↓)

0.5 sec 0.5 sec 0.5 sec 0.5 sec ・・・

・・・Fourier transformfor each segment

Page 47: Introduction to Neural Networks

Reduction of # of Samples

• # of samples are reduced from 125 to 20 by averaging the successive samples of waveform.

# of samples: 125 # of samples: 20

Page 48: Introduction to Neural Networks

Nonlinear Normalization for Amplitude of Fourier Transform

• Amplitude of FFT is nonlinearly normalized in order to use samples having small values.

)1minlog(max/)1minlog()( xxf

Page 49: Introduction to Neural Networks

Nonlinear Normalization for Amplitude of Fourier Transform

7 channels are arranged at input nodes (10×7=70 samples )

Nonlinear

Normalization

Channel:  1  2  3  4  5  6  71  2  3  4  5  6  7

Page 50: Introduction to Neural Networks

Simulation Setup

• 2 subjects

• Hidden units: 20

• Learning rate: 0.2

• Initial connection weights:

Random numbers distributed during -0.2~0.2

• Threshold for rejection: 0.8

Page 51: Introduction to Neural Networks

Learning Curves for Training and TestingData Sets

Subject 1 Subject 2

100

80

60

40

20

0

100

80

60

40

20

0

%%

Page 52: Introduction to Neural Networks

Classification Accuracy for Subject 1 and 2

Training Data Test Data

Subject Correct Error Ratio Correct Error Ratio

1 99.7 0.1 0.99 79.7 10.5 0.88

2 95.5 0.8 0.99 45.5 33.7 0.57

Page 53: Introduction to Neural Networks

MEG ( Magnetoencephalograph )

• A measurement instrument specifically designed to measure electrophysiological cerebral nerve activities.• High time and spatial resolution performance• SQUID fluxmeters, which detect the extremely weak magnetic field generated by the brain.• MEGvision places the SQUID fluxmeters at 160 locations to cover the entire head.• Complex magnetic field source generated by the activity of the brain can be recorded at a high spatial resolution.

Page 54: Introduction to Neural Networks

Layout of Sensors on Head

Page 55: Introduction to Neural Networks

Channel (Sensor) Selection

Frontal lobe

Parietal lobe

Occipital lobe

Temporal lobe

MetencephalonBrain stem

Page 56: Introduction to Neural Networks

8 channels are selected from 8 main lobes. The initial location is set to the central point of each lobes.

Ch1: Frontal lobe (left), Ch2: Frontal lobe (right)Ch3: Parietal lobe (left), Ch4: Parietal lobe (right)Ch5: Temporal lobe (left), Ch6: Temporal lobe (right)Ch7: Occipital lobe (left), Ch8: Occipital lobe (right)

Channel (Sensor) Selection

Page 57: Introduction to Neural Networks

Mental Tasks

Four kinds of mental tasks are used.

• Baseline : Staying in relaxed condition• Multiplication : a 3-digit number by a 1-digit number (ex. 456×8)• Sports : Playing some sport, which is determined by the subject.• Rotation : Rotating some object, which is determined by the subject.

Page 58: Introduction to Neural Networks

Performance Evaluation

MEG Signals4 Mental tasks×10 trial

↓40 data sets

Training data32 sets

Test data 8 setsClassification accuracy is evaluated based

on 5 kinds of combinations and their average.

Page 59: Introduction to Neural Networks

Initial

Optimization of Sensor Location

Optimized

Page 60: Introduction to Neural Networks

Classification Rates

Subject 1 Subject 2 Subject 3

Sensor Location

Initial [%]90.0/10.0 82.5/17.5 57.5/42.5

Sensor Location

Optimized [%]97.5/2.5 85.0/15.0 72.5/27.5

Correct/Error

Page 61: Introduction to Neural Networks

Classification Score (Subject 1)

Mental tasks

B M S R Correct

[%]

Error

[%]

B 10 0 0 0 100 0M 0 10 0 0 100 0

S 1 0 9 0 90 10

R 0 0 0 10 100 0

Av. 97.5 2.5

Page 62: Introduction to Neural Networks

Classification Score (Subject 2)

Mental

tasks

B M S R Correct

[%]

Error

[%]

B 9 1 0 0 90 10M 1 9 0 0 90 10

S 1 1 7 1 70 30

R 0 0 1 9 90 10

Av. 85.0 15.0

Page 63: Introduction to Neural Networks

Classification Score (Subject 3)

Mental

tasks

B M S R Correct

[%]

Error

[%]

B 4 4 1 1 40 60M 1 8 1 0 80 20

S 1 0 8 1 80 20

R 1 0 0 9 90 10

Av. 72.5 27.5

Page 64: Introduction to Neural Networks

Recurrent Neural Networks

Page 65: Introduction to Neural Networks

Recurrent Neural Network

Page 66: Introduction to Neural Networks

Hopfield Neural Network

・ Symmetrical Connections

・ No Self-loop

・ One neuron randomly selected is updated.

・ The energy function always decrease  or stay at the same value.

・ Memory Capacity is about 15% of Neurons

jiij ww

Page 67: Introduction to Neural Networks

Associative Memory (1)

4x4=16 Neuron RNN6 Random Patterns {pi} are Stored

Connection Weights

★Demonstration  Association from another random patterns

M

i

Tii ppW

1

Page 68: Introduction to Neural Networks

Traveling Salesman Problem

Active Neuron

Inactive Neuron

(5×5 Neurons)

Page 69: Introduction to Neural Networks

Associative Memory (2)

・ Error Correction Learning with Hysteresis ・ Adaptive Hysteresis Threshold for Association

・ 51 Alphabet Letters and 10 Digits are Stored in 16x16=256 Neuron RNN. 25% of Neurons

Page 70: Introduction to Neural Networks

Association of ‘M’ from Its Noisy Pattern

Page 71: Introduction to Neural Networks

Association of ‘M’ from Its Right Half Pattern

Page 72: Introduction to Neural Networks

Association of ‘M’ from Its Upper Half Pattern

Page 73: Introduction to Neural Networks

Competitive Learning

Page 74: Introduction to Neural Networks

Lateral Inhibition Model

Page 75: Introduction to Neural Networks

END OF THIS LECTURE

THANK YOU