0% found this document useful (0 votes)
30 views

Hopfield Networks and Boltzman Machines-Part 2

This document provides information about different types of neural networks including Hopfield networks, Boltzmann machines, restricted Boltzmann machines, bidirectional associative memory networks, and self-organizing maps. It explains the basic concepts and properties of each network type, how they are trained or have their weights determined, and potential applications. The next video lecture in the course will cover convolutional networks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Hopfield Networks and Boltzman Machines-Part 2

This document provides information about different types of neural networks including Hopfield networks, Boltzmann machines, restricted Boltzmann machines, bidirectional associative memory networks, and self-organizing maps. It explains the basic concepts and properties of each network type, how they are trained or have their weights determined, and potential applications. The next video lecture in the course will cover convolutional networks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

NPTEL

Video Course on Machine Learning

Professor Carl Gustaf Jansson, KTH

Week 6 Machine Learning based


on Artificial Neural Networks

Video 6.6 Hopfield Networks and Boltzman Machines – Part 2


Hopfield Networks
|
Related approaches
Boltzman Machines
Boltzmann machines are recurrent neural networks that can be seen as
the stochastic, generative counterparts of Hopfield networks. The non-determinism
allows the system to come out of local minima. Boltzman machines were invented in
1985 by Geoffrey Hinton and Terry Sejnowski.

They are also called stochastic Hopfield network with hidden units. Hidden units to
enables the learning of higher order relationships and abstractions. As for Hopfield
networks, we have symmetric connections between units.

Finding an optimal state involves relaxation: letting the network settle into a
configuration that maximizes a goodness function. This is done by annealing.

Boltzman machines are named after the Boltzmann distribution in statistical


mechanics, which is used in their sampling function. They are also called "energy Hidden unit
based models" (EBM). Visible unit

State changes occur either:


a. Deterministically when E  0 or 1
b. otherwise Stochastically with probability =
1  e  E /
Where t is a decreasing temperature variable and E
is the expected change in energy if the change is made.
Learning in a Boltzman Machine
• Step 1. Pick an example
• Step 2. Run network in positive phase
a. Clamp the visible units with the pattern specified by our current example
b. Let network settle using the simulated annealing method
c. Record the outputs of the units
d. Reiterate 2a..2c
• Step 3. Run network in negative phase
a. Don’t clamp the network units. We just let it settle to some state as before.
b. Reiterate 3a..3b
• Step 4. Compare the statistics of the two phases
a. For each pair of units, we compute the odds that both units are coactive (both on) for the positive phase. Do it
also for the negative phase.
b. If we have n units, this gives us two n x n matrices of probabilities
c. pi,j+ and pi,j- are the probabilities that both unit i and j are both on in the positive and negative phase
• Step 5. Update the weights based on statistics
a. Change each weight according to the difference of the probabilities for the positive and negative phase
b. Dwij = k *(pi,j+ - pi,j- ). Here, k is like a learning rate
• Step 6. Go to step 1 and repeat.
Simulated Annealing - Source of Inspiration

Annealing in metals

Heat the solid state metal to a high temperature

Cool it down very slowly according to a specific schedule.

If the heating temperature is sufficiently high to ensure random state


and the cooling process is slow enough to ensure thermal equilibrium,
then the atoms will place themselves in a pattern that corresponds to
the global energy minimum of a perfect crystal.
Simulated Annealing – steps in the algorithm

Step 1: Initialize Start with a random initial configuration. Initialize a very high “temperature”.

Step 2: Move Perturb the configuration through a defined move.

Step 3: Calculate score Calculate Score (Delta E in or case) due to the move made.

Step 4: Choose Depending on score (Delta E), accept or reject the move. The
probability of acceptance depending on the current “temperature”.

Step 5: Update and repeat Update the temperature value by lowering the temperature.

Go back to Step 2. The process is done until “Freezing Point” is reached.


Simulated Annealing versus Greedy Algorithms
Initial position
of the ball Simulated Annealing explores
more. Chooses this move with a
small probability (Hill Climbing)

Greedy Algorithm
gets stuck here!
Locally Optimum
Solution.

Upon a large no. of iterations,


SA converges to this solution.
Restricted Boltzmann Machine (RBM)

A Restricted Boltzmann Machine (RBM) is a variant of a Boltzmann


machine where the neurons must form a bipartite graph.

- a pair of nodes from each of the two groups of units commonly referred
to as the "visible" and "hidden" units respectively, may have a symmetric
connection between them
- there are no connections between nodes within a group.

By contrast, unrestricted Boltzmann machines may have connections


between hidden units.

RBMs were initially invented under the name Harmonium by Paul


Smolensky in 1986 but became acknowledged only after the development
of faster learning algorithms in 2005 (Hinton et al.)
Bidirectional associative memory (BAM)
Bidirectional associative memory (BAM) is a type of recurrent neural
network and associative memory . BAM is hetero-associative, meaning
given a pattern it can return another pattern which is potentially of a
different size. BAM was introduced by Bart Kosko in 1988.

A bi-directional associative memory (BAM) network is one with two


fully connected layers, in which the links are all bi-directional. It is used
to map a set of vectors Xi (input layer) to a set of vectors Yi (output
layer). There can also be a feedback link connecting a node to itself.

If a BAM network is used to implement an auto-associative memory


then the input layer is the same as the output layer, i.e., there is just one
layer with feedback links connecting nodes to themselves in addition to
the links between nodes. This network can be used to retrieve a pattern
given a noisy or incomplete pattern.

A BAM network may be trained, or its weights may be worked out in


advance.
Bidirectional associative memory (BAM) - example

Two associations, A1:B1 and A2:B2. These are then transformed into the bipolar forms

A1 = (1, 0, 1, 0, 1, 0), B1 = (1, 1, 0, 0) X1 = (1, -1, 1, -1, 1, -1), Y1 = (1, 1, -1, -1)
A2 = (1, 1, 1, 0, 0, 0), B2 = (1, 0, 1, 0) X2 = (1, 1, 1, -1, -1, -1), Y2 = (1, -1, 1, -1)

T T
A matrix M can be calculated as X Y where X is the transpose of X.

1 * 1 1 -1 -1 1 * 1 -1 1 -1
-1 1
1 1
-1 + -1 =>
1 -1
-1 -1

To retrieve the association A1, we multiply it by M to get (4, 2, -2, -4)

If (4, 2, -2, -4) is run through a threshold => (1, 1, 0, 0), which is B1.

To retrieve the reverse association the transpose of M is used in a similar way.


Kohonen Network or Self-Organizing Map (SOM)
SOM implements a form of unsupervised learning. SOM
converts complex, nonlinear statistical relationships between
high-dimensional data items into simple geometric
relationships on a low-dimensional display (dimensionality
reduction).

As it thereby compresses information while preserving the


most important topological and metric relationships of the
primary data items on the display, it may also be thought of
to produce some kind of abstractions.

SOM can also be called or self-organizing feature map


(SOFM) and was invented by Teuvo Kohonen in 1982.

The map space is predefined, usually as a finite two-


dimensional region where nodes are arranged in a regular
grid.
Kohonen Network or Self-Organizing Map (SOM)

Each node is associated with a weight vector with the same


dimension as an input vector. Like most artificial neural
networks, SOMs operate in two modes: training and matching.

Training consists of adapting weight vectors towards the input


data, honoring the map space topology. Self-organizing maps
differ from other artificial neural networks as they apply
competitive learning as opposed to error-correction learning
such as gradient descent. They also use a neighborhood
function to preserve the topological properties of the input
space.

Once trained, the map classifies an input vector by finding the


node with the closest (smallest distance metric) weight vector to
the input space vector.
NPTEL

Video Course on Machine Learning

Professor Carl Gustaf Jansson, KTH

Thanks for your attention!

The next lecture 6.8 will be on the topic:

Convolutional Networks

You might also like