Designing Application-Specific Neural Networks Using the ... · design based on the genetic...

8
Designing Application-Specific Neural Networks 447 Designing Application-Specific Neural Networks Using the Genetic Algorithm Steven A. Harp, Tariq Samad, Aloke Guha Honeywell SSDC 1000 Boone Avenue North Golden Valley, MN 55427 ABSTRACT We present a general and systematic method for neural network design based on the genetic algorithm. The technique works in conjunction with network learning rules, addressing aspects of the network's gross architecture, connectivity, and learning rule parameters. Networks can be optimiled for various application- specific criteria, such as learning speed, generalilation, robustness and connectivity. The approach is model-independent. We describe a prototype system, NeuroGENESYS, that employs the backpropagation learning rule. Experiments on several small problems have been conducted. In each case, NeuroGENESYS has produced networks that perform significantly better than the randomly generated networks of its initial population. The com- putational feasibility of our approach is discussed. 1 INTRODUCTION With the growing interest in the practical use of neural networks, addressing the problem of customiling networks for specific applications is becoming increas- ingly critical. It has repeatedly been observed that different network structures and learning parameters can substantially affect performance. Such important aspects of neural network applications as generalilation, learning speed, connec- tivity and tolerance to network damage are strongly related to the choice of

Transcript of Designing Application-Specific Neural Networks Using the ... · design based on the genetic...

Page 1: Designing Application-Specific Neural Networks Using the ... · design based on the genetic algorithm. The technique works in conjunction with network learning rules, addressing aspects

Designing Application-Specific Neural Networks 447

Designing Application-Specific Neural Networks

Using the Genetic Algorithm

Steven A. Harp, Tariq Samad, Aloke Guha Honeywell SSDC

1000 Boone Avenue North Golden Valley, MN 55427

ABSTRACT We present a general and systematic method for neural network design based on the genetic algorithm. The technique works in conjunction with network learning rules, addressing aspects of the network's gross architecture, connectivity, and learning rule parameters. Networks can be optimiled for various application­specific criteria, such as learning speed, generalilation, robustness and connectivity. The approach is model-independent. We describe a prototype system, NeuroGENESYS, that employs the backpropagation learning rule. Experiments on several small problems have been conducted. In each case, NeuroGENESYS has produced networks that perform significantly better than the randomly generated networks of its initial population. The com­putational feasibility of our approach is discussed.

1 INTRODUCTION With the growing interest in the practical use of neural networks, addressing the problem of customiling networks for specific applications is becoming increas­ingly critical. It has repeatedly been observed that different network structures and learning parameters can substantially affect performance. Such important aspects of neural network applications as generalilation, learning speed, connec­tivity and tolerance to network damage are strongly related to the choice of

Page 2: Designing Application-Specific Neural Networks Using the ... · design based on the genetic algorithm. The technique works in conjunction with network learning rules, addressing aspects

448 Harp, Samad and Guha

network architecture. Yet there are few analytic results, and few heuristics, that can help the application developer design an appropriate network.

We have been investigating the use of the genetic algorithm (Goldberg, 1989; Holland, 1975) for designing application-specific neural networks (Harp, Samad and Guha, 1989ab). In our approach, the genetic algorithm is used to evolve appropriate network structures and values of learning parameters. In contrast, other recent applications of the genetic algorithm to neural networks (e.g., Davis [1988], Whitley [1988]) have largely restricted the role of the genetic algorithm to updating weights on a predetermined network structure-another logical approach.

Several first-generation neural network application development tools already exist. However, they are only partly effective: the complexity of the problem, our limited understanding of the interdependencies between various network design choices, and the extensive human effort involved permit only limited exploration of the design space. An objective of our research is the development of a next-generation neural network application development tool that can syn­thesise optimised custom networks. The genetic algorithm has been distinguished by its relative immunity to high dimensionality, local minima and noise, and it is therefore a logical candidate for solving the network optimilation problem.

2 GENETIC SYNTHESIS OF NEURAL NETWORKS Fig. 1 outlines our approach. A network is represented by a blueprint-a bit­string that encodes a number of characteristics of the network, including struc­tural properties and learning parameter values. Each blueprint directs the crea­tion of an actual network with random initial weights. An instantiated network is trained using some predetermined training algorithm and training data, and the trained network can then be tested in various ways-e.g., on non-training inputs, after disabling some units, and after perturbing learned weight values. Mter testing, a network is evaluated-a fitneu estimate is computed for it based on appropriate criteria. This process of instantiation, training, testing and evaluation is performed for each of a population of blueprints.

Mter the entire population is evaluated, the next generation of blueprints is pro­duced. A number of genetic operator3 are employed, the most prominent of these being crouotler, in which two parent blueprints are spliced together to produce a child blueprint (Goldberg, 1989). The higher the fitness of a blueprint, the greater the probability of it being selected as a parent for the subsequent genera­tion. Characteristics that are found useful will thereby tend to be emphasized in the next generation, whereas harmful ones will tend to be suppressed.

The definition of network performance depends on the application. If the appli­cation requires good generalilation capabilities, the results of testing on (appropriately chosen) non-training data are important. If a network capable of real-time learning is required, the learning rate must be optimiled. For fast response, the sile of the network must be minimized. If hardware (especially VLSI) implementation is a consideration, low connectivity is essential. In most applications several such criteria must be considered. This important aspect of application-specific network design is covered by the fitness function. In our approach, the fitness of a network can be an arbitrary function of several distinct

Page 3: Designing Application-Specific Neural Networks Using the ... · design based on the genetic algorithm. The technique works in conjunction with network learning rules, addressing aspects

Sampling & Synthesis of Network -Blueprints·

Designing Application-Specific Neural Networks 449

Genetic Algorithm

blueprint fitness

estimates

Network Performance Evaluation

testing

I Test Stimuli L...-_--l

Figure 11 A population ot network ~lueprint8" 18 eyelically updated by the genetic algorithm baaed on their fitne88.

performance and cost criteria, some or all of which can thereby be simultaneously optimized.

3 NEUROGENESYS Our approach is model-independent: it can be applied to any existing or future neural network model (including models without a training component). As a first prototype implementation we have developed a working system called Neu­roGENESYS. The current implementation uses a variant (Samad, 1988) of the backpropagation learning algorithm (Werbos, 1974; Rumelhart, Hinton, and Williams, 1985) as the training component and is restricted to feedforward net­works.

Within these constraints, NeuroGENESYS is a reasonably general system. Net­works can have arbitrary directed acyclic graph structures, where each vertex oC the graph corresponds to an 4re4 or layer oC units and each edge to a projection Crom one area to another. Units in an area have a spatial organization; the current system arrays units in 2 dimensions. Each projection specifies indepen­dent radii oC connectivity, one Cor each dimension. The radii of connectivity allow localized receptive field structures. Within the receptive fields connection densities can be specified. Two learning parameters are associated with both pro­jections and areas. Each projection has a learning rate parameter ("11" in back­propagation) and a decay rate Cor 11. Each area has 11 and 11-decay parameters for threshold weights.

These network characteristics are encoded in the genetic blueprint. This bitstring is composed oC several segments, one Cor each area. An area segment consists of an area parameter specification (APS) and a variable number of projection

Page 4: Designing Application-Specific Neural Networks Using the ... · design based on the genetic algorithm. The technique works in conjunction with network learning rules, addressing aspects

450 Harp, Samad and Guha

specification fields (PSFs), each of which describes a projection from the area to some other area. Both the APS and the PSF contain values for several parame­ters Cor areas and projections respectively. Fig. 2 shows a simple area segment. Note that the target of a projection can be specified through either Ab"olute or Relative addressing. More than one projections are possible between two given areas; this allows the generation of receptive field structures at different scales and with different connection densities, and it also allows the system to model the effect of larger initial weights. In our current implementation, all initial weights are randomly generated small values from a fixed uniform distribution. In the near future, we intend to incorporate some aspects of the distribution in the genetic blueprint.

X-Share V -Share----'

Initial Threhsold Eta-----' Threshold Eta Decay ----....I

start of ProjectiOn Marker --..... Connection Density

Initial Eta Ela Decay

--

~ AroaN - ~

PROJEdTioN ~arameters

-- X-Radius

V-Radius T arget Address Address Mode

Figure 3. Network Blueprint Representation

In NeuroGENESYS, the score of a blueprint is computed as a linear weighted sum of several performance and cost criteria, including learning speed, the results of testing on a "test set", the numbers of units and weights in the network, the results of testing (on the training set) after disabling some of the units, the results of testing (on the training set) after perturbing the learned weight values, the average fanout of the network, and the maximum fanout for any unit in the network. Other criteria can be incorporated as needed. The user of Neuro­GENESYS supplies the weighting factors at the start of the experiment, thereby controlling which aspects of the network are to be optimized.

4 EXPERIMENTS NeuroGENESYS can be used for both classification and function approximation problems. We have conducted experiments on three classification problems-digit recognition from 4x 8 pixel images, exclusive-OR (XOR), and simple convexity

Page 5: Designing Application-Specific Neural Networks Using the ... · design based on the genetic algorithm. The technique works in conjunction with network learning rules, addressing aspects

Designing Application-Specific Neural Networks 451

detection; and one function approximation problem-modeling one cycle of a sine function. Various combinations of the above criteria have been used. In most experiments NeuroGENESYS has produced appropriate network designs in a relatively small number of generations « 50).

Our first experiment was with digit recognition, and NeuroGENESYS produced a solution that surprised us: The optimized networks had no hidden layers yet learned perfectly. It had not been obvious to us that this digit recognition prob­lem is linearly separable. Even in the simple case of no-hidden-Iayer networks, our earlier remarks on application-specific design can be appreciated. When Neu­roGENESYS was asked to optimile for average fanout for the digit recognition task as well as for perfect learning, the best network produced learned perfectly (although comparatively slowly) and had an average fanout of three connections per unit; with learning speed as the sole optimization criterion, the best network produced learned substantially faster (48 iterations) but it had an average fanout of almost an order of magnitude higher.

The XOR problem, of course, is prototypically non-linearly-separable. In this case, NeuroGENESYS produced many fast-learning networks that had a "bypass" connection from the input layer directly to the output layer (in addition to connections to and from hidden layers); it is an as yet unverified hypothesis that these bypass connections accelerate learning.

In one of our experiments on the sine function problem, NeuroGENESYS was asked to design networks for moderate accuracy-the error cutoff during training was relatively high. The networks produced typically had one hidden layer of two units, which is the minimum possible configuration for a sufficiently crude approximation. When the experiment was repeated with a low error cutoil', intri­cate multilayer structures were produced that were capable of modeling the train­ing data very accurately (Fig. 3). Fig. 4 shows the learning curve for one sine function experiment. The" Average" and "Best" scores are over all individuals in the generation, while "Online" and "amine" are running averages of Average and Best, respectively. Performance on this problem is quite sensitive to initial weight values, hence the non-monotonicity oC the Best curve. Steady progress overall was still being observed when the experiment was terminated.

We have conducted control studies using random search (with best retention) instead of the genetic algorithm. The genetic algorithm has consisten tly proved superior. Random search is the weakest possible optimilation procedure, but on the other hand there are few sophisticated alternatives for this problem-the search space is discontinuous, largely unknown, and highly nonlinear.

5 COMPUTATIONAL EFFICIENCY Our approach requires the evaluation of a large number of networks. Even on some of our small-scale problems, experiments have taken a week or longer, the bottleneck being the neural network training ~lgorithm. While computational feasibility is a real concern, Cor several reasons we are optimistic that this approach will be practical for realistic applications:

• The hardware platform for our experiments to date has been a Symbolics computer without any floating-point support. This choice has been ideal

Page 6: Designing Application-Specific Neural Networks Using the ... · design based on the genetic algorithm. The technique works in conjunction with network learning rules, addressing aspects

452 Harp, Samad and Guha

GENESYS •

tc IU90~ teNt Ion' pe-r IluP\ : 49

.lton ~ he: 39 C"0'50\l." ) : a .8

of c:rO'SO\le'r pt s : 1 Z "'-.JtetlC)f"l ): a,31 on Rete: 9.81 I"trons: T., 1'10

81n eac.h ~e"e .... t ion: Ye, "0

I 1.4' 1 . 34 18.6' 4'48 J.69

~~~~ 9 . 58 29 . 65 19999 5 .9' 9 . 2' 12.43 2956 J . 18 a.45 19.'8 19999 5.98 1.4' 29 . 89 19999 5 .9' 1 . 6' .'.41 4632 7 5~ 1 . 46 29.99 19099 5 . 98 I." 15 . 31 5"4 5.98 1 . 4' 21.93 19999 5 . 83 9 . 31 21 . 54 5384 J.39 1 . 4' 21 . 3' U_ 5 . 88 8 . a9 9.11 S S . 99

• 14 11 18 34 ' . 9a P . 88

-.! ... ~~ , CJ 5.09 t 92

22 13' 12.99 9 . 99 2 1 1 . 99 a . 99 , 8 6 . SU 9.99

1'4 36 ' . 00 B.la 2 2 2.99 8 . S9

14 32 5 . 91 9 . 99 19 11 ' . 91 9 . 99 18 15 5 . 9a a.a

2 2 2. 99 9 . 89 8 Q 9.89 9.81 r PROJ-'7°U'PUr-AilEil

PJPOJ-4 A A-

/, PROJ- 8

~ PROJ-9 -1 ~,of-

I PROJ-

6 ~q§i~::AZJGiibL::miC:::::=========:) HPUI- PROJ-I /

/ 1't!OJ-2 '

I

PIfOJ - 31

Abort Bral..., •• h Chart Cl.... Continue Ilun Sav. She... StAtu.

jAr •• II:

tot.I .. h.' 12 .. II te 3214128

Itf'enaton 1 : t 2" I 18321114 128 Dt.....,.to" 2: '2"" til 32 S4 1'8

Intti.l Et. n"lre.hold : 0. 10.20" a., 1 II 3.21. ' ' 2.1 ,,,,, • .nold (t.. &1008 : ' •• 0.002 0004 0008 a.QUI 0.032 a.olU 0. t21

(Mtt Abort

LaM

Figure I. The NeuroGENESYS interfaee, showing a network strueture optimised tor the sine tUnetion problem

for program development, and NeuroGENESYS' user interface features would not have been possible without it, but the performance penalty has been severe (relative to machines with floating point hardware).

• The genetic algorithm is an inherently parallel optimization procedure, a feature we soon hope to take advantage of. We have recently implemented a networked version of NeuroGENESYS that will allow us to retain the desirable aspects of the Symbolics version and yet achieve substantial speedup in execution (we expect two to three orders of magnitude): up to 30 Apollo workstationst a VAX, and 10 Symbolics computers can now be evaluating different networks in parallel (Harp, Samad and Guha, 1990).

• The current version of NeuroGENESYS employs the backpropagation learning rule, which is notoriously slow for many applications. However, faster-learning extensions of backpropagation are continually being developed. We have incorporated one recent extension (Samad, 1988), but others, especially common ones such as including a "momentum n term in the weight update rule (Rumelhart, Hinton and Williams, 1985), could also be considered. More generally, learning in neural networks is a topic of intensive research and it is likely that more efficient learning algorithms will become popular in the near future.

Page 7: Designing Application-Specific Neural Networks Using the ... · design based on the genetic algorithm. The technique works in conjunction with network learning rules, addressing aspects

Designing Application-Specific Neural Networks 453

8~----------------------------------------------------~,~,----~ i i

6

2

o

Accuracy on the SINE Function • /; . ··0- best - 0- average -+- offline -+- online

."'. ' t " ,-, ,~. ; ...... .' \ A"

;' ~ r. , , i i ; ~ ;, i !;, , !;,

.. !; i .. ~; ~

!..i ! i ~ ! ,. !i,

,/ \ / ~, , . .; .'~ ;! i .. \

.' I ,-, ,. , i .", .• /

i ......... ,.. 'e .... , . ;

10

_ ...a. 'a-", 4.a.. -.... .,0- ....

20 Generation

30

., ' . '~

,

i I

\ \ ~ , I

i i I

t , , , , .. .. ,

A..

Figure 41 A learning curve for the Bine function problem

.,

• The genetic algorithm is a.n active field of research itself. Improvements, many or which are concerned with convergence properties, are frequently being reported a.nd could reduce the computational requirements (or its application significantly.

• The genetic algorithm is an iterative optimization procedure that, on the average, produces better solutions with each passing generation. Unlike some other optimilation techniques, userul results can be obtained during a run. The genetic algorithm can thus take advantage of whatever time and computational resources are available ror an application.

• Just as there is no strict termination requirement for the genetic algorithm, there is no constraint on its initialilation. In our experimen ts, the zeroth generation consisted or randomly generated networks. Not surprisingly, almost all or these are poor perrormers. However, better better ways of selecting the initial population are possible. In particular, the initial popu­lation can consist or manually optimiled networks. Manual optimization of neural networks is currently the norm, but it leaves much or the design space unexplored. Our approach would allow a human application developer to design one or more networks that could be the starting point for further, more systematic optimization by the genetic algorithm. Other initialization approaches are also possible, such as using optimized networks from similar applications, or using heuristic guidelines to generate net­works.

It should be emphasized that computational efficiency is not the only factor that must be considered in evaluating this (or any) approach. Others such as the potential for improved perrormance or neural network applications and the costs

Page 8: Designing Application-Specific Neural Networks Using the ... · design based on the genetic algorithm. The technique works in conjunction with network learning rules, addressing aspects

454 Harp, Samad and Guha

and benefits associated with alternative approaches for designing network appli­cations are also critically important.

6 FUTURE RESEARCH In addition to running further experiments, we hope in the future to develop ver­sions of NeuroGENESYS for other network models, including hybrid models that incorporate supervised and unsupervised learning components.

Space restrictions have precluded a detailed description of NeuroGENESYS and our experiments. The interested reader is referred to (Harp, Samad, and Guha, 1989ab, 1990).

References

Davis, L. (1988). Properties of a hybrid neural network-classifier system. In Advcuz.cu in Neura.l Information Proceuing Sydem8 1, D.S. Touretlky (Ed.). San Mateo: Morgan Kaufmann.

Goldberg, D.E. (1989). Genetic Algorithm8 in Search, Optimization and Machine Learning. Addison-Wesley. Harp, S.A., T. Samad, and A. Guha (1989a). Towards the genetic synthesis of neural networks. Proceeding8 of the Third International Conference on Genetic Algorithm8, J.D. Schaffer (ed.). San Mateo: Morgan Kaufmann. Harp, S.A., T. Samad, and A. Guha (1989b). Genetic Synthui8 of Neura.l Net­work8. Technical Report 14852-CC-1989-2. Honeywell SSDC, 1000 Boone Ave­nue North, Golden Valley, MN 55427.

Harp, S.A., T. Samad, and A. Guha (1990). Genetic synthesis of neural network architecture. In The Genetic Algorithm8 Handbook, L.D. Davis (Ed.). New York: Van Nostrand Reinhold. (To appear.)

Holland, J. (1975). Adaptation in Natural and Artificial Sydem,. Ann Arbor: University of Michigan Press. Rumelhart, D.E., G.E. Hinton, and R.J. Williams (1985). Learning Interna.l Repruentation, by Error-Propagation, ICS Report 8506, Institute for Cognitive Science, UCSD, La Jolla, CA. Samad, T. (1988). Back-propagation is significantly faster if the expected value of the source unit is used for update. Neural Network8, 1, Sup. 1.

Werbos, P. (1974). Beyond Regru8ion: New Tool8 for Prediction and AnalY8i8 in the Behavioral Sciencu. Ph.D. Thesis, Harvard University Committee on Applied Mathematics, Cambridge, MA.

Whitley, D. (1988). Applying Genetic Algorithm8 to Neural Net Learning. Technical Report CS-88-128, Department of Computer Science, Colorado State University.