A method for training a neural network that solves backpropagation

By using a 1T1R cell array and particle swarm optimization algorithm in a hardware memristor neural network, the problem of poor backpropagation performance was solved, achieving efficient and accurate neural network training and overcoming the limitations of the von Neumann memory wall.

CN115759239BActive Publication Date: 2025-12-30ANHUI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211225039.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-09
Publication Date
2025-12-30
Estimated Expiration
2042-10-09

AI Technical Summary

Technical Problem

The backpropagation implementation of existing hardware memristor neural networks is not effective, resulting in weight training and learning being limited by the von Neumann memory wall and high power consumption.

Method used

A memristor array composed of 1T1R units is used, combined with the particle swarm optimization algorithm, to achieve in-memory computing through multi-row coordinated competitive training in the memristor array, thus breaking away from the von Neumann architecture, and using grayscale digital images for preprocessing and weight optimization.

Benefits of technology

It achieves efficient neural network training, reduces training costs, and improves the accuracy of network training results and tolerance to write errors in memristor networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115759239B_ABST
    Figure CN115759239B_ABST
Patent Text Reader

Abstract

The application discloses a neural network training method for solving back propagation, and belongs to the field of neural network training; the training method steps comprise the following steps: S1, building a memristor array; S2, preprocessing a picture into a corresponding voltage, which can be input as an input signal to the memristor array; S3, inputting the picture preprocessing signal to the memristor array, training a single picture first, then training multiple pictures of the same number, and obtaining optimal weights corresponding to the number; S4, preprocessing pictures of different numbers in the operation in S2, and then obtaining optimal weights corresponding to the different numbers according to S3; and S5, composing optimal weights corresponding to the different numbers obtained by training in S3 and S4 into an optimal memristor array, inputting the number picture into the optimal memristor array, and taking a column with the minimum absolute value difference between an output value and a target value as a final number judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of neural network training, and specifically relates to a neural network training method that solves the problem of backpropagation. Background Technology

[0002] Existing hardware memristor neural networks suffer from poor performance in backpropagation due to non-ideal device factors. Most neural networks can only train neural network weights using the backpropagation algorithm through an external host. The weight training and learning process has not escaped the limitations of the von Neumann memory wall, resulting in high power consumption of the entire hardware network. Summary of the Invention

[0003] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a neural network training method that solves the problem of backpropagation.

[0004] The objective of this invention can be achieved through the following technical solutions:

[0005] A method for training a neural network to solve backpropagation includes the following steps:

[0006] S1, Construct a memristor array;

[0007] S2 preprocesses the image into a corresponding voltage, which can be used as an input signal to the memristor array;

[0008] S3, input the image preprocessing signal into the memristor array, first train a single image, then train multiple images with the same number to obtain the optimal weight corresponding to the number;

[0009] S4, perform the preprocessing operation in S2 on the images of different numbers, and then follow S3 to obtain the optimal weights corresponding to different numbers;

[0010] S5: The optimal weights corresponding to the different numbers obtained from training in S3 and S4 are combined into an optimal memristor array. The digital image is then input into the optimal memristor array, and the column with the smallest absolute difference between the output value and the target value is used as the final digital judgment.

[0011] Furthermore, the 1T1 R structure unit is composed of a memristor and a metal-oxide-semiconductor field-effect transistor, with the negative electrode of the memristor connected to the source of the metal-oxide-semiconductor field-effect transistor.

[0012] Furthermore, the memristor is a non-volatile memristor.

[0013] Furthermore, the memristor array is formed by connecting 1T1R cells in a cross array, with the gates and drains of each row and column of 1T1R cells connected together, and the positive terminals of the memristors connected together.

[0014] Furthermore, the image in S2 is a grayscale digital image.

[0015] Furthermore, the preprocessing object in S2 is the corresponding pixel point 0-255 on the grayscale digital image.

[0016] Furthermore, in S3, the training steps for a single image are as follows:

[0017] 1) The preprocessed information is input into the memristor array for calculation. Each column is weighted and output, and compared with the target value. The column with the smallest absolute value error is retained to obtain the optimal point.

[0018] 2) Judge the error E of each column. If E is less than 0, increase the weight of the column; if E is greater than 0, decrease the weight of the column. Repeat this process 200 times and retain the column with the smallest absolute error, which is the optimal weight for the image.

[0019] Furthermore, in step S3, the training step for multiple images with the same number is as follows:

[0020] 1) Write the optimal weights obtained from training a single image into other columns;

[0021] 2) Train according to the training steps of individual images until the last image, and obtain the optimal weight for that number.

[0022] The beneficial effects of this invention are:

[0023] 1. By using 1T1 R units to form a memristor array and this training method, in-memory computing is achieved, completely eliminating the von Neumann architecture, making training more convenient and less costly.

[0024] 2. By conducting coordinated competitive training across multiple rows in the memristor array, the memristor network becomes more tolerant of write errors to non-volatile memristors, resulting in higher accuracy of the network training results. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 This is a schematic diagram of the 1T1R unit according to an embodiment of the present invention;

[0027] Figure 2 This is a schematic diagram of a memristor array according to an embodiment of the present invention;

[0028] Figure 3 This is a schematic diagram of digital image encoding according to an embodiment of the present invention;

[0029] Figure 4 This is a training flowchart of an embodiment of the present invention;

[0030] Figure 5 This is the optimal weight graph in this embodiment of the invention;

[0031] Figure 6 This is a schematic diagram of the particle swarm optimization algorithm. Detailed Implementation

[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0033] A method for training a neural network to solve backpropagation includes the following steps:

[0034] Step 1: Construct a memristor array;

[0035] like Figure 2 As shown, in this embodiment, the memristor array is formed by connecting 1T1R units in a cross array (the gates and drains of the 1T1R units in each row and each column are connected, and the positive terminals of the memristors are connected); of course, the 1T1R units in the memristor array can also be replaced by 1R, 2R, 1T2R, 2T2R, 2T1R and other units.

[0036] like Figure 1 As shown, the 1T1R structure unit consists of a non-volatile memristor and a MOSFET (metal-oxide-semiconductor field-effect transistor). The negative electrode of the non-volatile memristor is connected to the source of the MOSFET. By changing the gate voltage of the MOSFET and then inputting a voltage to the positive terminal of the memristor, the resistance of the memristor can be changed. For example, making the gate voltage of the MOSFET greater than the turn-on voltage and then inputting a positive voltage will increase the resistance of the memristor, and vice versa.

[0037] Step 2: Image information preprocessing;

[0038] like Figure 3 As shown, the corresponding pixels (0-255) on the grayscale digital image are preprocessed into corresponding voltages and used as input signals to the memristor array.

[0039] Step 3, training with individual numbers;

[0040] 1) The training process for a single image is as follows:

[0041] like Figure 4 As shown, the preprocessed information is input into the memristor array for calculation. The weight of each column is output and compared with the target value Target. The column with the smallest absolute value error (the i-th column) is retained to obtain the optimal point. The error (E) of each column is judged. If E is less than 0, the weight of the column is increased; if the error E is greater than 0, the weight of the column is decreased. This process is repeated for 200 epochs until the column with the smallest absolute value error is retained, which is the optimal weight corresponding to the image.

[0042] 2) The training process for multiple images with the same number is as follows:

[0043] Write the optimal weights obtained in step 1) into other columns and train according to the training rules in step 1) until the last image, to obtain the optimal weights for that number.

[0044] Step four, training with multiple numbers;

[0045] like Figure 5 As shown, images of different numbers are preprocessed, and the optimal weights for different numbers are obtained according to step three.

[0046] Step 5: Image recognition test;

[0047] The optimal weights corresponding to the different numbers obtained from training in steps three and four are used to form an optimal memristor array; the digital images are input into the optimal memristor array, and the column with the smallest absolute difference between the output value and the target value is used as the final digital judgment.

[0048] Principle Analysis:

[0049] like Figure 6 The particle swarm optimization algorithm shown is as follows: Assuming a particle is currently at position C, has an individual extreme position B, and a global optimal position A, the particle's next motion state is determined by combining its own direction, its own optimal direction, and the global optimal direction, as shown in Figure x, C'.

[0050] Particle Swarm Optimization (PSO) is considered one of the most widely used swarm intelligence algorithms. It requires few approximations of the function to be optimized and can find the optimal solution in a large search space. It does not require information about the gradient of the objective function; therefore, even non-differentiable functions can be optimized using PSO.

[0051] This method uses different columns in a memristor array to mimic different particles in the PSO algorithm's space. The column with the smallest absolute error from the target value is the global optimum. Due to the non-ideal characteristics of the devices, each weight update is performed in a direction that combines the device's own values ​​with the overall system, preventing the network from getting trapped in local optima. Furthermore, the inherent advantages of PSO make it well-suited for hardware-based network training, replacing backpropagation of gradients.

[0052] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0053] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.

Claims

1. A method of training a neural network to solve backpropagation, characterized by, The training method comprises the following steps: S1, a memristor array is built; S2, a picture is preprocessed into a corresponding voltage and input as an input signal to the memristor array; S3, the picture preprocessed signal is input to the memristor array, a single picture is trained first, then multiple pictures of the same number are trained to obtain optimal weights corresponding to the number; S4, pictures of different numbers are preprocessed in S2, and then the optimal weights corresponding to the different numbers are obtained according to S3; S5, the optimal weights corresponding to the different numbers obtained by S3 and S4 are combined to form an optimal memristor array, and a digital picture is input to the optimal memristor array, and a column with a minimum absolute value difference between an output value and a target value is taken as a final digital judgment; In S1, the memristor array is connected by a 1T1R unit cross array, the gate of each row and each column of the 1T1R unit is connected, the drain is connected, and the positive terminal of the memristor is connected; The 1T1R structure unit is composed of a memristor and a metal oxide semiconductor field effect transistor, and the negative electrode of the memristor is connected to the source of the metal oxide semiconductor field effect transistor; In S3, the training steps of a single picture are as follows: 1) the preprocessed information is input to the memristor array for calculation, a weight output of each column is obtained, and a comparison with a target value is performed, wherein a column with a minimum absolute value error is reserved to obtain an optimal point; 2) the error E of each column is judged, if E is less than 0, the weight of the column is increased, if the error E is greater than 0, the weight of the column is decreased, until 200 times, a column with a minimum absolute value error is reserved, that is, the optimal weight corresponding to the picture; In S3, the training steps of multiple pictures of the same number are as follows: 1) the optimal weight obtained by training a single picture is written into other columns; 2) training is performed according to the training steps of a single picture until the last picture, and the optimal weight of the number is obtained.

2. The method of claim 1, wherein, The memristor is a non-volatile memristor.

3. The method of claim 1, wherein, The picture in S2 is a gray digital picture.

4. The method of claim 3, wherein, The preprocessing object in S2 is a corresponding pixel point 0-255 on the gray digital picture.

Citation Information

Patent Citations

  • Memristor-based neural network training method and memristor-based neural network training device

    CN110796241A

  • Neural network optimization method and device based on memristor and memristor array

    CN114067157A