A neuron circuit, a neural network, and a computing device
Patent Information
- Application Number
- CN202110349314.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2041-03-31
AI Technical Summary
[0004]目前常见的基于LIF构建的电路能够模拟神经元的最基本的功能,可以根据前级神经元电路的输出产生膜电位,之后根据膜电位与阈值的比较输出脉冲,但这种神经元电路中阈值是固定不变的,导致无法模拟出更高阶的神经元功能,无法构建复杂的SNN,也限制了神经网络的性能
Smart Images

Figure CN115146766B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of neural network technology, and more particularly to a neuron circuit, a neural network, and a computing device. Background Technology
[0002] Spiking neural networks (SNNs), often hailed as the third generation of artificial neural networks, have similar performance requirements for artificial synapses as deep neural networks (DNNs). The main differences lie in the function of the neuronal circuits and the way information is encoded. The neuronal circuits in SNNs originate from computational neuroscience and possess biological characteristics; these include circuits built based on models such as the leaky integrate-and-fire (LIF) model, the spike response model (SRM), and the Hodgkin-Huxley (HH) model.
[0003] The basic function of a neuron circuit is to integrate the output signals of the preceding neuron circuit and, depending on the integration status, send pulse signals to the subsequent neuron circuit.
[0004] Currently, common LIF-based circuits can simulate the most basic functions of neurons. They can generate membrane potentials based on the output of the preceding neuron circuits, and then output pulses based on the comparison of the membrane potentials with a threshold. However, the threshold in such neuron circuits is fixed, which makes it impossible to simulate higher-order neuron functions, unable to build complex SNNs, and also limits the performance of neural networks. Summary of the Invention
[0005] This application provides a neuron circuit, a neural network, and a computing device for implementing a threshold-adjustable neuron circuit.
[0006] In a first aspect, embodiments of this application provide a neuron circuit, which includes a pulse output circuit and a threshold adjustment circuit. The pulse output circuit is connected to the threshold adjustment circuit. The pulse output circuit can receive an input pulse and determine its output based on the input pulse and a threshold, such as determining an output pulse or maintaining a static voltage. The threshold adjustment circuit can acquire the output of the pulse output circuit and adjust the threshold in the pulse output circuit according to the output of the pulse output circuit.
[0007] With the above circuit, the threshold in the neuron circuit is no longer fixed, but flexibly adjustable. The neuron circuit can simulate higher-order neuron functions, which is beneficial for building more complex neural networks.
[0008] As one possible implementation, when adjusting the threshold, the threshold adjustment circuit can consider not only the output of the neuron circuit it is in, i.e., the output of the pulse output circuit, but also the outputs of other neuron circuits. The threshold adjustment circuit can be connected to other neuron circuits, so that it can adjust the threshold based on the output of the pulse output circuit and the outputs of other neuron circuits.
[0009] Through the above circuit, in scenarios where some neuron circuits influence each other (such as lateral competition), the threshold adjustment circuit can also obtain the output of other neuron circuits and flexibly adjust the threshold in the neuron circuit based on the output of its own neuron circuit and the output of other neurons.
[0010] As one possible implementation, the threshold adjustment circuit can raise or lower the threshold depending on the output of the pulse output circuit and other neuron circuits.
[0011] For example, in the case of any output pulse in the pulse output circuit and other neuronal circuits, the threshold adjustment circuit can increase the threshold.
[0012] For example, when the pulse output circuit and other neuron circuits are not outputting pulses, the threshold adjustment circuit can lower the threshold.
[0013] With the above circuitry, when any of the pulse output circuits or other neuronal circuits output a pulse, the threshold adjustment circuit can increase the threshold, causing the pulse output circuit to enter a refractory period. During this refractory period, when the pulse output circuit receives an input pulse of the same magnitude as before, it will no longer output a pulse; it will only output a pulse when it receives a larger input pulse. When neither the pulse output circuit nor other neuronal circuits output pulses, the threshold adjustment circuit can decrease the threshold, allowing the pulse output circuit to output a pulse upon receiving a smaller input pulse.
[0014] As one possible implementation, when considering only the output of the neuron circuit, the threshold adjustment circuit can raise the threshold if the pulse output circuit outputs a pulse, and lower the threshold if the pulse output circuit does not output a pulse.
[0015] With the above circuit, when the pulse output circuit outputs a pulse, the threshold adjustment circuit can increase the threshold to make the pulse output circuit enter the refractory period. When the pulse output circuit does not output a pulse, the threshold adjustment circuit can decrease the threshold to make the pulse output circuit output a pulse upon receiving a smaller input pulse.
[0016] As one possible implementation, the threshold adjustment circuit can be a memristor-based circuit. For example, the threshold adjustment circuit includes a selector, a first memristor, and a first voltage divider module. The selector can be connected to the output of a pulse output circuit and the outputs of other neuron circuits, and can select the voltage applied to the first memristor based on the outputs of the pulse output circuit and other neuron circuits. The first memristor is connected to the selector; when the voltage applied to the first memristor is different, the conductance of the first memristor changes. The first voltage divider module is connected to the first memristor and can adjust the threshold based on the conductance of the first memristor.
[0017] The threshold adjustment circuit based on memristor design described above has a simpler structure, is easier to construct, and can effectively reduce the difficulty of circuit construction.
[0018] As one possible implementation, the leakage-type integrated discharge model includes a second memristor. In the leakage-type integrated discharge model, the conductance of the second memristor can be changed according to the input pulse; then, the membrane voltage is obtained based on the conductance of the second memristor; and finally, the output of the leakage-type integrated discharge model is determined based on the comparison result of the membrane voltage and a threshold.
[0019] The above circuit, including the leakage-type integrated discharge model with the second memristor, has a simple structure and can effectively realize the basic functions of LIF.
[0020] As one possible implementation, the pulse output circuit may also include a second voltage divider module, a comparator circuit, and a pulse integration circuit.
[0021] The second memristor can be connected to an input pulse and its conductance can change according to the input pulse. The second voltage divider module is connected to the second memristor and can obtain the film voltage based on the conductance of the second memristor.
[0022] The input terminals of the comparator circuit are connected to the second voltage divider module and the threshold adjustment circuit, respectively, and the output terminal is connected to the pulse integration circuit. The comparator circuit compares the membrane voltage with the threshold and outputs a control signal to control whether the pulse output circuit outputs a pulse. The pulse integration circuit determines the output of the pulse output circuit based on the control signal.
[0023] The above circuit demonstrates a simple structure for the pulse output circuit, making its construction more convenient.
[0024] As one possible implementation, the pulse output circuit can be a circuit built based on a leakage-type integrated discharge model. It only needs to possess the basic functions of LIF.
[0025] Secondly, embodiments of this application provide a neural network, which includes at least one of the aforementioned neuron circuits. Specifically, the neural network may include multiple layers of neuron circuits, and the neuron circuits in each layer can be connected to the neuron circuits in adjacent layers. The structure of at least one neuron circuit in the multiple layers of neuron circuits can be the same as the aforementioned neuron circuit. This neural network can receive data to be calculated and output the calculation result.
[0026] Thirdly, embodiments of this application provide a computing device on which the aforementioned neural network or at least one of the described neuron circuits is deployed. The neural network or at least one of the described neuron circuits is used to perform computation. Optionally, the computing device may further include an interface that can transmit received data to be computed to the neural network or at least one of the described neuron circuits; and obtain computation results from the output of the neural network or at least one of the described neuron circuits. Attached Figure Description
[0027] Figure 1 A schematic diagram of a neuron circuit provided in this application;
[0028] Figure 2 This application provides a schematic diagram of the internal connections of a neuron circuit;
[0029] Figure 3 This application provides a schematic diagram of the internal structure of a neuron circuit;
[0030] Figures 4A-4B Schematic diagrams of the neuron circuits under different first voltage divider modules provided in this application;
[0031] Figure 5 A schematic diagram of a neuron circuit provided in this application;
[0032] Figure 6 A schematic diagram of a neuron circuit and its connection with other neuron circuits provided in this application;
[0033] Figures 7A-7B Schematic diagrams of the neuron circuits under different first voltage divider modules provided in this application;
[0034] Figure 8 A schematic diagram of a neural network structure is provided in this application;
[0035] Figure 9 A schematic diagram of the structure of a computing device provided in this application. Detailed Implementation
[0036] like Figure 1As shown, a neuron circuit 10 provided in an embodiment of this application includes a pulse output circuit 100 and a threshold adjustment circuit 200.
[0037] The pulse output circuit 100 can determine its output based on the input pulse and the threshold, such as determining the output pulse voltage (or simply pulse) or maintaining the static voltage.
[0038] The threshold adjustment circuit 200 is connected to the pulse output circuit 100. The threshold adjustment circuit 200 can obtain the output of the pulse output circuit 100, adjust the threshold in the pulse output circuit 100, and input the adjusted threshold into the pulse output circuit 100.
[0039] In this embodiment, the pulse output circuit 100 can receive input pulses, which can be output pulses from neuronal circuits connected to the pulse output circuit 100, such as the output pulses from the neuronal circuit preceding the neuronal circuit 10. The membrane potential is initially in a resting state. When the pulse output circuit 100 receives an input pulse, the membrane potential changes. When the membrane potential is greater than a threshold, the pulse output circuit 100 outputs a pulse; when the membrane potential is not greater than the threshold, the pulse output circuit 100 does not output a pulse. After outputting a pulse, the pulse output circuit 100 can enter a refractory period. During the refractory period, if the pulse output circuit 100 receives an input pulse whose magnitude is not greater than the previous input pulse, it will not be affected and will not output a pulse. During the refractory period, a very large input pulse is required to stimulate the pulse output circuit 100 to output a pulse. When there is no output pulse, the pulse output circuit 100 outputs a static voltage, which refers to a stable voltage output by the pulse output circuit 100. This voltage value can be zero or a value close to zero.
[0040] When the pulse output circuit 100 does not receive continuous input pulse stimulation, the membrane potential in the pulse output circuit 100 can automatically leak, and the membrane potential will drop to the resting state potential. The output of the pulse output circuit 100 will also gradually fall back to the static voltage. Here, the resting state refers to the state of the pulse output circuit 100 when it is not stimulated by input pulses.
[0041] The embodiments of this application do not limit the specific configuration of the pulse output circuit 100. For example, the pulse output circuit 100 can be a circuit constructed based on a leakage-type integrated discharge model, or it can be a circuit constructed based on other neuron models. Any circuit structure that can constitute the pulse output circuit 100 is applicable to the embodiments of this application.
[0042] In this embodiment, a threshold adjustment circuit 200 is added to the neuron circuit to adjust the threshold, making the threshold adjustment more flexible, simulating the higher functions of neurons, ensuring that the neuron circuit can more closely resemble the computational method of brain neurons, thereby realizing a more complex SNN and improving the performance of the SNN.
[0043] In this embodiment, the threshold adjustment circuit 200 can adjust the threshold based solely on the output of the pulse output circuit 100, or it can adjust the threshold based on the output of the pulse output circuit 100 and the outputs of other neuron circuits.
[0044] The two methods will be explained below:
[0045] Method 1: The threshold adjustment circuit 200 adjusts the threshold according to the output of the pulse output circuit 100.
[0046] like Figure 2 As shown, the threshold adjustment circuit 200 is connected to the output terminal of the pulse output circuit 100 to obtain the output of the pulse output circuit 100. The threshold adjustment circuit 200 is also connected to the threshold input terminal of the pulse output circuit 100 to provide a threshold to the pulse output circuit 100.
[0047] The membrane potential is initially equal to the potential in the resting state. When the pulse output circuit 100 receives the input pulse, the membrane potential will change, such as increasing. The pulse output circuit 100 compares the membrane potential with the threshold.
[0048] When the membrane potential is greater than the threshold, the pulse output circuit 100 outputs a pulse. At this time, the threshold adjustment circuit 200 detects the pulse output from the output terminal of the pulse output circuit 100, raises the threshold, and inputs the raised threshold to the threshold input terminal of the pulse output circuit 100. Thus, when the pulse output circuit 100 receives another input pulse, the membrane potential obtained from the input pulse must be greater than the raised threshold before it outputs a pulse; otherwise, the pulse output circuit 100 will not output a pulse.
[0049] When the membrane potential is not greater than the threshold, the pulse output circuit 100 does not output a pulse and maintains a static voltage. At this time, the threshold adjustment circuit 200 detects that the pulse output circuit 100 outputs a static voltage, and can lower the threshold, inputting the lowered threshold to the threshold input terminal of the pulse output circuit 100. Thus, when the pulse output circuit 100 receives an input pulse again, if the membrane potential obtained from the input pulse is greater than the lowered threshold, the pulse output circuit 100 can output a pulse.
[0050] There are many specific configurations for the threshold adjustment circuit 200. Any circuit structure that can adjust the threshold according to the output of the pulse output circuit 100 can be used as the threshold adjustment circuit 200. One example is listed below:
[0051] like Figure 3 As shown, this is a neuron circuit provided in an embodiment of the present application. The neuron circuit 10 includes a pulse output circuit 100 and a threshold adjustment circuit 200. The threshold adjustment circuit 200 includes a selector 210, a first memristor 220, and a first voltage divider module 230. The selector 210 is connected to the first memristor 220, and the first memristor 220 is connected to the first voltage divider module 230.
[0052] Selector 210 is also connected to the output terminal of pulse output circuit 100, and first voltage divider module 230 is connected to the threshold input terminal of pulse output circuit 100.
[0053] Selector 210 can select the voltage applied to the first memristor 220 based on the output of pulse output circuit 100. For example, when pulse output circuit 100 outputs a pulse, selector 210 can connect the first memristor 220 to a power supply with voltage VC1; when the output of pulse output circuit 100 maintains a static voltage, selector 210 can ground the first memristor 220 or connect the first memristor 220 to a power supply VCO with a voltage lower than the switching threshold of the first memristor 220. The switching threshold determines how the memristor conductance responds to the applied voltage. When the applied voltage is greater than the switching threshold, the memristor conductance increases; when the applied voltage is less than the switching threshold, the memristor conductance is unaffected by the applied voltage and remains unchanged or decreases spontaneously.
[0054] The first memristor 220 is a nonlinear resistor. The conductance of the first memristor 220 is related to the voltage applied to it (the voltage applied to the first memristor 220 is also the voltage across it). When the voltage applied to the first memristor 220 is large, exceeding its switching threshold, the conductance increases; when the voltage applied to the first memristor 220 is small, below its switching threshold, the conductance decreases. In this embodiment, the first memristor can be a volatile memristor. This embodiment does not limit the structure of the first memristor 220. For example, the structure of the first memristor 220 can be an upper electrode / oxide / lower electrode structure. The upper and lower electrode materials can be platinum (Pt), titanium nitride (TiN), palladium (Pd), etc.; the oxide material can be niobium oxide (NbO). x ), zinc oxide (ZnO) x ), tungsten oxide (WO) x ), tantalum oxide (TaO) x)wait.
[0055] The first voltage divider module 230 is connected to the first memristor 220 and can determine the change in the conductance of the first memristor 220. The threshold is adjusted according to the conductance of the first memristor 220. For example, when the conductance of the first memristor 220 increases, the first voltage divider module 230 can increase the threshold; when the conductance of the first memristor 220 decreases, the first voltage divider module 230 can decrease the threshold.
[0056] In this embodiment, the pulse output circuit 100 can be based on a memristor (for ease of distinction, the memristor in the pulse output circuit 100 is referred to as the second memristor). For a description of the second memristor, please refer to the description of the first memristor; it will not be repeated here. The main difference between the first memristor 220 and the second memristor lies in their respective switching thresholds. The first memristor 220 requires a higher switching threshold, which can be achieved by increasing the thickness of the oxide layer or increasing the oxygen ion concentration. The input pulse of the pulse output circuit 100 can be applied to the second memristor, changing its conductance and thus altering the membrane potential. After the membrane potential changes, the pulse output circuit 100 can compare the membrane potential with the threshold. If the membrane potential is greater than the threshold, a pulse can be output; otherwise, a static voltage is maintained.
[0057] like Figure 3 The diagram shown is merely an example of one pulse output circuit 100 based on a second memristor design. Other pulse output circuits 100 based on a second memristor design may also be used in the embodiments of this application.
[0058] Figure 3 In the pulse output circuit 100, a second memristor 110, a comparator circuit 120, a pulse integration circuit 130, and a second voltage divider module 140 may be included.
[0059] One end of the second memristor 110 is connected to the input terminal of the pulse output circuit to receive the input pulse and change its own conductance under the influence of the input pulse; the other end of the second memristor 110 is connected to the second voltage divider module 140, which can generate a film voltage according to the conductance of the second memristor 110.
[0060] The comparator circuit 120 includes two input terminals. One input terminal is the threshold input terminal of the pulse output circuit 100, which is connected to the first voltage divider module 230 of the threshold adjustment circuit 200, and obtains the threshold from the first voltage divider module 230. The other input terminal is connected to the second voltage divider module 140 to obtain the membrane voltage. The output terminal of the comparator circuit 120 is connected to the pulse integration circuit 130. The comparator circuit 120 can compare the membrane voltage and the threshold. When the membrane voltage is greater than the threshold, it controls the pulse integration circuit 130 to output a pulse; otherwise, it controls the pulse integration circuit 130 not to output a pulse. The comparator circuit 120 can send a control signal to the pulse integration circuit 130 to control the pulse integration circuit 130 to output a pulse or not output a pulse.
[0061] In the specific construction of the pulse output circuit 100, the second voltage divider module 140 may include a voltage divider resistor 141. One end of the voltage divider resistor 141 is connected to the second memristor 110, and the other end is grounded. In this case, the magnitude of the membrane voltage is equal to the voltage of the voltage divider resistor 141. The comparator circuit 120 may include a comparator 121. The pulse integration circuit 130 may be a pulse source 131, which is connected to the comparator 121. The pulse source 131 can determine whether to output a pulse based on the output of the comparator 121.
[0062] The embodiments of this application do not limit the specific configuration of the first voltage divider module 230. Different neuron circuits can be formed based on different configurations of the first voltage divider module 230. Two specific neuron circuits are listed below.
[0063] like Figure 4A The diagram illustrates a neuron circuit provided in this embodiment. The neuron circuit 10 includes a pulse output circuit 100 and a threshold adjustment circuit 200. The threshold adjustment circuit 200 includes a selector 210, a first memristor 220, and a first voltage divider module 230. The first voltage divider module 230 includes a first resistor 231, a second resistor 232, and a capacitor 233. One end of the first resistor 231 is connected to the power supply VCC, and the other end is connected to the second resistor 232 and the threshold input terminal of the pulse output circuit 100 (i.e., one input terminal of the comparator circuit 120 in the pulse output circuit 100). The voltage at the other end of the first resistor 231 can be used as a threshold input to the comparator circuit 120. The capacitor 233 is connected in parallel with the first resistor 231, and the first memristor 220 is connected to the capacitor 233.
[0064] The structure of the pulse output circuit 100 and Figure 3 The pulse output circuit 100 shown is the same and will not be described again here.
[0065] In the pulse output circuit 100, the output of the pulse integration circuit 130 is divided into two paths. One path can be used as the output of the neuron circuit. A buffer can be set on this path to amplify the pulse and ensure that the output of the neuron circuit drives the subsequent neuron circuit. The other path is connected to the control terminal A of the selector 210. When the voltage input to the control terminal A is different, it corresponds to different voltages connected to the first memristor 220.
[0066] When the voltage input to control terminal A is a pulse (pulse output circuit 100 outputs a pulse), pulse output circuit 100 can enter the refractory period, and the corresponding voltage connected to the first memristor 220 is VC1. When the voltage input to control terminal A is a static voltage (pulse output circuit 100 does not output a pulse), pulse output circuit 100 can output a pulse when it receives a subsequent input pulse, and the corresponding voltage connected to the first memristor 220 is 0, i.e., grounded.
[0067] When an input pulse is input to the pulse output circuit 100, if the amplitude of the input pulse received by the second memristor 110 is greater than the switching threshold of the second memristor 110, the conductance of the second memristor 110 will increase, thereby increasing the voltage division on the second voltage divider module 140, i.e., increasing the membrane potential; if the amplitude of the input pulse received by the second memristor 110 is less than the switching threshold of the second memristor 110, the conductance of the second memristor 110 will decrease, thereby decreasing the voltage division on the second voltage divider module 140, and decreasing the membrane potential of the neuron.
[0068] When the frequency of the input pulse is high enough, the conductance of the second memristor 110 will continuously increase, and the membrane potential will continuously increase. Gradually, the membrane potential will exceed the threshold. At this time, the comparator circuit 120 sends a control signal to the pulse integration circuit 130 to activate the pulse integration circuit 130 to output a pulse.
[0069] The output of the pulse integration circuit 130 is split into two paths. One path can directly output the pulse, such as inputting it into a subsequent neuron circuit connected to the neuron circuit. The other path can output to the control terminal A of the selector 210. The selector 210 can connect the voltage VC1 to the first memristor 220 according to the voltage input at the control terminal A. The conductance of the first memristor 220 will increase, changing the voltage on the capacitor 233. The capacitor 233 begins to discharge, causing the voltage at the other end of the first resistor 231 to increase, thus raising the threshold.
[0070] When the output of the pulse integration circuit 130 stops outputting pulses, the selector 210 grounds the first memristor 220, the conductance of the first memristor 220 decreases, the voltage on the capacitor 233 changes, the capacitor 233 starts charging, which reduces the voltage at the other end of the first resistor 231, that is, reduces the threshold.
[0071] The threshold of the pulse output circuit 100 can be raised or lowered under the control of the threshold adjustment circuit 200. When the pulse output circuit 100 outputs a pulse, the threshold adjustment circuit 200 can raise the threshold, so that within a short time, the pulse output circuit 100 can only output a pulse under a very large input pulse stimulus, increasing the difficulty of pulse output and effectively suppressing pulse output. When the pulse output circuit 100 does not output a pulse, the threshold adjustment circuit 200 can lower the threshold, making it easier for the pulse output circuit 100 to output pulses when subsequent pulses are input. The neuronal circuit possesses the function of adjustable threshold, enabling the construction of higher-order and more complex neural networks.
[0072] In addition, a capacitor 233 is added to the first voltage divider module 230, which can delay the adjustment of the threshold to a certain extent, so that the adjusted threshold will not immediately act on the membrane potential generated by the current input pulse, but will achieve the effect of pulse suppression when the input pulse is received again.
[0073] like Figure 4B As shown, this is a neuron circuit provided in an embodiment of this application. The neuron circuit 10 includes a pulse output circuit 100 and a threshold adjustment circuit 200. The threshold adjustment circuit 200 includes a selector 210, a first memristor 220, and a first voltage divider module 230. The first voltage divider module 230 includes a third resistor 234. One end of the third resistor 234 is grounded, and the other end is connected to the first memristor 220 and the threshold input terminal of the pulse output circuit 100 (that is, one input terminal of the comparator circuit 120 in the pulse output circuit 100). In other words, the voltage at the other end of the third resistor 234 can be used as a threshold input to the comparator circuit 120.
[0074] The structure of pulse output circuit 100 and Figure 3 The pulse output circuit 100 shown is the same, so it will not be described again here.
[0075] like Figure 4B The neuron circuit shown is similar to... Figure 4A The control method of the neuron circuit shown is similar, the difference being that when the output of the pulse integration circuit 130 no longer outputs pulses, the selector 210 connects the first memristor 220 to the power supply VC0. When the power supply VC0 is lower than the threshold of the first memristor 220, the conductance of the first memristor 220 will decrease, which will reduce the voltage at the other end of the third resistor 234, that is, reduce the threshold.
[0076] and Figure 4A The differences in the neuron circuit structure shown are as follows: Figure 4BThe structure of the first voltage divider module 230 shown is relatively simple, simplifying its configuration. When different voltages are applied to the first memristor 220, its conductance changes, thereby altering the voltage at the other end of the third resistor 234. (The following is a simplified explanation...) Figure 4B The change in the conductance of the first memristor can be relatively... Figure 4A The conductance of the first memristor changes more slowly to achieve a delayed threshold adjustment.
[0077] In neural networks, neurons are arranged in layers, with multiple neurons forming a layer. Any neuron in a layer can connect to neurons in the next layer. Within the same layer, each neuron can operate independently or influence others. One common mechanism of this interaction is lateral competition, where when one neuron in a layer outputs a pulse, other neurons in that layer are less likely to output pulses (i.e., they need to enter a refractory period). Lateral competition reduces the frequency of neuron pulse firing, making the firing frequencies of neurons in the same layer closer, which is beneficial for the training process. It also helps reduce power consumption and increase device lifespan. Therefore, when adjusting the threshold, the threshold adjustment circuit needs to consider both the output of the pulse output circuit in the current neuron and the outputs of other neurons. The following section explains the neuron circuit in this scenario.
[0078] Method 2: The threshold adjustment circuit adjusts the threshold based on the output of the pulse output circuit and the output of other neuron circuits.
[0079] like Figure 5 As shown, the threshold adjustment circuit 200 is connected to the output terminal of the pulse output circuit 100 to obtain the output of the pulse output circuit 100. The threshold adjustment circuit 200 can also be connected to the output terminals of other neuron circuits 300 to obtain their outputs. This application embodiment does not limit the specific structure and number of other neuron circuits 300. The threshold adjustment circuit 200 can be connected to the output terminals of multiple other neuron circuits 300, or it can be connected to the output terminal of only one other neuron circuit 300. The structure of the other neuron circuits 300 can be the same as the neuron circuit provided in this application embodiment, or it can adopt other structures, such as neuron circuits constructed based on integrated and fire (IF) neuron models, spike response model (SRM) neuron models, etc.
[0080] The threshold adjustment circuit 200 can also be connected to the threshold input terminal of the pulse output circuit 100 to provide a threshold to the pulse output circuit 100.
[0081] The pulse output circuit 100 determines its output based on the input pulse and a threshold value. (See also: [link to relevant documentation]). Figure 2 The relevant descriptions in the illustrated embodiments will not be repeated here.
[0082] When the threshold adjustment circuit 200 detects a pulse at the output terminal of the pulse output circuit 100 or a pulse at the output terminal of another neuron circuit 300, it can raise the threshold and input the raised threshold to the threshold input terminal of the pulse output circuit 100. Thus, when the pulse output circuit 100 subsequently receives another input pulse, it will only output a pulse if the membrane potential obtained from the input pulse is not greater than the raised threshold; otherwise, the pulse output circuit 100 will not output a pulse.
[0083] When the threshold adjustment circuit 200 detects that no pulse is output from the output terminals of the pulse output circuit 100 and other neuron circuits 300, such that the output terminals of the pulse output circuit 100 and other neuron circuits 300 maintain a static voltage, the threshold adjustment circuit 200 can lower the threshold and input the lowered threshold to the threshold input terminal of the pulse output circuit 100. Thus, when the pulse output circuit 100 subsequently receives an input pulse, if the membrane potential obtained from the input pulse is greater than the lowered threshold, the pulse output circuit 100 can output a pulse.
[0084] There are many specific configurations for the threshold adjustment circuit 200. Any circuit structure that can adjust the threshold according to the output of the pulse output circuit 100 can be used as the threshold adjustment circuit 200. One example is listed below:
[0085] like Figure 6 As shown, this is a neuron circuit provided in an embodiment of the present application. The neuron circuit 10 includes a pulse output circuit 100 and a threshold adjustment circuit 200. The threshold adjustment circuit 200 includes a selector 210, a first memristor 220, and a first voltage divider module 230. The selector 210 is connected to the first memristor 220, and the first memristor 220 is connected to the first voltage divider module 230.
[0086] Selector 210 is also connected to the output of pulse output circuit 100 and the output of other neuron circuits 300, and the first voltage divider module 230 is connected to the threshold input of pulse output circuit 100.
[0087] Selector 210 can select the voltage applied to the first memristor 220 based on the output of the pulse output circuit and the output of other neuron circuits 300. For example, when the output terminal of the pulse output circuit 100 outputs a pulse, selector 210 can connect the first memristor 220 to a power supply with voltage VC1; when the output terminal of the pulse output circuit 100 maintains a static voltage, selector 210 can ground the first memristor 220 or connect the first memristor 220 to a power supply VCO with a voltage lower than the switching threshold of the first memristor 220; when the output terminal of other neuron circuits 300 outputs a pulse, selector 210 can connect the first memristor 220 to a power supply with voltage VC2.
[0088] For descriptions of the first memristor 220, the first voltage divider module 230, and the pulse output circuit 100, please refer to... Figure 3 The relevant content in the illustrated embodiments will not be repeated here.
[0089] The embodiments of this application do not limit the specific configuration of the first voltage divider module 230. Different neuron circuits can be formed based on different voltage divider models 230. Two specific neuron circuits are listed below.
[0090] like Figure 7A As shown, an embodiment of this application provides a neuron circuit 10, which includes a pulse output circuit 100 and a threshold adjustment circuit 200. The threshold adjustment circuit 200 includes a selector 210, a first memristor 220, and a first voltage divider module 230. The control terminal A of the selector 210 is connected to the output terminal of the pulse output circuit 100, and the control terminal B of the selector 210 is connected to the output terminal of other neuron circuits 300.
[0091] The first voltage divider module 230 includes a first resistor 231, a second resistor 232, and a capacitor 233. One end of the first resistor 231 is connected to the power supply VCC, and the other end is connected to the second resistor 232 and the threshold input terminal of the pulse output circuit 100 (that is, one input terminal of the comparator circuit 120 in the pulse output circuit 100). In other words, the voltage at the other end of the first resistor 231 can be used as a threshold input to the comparator circuit 120. The capacitor 233 is connected in parallel with the first resistor 231, and the first memristor 200 is connected to the capacitor 233.
[0092] The structure of pulse output circuit 100 and Figure 3 The pulse output circuit 100 shown is the same and will not be described again here.
[0093] In the pulse output circuit 100, the output of the pulse integration circuit 130 is divided into two paths. One path can be used as the output of the neuron circuit. The other path is connected to the control terminal A of the selector 210.
[0094] When the input voltages of control terminal A and control terminal B are different, they correspond to different voltages connected to the first memristor 220.
[0095] When the voltage input to control terminal A is a pulse (pulse output circuit 100 outputs a pulse) and the voltage input to control terminal B is a static voltage (other neuron circuits 300 do not output pulses), the pulse output circuit 100 can enter the refractory period, and the corresponding voltage connected to the first memristor 220 is VC1. When the voltage input to control terminal A is a static voltage (pulse output circuit 100 does not output a pulse) and the voltage input to control terminal B is a pulse (other neuron circuits 300 output pulses), lateral competition can occur, and the corresponding voltage connected to the first memristor 220 is VC2. When the voltages input to both control terminal A and control terminal B are static voltages (neither the pulse output circuit 100 nor other neuron circuits 300 output pulses), the corresponding voltage connected to the first memristor 220 is 0, i.e., grounded.
[0096] When an input pulse is input to the pulse output circuit 100, if the amplitude of the input pulse received by the second memristor 110 is non-zero, the conductance of the second memristor 110 will increase, thereby increasing the voltage division on the second voltage divider module 140, i.e., increasing the membrane potential; if the amplitude of the input pulse received by the second memristor 110 is 0, the conductance of the second memristor 110 will decrease, thereby decreasing the voltage division on the second voltage divider module 140, and decreasing the membrane potential of the neuron.
[0097] When the frequency of the input pulse is high enough, the conductance of the second memristor 110 will continuously increase, and the membrane potential will continuously increase. Gradually, the membrane potential will exceed the threshold. At this time, the comparator circuit 120 sends a control signal to the pulse integration circuit 130 to activate the pulse integration circuit 130 to output a pulse.
[0098] The output of the pulse integration circuit 130 is split into two paths. One path can directly output the pulse, such as inputting it into a subsequent neuron circuit connected to the neuron circuit. The other path can output to the control terminal A of the selector 210. The selector 210 can connect the voltage VC1 to the first memristor 220 according to the voltage input at the control terminal A. The conductance of the first memristor 220 will increase, changing the voltage on the capacitor 233. The capacitor 233 begins to discharge, causing the voltage at the other end of the first resistor 231 to increase, thus raising the threshold.
[0099] When the output of the pulse integration circuit 130 no longer outputs pulses, the voltage input to the control terminal A is a static voltage. If other neuron circuits 300 also do not output pulses, the selector 210 grounds the first memristor 220, the conductance of the first memristor 220 will decrease, changing the voltage on the capacitor 233. The capacitor 233 starts to charge, which reduces the voltage at the other end of the first resistor 231, thus lowering the threshold.
[0100] When other neuron circuits 300 output pulses, and the voltage input to control terminal B is a pulse, selector 210 can connect voltage VC2 to the first memristor 220 based on the voltage input to control terminal B. The conductance of the first memristor 220 will increase, changing the voltage across capacitor 233. Capacitor 233 begins to discharge, causing the voltage at the other end of the first resistor 231 to increase, thus raising the threshold. When the output pulses of other neurons stop, the voltage input to control terminal B becomes a static voltage. If the voltage input to control terminal A is also a static voltage, selector 210 grounds the first memristor 220, lowering the threshold.
[0101] It should be noted that if other neuron circuits 300 and pulse output circuit 100 both output pulses, the voltage input to control terminal B and control terminal A is a pulse. Selector 210 can connect voltage VC1 to the first memristor 220 to increase the threshold.
[0102] The threshold of the pulse output circuit 100 can be raised or lowered under the control of the threshold adjustment circuit 200. When the pulse output circuit 100 or other neuron circuits 300 output pulses, the threshold adjustment circuit 200 can raise the threshold, making it so that the pulse output circuit 100 can only output pulses under very large input pulse stimulation within a short period of time, increasing the difficulty for the pulse output circuit 100 to output pulses and effectively suppressing pulse output. When neither the pulse output circuit 100 nor other neuron circuits 300 output pulses, the threshold adjustment circuit 200 can lower the threshold, making it easier for the pulse output circuit 100 to output pulses when pulses are subsequently input. The neuron circuit possesses the function of adjustable thresholds, enabling the realization of higher-order neural networks.
[0103] In addition, a capacitor is added to the voltage divider model, which can delay the adjustment of the threshold to a certain extent. This ensures that the adjusted threshold does not affect the membrane potential generated by the current input pulse, but instead achieves pulse suppression for subsequent input pulses.
[0104] like Figure 7B As shown, an embodiment of this application provides a neuron circuit 10, which includes a pulse output circuit 100 and a threshold adjustment circuit 200. The threshold adjustment circuit 200 includes a selector 210, a first memristor 220, and a first voltage divider module 230. The control terminal A of the selector 210 is connected to the output terminal of the pulse output circuit 100, and the control terminal B of the selector 210 is connected to the output terminal of other neuron circuits 300.
[0105] The first voltage divider module 230 includes a third resistor 234. One end of the third resistor 234 is grounded, and the other end is connected to the first memristor 220 and the threshold input terminal of the pulse output circuit 100 (that is, one input terminal of the comparator circuit 120 in the pulse output circuit 100). In other words, the voltage at the other end of the third resistor 234 can be used as a threshold input to the comparator circuit 120.
[0106] The structure of pulse output circuit 100 and Figure 3 The pulse output circuit 100 shown is the same and will not be described again here.
[0107] like Figure 7B The neuron circuit shown is similar to... Figure 7A The control method of the neuron circuit shown is similar. The difference is that when the output of the pulse integration circuit 130 no longer outputs pulses, the selector 210 connects the first memristor 220 to the power supply VC0. When the voltage VC0 is lower than the threshold of the first memristor 220, the conductance of the first memristor 220 will decrease, which will reduce the voltage at the other end of the third resistor 234, that is, reduce the threshold.
[0108] and Figure 4A The differences in the neuron circuit structure shown are as follows: Figure 4B The structure of the first voltage divider module 230 shown is relatively simple, simplifying the composition of the first voltage divider module 230. When the first memristor 220 is connected to different voltages, the conductance of the first memristor 220 will change, thereby changing the voltage at the other end of the third resistor 234.
[0109] It should be noted that this explanation only uses lateral competition as an example. The neuron circuit provided in this application embodiment is also suitable for scenarios where the output of the neuron circuit is affected by the output of other neuron circuits 300.
[0110] like Figure 8 As shown in the illustration, a neural network 20 provided in this application embodiment may include multiple neuron circuits 10, which may be arranged in layers. Each layer of neuron circuits may include at least one neuron circuit 10. The output terminal of the neuron circuit 10 in the previous layer may be connected to the input terminal of the neuron circuit 10 in the next layer.
[0111] Optionally, considering lateral competition scenarios, for any neuron circuit 10 in any layer of neuron circuits, the threshold adjustment circuit 200 in that neuron circuit 10 can be connected to the output of other neuron circuits in the same layer. The control terminal b of the threshold adjustment circuit in that neuron circuit 10 can be connected to the output of other neuron circuits in the same layer. This allows the threshold adjustment circuit in the neuron circuit 10 to acquire the output of other neuron circuits in the same layer, and then adjust the threshold of the pulse output circuit 100 in the neuron circuit 10 based on the output of its own neuron circuit 10 and the outputs of other neuron circuits in the same layer. Figure 8 The diagram only illustrates the connection between one neuron circuit 10 and other neuron circuits in the same layer. It should be understood that when a neuron circuit 10 is connected to other neuron circuits in the same layer, the control terminal of the threshold adjustment circuit 200 in the neuron circuit 10 is connected to the output terminal of the other neuron circuits in the same layer.
[0112] like Figure 9 As shown in the illustration, a computing device 30 provided in this application embodiment can be equipped with a neural network 20. The computing device may also include an interface 40, which can receive data to be computed, input the data to be computed into the neural network 20, and obtain the computation result output by the neural network 20 and send the computation result.
[0113] It should be noted that the embodiments provided in this application are merely illustrative. Those skilled in the art will understand that, for the sake of convenience and brevity, the descriptions of each embodiment have different focuses, and parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. The features disclosed in the embodiments, claims, and drawings of this invention can exist independently or in combination. Features described in hardware form in the embodiments of this invention can be executed by software, and vice versa. No limitations are imposed here.
Claims
1. A neuron circuit, characterized in that, include: A pulse output circuit is used to determine the output of the pulse output circuit based on the input pulse and a threshold. The pulse output circuit includes a second memristor, which is used to: change the conductance of the second memristor according to the input pulse; obtain a membrane voltage according to the conductance of the second memristor; and determine the output of the pulse output circuit according to the comparison result of the membrane voltage and the threshold. The threshold adjustment circuit is connected to the pulse output circuit and to other neuron circuits. The threshold adjustment circuit is used to adjust the threshold according to the output of the pulse output circuit and the output of the other neuron circuits. The threshold adjustment circuit includes: A selector is used to select the voltage applied to the first memristor based on the output of the pulse output circuit and the output of the other neuron circuits. The first memristor is connected to the selector and is used to change its conductance according to the voltage applied to the first memristor; The first voltage divider module is connected to the first memristor and is used to adjust the threshold value according to the conductance of the first memristor.
2. The circuit as described in claim 1, characterized in that, The threshold adjustment circuit is used for: When the pulse output circuit outputs a pulse or the other neuron circuit outputs a pulse, the threshold is increased.
3. The circuit as described in claim 1, characterized in that, The threshold adjustment circuit is used for: When the pulse output circuit and the other neuron circuits are not outputting pulses, the threshold is lowered.
4. The circuit as described in claim 1, characterized in that, The threshold adjustment circuit is specifically used for: If the pulse output circuit does not output a pulse, the threshold is lowered.
5. The circuit as described in claim 1, characterized in that, The pulse output circuit also includes a second voltage divider module, a comparator circuit, and a pulse integration circuit. The second memristor is used to change its conductance according to the input pulse; The second voltage divider module is connected to the second memristor and is used to obtain the membrane voltage based on the conductance of the second memristor. The comparison circuit is connected to the second voltage divider module and the threshold adjustment circuit, and is used to compare the membrane voltage and the threshold, and output a control signal. The pulse integration circuit, connected to the comparator circuit, is used to determine the output of the pulse output circuit based on the control signal.
6. The circuit as described in any one of claims 1-5, characterized in that, The pulse output circuit is a circuit constructed based on the Leakage-type Integrated Discharge Model (LIF).
7. A neural network, characterized in that, The neural network includes a plurality of neuron circuits as described in any one of claims 1 to 6.
8. A computing device, characterized in that, The computing device is equipped with the neural network as described in claim 7, and the computing device further includes an interface for transmitting received data to be computed to the neural network. And obtain the calculation results from the output of the neural network.
Citation Information
Patent Citations
Neuron circuit based on memristor
CN110991629A
Neuron analog circuit, driving method thereof and neural network device
CN111967589A