Artificial Neural Network: Vardhaman College of Engineering
Artificial Neural Network: Vardhaman College of Engineering
BACHELOR OF TECHNOLOGY IN
Submitted By
K.Kranthi kumar
08881A0472
2011 - 12
BACHELOR OF TECHNOLOGY IN
Submitted By
K. Kranthi kumar 08881A0472
Under the Guidance of Ms. C. Padmini Senior Assistant Professor Department of ECE
2011 - 12
ACKNOWLEDGEMENT
The satisfaction that accompanies the successful completion of the task would be put incomplete without the mention of the people who made it possible, whose constant guidance and encouragement crown all the efforts with success. We express our heartfelt thanks to Ms. C. Padmini, Senior Assistant Professor & Project Supervisor, Department of Electronics & Communication Engineering, Vardhaman College of Engineering, for her valuable guidance, and encouragement during my project. We wish to express our deep sense of gratitude to Sri. T. Ramakrishnaiah, Assistant Professor and Project coordinator for his able guidance and useful suggestions, which helped us in completing the project work, in time. We are particularly thankful to Prof. Y. PanduRangaiah, Head, Department of Electronics and Communication Engineering for his guidance, intense support and encouragement, which helped us to mould our project into a successful one. We show gratitude to our honorable Principal Dr. N. Sambashiva Rao, for having provided all the facilities and support. We also thank P. Ravinder Reddy, Assistant Professor, for his continuous support and all the staff members of Electronics and Communication Engineering department for their valuable support and generous advice. Finally thanks to all our friends for their continuous support and enthusiastic help.
K. Kranthi kumar
CERTIFICATE
This is to certify that the mini project entitled Artificial neural network done by K.Kranthi kumar(08881A0472), of Department of Electronics and Communication Engineering, is a record of bonafide work carried out by them. This technical project is done as a partial fulfillment of obtaining Bachelor of Technology Degree to be awarded by Jawaharlal Nehru Technological University, Hyderabad. The results of investigation enclosed in this report have been verified and found satisfactory.
Kacharam (V), Shamshabad (M), Ranga Reddy (Dist.) 501 218, Hyderabad, A.P. Ph: 08413-253335, 253201, Fax: 08413-253482, www.vardhaman.org
ABSTRACT
An artificial neural network (ANN), usually called neural network (NN), is a mathematical model or computational model that is inspired by the structure and or functional aspects of biological neural networks. A neural network consists of an interconnected group of artificial neurons, and it processes information using a connectionist approach to computation. In most cases an ANN is an adaptive system that changes its structure based on external or internal information that flows through the network during the learning phase. Modern neural networks are non-linear statistical data modeling tools. They are usually used to model complex relationships between inputs and outputs or to find patterns in data. This report is an introduction to Artificial Neural Networks. The various types of neural networks are explained and demonstrated, applications of neural networks like ANNs in medicine are described, and a detailed historical background is provided. The connection between the artificial and the real thing is also investigated and explained. Finally, the mathematical models involved are presented and demonstrated.
CONTENTS
(i) (ii)
1. Introduction 1.1 What is a Neural Network 1.2 Historical Background 1.3 Use of Neural Networks 1.4 Neural Networks versus Conventional Computers 2. Human and Artificial Neurons - Investigating the Similarities 2.1 How the Human Brain Learns 2.2 From Human Neurons to Artificial Neurons 3. An Engineering Approach 3.1 A Simple Neuron 3.2 Firing Rules 3.3 Pattern Recognition 3.4 A More Complicated Neuron 4. Architecture of Neural Networks 4.1 Feed-Forward (Associative) Networks 4.2 Feedback (Auto Associative) Networks 4.3 Network Layers 4.4 Perceptrons 5. The Learning Process 5.1 Transfer Function 5.2 An Example to Illustrate the above Teaching Procedure
01 01 01 01 02 03 03 04 05 05 05 07 09 10 10 10 11 12 13 15 16
5.3 The Back-Propagation Algorithm 6. Applications of Neural Networks 6.1 Neural Networks in Practice 6.2 Neural Networks in Medicine
16 18 18 19
20
6.2.2 Electronic noses 6.2.3 Instant Physician 6.3 Neural Networks in Business 7. Conclusion 8. References
20 20 21 22 23
LIST OF FIGURES
Fig 2.1.1 Fig 2.1.2 Fig 2.2.1 Fig 3.1.1 Components Of Neuron The Synapse The Neuron Model A Simple Neuron 03 03 04 05
Fig 3.3.1 Fig 3.4.1 Fig 4.2.1 Fig 4.2.2 Fig 4.4.1 Fig 5.1
Feed Forward Neural Network An MCP Neuron Simple Feed Forward Network Complicated Network The Perceptron Activation response
07 09 10 11 12 14
List of Tables
3.1 Truth Table 1 06
06 08 08 08
Chapter 1 Introduction
1.1 What is a Neural Network
An Artificial Neural Network (ANN) is an information processing paradigm that is inspired by the way biological nervous systems, such as the brain, process information. The key element of this paradigm is the novel structure of the information processing system. It is composed of a large number of highly interconnected processing elements (neurons) working in unison to solve specific problems. ANNs, like people, learn by example. An ANN is configured for a specific application, such as pattern recognition or data classification, through a learning process. Learning in biological systems involves adjustments to the synaptic connections that exist between the neurons. This is true of ANNs as well.
Other advantages include: 1. Adaptive learning: An ability to learn how to do tasks based on the data given for training or initial experience. 2. Self-Organization: An ANN can create its own organization or representation of the information it receives during learning time. 3. Real Time Operation: ANN computations may be carried out in parallel, and special hardware devices are being designed and manufactured which take advantage of this capability. 4. Fault Tolerance via Redundant Information Coding: Partial destruction of a network leads to the corresponding degradation of performance. However, some network capabilities may be retained even with major network damage.
elements(neurons) working in parallel to solve a specific problem. Neural networks learn by example. They cannot be programmed to perform a specific task. The examples must be selected carefully otherwise useful time is wasted or even worse the network might be functioning incorrectly. The disadvantage is that because the network finds out how to solve the problem by itself, its operation can be unpredictable. On the other hand, conventional computers use a cognitive approach to problem solving; the way the problem is to solved must be known and stated in small unambiguous instructions. These instructions are then converted to a high level language program and then into machine code that the computer can understand. These machines are totally predictable; if anything goes wrong is due to a software or hardware fault. Neural networks and conventional algorithmic computers are not in competition but complement each other. There are tasks are more suited to an algorithmic approach like arithmetic operations and tasks that are more suited to neural networks. Even more, a large number of tasks, require systems that use a combination of the two approaches (normally a conventional computer is used to supervise the neural network) in order to perform at maximum efficiency. Neural networks do not perform miracles. But if used sensibly they can produce some amazing results.
the 'nearest' pattern in the 0-taught set. If there is a tie, then the pattern remains in the undefined state. For example, a 3-input neuron is taught to output 1 when the input (X1,X2 and X3) is 111 or 101 and to output 0 when the input is 000 or 001. Then, before applying the firing rule, the truth table is X1: X2: X3: OUT: 0 0 0 0 0 0 1 0 0 1 0 0/1 Table:1 As an example of the way the firing rule is applied, take the pattern 010. It differs from 000 in 1 element, from 001 in 2 elements, from 101 in 3 elements and from 111 in 2 elements. Therefore, the 'nearest' pattern is 000 which belongs in the 0-taught set. Thus the firing rule requires that the neuron should not fire when the input is 001. On the other hand, 011 is equally distant from two taught patterns that have different outputs and thus the output stays undefined (0/1). By applying the firing in every column the following truth table is obtained; X1: X2: X3: OUT: 0 0 0 0 0 0 1 0 0 1 0 0 Table:2 The difference between the two truth tables is called the generalization of the neuron. Therefore the firing rule gives the neuron a sense of similarity and enables it to respond 'sensibly' to patterns not seen during training. 0 1 1 0/1 1 0 0 0/1 1 0 1 1 1 1 0 1 1 1 1 1 0 1 1 0/1 1 0 0 0/1 1 0 1 1 1 1 0 0/1 1 1 1 1
has been trained accordingly. During training, the network is trained to associate outputs with input patterns. When the network is used, it identifies the input pattern and tries to output the associated output pattern. The power of neural networks comes to life when a pattern that has no output associated with it, is given as an input. In this case, the network gives the output that corresponds to a taught input pattern that is least different from the given pattern.
Fig 3.3.1
For example: The network of fig 3.3.1 is trained to recognize the patterns T and H. The associated patterns are all black and all white respectively as shown below.
If we represent black squares with 0 and white squares with 1 then the truth tables for the 3 neurons after generalization are; X11: X12: 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1
X13: OUT:
0 0
1 0
0 1
1 1
0 0
1 0
0 1
1 1
Table:3 Top Neuron X21: X22: X23: OUT: 0 0 0 1 0 0 1 0/1 0 1 0 1 0 1 1 0/1 1 0 0 0/1 1 0 1 0 1 1 0 0/1 1 1 1 0
Table:5 Bottom Neuron From the tables it can be seen the following associations can be extracted:
In this case, it is obvious that the output should be all blacks since the input pattern is almost the same as the 'T' pattern.
Here also, it is obvious that the output should be all whites since the input pattern is almost the same as the 'H' pattern.
Here, the top row is 2 errors away from the a T and 3 from an H. So the top output is black. The middle row is 1 error away from both T and H so the output is random. The bottom row is 1 error away from T and 2 away from H. Therefore the output is black. The total output of the network is still in favour of the T shape.
Fig3.4.1 An MCP Neuron In mathematical terms, the neuron fires if and only if; X1W1 + X2W2 + X3W3 + ... > T
The addition of input weights and of the threshold makes this neuron a very flexible and powerful one. The MCP neuron has the ability to adapt to a particular situation by changing its weights and/or threshold. Various algorithms exist that cause the neuron to 'adapt'; the most used ones are the Delta rule and the back error propagation. The former is used in feed-forward networks and the latter in feedback networks.
This simple type of network is interesting because the hidden units are free to construct their own representations of the input. The weights between the input and hidden units determine when each hidden unit is active, and so by modifying these weights, a hidden unit can choose what it represents. We also distinguish single-layer and multi-layer architectures. The single-layer organization, in which all units are connected to one another, constitutes the most general case and is of more potential computational power than hierarchically structured multilayer organizations. In multi-layer networks, units are often numbered by layer, instead of following a global numbering.
4.4 Perceptrons
The most influential work on neural nets in the 60's went under the heading of 'perceptrons' a term coined by Frank Rosenblatt. The perceptron (figure 4.4) turns out to be an MCP model ( neuron with weighted inputs ) with some additional, fixed, pre-processing. Units labeled A1, A2, Aj , Ap are called association units and their task is to extract specific, localized featured from the input images. Perceptrons mimic the basic idea behind the mammalian visual system. They were mainly used in pattern recognition even though their capabilities extended a lot more.
Figure 4.4.1 In 1969 Minsky and Papert wrote a book in which they described the limitations of single layer Perceptrons. The impact that the book had was tremendous and caused a
lot of neural network researchers to loose their interest. The book was very well written and showed mathematically that single layer perceptrons could not do some basic pattern recognition operations like determining the parity of a shape or determining whether a shape is connected or not. What they did not realized, until the 80's, is that given the appropriate training, multilevel perceptrons can do these operations.
3. Hetero-association: is related to two recall mechanisms: 4. Nearest neighbor recall, where the output pattern produced corresponds to the input pattern stored, which is closest to the pattern presented, and Nearest neighbor recall
5. Interpolative recall, where the output pattern is a similarity dependent interpolation of the patterns stored corresponding to the pattern presented. Yet another paradigm, which is a variant associative mapping is classification, ie when there is a fixed set of categories into which the input patterns are to be classified. Interpolative recall
6. Regularity detection in which units learn to respond to particular properties of the input patterns. Whereas in associative mapping the network stores the relationships among patterns, in regularity detection the response of each unit has a particular
'meaning'. This type of learning mechanism is essential for feature discovery and knowledge representation. Every neural network possess knowledge which is contained in the values of the connections weights. Modifying the knowledge stored in the network as a function of experience implies a learning rule for changing the values of the weights.
Fig5.0.1 Activation Pattern Information is stored in the weight matrix W of a neural network. Learning is the determination of the weights. Following the way learning is performed, we can distinguish two major categories of neural networks: 7. Fixed networks in which the weights cannot be changed, i.e. dW/dt=0. In such networks, the weights are fixed a priori according to the problem to solve. 8. Adaptive networks which are able to change their weights, i.e. dW/dt 0.
All learning methods used for adaptive neural networks can be classified into two major categories: 9. Supervised learning which incorporates an external teacher, so that each output unit is told what its desired response to input signals ought to be. During the learning process global information may be required. Paradigms of supervised learning include error-correction learning, reinforcement learning and stochastic learning. An important issue concerning supervised learning is the problem of error convergence,
i.e. the minimization of error between the desired and computed unit values. The aim is to determine a set of weights which minimizes the error. One well-known method, which is common to many learning paradigms, is the least mean square (LMS) convergence. 10. Unsupervised learning uses no external teacher and is based upon only local information. It is also referred to as self-organization, in the sense that it self-organizes data presented to the network and detects their emergent collective properties. Paradigms of unsupervised learning are Hebbian learning and competitive learning. From Human Neurons to Artificial Neuronesther aspect of learning concerns the distinction or not of a separate phase, during which the network is trained, and a subsequent operation phase. We say that a neural network learns off-line if the learning phase and the operation phase are distinct. A neural network learns on-line if it learns and operates at the same time. Usually, supervised learning is performed off-line, whereas unsupervised learning is performed on-line.
To make a neural network that performs some specific task, we must choose how the units are connected to one another and we must set the weights on the connections appropriately. The connections determine whether it is possible for one unit to influence another. The weights specify the strength of the influence. We can teach a three-layer network to perform a particular task by using the following procedure: 1. We present the network with training examples, which consist of a pattern of activities for the input units together with the desired pattern of activities for the output units. 2. We determine how closely the actual output of the network matches the desired output. 3. We change the weight of each connection so that the network produces a better approximation of the desired output.
To implement this procedure we need to calculate the error derivative for the weight (EW) in order to change the weight by an amount that is proportional to the rate at which the error changes as the weight is changed. One way to calculate the EW is to perturb a weight slightly and observe how the error changes. But that method is inefficient because it requires a separate perturbation for each of the many weights. Another way to calculate the EW is to use the Back-propagation algorithm which is described below, and has become nowadays one of the most important tools for training neural networks. It was developed independently by two teams, one (FogelmanSoulie, Gallinari and Le Cun) in France, the other (Rumelhart, Hinton and Williams) in U.S.
Note that for non-linear units, (see Appendix C) the back-propagation algorithm includes an extra step. Before back-propagating, the EA must be converted into the EI, the rate at which the error changes as the total input received by a unit is changed.
the next few years. At the moment, the research is mostly on modeling parts of the human body and recognizing diseases from various scans (e.g. cardiograms, CAT scans, ultrasonic scans, etc.). Neural networks are ideal in recognizing diseases using scans since there is no need to provide a specific algorithm on how to identify the disease. Neural networks learn by example so the details of how to recognize the disease are not needed. What is needed is a set of examples that are representative of all the variations of the disease. The quantity of examples is not as important as the 'quantity'. The examples need to be selected very carefully if the system is to perform reliably and efficiently. 6.2.1 Modeling and Diagnosing the Cardiovascular System Neural Networks are used experimentally to model the human cardiovascular system. Diagnosis can be achieved by building a model of the cardiovascular system of an individual and comparing it with the real time physiological measurements taken from the patient. If this routine is carried out regularly, potential harmful medical conditions can be detected at an early stage and thus make the process of combating the disease much easier. A model of an individual's cardiovascular system must mimic the relationship among physiological variables (i.e., heart rate, systolic and diastolic blood pressures, and breathing rate) at different physical activity levels. If a model is adapted to an individual, then it becomes a model of the physical condition of that individual. The simulator will have to be able to adapt to the features of any individual without the supervision of an expert. This calls for a neural network. Another reason that justifies the use of ANN technology is the ability of ANNs to provide sensor fusion which is the combining of values from several different sensors. Sensor fusion enables the ANNs to learn complex relationships among the individual sensor values, which would otherwise be lost if the values were individually analyzed. In medical modeling and diagnosis, this implies that even though each sensor in a set may be sensitive only to a specific physiological variable, ANNs are capable of detecting complex medical conditions by fusing the data from the individual biomedical sensors.
6.2.2 Electronics Noses ANNs are used experimentally to implement electronic noses. Electronic noses have several potential applications in telemedicine. Telemedicine is the practice of medicine over long distances via a communication link. The electronic nose would identify odours in the remote surgical environment. These identified odours would then be electronically transmitted to another site where an door generation system would recreate them. Because the sense of smell can be an important sense to the surgeon, telesmell would enhance tele surgery.
6.2.3 Instant Physician An application developed in the mid-1980s called the "instant physician" trained an auto associative memory neural network to store a large number of medical records, each of which includes information on symptoms, diagnosis, and treatment for a particular case. After training, the net can be presented with input consisting of a set of symptoms; it will then find the full stored pattern that represents the "best" diagnosis and treatment.
Chapter7 Conclusion
The computing world has a lot to gain fron neural networks. Their ability to learn by example makes them very flexible and powerful. Furthermore there is no need to devise an algorithm in order to perform a specific task; i.e. there is no need to understand the internal mechanisms of that task. They are also very well suited for real time systems because of their fast response and computational times which are due to their parallel architecture. Neural networks also contribute to other areas of research such as neurology and psychology. They are regularly used to model parts of living organisms and to investigate the internal mechanisms of the brain. Perhaps the most exciting aspect of neural networks is the possibility that some day 'conscious' networks might be produced. There is a number of scientists arguing that consciousness is a 'mechanical' property and that 'conscious' neural networks are a realistic possibility. Finally, I would like to state that even though neural networks have a huge potential we will only get the best of them when they are integrated with computing, AI, fuzzy logic and related subjects.
Chapter8 References
1. An introduction to Neural Computing. Aleksander, I. and Morton, H. 2nd edition 2. Neural Networks by Eric Davalo and Patrick Naim 3. Learning internal representations by error propagation by Rumelhart, Hinton and Williams (1986). 4. Klimasauskas, CC. (1989). The 1989 Neuro Computing Bibliography.