+ All Categories
Home > Documents > Neural networks Eric Postma IKAT Universiteit Maastricht.

Neural networks Eric Postma IKAT Universiteit Maastricht.

Date post: 31-Mar-2015
Category:
Upload: clayton-oakman
View: 216 times
Download: 2 times
Share this document with a friend
Popular Tags:
91
Neural networks Neural networks Eric Postma Eric Postma IKAT IKAT Universiteit Maastricht Universiteit Maastricht
Transcript
Page 1: Neural networks Eric Postma IKAT Universiteit Maastricht.

Neural networksNeural networks

Eric PostmaEric Postma

IKATIKAT

Universiteit MaastrichtUniversiteit Maastricht

Page 2: Neural networks Eric Postma IKAT Universiteit Maastricht.

OverviewOverview

Introduction: The biology of neural networks• the biological computer

• brain-inspired models

• basic notions

Interactive neural-network demonstrations• Perceptron

• Multilayer perceptron

• Kohonen’s self-organising feature map

• Examples of applications

Page 3: Neural networks Eric Postma IKAT Universiteit Maastricht.

A typical AI agentA typical AI agent

Page 4: Neural networks Eric Postma IKAT Universiteit Maastricht.

Two types of learningTwo types of learning

• Supervised learningSupervised learning– curve fitting, surface fitting, ...curve fitting, surface fitting, ...

• Unsupervised learningUnsupervised learning– clustering, visualisation...clustering, visualisation...

Page 5: Neural networks Eric Postma IKAT Universiteit Maastricht.

An input-output functionAn input-output function

Page 6: Neural networks Eric Postma IKAT Universiteit Maastricht.

Fitting a surface to four pointsFitting a surface to four points

Page 7: Neural networks Eric Postma IKAT Universiteit Maastricht.

(Artificial) neural networks(Artificial) neural networks

The digital computer The digital computer versusversus

the neural computerthe neural computer

Page 8: Neural networks Eric Postma IKAT Universiteit Maastricht.

The Von Neumann architectureThe Von Neumann architecture

Page 9: Neural networks Eric Postma IKAT Universiteit Maastricht.

The biological architectureThe biological architecture

Page 10: Neural networks Eric Postma IKAT Universiteit Maastricht.

Digital versus biological computersDigital versus biological computers

5 distinguishing properties5 distinguishing properties• speedspeed• robustness robustness • flexibilityflexibility• adaptivityadaptivity• context-sensitivitycontext-sensitivity

Page 11: Neural networks Eric Postma IKAT Universiteit Maastricht.

Speed: Speed: The “hundred time steps” argumentThe “hundred time steps” argument

The critical resource that is most obvious is The critical resource that is most obvious is time. Neurons whose basic computational time. Neurons whose basic computational speed is a few milliseconds must be made to speed is a few milliseconds must be made to account for complex behaviors which are account for complex behaviors which are carried out in a few hudred milliseconds carried out in a few hudred milliseconds (Posner, 1978). This means that (Posner, 1978). This means that entire complex entire complex behaviors are carried out in less than a hundred behaviors are carried out in less than a hundred time steps.time steps.

Feldman and Ballard (1982)Feldman and Ballard (1982)

Page 12: Neural networks Eric Postma IKAT Universiteit Maastricht.

Graceful DegradationGraceful Degradation

damage

performance

Page 13: Neural networks Eric Postma IKAT Universiteit Maastricht.

Flexibility: the Flexibility: the NeckerNecker cube cube

Page 14: Neural networks Eric Postma IKAT Universiteit Maastricht.

vision = constraint satisfactionvision = constraint satisfaction

Page 15: Neural networks Eric Postma IKAT Universiteit Maastricht.

AdaptivitiyAdaptivitiy

processing implies learningprocessing implies learning

in biological computers in biological computers

versus versus

processing does not imply learningprocessing does not imply learning

in digital computersin digital computers

Page 16: Neural networks Eric Postma IKAT Universiteit Maastricht.

Context-sensitivity: patternsContext-sensitivity: patterns

emergent propertiesemergent properties

Page 17: Neural networks Eric Postma IKAT Universiteit Maastricht.

Robustness and context-sensitivityRobustness and context-sensitivitycoping with noisecoping with noise

Page 18: Neural networks Eric Postma IKAT Universiteit Maastricht.

The neural computerThe neural computer

• Is it possible to develop a model after the Is it possible to develop a model after the natural example?natural example?

• Brain-inspired models:Brain-inspired models:– models based on a restricted set of structural en models based on a restricted set of structural en

functional properties of the (human) brainfunctional properties of the (human) brain

Page 19: Neural networks Eric Postma IKAT Universiteit Maastricht.

The Neural Computer (structure)The Neural Computer (structure)

Page 20: Neural networks Eric Postma IKAT Universiteit Maastricht.

Neurons, Neurons, the building blocks of the brainthe building blocks of the brain

Page 21: Neural networks Eric Postma IKAT Universiteit Maastricht.

Neural activityNeural activity

in

out

Page 22: Neural networks Eric Postma IKAT Universiteit Maastricht.

Synapses,Synapses,the basis of learning and memory the basis of learning and memory

Page 23: Neural networks Eric Postma IKAT Universiteit Maastricht.

Learning:Learning: Hebb Hebb’s rule’s ruleneuron 1 synapse neuron 2

Page 24: Neural networks Eric Postma IKAT Universiteit Maastricht.

ConnectivityConnectivityAn example:An example:The visual system is a The visual system is a feedforward hierarchy of feedforward hierarchy of neural modules neural modules

Every module is (to a Every module is (to a certain extent) certain extent) responsible for a certain responsible for a certain functionfunction

Page 25: Neural networks Eric Postma IKAT Universiteit Maastricht.

(Artificial) (Artificial) Neural NetworksNeural Networks

• NeuronsNeurons– activityactivity– nonlinear input-output functionnonlinear input-output function

• Connections Connections – weightweight

• LearningLearning– supervisedsupervised– unsupervisedunsupervised

Page 26: Neural networks Eric Postma IKAT Universiteit Maastricht.

Artificial NeuronsArtificial Neurons

• input (vectors)input (vectors)• summation (excitation)summation (excitation)• output (activation)output (activation)

a = f(e)e

i1

i2

i3

Page 27: Neural networks Eric Postma IKAT Universiteit Maastricht.

Input-output functionInput-output function

• nonlinear function:nonlinear function:

e

f(e)

f(x) = 1 + e -x/a

1

a 0

a

Page 28: Neural networks Eric Postma IKAT Universiteit Maastricht.

Artificial Connections Artificial Connections (Synapses)(Synapses)

• wwABAB

– The weight of the connection from neuron The weight of the connection from neuron AA to to neuron neuron BB

A BwAB

Page 29: Neural networks Eric Postma IKAT Universiteit Maastricht.

The PerceptronThe Perceptron

Page 30: Neural networks Eric Postma IKAT Universiteit Maastricht.

Learning in the PerceptronLearning in the Perceptron• Delta learning ruleDelta learning rule

– the difference between the desired output the difference between the desired output ttand the actual output and the actual output oo, , given input given input xx

• Global error E Global error E – is a function of the differences between the is a function of the differences between the

desired and actual outputsdesired and actual outputs

Page 31: Neural networks Eric Postma IKAT Universiteit Maastricht.

Gradient DescentGradient Descent

Page 32: Neural networks Eric Postma IKAT Universiteit Maastricht.

Linear decision boundariesLinear decision boundaries

Page 33: Neural networks Eric Postma IKAT Universiteit Maastricht.

The history of the PerceptronThe history of the Perceptron

• Rosenblatt (1959)Rosenblatt (1959)

• Minsky & Papert (1961)Minsky & Papert (1961)

• Rumelhart & McClelland (1986)Rumelhart & McClelland (1986)

Page 34: Neural networks Eric Postma IKAT Universiteit Maastricht.

The multilayer perceptronThe multilayer perceptron

input hidden output

Page 35: Neural networks Eric Postma IKAT Universiteit Maastricht.

Training the MLPTraining the MLP

• supervised learningsupervised learning– each training pattern: input + desired output each training pattern: input + desired output – in each in each epochepoch: present all patterns : present all patterns – at each presentation: adapt weightsat each presentation: adapt weights– after many epochs convergence to a local minimumafter many epochs convergence to a local minimum

Page 36: Neural networks Eric Postma IKAT Universiteit Maastricht.

phoneme recognition with a MLPphoneme recognition with a MLP

input: frequencies

Output:pronunciation

Page 37: Neural networks Eric Postma IKAT Universiteit Maastricht.

Non-linear decision boundariesNon-linear decision boundaries

Page 38: Neural networks Eric Postma IKAT Universiteit Maastricht.

Compression with an MLPCompression with an MLPthe the autoencoderautoencoder

Page 39: Neural networks Eric Postma IKAT Universiteit Maastricht.

hidden representationhidden representation

Page 40: Neural networks Eric Postma IKAT Universiteit Maastricht.

Learning in the MLPLearning in the MLP

Page 41: Neural networks Eric Postma IKAT Universiteit Maastricht.

Preventing OverfittingPreventing Overfitting

GENERALISATION GENERALISATION = performance on test set= performance on test set

• Early stoppingEarly stopping• Training, Test, and Validation setTraining, Test, and Validation set• kk-fold cross validation-fold cross validation

– leaving-one-out procedureleaving-one-out procedure

Page 42: Neural networks Eric Postma IKAT Universiteit Maastricht.

Image Recognition with the MLPImage Recognition with the MLP

Page 44: Neural networks Eric Postma IKAT Universiteit Maastricht.

Hidden RepresentationsHidden Representations

Page 45: Neural networks Eric Postma IKAT Universiteit Maastricht.

Other ApplicationsOther Applications

• PracticalPractical– OCROCR– financial time seriesfinancial time series– fraud detectionfraud detection– process controlprocess control– marketingmarketing– speech recognitionspeech recognition

• TheoreticalTheoretical– cognitive modelingcognitive modeling– biological modelingbiological modeling

Page 46: Neural networks Eric Postma IKAT Universiteit Maastricht.

Some mathematics…Some mathematics…

Page 47: Neural networks Eric Postma IKAT Universiteit Maastricht.

PerceptronPerceptron

Page 48: Neural networks Eric Postma IKAT Universiteit Maastricht.

Derivation of the delta learning ruleDerivation of the delta learning rule

Target output

Actual output

h = i

Page 50: Neural networks Eric Postma IKAT Universiteit Maastricht.

Sigmoid functionSigmoid function

• May also be theMay also be the tanhtanh functionfunction – (<-1,+1> (<-1,+1> instead of instead of <0,1>)<0,1>)

• DerivativeDerivative f’(x) = f(x) [1 – f(x)] f’(x) = f(x) [1 – f(x)]

Page 51: Neural networks Eric Postma IKAT Universiteit Maastricht.

Derivation generalized delta ruleDerivation generalized delta rule

Page 52: Neural networks Eric Postma IKAT Universiteit Maastricht.

Error funError functionction (LMS) (LMS)

Page 53: Neural networks Eric Postma IKAT Universiteit Maastricht.

AdaptationAdaptation hidden-output hidden-output weightsweights

Page 54: Neural networks Eric Postma IKAT Universiteit Maastricht.

AAdaptationdaptation input-hidden input-hidden weightsweights

Page 55: Neural networks Eric Postma IKAT Universiteit Maastricht.

Forward Forward andand Backward Propagation Backward Propagation

Page 56: Neural networks Eric Postma IKAT Universiteit Maastricht.

Decision boundaries of PerceptronsDecision boundaries of Perceptrons

Straight lines (surfaces), linear separable

Page 57: Neural networks Eric Postma IKAT Universiteit Maastricht.

Decision boundaries of MLPsDecision boundaries of MLPs

Convex areas (open or closed)

Page 58: Neural networks Eric Postma IKAT Universiteit Maastricht.

Decision boundaries of MLPs Decision boundaries of MLPs

Combinations of convex areas

Page 59: Neural networks Eric Postma IKAT Universiteit Maastricht.

Learning and representing Learning and representing similaritysimilarity

Page 60: Neural networks Eric Postma IKAT Universiteit Maastricht.

Alternative conception of neuronsAlternative conception of neurons

• Neurons do not take the weighted sum of their Neurons do not take the weighted sum of their inputs (as in the perceptron), but measure the inputs (as in the perceptron), but measure the similarity of the weight vector to the input similarity of the weight vector to the input vectorvector

• The activation of the neuron is a measure of The activation of the neuron is a measure of similarity. The more similar the weight is to the similarity. The more similar the weight is to the input, the higher the activationinput, the higher the activation

• Neurons represent “prototypes”Neurons represent “prototypes”

Page 61: Neural networks Eric Postma IKAT Universiteit Maastricht.

Course CodingCourse Coding

Page 62: Neural networks Eric Postma IKAT Universiteit Maastricht.

22nd ordernd order isomor isomorphismphism

Page 63: Neural networks Eric Postma IKAT Universiteit Maastricht.

Prototypes forPrototypes for preprocessing preprocessing

Page 64: Neural networks Eric Postma IKAT Universiteit Maastricht.

Kohonen’s SOFMKohonen’s SOFM(Self Organizing Feature Map)(Self Organizing Feature Map)

• Unsupervised learningUnsupervised learning• Competitive learningCompetitive learning

output

input (n-dimensional)

winner

Page 65: Neural networks Eric Postma IKAT Universiteit Maastricht.

Competitive learningCompetitive learning

• Determine the winner (the neuron of which Determine the winner (the neuron of which the weight vector has the smallest distance the weight vector has the smallest distance to the input vector)to the input vector)

• Move the weight vector Move the weight vector ww of the winning of the winning neuron towards the input neuron towards the input ii

Before learning

i

w

After learning

i w

Page 66: Neural networks Eric Postma IKAT Universiteit Maastricht.

Kohonen’s ideaKohonen’s idea

• Impose a topological order onto the Impose a topological order onto the competitive neurons (e.g., rectangular map)competitive neurons (e.g., rectangular map)

• Let neighbours of the winner share the Let neighbours of the winner share the “prize” (The “postcode lottery” principle.)“prize” (The “postcode lottery” principle.)

• After learning, neurons with similar weights After learning, neurons with similar weights tend to cluster on the maptend to cluster on the map

Page 67: Neural networks Eric Postma IKAT Universiteit Maastricht.

Topological orderTopological order

neighbourhoodsneighbourhoods• SquareSquare

– winner (red)winner (red)– Nearest neighboursNearest neighbours

• HexagonalHexagonal– Winner (red)Winner (red)– Nearest neighboursNearest neighbours

Page 68: Neural networks Eric Postma IKAT Universiteit Maastricht.

A simple exampleA simple example

• A topological map of 2 x 3 neurons A topological map of 2 x 3 neurons and two inputsand two inputs

2D input

input

weights

visualisation

Page 69: Neural networks Eric Postma IKAT Universiteit Maastricht.

Weights before trainingWeights before training

Page 70: Neural networks Eric Postma IKAT Universiteit Maastricht.

Input patterns Input patterns (note the 2D distribution)(note the 2D distribution)

Page 71: Neural networks Eric Postma IKAT Universiteit Maastricht.

Weights after trainingWeights after training

Page 72: Neural networks Eric Postma IKAT Universiteit Maastricht.

Another exampleAnother example

• Input: uniformly randomly distributed pointsInput: uniformly randomly distributed points

• Output: Map of 20Output: Map of 2022 neurons neurons

• TrainingTraining– Starting with a large learning rate and Starting with a large learning rate and

neighbourhood size, both are gradually decreased neighbourhood size, both are gradually decreased to facilitate convergenceto facilitate convergence

Page 73: Neural networks Eric Postma IKAT Universiteit Maastricht.
Page 74: Neural networks Eric Postma IKAT Universiteit Maastricht.

Dimension reductionDimension reduction

Page 75: Neural networks Eric Postma IKAT Universiteit Maastricht.

Adaptive resolutionAdaptive resolution

Page 76: Neural networks Eric Postma IKAT Universiteit Maastricht.

Application of SOFMApplication of SOFM

Examples (input) SOFM after training (output)

Page 77: Neural networks Eric Postma IKAT Universiteit Maastricht.

Visual features (biologically plausible)Visual features (biologically plausible)

Page 78: Neural networks Eric Postma IKAT Universiteit Maastricht.

• Principal Components Analysis (PCA)Principal Components Analysis (PCA)

pca1pca2

pca1

pca2

Projections of data

Relation with statistical methods 1Relation with statistical methods 1

Page 79: Neural networks Eric Postma IKAT Universiteit Maastricht.

Relation with statistical methods 2Relation with statistical methods 2• Multi-Dimensional Scaling (MDS)Multi-Dimensional Scaling (MDS)• Sammon MappingSammon Mapping

Distances in high-dimensional space

Page 80: Neural networks Eric Postma IKAT Universiteit Maastricht.

Image MiningImage Miningthe right featurethe right feature

Page 81: Neural networks Eric Postma IKAT Universiteit Maastricht.

Fractal dimension in artFractal dimension in art

Jackson Pollock (Jack the Dripper)

Page 82: Neural networks Eric Postma IKAT Universiteit Maastricht.

Taylor, Micolich, and Jonas (1999). Fractal Analysis of Pollock’s drip Taylor, Micolich, and Jonas (1999). Fractal Analysis of Pollock’s drip paintings. paintings. NatureNature, 399, 422. (3 june)., 399, 422. (3 june).

Creation date

Fra

cta

l d

imen

sio

n

} Range for natural images

Page 83: Neural networks Eric Postma IKAT Universiteit Maastricht.

Our Van Gogh researchOur Van Gogh research

Two paintersTwo painters

• Vincent Van GoghVincent Van Gogh paints Van Gogh paints Van Gogh

• Claude-Emile SchuffeneckerClaude-Emile Schuffenecker paints Van Gogh paints Van Gogh

Page 84: Neural networks Eric Postma IKAT Universiteit Maastricht.

SunflowersSunflowers• Is it made byIs it made by

– Van Gogh?Van Gogh?

– Schuffenecker?Schuffenecker?

Page 85: Neural networks Eric Postma IKAT Universiteit Maastricht.

ApproachApproach

• Select appropriate features (skipped here, but Select appropriate features (skipped here, but very important!)very important!)

• Apply neural networksApply neural networks

Page 86: Neural networks Eric Postma IKAT Universiteit Maastricht.

van Goghvan Gogh Schuffenecker Schuffenecker

Page 87: Neural networks Eric Postma IKAT Universiteit Maastricht.

Training DataTraining Data

Van Gogh (5000 textures)Van Gogh (5000 textures) SchuffeneckerSchuffenecker (5000 textures)(5000 textures)

Page 88: Neural networks Eric Postma IKAT Universiteit Maastricht.

ResultsResults

• Generalisation performanceGeneralisation performance

• 96% correct classification on untrained data96% correct classification on untrained data

Page 89: Neural networks Eric Postma IKAT Universiteit Maastricht.

Resultats, cont.Resultats, cont.

• Trained art-expert Trained art-expert network applied to network applied to Yasuda sunflowersYasuda sunflowers

• 89% of the textures is 89% of the textures is geclassificeerd as a geclassificeerd as a genuine Van Goghgenuine Van Gogh

Page 90: Neural networks Eric Postma IKAT Universiteit Maastricht.

A major caveat…A major caveat…

• Not only the painters are Not only the painters are different…different…

• ……but also the materialbut also the material

and maybe many other things…and maybe many other things…


Recommended