Capsule network 2018412 Outline Capsules l Dynamic Routing

  • Slides: 27
Download presentation
Capsule network 張堂正 2018/4/12

Capsule network 張堂正 2018/4/12

Outline Capsules l Dynamic Routing Between Capsules l Matrix Capsules With EM Routing l

Outline Capsules l Dynamic Routing Between Capsules l Matrix Capsules With EM Routing l Experiment l Discussion l

Dynamic Routing Between Capsules Geoffrey E. Hinton

Dynamic Routing Between Capsules Geoffrey E. Hinton

Capsule � Neuron: value in value out � Capsule: vector in vector out Capsule

Capsule � Neuron: value in value out � Capsule: vector in vector out Capsule v 1 Capsule v 2 Capsule v 3 Capsule v 4

Capsule �A neuron detects a specific pattern �A Capsule detects one type of pattern

Capsule �A neuron detects a specific pattern �A Capsule detects one type of pattern l. Each dimension represents the characteristics of patterns l. The norm represents the probability existence [a 1 a 2 a 3]T [-a 1 a 2 a 3]T

Inside the Capsule 1 Capsule

Inside the Capsule 1 Capsule

Dynamic routing b 1(0)=0, b 2(0)=0 For r = 1 to N c 1(r),

Dynamic routing b 1(0)=0, b 2(0)=0 For r = 1 to N c 1(r), c 2(r) = softmax(b 1(r-1), b 2(r-1)) s(r) = c 1(r)u 1+c 1(r)u 2 v(r)= Squash(s(r)) bi(r)= bi(r-1) + v(r)*ui

Loss function

Loss function

Meaning of dynamic routing

Meaning of dynamic routing

Weight matrix W

Weight matrix W

Model � Reconstruct model

Model � Reconstruct model

Caps net Capsule v 1 Capsule v 2 Capsule v 3 1 0 0

Caps net Capsule v 1 Capsule v 2 Capsule v 3 1 0 0 Neural net

Matrix Capsules With EM Routing Geoffrey E. Hinton Geoffrey Hinton, Sara Sabour, Nicholas Frosst

Matrix Capsules With EM Routing Geoffrey E. Hinton Geoffrey Hinton, Sara Sabour, Nicholas Frosst

Difference between two method � Vector � EM → Matrix for routing-by-agreement

Difference between two method � Vector � EM → Matrix for routing-by-agreement

Gaussian Mixed Model � Design the model

Gaussian Mixed Model � Design the model

GMM

GMM

GMM E M

GMM E M

GMM � Change variance

GMM � Change variance

GMM � Parameter rearrangement

GMM � Parameter rearrangement

Activation function

Activation function

Experimental results

Experimental results

Each dimension represents the characteristics

Each dimension represents the characteristics

Robustness to affine transform � MNIST digit with random small affine transformation � Caps.

Robustness to affine transform � MNIST digit with random small affine transformation � Caps. Net achieved 79% accuracy on the affnist test set. A traditional convolutional model with a similar number of parameters only achieved 66% on the affnist test set.

Multi. MNIST

Multi. MNIST

Discussion � Invariance vs � Equivariance � Max pooling has Invariance, but don’t has

Discussion � Invariance vs � Equivariance � Max pooling has Invariance, but don’t has equivariance � Capsule has both of them vs

Picasso’s painting

Picasso’s painting

End

End