Dustin Stevens-Baier
Comp 572
Assignment#5
Introduction
A Binary Hopfield Network uses binary neurons. What this means is that each
neuron can have only two values: +1 or -1. The network is completely
connected and the self-connections equal 0. If the net input to a neuron is greater
than 0, then that neuron�s activation is simply set to +1. If net input is less
than 0, the activation becomes -1. If net input equals 0, then the neuron is
left alone.
In this projectwe are supposed to use a binary network to recall specific patterns. The
patterns were nothing more than the digits 0 � 3 using a 12 x 10
grid of neurons. To create these digit patterns, each neuron was turned on or
off. A �turned on� neuron had the +1 activation and was symbolized by a star. A
�turned off� neuron had the -1 activation and has no symbol.
My network stores the digit patterns and adjusts the connection strengths
following the imposition of each pattern upon the network.
These connection strengths are the key to a successful binary network. At the
beginning, all the weights are initialized to 0. When adjusting weights, if two neurons
sharing a connection have the same activation, then 1 is added to this weight.
If two neurons have different activations, then 1 is subtracted from their
connection weight. The weight adjustments imprinted each imposed pattern in
the network�s memory.
Following training,One has to test the stability as per the assignment.
A. Here is the code for the project:
here
B. Testing Stability
I trained the network with the pattern impositions. I checked to see
if the network had remained in the pattern following the activations update.
It appears as if they have. Here are the visualized results for this test.
The first number is the initialzed digit and the second is after the update.
C. Noisy Patterns
I tested the network using noisy versions of each pattern. I used noise levels
of 5%, 10%, 20%, and 25%. I randomly flipped bits in each perfect digit
pattern according to noise level. Then, I initialized the network with this
noisy pattern to see if it could recall the original perfect pattern of the digit.
I used 5 noisy versions of each digit to test the network at each noise level.
In every case, the original pattern was successfully recalled.
Here are the results for one test of each digit pattern using noise level 5%.
Here are the results for one test of each digit
pattern using noise level 10%.
Here are the results for one test of each digit
pattern using noise level 20%.
Here are the results for one test of each digit
pattern using noise level 25%.
You can see how after successive numbers in a row it is ruled to be converging.
Each number is ran four times with each noise level.