Abstract:
A three layer artificial neural network having an N terminal input, a two cell hidden and a single cell output layer generates an output parity signal indicating whether an even or an odd number of binary bits are asserted at the N terminal input. The two hidden layer neural cells have activation functions that cause deviations about a linear response characteristic that allow the classification of a signal representative of the number of asserted input bits into odd and even groups. This network represents a significant reduction in the number of hidden units previously required because of the particular form of activation transfer characteristic used in the two hidden layer neural cells.

Description:
FIELD OF THE INVENTION 
     This invention relates to the field of artificial neural networks and more specifically to the implementations of an N-bit parity encoding network. 
     BACKGROUND OF THE INVENTION 
     Parity encoders are used in digital communications and digital memory systems for purposes of detecting system errors. An encoder performs an exclusive-or (XOR) operation on a string of bits. If the number of asserted bits is odd, the parity bit is asserted and if otherwise, the parity bit is not asserted. Thus, if a single bit error occurs in the transmission or as a result of storage, the error can be detected by performing the same XOR parity operation on the string of received bits and by comparing the result with the previously generated parity bit. The standard TTL 74180 parity generator/tester chip is an example of a digital logic implementation of such a network. 
     The problem of implementing an N-bit parity encoder has been studied by Rumelhart, Hinton and Williams, &#34;Learning Internal Representations by Error Propagation,&#34; pp. 334-335, Chapter 8. Parallel Distributed Processing: Explorations in the Microstructure of Cognition, MIT Press, 1986. Rumelhart et al. conclude that in a three layer network (input, hidden and output layer) without any direct connection from the input to the output units, that at least N hidden units are required to solve parity with patterns of length N. 
     FIG. 1 shows the Rumelhart et al. solution. The three level network consists of an N-terminal input, where input terminal 10 is typical, a set of unit weighted synaptic (receptor)input connections, such as connection 16, which connect the input to the hidden layer of N neural cells 12, each neural cell 12 having a threshold value applied on input 22, a total of N synaptic weights connecting the output of the hidden layer cells 12 to the single output layer neural cell 14, each weight having alternately signed unit weights where solid lines signify positive and dotted lines signify negative or inhibitory unit values. The output of hidden cells 12 and output cell 14 is transformed by an appropriate threshold activation function to produce an output of +1 if the sum of the inputs is greater than zero, and zero out if otherwise. Thus, it should be noted that if any k bits out of N are asserted at the input, the sum, net m , of the input bits plus the threshold and the hidden layer input will be 
     
         net.sub.m =k+(1-2 m)/2                                     (1) 
    
     where (1-2 m)/2 is the threshold bias input 22 of the m th  bit. As a result, 
     
         net.sub.m &gt;0, k≦m                                   (2) 
    
     
         net.sub.m &lt;0, k&gt;m 
    
     so that the output of the first k hidden layer cells 12 will be a logic 1 while the remaining N-k will be at logic level 0. If m is an even number, the sum or value of &#34;net&#34; into output cell 14 will be -1/2 causing a zero logic output, otherwise causing a logic 1 level, in accordance with the N-bit parity rule. 
     The N-bit parity problem is non-linearly separable which cannot be solved by a two level network (input and output level)in which the problem itself indicates the number of input and output terminals. The N-bit parity problem requires a three layer structure. However, for three layer structures, there is no general hard and fast rule as to the number of hidden units required, that can be applied before the training and application of weight (connection) minimization techniques. 
     A simple three-level neural network with a minimum of hidden units would be useful for neural networks requiring implementation of the N-bit parity function using compatible neural network technology, thus potentially providing simplicity in construction, speed of use, and smaller area utilization on silicon VLSI. 
     SUMMARY AND OBJECTS OF THE INVENTION 
     One object of the present invention is to the implementation of N-bit parity network using neural network compatible components. 
     Another object is to provide a simpler network using less hidden units than the prior art. 
     Another object is to provide a trainable neural network by using an activation function nonlinearity that is strictly a monotonically increasing function of the input &#34;net&#34; value. 
     Another object is to use a feedforward neural network with a single hidden layer. 
     Another object is to have every unit in the hidden layer have identical nonlinear activation transfer characteristics for ease of manufacture. 
     A three (input, hidden, and out) level N-2-1 neural network having N input terminals and two hidden layer neural cells with identical monotonically increasing transfer characteristics is described that implements the classic N-bit parity problems in which an odd number of asserted input bits produces an asserted output bit. An even number of asserted input bits produces a de-asserted output. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The present invention is illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements and in which: 
     FIG. 1 shows a prior art (Rumelhart et al.) N-bit parity neural network. 
     FIG. 2 shows a typical M-P neural cell. 
     FIG. 3 is a N-2-1 realization of an N-bit parity neural network. 
     FIG. 4 shows the transfer characteristic of the two hidden layer activation nonlinearities. 
     FIG. 5 shows the transfer characteristic of the output level neural cell activation function nonlinearity. 
     FIG. 6 shows the net activation output value applied to the output neural cell. 
     FIG. 7 shows the net activation output values for the hidden units in a 4-2-1 network. 
    
    
     DETAILED DESCRIPTION 
     FIG. 2 shows a typical neural network of the McCullogh-Pitts (M-P) type in which data is applied to the N input terminals 32. Weights, 34, labeled w 1 . . . w N , scale the input value applied to each of the associated input terminals producing, at the output of adder network 38, the vector dot product of the weight vector w and input data vector x ##EQU1## Also, an offset may be applied to adder 38 or alternatively, the constant offset signal may be included with the input vector as a constant input scaled by a corresponding element of weight vector, w. 
     The vector dot product labeled &#34;net&#34; of the output of adder 38 is applied to activation unit 40 typically having a nonlinear input/output transfer characteristics f(·), that yields at its output the value f(net). 
     The transfer characteristic, f(·), of element 40 typically is a monotonic increasing function of its input that may include the standard sigmoidal function 
     
         f(net)=e.sup.α.net /(e.sup.α.net +1)           (4) 
    
     where α has a positive finite value. 
     As a result, ##EQU2## A limiting form of this function is the sign or signum function ##EQU3## also known as a hard limiter function. 
     Clearly, the network of FIG. 2 has many possible implementations depending on other design consideration such as the type of circuit technology used. For example, analog implementation may use discrete or integrated circuit technology. Similarly a number of viable digital options are also well known in the art. Combinations of both analog and digital techniques are used in commercial offerings of neural network cells and networks. 
     For purposes of explanation, FIG. 3 shows an embodiment of N=6 parity network using an M-P type neural cell at the output level. The transfer characteristic of the hidden units 54 and 56 is given by ##EQU4## where net=w T  ·x+offset, w is the weighting vector 66 or 68 of hidden neural cells 54 and 56 respectively, and x=[x 1  x 2  . . . x L  ] T , the input data vector. The set of input weights 66 and 68 are all equal so that each set may be represented by the vector w=[1 1 1 . . . 1] T . Therefore the dot product w T  x is equal to the sum of the number of asserted input bits. 
     The parameter α is any constant greater than 1. This restriction on α ensures that the transfer characteristic is monotonically increasing function, a necessary constraint for most learning (training) algorithms. 
     As a result, the value of net applied to neural cell 56 is ##EQU5## where n is the number of asserted input bits. 
     Similarly, the value of net applied to neural cell 54 differs by the offset value of -1 so that 
     
         net.sub.54 =w.sup.T ·x+1=n-1                      (7) 
    
     Consequently, the values of the output of hidden layer cells 54 and 56 are ##EQU6## 
     FIG. 4 is a plot of equations (8) for the 6-2-1 network of FIG. 3. For clarity, the value is plotted as a continuous function of the number of active inputs, n, even though n is an integer variable. Because the hidden units are connected to the output unit with opposite sign as indicated by dot on receptor 60, and because output neural cell 52 has an offset of -1/N, the value of net 52  is ##EQU7## The expression of equation (52) is plotted in FIG. 5. Again, for the sake of clarity, the value of net 52  is plotted as a continuous real function of number of active inputs. 
     Other functionally equivalent embodiments will be apparent to those skilled in the art. For example, if the offsets supplied to neuron cells 52 and 54 on lines 42 and 44, respectively, were set to zero, the values of f(net 54 ) and f(net 56 ) would be ##EQU8## which is identical to equation (9). 
     Because the output neuron 52 is a linear threshold unit acting on net 52, the output at integer values of n will oscillate between 0 for even values and 1 for odd values producing the desired parity output function. 
     In order to further clarify the function of the feedforward parity network described, refer to FIG. 6 which shows the mapping of the input space to the hidden layer output space for an N&lt;4 bit parity problem. The non-traditional transfer characteristic of the hidden units acts to shift the even-parity patterns below, and the odd-parity patterns above the discriminating line v=u+1/N. This is the decision boundary computed by the hidden to output layer. 
     FIG. 6 shows the net activation, f(net), of the hidden units in 4-2-1 parity network. A total of 16 bit patterns may be represented by the 4-bit input. The blackened discs represent even parity inputs while the white discs represent odd parity inputs. The bit patterns are listed next to their associated dots. The abscissa, u, is the activation value f(net 54 ) of the left hidden unit with bias as shown in FIG. 3 while the ordinate, v, represents the f(net 56 ) of the hidden cell the right. Because of the particular transfer characteristics described by equations (8), the points may be separated by the line v=u+1/4, which is computed at the input to the output cell. 
     It is important to note that the specific form of activation described by equation (5) is not unique. The term cos(π·net)=cos(π·n) could be replaced by any number of functions, for example g(·), having a similar, but not identical oscillatory nature. In other words it is required that 
     
         g(n)&gt;0, for n odd                                          (10) 
    
     
         and g(n)&lt;0, for n even 
    
     For example, the transfer characteristic for g(n), shown in FIG. 7(a) and (b) would serve the purpose. It is also clear that the function g(n) does not have to be strictly periodic but only that its sign be oscillatory for even and odd values of the argument, n. 
     Analog methods for implementing nonlinear transfer characteristics are well known in the art. For example, diode arbitrary function generators and polynomial function generators may be used such as described in &#34;Nonlinear Circuitry Handbook&#34;, Sheingold, D. G., editor, Analog Devices, Inc., Publisher, Norwood, Mass., 1976, pages 29-64. 
     If strict monotonocity is also required, the first derivative of the generalized form of equation (5), or equivalently ##EQU9## may require that the first derivative be positive for all values of n. Thus ##EQU10## This constraint on monotonocity may be necessary for training purposes where the activation function, f(n), is used to initialize an untrained network. 
     Because these and other variations will be apparent from the above description to those practicing the art, the above description and techniques are only intended to be exemplary and limited by the scope of the claims. 
     Also, in the foregoing specification, the invention has been described with reference to specific embodiments thereof. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention as set forth in the appended claims. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.