A memristor hierarchical memory neural network circuit that simulates biological learning

By simulating the memristive hierarchical memory neural network circuit of biological learning, memristors and operational amplifiers are used to realize multi-memory adjustment and parallel computing between synapses, solving the flexibility and long-term memory problems of existing neural network circuits, and supporting depth Hardware implementation of learning.

CN114925818BActive Publication Date: 2024-09-13CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210582569.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2024-09-13
Estimated Expiration
2042-05-26

AI Technical Summary

Technical Problem

Existing neural network circuits lack flexibility and versatility, and cannot effectively implement long-term memory. Moreover, the resistance used in synapses is fixed and lacks flexibility and multi-value adjustment capabilities.

Method used

A memristive hierarchical memory neural network circuit is designed to simulate biological learning, including a cross array module, an activation function module, an output module and a feedback signal module. Memristors and operational amplifiers are used to achieve multi-memory regulation and parallel computing between synapses. , complete the convolution operation of deep learning through cross array.

Benefits of technology

It realizes multi-memory adjustment between synapses, improves the flexibility and reusability of the circuit, can effectively perform parallel computing and multi-value adjustment, and supports the hardware implementation of deep learning algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925818B
    Figure CN114925818B
Patent Text Reader

Abstract

The present invention provides a memristor hierarchical memory neural network circuit for simulating biological learning, comprising: a cross array module, an activation function module, an output module and a feedback signal module; the signal generated by the cross array module is activated by the activation function module and then amplified by the output module to obtain an output signal; the activation signal of the activation function module is fed back to the feedback signal module to form a closed loop; wherein the cross array module is formed by cross-arrangement of n groups of synaptic modules; n is a preset value; the synaptic module comprises: an input neuron, a mode adjustment unit, a memory selection unit and an output neuron. The beneficial effects of the present invention are: parallel computing and multi-value adjustment can be well realized; the memristor module is used to realize multi-memory adjustment between synapses, and flexibility and reusability are realized. The convolution operation of deep learning is completed by the cross array, which provides new possibilities for the hardware implementation of deep learning algorithms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of neural network circuits, and in particular to a memristor hierarchical memory neural network circuit that simulates biological learning. Background Art

[0002] At present, the earliest circuits for associative memory are derived from the Hopfield network, which is further divided into discrete Hopfield network and continuous Hopfield network. Discrete Hopfield network was used in autoassociative memory in the early days, and the discrete type is mainly described here.

[0003] The output X of any other neuron in the discrete Hopfield network i The weight of the current neuron can be adjusted through feedback loops and weighted weights. The purpose is that any neuron in the network is controlled by the neuron output, so that the outputs of each neuron restrict each other and finally reach a relatively stable state.

[0004] Each neuron in a discrete Hopfield neural network has the same function. The output of each neuron is called a state, which is represented by X. j Indicates that the output state of all neurons is X = [x1, x2, ..., x n ], and the initial state of the feedback network is represented by the input as X(0)=[x1(0), x2(0), ..., x n (0)], once the initial value is given, the network starts to perform calculation iterations, and its dynamic update rule is:

[0005] x j =f(net j ) j=1,2,L,n

[0006] In the formula, f is generally called the activation function in neural networks, that is, the threshold function, usually a symbol function:

[0007] Enter net j for:

[0008] Generally speaking, for discrete Hopfield neural networks, the weight matrix is ​​a matrix, so there is usually W ii = 0, and its symmetric weight W ij =W ji When the state of each neuron in the network is no longer changing, the Hopfield neural network is close to stability, that is, the memory stability state is achieved through the self-feedback learning of the neural network.

[0009] The synapses in the above discrete Hopfield neural network use resistors. Since the middle synapse part uses resistors, once the resistance value of the resistor is fixed, its function is relatively fixed, lacking flexibility and versatility. Moreover, only the state of discrete Hopfield activation is studied, and the actions that occur in its inactive state are lacking. Summary of the invention

[0010] In order to solve the problem that the existing neural network circuit lacks flexibility and versatility and cannot obtain long-term memory, the present invention provides a memristor hierarchical memory neural network circuit that simulates biological learning, specifically comprising:

[0011] Cross array module, activation function module, output module and feedback signal module;

[0012] The signal generated by the cross array module is activated by the activation function module and then amplified by the output module to obtain the output signal;

[0013] On the other hand, the activation signal of the activation function module is fed back to the feedback signal module to form a closed loop;

[0014] The crossbar array module is formed by cross-arranging n groups of synaptic modules; n is a preset value;

[0015] The synaptic module includes: input neurons, pattern adjustment units, memory selection units and output neurons.

[0016] Furthermore, the feedback signal module includes: operational amplifiers Uf1-Uf2, capacitor Cf, MOS tube Tf, memristor Mf, resistor Rf;

[0017] One end of the memristor Mf is electrically connected to the crossbar array module, and the other end is connected to the in-phase input end of the operational amplifier Uf1; the inverting input end of the operational amplifier Uf1 is electrically connected to one end of the resistor Rf; the other end of the resistor Rf is grounded;

[0018] The non-inverting input terminal of the operational amplifier Uf2 is electrically connected to one end of the capacitor Cf and the drain of the MOS tube Tf; the inverting input terminal of the operational amplifier Uf2 is grounded;

[0019] The source of the MOS tube Tf is grounded; the gate of the MOS tube Tf is connected to the output terminal of the operational amplifier Uf1 on one hand, and is connected to the reverse input terminal of the operational amplifier Uf1 through a resistor on the other hand;

[0020] The output end of the operational amplifier Uf2 is electrically connected to the crossbar array module through memristors 1 to n.

[0021] Furthermore, the activation function module corresponds to the n groups of synaptic modules of the cross array module, and also includes n groups, and each group has the same arrangement and connection structure; wherein the i-th group of activation function modules includes: an operational amplifier Ui, a capacitor Ci and a resistor Ri; the in-phase input terminal of the operational amplifier Ui is electrically connected to the cross array module; the inverting input terminal of the operational amplifier Ui is grounded; the positive power supply terminal of the operational amplifier Ui is electrically connected to one end of the resistor Ri and one end of the capacitor Ci; the other end of the resistor Ri and the other end of the capacitor Ci are grounded; the negative power supply terminal of the operational amplifier Ui is grounded; the output terminal of the operational amplifier Ui is electrically connected to the output module through an absolute value correction ABS module.

[0022] Further, resistors R10-R11, operational amplifiers OP3-OP4, single-pole double-throw switches S3-S4, and memristor M7; wherein the input end of switch S3 is electrically connected to the activation function module through the memristor; the output end of switch S3, one end of which is connected to an output end of the single-pole double-throw switch S4, and the other end is connected to the inverting input end of the operational amplifier OP3 and one end of the resistor R10; the other end of the resistor R10 is electrically connected to the output end of the operational amplifier OP3 and one end of the memristor M7; the other end of the memristor M7 is electrically connected to one end of the resistor R11 and the in-phase input end of the operational amplifier OP4; the output end of the operational amplifier OP4 is electrically connected to the input end of the single-pole double-throw switch S4; the other output end of the single-pole double-throw switch S4 serves as the output end of the output module.

[0023] Furthermore, the input neurons include two types, namely, external signal input neurons Vfeel and nervous system signal input neurons Vneural; the structure and connection composition of each type of input neurons are the same, wherein the structure of the external signal input neuron Vfeel is composed of MOS tubes Q1-Q7; the drain of MOS tube Q1 is used as the input end; the gate of MOS tube Q1 is electrically connected to the drain of MOS tube Q3 and the gate of MOS tube Q3, and is electrically connected to the mode adjustment unit as the output end of the external signal input neuron Vfeel; the source of MOS tube Q1 is electrically connected to one end of a capacitor and the source of MOS tube Q2; the drain of MOS tube Q2 is electrically connected to MOS tube Q3; the gate of MOS tube Q3 is electrically connected to the mode adjustment unit; the source of MOS tube Q1 is electrically connected to one end of a capacitor and the source of MOS tube Q2; the drain of MOS tube Q2 is electrically connected to the gate of MOS tube Q3; the gate of MOS tube Q3 is electrically connected to the gate of MOS tube Q3; the gate of MOS tube Q3 is electrically connected to the gate of MOS tube Q3; the gate of MOS tube Q1 ... The source of MOS tube Q3 is electrically connected; the gate of MOS tube Q2 is electrically connected to the source of MOS tube Q2, one end of another capacitor, the gate of MOS tube Q4, and the gate of MOS tube Q6; the other end of another capacitor serves as the output end of the external signal input neuron Vfeel; the drain of MOS tube Q4 is grounded; the source of MOS tube Q4 is electrically connected to the drain of MOS tube Q6; the source of MOS tube Q6 is grounded; the gate of MOS tube Q5 is electrically connected to the gate of MOS tube Q7; the drain of MOS tube Q5 is grounded; the source of MOS tube Q5 serves as the output end of the external signal input neuron Vfeel, and is electrically connected to the drain of MOS tube Q7; the source of MOS tube Q7 is grounded.

[0024] Further, the mode adjustment unit includes: NAND gate U1, XNOR gate U2, OR gate U3, NOT gate U4, OR gate U5, NAND gate U6, NOT gate U7, AND gate U8, MOS tubes T1-T5, operational amplifier A8, memristor and capacitor;

[0025] The two input ends of the NAND gate U1, XNOR gate U2, and OR gate U3 are respectively the output end of the external signal input neuron Vfeel and the output end of the nervous system signal input neuron Vneural;

[0026] The output end of the NAND gate U1 is electrically connected to the input end of the NAND gate U4, one input end of the OR gate U5, and the gate of the MOS tube T1;

[0027] The output end of the XOR gate U2 is electrically connected to the other input end of the OR gate U5, the gate of the MOS transistor T2, and one input end of the NAND gate U6;

[0028] The output end of the OR gate U3 is electrically connected to the other input end of the NAND gate U6 and the input end of the NOT gate U7;

[0029] The output end of the NOT gate U4 is electrically connected to the gate of the MOS transistor T4;

[0030] The output terminal of the OR gate U5 is electrically connected to an input terminal of the AND gate U8;

[0031] The output end of the NAND gate U6 is electrically connected to the gate of the MOS tube T3;

[0032] The output terminal of the NOT gate U7 is electrically connected to the other input terminal of the AND gate U8;

[0033] The output terminal of the AND gate U8 is electrically connected to the voltage signal Vn through the first threshold switch;

[0034] The source of the MOS tube T1 is connected to the comparison signal Vreaction through the first comparator; the source of the MOS tube T2 is connected to the comparison signal Vforget through the second comparator; the output end of the first comparator is electrically connected to the output end of the second comparator, and is connected to the output end of the operational amplifier A8;

[0035] The drain of the MOS tube T1 is electrically connected to the drain of the MOS tube T3 and one end of the memristor M1; the other end of the memristor M1 is electrically connected to the drain of the MOS tube T4, the drain of the MOS tube T2, and the threshold switch; the source of the MOS tube T4 is electrically connected to the memory selection unit;

[0036] The non-inverting input terminal of the operational amplifier A8 is electrically connected to one end of the capacitor C5 and the drain of the MOS transistor T5; the gate of the MOS transistor T5 is electrically connected to the memory selection unit through the resistor R8.

[0037] Further, the memory selection unit includes: operational amplifiers A1-A7, resistors R1-R7 memristors M2-M3; the inverting input terminal of the operational amplifier A1 is electrically connected to the source of the MOS tube T4; the output terminal of the operational amplifier A1 is electrically connected to one end of the resistor R1 and one end of the resistor R2; the other end of the resistor R1 is electrically connected to the inverting input terminal of the operational amplifier A1; the other end of the resistor R2 is electrically connected to the inverting input terminal of the operational amplifier A2 and one end of the resistor R3; the output terminal of the operational amplifier A2 is electrically connected to the non-inverting input terminal of the operational amplifier A3 and the other end of the resistor R3; the output terminal of the operational amplifier A3 is electrically connected as a An output terminal V1 of the memory selection unit and another path are electrically connected to one end of the memristor M2; the other end of the memristor M2 is electrically connected to the inverting input terminal of the operational amplifier A4 and one end of the resistor R4; the other end of the resistor R4 is electrically connected to the output terminal of the operational amplifier A4 and one end of the resistor R5; the other end of the resistor R5 is electrically connected to the inverting input terminal of the operational amplifier A5 and one end of the resistor R6; the other end of the resistor R6 is electrically connected to the output terminal of the operational amplifier A5 and the non-inverting input terminal of the operational amplifier A6; the output terminal of the operational amplifier A6 is electrically connected to the output terminal of the external signal input neuron Vfeel through the second threshold switch;

[0038] Another output terminal V2 of the memory selection unit is electrically connected to one end of the memristor M3; the other end of the memristor M3 is electrically connected to the non-inverting input terminal of the operational amplifier A7; the inverting input terminal of the operational amplifier A7 is electrically connected to one end of the resistor R7 and the other end of the resistor R8; the other end of the resistor R7 is grounded.

[0039] The output neuron includes: single-pole double-throw switches S1-S2, operational amplifiers OP1-OP2, and memristors M4-M6;

[0040] The output terminals V1 and V2 of the memory selection unit pass through the memristors M4 and M5 respectively to form a signal; the signal is electrically connected to the input terminal of the single-pole double-throw switch S1; one output terminal of the single-pole double-throw switch S1 is electrically connected to the other output terminal of the single-pole double-throw switch S2; the other output terminal of the single-pole double-throw switch S1 is electrically connected to the inverting input terminal of the operational amplifier OP1; the output terminal of the operational amplifier OP1 is electrically connected to the non-inverting input terminal of the operational amplifier OP2 through the memristor M6; the output terminal of the operational amplifier OP2 is electrically connected to the input terminal of the single-pole double-throw switch S2; the other output terminal of the single-pole double-throw switch S2 serves as the output of the output neuron.

[0041] Compared with the prior art, the beneficial effects of the present invention include:

[0042] 1. The three types of memory further expand the way biological nervous systems think and remember, and combined with memristor array technology, parallel computing and multi-value adjustment can be well realized;

[0043] 2. The use of memristor modules realizes multi-memory regulation between synapses, achieving flexibility and reusability.

[0044] 3. The convolution operation of deep learning is completed through the cross array, which provides new possibilities for the hardware implementation of deep learning algorithms. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a schematic diagram of the circuit structure of the present invention;

[0046] Figure 2 is a schematic diagram of a crossbar array module;

[0047] Figure 3 This is a schematic diagram of the feedback signal module circuit principle;

[0048] Figure 4 It is a schematic diagram of the circuit principle of the activation function module;

[0049] Figure 5 This is the schematic diagram of the output module circuit principle;

[0050] Figure 6This is a schematic diagram of the neuron structure that receives external signals;

[0051] Figure 7 is a schematic diagram of the circuit principle of the mode adjustment unit;

[0052] Figure 8 It is the circuit schematic diagram of the memory selection unit;

[0053] Fig. 9 It is an overall schematic diagram of a multi-memory mode switching unit formed by connecting and combining a mode adjustment unit and a memory selection unit;

[0054] Fig.10 is a schematic diagram of the output neuron circuit structure;

[0055] Fig.11 It is a schematic diagram of the overall circuit principle of this application;

[0056] Fig.12 It is the test results of various mode states;

[0057] Fig.13 It is the result of sensory memory experiment;

[0058] Fig.14 This is the result of the short-term memory experiment;

[0059] Fig.15 This is the result of a long-term memory experiment. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0061] The present invention provides a memristor hierarchical memory neural network circuit for simulating biological learning, which specifically includes: a cross array module, an activation function module, an output module and a feedback signal module;

[0062] The signal generated by the cross array module is activated by the activation function module and then amplified by the output module to obtain the output signal;

[0063] On the other hand, the activation signal of the activation function module is fed back to the feedback signal module to form a closed loop;

[0064] Please refer to Figure 2 , Figure 2 is a schematic diagram of a cross array module; wherein the cross array module is formed by cross-arranging n groups of synaptic modules; n is a preset value;

[0065] Since the memristor is a two-terminal device, it is necessary to increase the voltage at both ends of the memristor. Traditional memristor adjustment can only increase unidirectional voltage to the memristor. Here, this patent adopts an array approach to adjust the memristor. Since the memristor is integrated into an array, it can complete parallel computing and other problems that ordinary serial memristors cannot complete.

[0066] The memristor array module of the present application mainly uses a synaptic module, integrating the previous synaptic module into the array.

[0067] The synaptic module includes: input neurons, mode adjustment units, memory selection units and output neurons. The input neuron unit is electrically connected to the mode adjustment unit; the mode adjustment unit is electrically connected to the memory selection unit; the memory selection unit is electrically connected to the output neuron; the specific circuit structure of the synaptic module will be described in detail later.

[0068] The overall circuit first receives electrical signals through the most basic synaptic module, and then divides the signals into sensory memory signals, short-term memory signals, and long-term memory signals according to the input electrical signals.

[0069] Then, the signal is preliminarily processed according to the synaptic module to obtain the memristor memory signal. These signals are adjusted and combined by the cross array module to obtain the signal of the hierarchical neural network. The signal passing through the cross array module will finally be input into the activation function module.

[0070] The activation function judges the signal processed by the array. Signals greater than the activation function threshold will be output, while signals less than the activation function threshold will be suppressed. Finally, the output strength of the hierarchical neural network is adjusted through the feedback circuit module.

[0071] Generally speaking, after a series of signal processing, biological neural networks will output to a presynaptic membrane for signal judgment. When the signal strength is greater than the threshold of the membrane potential, a membrane potential will be generated, allowing the biological system to perceive and remember the external environment. When the external perception information cannot make the neural network generate membrane potential, then this memory signal will disappear in the neural network. If the external perception signal is relatively strong, it will produce positive feedback to the neural network system, allowing the neural network to continue to learn. This is the idea of ​​​​the overall circuit and biological neural network.

[0072] The various components of the circuit of the present application are described in turn below.

[0073] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the feedback signal module circuit principle;

[0074] The feedback signal module includes: operational amplifiers Uf1-Uf2, capacitor Cf, MOS tube Tf, memristor Mf, and resistor Rf;

[0075] One end of the memristor Mf is electrically connected to the crossbar array module, and the other end is connected to the in-phase input end of the operational amplifier Uf1; the inverting input end of the operational amplifier Uf1 is electrically connected to one end of the resistor Rf; the other end of the resistor Rf is grounded;

[0076] The non-inverting input terminal of the operational amplifier Uf2 is electrically connected to one end of the capacitor Cf and the drain of the MOS tube Tf; the inverting input terminal of the operational amplifier Uf2 is grounded;

[0077] The source of the MOS tube Tf is grounded; the gate of the MOS tube Tf is connected to the output terminal of the operational amplifier Uf1 on one hand, and is connected to the reverse input terminal of the operational amplifier Uf1 through a resistor on the other hand;

[0078] The feedback circuit module is mainly composed of a memristor and a feedback circuit. When the feedback signal Vf input to Mf is positive, the resistance of the memristor Mf begins to decrease, so that the voltage applied to the operational amplifier Uf1 reaches the set threshold and begins to generate a feedback signal and accumulates in the capacitor Cf. At the beginning, the charge of Cf is not enough to make Uf2 reach the threshold. When the long-term memory lasts long enough, the voltage applied to the operational amplifier Uf2 can reach the set threshold and form a feedback signal. This process is similar to the learning process of biological neural networks, which is also an accumulation process. When the accumulation reaches a proficient level, the entire nervous system will generate feedback signals to accelerate the learning process.

[0079] The output terminal Vout of the operational amplifier Uf2 is electrically connected to the crossbar array module through memristors 1 to n.

[0080] The activation function module corresponds to the n groups of synaptic modules of the cross array module, and also includes n groups, and each group has the same arrangement and connection structure;

[0081] Please refer to Figure 4 , Figure 4 : is a schematic diagram of the circuit principle of the activation function module. The i-th group of activation function modules includes: an operational amplifier Ui, a capacitor Ci and a resistor Ri; the in-phase input terminal of the operational amplifier Ui is electrically connected to the cross array module; the inverting input terminal of the operational amplifier Ui is grounded; the positive power supply terminal of the operational amplifier Ui is electrically connected to one end of the resistor Ri and one end of the capacitor Ci; the other end of the resistor Ri and the other end of the capacitor Ci are grounded; the negative power supply terminal of the operational amplifier Ui is grounded; the output terminal of the operational amplifier Ui is electrically connected to the output module through an absolute value correction ABS module.

[0082] The activation function used in this application is as follows:

[0083]

[0084] Wherein, Vc and Ve are respectively the positive supply voltage and the negative supply voltage of the operational amplifier Ui.

[0085] The circuit network automatically iterates according to the initial state of each neuron. At the same time, for each neuron in the network, according to the integration circuit of the operational amplifier, we can get:

[0086]

[0087] Among them G ij represents the M in the memristor crossbar array ij The memristor's memristor value, G f Represents the conductance value of the resistor. The neuron output directly fed back to the memristor crossbar array is an excitatory input, and the output fed back to the memristor crossbar array through the inverting summation module is an inhibitory input. According to Kirchhoff's law, we can get:

[0088]

[0089] where w ij represents the synaptic weight of the neural network, w ij Can be G ij and G f To express them. Their relationship is: ij =G ij ·G f . Due to G f The conductance value is fixed, so the positive, negative and zero weights of the network can be achieved by adjusting the conductance value of the memristor. Since the memristor crossbar array is used for network storage and calculation, large-scale parallel computing of the network can be achieved. The programmability of the memristor weight array also makes the application of the circuit more extensive and more flexible to a certain extent.

[0090] Please refer to Figure 5 , Figure 5 This is the schematic diagram of the output module circuit principle;

[0091] The output module includes: resistors R10-R11, operational amplifiers OP3-OP4, single-pole double-throw switches S3-S4, and a memristor M7; wherein the input end of the switch S3 is electrically connected to the activation function module through the memristor; the output end of the switch S3, one end of which is connected to an output end of the single-pole double-throw switch S4, and the other end is connected to the inverting input end of the operational amplifier OP3 and one end of the resistor R10; the other end of the resistor R10 is electrically connected to the output end of the operational amplifier OP3 and one end of the memristor M7; the other end of the memristor M7 is electrically connected to one end of the resistor R11 and the in-phase input end of the operational amplifier OP4; the output end of the operational amplifier OP4 is electrically connected to the input end of the single-pole double-throw switch S4; the other output end of the single-pole double-throw switch S4 serves as the output end of the output module.

[0092] It should be noted that V4-V6 are the output ends of the activation function module after passing through ABS; only 3 groups are listed here. As mentioned earlier, there are as many groups of synapses in the cross array module as there are corresponding activation function modules.

[0093] When the signal transmitted by the activation function module passes through the memristor and outputs the transmitted neuron synapse, when the pulse of the presynaptic neuron releases the electrical signal, the synaptic output neuron is accumulated in the OP3 amplifier, and S3 is a single-pole double-throw switch. Under normal circumstances, it is in a normally closed state and will only be disconnected when OP4 outputs a high level. After summation, OP3 and M1 affect the output of Vout. When the Vout output is greater than the threshold voltage VT2, S4 is closed and S3 is opened. At this time, the neuron no longer accepts the input of electrical signals, and only the summed voltage signal before the threshold is generated. OP4 is the simulated neuron. When the electrical signal is greater than the threshold voltage, the output neuron activation action is executed, and the signal is transmitted to the next input neuron.

[0094] The input neurons include two types, namely external signal input neurons Vfeel and nervous system signal input neurons Vneural; the structure and connection composition of each type of input neurons are the same. Figure 6 , Figure 6 This is a schematic diagram of the neuron structure that receives external signals.

[0095] The structure of the external signal input neuron Vfeel is composed of MOS tubes Q1-Q7; the drain of MOS tube Q1 is used as the input end; the gate of MOS tube Q1 is electrically connected to the drain of MOS tube Q3 and the gate of MOS tube Q3, and is electrically connected to the mode adjustment unit as the output end of the external signal input neuron Vfeel; the source of MOS tube Q1 is electrically connected to one end of a capacitor and the source of MOS tube Q2; the drain of MOS tube Q2 is electrically connected to the source of MOS tube Q3; the gate of MOS tube Q2 is electrically connected to the source of MOS tube Q2 and one end of another capacitor. , the gate of MOS tube Q4, and the gate of MOS tube Q6 are electrically connected; the other end of another capacitor serves as the output end of the external signal input neuron Vfeel; the drain of MOS tube Q4 is grounded; the source of MOS tube Q4 is electrically connected to the drain of MOS tube Q6; the source of MOS tube Q6 is grounded; the gate of MOS tube Q5 is electrically connected to the gate of MOS tube Q7; the drain of MOS tube Q5 is grounded; the source of MOS tube Q5 serves as the output end of the external signal input neuron Vfeel, and is electrically connected to the drain of MOS tube Q7; the source of MOS tube Q7 is grounded.

[0096] It should be noted that the structure of the neural system signal input neuron is the same as the above-mentioned external signal input neuron structure, but the output end is Vneural.

[0097] The principle of input neuron is as follows: when the neuron receives the electrical signal Vin, capacitors C1 and C2, as membrane capacitors, integrate the current until Vcap exceeds the threshold voltage of inverters Q3 and Q4. Then, the direction devices Q5 and Q6 output a high voltage to make the front membrane of the neuron output a stress voltage. Finally, Q2 turns on and Tin turns off, and then the entire input neuron cell enters the refractory period, and no action potential is generated at this time.

[0098] Please refer to Figure 7 , Figure 7 is a schematic diagram of the circuit principle of the mode adjustment unit;

[0099] The mode adjustment unit includes: NAND gate U1, XNOR gate U2, OR gate U3, NOT gate U4, OR gate U5, NAND gate U6, NOT gate U7, AND gate U8, MOS tubes T1-T5, operational amplifier A8, memristor and capacitor;

[0100] The two input ends of the NAND gate U1, XNOR gate U2, and OR gate U3 are respectively the output end of the external signal input neuron Vfeel and the output end of the nervous system signal input neuron Vneural;

[0101] The output end of the NAND gate U1 is electrically connected to the input end of the NAND gate U4, one input end of the OR gate U5, and the gate of the MOS tube T1;

[0102] The output end of the XOR gate U2 is electrically connected to the other input end of the OR gate U5, the gate of the MOS transistor T2, and one input end of the NAND gate U6;

[0103] The output end of the OR gate U3 is electrically connected to the other input end of the NAND gate U6 and the input end of the NOT gate U7;

[0104] The output end of the NOT gate U4 is electrically connected to the gate of the MOS transistor T4;

[0105] The output terminal of the OR gate U5 is electrically connected to an input terminal of the AND gate U8;

[0106] The output end of the NAND gate U6 is electrically connected to the gate of the MOS tube T3;

[0107] The output terminal of the NOT gate U7 is electrically connected to the other input terminal of the AND gate U8;

[0108] The output terminal of the AND gate U8 is electrically connected to the voltage signal Vn through the first threshold switch;

[0109] The source of the MOS tube T1 is connected to the comparison signal Vreaction through the first comparator; the source of the MOS tube T2 is connected to the comparison signal Vforget through the second comparator; the output end of the first comparator is electrically connected to the output end of the second comparator, and is connected to the output end of the operational amplifier A8;

[0110] The drain of the MOS tube T1 is electrically connected to the drain of the MOS tube T3 and one end of the memristor M1; the other end of the memristor M1 is electrically connected to the drain of the MOS tube T4, the drain of the MOS tube T2, and the threshold switch; the source of the MOS tube T4 is electrically connected to the memory selection unit;

[0111] The non-inverting input terminal of the operational amplifier A8 is electrically connected to one end of the capacitor C5 and the drain of the MOS transistor T5; the gate of the MOS transistor T5 is electrically connected to the memory selection unit through the resistor R8.

[0112] Please refer to Figure 8 , Figure 8 This is the circuit schematic diagram of the memory selection unit.

[0113] The memory selection unit includes: operational amplifiers A1-A7, resistors R1-R7 and memristors M2-M3; the inverting input terminal of the operational amplifier A1 is electrically connected to the source of the MOS tube T4; the output terminal of the operational amplifier A1 is electrically connected to one end of the resistor R1 and one end of the resistor R2; the other end of the resistor R1 is electrically connected to the inverting input terminal of the operational amplifier A1; the other end of the resistor R2 is electrically connected to the inverting input terminal of the operational amplifier A2 and one end of the resistor R3; the output terminal of the operational amplifier A2 is electrically connected to the non-inverting input terminal of the operational amplifier A3 and the other end of the resistor R3; the output terminal of the operational amplifier A3 is electrically connected to the memory selection unit. One output terminal V1 of the selection unit and another path are electrically connected to one end of the memristor M2; the other end of the memristor M2 is electrically connected to the inverting input terminal of the operational amplifier A4 and one end of the resistor R4; the other end of the resistor R4 is electrically connected to the output terminal of the operational amplifier A4 and one end of the resistor R5; the other end of the resistor R5 is electrically connected to the inverting input terminal of the operational amplifier A5 and one end of the resistor R6; the other end of the resistor R6 is electrically connected to the output terminal of the operational amplifier A5 and the non-inverting input terminal of the operational amplifier A6; the output terminal of the operational amplifier A6 is electrically connected to the output terminal of the external signal input neuron Vfeel through the second threshold switch;

[0114] Another output terminal V2 of the memory selection unit is electrically connected to one end of the memristor M3; the other end of the memristor M3 is electrically connected to the non-inverting input terminal of the operational amplifier A7; the inverting input terminal of the operational amplifier A7 is electrically connected to one end of the resistor R7 and the other end of the resistor R8; the other end of the resistor R7 is grounded.

[0115] The mode adjustment unit and the memory selection unit together constitute a multi-memory mode switching unit; please refer to Fig. 9 , Fig. 9 It is an overall schematic diagram of a multi-memory mode switching unit formed by connecting and combining a mode adjustment unit and a memory selection unit.

[0116] Mode adjustment mainly uses memristors to divide external signals into three memory mode modules. When external signals are input, the system judgment mode is selected, and then sensory memory is obtained through primary extraction. Then, short-term memory is extracted based on information judgment, and finally, information judgment is performed again to extract long-term memory.

[0117] When the sensory signal and the system central nervous system signal appear at the same time, U1, U3, U6, U7 and U7 are at a low level, while U2 and U5 are at a high level. At this time, PMOS T1 and NMOS T4 are turned on, and PMOS T2 and NMOS T3 are turned off, so that the reaction voltage Vreaction is applied to the memristor M1 in the form of a positive voltage. At this time, the resistance of the memristor M1 begins to decrease and the weight begins to increase. However, when the sensory signal and the system central nervous system signal act at different times, sensory memory, short-term memory and long-term memory will appear. When the application time is too short, the resistance of the memristor will not drop much. At this time, although the externally applied voltage can change the synaptic weight, the applied time is not enough to make the output voltage output reach the threshold voltage of neuron activation, so this is sensory memory, which is similar to the process of people being exposed to noisy and unimportant information in the visual system and quickly forgetting it. When the sensory signal and the system's central nervous system signal act simultaneously for a long enough time until the threshold voltage is reached, short-term memory is formed. Short-term memory is information processed by neurons, which can select things that are more relevant to the decision made from a lot of irrelevant information. However, when short-term memory is being consolidated and learned, its forgetting process is very fast. When the sensory signal and the system's central nervous system signal act simultaneously for a long enough time, long-term memory can be formed. Long-term memory will eventually become permanent after continuous consolidation and learning, which is the so-called experiential knowledge, which will form new synapses.

[0118] In the process of learning in the nervous system, after the relevant learning process, only conditioned stimulation or only unconditioned stimulation is given to conduct correlation experiments, which will cause artificial forgetting process. When only one signal appears between the sensory signal and the system central nervous system signal, it is an artificial forgetting process. U2, U4 and U7 are low level, while U1, U3, U5 and U6 are high level. At this time, PMOS T2 and NMOS T3 are turned on, PMOS T1 and NMOS T4 are disconnected, so that the artificial forgetting signal Vforget is applied to the memristor M1, so that the resistance of the memristor M1 begins to increase and the weight begins to decrease, which starts the process of artificial forgetting. For the sense and there is no forgetting process, because due to its action time, the output neuron does not produce action, while short-term memory and long-term memory are due to the existence of forgetting process. After a period of time, the weight will be reduced to make the action potential less than the threshold, which means that the learned things have been completely forgotten, but compared with short-term memory, it takes longer to forget long-term memory. When the learning time is long enough and long-term memory is converted into experiential memory, the forgetting process no longer occurs.

[0119] Please refer to Fig.10 , Fig.10is a schematic diagram of the output neuron circuit structure;

[0120] The output neuron includes: single-pole double-throw switches S1-S2, operational amplifiers OP1-OP2, and memristors M4-M6;

[0121] The output terminals V1 and V2 of the memory selection unit pass through the memristors M4 and M5 respectively to form a signal; the signal is electrically connected to the input terminal of the single-pole double-throw switch S1; one output terminal of the single-pole double-throw switch S1 is electrically connected to the other output terminal of the single-pole double-throw switch S2; the other output terminal of the single-pole double-throw switch S1 is electrically connected to the inverting input terminal of the operational amplifier OP1; the output terminal of the operational amplifier OP1 is electrically connected to the non-inverting input terminal of the operational amplifier OP2 through the memristor M6; the output terminal of the operational amplifier OP2 is electrically connected to the input terminal of the single-pole double-throw switch S2; the other output terminal of the single-pole double-throw switch S2 serves as the output of the output neuron.

[0122] The work of the output neuron is to perform operations such as summation, calculation and activation. The output neuron circuit consists of a second-order memristor, an amplifier and a linkage switch.

[0123] The output neuron has the same structure as the output module; Fig.10 In the figure, M1 represents the neuron synapse of output transmission. When the pulse of the presynaptic neuron releases the electrical signal, the synaptic output neuron is accumulated in the OP1 amplifier. S1 is a single-pole double-throw switch (or can be replaced by a normally closed transistor). It will only be disconnected when OP2 outputs a high level. After summation, OP1 and M1 affect the output of Vout. When the Vout output is greater than the threshold voltage VT2, S2 is closed and S1 is opened. At this time, the neuron no longer accepts the input of electrical signals. At this time, only the summed voltage signal before the threshold is generated. OP2 is the simulated neuron. When the electrical signal is greater than the threshold voltage, the output neuron activation action is executed, and the signal is transmitted to the next input neuron.

[0124] Finally, in order to more intuitively demonstrate the overall circuit structure of this application, please refer to Fig.11 , Fig.11 This is a schematic diagram of the overall circuit principle of this application. Since this diagram is relatively large, it needs to be enlarged before it can be viewed. Fig.11 In the embodiment, the mode adjustment module and the memory selection module are the aforementioned mode adjustment unit and the memory selection unit; the synaptic circuit module is the aforementioned synaptic module;

[0125] As an embodiment, a simulation experiment is performed using the circuit of the present application.

[0126] 1. MOS tube voltage and mode switching results in different signal modes

[0127] The input signals are the neural signal Vneural and the sensory signal Vfeel. When both signals exist, it is mode 3, that is, the memory mode. When the Vneural signal exists but the Vfeel signal does not exist, the state of the logic system is mode 1, that is, after the neurons have learned, there is no sensory signal. This is the first artificial forgetting process 2. At this time, it is mode 1, and the Vneural signal does not exist but the Vfeel signal exists, which is mode 2, that is, there is only an external sensory stimulation signal, but no neural signal Vneural exists. This is the second artificial forgetting process. When both signals are absent, it is mode 4, which is the natural forgetting process.

[0128] The test results of various modes are as follows: Fig.12 As shown. Between 0ms and 3ms, the neural signal Vneural generates three pulse voltages, and the sensory signal Vfeel is at a low voltage at this time, so it is in mode 1 at this time, U1 is at a level, making PMOS T1 and NMOS T4 closed, and U2 is at a low level, making PMOS T2 and NMOS T3 open, at this time the voltage applied to the memristor is negative, and U3 is at a high level, at this time the natural forgetting signal reverses the signal through the non-gate signal so that the natural forgetting signal does not respond, so at this time there is only artificial forgetting process 1.

[0129] Between 3ms and 6ms, the sensory signal Vfeel generates three pulse voltages, while the neural signal Vneural is at a low voltage at this time, so it is in mode 2 at this time, U1 is at a high level, making PMOS T1 and NMOS T4 closed, and U2 is at a low level, making PMOS T2 and NMOS T3 open. At this time, the natural forgetting signal reverses the signal through the non-gate signal so that the natural forgetting signal does not respond, so at this time there is only artificial forgetting process 2. Compared with mode 1, mode 2 only gives sensory signals, and the nervous system itself has no signal transmission, which is different from mode 1.

[0130] Between 6ms and 60ms, the neural signal Vneural and the sensory signal Vfeel are generated at the same time. This is mode 3, the memory mode, which is the premise for the human brain to remember, associate and think. When the neural signal and the sensory signal are generated at the same time, U1 is at a low level, which turns on PMOS T1 and NMOS T4, and the voltage applied to the two ends of the memristor is positive, the synaptic weight increases, and U2 and U3 are at a high level, which turns off the forgetting loop PMOS T2 and NMOS T3, thus realizing the function of learning and memory.

[0131] Because the neural signals Vneural and Vfeel appear at the same time from 6ms to 60ms, the whole system enters the memory mode, so an artificial forgetting process is carried out between 60ms and 75ms to test the function of reducing and increasing the memristor weight. From 75ms to 100ms, since the neural signals Vneural and Vfeel do not exist, the system enters the natural forgetting process, that is, mode 4. At this time, U1 and U2 are high, and U3 is high, so that PMOS T1 and NMOS T4 are turned off, while U2 is at a low level, so that PMOS T2 and NMOS T3 are turned on, and the voltage applied to both ends of the memristor is negative, and the synaptic weight is reduced. At this time, the natural forgetting voltage Vn acts on the memristor, resulting in a natural forgetting process.

[0132] Sensory memory is not perceived by the human brain, while short-term memory is processed by the nervous system and then transmitted to the brain for storage. Its existence time is limited, but short-term memory also plays an important role in consolidating learning and long-term storage.

[0133] When the human brain receives external information, it filters the information. Sensory memory is the process by which the nervous system filters out some irrelevant information when receiving external information. That is, this type of information will not cause neurons to generate action potentials.

[0134] The results of sensory memory experiments are as follows Fig.13 As shown. Stage 1 and stage 2 are both tests to see whether the current system has formed a connection between the nervous system and the sensory system after relevant learning. First, from 0ms to 5ms, the neural signal exists but the sensory signal does not exist. At this time, the system is in the artificial forgetting process 1. At this time, the synaptic weight does not change, indicating that there is no relationship between the two. Similarly, from 0ms to 5ms, the neural signal exists but the sensory signal does not exist. At this time, the system is in the artificial forgetting process 2. At this time, the synaptic weight does not change, indicating that there is no relationship between the two. Secondly, stage 3 is the memory mode. In order to form a connection between the nervous system and the sensory system, 10 pulse voltages are given between 10ms and 20ms to change the synaptic weight. As can be seen from the figure, the synaptic resistance starts to be small and the weight begins to increase. However, since the synaptic weight increases to the point where the output voltage cannot reach the threshold voltage of the output neuron, the output neuron signal Voutput does not appear at a high level during the entire cycle. Finally, the system is in stage 4, the natural forgetting process. After 5 pulse voltages, the natural forgetting returns to the original resistance state, so that the synaptic weight returns to the initial state. This is the whole process of sensory memory.

[0135] The results of the short-term memory experiment are as follows Fig.14As shown. The process of stage 1 and stage 2 of short-term memory is the same as that of sensation, which mainly tests whether there is a correlation between the neural signal and the sensory signal before the test. The short-term memory is longer than the sensory memory, so 20 pulse voltages are given from 10ms to 30ms to increase the weight of the synapse. At 24ms, the weight of the synapse increases to the point where the output voltage can output the voltage of the neuron at high voltage. At this time, the output signal Voutput generates an action potential. At stage 5, due to the lack of signal input, the weight of the synapse begins to be small. After 3 pulse cycles, the voltage drops below the threshold of the output neuron. At this time, the output signal Voutput no longer generates a signal, and the neuron is in an unexcited state. Since the cycle of the output neuron action cannot reduce the weight of the connection to generate a new synapse to the threshold, no new synapse generation signal can be generated at this time. In stages 6 and 7, both are in the natural forgetting process. After a period of time, the synaptic weight of the original neuron and the synaptic weight of the neuron connecting the new synapse will return to the initial state. This is the whole process of short-term memory.

[0136] Long-term memory is very important for the learning and summarization of the human brain. First, sensory memory extracts signals associated with events from complex environments, and then forms short-term memory after simple processing by the nervous system. Usually, short-term memory is considered to be the memory formed by the human brain during the first learning. The level of this memory cognition is not deep enough. When encountering more complex situations, the local experience formed by short-term memory will mislead judgment. Therefore, after learning in reverse, that is, the extension of learning time, long-term memory can be formed. Long-term memory is more comprehensive in the cognition of things.

[0137] The results of the long-term memory experiment are as follows Fig.15As shown. Stages 1 and 2 of long-term memory are to test the relationship between neural signals and sensory signals. In the long-term memory experiment, 40 pulse voltages were given, so that the entire system was in a learning state, and the learning time was twice as long as short-term memory, so the synaptic weight could be increased to a greater extent. In stage 3 between 10ms and 24ms, the system generates voltage to reduce the synaptic weight of this system. In stage 4 between 24ms and 38ms, the synaptic weight of this system increases to activate the output neuron, but the output signal generated at this time cannot make the output signal of the new synaptic neuron reach the threshold, so no new synapse can be formed. In stage 5 between 38ms and 50ms, the number of pulses of the output neuron of the synapse of this system is enough to make the synaptic weight of the connecting synapse M2 greater than the threshold weight, so that the connecting synaptic system generates a synaptic signal, and a new synapse is generated at this time. Stage 6 between 50ms and 96ms is the natural forgetting process, but in the natural forgetting process, the weight of the generated new synapse can still make the output neuron higher than the threshold, and the new synapse can still output. In stage 7 between 96ms and 100ms, the synapses of the original system have forgotten, so that the signals of the output neurons do not generate excitation signals, but the new synapses can still generate signals, which shows that the newly generated synapses are independent of the original synapses. This is the generation of new synapses. This process can simulate the generation process of new knowledge and experience.

[0138] The beneficial effects of the present invention are:

[0139] 1. The three types of memory further expand the way biological nervous systems think and remember, and combined with memristor array technology, parallel computing and multi-value adjustment can be well realized;

[0140] 2. The use of memristor modules realizes intersynaptic multi-memory regulation, achieving flexibility and reusability.

[0141] 3. The convolution operation of deep learning is completed through the cross array, which provides new possibilities for the hardware implementation of deep learning algorithms.

[0142] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0143] The above specific implementations of the present invention do not constitute a limitation on the protection scope of the present invention. Any other corresponding changes and modifications made based on the technical concept of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A memristor hierarchical memory neural network circuit simulating biological learning, characterized in that: include: Cross array module, activation function module, output module and feedback signal module; The signal generated by the cross array module is activated by the activation function module and then amplified by the output module to obtain the output signal; On the other hand, the activation signal of the activation function module is fed back to the feedback signal module to form a closed loop; The crossbar array module is formed by cross-arranging n groups of synaptic modules; n is the preset value; The synaptic module includes: input neurons, pattern adjustment units, memory selection units and output neurons; The feedback signal module includes: operational amplifiers Uf1-Uf2, capacitor Cf, MOS tube Tf, memristor Mf, and resistor Rf; One end of the memristor Mf is electrically connected to the crossbar array module, and the other end is connected to the in-phase input end of the operational amplifier Uf1; the inverting input end of the operational amplifier Uf1 is electrically connected to one end of the resistor Rf; the other end of the resistor Rf is grounded; The non-inverting input terminal of the operational amplifier Uf2 is electrically connected to one end of the capacitor Cf and the drain of the MOS tube Tf; the inverting input terminal of the operational amplifier Uf2 is grounded; The source of the MOS tube Tf is grounded; the gate of the MOS tube Tf is connected to the output terminal of the operational amplifier Uf1 on one hand, and is connected to the reverse input terminal of the operational amplifier Uf1 through a resistor on the other hand; The output end of the operational amplifier Uf2 is electrically connected to the crossbar array module through memristors 1 to n; The activation function module corresponds to the n groups of synaptic modules of the cross array module, and also includes n groups, and each group has the same arrangement and connection structure; wherein the i-th group of activation function modules includes: an operational amplifier Ui, a capacitor Ci and a resistor Ri; the in-phase input terminal of the operational amplifier Ui is electrically connected to the cross array module; the inverting input terminal of the operational amplifier Ui is grounded; the positive power supply terminal of the operational amplifier Ui is electrically connected to one end of the resistor Ri and one end of the capacitor Ci; the other end of the resistor Ri and the other end of the capacitor Ci are grounded; the negative power supply terminal of the operational amplifier Ui is grounded; the output terminal of the operational amplifier Ui is electrically connected to the output module through an absolute value correction ABS module; The output module includes: resistors R10-R11, operational amplifiers OP3-OP4, single-pole double-throw switches S3-S4, and a memristor M7; wherein the input end of the switch S3 is electrically connected to the activation function module through the memristor; the output end of the switch S3, one end of which is connected to an output end of the single-pole double-throw switch S4, and the other end is connected to the inverting input end of the operational amplifier OP3 and one end of the resistor R10; the other end of the resistor R10 is electrically connected to the output end of the operational amplifier OP3 and one end of the memristor M7; the other end of the memristor M7 is electrically connected to one end of the resistor R11 and the in-phase input end of the operational amplifier OP4; the output end of the operational amplifier OP4 is electrically connected to the input end of the single-pole double-throw switch S4; the other output end of the single-pole double-throw switch S4 serves as the output end of the output module; The input neurons include two types, namely, external signal input neurons Vfeel and nervous system signal input neurons Vneural; the structure and connection composition of each type of input neurons are the same, wherein the structure of the external signal input neuron Vfeel is composed of MOS tubes Q1-Q7; the drain of MOS tube Q1 is used as the input end; the gate of MOS tube Q1 is electrically connected to the drain of MOS tube Q3 and the gate of MOS tube Q3, and is electrically connected to the mode adjustment unit as the output end of the external signal input neuron Vfeel; the source of MOS tube Q1 is electrically connected to one end of a capacitor and the source of MOS tube Q2; the drain of MOS tube Q2 is electrically connected to the gate of MOS tube Q3 The source is electrically connected; the gate of MOS tube Q2 is electrically connected to the source of MOS tube Q2, one end of another capacitor, the gate of MOS tube Q4, and the gate of MOS tube Q6; the other end of another capacitor is used as the output end of the external signal input neuron Vfeel; the drain of MOS tube Q4 is grounded; the source of MOS tube Q4 is electrically connected to the drain of MOS tube Q6; the source of MOS tube Q6 is grounded; the gate of MOS tube Q5 is electrically connected to the gate of MOS tube Q7; the drain of MOS tube Q5 is grounded; the source of MOS tube Q5 is used as the output end of the external signal input neuron Vfeel, and is electrically connected to the drain of MOS tube Q7; the source of MOS tube Q7 is grounded; The mode adjustment unit includes: NAND gate U1, XNOR gate U2, OR gate U3, NOT gate U4, OR gate U5, NAND gate U6, NOT gate U7, AND gate U8, MOS tubes T1-T5, operational amplifier A8, memristor and capacitor; The two input ends of the NAND gate U1, XNOR gate U2, and OR gate U3 are the output end of the external signal input neuron Vfeel and the output end of the nervous system signal input neuron Vneural respectively; The output end of the NAND gate U1 is electrically connected to the input end of the NAND gate U4, one input end of the OR gate U5, and the gate of the MOS tube T1; The output end of the XOR gate U2 is electrically connected to the other input end of the OR gate U5, the gate of the MOS transistor T2, and one input end of the NAND gate U6; The output end of the OR gate U3 is electrically connected to the other input end of the NAND gate U6 and the input end of the NOT gate U7; The output end of the NOT gate U4 is electrically connected to the gate of the MOS transistor T4; The output terminal of the OR gate U5 is electrically connected to an input terminal of the AND gate U8; The output end of the NAND gate U6 is electrically connected to the gate of the MOS tube T3; The output terminal of the NOT gate U7 is electrically connected to the other input terminal of the AND gate U8; The output end of the AND gate U8 is electrically connected to the voltage signal Vn through the first threshold switch; The source of the MOS tube T1 is connected to the comparison signal Vreaction through the first comparator; the source of the MOS tube T2 is connected to the comparison signal Vforget through the second comparator; the output end of the first comparator is electrically connected to the output end of the second comparator, and is connected to the output end of the operational amplifier A8; The drain of the MOS tube T1 is electrically connected to the drain of the MOS tube T3 and one end of the memristor M1; the other end of the memristor M1 is electrically connected to the drain of the MOS tube T4, the drain of the MOS tube T2, and the threshold switch; the source of the MOS tube T4 is electrically connected to the memory selection unit; The non-inverting input terminal of the operational amplifier A8 is electrically connected to one end of the capacitor C5 and the drain of the MOS transistor T5; the gate of the MOS transistor T5 is electrically connected to the memory selection unit through the resistor R8; The memory selection unit includes: operational amplifiers A1-A7, resistors R1-R7 Memristor M2-M3; the inverting input terminal of operational amplifier A1 is electrically connected to the source of MOS tube T4; the output terminal of operational amplifier A1 is electrically connected to one end of resistor R1 and one end of resistor R2; the other end of resistor R1 is electrically connected to the inverting input terminal of operational amplifier A1; the other end of resistor R2 is electrically connected to the inverting input terminal of operational amplifier A2 and one end of resistor R3; the output terminal of operational amplifier A2 is electrically connected to the non-inverting input terminal of operational amplifier A3 and the other end of resistor R3; the output terminal of operational amplifier A3 is electrically connected to one output terminal V1 of memory selection unit and the other end The circuit is electrically connected to one end of the memristor M2; the other end of the memristor M2 is electrically connected to the inverting input end of the operational amplifier A4 and one end of the resistor R4; the other end of the resistor R4 is electrically connected to the output end of the operational amplifier A4 and one end of the resistor R5; the other end of the resistor R5 is electrically connected to the inverting input end of the operational amplifier A5 and one end of the resistor R6; the other end of the resistor R6 is electrically connected to the output end of the operational amplifier A5 and the non-inverting input end of the operational amplifier A6; the output end of the operational amplifier A6 is electrically connected to the output end of the external signal input neuron Vfeel through the second threshold switch; Another output terminal V2 of the memory selection unit is electrically connected to one end of the memristor M3; the other end of the memristor M3 is electrically connected to the non-inverting input terminal of the operational amplifier A7; the inverting input terminal of the operational amplifier A7 is electrically connected to one end of the resistor R7 and the other end of the resistor R8; the other end of the resistor R7 is grounded; The output neuron includes: single-pole double-throw switches S1-S2, operational amplifiers OP1-OP2, and memristors M4-M6; The output terminals V1 and V2 of the memory selection unit respectively pass through the memristors M4 and M5 to form a signal; the signal is electrically connected to the input terminal of the single-pole double-throw switch S1; one output terminal of the single-pole double-throw switch S1 is electrically connected to the other output terminal of the single-pole double-throw switch S2; the other output terminal of the single-pole double-throw switch S1 is electrically connected to the inverting input terminal of the operational amplifier OP1; the output terminal of the operational amplifier OP1 is electrically connected to the non-inverting input terminal of the operational amplifier OP2 through the memristor M6; The output end of the operational amplifier OP2 is electrically connected to the input end of the single-pole double-throw switch S2; the other output end of the single-pole double-throw switch S2 serves as the output of the output neuron.