A memristor back propagation neural network circuit and control method thereof

By using the circuit unit composed of memristor cross array and MOS tube in the neural network circuit, the synchronous adjustment of synchronous weight matrix is ​​completed, and the problem of low synaptic weight adjustment rate in the existing technology is solved, and the neural network is improved The training speed and performance of the circuit.

CN114723025BActive Publication Date: 2024-11-26WUHAN INST OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210302472.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2024-11-26
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

The existing neural network circuits designed based on memristors have limitations in synaptic weight adjustment rate and complex function implementation, and it is difficult to quickly adjust synaptic weights, resulting in defects in backpropagation neural network circuit performance.

Method used

Design a memristor backpropagation neural network circuit to multiplex the memristor cross-array in the synaptic circuit, complete the synaptic weight matrix transposition operation, and use the circuit unit composed of MOS tube and memristor for synchronization Adjust to improve the efficiency of synaptic weight adjustment.

Benefits of technology

The rapid adjustment and synchronous adjustment of synaptic weights are achieved, which improves the training speed and overall performance of the backpropagation neural network circuit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114723025B_ABST
    Figure CN114723025B_ABST
Patent Text Reader

Abstract

The present invention relates to a memristor back propagation neural network circuit and a control method thereof, wherein the memristor back propagation neural network circuit comprises: a plurality of layers of neural network units electrically connected in sequence, wherein the neural network unit comprises a synaptic circuit, an activation circuit electrically connected to the synaptic circuit respectively, and a neuron circuit, wherein the activation circuit is electrically connected to the synaptic circuit of the corresponding next layer of neural network unit at the same time, and the synaptic weight matrix transposition operation is completed by controlling the reuse of the memristor cross array in the synaptic circuit, and after the synaptic weight adjustment amount is calculated, the synaptic circuit can realize the synchronous adjustment of the synaptic weight. The present invention completes the matrix multiplication operation based on the electrical signal transmission of the synaptic circuit and the activation function circuit, and completes the synaptic weight matrix transposition calculation by multiplexing the synaptic circuit and the electrical signal transmission of the neuron circuit, thereby improving the operation speed, realizing the synchronous adjustment of the synaptic weight by using the synaptic circuit, and accelerating the training speed of the network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the emerging field of circuit technology, and in particular to a memristor back-propagation neural network circuit and a control method thereof. Background Art

[0002] Biological Neural Networks (BNN) refers to a neural network composed of biological structures such as neurons and synapses, which is used to generate biological consciousness, help organisms think and act, and deal with a series of complex problems that may be encountered. Benefiting from the current development of medicine and biology, the research on biological neural networks has developed rapidly. However, the research on how biological neural networks work specifically still needs to be developed.

[0003] Artificial Neural Network (ANN) is a hot topic in the field of modern artificial intelligence. Its main idea is to build a computing model with powerful computing and fast learning capabilities by imitating the characteristics of biological neural network (BNN). Neural networks are composed of neurons. The function of neurons is to obtain intermediate calculation results through the inner product of input vector and synaptic weight vector, pass the calculated intermediate results to the activation function, and finally get the output value. The difference between the output value and the target expectation is detected to adjust the synaptic weight of the neuron. Finally, after multiple iterations of training, the synaptic weight value is repeatedly adjusted so that the neuron can reach the target expectation after receiving the input signal. When studying the relationship between charge, current, voltage and magnetic flux, Cai Shaotang proposed the concept of memristor through the symmetry theory. The resistance of the memristor changes by changing the voltage and current at both ends of the memristor, so the memristor is very suitable for representing the change of the weight of the synaptic connection in the artificial neural network. In 2008, HP experiment produced the first physical memristor, and the related research on memristors was carried out fiercely.

[0004] In the prior art, there are endless methods for designing neural network circuits using memristors: an expert team uses 4 memristors to form a bridge circuit as a synaptic circuit, further designs a neuron circuit and constructs a memristor neural network. The synaptic weight of this bridge synaptic circuit can only be changed in (-1,1), which limits the application of the corresponding memristor neural network circuit; some scholars have designed a cross array composed of memristors, using a circuit unit in the memristor cross array as a synaptic circuit. When adjusting the memristor value of the memristor cross array, the resistance of one memristor can be adjusted at a time, and the adjustment rate is low. Some scholars have also designed a memristor cross array composed of a transistor and a memristor, using two corresponding circuit units in two identical memristor cross arrays to form a synaptic circuit. When adjusting the memristor value of the memristor cross array, the resistance of a row of memristors can be adjusted at a time, which also has limitations. In summary, the existing neural network circuits designed based on memristors have limitations in the change of synaptic weights, making it difficult to realize complex neural network functions. There is a lack of technology to implement the operation of the backpropagation process using circuit design. Moreover, the adjustment rate of the synaptic weights of the memristor crossbar array is low, resulting in certain defects in the performance of the memristor back-propagation neural network circuit. Therefore, how to design a memristor back-propagation neural network circuit that can quickly adjust the synaptic weights is an urgent problem to be solved. Summary of the invention

[0005] In view of this, it is necessary to provide a memristor back propagation neural network circuit and a control method thereof to overcome the problems of lack of operational circuit implementation of the back propagation process of the memristor back propagation neural network circuit in the prior art and low efficiency of synaptic weight adjustment.

[0006] In order to solve the above technical problems, the present invention provides a memristor back-propagation neural network circuit, comprising a plurality of layers of neural network units electrically connected in sequence, wherein the neural network unit comprises a synaptic circuit, and an activation circuit and a neuron circuit electrically connected to the synaptic circuit respectively, wherein the activation circuit is electrically connected to the synaptic circuit of the corresponding next layer of neural network units at the same time, and the synaptic circuit comprises a memristor crossbar array;

[0007] Among them, by controlling the multiplexing of the memristor crossbar array in the synaptic circuit, the synaptic weight matrix transposition operation is completed, and after the adjustment amount of the synaptic weight is obtained, the synaptic circuit can realize the synchronous adjustment of the synaptic weight.

[0008] Furthermore, the synaptic circuit also includes a plurality of operational amplifiers electrically connected to the memristor array, and the memristor cross array includes M row signal lines and N column signal lines, the row signal lines and the column signal lines intersect each other but are not directly connected, wherein each row signal line and each column signal line are connected together at the intersection through a circuit unit consisting of four MOS tubes and a memristor.

[0009] Further, the synaptic unit includes a first MOS tube, a second MOS tube, a third MOS tube, a fourth MOS tube and a memristor, wherein:

[0010] One end of the first MOS transistor is electrically connected to the row signal line for receiving a row input signal input by the row signal line, and the other end of the first MOS transistor is electrically connected to the positive electrode of the memristor;

[0011] One end of the second MOS tube is connected to one end of the first MOS tube, and the other end of the second MOS tube is connected to the negative electrode of the memristor;

[0012] One end of the third MOS tube is connected to the positive electrode of the memristor, and the other end of the third MOS tube is connected to the column signal line;

[0013] One end of the fourth MOS tube is connected to the negative electrode of the memristor, and the other end of the fourth MOS tube is connected to the column signal line;

[0014] The control end of the first MOS tube, the control end of the second MOS tube, the control end of the third MOS tube, and the control end of the fourth MOS tube are electrically connected to a first shunt point respectively, and the first shunt point is used to receive a set control voltage signal.

[0015] Further, the M row signal lines include a first row signal line to a second row signal line, the N column signal lines include a first column signal line to a second column signal line, and the plurality of operational amplifiers include a first amplifier, a second amplifier, a third amplifier, and a fourth amplifier, wherein:

[0016] The inverting input terminal of the first amplifier is electrically connected to the first column signal line through a second switch, the non-inverting input terminal of the first amplifier is grounded, the inverting input terminal of the first amplifier is electrically connected to the output terminal of the first amplifier through a first amplifying resistor, the output terminal of the first amplifier is electrically connected to the first activation function circuit, and the first amplifier and the first activation function circuit constitute a first activation circuit;

[0017] The inverting input terminal of the second amplifier is electrically connected to the second column signal line through a second switch, the non-inverting input terminal of the second amplifier is grounded, the inverting input terminal of the second amplifier is electrically connected to the output terminal of the second amplifier through a second amplifying resistor, and the output terminal of the second amplifier is electrically connected to the second activation function circuit. The second amplifier and the second activation function circuit constitute a second activation circuit;

[0018] The inverting input terminal of the third amplifier is electrically connected to the input terminal of the first row signal line through the first resistor and to the output terminal of the second row signal line through the second resistor under the control of the second switch, the non-inverting input terminal of the third amplifier is grounded, the inverting input terminal of the third amplifier is electrically connected to the output terminal of the third amplifier through the third amplifying resistor, and the output terminal of the third amplifier is electrically connected to the first column signal line through the third resistor and to the second column signal line through the fourth resistor;

[0019] The inverting input terminal of the fourth amplifier is electrically connected to the first column signal line through a third resistor and electrically connected to the second column signal line through a fourth resistor under the control of the third switch, the non-inverting input terminal of the fourth amplifier is grounded, the inverting input terminal of the fourth amplifier is electrically connected to the output terminal of the fourth amplifier through a fourth amplifying resistor, and the output terminal of the fourth amplifier is electrically connected to the first row signal line through a first resistor and electrically connected to the second row signal line through a second resistor under the control of the third switch;

[0020] Wherein, under the control of the first switch, the first row input signal and the second row input signal are input; or, a synaptic weight adjustment voltage signal is input; or, the first row signal line and the second row signal line are left vacant.

[0021] Further, the M row signal lines include a first row signal line to a second row signal line, and the neuron circuit includes a fifth amplifier to a sixth amplifier, wherein:

[0022] The reverse input terminal of the fifth amplifier is electrically connected to the first column signal line through the first circuit unit in the memristor cross array under the control of the third switch, and is electrically connected to the second column signal line through the second circuit unit in the memristor cross array; the non-inverting input terminal of the fifth amplifier is grounded, the inverting input terminal of the fifth amplifier is electrically connected to the output terminal of the fifth amplifier through the fifth amplifying resistor, and the output terminal of the fifth amplifier outputs a first voltage signal;

[0023] The reverse input terminal of the sixth amplifier is electrically connected to the first column signal line through the third circuit unit in the memristor cross array under the control of the third switch, and is electrically connected to the second column signal line through the fourth circuit unit in the memristor cross array; the non-inverting input terminal of the sixth amplifier is grounded, the inverting input terminal of the sixth amplifier is electrically connected to the output terminal of the sixth amplifier through the sixth amplifying resistor, and the output terminal of the sixth amplifier outputs a second voltage signal.

[0024] Further, the plurality of operational amplifiers include a first amplifier and a second amplifier, the M row signal lines include a first row signal line to a second row signal line, and the activation circuit includes a first activation circuit and a second activation circuit, wherein:

[0025] The first activation function circuit is electrically connected to the output end of the first amplifier, and is also electrically connected to the first row of signal lines in the memristor crossbar array of the next layer of neural network units through a first switch;

[0026] The second activation function circuit is electrically connected to the output end of the second amplifier, and is electrically connected to the second row of signal lines in the memristor cross array of the next layer of neural network units through the first switch.

[0027] The present invention also provides a control method for a memristor back propagation neural network circuit. Based on the memristor back propagation neural network circuit as described above, the control method comprises:

[0028] In the forward propagation process, each layer of neural network units is controlled to pass through the synaptic circuit and activation circuit in turn, calculate the corresponding input signal and the matrix weight, and output the corresponding output signal, wherein the output signal of each layer of neural network units is used as the input signal of the next layer of neural network;

[0029] In the back propagation process, according to the output signal of each layer of neural network unit, the matrix transposition operation of synaptic weight is completed through the reuse of the memristor cross array to determine the synaptic weight adjustment amount;

[0030] After the synaptic weight adjustment amount is calculated, the synaptic weight adjustment amount is mapped to a control signal of a corresponding synaptic circuit, and the synaptic circuit is controlled to achieve synchronous adjustment of the synaptic weight.

[0031] Furthermore, the input signal includes a first row of input signals and a second row of input signals, and the control of each layer of neural network units sequentially calculates the corresponding input signal and the synaptic weight matrix through the synaptic circuit and the activation circuit, and outputs the corresponding output signal, including:

[0032] Controlling the first switch and the second switch to be closed, and the third switch to be opened;

[0033] Determine the synaptic weight according to the conductance value of the memristor in the synaptic unit;

[0034] Obtaining an input electrical signal for activating a circuit according to the first row of input signals, the second row of input signals, and the synaptic weight;

[0035] By means of the activation circuit, the output signal is determined.

[0036] Furthermore, according to the output signal of the neural network, the synaptic weight matrix transposition operation is completed by multiplexing the memristor crossbar array to determine the adjustment amount of the synaptic weight, including:

[0037] Determine a sensitivity value of the second layer according to the output signal, and map the sensitivity value to a first column input signal and a second column input signal of the second layer;

[0038] Control the first switch to be vacant, the second switch to be opened, and the third switch to be closed;

[0039] Determine a first voltage signal and a second voltage signal according to the first column input signal, the second column input signal and the transposed synaptic weight, and determine a sensitivity value of a first layer neural network unit according to the first voltage signal and the second voltage signal;

[0040] The sensitivity values ​​of each layer of neural network units are calculated in turn, and the synaptic weight adjustment amount of each layer is determined.

[0041] Furthermore, the control method further includes:

[0042] Based on the mapping relationship between the synaptic weight and the memristor value, mapping the adjustment amount of the synaptic weight into the resistance change amount of the memristor;

[0043] The first switch is controlled to access a preset voltage source signal, and the voltage of the control signal electrically connecting each synaptic unit and the memristor in the memristor cross array is set according to the resistance change, and lasts for a corresponding time to change the memristor value of the memristor in each synaptic unit.

[0044] Compared with the prior art, the beneficial effects of the present invention include: in the memristor back-propagation neural network circuit, by setting the synaptic circuit, using the memristor cross array therein, the matrix multiplication operation of the input signal is completed, and by multiplexing the memristor cross array therein, the synaptic weight matrix transposition operation is completed, which is the basis of the forward propagation and reverse propagation processes; by setting the activation circuit, the neural network unit of each layer is processed by the corresponding activation function and input to the neural network unit of the next layer; after calculating the adjustment amount of the synaptic weight, since the designed synaptic circuit has the characteristics of flexible control, the synaptic circuit can realize the synchronous adjustment of the synaptic weight. In the related control method, first, in the forward propagation process, the input signal is sent to the neural network circuit, the input signal and the synaptic weight matrix are calculated, and the obtained output signal is passed to the next layer of the neural network; then, in the reverse propagation process, according to the output signal of the neural network, the synaptic weight matrix is ​​transposed through the reuse of the memristor cross array, and then the adjustment amount of each synaptic weight is determined. In summary, the present invention is based on the transmission of electrical signals through synaptic circuits, neuron circuits and activation function circuits to complete the calculation of input signals and synaptic weights, accelerate the corresponding operation speed, and multiplex the memristor cross array of the synaptic circuit to complete the corresponding synaptic weight matrix transposition calculation, which also improves the speed of operation. After obtaining the adjustment amount of the synaptic weight, the synchronous adjustment of the synaptic weight is achieved through control, thereby improving the overall training speed of the memristor back propagation neural network circuit. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of the structure of an embodiment of a memristor back propagation neural network circuit provided by the present invention;

[0046] Figure 2 A schematic diagram of the structure of a specific embodiment of a memristor back propagation neural network circuit provided by the present invention;

[0047] Figure 3 A schematic flow chart of an embodiment of a control method for a memristor back propagation neural network circuit provided by the present invention;

[0048] Figure 4 The present invention provides Figure 3 A schematic diagram of a flow chart of an embodiment of step S301;

[0049] Figure 5 A schematic diagram of an embodiment of synaptic weights provided by the present invention;

[0050] Figure 6 The present invention provides Figure 3 A schematic diagram of a flow chart of an embodiment of step S302;

[0051] Figure 7A flow chart of another embodiment of the control method of the memristor back-propagation neural network circuit provided by the present invention. DETAILED DESCRIPTION

[0052] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.

[0053] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0054] In the description of the present invention, reference to an "embodiment" means that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the described embodiments may be combined with other embodiments.

[0055] The present invention provides a memristor back propagation neural network circuit and a control method thereof, which utilizes a memristor crossbar array to form a synaptic circuit, and improves the speed of related operations through the memristor crossbar array and its multiplexing. In addition, it provides a new idea for further improving the synaptic weight adjustment efficiency of the memristor back propagation neural network circuit.

[0056] Before describing the embodiments, the following definitions are given for the relevant terms:

[0057] Memristor: The full name is memory resistor (Memristor), which is a circuit device that represents the relationship between magnetic flux and charge. Memristor has the dimension of resistance, but unlike resistor, the resistance of memristor can change according to the charge flowing through it; it should be noted that in 2008, Chinese professor Leon.O.Chua first proposed memristor in theory from the perspective of the symmetry of basic circuit parameters. HP Labs first manufactured the physical device of memristor in 2008, which greatly promoted the development of memristor research. When the corresponding voltage is applied to both ends of the memristor, the memristor value will change. When there is no voltage across the memristor, the resistance of the memristor remains unchanged. The change in the resistance of the memristor can well match the change in synaptic weights in the neural network. Therefore, using memristors as synaptic circuits can not only reduce the number of electronic devices used, but also improve the working performance of synaptic circuits. Therefore, the design of memristor neural network circuits has very good application prospects;

[0058] Back propagation neural network: A neural network with a feedback training mechanism. The core concept is to summarize all the expectations of the next layer of neurons for the previous layer of neurons, thereby guiding the changes of the previous layer of neurons. Through corresponding iterative training, the output of the neural network can gradually approach the expected value.

[0059] Based on the description of the above technical terms, in the prior art, the circuit structure of the memristor back propagation neural network circuit needs many adjustments to adjust the synaptic weights of the entire array, and the entire neural network needs to spend a lot of time to implement the back propagation algorithm. Therefore, the present invention aims to propose a memristor back propagation neural network circuit that can efficiently adjust the synaptic weights.

[0060] The specific embodiments are described in detail below:

[0061] The embodiment of the present invention provides a memristor back propagation neural network circuit, combined with Figure 1 Come and see, Figure 1 The schematic diagram of the structure of an embodiment of the memristor back propagation neural network circuit provided by the present invention comprises several layers of neural network units electrically connected in sequence, wherein the neural network unit comprises a synaptic circuit 101, and an activation circuit 102 and a neuron circuit 103 electrically connected to the synaptic circuit respectively, wherein the activation circuit 102 is electrically connected to the synaptic circuit 101 of the corresponding next layer of neural network unit at the same time, wherein the synaptic weight matrix transposition operation is completed by controlling the multiplexing of the memristor crossbar array in the synaptic circuit 101. After calculating the adjustment amount of the synaptic weight, the synchronous adjustment of the synaptic weight is realized through the synaptic circuit 101.

[0062] In an embodiment of the present invention, in a memristor back propagation neural network circuit, by setting a synaptic circuit and utilizing the memristor cross array therein, the multiplication operation of the input signal and the synaptic weight matrix is ​​completed, and the synaptic weight matrix transposition operation is completed by multiplexing the memristor cross array therein, which is the basis of the forward propagation and reverse propagation processes; by setting an activation circuit, the neural network unit of each layer is processed by the corresponding activation function and input to the neural network unit of the next layer; by setting the input mode of the memristor cross array, when performing reverse propagation, the result of the synaptic weight matrix transposition operation is obtained according to the output of the neuron circuit. Furthermore, according to the result of the synaptic weight matrix transposition operation, the adjustment amount of the synaptic weight is calculated. After the adjustment amount of the synaptic weight is calculated, according to the corresponding mapping relationship and control signal, the synchronous adjustment of the synaptic weight is realized, and the overall training rate of the memristor back propagation neural network circuit is improved.

[0063] As a preferred embodiment, Figure 2 Come and see, Figure 2 A schematic structural diagram of a specific embodiment of a memristive back-propagation neural network circuit provided by the present invention, wherein the synaptic circuit includes a memristive cross array and a plurality of operational amplifiers electrically connected to the memristive cross array, wherein the memristive cross array includes M row signal lines and N column signal lines, wherein the row signal lines and the column signal lines cross each other but are not directly connected, wherein each row signal line and each column signal line are connected together at the intersection through a circuit unit consisting of four MOS tubes and a memristor.

[0064] In the embodiment of the present invention, a memristor crossbar array and its multiplexing are used to complete the operations in the forward and reverse propagation processes, greatly accelerating the speed of the operations.

[0065] In a specific embodiment of the present invention, each layer of the neural network has the same structure and has a 4T1M memristor cross array as a synaptic circuit, and each layer of the neural network has the same structure. The 4T1M memristor cross array has n neurons. The n neurons are composed of n square synapses. The n square synapses are connected and arranged through n row signal lines and n column signal lines to form a matrix.

[0066] As a preferred embodiment, still combined with Figure 2 From the perspective of FIG. 1 , the synaptic unit includes a first MOS tube, a second MOS tube, a third MOS tube, a fourth MOS tube and a memristor, wherein:

[0067] One end of the first MOS transistor is electrically connected to the row signal line for receiving a row input signal input by the row signal line, and the other end of the first MOS transistor is electrically connected to the positive electrode of the memristor;

[0068] One end of the second MOS tube is connected to one end of the first MOS tube, and the other end of the second MOS tube is connected to the negative electrode of the memristor;

[0069] One end of the third MOS tube is connected to the positive electrode of the memristor, and the other end of the third MOS tube is connected to the column signal line;

[0070] One end of the fourth MOS tube is connected to the negative electrode of the memristor, and the other end of the fourth MOS tube is connected to the column signal line;

[0071] The control end of the first MOS tube, the control end of the second MOS tube, the control end of the third MOS tube, and the control end of the fourth MOS tube are electrically connected to a first shunt point respectively, and the first shunt point is used to receive a set control voltage signal.

[0072] In an embodiment of the present invention, a 4T1M circuit unit is constructed using a first MOS tube, a second MOS tube, a third MOS tube, a fourth MOS tube and a memristor to form a synaptic unit, and the transposition operation of the synaptic weight matrix can be completed by multiplexing the 4T1M memristor cross array.

[0073] As a preferred embodiment, still combined with Figure 2 From the perspective of FIG. 1 , the M row signal lines include a first row signal line to a second row signal line, the N column signal lines include a first column signal line to a second column signal line, and the plurality of operational amplifiers include a first amplifier, a second amplifier, a third amplifier, and a fourth amplifier, wherein:

[0074] The inverting input terminal of the first amplifier is electrically connected to the first column signal line through a second switch, the non-inverting input terminal of the first amplifier is grounded, the inverting input terminal of the first amplifier is electrically connected to the output terminal of the first amplifier through a first amplifying resistor, the output terminal of the first amplifier is electrically connected to the first activation function circuit, and the first amplifier and the first activation function circuit constitute a first activation circuit;

[0075] The inverting input terminal of the second amplifier is electrically connected to the second column signal line through a second switch, the non-inverting input terminal of the second amplifier is grounded, the inverting input terminal of the second amplifier is electrically connected to the output terminal of the second amplifier through a second amplifying resistor, and the output terminal of the second amplifier is electrically connected to the second activation function circuit. The second amplifier and the second activation function circuit constitute a second activation circuit;

[0076] The inverting input terminal of the third amplifier is electrically connected to the input terminal of the first row signal line through the first resistor and to the output terminal of the second row signal line through the second resistor under the control of the second switch, the non-inverting input terminal of the third amplifier is grounded, the inverting input terminal of the third amplifier is electrically connected to the output terminal of the third amplifier through the third amplifying resistor, and the output terminal of the third amplifier is electrically connected to the first column signal line through the third resistor and to the second column signal line through the fourth resistor;

[0077] The inverting input terminal of the fourth amplifier is electrically connected to the first column signal line through a third resistor and electrically connected to the second column signal line through a fourth resistor under the control of the third switch, the non-inverting input terminal of the fourth amplifier is grounded, the inverting input terminal of the fourth amplifier is electrically connected to the output terminal of the fourth amplifier through a fourth amplifying resistor, and the output terminal of the fourth amplifier is electrically connected to the first row signal line through a first resistor and electrically connected to the second row signal line through a second resistor under the control of the third switch;

[0078] Wherein, under the control of the first switch, the first row input signal and the second row input signal are input; or, a synaptic weight adjustment voltage signal is input; or, the first row signal line and the second row signal line are left vacant.

[0079] In the embodiment of the present invention, through the connection structure between the MOS tube and the memristor, the resistance value of the memristor can be adjusted by changing the input signal, that is, the weight of the synapse can be changed.

[0080] In a specific embodiment of the present invention, the synapses are synapse M111, synapse M211, synapse M121, synapse M221, ... synapse Mijn-1, synapse Mijn-1. The row signal lines are respectively recorded as row signal line B1, row signal line B2, ... row signal line Bn-1, row signal line Bn. The column signal lines are respectively recorded as column signal line C1, longitudinal signal line C2, ... column signal line Cn-1, column signal line Cn. The row signal lines are arranged crosswise with the column signal lines, and the row signal lines and column signals are connected through synapses;

[0081] The synapses M111 and M121 are connected via row signal lines B1, B2 and column signal line C1. The synapses M211 and M221 are connected via row signal lines B1, B2 and column signal line C2. The synapse circuits are connected in a similar manner via row signal lines and column signal lines.

[0082] Among them, further, the synapse components are all composed of the same structure, which is composed of a first PMOS tube T1, a second PMOS tube T2, a third NMOS tube T3, a fourth NMOS tube T4, and a memristor RM. The gates of the four MOS tubes are connected together to provide a gate voltage to control the working state of the transistor. One end of the first PMOS tube T1 is connected to the input signal end, and one end is connected to the "+" interface of the memristor RM. One end of the second PMOS tube T2 is connected to the input signal end, and one end is connected to the "-" interface of the memristor RM. One end of the third NMOS tube T3 is connected to the output signal end, and one end is connected to the "-" interface of the memristor RM. One end of the fourth NMOS tube T4 is connected to the output signal end, and one end is connected to the "+" interface of the memristor RM. The connection structure of the MOS tube and the memristor RM can adjust the resistance of the memristor RM by changing the size of the input signal, that is, changing the weight of the synapse.

[0083] As a specific embodiment, the memristor cross array has n signal input terminals and n signal output terminals. The n signal input terminals include input terminal Vin1, input terminal Vin2, ... to input terminal Vinn. The n signal output terminals include output terminal Vout1, output terminal Vout2, ... to output terminal Voutn. In the forward propagation process, the input signal is multiplied by the synaptic weight matrix represented by the 4T1M memristor cross array.

[0084] As a preferred embodiment, still combined with Figure 2 From the perspective of FIG. 1 , the M row signal lines include the first row signal line to the second row signal line, and the neuron circuit includes the fifth amplifier to the sixth amplifier, wherein:

[0085] The inverting input terminal of the fifth amplifier is electrically connected to the first column signal line through the first circuit unit in the memristor cross array under the control of the third switch, and is electrically connected to the second column signal line through the second circuit unit in the memristor cross array. The non-inverting input terminal of the fifth amplifier is grounded, and the inverting input terminal of the fifth amplifier is electrically connected to the output terminal of the fifth amplifier through the fifth amplifying resistor, and the output terminal of the fifth amplifier outputs a first voltage signal;

[0086] The inverting input terminal of the sixth amplifier is electrically connected to the first column signal line through the third circuit unit in the memristor cross array under the control of the third switch, and is electrically connected to the second column signal line through the fourth circuit unit in the memristor cross array. The non-inverting input terminal of the sixth amplifier is grounded, and the inverting input terminal of the sixth amplifier is electrically connected to the output terminal of the sixth amplifier through the sixth amplifying resistor, and the output terminal of the sixth amplifier outputs a second voltage signal.

[0087] In the embodiment of the present invention, the fifth amplifier and the sixth amplifier form corresponding output first voltage signals and second voltage signals, which represent the result of the transposition operation of the synaptic weight matrix.

[0088] As a preferred embodiment, still combined with Figure 2 From the perspective of FIG. 1 , the plurality of operational amplifiers include a first amplifier and a second amplifier, the M row signal lines include a first row signal line to a second row signal line, and the activation circuit includes a first activation circuit and a second activation circuit, wherein:

[0089] The first activation function circuit is electrically connected to the output end of the first amplifier, and is also electrically connected to the first row of signal lines in the memristor crossbar array of the next layer of neural network units through a first switch;

[0090] The second activation function circuit is electrically connected to the output end of the second amplifier, and is electrically connected to the second row of signal lines in the memristor cross array of the next layer of neural network units through the first switch.

[0091] In the embodiment of the present invention, an activation circuit is set and a corresponding activation operation is performed to obtain an output signal as an effective input for the next neural network unit.

[0092] In a specific embodiment of the present invention, each layer of the neural network circuit has n activation circuits. The activation circuit is connected to a 4T1M memristor cross array. The input signal and the result of the 4T1M memristor cross array operation are sent to the activation circuit. This activation circuit can use different activation functions, such as sigmoid, tanh, etc. After the activation circuit operation is completed, an output signal is obtained, and the output signal is sent to the next layer of the neural network circuit as a new input signal, thus completing a forward propagation process. Since the operation of the forward propagation process is implemented on the circuit hardware through the action of electrical signals, as long as the input signal is applied to the memristor back-propagation neural network circuit, the output signal can be directly obtained, thereby greatly improving the running speed of the forward propagation process.

[0093] As a specific embodiment, after obtaining the output of the forward propagation process of the memristor back-propagation neural network, the corresponding back-propagation sensitivity value can be obtained, the signal input method of the memristor crossbar array can be changed, the memristor crossbar array can be multiplexed, the operation result of the transpose of the synaptic weight matrix can be obtained, and the adjustment amount of the synaptic weight can be further obtained.

[0094] After calculating the synaptic weight adjustment of all layers, all synaptic weight adjustment amounts are mapped into the change in resistance of the memristor of each 4T1M circuit unit in the corresponding 4T1M memristor crossbar array through the control signal mapping circuit. Further, the change in memristor value is converted into the action time of the corresponding control signal. Then, all control signals are applied to the 4T1M crossbar array at the same time, changing the memristor value of all memristors in the memristor crossbar array at the same time, and realizing the synchronous adjustment of synaptic weights.

[0095] The following takes a two-layer neural network layer as an example to more clearly illustrate the circuit structure of the present invention. Figure 2 The following are explained:

[0096] Each layer of the neural network has a 4T1M memristor crossbar array and 2 neurons. Each neuron is composed of two synapses connected by row signal lines and column signal lines. The synapses are recorded as synapse M111, synapse M211, synapse M121, and synapse M221. The row signal lines are row signal line B1 and row signal line B2. The column signal lines are column signal line C1 and column signal line C2. Synapses M111 and M121 form the first neuron N1 through row signal lines B1, B2, and column signal line C1. Synapses M211 and M221 form the second neuron N2 through row signal lines B1, B2, and column signal line C2.

[0097] Among them, this memristor neural network circuit uses a memristor with a voltage threshold, the forward threshold voltage of the memristor is 0.5V, and the reverse threshold voltage of the memristor is -0.5V. At the same time, the threshold voltage of the PMOS tube used is -0.6V, and the threshold voltage of the NMOS tube is 0.6V;

[0098] Among them, the structure of each 4T1M synaptic circuit is the same, including a first PMOS tube T1, a second PMOS tube T2, a third NMOS tube T3, a fourth NMOS tube T4, and a memristor RM. The gates of the four MOS tubes are connected to the shared signal terminal Vcon, which is used to provide gate voltage and control the working state of the transistor. One end of the first PMOS tube T1 is connected to the input signal terminal, and one end is connected to the "+" interface of the memristor RM. One end of the second PMOS tube T2 is connected to the input signal terminal, and one end is connected to the "-" interface of the memristor RM. One end of the third NMOS tube T3 is connected to the output signal terminal, and one end is connected to the "-" interface of the memristor RM. One end of the fourth NMOS tube T4 is connected to the output signal terminal, and one end is connected to the "+" interface of the memristor RM. The connection structure of the MOS tube and the memristor RM can adjust the resistance of the memristor RM by changing the input signal size, that is, changing the weight of the synapse;

[0099] Among them, for synapse M111, due to the virtual short effect of the operational amplifier, the voltage of the inverting terminal of the operational amplifier A1 is 0V, that is, the voltage on the column signal line C1 is 0V. When the row input signal Vin1 is 1V, the voltage of the shared signal terminal Vcon1 is -2V, the voltage between the gate and the source of the PMOS tube T1 and the PMOS tube T2 is -3V, and the voltage between the gate and the source of the NMOS tube T3 and the NMOS tube T4 is -2V. Affected by the threshold voltage of the MOS tube, the PMOS tube T1 and the NMOS tube T3 are connected, and the PMOS tube T2 and the NMOS tube T4 are open. In this case, the current flows through the PMOS tube T1, from the "+" to the "-" of the memristor RM, and then flows to the NMOS tube T3, and finally flows to the output signal terminal. The resistance of the memristor RM increases, that is, the weight of the 4T1M synapse decreases;

[0100] Among them, for synapse M111, when the row input signal Vin1 is 1V and the voltage of the shared signal terminal Vcon1 is 2V, the voltage between the gate and the source of PMOS tube T1 and PMOS tube T2 is 1V, and the voltage between the gate and the source of NMOS tube T3 and NMOS tube T4 is 2V. Affected by the threshold voltage of the MOS tube, PMOS tube T2 and NMOS tube T4 are connected, while PMOS tube T1 and NMOS tube T3 are open. In this case, the current flows through PMOS tube T2, from the "-" of the memristor RM to the "+", then flows to the NMOS tube T4, and finally flows to the output signal terminal. The resistance of the memristor RM decreases, and the corresponding 4T1M synapse weight increases;

[0101] Among them, for synapse M111, when the row input signal Vin1 is a voltage value between the negative threshold voltage and the positive threshold voltage of the memristor, that is, Vin1 is a voltage between -0.5V and 0.5V, and the voltage of the shared signal terminal Vcon1 is 2V, the voltage between the gate and the source of PMOS tube T1 and PMOS tube T2 is a voltage between 1.5V and 2.5V, and the voltage between the gate and the source of NMOS tube T3 and NMOS tube T4 is 2V. Affected by the threshold voltage of the MOS tube, PMOS tube T2 and NMOS tube T4 are connected, while PMOS tube T1 and NMOS tube T3 are open. In this case, the current flows through PMOS tube T2, from the "-" to the "+" of the memristor RM, and then flows to NMOS tube T4, and finally flows to the output signal terminal. However, the input voltage at this time is between the negative threshold voltage and the positive threshold voltage of the memristor, so the resistance value of the memristor remains unchanged;

[0102] Among them, the 4T1M synaptic circuits in the memristor crossbar array have the same circuit structure and circuit connection method, so other 4T1M synaptic circuits can be analyzed in the same way. By setting the voltage of the control signal at the shared signal end of each 4T1M synaptic circuit in the memristor crossbar array, each 4T1M synaptic circuit can be individually controlled to increase or decrease the memristor value, thereby adjusting the memristor value of each 4T1M synaptic circuit at the same time, and realizing synchronous synaptic weight adjustment;

[0103] Each layer of the memristor back propagation neural network circuit contains six operational amplifiers, including a first amplifier A1, a second amplifier A2, a third amplifier A3, a fourth amplifier A4, a fifth amplifier A5, and a sixth amplifier A6. The operational amplifiers are respectively connected to resistors RN1, RN2, RN3, RN4, RN5, and RN6;

[0104] Among them, the reverse input terminal of the first amplifier A1 is controlled by the switch S2, connected to the column signal line C1 of the memristor cross array, the in-phase input terminal is grounded, the resistor RN1 is connected to the reverse input terminal and the output terminal of the operational amplifier A1, and the output terminal Vout1 of the operational amplifier A1 is used as the net input terminal of the activation function f, forming the first activation circuit of the first layer;

[0105] Among them, the reverse input terminal of the second amplifier A2 is controlled by the switch S2, connected to the column signal line C2 of the memristor cross array, the in-phase input terminal is grounded, the resistor RN2 is connected between the reverse input terminal and the output terminal of the second amplifier A2, and the output terminal Vout2 of the second amplifier A2 is used as the input terminal of the activation function f, forming the second activation circuit of the first layer;

[0106] Among them, the reverse input terminal of the third amplifier A3 is connected to the row input signals Vin1 and Vin2 through resistors R1 and R2 under the control of switch S2. The in-phase input terminal of the third amplifier A3 is grounded, and the resistor RN3 is connected to the reverse input terminal and the output terminal of the third amplifier A3. With the assistance of the third amplifier A3, the 4T1M circuit unit in the memristor cross array and the resistors R1 and R2 realize negative weight, zero weight, and positive weight through the superposition operation of circuit signals;

[0107] The reverse input terminal of the fifth amplifier A5 is controlled by the switch S3 and connected to the row signal line B1 of the memristor crossbar array, the in-phase input terminal is grounded, and the resistor RN5 is connected to the reverse input terminal and the output terminal Vtf1 of the fifth amplifier A5, forming a first neuron circuit;

[0108] The reverse input terminal of the sixth amplifier A6 is controlled by the switch S3 and connected to the row signal line B2 of the memristor cross array, the in-phase input terminal is grounded, and the resistor RN6 is connected to the reverse input terminal and the output terminal Vtf2 of the sixth amplifier A6 to form a second neuron circuit.

[0109] Wherein, under the control of the switch S3, the inverting input terminal of the fourth amplifier A4 is connected to the column input signals Vtin1 and Vtin2 through the resistors R3 and R4.

[0110] The in-phase input terminal of the fourth amplifier A4 is grounded, and the resistor RN4 is connected to the inverting input terminal and the output terminal of the fourth amplifier A4. With the assistance of the fourth amplifier A4, the 4T1M circuit unit in the memristor cross array and the resistors R3 and R4 realize negative weight, zero weight, and positive weight through the superposition operation of circuit signals.

[0111] Among them, under the control of switch S3, after the column input signals Vtin1 and Vtin2 are connected to the 4T1M memristor crossover, the row output signals Vtf1 and Vtf2 are obtained through the superposition of circuit signals; this operation can realize the multiplication of the transpose of the synaptic weight matrix, which is an important operation step in the back propagation process, and therefore, can speed up the operation speed of the back propagation process.

[0112] The embodiment of the present invention provides a control method for a memristor back propagation neural network circuit, combining Figure 3 Come and see, Figure 3 A flow chart of an embodiment of a control method of a memristor back propagation neural network circuit provided by the present invention is provided, based on the memristor back propagation neural network circuit as described above, comprising steps S301 to S302, wherein:

[0113] In step S301, during the forward propagation process, each layer of neural network units is controlled to pass through the synaptic circuit and the activation circuit in turn, and the corresponding input signal and the synaptic weight matrix are calculated to obtain the corresponding output signal, wherein the output signal of each layer of neural network units is used as the input signal of the next layer of neural network;

[0114] In step S302, during the back propagation process, according to the output signal of the neural network, the transposition operation of the synaptic weight matrix is ​​completed by multiplexing the memristor cross array. Then, the corresponding parameters are back propagated layer by layer to determine the adjustment amount of the synaptic weight of each layer. According to the adjustment amount of the synaptic weight, the synaptic circuit can realize the synchronous adjustment of the synaptic weight.

[0115] It should be noted that one operation includes the forward propagation process, the reverse propagation process, and the synaptic weight adjustment process. In the forward propagation process, the resistance of the memristor in the 4T1M memristor cross array needs to remain unchanged, so as to obtain a stable and effective neural network output. In the reverse propagation process, when the calculation of the synaptic weight matrix transposition is completed by multiplexing the 4T1M memristor cross array, the resistance of the memristor still needs to remain unchanged. Therefore, the row input signals Vin1, Vin2 and the column input signals Vtin1, Vtin2 are set to voltages between -0.5V and 0.5V in the forward and reverse propagation processes, respectively. In the synaptic weight adjustment process, the memristor in the 4T1M memristor cross array needs to change the memristor value to achieve weight adjustment. Therefore, the switch S1 is selected to connect the voltage source Vadj, whose voltage is 1V, and then cooperate with different control signals to achieve the change of the memristor value.

[0116] As a preferred embodiment, Figure 4 Come and see, Figure 4 The present invention provides Figure 3 The flowchart of step S301 in an embodiment includes steps S401 to S404, wherein:

[0117] In step S401, the first switch and the second switch are controlled to be closed, and the third switch is controlled to be opened;

[0118] In step S402, a synaptic weight is determined according to the conductance value of the memristor in the synaptic unit;

[0119] In step S403, an initial output signal is determined according to the first row input signal, the second row input signal and the synaptic weight;

[0120] In step S404, the activation circuit processes the initial output signal with an activation function to determine the output signal.

[0121] In the embodiment of the present invention, the calculation in the forward propagation process is completed through the memristor circuit hardware, and the transmission of the electrical signal is completed instantly, which greatly improves the speed of calculation.

[0122] Let's take a two-layer neural network as an example. Figure 2 and Figure 5 Come and see, Figure 5 The schematic diagram of an embodiment of the synaptic weight provided by the present invention more specifically illustrates the process of the forward propagation process as follows:

[0123] During the forward propagation process, switches S1 and S2 are closed, and switch S3 is opened. The row input signal Vin1 passes through switch S1 and is connected to the reverse input terminal of the operational amplifier A3 through resistor R1. The row input signal Vin2 passes through switch S1 and is connected to the reverse input terminal of the third amplifier A3 through resistor R2. The non-inverting input terminal of the third amplifier A3 is grounded. According to the characteristics of virtual open and virtual short of the operational amplifier, and by the superposition theorem, the voltage of the third amplifier A3 at this time can be obtained as follows:

[0124]

[0125] Wherein, RN3 represents the resistance value of the resistor connected to the operational amplifier A3;

[0126] Among them, the third amplifier A3 is connected to the inverting input terminal of the operational amplifier A1 through the resistor R3 and the column signal line C1. The row input signal Vin1 is connected to the synapse M111 through the switch S1, and finally connected to the inverting input terminal of the operational amplifier A1. The row input signal Vin2 is connected to the synapse M121 through the switch S1, and is also connected to the inverting input terminal of the operational amplifier A1. According to the characteristics of virtual open and virtual short of the operational amplifier, and by the superposition theorem, the voltage of the second amplifier A2 at this time can be obtained as follows:

[0127]

[0128] Wherein, RN1 represents the resistance value of the resistor connected to the operational amplifier A1, Rm111 represents the resistance value of the memristor in the synapse M111, and Rm121 represents the resistance value of the memristor in the synapse M121;

[0129] Further, the third amplifier A3 is connected to the inverting input terminal of the second amplifier A2 through the resistor R4 and the column signal line C2. The input signal Vin1 is connected to the synapse M211 through the switch S1, and finally connected to the inverting input terminal of the second amplifier A2. The input signal Vin2 is connected to the synapse M221 through the switch S1, and is also connected to the inverting input terminal of the second amplifier A2. Similarly, according to the characteristics of virtual open and virtual short of the operational amplifier, and by the superposition theorem, the voltage of the second amplifier A2 at this time can be obtained as follows:

[0130]

[0131] Wherein, RN2 represents the resistance value of the resistor connected to the operational amplifier A2, Rm211 represents the resistance value of the memristor in the synapse M211, and Rm221 represents the resistance value of the memristor in the synapse M221;

[0132] Furthermore, the resistance value of the resistor RN3 is set to be the same as the resistance values ​​of the resistors R3 and R4; the voltage expression of the third amplifier A3 is substituted into the two voltage expressions of the second amplifier A2 to derive the following equation:

[0133] V out1 =-(k 1 V in1 (G m111 -G 1 )+k 1 V in2 (G m121 -G 2 ))

[0134] V out2 =-(k 2 V in1 (G m211 -G 1 )+k 2 V in2 (G m221 -G 2 ))

[0135] Among them, Gm111, Gm121, Gm211, and Gm221 represent the conductance values ​​of the memristors in synapses M111, M121, M211, and M221, respectively. G1 and G2 represent the conductance values ​​of resistors R1 and R2, respectively. Therefore, the synaptic weight is expressed as:

[0136] w ij = k(G γ -G mij1 )

[0137] From the above formula, we can see that when the conductance Gr is greater than Gmij, it is expressed as a negative weight; when the conductance Gr is equal to Gmij, it is expressed as a zero weight; when the conductance Gr is less than Gmij, it is expressed as a positive weight. The above input signal, weight, and output signal can be simplified in the form of matrix product:

[0138]

[0139] Wherein, W111, W121, W211, and W221 represent the synaptic weights of synapse M111, synapse M121, synapse M211, and synapse M221, respectively;

[0140] Through the above operation of input signal and synaptic weight matrix, we get the intermediate output signal Vout1 and output signal Vout2. Vout1 and Vout2 are input into activation function to get the output signal of the current layer. The output signal of the current layer is sent to the next layer of network as input signal. Since the two layers of neural network have the same structure and the switch closure is the same at this time, the output signal of the second layer of network can be obtained by the same calculation method:

[0141]

[0142] Among them, the output signal Vout3 and the output signal Vout4 calculated by the above formula are sent to the activation function, and finally the output of the neural network in the forward propagation process is as follows:

[0143]

[0144] Therefore, through the conduction of circuit signals, the first output signal N1 and the second output signal N2 of the neural network in the forward propagation process are obtained. Since the corresponding operations in the forward propagation process are realized by the interaction of circuit signals, as long as the input signal is added, the output signal can be obtained immediately, which can effectively improve the operation speed.

[0145] As a preferred embodiment, Figure 6 Come and see, Figure 6 The present invention provides Figure 3 The flowchart of an embodiment of step S302 includes steps S601 to S604, wherein:

[0146] In step S601, a sensitivity value of the second layer is determined according to the output signal, and the sensitivity value is mapped to a first column input signal and a second column input signal of a memristor crossbar array of the second layer;

[0147] In step S602, the first switch is controlled to be vacant, the second switch is controlled to be opened, and the third switch is controlled to be closed;

[0148] In step S603, a first voltage signal and a second voltage signal are determined according to the first column input signal, the second column input signal and the transposed synaptic weight, and a sensitivity value of a neural network unit of a previous layer is determined according to the first voltage signal and the second voltage signal;

[0149] In step S604, the sensitivity value of each layer of the neural network unit is calculated in turn, and the adjustment amount of the corresponding synaptic weight is determined.

[0150] In the embodiment of the present invention, a 4T1M memristor crossbar array is reused to complete the matrix transposition operation, thereby greatly improving the corresponding operation speed.

[0151] Let's take the two-layer neural network as an example. Figure 2 and Figure 5 Come and see, Figure 5 The schematic diagram of an embodiment of the synaptic weight provided by the present invention more specifically illustrates the process of the back propagation process as follows:

[0152] In the back propagation process, first, according to the first output signal N1 and the second output signal N2 of the neural network, the sensitivity of the output layer, i.e., the second layer, can be calculated. Further, the calculated sensitivity value is mapped to the column input terminal Vtin3 and the column input terminal Vtin4 of the second layer. Then, the switch S1 is left vacant and no signal is connected. The switch S2 is opened and the switch S3 is closed. Vtin3 and Vtin4 are connected to the inverting input terminal of the tenth amplifier A10 through resistors R7 and R8, the non-inverting input terminal of the tenth amplifier A10 is grounded, and the tenth amplifier A10 connects the inverting input terminal to the output terminal of the operational amplifier through resistor RN10. According to the characteristics of virtual open and virtual short of the operational amplifier, and by the superposition theorem, it can be obtained that the voltage VA10 of the tenth amplifier A10 at this time is as follows:

[0153]

[0154] Wherein, RN10 represents the resistance value of the resistor connected to the operational amplifier A10, and the column input signal Vtin3 passes through the synapse M112 and is finally connected to the inverting input terminal of the eleventh amplifier A11. The column input signal Vtin4 passes through the synapse M212 and is also connected to the inverting input terminal of the eleventh amplifier A11. At the same time, the output of the operational amplifier A10 passes through the resistor R5 and the row signal line B3 of the second layer and is also connected to the inverting input terminal of the eleventh amplifier A11. According to the characteristics of virtual disconnection and virtual short of the operational amplifier and the superposition theorem, the output voltage Vtrf3 of the eleventh amplifier A11 at this time can be obtained as follows:

[0155]

[0156] Wherein, RN11 represents the resistance value of the resistor connected to the operational amplifier A11, Rm112 represents the resistance value of the memristor in the synapse M112, and Rm212 represents the resistance value of the memristor in the synapse M212;

[0157] Among them, the column input signal Vtin3 passes through the synapse M122 and is finally connected to the inverting input terminal of the twelfth amplifier A12. The column input signal Vtin4 passes through the synapse M222 and is also connected to the inverting input terminal of the twelfth amplifier A12. At the same time, the output of the operational amplifier A10 passes through the resistor R6, the row signal line B4 of the second layer, and is also connected to the inverting input terminal of the twelfth amplifier A12. According to the characteristics of virtual disconnection and virtual short of the operational amplifier, and by the superposition theorem, the output voltage Vtrf4 of the twelfth amplifier A12 at this time can be obtained as follows:

[0158]

[0159] Among them, RN12 represents the resistance of the resistor connected to the operational amplifier A12, Rm122 represents the resistance of the memristor in the synapse M122, and Rm222 represents the resistance of the memristor in the synapse M222. Using a similar method to the forward propagation process, it can be obtained that this process implements the multiplication of the transpose of the synaptic weight matrix:

[0160]

[0161] It should be noted that in the process of back propagation, the multiplication of the transpose of the synaptic weight matrix occupies most of the calculation. Through the reuse of the 4T1M memristor crossbar array and the interaction of circuit signals, the multiplication of the transpose of the synaptic weight matrix can be completed, which can speed up the calculation speed of the back propagation process. According to the output signals Vtrf3 and Vtrf4 obtained by the circuit operation, the sensitivity of the first layer can be further calculated, and the adjustment amount of the synaptic weight of each layer can be calculated.

[0162] As a preferred embodiment, Figure 7 Come and see, Figure 7 This is a flow chart of another embodiment of the control method of the memristor back propagation neural network circuit provided by the present invention, which further includes steps S701 to S702 after step S302, wherein:

[0163] In step S701, based on the mapping relationship between the synaptic weight and the memristor value, the adjustment amount of the synaptic weight is mapped into the resistance change amount of the memristor;

[0164] In step S702, the first switch is controlled to access a preset voltage source signal, and the voltage of the control signal of each synaptic unit in the memristor crossbar array is set according to the resistance change to change the memristor value of each synaptic unit.

[0165] In an embodiment of the present invention, the obtained synaptic weight adjustment amount is mapped to the corresponding control signal action time, and then the control signal controls each synaptic circuit to adjust the memristor value. All synaptic circuits can adjust the memristor value at the same time, realize synchronous synaptic weight adjustment, and improve the synaptic weight adjustment speed.

[0166] Let's take the two-layer neural network as an example. Figure 2 and Figure 5 Let's take a closer look at the method for synchronously adjusting synaptic weights as follows:

[0167] In the synaptic weight adjustment stage, first, according to the mapping relationship between the synaptic weight and the memristor value, the adjustment amount of the synaptic weight is mapped into the increase or decrease of the memristor value. Then, according to the increase or decrease of the memristor value, the voltage of the corresponding control signal and the duration of the control signal voltage are obtained. In this memristor back propagation neural network circuit, each 4T1M synaptic circuit can be individually controlled by the control signal to change the memristor value. Therefore, all 4T1M synaptic circuits in the memristor back propagation neural network can be individually controlled to change the memristor value at the same time by applying the corresponding control signal, so as to achieve synchronous synaptic weight adjustment and improve the speed of synaptic weight adjustment. In the existing technical scheme, when the synaptic weight adjustment is performed to change the resistance value of the memristor in the memristor cross array, only the resistance value of one memristor can be changed at a time, or only the resistance value of one row of memristors can be changed at a time. However, when the synaptic weight is adjusted, the resistance value of all memristors in the memristor cross array can be adjusted at the same time, thereby improving the adjustment speed of the synaptic weight. In the synaptic weight adjustment stage, the switch S1 is selected to connect the voltage source signal Vadj to the circuit, and the voltage of Vadj is 1V. By setting the voltage of the control signal Vcon1-Vcon8 of the 8 4T1M synaptic circuits in the memristor cross array to 2V or -2V, the memristor values ​​in the 8 4T1M synaptic circuits can be changed simultaneously. If the memristor value in the 4T1M synaptic circuit is to be increased, the control signal is set to -2V. If the memristor value in the 4T1M synaptic circuit is to be reduced, the control signal is set to 2V.

[0168] The present invention discloses a memristor back propagation neural network circuit and a control method thereof. In the memristor back propagation neural network circuit, by setting a synaptic circuit and utilizing the memristor cross array therein, the matrix multiplication operation of the input signal is completed, and by multiplexing the memristor cross array therein, the matrix transposition operation is completed, which is the basis of the forward propagation and reverse propagation processes; by setting an activation circuit, the neural network unit of each layer is processed with the corresponding activation function and input to the neural network unit of the next layer; by setting a neural network, when reverse propagation is performed, the multiplication of the synaptic weight matrix transposition is completed by changing the input signal mode. In the related control method, first, in the forward propagation process, the input signal is sent to the neural network circuit, the input signal and the synaptic weight matrix are calculated, and the obtained output signal is transmitted to the next layer of neural network; then, in the reverse propagation process, according to the output signal of the neural network, the matrix transposition operation is performed through the multiplexing of the memristor cross array, the sensitivity is reversely propagated, and the adjustment amount of the synaptic weight of each layer is determined.

[0169] The technical solution of the present invention is based on the transmission of electrical signals through synaptic circuits, neuron circuits and activation function circuits to complete the synaptic weight matrix operation, accelerate the corresponding operation speed, and complete the corresponding synaptic weight matrix transposition calculation by multiplexing the memristor cross array of the synaptic circuit. Then, the adjustment amount of the synaptic weight in the neural network is determined. Furthermore, by mapping the synaptic weight adjustment amount to the corresponding memristor value change, all synaptic circuits in the neural network can be adjusted to change the memristor value at the same time, so as to achieve synchronous adjustment of the synaptic weight and improve the synaptic weight adjustment and neural network training speed. The memristor neural network circuit achieves the desired function by iterating the above process multiple times.

[0170] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A memristor back propagation neural network circuit, characterized in that: It comprises several layers of neural network units electrically connected in sequence, wherein the neural network unit comprises a synaptic circuit, and an activation circuit and a neuron circuit electrically connected to the synaptic circuit respectively, wherein the activation circuit is electrically connected to the synaptic circuit of the corresponding next layer of neural network unit at the same time, and the synaptic circuit comprises a memristor crossbar array; Wherein, by controlling the multiplexing of the memristor crossbar array in the synaptic circuit, completing the synaptic weight matrix transposition operation, and calculating the synaptic weight adjustment amount, the synaptic circuit can realize the synchronous adjustment of the synaptic weight; The synaptic circuit also includes a plurality of operational amplifiers electrically connected to the memristor cross array, the memristor cross array includes M row signal lines and N column signal lines, the row signal lines and the column signal lines cross each other but are not directly connected, wherein each row signal line and each column signal line are connected together at the intersection through a circuit unit consisting of four MOS tubes and one memristor; The synaptic circuit comprises a first MOS tube, a second MOS tube, a third MOS tube, a fourth MOS tube and a memristor, wherein: One end of the first MOS transistor is electrically connected to the row signal line for receiving a row input signal input by the row signal line, and the other end of the first MOS transistor is electrically connected to the positive electrode of the memristor; One end of the second MOS tube is connected to one end of the first MOS tube, and the other end of the second MOS tube is connected to the negative electrode of the memristor; One end of the third MOS tube is connected to the positive electrode of the memristor, and the other end of the third MOS tube is connected to the column signal line; One end of the fourth MOS tube is connected to the negative electrode of the memristor, and the other end of the fourth MOS tube is connected to the column signal line; The control end of the first MOS tube, the control end of the second MOS tube, the control end of the third MOS tube, and the control end of the fourth MOS tube are electrically connected to a first shunt point respectively, and the first shunt point is used to receive a set control voltage signal; The M row signal lines include a first row signal line to a second row signal line, and the neuron circuit includes a fifth amplifier to a sixth amplifier, wherein: The reverse input terminal of the fifth amplifier is electrically connected to the first column signal line through the first circuit unit in the memristor cross array under the control of the third switch, and is electrically connected to the second column signal line through the second circuit unit in the memristor cross array; the non-inverting input terminal of the fifth amplifier is grounded, the inverting input terminal of the fifth amplifier is electrically connected to the output terminal of the fifth amplifier through the fifth amplifying resistor, and the output terminal of the fifth amplifier outputs a first voltage signal; The reverse input terminal of the sixth amplifier is electrically connected to the first column signal line through the third circuit unit in the memristor cross array under the control of the third switch, and is electrically connected to the second column signal line through the fourth circuit unit in the memristor cross array; the non-inverting input terminal of the sixth amplifier is grounded, the inverting input terminal of the sixth amplifier is electrically connected to the output terminal of the sixth amplifier through the sixth amplifying resistor, and the output terminal of the sixth amplifier outputs a second voltage signal.

2. The memristor back propagation neural network circuit according to claim 1, characterized in that: The M row signal lines include a first row signal line to a second row signal line, the N column signal lines include a first column signal line to a second column signal line, and the plurality of operational amplifiers include a first amplifier, a second amplifier, a third amplifier, and a fourth amplifier, wherein: The inverting input terminal of the first amplifier is electrically connected to the first column signal line through a second switch, the non-inverting input terminal of the first amplifier is grounded, the inverting input terminal of the first amplifier is electrically connected to the output terminal of the first amplifier through a first amplifying resistor, the output terminal of the first amplifier is electrically connected to a first activation function circuit, and the first amplifier and the first activation function circuit constitute a first activation circuit; The inverting input terminal of the second amplifier is electrically connected to the second column signal line through a second switch, the non-inverting input terminal of the second amplifier is grounded, the inverting input terminal of the second amplifier is electrically connected to the output terminal of the second amplifier through a second amplifying resistor, the output terminal of the second amplifier is electrically connected to a second activation function circuit, and the second amplifier and the second activation function circuit constitute a second activation circuit; The inverting input terminal of the third amplifier is electrically connected to the input terminal of the first row signal line through the first resistor and to the output terminal of the second row signal line through the second resistor under the control of the second switch, the non-inverting input terminal of the third amplifier is grounded, the inverting input terminal of the third amplifier is electrically connected to the output terminal of the third amplifier through the third amplifying resistor, and the output terminal of the third amplifier is electrically connected to the first column signal line through the third resistor and to the second column signal line through the fourth resistor; The inverting input terminal of the fourth amplifier is electrically connected to the first column signal line through a third resistor and electrically connected to the second column signal line through a fourth resistor under the control of the third switch, the non-inverting input terminal of the fourth amplifier is grounded, the inverting input terminal of the fourth amplifier is electrically connected to the output terminal of the fourth amplifier through a fourth amplifying resistor, and the output terminal of the fourth amplifier is electrically connected to the first row signal line through a first resistor and electrically connected to the second row signal line through a second resistor under the control of the third switch; Wherein, under the control of the first switch, the first row input signal and the second row input signal are input; or, the synaptic weight adjustment voltage signal is input; or, the first row signal line and the second row signal line are left vacant.

3. The memristor back propagation neural network circuit according to claim 2, characterized in that: The plurality of operational amplifiers include a first amplifier and a second amplifier, the M row signal lines include a first row signal line to a second row signal line, and the activation circuit includes the first activation function circuit and the second activation function circuit, wherein: The first activation function circuit is electrically connected to the output end of the first amplifier, and is also electrically connected to the first row of signal lines in the memristor crossbar array of the next layer of neural network units through a first switch; The second activation function circuit is electrically connected to the output end of the second amplifier, and is electrically connected to the second row of signal lines in the memristor cross array of the next layer of neural network units through the first switch.

4. A control method for a memristor back propagation neural network circuit, characterized in that: Based on the memristor back propagation neural network circuit according to any one of claims 1 to 3, the control method comprises: In the forward propagation process, each layer of neural network units is controlled to pass through the synaptic circuit and activation circuit in turn, calculate the corresponding input signal and the synaptic weight matrix, and output the corresponding output signal, wherein the output signal of each layer of neural network units is used as the input signal of the next layer of neural network; In the back propagation process, according to the output signal of each layer of neural network unit, the matrix transposition operation of synaptic weight is completed through the reuse of the memristor crossbar array to determine the synaptic weight adjustment amount; After the synaptic weight adjustment amount is calculated, the synaptic weight adjustment amount is mapped to a control signal of a corresponding synaptic circuit, and the synaptic circuit is controlled to achieve synchronous adjustment of the synaptic weight.

5. The control method of the memristor back propagation neural network circuit according to claim 4, characterized in that: The input signal includes a first row of input signals and a second row of input signals, and the control of each layer of neural network units sequentially calculates the corresponding input signal and the synaptic weight matrix through the synaptic circuit and the activation circuit to obtain the corresponding output signal, including: Controlling the first switch and the second switch to be closed, and the third switch to be opened; Determine the synaptic weight according to the conductance value of the memristor in the synaptic circuit; Obtaining an input electrical signal for activating a circuit according to the first row of input signals, the second row of input signals, and the synaptic weight; By means of the activation circuit, the output signal is determined.

6. The control method of the memristor back propagation neural network circuit according to claim 5, characterized in that: According to the output signal of the neural network, the matrix transposition operation of the synaptic weight is completed by multiplexing the memristor crossbar array, and the synaptic weight adjustment amount is determined, including: Determine a sensitivity value of the second layer according to the output signal, and map the sensitivity value to a first column input signal and a second column input signal of the second layer; Control the first switch to be vacant, the second switch to be opened, and the third switch to be closed; Determine a first voltage signal and a second voltage signal according to the first column input signal, the second column input signal and the transposed synaptic weight, and determine a sensitivity value of a first layer neural network unit according to the first voltage signal and the second voltage signal; The sensitivity values ​​of each layer of neural network units are calculated in turn, and the synaptic weight adjustment amount of each layer is determined.

7. The control method of the memristor back propagation neural network circuit according to claim 6, characterized in that: The control method further comprises: Based on the mapping relationship between the synaptic weight and the memristor value, mapping the adjustment amount of the synaptic weight into the resistance change amount of the memristor; The first switch is controlled to access a preset voltage source signal, and the voltage of the control signal electrically connecting each synaptic circuit and the memristor in the memristor cross array is set according to the resistance change, and is maintained for a corresponding time to change the memristor value of the memristor in each synaptic circuit.