Module 200: An Introduction to Neural Networks


UNIT 1: What are neural networks?


UNIT 1

Contents:


What are neural networks?
What is an artificial neuron?
Pattern recognition
Laboratory workbook exercises
References

A biological neuron is made up of a cell body (soma), an axon, and dendrites which branch out from the cell body. The nucleus of the cell body controls the operation of the neuron, the axon transmits messages between neurons, and the dendrites receive information from the axons of other neurons. The simplified diagram shows two neurons connected by the axon of the neuron on the left. Connections are made through the transmission of chemical messages across the synapses between the axon and dendrites. The axon of each neuron in the brain is likely to have 15,000 synaptic connections to the dendrites of many other neurons.
neuron1 gif
Diagram showing the connections between two neurons


img23.gif

Inputs Weights Inputs x Weights Sum Output
A1 A2 W1 W2 (A1xW1) (A2xW2)

1 0 ? ? ? ? ? 0
0 1 ? ? ? ? ? 0
0 0 ? ? ? ? ? 0
1 1 ? ? ? ? ? 1

Inputs Weights Inputs x Weights Sum Output
A1 A2 W1 W2 (A1xW1) (A2xW2)

1 0 ? ? ? ? ? 1
0 1 ? ? ? ? ? 1
0 0 ? ? ? ? ? 0
1 1 ? ? ? ? ? 1
Pattern recognition

Example HR

In this section of unit 1 we will begin to examine the use of artificial neural networks in pattern recognition.

Character recognition: the problem
Neural networks have been successfully used as the basis of character recognition programs, such as those used by banks. These programs have to deal with the fact that handwritten characters come in all shapes and sizes. They have to be able to compare the features of a handwritten character with standard representations of characters. From this comparison, they must correctly identify the handwritten character. It would be very difficult to create a conventional program which contained within it the means of recognising all the many possible permutations of the shapes of each handwritten character.

Programs using neural networks provide a solution to this problem because the networks can 'learn' to recognise the common features of handwritten characters. They learn by being 'shown' many different handwritten examples of a particular character. The program is instructed that the particular handwritten characters should be recognised as a certain standard character. Feedback within the program causes amendments to be made to the way program functions.

Exercise
This exercise looks in more detail at the problem of creating a character recognition program.

The illustrations below represent the arrangement of pixels on a simple computer screen. A white pixel has the value 0 and a black pixel has the value 1. The screen is currently showing the shape of the numeral '1'.


























0 0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0

The following extract from a C++ program creates a 5x5 array called 'map' to represent the simple screen. It intialises this array to the all white screen where every array position has the value 0. The program then enters the value 1 in each of the relevant array positions (as shown in the illustrations above) to form the shape of the numeral '1'. Finally the program checks the relevant array positions to confirm whether the numeral '1' is represented on the screen. Copy the full 'map.cpp' program from the Unit 1 part of the Datafiles section of this CD-ROM and run it on your C++ compiler. Study the program so that you are familiar with the data structures and algorithms which it uses.

//map.cpp

#include

void main()
{
int a, i, j;
// two-dimensional array representing numeral shapes
int map [5] [5];

// enter 0 in all array positions and display map
for (i=0; i<5; i++)
{
for (j=0; j<5; j++)
{
map [i] [j] = 0;
cout << map [i] [j];
}
cout << endl;
}
cout << endl;

// enter 1 in relevant array positions to form shape of
// numeral '1' and display map.
i = 2;
for (j=1; j<=3; j++)
{
map [j] [i] = 1;
}

for (i=0; i<5; i++)
{
for (j=0; j<5; j++)
{
cout << map [i] [j];
}
cout << endl;
}

cout << endl;

// check relevant array positions for shape of numeral '1'
a = 0;
i=2;
for (j=1; j<=3; j++)
{
if(map[j] [i] == 1)
{
a++;
}
}

// display result
if(a==3)
cout << "This numeral is 1";
else
cout << "This numeral is not 1";
}

This complete the introduction to the basic features of artificial neurons and the problem of pattern recognition. The next Unit will analyse the operation of a simple computer program representing an artificial neuron. It will also examine the concept of networks of artificial neurons.

Before going on to the next Unit you should complete the Laboratory Workbook exercises set out below.


Laboratory workbook exercises


Example HR

The Laboratory workbook exercises for this Unit are contained in the Unit 1 chapter of the workbook.


References

Example HR

1. Photograph of a retinal neuron taken from the website of Dr Mark Hill, Cell Biology Lab, University of New South Wales, Australia. http://anatomy.med.unsw.edu.au/cbl/embryo/Sections/CBL97/neuron.htm

2. Illustration of an artificial neuron taken from a paper on 'Neural Network Applications' by Kiyoshi Kawaguchi:
http://www.ece.utep.edu/research/webfuzzy/docs/kk-thesis/kk-thesis-html/node12.html


Top of page

Page updated 19.5.03