Abstract:
A method of and system for classifying a pattern wherein there is provided a node, the negative of a predetermined threshold signal is applied to the node, a plurality of digital signals in parallel, is provided the digital signals are converted to analog signals, the analog signals are applied to the node to provide a summation of the analog signals and the threshold signal on the node and a predetermined output is provided if the signal at the node is above a predetermined value. This provides the transfer of a weighted pattern to the threshold without addressing each threshold element individually.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to a method and system for computing the Hamming distance between two vectors in an N-dimensional space with binary components and to a method and system for comparing the Hamming distance with a preselected value and a method of changing the pre-selected value, if found to be too small, with a single digital command. 
     2. Brief Description of the Prior Art 
     Architecture for a complete pattern classifier has been developed by Nestor Learning Systems and is set forth in &#34;Neural Network Algorithms and Implementations&#34; by Dean R. Collins et al., Texas Instruments Incorporated, &#34;Pattern Class Degeneracy In An Unrestricted Storage Density Memory&#34; by Christopher L. Scofield et al., Nestor, Inc., American Institute of Physics, 1988, pages 674 to 682, &#34;Learning System Architectures Composed of Multiple Learning Modules&#34; by Douglas L. Reilly et al., Nestor Inc., pages II-495 to II-503 and &#34;Learning Systems Based on Multiple Neural Networks&#34;, copies of which are attached hereto and the contents of which are incorporated herein by reference. However, though the mathematics for the Nestor architecture has been developed, there is no known prior art which implements this architecture in an integrated circuit. It is apparent that a full digital implementation of the mathematics embodying the Nestor architecture has the disadvantage that the Hamming distance must be computed with some type of digital adder, such as a counter, and many N clock cycles are required to compute the required sum, where N is the pattern space dimension which could be 100 or more. The requirement of the many N clock cycles results in the necessity of a relatively high clock rate of N times the pattern rate. Also, the number of components required is relatively large, therefore resulting in a relatively large chip and the concomitant relatively high power consumption. It is therefore apparent that an integrated circuit embodiment of the Nestor architecture which operates with relatively low power consumption, yet operates at sufficiently high speed to perform the classification logic, is highly desirable. 
     SUMMARY OF THE INVENTION 
     In accordance with the present invention, the above noted problem is minimized and there is provided an integrated circuit embodying the Nestor architecture which provides the desired relatively low power consumption and which operates at sufficiently high speed to perform the classification logic. 
     Briefly, there is provided a method of computing the Hamming distance between two vectors in an N dimensional space with binary components, a method to compare this Hamming distance with a pre-selected value and a method to change this pre-selected value, if too small, with a single digital command. The method is implemented with a special integrated circuit in such a way that all of the inputs to the circuit and all of the outputs from the circuit are the usual digital (binary) signals encountered in logic integrated circuits. Internal to the circuit the computations are performed in the analog domain. This provides for a smaller chip and permits the computation of the Hamming distance and its comparison with a pre-selected value (the threshold) in one period of a four phase clock. The updating of the threshold, when required or desired, is performed in one additional clock period. The method herein is applicable in general whenever a large number of bits must be added and their sum compared to another number. 
     In accordance with a preferred embodiment of the invention, an N bit (e.g., N=100) incoming signal pattern is transmitted in parallel to N exclusive OR (XOR) gates, each exclusive OR gate having a unique previously stored bit value as a second input. Each exclusive OR gate charges or does not charge a capacitor, based upon whether or not there is a match of the stored bit signal and the incoming bit signal. An addition is then performed by discharging those capacitors that connect to a one bit of the threshold word. The potential of the common node of all the capacitors is tested by determining whether the potential on the node is greater than or less than some predetermined reference value previously placed on the node and inverted in polarity. In the digital mode, this addition would have to be accomplished sequentially. The only result sought is to determine whether or not the number of charged capacitors or sum is greater than the reference value. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a preferred embodiment of an analog implementation of a pattern classifier in accordance with the present invention; 
     FIG. 2 is a circuit diagram of the capacitor charging and discharging circuitry in accordance with the present invention; 
     FIG. 3 is a circuit diagram for providing the signals a 1  through a 100  of FIG. 2; and 
     FIG. 4 is a block diagram of a complete integrated circuit in accordance with the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring first to FIG. 4, there is shown a block diagram of a complete integrated circuit in accordance with the present invention showing the blocks of the various cells, most but not all of which are discussed in detail with reference to FIGS. 2 and 3. The blocks, in general, such as the input latches, clock generator, clock and data drivers, row decoder, sense amplifiers, output drivers, and data latches relate to standard digital circuitry which is well known. Accordingly, this circuitry will not be discussed in detail herein except as required to explain the inventive portion of the circuit. 
     Referring now to FIG. 1, which is one of the rows in the blocks XOR cells, comparators and OR cells of FIG. 4, there is shown a block diagram of a preferred embodiment of the present invention which comprises a portion of the integrated circuit of FIG. 4. There are shown 100 input lines P 1  to P 100 , each input line being an input to one of one hundred exclusive OR gates XOR 1  to XOR 100 . Each of the exclusive OR gates XOR 1  to XOR 100  has a second input thereto which is a unique stored bit stored in a storage element W 1  to W 100 . When the input signal on an input line P 1  to P 100  matches with the signal stored in the associated storage element W 1  to W 100 , a capacitor associated with that gate is charged up (to be explained hereinbelow). A subsequent clock signal phase then causes each of the capacitors to simultaneously dump their charge (if there is one thereon) onto a common node CD to charge up that node to a level based upon the number of capacitors that had previously been charged up due to a match. The sum of the outputs of the gates XOR 1  to XOR 100  is the Hamming distance H between P and W. 
     The signal represented by the charge on the node CD is fed to a comparator C. The comparator C contains a second input T which is a storage member having an adjustable threshold. When the signal on the line CD exceeds the threshold at input T, the comparator C provides a signal to that effect on the output line O from the comparator which connects to one or more of the output lines CL 1  to CL 50  via an OR gate OR2. 
     It should be understood that the circuit of FIG. 1 can include a plurality of parallel common nodes CD, each such common node coupled to the input lines P 1  to P 100  via exclusive OR gates such as those described hereinabove, but with associated storage elements W having the same or different signals stored therein as the other corresponding storage elements coupled to the same input line. Each of the common nodes CD would be coupled to its own comparator C, each comparator C having the same or a different threshold input T. Also, the output line O of each of the comparators C is coupled to one or more of the output lines CL 1  to CL 50  via an OR gate such as gate OR2. 
     Referring now to FIG. 2, the operation of the analog portion of the circuit of FIG. 1 and the threshold will be explained. Initially the feedback switch R is closed, forcing the input CD of the inverter 3 to be equal to its output voltage. This voltage value is referred to as V trip  and would typically be set at one half the supply voltage by proper sizing of the transistors in the inverter 3. At this same time, the bottom plates of the capacitors Cu are connected to ground (0 volts) or V ref  (near 2.5 volts if a 5 volt supply is used, for example). The signals a 1  to a 100  which control this connection via switches 1 to 100 and switch 1/2 which is controlled by signal a 1/2   are in turn determined by the 100 stored threshold bits in threshold latches T 1  to T 100  similar to the W latches of FIG. 1, and switch 1/2 is controlled as explained below. 
     A one bit in the latch T causes the bottom plate of the associated capacitor Cu to be connected to V ref  or 2.5 volts and a 0 bit causes that bottom plate to be connected to 0 volts. After the charge flow has equilibrated, switch R is opened so that node CD is floating at V trip . By way of explanation of the operation, an intermediate step is now included where all the bottom plates are connected to ground, 0 volts by operation of signals a 1  to a 100 . In practice, this step is not required. Assuming, for illustration, that &#34;N&#34; threshold bits are 1 bits and thus 100 - N are 0 bits, the voltage on node CD will then change from V trip  to V trip  -N*Cu/(100.5*Cu+C s ) from elementary circuit theory. The factor 100.5 comes from the total capacitance of the 100 equal capacitors Cu, plus an additional 1/2 Cu, whose function will be explained hereinbelow, plus C s  the stray capacitance from node CD to ground. 
     At the next stage of the operation, the signals a 1  to a 100  are controlled by the exclusive-or gate outputs of FIG. 1 by conventional digital switching circuitry. The number of outputs that are 1&#39;s is the Hamming distance between the input vector P and the weight vector W in the row under consideration. Those outputs that are 1 will cause the bottom plate of those capacitors Cu associated therewith to be connected to V ref , those that are 0 will keep the bottom plates connected to ground, 0 volts. Assuming that H outputs are 1 and therefore 100-H are at 0, the consequent switching of the bottom plates of the capacitors Cu will cause the voltage on node CD to change from its last value to V trip  -N*Cu/(100.5*Cu+C s )+H*Cu/(100.5*Cu+C s ). 
     Depending upon whether N is larger or smaller than H, the voltage on node CD will be less than or greater than V trip . The output of inverter 3 will then go toward logic 1 or logic 0. Subsequent inverter stages, not shown in FIG. 2, will convert this signal to full logic levels. The outputs of these amplifying inverters are typically stored in a latch which is part of the comparator circuitry and then processed via the OR gates OR 2  shown in FIG. 1 and the result brought to the output pins CL 1  to CL 50  of the circuit. 
     The case when N is equal to H provides an indeterminate output from the comparator C, this being undesirable. This comparator output could go either to logic 1 or logic 0, depending upon small differences in the capacitors Cu or small noise voltages that inevitably are added to node CD. In order to prevent this situation from arising, the threshold is always increased from N to N+1/2 by switching the capacitor 1/2 Cu from V ref  to 0 volts after switch R has been opened. The Hamming distance H therefore has to exceed the threshold N by one unit in order for the comparator C to provide a logic 0 output. 
     The comparator C as described herein as a series of inverting stages and terminating in a latch and the 1/2 unit offset of a signal are well known techniques used in charge redistribution analog to digital converters. 
     Among the various learning modes of the whole neural network, one can be easily implemented with the circuits described herein. In this mode, a test pattern is presented to the inputs P 1  to P 100  and the comparator C output is required to be logic 1. This state is detectable at the output pins CL 1  to CL 50 . If the proper state is not obtained, the threshold T in each row is changed so that the proper state is obtained. The easiest way to do this, row by row, is to change the threshold stored bits T 1  to T 100  to the value of the outputs of XOR 1  to XOR 100  respectively. This replaces N in the above example with H and the threshold becomes H+1/2, which is larger than H, as required. Each row must be activated separately in this process. 
     A detailed circuit in CMOS technology that will perform all of the above described operations is shown in FIG. 3. There is shown the circuit associated with one capacitor Cu in one row of the entire neural network. One of the buffered inputs P j  and its complement NP j  are bussed through the jth cell in each row. The cell in the ith row contains a latch W ij  for the weight bit. The latch is composed of two cross coupled inverters, with the inputs of the inverters connected to inputs P j  and NP j  via NMOS transistors that can be turned on by write signal WE i  on their gates. The write signal WE i  is common to all these latches in row i. Not shown is a decoder whose input is the number i and a signal WE so that only row i is selected and all j inputs to all the latches W ij  are then connected to inputs P j  and NP j  and this data is transferred to the latches. This is standard digital circuitry as is used in static random access memories for writing data into memory. This circuitry is repeated for a second latch T ij  which will store the threshold value and can be written into from inputs P j  and NP j  with an externally provided control signal TE and the row address i. The weights and threshold values can therefore be entered into this network via the inputs P 1  to P 100  in a row by row fashion, analogous to writing data into static random access memory. Additional circuitry can be added to the bus lines P j  and NP j  so that the values of the bits in a particular row can be retrieved and brought to output pins in exactly the same way as the read is performed in a static random access memory. 
     During normal operation, a signal pattern P 1  to P 100  is presented to the circuit. At the jth cell in the ith row, the complement of NX ij  of the exclusive or of input P j  and weight signal W ij  is generated by the XNOR gate in FIG. 3. This XNOR gate can most simply be two CMOS transmission gates as shown. 
     The operation of the cell is controlled by a four phase clock. During phase 1, the common capacitor node CD is connected to a voltage source close to V trip  (shown as 2.5 volts in FIG. 3, where a 5 volt supply digital CMOS process is assumed) by a CMOS transmission gate SF for fast charging of the node CD to a value close to V trip . Switch R in FIG. 2 is closed. CMOS transmission gate ST is closed an SH is open. The signal A ij  that controls the voltage on the bottom plate of the capacitor Cu, via the transistors BN and BP, is the value of the complement of the threshold bit stored by T ij  and is buffered by inverter I1. If the threshold bit is a logic 1, then the bottom plate of capacitor Cu will be connected to V ref , otherwise it is connected to 0 volts. The signal A1/2 in FIG. 2 is at logic 0. 
     During phase 2 of the clock, transmission gate SF is opened and node CD will now fully charge to the voltage V trip  by the current supplied by the comparator C shown in FIG. 2. 
     During clock phases 3 and 4, switch R in FIG. 2 is opened, switch ST is opened and switch SH is closed. The signal A ij  now becomes the output of NX ij  of the XNOR gate. The bottom plate of capacitor Cu is connected to V ref  if this signal is logic 0, otherwise it is connected to 0 volts. The signal A1/2 in FIG. 2 is taken to logic 1. The input pattern P 1  to P 100  must be valid. At the end of clock phase 4 the output of the comparator is stored in a latch. 
     The inverter I1 isolates the latch T ij  from signal transients that might change its stored data, during the transition from phase 2 to phase 3. The latch T ij  also has a second set of inputs controlled by signal TR i . This input TR i , when activated by the row decoder and an additional input TR, will cause the data in latch T ij   to be changed to the complement of the value of X NOR  output X ij  and it becomes the new threshold value. The threshold is thus changed to the Hamming distance between the input pattern P 1  . . . P 100  and weight W i1  . . . W i100 . This threshold change is used in the learning mode as described hereinabove. 
     Though the invention has been described with respect to a specific preferred embodiment thereof, many variations and modifications will immediately become apparent to those skilled in the art. It is therefore the intention that the appended claims be interpreted as broadly as possible in view of the prior art to include all such variations and modification.