Abstract:
A circuit for realizing controllable analog weights as used, for example, in template matching circuits. Analog weights are obtained by storing charge on two primary capacitors and by controlling the potential difference between the two primary capacitors. The control of charge on the two capacitors is effected with a bridging connection between the two primary capacitors. In one embodiment, the bridging connection contains two switches and an MOS transistor.

Description:
BACKGROUND OF THE INVENTION 
     This invention relates to pattern matching and, more particularly, to a network for matching an input vector signal to a set of vector signals stored within the network. 
     A wide variety of applications exist in which it is desirable for a machine to automatically recognize, analyze and classify signal patterns. One such application, for example, is found in the field of imaged character recognition. That is, printed fonts, or hand written characters are presented to the character recognition system, and the task is to identify the characters. Often, such identification can be made through pattern matching of the signals representing the characters with some preset templates. One such system is disclosed in a copending application, filed on Dec. 20, 1988, entitled &#34;Imaged Symbol Classification&#34;. Another such system is described in U.S. Pat. No. 4,259,661 issued Mar. 31, 1981. 
     Another area where template matching is very useful is in connection with associative memory. When using an associative memory, the user generally knows only a portion of the desired output signal, or knows the desired signal imperfectly. Template matching permits the system to identify the closest match to a set of stored signals. 
     Digital computers are ubiquitous and quite powerful, but they do exhibit certain limitations in problem solving. Many classes of problems take such an enormous amount of computation that a solution in real time is not practically possible. Pattern recognition, generally, and template matching, in particular, are examples of such problems. 
     Until recently, most artisans either suffered the limitations of general purpose digital computers or developed special purpose digital computers to solve their particular problems more efficiently. 
     On Apr. 21, 1987, U.S. Pat. No. 4,660,166 titled &#34;Electronic Network for Collective Decision Based on Large Number of Connections Between Signals&#34; was issued to J. J. Hopfield, and it renewed efforts to find a compact solution to pattern matching, among others. Hopfield disclosed a generalized circuit having N amplifiers of high gain and an N×N interconnection matrix having N input conductors and N output conductors. The amplifiers exhibit a sigmoid input-output relation, with a minimum and maximum possible output which can be thought of as a &#34;0&#34; and a &#34;1&#34;. Each input conductor of the interconnection matrix is connected to the input of a separate one of the amplifiers, and each amplifier has its output terminals (positive and negative) connected to a separate one of the matrix output conductors. Each amplifier has in addition an input capacitance and resistance. Within the interconnection matrix, each input conductor is connected to an output conductor through a resistor. 
     When used as an associative memory circuit, the input signals that represent the known portion of the information desired are applied to the amplifiers. This alters the state of the circuit. Once the circuit&#39;s state is altered, the amplifiers in combination with the feedback interconnection network drive the circuit to a new stable state. The new state produces a unique output that corresponds to the sought information. 
     Since the amplifiers have a high gain, the alteration in the circuit&#39;s state drives the circuit to one of a set of predetermined stable states which presents an output pattern of binary 1&#39;s and 0&#39;s at the amplifiers&#39; outputs. The state to which the circuit is driven is dictated by the collection of the resistor values in the feedback interconnection network. The values are analog quantities. 
     The circuit has the potential for being very compact because the only active elements are the amplifiers, and the structure is very regular. On the other hand, creating resistors in semiconductor technology with accurate values is not easy. Furthermore, wide dynamic range for such resistors is difficult to achieve. That is, it is difficult to create both resistors of very low values and resistors of very high values. 
     Another difficulty relates to the fact that in a semiconductor IC realization of this circuit, it is difficult to alter the values of the resistors. Furthermore, a modification to even one of the templates that are stored in the interconnection network results in required changes to all of the resistors. The reason for this is that the information about the stored templates is distributed throughout the interconnection network. 
     These problems were solved with a circuit disclosed in a copending application by H. P. Graf titled &#34;A Computation Network,&#34; which was filed in the U.S. Patent Office on Jan. 20, 1987, and bears the Ser. No. 005,248, now U.S. Pat. No. 4,901,271. It contains two networks that store the templates, and an n-tuple network. The three networks are circularly connected. In the Graf network, the stored templates are not comingled and, therefore, the storage of the template information can take on the binary values of the templates. The storage is realized with flip-flops, dedicated to each bit. Means are also disclosed for implementing the process of storing the information in those bits, and for thereby altering the stored information. Each of the template-storing networks merely contains a set of input busses and a set of output busses. Each of the input busses contributed to the output of each of the output busses under control of the flip-flops that store the templates. In one of the template-storing networks, a template is stored in the flip-flops that control a particular output bus. In the other template-storing network, a template is stored in the flip-flops that control a particular input bus. 
     Pattern matching received a boost from another direction with recent advances in the field of connectionism. Specifically, highly parallel computation networks (&#34;neural networks&#34;) have come to the fore with learning algorithms for multi-layered networks in which &#34;hidden&#34; layers of neural elements permit separation of arbitrary regions of the feature space. Use of such a network has indeed been applied to the character classification process, as described, for example, by Gullichsen et al. in &#34;Pattern Classification by Neural Networks: An Experimental System for Icon Recognition&#34;, Proceedings of the IEEE First International Conference on Neural Networks, pp IV--725-732, Cardill et al., Editors. 
     Like the aforementioned Hopfield circuit, these circuits require the ability to multiply input signals by an analog value, and the ability to add the resultant products. 
     In the charge coupled device (CCD) art, storage of information has been accomplished by recognizing that electric charge can be stored not only in discrete capacitors but also in spatially defined areas of electric potential minima within a semiconductor material. The storage site can be accessed, and location of the site can be changed within the semiconductor in, at least, two dimensions. Thus, electric charge can be stored and moved. One example of such storage devices is found in U.S. Pat. No. 3,858,232, issued to Boyle et al. on Dec.31, 1974. 
     SUMMARY OF THE INVENTION 
     Our invention applies some of the basic concepts in the CCD art to the pattern matching field. Specifically, our invention realizes analog weights in template matching circuits by storing charge on two primary capacitors and by controlling the potential difference between the two primary capacitors. That potential difference, which corresponds to the required analog connection weight, is applied to an analog multiplier. The second input of the multiplier is connected to the signal to be multiplied. 
     The control of charge on the two capacitors is effected, in accordance with our invention, with a bridging connection between the two primary capacitors. In one embodiment, the bridging connection contains two switches and a controlled capacitance device, such as an MOS transistor, therebetween. 
     In another embodiment, the bridge contains three switches and two controlled capacitance devices therebetween. The latter embodiment, permits an efficient controlled reduction in the magnitude of the potential difference between one and two primary capacitors. 
     Means are also provided to detect the value of the potential difference between the primary capacitors for storing that difference in a memory pad for comparing that difference to a value stored in the memory. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING 
     FIG. 1 presents a general flow diagram of a classification method; 
     FIG. 2 depicts the structure of a two-layer neural network with analog-valued connection weights; 
     FIG. 3 illustrates one realization for an analog-valued connection weights neural network in accordance with the principles of our invention; and 
     FIG. 4 illustrates another realization for an analog-valued connection weights neural network in accordance with the principles of our invention. 
    
    
     DETAILED DESCRIPTION 
     FIG. 1 presents a flow chart of a process for character or symbol classification. It is disclosed in detail in the aforementioned copending application titled &#34;Imaged Symbol Classification&#34;. In block 10, the character image is captured and stored in a frame buffer. In blocks 20 and 25, the image is cleansed of &#34;smudges&#34; and other extraneous strokes, and scaled to a preset size. In blocks 30 and 40 the cleansed and scaled image is deskewed to remove the slant in the character, and skeletonized to make the image lines as thin as possible. Blocks 50 and 60 extract the features of the thin and upright image, and block 70 reduces the size of the signal vector that describes the found features. Lastly, block 80 classifies the available feature information into one of a set of characters that is known to the classifier. 
     A number of the FIG. 1 blocks are realizable with pattern matching circuits, but the block that gains most from a two-layer, analog weight, pattern matching network is block 80. 
     The reason why the two-layer, analog weight, network is so useful for realizing block 80 is that, although we recognize that certain important features of characters are important, we do not exactly know how we recognize them. For example, we neither know how we recognize a &#34;4&#34;, nor the limits of when we can recognize a &#34;4&#34; and when we are so unsure as to decline to make a decision. Yet, we know a &#34;4&#34; when we see one! 
     Current research attempts to solve this problem by having the classifier circuit &#34;learn&#34;, through trial and error, to reach the correct decisions. The structure that has the potential for such &#34;learning&#34; is the two-layer, analog weight structure depicted in FIG. 2. This learning technique is commonly referred to as &#34;back propagation.&#34; See D. E. Rumelhart et al. in &#34;Learning Internal Representations by Error Propagation&#34;, in D. E. Rumelhart, J. L. McClelland (Eds.), Parallel Distributed Processing: Explorations in the Microstructure of Cognition, MIT Press, 1986, Chap. 8. 
     FIG. 2 comprises interconnection networks 81 and 82 that are serially connected. The input signal set is applied at the input of network 81, and the output signal set appears at the output of network 82. Each of the networks has a plurality of input and output leads, and each input lead is connected to all of the output leads. More specifically, each input lead i is connected to each output lead j through a connection weight w ij . In the FIG. 1 application, network 81 has 270 input leads and 40 output leads. Network 82 has 40 input leads and 10 output leads. The number of input leads of network 81 is dictated by the length of the applied signal vector. The number of outputs of network 82 is dictated by the number of characters in the classifying set. The number of intermediate leads (in this case, 40) is determined heuristically. 
     Training of the FIG. 2 circuit is carried out by applying a feature vector developed from a known character, and adjusting the weights in both network 81 and 82 to maximize the output signal at the designated output lead of network 82 corresponding to the known character. All available samples of all the characters in the set to be classified are applied to the network in this fashion, and each time, the weights in the interconnection network are adjusted to maximize the signal at the appropriate output lead. In this manner, a set of weights w ij  is developed for both networks. 
     It may be appropriate to explicitly mention that since connection weights w ij  are analog in nature, the FIG. 2 circuit also operates in an analog fashion. That is, the voltage at any output lead of network 81 is a sum of the contributions of the &#34;fired up&#34; weights connected to that output lead. Each weight is &#34;fired up&#34; by the binary signal on the input lead to which the weight is connected. Thus, the output at lead j equals ##EQU1## where B i  is the value of the i th  input lead (0 or 1). 
     Though the concept of such a learning network is fairly well understood, the task remains to realize such an analog circuit efficiently and compactly. The requirements on such a circuit are not trivial. For example, the minimum weight change, or modification, must be fairly small if optimization of the network is to be achieved. The iterative improvement methodology described above is based on the heuristic assumption that better weights may be found in the neighborhood of good ones, but that heuristic fails when the granularity is not fine enough. We found that for our small network 81, at least 8 bits of analog depth are necessary. Larger networks may require even finer granularity. The weights must also represent both positive and negative values, and changes must be easily reversible. During the learning and training session the number of changes to the weights can be quite large. Therefore, a practical circuit must allow for quick modification of the weights. 
     Taking these and other requirements into account, we have created an efficient analog connection weight circuit with MOS VLSI technology. 
     Whereas each connection weight in FIG. 2 is depicted with merely a black dot, FIG. 3 presents our circuit for implementing these dots. More particularly, FIG. 3 shows our connection weight circuit with its connection to input lines 83 and output line 84, as well as some common circuitry. Primarily, the interconnection weight portion of the FIG. 3 circuit includes capacitors 801 and 802, small MOS switches 803 and 804, a relatively large MOS transistor 805, a differential amplifier 806, and a multiplier 807. Secondarily, the circuit of FIG. 3 includes a charge-coupling switch 808, a sensing switch 809 and various control leads. 
     The circuit operates as follows. Capacitors 801 and 802 are charged to different voltage levels, and the difference in voltage levels is reflected in the output voltage of differential amplifier 806. Amplifier 806 has its two inputs connected to capacitors 801 and 802. The output of amplifier 806, which represents the connection weight, is connected to multiplier 807. Multiplier 807 can be any conventional transconductance amplifier. Also connected to multiplier 807 is input lead 83 of the interconnection network. The output of converter 807 is connected to an output lead of the interconnection network. Thus, multiplier 807 sends a current to the output lead that is a product of the signal at the input lead and the value of the connection weight. The connection weight is represented by the differential voltage developed by amplifier 806 in response to the difference in voltages between capacitors 801 and 802. 
     We have found that the difference in voltages on capacitors 801 and 802 is maintained for a long time (relative to the operations involved in OCR systems) and that no refreshing is necessary when the circuit is kept at reasonably low temperatures. For example, at 77 degrees Kelvin no detectable loss has been noted with time. It may be observed that one advantage of our circuit is that the weight is proportional to V C .sbsb.801 -V C .sbsb.802 and, therefore, even a loss in charge--when it is the same at both capacitors--results in no change to the weight. 
     Nevertheless, it is clear that an avenue must be provided for refreshing the information on capacitors 801 and 802. Moreover, an avenue must be provided for setting a voltage (charge) value on capacitors 801 and 802 and for modifying the set values to allow for the above-described &#34;learning&#34; procedure. This is where the remaining switches and controls come in. 
     To bring a connection weight to a desired level, switch 808 is closed momentarily to allow a fixed voltage level to be applied to capacitor 801 from voltage source 816. That voltage corresponds to a fixed charge. Thereafter, switch 808 is turned off. At this point, the weight of the connection is at a maximum positive level because capacitor 801 is connected to the non-inverting input of amplifier 806 and carries a positive voltage, while capacitor 802 is connected to the inverting input of amplifier 806. A change in the connection weight is accomplished in the following way. 
     First, transistors 803 and 805 are turned ON. Transistor 803 is very small compared to transistor 805 and for the sake of a better understanding of what happens, transistor 803 can be thought of as being merely a switch. By comparison, transistor 805 is long and narrow and when it is ON it can be thought of as a capacitor. When switch 803 is closed and transistor 805 is turned ON, the charge on capacitor 801 is distributed between the capacitor (801) and the inversion charge on the turned on transistor 805. Transistor 803 is then turned OFF, thereby trapping the charge in transistor 805. Transistor 804 is then turned ON and when transistor 805 is slowly turned OFF, the mobile charge in its channel diffuses through switch 804 into capacitor 802. 
     The above steps thus move a quantum of charge from capacitor 801 to capacitor 802. That corresponds to a change in the capacitors&#39; voltages and in the interconnection weight. 
     The above sequence can be repeated as many times as necessary to bring the connection weights to the desired levels. Hence, the optimization of the connection weights can proceed during the training period in this manner, with the result that each interconnection weight in networks 81 and 82 is set to the correct level. 
     The above description addresses the training aspect of the circuit. Once the learning process is over, means should be provided for 1) determining the values of the weights and 2) refreshing the weights to compensate for losses with time, etc. This is accomplished with the aid of sensing switch 809, a conventional A/D converter, a conventional D/A converter, and a non-volatile memory. 
     To determine the value of the weights in an interconnection network, sensing switches 809 are sequentially turned ON to allow each amplifier&#39;s voltage to appear on sensing bus 810. That voltage is applied to A/D converter 811 and the resulting digital information is stored in memory 812. All of the weight are converted to digital form in this manner and stored in memory 812. During a refresh operation, each connection weight is isolated in the manner described above, but this time the voltage output on sensing bus 810 is compared in amplifier 814 to the analog voltage of D/A converter 813, to which the digital output of memory 812 is applied. Of course, memory 812 is caused to deliver the digital output that corresponds to the refreshed connection weight. Based on the comparison results, the sequence of switching elements 803, 804, and 805 is controlled by the output signal of amplifier 814 to either increase or diminish the voltage of capacitor 801 relative to capacitor 802. The control of directing the output of bus 810 to either A/D converter 811 or to comparator amplifier 814 is effected by switch 815. Should it be necessary to completely discharge both capacitors 801 and 802, the voltage of source 816 can be reduced to zero and switches 803, 804, and 805 can be turned ON. All control signals emanate from control block 850. 
     As an aside, capacitors 801 and 802 can be created within the semiconductor material that the other MOS transistors are created. 
     In certain circumstances, such as during the &#34;training&#34; process, it may be advantageous to reduce the magnitude of one of the analog weights. Such a perturbation, or noise, helps the minimization process by allowing the FIG. 2 network to escape local minima. Without first determining whether capacitor 801 carries a larger potential than capacitor 802, it is difficult to perform this function simply with the circuit of FIG. 3. FIG. 4 presents such a circuit. 
     FIG. 4 is very similar to FIG. 3. The only difference between the two is that MOS transistor 805 of FIG. 3 is replaced in FIG. 4 with the series connection of MOS transistors 825, 826, and 827. Transistor 826 is of minimum size and, like transistors 803 and 804, can be thought of as a mere switch. Transistors 825 and 827 are relatively large transistors, and they can be thought of as capacitors, when they are ON. 
     The FIG. 4 circuit operates as follows. During a training session when the direction in which charge is to be moved is known, transistor 826 is closed, and transistors 825 and 827 are controlled as a single element. These transistors, therefore, simply combine to form a single capacitor when they are turned ON. The circuit&#39;s operation follows exactly the procedure described above in connection with FIG. 3. On the other hand, when it is desired to merely equalize the charges somewhat, transistors 803, 825, 827, and 804 in FIG. 4 are turned ON concurrently while transistor 826 is turned OFF. Charges flow from capacitor 801 to the capacitance formed at transistor 825, and from capacitor 802 to the capacitance formed at transistor 827. After a while, transistors 803 and 804 are turned OFF, and transistor 826 is turned ON. This causes the charges on transistors 825 and 827 to equalize. Finally, transistors 803 and 804 are turned ON and transistors 825 and 827 are turned OFF. This causes the charges on transistor 825 to migrate to capacitor 801, and the charges on transistor 827 to migrate to capacitor 802.