Abstract:
A method enabling a neural network, having weights organized into a weight vector, to learn, comprising the steps of: (a) assigning a first memory location for storing a first learning rate, a second memory location for storing a momentum factor, a memory block for storing the weight vector, and a third memory location for storing a second learning rate; (b) initializing the learning rate, momentum factor, and weight vector; (c) storing the first learning rate, the momentum factor, and the weight vector into their respective memory locations; (d) saving the first learning rate in the second learning rate by storing it into the third memory location; (e) using a search technique to adjust the first learning rate to adjust the weight vector, and updating the first memory location and the memory block; (f) adapting the momentum factor using the first learning rate and the second learning rate; and repeating steps (c) through (f) until a predetermined convergence criterion has been met.

Description:
This application is a continuation of application Ser. No. 07/943,972, filed Sep. 11, 1992, now abandoned, which is a continuation of application Ser. No. 07,769,749, filed Oct. 2, 1991, now abandoned, which is a continuation of application Ser. No. 07/477,017 filed Feb. 7, 1990, now abandoned. 
    
    
     FIELD OF THE INVENTION 
     The present invention relates generally to learning systems, and specifically to a method and apparatus for adaptively determining connection weights in neural networks. 
     BACKGROUND OF THE INVENTION 
     Increased usage of neural networks in a wide variety of applications has led to a substantial need for faster learning methods for determining connection weights in neural networks. Learning systems provide a way of deriving knowledge based upon a set of training examples rather than a set of rules. Learned knowledge evolves from the training examples dependent, in part, on the learning procedure being used. 
     Learning techniques using neural networks have been shown to be very useful for problem areas in which there are too many rules relating to the resolution of the problem, or in which all the rules are not known. 
     Neural networks have been used in many varied applications, such as visual pattern recognition, data compression, optimization techniques, expert systems applications as well as other situations involving complex problems or knowledge bases. 
     In visual pattern recognition a neural network learning system should be able to distinguish similar objects from each other, such as a tree from a utility pole, with a high degree of accuracy by showing a properly structured network enough examples. A system based on rules has a difficult time performing this relatively simple task because the person programming the rules cannot describe them in sufficient detail. Similar problems and potential neural network solutions exist with respect to speech recognition, particularly speaker-independent applications. 
     Learning systems also have been used to solve data encoder problems which involve &#34;squeezing&#34; data through a small number of hidden neurons in a neural network, and having the input data replicated at the output of the network. This implementation of neural network learning systems can be utilized to solve video compression problems involving vector quantization using a codebook lookup method, for example. The codebook used can be generated through the use of the learning system. 
     Neural network learning systems can be useful in finding optimal solutions for routing problems, for example, in communication applications involving traffic routing and scheduling, and in frequency allocation problems in cellular communications systems. 
     Expert knowledge sometimes is easier to encode by training examples rather than by providing a list of rules. Experts often do not know all the rules they use to trouble shoot equipment or give advice. A history of such action or advice can be used to develop a database of training examples to allow a system to &#34;learn&#34; the expert&#39;s knowledge. Furthermore, as knowledge changes, training often is a more efficient method of updating a knowledge base than changing the rules used. The knowledge base could be corrected or augmented without a new software release embodying the changed or different rules. This approach can be useful, for example, in the areas of medical diagnostics, common sense reasoning, trouble shooting procedures, installation instructions and software debugging. 
     The backpropagation algorithm, derived from the chain rule for partial derivatives, provides a gradient descent learning method in the space of weights, and has formed the foundation for many learning systems. The method of gradient descent can be improved by modifying it to a conjugate gradient method in which the current descent direction is determined by combining the gradient descent direction with an appropriate factor of the past descent direction. Generally, utilization of versions of the gradient descent learning algorithms in neural networks is based upon the selection of two parameters commonly known as the learning rate and the momentum factor. Calculation and determination of these parameters, however, often are cumbersome and not arrived at adaptively based on the progression of the learning method. 
     SUMMARY OF THE INVENTION 
     One object of the present invention is to provide an adaptive learning method and apparatus for neural networks. 
     Another object of the present invention is to provide a fast method for determining connection weights in neural networks. 
     Another object of the present invention is to provide a method and apparatus for adaptively determining the learning rate and momentum factor in a neural network. 
     The method of the present invention includes locating a search direction and determining a point along the search direction to modify the weights. The search direction is a unit vector determined as a composite of the previous search direction and the unit vector in the direction of gradient descent. The directional learning rate employed in the method of the present invention is determined by any known search technique which is preferably a simple version requiring relatively few line search steps, thereby enhancing system performance. 
     The search for the directional learning rate is commenced with the directional learning rate being set at the previous value. If the error is reduced using that directional learning rate , an attempt is made to reduce the error more by doubling the directional learning rate. This is then set as the new directional learning rate. If the error is not reduced, then the system proceeds using the old directional learning rate. If error is increased, the directional learning rate is halved until the error is reduced. Alternatively, the directional learning rate can be incremented or decremented by another suitable factor rather than simply doubling or halving the directional learning rate respectively. 
     The momentum factor is allowed to drift in a direction depending upon the direction of the change in learning rate. One alternative allows the momentum factor to drift between 0 and 1 in increments of, for example, 0.1 starting at 0.5. If the directional learning rate is not decreasing, then the momentum factor is allowed to drift in its current direction by the chosen increment. If the directional learning rate begins to decrease, then the momentum factor drift changes direction by the chosen increment. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The present invention as well as other features and advantages of the invention will be understood best by reference to the following detailed description read in conjunction with the accompanying drawings, in which: 
     FIG. 1 a schematic representation of a neural network utilizing the present invention; 
     FIG. 2 is a geometric representation of the method of the present invention; 
     FIGS. 3(a) through 3(c) are flow charts depicting an embodiment of the method of the present invention; and 
     FIG. 4 is a block diagram of a computer system designed in accordance with the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     In the feedforward multi-layer neural network shown in FIG. 1, it is assumed there are a number of neurons at each layer of the network. The layers are indexed from 0 to n, with layer 0 being the input layer and n being the output layer. Each layer has an index variable associated with it. The range of the layer index variable is the neurons in that layer. Thus, in FIG. 1 l ranges over the neurons in layer m-1, k ranges over the neurons in layer m, and j ranges over the neurons in layer m+1. The number of neurons at layer m is represented by the symbol #(m). The output of neuron k at layer m is o m .sup.(k). The synaptic weight from neuron k at layer m to neuron j at layer m+1 is w m+1 .sup.(j,k). Outputs at a layer of the network are assumed to be differentiable functions of a weighted sum of outputs at the previous layer. Letting f m .sup.(k) be the transfer function at neuron k at layer m, the equations defining the dynamics of the network are: ##EQU1## Assuming the inputs o 0 .sup.(i), i=1, . . . , #(0) are given. 
     It is further assumed that it is desired to determine the gradient of a function of the output neurons as: 
     
         F=F(o.sub.n.sup.(1), . . . , o.sub.n.sup.(#(n))) 
    
     with respect to the interconnection weights. An application of the chain rule for partial derivatives as shown by Rumelhart, D. E., Hinton, G. E. and Williams, R. J., &#34;Learning Internal Representations by Error Propagation&#34;, Parallel Distributed Processing, Vol. 1, MIT Press, 1986, provides: ##EQU2## For the output neurons ##EQU3## again using the chain rule. A final use of the chain rule gives: ##EQU4## for the interior, or hidden, layers of the network. The last step follows from ##EQU5## 
     Equations 3, 5, and 6 provide the steps needed to compute the gradient direction in weight space for any differentiable function F of output neurons. 
     In the particular case where the function is the negative, or average, error function ##EQU6## where t.sup.(i) is the target value for output unit i, Equation (5) takes the form ##EQU7## Letting F(p) denote the error for a particular input-target sequence indexed by p 
     
         o.sub.0.sup.(l) (p), l=1, . . . , #(0), t.sup.(i) (p), i=1, . . . , #(n) 
    
     Letting ∇ p  w denote the gradient direction computed from the algorithm above for the p-th input-target sequence and function F(p). w is the vector of all weights in the network. The gradient direction computed by the backpropagation algorithm is the gradient descent direction for the error function, -F(p). For ##EQU8## 
     The backpropagation algorithm thus computes ∇w from w by the following. At a particular weight setting w compute ∇ p  w for each input-target sequence using Equations (9), (6), and (3). ∇w is then computed from Equation (11). 
     Neural network models generally include an offset value for each neuron, which are also selected. The inclusion of an offset term in the model modifies 
     Equation 1 to be ##EQU9## This is no more general than the above model as can be shown by using the standard method of adding an extra neuron at every layer but the last, which is not connected to the previous layer, and whose output is always 1. If we let 0 be the index for these additional neurons, 
     
         o.sub.m-1.sup.(0) =1                                       (14) 
    
     
         w.sub.m.sup.(k,0) =u.sub.m.sup.(k) m=1, . . . , n.         (15) 
    
     In general a #(0)-#(1)- . . . -#(n) network is a network with the additional units for offset. 
     The adaptive learning algorithm utilized in the present invention is based on the selection of two parameters: a momentum factor α and a directional learning rate η. The algorithm used is a version of the conjugate gradient algorithm shown and discussed by Strang, G., &#34;Introduction to Applied Mathematics&#34;, Wellesley-Cambridge Press, 1986. The use of a momentum term in conjunction with the gradient descent direction was discussed by Rumelhart, et al discussed above. The present invention utilizes two related parameters referred to as the directional learning rate and the momentum factor to distinguish them from the terms used by Rumelhart, et al. The method of the present invention is depicted geometrically in FIG. 2. At step i of the method the weight vector has a particular value W i . The gradient descent direction is provided by computing ∇W i  and normalizing the components by its Euclidean norm so that a unit length vector results. A new unit search vector is computed from this vector and the last search direction as shown based on the current directional momentum factor. A point along the new search direction is selected establishing a new directional learning rate. The momentum factor is adjusted and the method proceeds to the next step. The method is described more formally below and is shown in the flowchart of FIG. 3(a). 
     1. (Step 401) Start with an initial weight vector W 1 . 
     2. (Step 403) Compute ∇W 1  and set the first search direction (unit vector) ##EQU10## 3. (Step 405) Find the next weight W 2  =W 1  +η 1  S 1  by computing the new directional learning rate η 1  (see below). Set i=2 and go to the next step. 
     4. (Step 407) Compute the new directional momentum factor α i  (see below). 
     5. (Step 409) Compute ∇W i  and set ##EQU11## 6. (Step 411) Find the next weight vector 
     
         W.sub.i+1 =W.sub.i +η.sub.i s.sub.i 
    
     by computing the new directional learning rate η i  (see below). 
     7. (Step 413) Set i=i+1. Continue steps 4-7 until a predetermined error tolerance (as computer in Step 415) is achieved, or alternatively, until a local minimum is reached (Step 417). 
     The method of the present invention is to find a search direction, and compute a point along the search direction to modify the weights. The search direction is a unit vector, computed as a mixture of the previous search direction and the unit vector in the direction of gradient descent. The directional learning rate η i  at step i is computed by a search technique. A first version of the search technique is at each step i, begin with the double the previous directional learning rate η i-1  and see if the total error function is reduced in Equation (10). If it is, then this is the learning rate for this step. If not, halve the directional learning rate and see if the error is reduced. This step is repeated until the error is reduced. 
     (a) Begin with double the previous directional learning rate η i-1 . Set η +  =2η i-1 . 
     (b) Compute error with η + . If error is not reduced 
     
         η.sup.+ =0.5η.sup.+,                               (16) 
    
      and repeat this step, unless η&lt; Epsilon, where Epsilon is some preset threshold value. 
     (c) Set the directional learning rate η i  =η + . 
     A second variant of search for the directional learning rate is to begin the search with the directional learning rate at the previous value. If the error is reduced, attempt to reduce the error more by doubling the directional learning rate. If the error increases, go back to half the increase. 
     (a) Begin with current directional learning rate η i . Set η -  =0.0, η +  =η i-1 . 
     (b) Compute error with η + . If error is reduced, set 
     
         η.sup.- =η.sup.+                                   (17) 
    
     
         η.sup.+ =2η.sup.+,                                 (18) 
    
      and repeat this step. 
     (c) Set 
     
         η.sup.+ =1/2(η.sup.+ +η.sup.-)                 (19) 
    
      If error is not reduced with η + , repeat this step. 
     (d) Set the directional learning rate η i  =η + . 
     Selecting the directional learning rate η i  at step i is an attempt to approximately find the point along the search direction s i  with the most error reduction. A third line search method such as that presented and discussed by Dahl, E. D., &#34;Accelerated Learning Using the Generalized Delta Rule&#34;, IEEE First International Conference on Neural Networks, pp. II-523-530, 1987 which uses a parabolic approximation scheme may also be employed in the method of present invention. 
     The heuristic used for adapting the momentum factor is shown in FIG. 3(b). The momentum factor is allowed to drift between 0.0 and 1.0 in steps of 0.1 beginning at 0.5 (Step 425). The momentum factor is either drifting up or down. If the directional learning rate is not decreasing, then the momentum factor is allowed to drift in its current direction. If the learning rate is decreasing (Step 427), then the momentum factor drift changes direction (Step 429). This can be accomplished by incrementing the momentum factor α i  in step 4 of the adaptive descent algorithm by +0.1 or -0.1 depending on whether the current drift direction is up or down (Step 431). In the embodiment discussed this value has a maximum of 1 and a minimum of 0 (Steps 433-439). The predetermined parameters for these values may, of course, be changed without departing from the spirit or scope of the present invention. Then in step 6, if the new directional learning rate is less than the previous directional learning rate, the direction of the momentum drift is reversed. 
     The purpose of the momentum heuristic is to allow the search direction to adapt to the curvature of the error surface. At areas of high curvature valleys of the error surface, the gradient descent direction tends to zigzag and would lead to small steps in error minimization, so smoothing by including some proportion of the previous descent direction can lead to faster descent. 
     The geometrical interpretation of reducing error by search in weight space leads to the algorithm presented here where the search direction and the distance moved in weight space along the search direction is allowed to adapt to the local nature of the error surface. It is noteworthy that the normalization of the descent direction produced by the backpropagation algorithm is used. Thus the definition of directional learning rate and momentum factor are different than in standard approaches such as that discussed by Rumelhart, et al. These can be related by taking the equation: 
     
         ∇w.sub.i =η∇w.sub.i +α∇w.sub.i-1(20) 
    
     for step i. If η and α are allowed to vary with i, then they can be computed from η i  and α i  in the algorithm by ##EQU12## One implementation of the present invention is set forth in Appendix A which is incorporated herein by reference. There is thus provided a fast method for adaptively determining the synaptic weights in a neural network. 
     FIG. 3(c) is a flow chart of the implementation set forth in Appendix A. While there is not a direct correspondance with the method set forth above, Appendix A and FIG. 3(c) represent an alternative embodiment. A notable difference is in the terminology; &#34;velocity&#34; in Appendix A and FIG. 3(c) corresponds to &#34;learning rate&#34; in the discussion above, and &#34;gradient&#34; in the &#34;weight=weight+velocity*gradient&#34; statements of logic block 310 and logic block 316 corresponds to &#34;search direction&#34; in the equations above. 
     The first step is to create a neural network (Step 300). This step may be carried out in accordance with the &#34;make --  nn&#34; function of Appendix A. However, it should be noted that the creation of a neural network is not a necessary step for the method. On the contrary, the method may be carried out on an existing network. 
     Logic block 306 corresponds to the seven step method for adaptive learning in a neural network described above. For example, &#34;f --  prop&#34; of logic block 310 corresponds to equations (1) and (2), &#34;b --  prop&#34; of logic block 310 corresponds to equation (3), &#34;increment --  gradient&#34; corresponds to the determination of ∇W for a particular pattern, &#34;modify --  gradient&#34; corresponds to the determination of search direction in Step 5, the &#34;velocity&#34; computation corresponds to the &#34;learning rate&#34; calculation in either of the search techniques, and the &#34;weight&#34; calculation corresponds to the weight vector calculation of step 6. Similarly, in logic blocks 300 and 312, and the error calculation and subsequent comparison in logic blocks 302 and 314, correspond to step 7 of the adaptive learning method described above. Furthermore, logic block 316, which is invoked if the error is not reduced (as in step b of the first search technique described above), the velocity, i.e., the learning rate, is halved as in equation 16, above. Finally, the &#34;adjust --  momentum&#34; function of logic block 320 corresponds to the heuristic for adapting the momentum factor, described above. 
     FIG. 4 is a block diagram of the components of the apparatus of the present invention. The apparatus includes a host 10, bus 20 and processor network 30. 
     Host 10 is a standard processor-based digital computing device. Host 10 includes a processor 12 programmed to perform the calculations described above. Host 10 also includes a memory 14, which may be of any of a number of well known digital storage devices, and stores data used for the calculations of this invention, as well as instructions used by processor 12, for example, the software code of Appendix A. Host 10 further includes Input/Output devices 16, such as are associated with any number of well known peripheral devices, including devices whereby data may be input to the system by the user and output from the system for use by the user. 
     Bus 20 is used to communicate data, address and timing signals between host 10 and processor network 30 which may include one or more processors capable of carrying out instructions in accordance with the steps of the method described herein. There is thus provided a system for adaptively determining the weights between neurons in a neural network in accordance with the foregoing discussion. 
     While the method and apparatus of the present invention has been described with reference to the foregoing preferred embodiment and accompanying drawings, it should be apparent to those skilled in the art that changes and adaptations may be made without departing from the spirit and scope of the present invention as defined by the following claims. ##SPC1##