AI Lab 3
AI Lab 3
Laboratory work № 3
Subject «Artificial intelligence technologies»
Topic: «Development of software for the implementation of the Hamming
network»
Group CS 372
Kyiv, 2022
The goal of the work. Gain practical skills in using the Heming network to
solve practical problems.
Theoretical information
The theoretical basis of laboratory work is the information presented in
sections 8 of the textbook: Rudenko OG, Bodyansky EV Artificial neural
networks.
Hamming networks
The Hamming network performs the task of pattern association, or
classification, based on measuring the
Hamming distance. The network is a pattern associate of n-dimensional binary
vectors labeled with m-class labels (m-class patterns).
A new vector x' is associated with class pattern xi with the minimum Hamming
distance, a Hamming distance being the number of different bits in the two
patterns. The Hamming network is similar to the Hopfield network, but it has two
layers of connections. The first layer contains connections between all the n inputs,
and all the m outputs. The second layer is a fully connected recurrent network with
m neurons (similar to the Hopfield network). All nodes use linear threshold
activation functions. The first layer of connections is finding the difference
between the number n and the Hamming distance between the input pattern x' and
each of the m-class patterns used to calculate the connection weights in advance.
The second layer of connections is calculating the maximum of these values
for finding the best matched- class pattern.
Using a Hamming network has several advantages: it requires fewer
connections than the Hopfield network, and it implements the "optimum minimum
error classifier when bit errors are random and independent”, that is, the network
always converges and finds the output node with the maximum value.
Hamming neural network classification
Classification of natural objects using Hamming neural network method is
performed by comparing the satellite image supplied to the input and the reference
image, and then calculates the Hamming distance. Accordingly, the lower the
Hamming distance, the better the result of satellite image classification, which is
expressed in the formula:
Further, the state of neurons is calculated Hamming layer (the first layer)
Thereafter, the obtained values are used to initialize the second layer of
axons:
At the second phase of the neural network are calculated Hamming new
states of neurons of the second layer:
If the value of NET neuron j greater than the threshold, then the expression in
the brackets will be positive. From the equations (9), (10) that the output of neuron
j varies in the positive direction or remains unchanged, which means that it can
only have a positive value or be zero. value must be negative. This implies
energy Hamming neural network must either decrease or remain unchanged.
If the value of NET is below the threshold, then the value of takes only
negative values or zero. Consequently, the energy Hamming neural network
decreases, or remains unchanged.
If the value of NET is equal to the threshold, the value is zero and the energy
of Hamming neural network remains unchanged.
Due to the continuous striving to reduce the energy needed to achieve the
minimum and stop changes. Therefore, this fact proves the stability of the
Hamming neural network.
Symmetry Hamming neural network is an important condition for stability.
To optimize the classification of a naturally occurring process objects in the
Southern Urals, using Hamming neural network method chosen technique of using
associative memory, the essence of which is to maximize the reference line and fed
to the input of the neural network image.
Of course, when using a large number of standard classes and input data in
the form of vector data, derived from satellite images, there is a problem of
incorrect associations of reference and input images, but in order to avoid this
problem in the process of classification of natural origin of objects, use a two-tier
structure, which consists of untied Hamming memory and network decision.
Unleashed associative memory calculates the Hamming distance by dividing
an input vector into disjoint modules or local window and performs a full
Hamming associative memory on each module independently.
Unleashed Hamming associative memory works as follows: the key memory
is divided into the same images as reference vectors, then the Hamming distance is
calculated and displayed the closest matching template.