A neural network training operation system and method based on a conductance adjustable device

By using a neural network training operating system based on conductance-tunable devices, the information transmission and weight update process is simplified, solving the problem of high computational resources and power consumption in hardware neural networks during training and inference, and achieving efficient online training and high-accuracy inference.

CN116579392BActive Publication Date: 2026-01-23PENG CHENG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310184157.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2026-01-23
Estimated Expiration
2043-02-21

AI Technical Summary

Technical Problem

Existing hardware neural networks based on conductance-tunable devices consume a lot of computational resources and have high power consumption during training and inference. The peripheral circuits of the cross array are complex, and the non-ideal characteristics of the conductance-tunable devices affect the training effect and inference accuracy.

Method used

A neural network training operating system based on a conductance-adjustable device is adopted, which includes multiple interconnected network layers. The system utilizes a voltage conversion module, an adjustable conductance module, a comparison module, and a sample-and-hold module for forward propagation of information and backward propagation of error. The system updates network weights through a gradient accumulation module and a conductance adjustment module, which simplifies the information transmission and weight update process.

Benefits of technology

It reduces the consumption of computing resources and power consumption, simplifies peripheral circuits, improves the accuracy of training and inference, and supports online training and high-accuracy inference of neural networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116579392B_ABST
    Figure CN116579392B_ABST
Patent Text Reader

Abstract

The application discloses a neural network training operation system and method based on a conductance adjustable device. The system comprises a first voltage conversion module for converting a forward output signal of a previous network layer into an input voltage signal; an adjustable conductance module for processing the input voltage signal and outputting a first current signal, and for processing a reverse input voltage signal and outputting a second current signal; a first comparison module for comparing the first current signal; a sample and hold module for sampling a comparison result and outputting a forward output signal and a derivative signal of a current network layer; a product module for multiplying a reverse error signal of a next network layer with the derivative signal; a second voltage conversion module for converting a multiplication result into a reverse input voltage signal; and a second comparison module for comparing the second current signal and outputting a reverse error signal of the current network layer. The method makes information transmission between network layers in a binary form, saves calculation resources and reduces power consumption.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of integrated circuits, and particularly relates to a neural network training operation system and method based on a conductance adjustable device. BACKGROUND

[0002] In recent years, the progress of artificial intelligence cannot be separated from the development of artificial neural networks represented by deep learning. Due to the continuous expansion of its scale, artificial neural networks increasingly rely on the improvement of data scale and computing power. However, the data processing and computing power provided by the existing computer systems based on the von Neumann architecture is facing more and more bottlenecks. Artificial intelligence systems based on new electronic devices and new computing architectures have become a hot spot in scientific and technological research in recent years.

[0003] Among them, the neural network is composed of multiple layers of network node layers connected to each other. Information is propagated from the input layer to the output layer layer by layer in the forward direction to complete the processing of information and realize the cognitive functions such as recognition and classification. This process is called the inference process. In order to realize accurate inference, the neural network needs to adjust the weights of the node connections in each network layer based on a large amount of labeled data and according to certain rules (i.e. learning algorithm). This process is called the training or learning process. The high-density connection between a large number of input nodes and output nodes in a certain layer of neural network can usually be described in the form of a weight matrix.

[0004] Moreover, in the process of forward propagation of information, the information set of the input nodes of each layer in the neural network can be regarded as a vector. The result of multiplying this vector with the weight matrix is another vector, i.e. the output vector. The information processed by the activation function after the output vector represents the output node information, which serves as the input of the next layer of neural network. In the traditional computer system with von Neumann architecture, the above vector-matrix multiplication operation requires the operation unit to continuously read and write data from the data storage space, resulting in high power consumption and delay.

[0005] To alleviate this problem, an array of electronic devices with certain resistance or conductance values can be used to store the data of the entire weight matrix. At the same time, when they form a cross array structure, combined with peripheral circuits, the vector matrix multiplication operation can be realized in one step using Ohm's law and Kirchhoff's current law. Such a hardware circuit, while realizing the storage of weight information and vector matrix multiplication, efficiently and low-power completes the forward propagation of information in the neural network. Because the data operation process is completed in the space of data storage, it is also called "in-memory computing". Among them, the electronic devices with adjustable conductance function, including resistive random access memory, ferroelectric memory, floating gate memory, magnetic memory, phase change memory, etc., can simulate the adjustability or plasticity of the connection weight between network nodes. These devices also simulate the plasticity of synapses in biological systems, so they are also called artificial synapse devices. Adjusting the conductance of the adjustable conductance device realizes the update of the weight in the neural network, so the training of the neural network is realized.

[0006] However, the existing hardware neural network based on conductance adjustable devices has the following problems. First, the training of the neural network is usually in an offline form, that is, after the training of the neural network is completed on a traditional computing platform, the trained weight information is mapped and written into the hardware network based on the conductance adjustable device. Such a neural network can only accelerate the inference process of the neural network, and the training of the neural network still needs to consume a lot of computing resources. Second, the peripheral circuit of the cross array is relatively complex. In order to realize the vector matrix multiplication operation based on Ohm's law and Kirchhoff's current law, an accurate voltage needs to be applied at one end of the cross array and an accurate current needs to be detected at the other end. This usually requires high-precision digital-to-analog conversion and analog-to-digital conversion circuit modules. The cost of implementing these high-precision circuit modules in the chip and the power consumption during operation are very high. Finally, the non-ideal characteristics of the conductance adjustable device greatly affect the training effect and inference accuracy of the neural network offline or online.

[0007] Therefore, the prior art still needs to be improved and improved. SUMMARY

[0008] The main purpose of the present application is to provide a neural network training operation system and method based on conductance adjustable devices, aiming at solving the problem of the existing hardware neural network based on conductance adjustable devices that consumes a lot of computing resources and has high power consumption during training and inference.

[0009] In order to achieve the above purpose, the present application adopts the following technical scheme:

[0010] The application discloses a neural network training operation system based on a conductance adjustable device, which is composed of multiple interconnected network layers, and characterized in that a typical network layer in the neural network training operation system based on the conductance adjustable device comprises a first voltage conversion module, an adjustable conductance module, a first comparison module and a sample and hold module.

[0011] The first voltage conversion module is connected with a forward output unit of a previous network layer; the first voltage conversion module, the adjustable conductance module, the first comparison module and the sample and hold module are sequentially connected.

[0012] The first voltage conversion module is used for reading a forward output signal in the forward output unit of the previous network layer, converting the forward output signal into an input voltage signal and then transmitting the input voltage signal to the adjustable conductance module; the adjustable conductance module is used for processing the input voltage signal and transmitting a first current signal obtained to the first comparison module; the first comparison module is used for comparing the current size in the first current signal and outputting a comparison signal to the sample and hold module; a forward output unit in the sample and hold module is used for performing a single sampling operation on the comparison signal, obtaining a forward output signal of the current network layer, and performing multiple sampling operations and logic operation operations on the comparison result, obtaining a derivative signal of the current network layer.

[0013] The input voltage signal and the first current signal of the adjustable conductance module are analog electrical signals; the forward output signal of the previous network layer, the comparison signal of the first comparison module, the forward output signal of the current network layer and the derivative signal of the current network layer are all binary digital signals.

[0014] The network layer in the neural network training operation system based on the conductance adjustable device further comprises a product module, a second voltage conversion module and a second comparison module.

[0015] The product module, the second voltage conversion module, the adjustable conductance module and the second comparison module are sequentially connected, and the product module is further connected with the sample and hold module.

[0016] The product module is used for multiplying the derivative signal of the current network layer with a reverse output signal of a next network layer, transmitting the multiplication result to the second voltage conversion module; the second voltage conversion module is used for converting the multiplication result into a reverse input voltage signal and then transmitting the reverse input voltage signal to the adjustable conductance module; the adjustable conductance module is further used for processing the reverse input voltage signal and transmitting a second current signal obtained to the second comparison module; and the second comparison module is further used for comparing the current size in the second current signal, obtaining a reverse output signal of the current network layer.

[0017] The reverse input voltage signal and the second current signal of the adjustable conductance module are analog electrical signals; the reverse output signal of the next network layer and the reverse output signal of the current network layer are binary symbolized error signals; and the multiplication result of the multiplication module is a ternary error signal.

[0018] The network layer further comprises a gradient accumulation module and a conductance adjustment module.

[0019] The conductance adjustment module is connected with the gradient accumulation module and the adjustable conductance module, and the gradient accumulation module is further connected with the first voltage conversion module, the multiplication module and the second voltage conversion module.

[0020] The gradient accumulation module is configured to calculate a gradient signal according to the forward output signal of the previous network layer and the multiplication result of the multiplication module, and accumulate the gradient signal; the gradient accumulation module is further configured to output a conductance adjustment instruction to the conductance adjustment module according to the accumulated result of the gradient signal; and the conductance adjustment module is configured to adjust the conductance of a target unit in the adjustable conductance module according to the conductance adjustment instruction.

[0021] The gradient signal is a ternary symbolized signal; the accumulated result of the gradient signal is a signed integer; and the conductance adjustment instruction comprises position information of the conductance unit to be adjusted, a direction of the conductance adjustment and an amplitude of the conductance adjustment.

[0022] The network layer further comprises a noise generation module; the noise generation module is connected with the first comparison module; and the noise generation module is configured to add a noise current to the first current signal to randomize the comparison result of the first comparison module.

[0023] The noise current is an analog signal; and the noise current is provided by intrinsic noise of an electronic device in the adjustable conductance module or intrinsic noise in the first comparison module.

[0024] The adjustable conductance module comprises (m+1)*(n+1)-1 adjustable conductance devices.

[0025] The m*(n+1) adjustable conductance devices form an adjustable conductance matrix of m rows and (n+1) columns, which is used to process the input voltage signal and output a first current signal; one end of the (n+1) adjustable conductance devices in each row is connected to each other, and the other end of the m adjustable conductance devices in each column is connected to each other; the one end of the (n+1) adjustable conductance devices in each row is also connected to a voltage conversion unit in the first voltage conversion module; the other end of the m adjustable conductance devices in each column is also connected to a comparator unit in the first comparison module.

[0026] The (m+1)*n adjustable conductance devices form an adjustable conductance matrix of (m+1) rows and n columns, which is used to process the reverse input voltage signal and output a second current signal; one end of the n adjustable conductance devices in each row is connected to each other, and the other end of the (m+1) adjustable conductance devices in each column is connected to each other; the one end of the n adjustable conductance devices in each row is also connected to a comparator unit in the second comparison module; the other end of the (m+1) adjustable conductance devices in each column is also connected to a voltage conversion unit in the second voltage conversion module; wherein m and n are both positive integers.

[0027] In the neural network training operation system based on the adjustable conductance device, the gradient accumulation module comprises: m*n counters; the m*n counters form a counter matrix of m rows and n columns, and one end of the n counters in each row is connected to each other, and the other end of the m counters in each column is connected to each other.

[0028] In the neural network training operation system based on the adjustable conductance device, the noise generation module comprises: a voltage dividing unit, a filter unit, a fourth operational amplifier unit and a noise conversion unit; the voltage dividing unit, the filter unit, the fourth operational amplifier unit and the noise conversion unit are connected in sequence; the voltage dividing unit is used to divide the voltage of the power supply and output a divided voltage to the filter unit; the divided voltage contains thermal noise of the resistor; the filter unit filters the divided voltage and transmits the obtained noise voltage to the fourth operational amplifier unit; the fourth operational amplifier unit is used to amplify the noise voltage and transmit the amplified noise voltage to the noise conversion unit; the noise conversion unit is used to convert the amplified noise voltage into a noise current and transmit it to the first comparison module.

[0029] The first comparison module comprises a first resistor, a second resistor, a first operational amplifier, a second operational amplifier and a third operational amplifier; one end of the first resistor, an output end of the first operational amplifier and a positive input end of the third operational amplifier are connected; the other end of the first resistor is connected with the adjustable conductance module and a reverse input end of the first operational amplifier respectively; a positive input end of the first operational amplifier is grounded; one end of the second resistor, an output end of the second operational amplifier and a reverse input end of the third operational amplifier are connected; the other end of the second resistor is connected with the adjustable conductance module, the noise conversion unit and a reverse input end of the second operational amplifier respectively; and a positive input end of the second operational amplifier is grounded.

[0030] The sampling and holding module comprises a forward output unit and a derivative unit; the forward output unit and the derivative unit are connected with an output end of the third operational amplifier;

[0031] The forward output unit is configured to perform single sampling operation on a comparison signal of the first comparison module to obtain a forward output signal of the current network layer; and the derivative unit is configured to perform multiple sampling operation on the comparison signal and logic operation to obtain a derivative signal of the current network layer.

[0032] The forward output signal is transmitted to a first voltage conversion module of a next layer network; and the derivative signal is used for a product module of the current network layer.

[0033] The forward output unit comprises a first flip-flop and a first clock signal; a data input end of the first flip-flop is connected with an output end of the third operational amplifier; and the first clock signal is connected with a clock signal end of the first flip-flop.

[0034] The derivative unit comprises a second flip-flop, a third flip-flop, a logic gate and a second clock signal; a data input end of the second flip-flop is connected with an output end of the third operational amplifier; the second clock signal is connected with a clock input end of the second flip-flop and a clock input end of the third flip-flop respectively; an output end of the second flip-flop is connected with a data input end of the third flip-flop and a first input end of the logic gate respectively; the output end of the second flip-flop is connected with a second input end of the logic gate; and the logic gate performs logic NOT operation on a signal of the first input end and logic AND operation on a signal of the second input end.

[0035] The application discloses a neural network training operation method based on an adjustable conductance device.

[0036] During the forward propagation of information, the first voltage conversion module reads forward output signals in forward output units of a previous network layer, converts the forward output signals into input voltage signals, and transmits the input voltage signals to the adjustable conductance module.

[0037] The adjustable conductance module processes the input voltage signals and transmits first current signals obtained to the first comparison module.

[0038] The first comparison module compares the current sizes in the first current signals, and outputs comparison signals to the sample-and-hold module.

[0039] The sample-and-hold module performs single sampling operation on the comparison signals, and obtains forward output signals of the current network layer.

[0040] The sample-and-hold module performs multiple sampling operation and logical operation on the comparison signals, and obtains derivative signals of the current network layer.

[0041] The forward output signals of the current network layer are used as inputs of a first voltage conversion module of a next network layer, and the derivative signals of the current network layer are used for error back propagation.

[0042] The neural network training operation method based on the adjustable conductance device further comprises the following steps.

[0043] During the back propagation of errors, the product module multiplies the derivative signals of the current network layer and back output signals of the next network layer, and transmits a multiplication result to a second voltage conversion module.

[0044] The second voltage conversion module converts the multiplication result into back input voltage signals, and transmits the back input voltage signals to the adjustable conductance module.

[0045] The adjustable conductance module processes the back input voltage signals, and transmits second current signals obtained to a second comparison module.

[0046] The second comparison module compares the current sizes in the second current signals, and obtains back output signals of the current network layer.

[0047] The input of the product module of the current network layer is derived from the derivative signal of the current network layer and the reverse output signal of the next network layer; and the reverse output signal of the current network layer is used for the product module of the previous network layer.

[0048] The neural network training operation method based on the conductance adjustable device further comprises:

[0049] In the update process of the network weight, the gradient accumulation module calculates the gradient signal according to the forward output signal of the previous network layer and the product result of the product module in the current network layer, and accumulates the gradient signal;

[0050] The gradient accumulation module outputs the conductance adjustment instruction to the conductance adjustment module according to the accumulation result of the gradient signal;

[0051] The conductance adjustment module adjusts the conductance of the target unit in the adjustable conductance module according to the conductance adjustment instruction.

[0052] Compared with the prior art, the neural network training operation system and method based on the conductance adjustable device provided by the application, the system comprises: a first voltage conversion module for converting the forward output signal of the previous network layer into an input voltage signal; an adjustable conductance module for processing the input voltage signal and outputting a first current signal, and for processing a reverse input voltage signal and outputting a second current signal; a first comparison module for comparing the first current signal; a sample and hold module for sampling the comparison result and outputting the forward output signal and the derivative signal of the current network layer; a product module for multiplying the reverse error signal of the next network layer with the derivative signal; a second voltage conversion module for converting the multiplication result into a reverse input voltage signal; and a second comparison module for comparing the second current signal and outputting the reverse error signal of the current network layer. The information transmission between the network layers is in a binary form, which simplifies the complex operation of applying the input voltage and detecting the output current around the adjustable conductance array during the information forward propagation and error reverse propagation, and simplifies the operation circuit and process of the adjustable conductance array conductance adjustment during the network weight update process. The system and method save the calculation resources and reduce the power consumption. BRIEF DESCRIPTION OF DRAWINGS

[0053] Figure 1 A typical structure of a certain layer in a neural network and a schematic diagram of information forward propagation in the prior art are provided for the application;

[0054] Figure 2 An equivalent circuit structure diagram for completing vector matrix multiplication and activation function operation by using an adjustable conductance array is provided for the application;

[0055] Figure 3This is a simplified connection diagram of the adjustable conductance matrix during the forward propagation of information, provided by the present invention.

[0056] Figure 4 This is a simplified connection diagram of the adjustable conductance matrix during the back propagation of information, provided by the present invention.

[0057] Figure 5 This is a simplified diagram of the connection of the counter matrix during neural network training provided by the present invention;

[0058] Figure 6 This is a schematic diagram of a preferred embodiment of the neural network training operating system based on a conductance-tunable device provided by the present invention.

[0059] Figure 7 This is a schematic diagram illustrating the connection of an adjustable conductance matrix during the forward propagation of information, as provided by the present invention.

[0060] Figure 8 A schematic diagram of the clock signal of the sampling output flip-flop in a preferred embodiment of the neural network training operation method based on an adjustable conductivity device provided by the present invention;

[0061] Figure 9 This is a schematic diagram of the connection of the adjustable conductance matrix during the back propagation of information provided by the present invention.

[0062] Figure 10 This is a schematic diagram of the connection of the counter matrix during neural network training provided by the present invention;

[0063] Figure 11 A flowchart illustrating the gradient accumulation and weight update process in a preferred embodiment of the neural network training operation method based on a conductance-tunable device provided by the present invention.

[0064] Figure 12 This is a flowchart illustrating the preferred embodiment of the neural network training method based on a conductance-tunable device provided by the present invention, in which inference is performed in the output layer of the neural network through a voting method.

[0065] Figure 13 A flowchart illustrating the forward propagation process of information in a preferred embodiment of the neural network training operation method based on a conductance-tunable device provided by the present invention.

[0066] Figure 14 A flowchart illustrating the backpropagation process of error in a preferred embodiment of the neural network training operation method based on a conductance-tunable device provided by the present invention.

[0067] Figure 15 This is a flowchart illustrating the network weight update process in a preferred embodiment of the neural network training operation method based on a conductance-tunable device provided by the present invention.

[0068] Figure label:

[0069] 1: Neural network training operating system based on conductance-tunable devices; 2: Previous network layer; 3: This network layer; 4: Next network layer;

[0070] 205-1: Forward output unit of the previous network layer; 206: Product module of the previous network layer;

[0071] 301: First voltage conversion module; 302: Adjustable conductance module; 303: First comparison module; 304: Noise generation module; 305: Sample and hold module; 305-1: Forward output unit; 305-2: Derivative unit; 306: Product module; 307: Second voltage conversion module; 308: Second comparison module; 309: Gradient accumulation module; 310: Conductance adjustment module;

[0072] 401: First voltage conversion module of the next network layer; 408: Second comparison module of the next network layer;

[0073] R1: First resistor; R2: Second resistor; R3: Third resistor; R4: Fourth resistor; R5: Fifth resistor; P1: First operational amplifier; P2: Second operational amplifier; P3: Third operational amplifier; P4: Third operational amplifier; D1: First flip-flop; D2: Second flip-flop; D3: Third flip-flop; C1: First capacitor; U1: Logic gate; C: Counter; G: Adjustable conductance device; Q: MOS transistor. Detailed Implementation

[0074] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0075] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when an element is referred to as “connected” or “coupled” to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements present. Furthermore, “connected” or “coupled” as used herein may include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0076] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0077] To facilitate understanding of the embodiments of this application, the background technology involved in the embodiments of the present invention will be introduced first.

[0078] Figure 1 This diagram illustrates the typical structure and forward propagation of information in a layer of a neural network. It uses a network layer with m input nodes and n output nodes as an example. The input to the network layer, i.e., the information from the m input nodes, is represented by m numerical values ​​x1, x2, ..., xn. i ,…,x m They can be represented as vectors, such as X = [x1, ..., x2]. m The parameters of a network layer, i.e., the weights connecting the input and output nodes, are described using m×n numerical values ​​w. 11 ,w 12 ,…,w ij ,…,w mn They can be described in terms of their matrix form. To describe it. The input information of the output nodes of the network layer is represented by n values ​​y1, ..., y2. j ,…,y n They can also be represented by their vector form Y = [y1, ..., y2] n The input information of the output nodes of a network layer is determined by both the input node information and the parameters of the network layer. Their mathematical relationship can be described as follows:

[0079] Or Y = X·W, (2);

[0080] The vector-matrix multiplication operation in formula (2) is a computation that needs to be performed extensively in neural networks. In a traditional von Neumann computer architecture, performing the operation in formula (2) requires performing the multiplication operation on each element of the input vector and the element of the weight matrix according to the operation process described in formula (1), and then accumulating the product results one by one. Furthermore, the values ​​of all elements are described using high-precision floating-point numbers. The input information (y1,…,y) of the output nodes of the network layer... j ,…,y n The output (z1,…,z) of the network layer also needs to be obtained after applying an activation function. j ,…,z n), represented as:

[0081] z j =f(y j ),j=1,…,n, (3);

[0082] Here, f(·) is the activation function. The operation of the activation function also needs to be performed in high-precision floating-point calculation mode, which consumes certain computing resources.

[0083] A typical neural network consists of multiple layers of these single-layer networks, with the input of each layer derived from the output of the previous layer, and the output of each layer serving as the input of the next layer. The input of the first layer of a neural network is the information to be processed, while the output of the last layer is the final processing result. For example, in a typical image recognition application, the input of the first layer is the pixel information of the image, and the output of the last layer is the image recognition result.

[0084] The single-layer neural network described above is a basic building block for various forms of neural networks. For example, it can serve as a fully connected layer in a deep neural network, a convolutional kernel layer in a convolutional neural network, or a feedforward layer in a feedback neural network.

[0085] Figure 2 The equivalent circuit structure diagram for performing the vector matrix multiplication and activation function operations using an adjustable conductance array is shown below. First, an adjustable conductance array is used to replace the weight matrix of the neural network, i.e., the conductance (G) of each device in the array... ij ) and reference conductance (G ref The difference (G) ij -G ref ) represents the value of a weight element in the weight matrix (w) ij Furthermore, the interconnections of devices in the adjustable conductance array are arranged in a cross-array configuration: one end of the adjustable conductance device is connected to parallel horizontal wires, and the other end is connected to parallel vertical wires; there is an adjustable conductance device at each intersection of the horizontal and vertical wires. Secondly, the input to the network layer is converted into analog voltages (V1, V2, ..., V...) using a digital-to-analog converter (DAC). i ,…,V m ), and apply voltage to the input terminal of the adjustable conductance array (i.e. Figure 2 The horizontal conductor in the middle). Next, the output terminal of the adjustable conductivity array (i.e. Figure 2 The vertical conductor in the middle is grounded, and the output current (I1,…,I) is measured. j ,…,I n ,I refThe measurement and subsequent processing of the output current typically involve complex circuitry, such as transconductance amplifiers, sample-and-hold circuits, multiplexer modules, analog-to-digital converters (ADCs), and digital processing modules.

[0086] Therefore, using Ohm's law and Kirchhoff's current law, the output current of the adjustable conductance array can be obtained:

[0087]

[0088]

[0089] Subtracting formula (4) from formula (5), we get:

[0090]

[0091] Comparing formula (6) with formula (1), it can be found that the device conductance (G) in the adjustable conductance array ij -G ref The weights (w) of the corresponding network layer ij Input voltage (V) i ) corresponds to the input (x) of the network layer i ), output current (I j -I ref That is, the input (y) of the corresponding network layer output node. j This completes the vector matrix multiplication operation required for formulas (1) and (2). This operation is performed in the conductance array that stores the weights. The calculation of the current difference in formula (6) can be performed in the form of an analog circuit, or it can be performed in the digital processing module after analog-to-digital conversion.

[0092] Finally, the digital processing module performs the calculations required for the activation function described in formula (3) to complete the output of this network layer.

[0093] The adjustable conductivity devices in adjustable conductivity arrays can be implemented in various ways, such as resistive random access memory (RRAM), phase-change memory (PCM), ferroelectric memory, magnetic memory, floating-gate transistors (FTTTs), and electrolyte gate-controlled transistors (IGMTs). In specific implementations, adjustable conductivity devices are not limited to two-terminal devices; for example, three-terminal adjustable conductivity device units, such as 1T1R structured RRAMs or PCM cells with series selectors, can also be used to form adjustable conductivity arrays.

[0094] Since the conductance of a single device in an adjustable conductance array can only be positive, differential equivalent conductance is used in the above description to describe network weights that may have negative values. That is, the conductance of a single device minus the conductance of the reference device (G). ij -G ref ), to represent network weights (w) ij ). Figure 2 In this design, a column of adjustable conductivity devices with a fixed conductivity value (i.e., the reference column) is used. Equivalently, two adjustable conductivity devices could also be used. and The difference To represent a weight value (w) ij The array configuration of adjustable conductance and the design and operation mode of the peripheral circuit need to be adjusted accordingly.

[0095] In the above description, an analog-to-digital converter (ADC) is used to convert the output of this network layer into a digital signal. After the digital processing module completes functions such as activation functions, the signal is used as the input to the next layer. The output of the previous layer, which is also the input of this layer, is a numerical signal; therefore, an ADC is used in the input signal section of the peripheral circuit. Equivalently, analog circuits can also be used to sample the signal, perform the activation function calculation, and input the signal to the next layer. When using analog circuits to implement the above functions, the electrical signals at each stage need to maintain high precision.

[0096] The above is an introduction to the existing technology. However, while providing the basic hardware architecture for neural networks and efficient neural network inference, the existing technology has the following problems:

[0097] First, neural network training is typically conducted offline. This means that training is completed on a traditional computing platform, and then the trained weights are mapped and written into a hardware network based on conductance-tunable devices. Such neural networks can only accelerate the inference process; training still requires significant computational resources.

[0098] Secondly, the peripheral circuitry of the cross array is quite complex. To perform vector-matrix multiplication based on Ohm's law and Kirchhoff's current law, a precise voltage needs to be applied to one end of the cross array and the current needs to be precisely detected at the other end. This typically requires high-precision digital-to-analog converters, analog-to-digital converters, or other dedicated circuits for precisely controlling the input voltage and detecting the output current. These circuits are expensive to implement in integrated circuit chips and consume a lot of power during operation.

[0099] Finally, conductance-adjustable devices exhibit many non-ideal characteristics. These include a limited range of conductance values, a limited adjustable conductance state, non-linear current-voltage characteristics, non-linear conductance adjustment behavior, high conductance adjustment error, and high readout error. These non-ideal characteristics significantly impact the training effectiveness and inference accuracy of neural networks, whether trained offline or online.

[0100] To address the aforementioned technical problems, this invention provides a neural network training operating system and method based on a conductance-tunable device. The neural network training operation method based on the conductance-tunable device can be applied to forward propagation of information, backward propagation of errors, and online weight adjustment in neural networks, supporting high-accuracy online training of neural networks and high-accuracy inference after the neural network training is completed.

[0101] like Figure 3 As shown, during the forward propagation of information, this invention utilizes the intrinsic noise of the adjustable conductance array or an externally applied noise source, combined with a current or voltage comparator circuit and a signal sampling circuit, to transform the output of a typical network layer into a randomized, binary, digitized signal (with values ​​of "0" or "1"). This binary, digitized output signal serves as the input to the next network layer, thus enabling information to propagate forward layer by layer. The input to this network layer (the current network layer) is the binary, digitized signal output from the previous network layer. Therefore, the analog voltage input of the adjustable conductance array only requires two signals: zero voltage and non-zero voltage, which can be accomplished through a voltage converter (level shifter). Simultaneously, this invention obtains a randomized, binary digital signal (with values ​​of "0" or "1") of the derivative of the activation function by performing multiple independent sampling processes and logical processing on the output of the adjustable conductance array.

[0102] like Figure 4 As shown, in the backpropagation process of the neural network error, this invention reuses the aforementioned adjustable conductance array for reverse information processing. The binary symbolic error signal (with values ​​"-1" or "1") backpropagated from the previous network layer is multiplied by the random binary signal of the activation function derivative (with values ​​"0" or "1") to obtain ternary error information (with values ​​"-1", "0", or "1"). When the ternary, digitized error information (with values ​​"-1", "0", or "1") is input to the adjustable conductance array, only three analog signals—negative voltage, zero voltage, and positive voltage—are needed, which can also be accomplished by a voltage converter (LevelShifter) circuit. Combined with a current comparator or voltage comparator circuit, the reverse output of the adjustable conductance array is transformed into binary symbolic, digitized error information (with values ​​"-1" or "1"). This binary symbolic, digitized error information is then used as the input to the previous network layer; thus, the error information propagates backward layer by layer.

[0103] like Figure 5 As shown, during weight adjustment, i.e., neural network training, this invention uses an independent counter array to accumulate weight gradient information. When the accumulated weight information reaches a certain threshold, the conductance of the devices in the adjustable conductance array is adjusted to complete the weight update. This scheme enables weight adjustment to achieve reliable and accurate training results, meaning that even with the prevalence of non-ideal characteristics in adjustable conductance devices, the accuracy of the inference results can still reliably improve with increasing training cycles.

[0104] The following describes the design scheme of a neural network training operating system based on a conductance-tunable device through specific exemplary embodiments. It should be noted that the following embodiments are only used to explain the technical solution of the invention and are not intended to limit it specifically:

[0105] Please see Figure 6 The present invention provides a neural network training operating system 1 based on a conductance-adjustable device, which consists of multiple interconnected network layers. In this embodiment, taking the previous network layer 2, the current network layer 3 and the next network layer 4 as examples, the current network layer 3 in the neural network system of the conductance-adjustable device includes: a first voltage conversion module 301, an adjustable conductance module 302, a first comparison module 303, a noise generation module 304, a sample and hold module 305, a product module 306, a second voltage conversion module 307, a second comparison module 308, a gradient accumulation module 309 and a conductance adjustment module 310.

[0106] The first voltage conversion module 301 is connected to the positive output unit 205-1 of the previous network layer 2; the first voltage conversion module 301, the adjustable conductivity module 302, the first comparison module 303, and the sample and hold module 305 are connected in sequence; the first comparison module 303 is also connected to the noise generation module 304.

[0107] The first voltage conversion module 301 is used to read the positive output signal from the positive output unit 205-1 in the previous network layer 2, convert it into an input voltage signal, and transmit it to the adjustable conductance module 302; the adjustable conductance module 302 is used to process the input voltage signal conversion, output a first current signal, and transmit it to the first comparison module 303; the noise generation module 304 is used to generate current and transmit the noise current to the first comparison module 303; the first comparison module 303 is used to combine the first current signal and the noise current, perform voltage conversion and comparison operations sequentially, and transmit the obtained comparison result (comparison signal) to the sample-and-hold module 305; the positive output unit 305-1 in the sample-and-hold module 305 is used to sample the comparison signal to obtain the positive output signal of the current network layer; the derivative unit 305-2 in the sample-and-hold module 305 is used to sample and logically process the comparison signal multiple times to obtain the derivative signal of the current network layer.

[0108] The conductivity adjustment module 310 is a cross array composed of electronic device units with adjustable conductivity. The input voltage signal and the first current signal of the adjustable conductivity module 302 are analog electrical signals; the positive output signal of the upper network layer 2, the comparison signal of the first comparison module, the positive output signal of this network layer 3, and the derivative signal of this network layer 3 are all binarized digital signals.

[0109] Since the first current signal is superimposed with noise current, the output of the first comparison module 303 is a randomly binarized signal; the positive output signal and the derivative signal are the results of sampling by the first comparison module, so they randomly take the value of "0" or "1"; however, when there is sufficiently large intrinsic noise in the adjustable conductance module 302 or the first comparison module 303, the noise current module 304 may not be necessary.

[0110] Furthermore, the product module 306, the second voltage conversion module 307, the adjustable conductivity module 302, and the second comparison module 308 are connected in sequence.

[0111] The product module 306 is connected to the derivative unit 305-2 of the current network layer and the second comparison module 408 of the next network layer. It is used to multiply the derivative signal of the current network layer with the inverse output signal of the next network layer and transmit the multiplication result (combined signal) to the second voltage conversion module 307. The second voltage conversion module 307 is used to convert the multiplication result into an inverse input voltage signal and transmit it to the adjustable conductance module 302. The adjustable conductance module 302 is also used to process the inverse input voltage signal, output a second current signal, and transmit it to the second comparison module 308. The second comparison module 308 is used to compare the current magnitude in the second current signal to obtain the inverse output signal of the current network layer. The second comparison module 308 is also used to transmit the inverse output signal to the product module 206 in the previous network layer 2.

[0112] The reverse input voltage signal and the second current signal of the adjustable conductance module 302 are analog electrical signals; the reverse output signal of the next network layer and the reverse output signal of this network layer are binary symbolized error signals (with values ​​of "-1" or "1"); the multiplication result of the product module 306 is a ternary error signal (with values ​​of "-1", "0" or "1").

[0113] Furthermore, the gradient accumulation module 309 is simultaneously connected to the positive output unit 205-1 of the previous network layer, as well as to the first voltage conversion module 301, the product module 306, and the second voltage conversion module 307 of this network layer. The gradient accumulation module 309 is used to calculate the gradient signal based on the product result of the positive output signal of the previous network layer and the product module, and to accumulate it. The gradient accumulation module 309 is also used to output a conductivity adjustment command to the conductivity adjustment module 310 based on the accumulated result of the gradient signal. The conductivity adjustment module 310 is used to adjust the conductivity of the target unit in the adjustable conductivity module 302 according to the conductivity adjustment command. The gradient signal is a three-valued symbolic signal (with values ​​of "-1", "0", or "1"). The accumulated result of the gradient signal is a signed integer. The conductivity adjustment command includes the position information of the conductivity unit to be adjusted, the direction of conductivity adjustment, and the amplitude.

[0114] Specifically, the neural network training operating system 1 based on a conductivity-adjustable device proposed in this invention can be applied to the forward propagation of information (including the training and inference processes), backward propagation of errors, and online weight adjustment in neural networks. It supports high-accuracy online training of neural networks and high-accuracy inference after training. The implementation process is as follows:

[0115] During the forward propagation process of information from the input layer to the output layer, in a typical network layer (this network layer) 3, the first voltage conversion module 301, the adjustable conductivity module 302, the first comparison module 303, and the sample-and-hold module 305 are connected in sequence; the first comparison module 303 is also connected to the noise generation module 304.

[0116] First, the first voltage conversion module 301 reads the positive output signal (binarized positive output signal, randomly taking the value "0" or "1") of the positive output unit 205-1 in the previous network layer 2, and converts the positive output signal of the previous network layer into an input voltage signal, thereby converting the digital signal (positive output signal) into a read voltage (input voltage signal). Here, a digital signal of "0" corresponds to zero voltage, and a digital signal of "1" corresponds to a read voltage V. R Read voltage V R It should be small enough not to cause changes in the state of the adjustable conductance device (the unit device in the adjustable conductance module 302). For example, for a typical resistive switching memory device, V can be used. R =0.1V reading voltage (V can also be used) R = -0.1V reading voltage, subsequent circuits need to be adjusted accordingly). The first voltage conversion module 301 simultaneously transmits the first voltage signal to the adjustable conductivity module 302.

[0117] Then, the adjustable conductivity module 302 processes the input voltage signal and outputs a first current signal (including I0). j and I ref The noise current module 304 transmits the generated noise current signal to the first comparison module 303. The first comparison module 303 then performs voltage conversion and comparison operations on the first current signal (superimposed with the noise current) to obtain a randomly fluctuating but only low or high level (representing "0" or "1") digital signal (comparison signal), and transmits the comparison signal to the sample-and-hold module 305. Finally, the positive output unit 305-1 in the sample-and-hold module 305 samples the comparison signal to obtain the positive output signal of the current network layer (also a binarized signal, randomly taking the value "0" or "1"); the derivative unit 305-2 in the sample-and-hold module 305 samples and performs logical processing on the comparison signal to obtain the derivative signal (also a binarized signal, randomly taking the value "0" or "1").

[0118] During the forward propagation of information in the neural network system, the current network layer outputs a randomized binary forward output signal (state "0" or "1"), which serves as the input to the next layer. The input to the adjustable conductance array corresponding to each neural network layer only requires zero voltage and a fixed read voltage signal, eliminating the need for high-precision digital-to-analog converters or other forms of high-precision input voltage adjustment modules. Furthermore, the output current of the adjustable conductance array (the adjustable conductance module 302) corresponding to each neural network layer is only used as the input to the comparison module; the precise value of the current does not need to be read, and high-precision analog-to-digital converters or other forms of high-precision current reading modules are not required, thus effectively saving costs.

[0119] Furthermore, the randomness of the forward output signal obtained by random binarization includes the functionality of the activation function, eliminating the need for further processing by a specific activation function as in traditional neural networks. Simultaneously, the hardware circuitry obtains the binarized signal of the activation function's derivative (in states "0" or "1") in situ, eliminating the need for additional dedicated circuitry to perform derivative calculations on the activation function, thus further reducing design costs.

[0120] Furthermore, in the error backpropagation process where error information propagates backward from the output layer to the input layer, in a typical network layer 3, the product module 306, the second voltage conversion module 307, the adjustable conductance module 302, and the second comparison module 308 are connected in sequence; the product module 306 is also connected to the derivative unit 305-2 of this network layer and the second comparison module 408 of the next network layer.

[0121] The product module 306 multiplies the derivative signal of the current network layer with the inverse output signal of the next network layer, and transmits the resulting product (combined signal) to the second voltage conversion module 307. The second voltage conversion module 307 converts the combined signal into an inverse input voltage signal and transmits it to the adjustable conductance module 302. The adjustable conductance module 302 processes the inverse input voltage signal, outputs a second current signal, and transmits it to the second comparison module 308. The second comparison module 308 performs a comparison operation on the second current signal to obtain the inverse output signal of the current network layer. The inverse output signal uses "-1" or "1" to represent two possible comparison results and is a binary symbolized error signal.

[0122] In this invention, during the backpropagation of errors, the current network layer output is a binary symbolized backpropagation output signal (state "-1" or "1"). Multiplying this signal by the binary signal of the activation function derivative (state "0" or "1") yields a ternary error signal (state "-1", "0", or "1"), which is then used as the input to the second voltage conversion module 307. Therefore, the input to the adjustable conductance array (the adjustable conductance module 302) corresponding to each neural network layer only requires negative voltage signals, zero voltage signals, and positive voltage signals, eliminating the need for high-precision digital-to-analog converters or other forms of high-precision input voltage adjustment modules. Furthermore, since the output state of the adjustable conductance array corresponding to each neural network layer is "-1" or "1", it can be described using zero-level and high-level signals, or negative and positive voltage signals, further eliminating the need for high-precision analog-to-digital converters or other forms of high-precision current reading modules, thus effectively saving costs.

[0123] Furthermore, during neural network weight adjustment, in a typical network layer 3: the gradient accumulation module 309 is simultaneously connected to the positive output unit 205-1 of the previous network layer and the product module 306 of this network layer; the gradient accumulation module 309 is used to calculate the gradient signal based on the product result of the positive output signal of the previous network layer and the product module, and accumulate it; the gradient accumulation module 309 is also used to output a conductivity adjustment command to the conductivity adjustment module 310 based on the accumulated result of the gradient signal; the conductivity adjustment module 310 is used to adjust the conductivity of the target unit in the adjustable conductivity module 302 according to the conductivity adjustment command.

[0124] Specifically, the gradient accumulation module 309 accumulates the gradient signal. When the accumulated weight gradient information reaches a certain threshold, it sends an instruction to the conductivity adjustment module 310 to adjust the weight (i.e. conductivity value) of the corresponding device in the adjustable conductivity array, for example, positive conductivity adjustment or negative conductivity adjustment.

[0125] In this invention, due to the aforementioned information binarization and symbolization processing, the output error function of the neural network, relative to the gradient information of the weight changes, has a value of only -1, 0, or 1. Therefore, a low-cost scheme such as a counter array (the gradient accumulation module 309) can be used to accumulate the weight gradient information. Once the accumulated weight gradient information reaches a certain threshold, the weights (i.e., conductance values) of the corresponding devices in the adjustable conductance array are adjusted. This significantly reduces the number of write operations to the adjustable conductance device G.

[0126] Furthermore, the adjustment of the conductivity values ​​of devices in the array can be performed using either a closed-loop write and verify method or a blind write method. The blind write method only requires sending write pulses for forward or reverse conductivity adjustment, without requiring read verification operations, and does not require precise control of the absolute value of the conductivity adjustment. This training scheme significantly reduces the requirements for the ideal write characteristics (such as linear conductivity change, low write ripple, etc.) of the adjustable conductivity device G.

[0127] Furthermore, this invention proposes two optimization schemes for neural network inference. Scheme 1: In the aforementioned forward propagation scheme, the influence of noise is removed, i.e., the noise current generation module is not added, transforming the forward output signal of the network layer into a deterministic binary signal. This binary output signal is then used as the input to the next layer, allowing information to propagate forward layer by layer, completing the inference process. Scheme 2: The forward propagation process of randomly binary information is repeated layer by layer, and the final inference result is determined by voting at the output layer of the neural network.

[0128] In the neural network training operating system 1 based on a conductance-tunable device proposed in this invention, only the hardware portion for forward propagation is used for neural network inference. Directly employing the randomized binarized forward propagation used in neural network training for inference will cause a certain degree of decrease in inference accuracy. Using a deterministic binarized forward propagation scheme for neural network inference will effectively reduce inference latency and achieve moderate inference accuracy. Furthermore, using a repetitive randomized binarized forward propagation scheme, the inference accuracy of the neural network gradually increases with the number of forward propagations, achieving a balance between inference latency and inference accuracy during the inference process.

[0129] The following description, using more detailed circuit diagrams and flowcharts, further illustrates the design scheme of the neural network training operating system based on conductance-adjustable devices. It should be noted that the following embodiments are only used to explain the technical solution of the invention and do not constitute a specific limitation:

[0130] First, assuming that the typical network layer 3 has m input nodes and n output nodes, the adjustable conductivity array contains (m+1)*(n+1)-1 adjustable conductivity devices; wherein, the conductivity of the m*n adjustable conductivity devices is continuously adjusted and updated during neural network training; the conductivity of the (m+n) adjustable conductivity devices is set to a fixed conductivity G during neural network initialization. ref Both m and n are positive integers.

[0131] In the adjustable conductivity array, m*(n+1) adjustable conductivity devices form an adjustable conductivity matrix with m rows and (n+1) columns. This matrix is ​​used during the forward propagation of information to process the forward input voltage signal and output the first current signal. (m+1)*n adjustable conductivity devices form an adjustable conductivity matrix with (m+1) rows and n columns. This matrix is ​​used during the backward propagation of error to process the reverse input voltage signal and output the second current signal.

[0132] See below. Figure 6 , Figure 7 , Figure 8 This explains the positive transmission process of information.

[0133] Please see Figure 7 A voltage conversion module 301 is composed of m first voltage converters; a first comparison module 303 is composed of n first comparators; a noise generation module 304 is composed of n noise current generation circuits; and a sample-and-hold module 305 is composed of n positive output units and n derivative units.

[0134] Each first voltage converter in voltage conversion module 301 is connected to the corresponding positive output unit in sample-and-hold module 205-1 of the previous network layer.

[0135] The adjustable conductivity module 302 contains m*(n+1) adjustable conductivity devices G participating in the forward information propagation process. These m*(n+1) adjustable conductivity devices G form an m-row by (n+1)-column adjustable conductivity matrix. In each of the m rows, one end of each of the (n+1) adjustable conductivity devices G is connected, and in each of the (n+1) columns, the other end of each of the m adjustable conductivity devices G is connected. The m adjustable conductivity devices G in the (n+1)th column belong to the reference group and are used to provide the reference current I in the first current signal. ref The m adjustable conductivity devices G in columns 1 to n belong to the ordinary experimental group and are used to provide the current I in the first current signal. j , where j is any number between 1 and n. Furthermore, all vertical lines serve as outputs of the adjustable conductance array, connected to the input of the first comparator in the first comparison module 303, while all horizontal lines serve as inputs of the adjustable conductance array, connected to the output of the first voltage converter in the first voltage conversion module 301.

[0136] Furthermore, please continue reading Figure 7The noise generation module 304 includes n noise current generation circuits, each comprising: a voltage divider unit (R3, R4), a filter unit (C1), an amplifier unit (P4), and a noise conversion unit (R5). The voltage divider unit, filter unit, amplifier unit, and noise conversion unit are connected sequentially. The voltage divider unit divides the power supply voltage and outputs the divided voltage to the filter unit. The divided voltage includes the thermal noise of the resistors. The filter unit filters the divided voltage, removing the DC component and leaving only a small noise voltage. The filter unit transmits the noise voltage to the amplifier unit. The amplifier unit amplifies the noise voltage and transmits the amplified noise voltage to the noise conversion unit. The noise conversion unit converts the amplified noise voltage into a noise current and transmits it to the first comparator in the first comparison module 303. The introduction of the noise current generation circuit transforms the output of this network layer into a randomized binary signal.

[0137] Further reading Figure 7 The first comparator includes: a first resistor R1, a second resistor R2, a first operational amplifier P1, a second operational amplifier P2, and a third operational amplifier P3; one end of the first resistor R1 is connected to the output terminal of the first operational amplifier P1 and the positive input terminal of the third operational amplifier P3, and the other end of the first resistor R1 is connected to the adjustable conductivity module 200 and the inverting input terminal of the first operational amplifier P1, and the positive input terminal of the first operational amplifier P1 is grounded; one end of the second resistor R2 is connected to the output terminal of the second operational amplifier P2 and the inverting input terminal of the third operational amplifier P3, and the other end of the second resistor R2 is connected to the adjustable conductivity module, the noise control unit, and the inverting input terminal of the second operational amplifier P2, and the positive input terminal of the second operational amplifier P2 is grounded.

[0138] Specifically, in this invention, n first comparators form a first comparison module 303, wherein each of the n first comparators is connected to a corresponding vertical line in the first n columns, and each first comparator is also connected to a vertical line in the (n+1)th column. At this time, each vertical line from the 1st to the nth column is connected to the other end of the second resistor R2 in the n first comparators, the noise control unit, and the inverting input of the second operational amplifier P2, respectively. The vertical lines in the (n+1)th column are connected to the other end of the first resistor R1 in the n first comparators and the inverting input of the first operational amplifier P1, respectively.

[0139] Furthermore, the sample-and-hold module 305 includes: a positive output unit 305-1 and a derivative unit; the positive output unit and the derivative unit are respectively connected to the output terminal of the third operational amplifier P3; the positive output unit is used to perform a single sampling operation on the comparison signal output by the first comparator to obtain the positive output signal of the current network layer; the derivative unit is used to perform two sampling operations on the comparison signal and perform logical operations to obtain the derivative signal of the current network.

[0140] Furthermore, the positive output unit 305-1 of the sample-and-hold module 305 includes: a first flip-flop D1 and a first clock signal (clk_o). l The data input terminal of the first flip-flop D1 is connected to the output terminal of the first flip-flop D1 and the output terminal of the third operational amplifier P3, respectively; the first clock signal is connected to the clock signal terminal of the first flip-flop D1.

[0141] Furthermore, the derivative unit 305-2 of the sample-and-hold module 305 includes: a second flip-flop D2, a third flip-flop D3, a logic gate U1, and a second clock signal (clk_d). l The data input terminal of the second flip-flop D2 is also connected to the output terminal of the third operational amplifier P3. The second clock signal is connected to the clock input terminal of the second flip-flop D2 and the clock input terminal of the third flip-flop D3. The output terminal of the second flip-flop D2 is connected to the data input terminal of the third flip-flop D3 and the first input terminal of the logic gate U1. The output terminal of the third flip-flop D3 is connected to the second input terminal of the logic gate U1.

[0142] Specifically, the sample-and-hold module 305 of this invention consists of n positive output units and n derivative units. Each of the n positive output units 305-1 is connected to one of the n first comparators, and each of the n derivative units 305-2 is connected to one of the n first comparators.

[0143] During the forward propagation of information, the workflow of a network layer in a neural network system with adjustable conductivity is as follows:

[0144] First, the positive output signal (a random binary signal with values ​​of "0" or "1") from the previous network layer is used as the input signal for this network layer. Then, a voltage converter (first voltage conversion module 301) converts the digital signal in the flip-flop of the positive output unit of the previous network layer into a read voltage (first voltage signal), which is applied to the input terminal (i.e., the horizontal conductor) of the adjustable conductance array. A digital signal of "0" corresponds to zero voltage, and a digital signal of "1" corresponds to a read voltage V. RHere we need to read the voltage V. R It should be small enough not to cause changes in the state of electrically adjustable conductance devices. For example, for typical resistive random access memory devices, V can be used. R =0.1V reading voltage (V can also be used) R If the reading voltage is -0.1V, then the subsequent circuitry needs to be adjusted accordingly.

[0145] The output terminal (i.e., the vertical wire) of the adjustable conductance array (adjustable conductance module 302) is connected to the inverting input terminal of the transconductance amplifier. The non-inverting input terminal of the transconductance amplifier is grounded, and the inverting input terminal is virtually grounded. Thus, the current I in the ordinary columns (the first n vertical lines) of the adjustable conductance array... j The current I of the reference column (the vertical line of the (n+1)th column) ref They are respectively represented as as well as Simultaneously, a noise current I is applied to the output of the adjustable conductivity array. noise The combined current is obtained. The noise current can be generated in various forms. Figure 7 The illustration shows a noise current generated by amplifying the thermal noise of the resistor. However, no noise current needs to be applied to the output of the reference column on the adjustable conductance array.

[0146] Then, the transconductance amplifier converts the current into a voltage ( and Among them, R T The value of the feedback resistor of the transconductance amplifier (both the first resistor R1 and the second resistor R2 are feedback resistors) is then compared with the voltage corresponding to the ordinary column and the reference column of the adjustable conductance using a voltage comparator (the third operational amplifier P3). and The comparison is performed. The first comparator 300 consists of a transconductance amplifier and a voltage comparator. The comparator outputs a digital signal (comparison signal) that is only low or high (representing "0" or "1"). Due to the presence of noise current, the comparator output fluctuates randomly.

[0147] Secondly, the output of the voltage comparator is sampled and held at the rising edge of the clock using a flip-flop (first flip-flop D3), and the result is then used. As the output of this network layer (superscript 'l' indicates this layer), it outputs the positive output signal of the current network layer and serves as the input of the next network layer (layer 1+1). In the next two clock cycles, an additional flip-flop circuit (composed of the second flip-flop D2 and the third flip-flop D3) and logic circuit (logic gate U1) are used to sample, process, and hold the result of the voltage comparator (the third operational amplifier P3). The output result serves as the derivative information of the activation function, i.e., the derivative signal of the current network layer, which is used in the subsequent error backpropagation process. Figure 8 Shown in Figure 7 In the circuit structure, each module coordinates to complete the aforementioned information input, sampling output, and trigger clock signals, where clk_o l The first clock signal; clk_d l This is the second clock signal; clk_o l-1 This is the first clock signal of the previous network layer.

[0148] The following is an analysis of the effects of the above-mentioned positive information dissemination operations:

[0149] Assume the noise current follows an expectation of 0 and a variance of . The Gaussian distribution, i.e. So Figure 7 The probability that the digital signal output by the voltage comparator (P3) is high (i.e., the probability that the positive output of the network layer is "1") is:

[0150]

[0151] This represents the noise current I. noise Less than (I) j -I ref The cumulative probability of ). Furthermore, based on the cumulative probability distribution of the Gaussian distribution, equation (7) can be transformed to obtain:

[0152]

[0153] Where erf(·) is the error function. Formula (8) is approximately the Logistic activation function (a type of sigmoid function, which is a commonly used nonlinear activation function in BP neural networks) in neural networks, namely:

[0154]

[0155] in,

[0156] Finally, in the derivative sampling circuit, the signal described by formula (8) or formula (9) is sampled twice independently using the second flip-flop D2 and the third flip-flop D3. The result of one of the samples is then subjected to a logical NOT operation by the logic gate U1 and then subjected to a logical AND operation with the result of the other sample.

[0157] Therefore, the derivative information (the derivative signal of the current network layer) can be expressed as:

[0158]

[0159] in, and They represent respectively to The results of one independent sampling and another independent sampling. Because, and The value can only be "0" or "1". The value of can only be "0" or "1", so the derivative signal of the current network layer The probability of taking the value "1" is:

[0160]

[0161] Therefore, it can be seen from formulas (9) and (11) that, compared with traditional neural networks that use the Logistic activation function, the network layer output and derivative information proposed in this invention are binarized, but their probability of being "1" follows the form of the Logistic function and the derivative of the Logistic function.

[0162] The activation function embodied in formula (9) is the result of the combined effect of the circuit structure and the probability density of the noise current. The derivative operation of the activation function embodied in formula (10) is the result of the combined effect of the sampling circuit and the logic circuit. In practical applications, the output of the network layer (the positive output signal of the current network layer) The output of derivative information (the derivative signal of the current network layer). Only one result is needed; there is no need to continuously sample to obtain the probability that they are "1".

[0163] Among them, the output of the network layer A single sampling is required using a flip-flop (first flip-flop D1) to output the derivative information. Two sampling operations are required using a flip-flop circuit (second flip-flop D2 and third flip-flop D3). These three samplings must be performed independently. Independent sampling will cause the derivative information output to always be "0" or significantly reduce the subsequent neural network training performance. In this example, the three independent samplings are achieved by using flip-flops at different clock cycles (e.g., ...).Figure 8 (As shown) Completed on the above.

[0164] in addition, Figure 7 The randomness of the binarized output information is achieved by applying an external noise current. Equivalently, the randomness of the output can also be achieved using the intrinsic noise in the circuit. For example, thermal noise and 1 / f noise of adjustable conductance array devices, noise of transconductance amplifier circuits, or noise of comparators can all serve as sources of output randomness. The relative magnitude of the noise can be adjusted by changing the signal-to-noise ratio and the bandwidth of each module in the circuit.

[0165] See below. Figure 6 , Figure 9 The backpropagation process of error information is explained below:

[0166] Among them, such as Figure 9 As shown, the product module 306 includes: n MOS transistors Q; the source (or drain) of each transistor is connected to the inverted output signal of the next network layer, the gate of each transistor is connected to the derivative signal of the current network layer, and the drain (or source) of each transistor is connected to the second voltage conversion module 307.

[0167] Specifically, during the reverse propagation of the signal, the product module 306, the second voltage conversion module 307, the adjustable conductance module 302, and the second comparison module 308 are connected sequentially. The signal is then transmitted from the second comparison module 308 to the product module of the upper network layer and output, thereby completing the reverse propagation process of the signal.

[0168] First, the product module 306 converts the derivative signal of the current network layer (a binarized signal, randomly taking "0" or "1") to correspond to... Figure 9 In The reverse output signal of the next network layer (a binary symbolized error signal, with a value of "-1" or "1") corresponds to... Figure 9 In Multiply by the given signals and then combine them to obtain the combined signal (ternary error signal, with values ​​of "-1", "0" or "1", corresponding to...). Figure 9 In The combined signal is transmitted to the second voltage conversion module 307. Then, the second voltage conversion module 307 converts the combined signal into a second voltage signal (corresponding to...). Figure 9 The reading voltage V R After that, it is transmitted to the adjustable conductivity module 302; the adjustable conductivity module 302 then converts the second voltage signal into a second current signal (corresponding to...). Figure 9 I in i and I refAfter that, the signal is transmitted to the second comparison module 308. Finally, the second comparison module 308 performs voltage conversion and comparison operations on the second current signal in sequence to obtain the inverse output signal of the current network layer (a binary symbolized error signal with a value of "-1" or "1").

[0169] The two values ​​of the binary symbolized signal can be represented by negative and positive voltage signals, respectively; the three values ​​of the ternary error signal can be represented by negative, zero, and positive voltage signals, respectively. A voltage converter (the second voltage conversion module 307) is used to convert the ternary error signal into an analog read voltage signal, which is then applied to the input terminal (i.e., the vertical conductor) of the adjustable conductivity array. For example, the ternary error with values ​​of -1, 0, or 1 can correspond to the read voltage V, respectively. R 0V and -V R Furthermore, the voltage V is read. R It should be small enough not to cause changes in the state of the adjustable conductance device G. For example, for typical resistive switching memory devices, V can be used. R =0.1V reading voltage (V can also be used) R If the read voltage is -0.1V, then the input connection of the subsequent comparator circuit needs to be adjusted accordingly.

[0170] Furthermore, at the output of the adjustable conductance array (i.e., on the horizontal conductor), a transconductance amplifier virtually grounds the output and converts the output current into a voltage. A voltage comparator is then used to obtain the backpropagation result of the error. The output of the voltage comparator should be a binary, symbolic error signal, taking the value "-1" or "1", which can be represented by negative and positive voltage signals respectively. The symbolic error output then serves as the input for the backpropagation error of the previous layer network.

[0171] in, Figure 9 The completed functions can be represented by formulas (12) and (13):

[0172]

[0173]

[0174] Among them, the function sign(·) is the sign function.

[0175] See below. Figure 5 , Figure 6 , Figure 10 , Figure 11 The gradient update (network weight update) process of neural networks will be further explained:

[0176] Furthermore, such as Figure 5 andFigure 10 As shown, the gradient accumulation module 309 includes: m*n counters C; a counter array consisting of m rows and n columns composed of m*n counters C, with one end of n counters C connected to the line in each row and the other end of m counters C connected to the line in each column.

[0177] All vertical and horizontal lines serve as two input terminals of the counter array. The horizontal line is connected to the positive output signal 205-1 of the previous network layer, and the vertical line is connected to the merging signal (ternary error signal) of the product module 306.

[0178] Figure 10 The circuit structure diagram shows the gradient accumulation and weight update process during neural network training. Figure 11 This shows a flowchart of the gradient accumulation and weight update process, where N is the number of training samples.

[0179] When training a neural network, the first step is to obtain the randomized binary forward input information (the forward output signal of the previous network layer) for each layer, based on the aforementioned forward propagation and backward propagation methods. and ternary error information Here, we will only use the weight adjustment process of the i-th row and j-th column in a single layer as an example. Randomized binarization of positive input information and ternary error information Multiplication yields the gradient information of the overall output error of the neural network relative to the weights, i.e. Since this gradient information is also ternary, meaning it can only take the values ​​"-1", "0", or "1", a signed counter unit (counter array) can be used to accumulate this gradient information, i.e.:

[0180]

[0181] Then, the loop can begin with the next training sample, continuously accumulating gradient information (C). ij Simultaneously, this accumulated gradient information (C) is periodically monitored. ij Does it exceed a threshold (C)? th or below a negative threshold (-C) th If the accumulated gradient information exceeds the threshold C. th Then subtract the threshold C from the counter. ij ←C ij -C th It then sends a negative conductance adjustment command (conductance adjustment command) to the conductance adjustment circuit in the conductance adjustment module 310. However, if the accumulated gradient information is below the negative threshold (-C)... thIf the threshold C is added to the counter, then... ij ←C ij +C th It then sends a positive conductance adjustment command to the conductance adjustment circuit in the conductance adjustment module 310. The conductance adjustment circuit then selects the device G whose conductance needs to be adjusted. ij According to the conductance adjustment command, its conductance is increased or decreased by G. ij =G ij +ΔG, where ΔG (which can be positive or negative) is the magnitude of the change in conductance. The threshold C... th It is a positive integer.

[0182] Secondly, the aforementioned conductance adjustment commands can be executed using either a coarse blind write method or a precise cyclic read-write method. Blind writing refers to sending a single, fixed write pulse to increase or decrease the conductance upon receiving the conductance adjustment command. Depending on the implementation of the adjustable conductance device G, the form of the write pulse and the port on which it is applied may differ. However, a consistent write pulse is used for all positive conductance adjustment commands, and also for all negative conductance adjustment commands. The circuit structure and execution flow of the blind write method are relatively simple, but due to the non-ideal characteristics of the adjustable conductance device G, each conductance adjustment will exhibit many nonlinear and fluctuating features.

[0183] The cyclic read / write method requires first reading the current conductance value, then setting a target conductance value ΔG based on the desired adjustment, and finally achieving the target value by continuously increasing and decreasing the conductance in a cyclical manner. While this method ensures that the conductance change ΔG is a consistent and accurate value each time the conductance is adjusted, a single conductance adjustment requires sending several or even hundreds of write pulses and frequent read verification processes. This results in a complex circuit structure, high energy consumption, and significant latency.

[0184] However, practical experience has shown that when the gradient counter is set to a reasonable threshold, the non-ideal characteristics of the adjustable conductance have a relatively small impact on the training effect of the neural network.

[0185] Although the above counter C ij The most direct way is to use a digital counter circuit. However, it can also be implemented in many other ways. For example, it can be implemented by charging and discharging a capacitor: charging a certain amount of charge into the capacitor represents an increase in the accumulated gradient, and releasing a certain amount of charge from the capacitor represents a decrease in the accumulated gradient. By detecting the magnitude of the capacitor voltage, it can be determined whether the accumulated gradient information has reached or fallen below a certain threshold.

[0186] Finally, the reasoning in a neural network only involves the forward propagation of information; therefore, the circuit described above that achieves the forward propagation of information ( Figure 7This can be directly used to complete the inference of a neural network. The derivative unit is no longer needed. However, due to the presence of noise current and randomness, the output of each layer of the neural network has randomness. This randomness is necessary during neural network training. However, during inference, the randomness accumulated layer by layer reduces the accuracy of inference.

[0187] Therefore, two technical solutions can be used to restore or improve the accuracy of reasoning:

[0188] Option 1: In the above information forward propagation scheme, reduce or eliminate the impact of noise (i.e., remove) Figure 7 The noise current generation circuit in the neural network converts the output of the adjustable conductance array of each layer into a deterministic binary, digitized signal. This binary, digitized output signal serves as the input to the next layer, thus enabling information to propagate forward layer by layer and complete the reasoning process.

[0189] Option 2: Repeat the information propagation process layer by layer in the above forward propagation scheme multiple times. The final inference result is determined by voting at the output layer of the neural network. The flowchart for the voting-based inference process at the output layer of the neural network is as follows: Figure 12 As shown, N represents the number of times a vote is repeated.

[0190] Ultimately, practical experience shows that the reasoning accuracy of Scheme 1 is moderate, while the reasoning accuracy of Scheme 2 increases continuously with the number of repetitions. After a large number of repetitions, it can achieve a high reasoning accuracy, which is superior to the reasoning accuracy of existing technical solutions.

[0191] Furthermore, please refer to Figure 13 This invention provides a neural network training method based on a conductance-tunable device. This method is applicable to the neural network training operating system 1 based on a conductance-tunable device as described above. This system includes multiple sequentially connected upper network layers 2, current network layers 3, and lower network layers 4. The operation of a typical network layer 3 in this neural network training method includes the following steps:

[0192] A100. During the forward propagation of information, the first voltage conversion module 301 reads the forward output signal from the forward output unit of the previous network layer, converts the forward output signal into an input voltage signal, and transmits it to the adjustable conductivity module 302.

[0193] A200, the adjustable conductivity module 302 processes the input voltage signal and transmits the obtained first current signal to the first comparison module 303;

[0194] A300, the first comparison module 303 compares the current magnitude in the first current signal and outputs a comparison signal to the sample and hold module 305;

[0195] A400, the sample-and-hold module 305 performs a single sampling operation on the comparison signal to obtain the positive output signal of this network layer;

[0196] A500, the sample-and-hold module 305 performs multiple sampling operations and logical operations on the comparison signal to obtain the derivative signal of this network layer; wherein, the positive output signal of this network layer serves as the input of the first voltage conversion module of the next network layer; the derivative signal of this network layer is used for error backpropagation.

[0197] In the first comparison module, the first current signal is superimposed with a noise current from the noise generation module 304. Because the noise current is added to the first current signal, the comparison signal, the positive output signal, and the derivative signal have certain random characteristics. In the sample-and-hold module, the single sampling operation for generating the positive output signal and the multiple sampling operation for generating the derivative signal should be performed in three different clock cycles to ensure the independence of the sampling results.

[0198] Specifically, during the forward propagation of information, firstly, the first voltage conversion module 301 reads the forward output signal (which includes a binarized forward output signal, randomly taking values ​​of 0 or 1) from the forward output unit 205-1 of the previous network layer 2, and converts the forward output signal of the previous network layer into an input voltage signal (corresponding to...). Figure 7 The reading voltage V R After that, the signal is transmitted to the adjustable conductivity module 302. The adjustable conductivity module 302 then converts the input voltage signal into a first current signal (corresponding to...). Figure 7 I in j and I ref After that, it is transmitted to the first comparison module 303.

[0199] Secondly, the first comparison module 303 compares the current magnitudes in the first current signal (superimposed with the noise current from the noise generation module 304) and transmits the resulting comparison signal (only a low-level or high-level digital signal) to the sample-and-hold module 305. Finally, the positive output unit 305-1 in the sample-and-hold module 305 performs a single sampling operation on the comparison signal and outputs the positive output signal of the current network layer (this network layer) (also a binarized signal, randomly taking values ​​of 0 or 1). Simultaneously, the derivative unit 305-2 in the sample-and-hold module 305 performs two sampling operations (multiple sampling operations) and logical operations on the comparison signal and outputs the derivative signal of the current network layer (a binarized derivative signal, randomly taking values ​​of 0 or 1). The positive output signal and the derivative signal are not necessarily equal.

[0200] Further, please refer to Figure 14 The method for training a neural network based on a conductance-tunable device further includes:

[0201] B100. During the back propagation of error, the product module 306 multiplies the derivative signal of the current network layer with the inverse output signal of the next network layer, and then transmits the multiplication result to the second voltage conversion module 307.

[0202] B200, the second voltage conversion module 307 converts the multiplication result into an inverted input voltage signal and transmits it to the adjustable conductivity module 302;

[0203] B300, the adjustable conductivity module 302 processes the reverse input voltage signal and transmits the resulting second current signal to the second comparison module 308;

[0204] B400, the second comparison module 308 performs a comparison operation on the current magnitude in the second current signal to obtain the inverted output signal of this network layer;

[0205] The input to the product module of this network layer comes from the derivative signal of this network layer and the inverse output signal of the next network layer; the inverse output signal of this network layer is used for the product module of the previous network layer.

[0206] Specifically, during the backpropagation of error, the product module 306 first multiplies the derivative signal of the current network layer (binarized derivative signal, randomly taking "0" or "1") with the inverse output signal of the next network layer (binarized error signal, taking the value "-1" or "1"), and transmits the resulting multiplication result (ternary error signal, taking the value "-1", "0" or "1") to the second voltage conversion module 307.

[0207] Then, the second voltage conversion module 307 converts the multiplication result into an inverted input voltage signal (analog voltage signal) and transmits it to the adjustable conductance module 302. Next, the adjustable conductance module 302 processes the inverted input voltage signal and transmits the resulting second current signal (analog current signal) to the second comparison module 308. Finally, the second comparison module 308 processes the inverted input voltage signal with the second current signal and outputs the resulting inverted output signal of this network layer (a binary symbolized error signal with a value of "-1" or "1").

[0208] Further, please refer to Figure 15 The method for training a neural network based on a conductance-tunable device further includes:

[0209] A10. During the update of network weights, the gradient accumulation module 309 calculates the gradient signal based on the product result of the positive output signal of the previous network layer and the product module in the current network layer, and accumulates it.

[0210] A20. The gradient accumulation module outputs a conductivity adjustment command to the conductivity adjustment module 310 based on the accumulation result of the gradient signal; wherein, the gradient signal is a ternary signal;

[0211] A30. The conductivity adjustment module 310 adjusts the conductivity of the target unit in the adjustable conductivity module 302 according to the conductivity adjustment command.

[0212] Specifically, during the online weight adjustment (network weight update) process:

[0213] First, the gradient accumulation module 309 calculates the gradient signal (a ternary signal with values ​​of "-1", "0", or "1") based on the positive output signal of the previous network layer and the merged signal, and accumulates the gradient signal. When the accumulated weight gradient information reaches a certain threshold, the gradient accumulation module 309 outputs a conductivity adjustment command to the conductivity adjustment module 310 based on the accumulated gradient signal. The conductivity adjustment module 310 adjusts the weights (i.e., conductivity values) of the corresponding devices (target units) in the adjustable conductivity array 302 according to the conductivity adjustment command, for example, by positive or negative conductivity adjustment. The accumulated gradient signal is a signed integer (which can be a positive integer, zero, or a negative integer).

[0214] In summary, this invention proposes a neural network training operating system and method based on an adjustable conductance device. The system includes: a first voltage conversion module for converting the positive output signal of the previous network layer into an input voltage signal, and simultaneously processing the reverse input voltage signal to output a second current signal; an adjustable conductance module for processing the input voltage signal and outputting a first current signal; a first comparison module for comparing the first current signals; a sample-and-hold module for sampling the comparison result and outputting the positive output signal and derivative signal of the current network layer; a product module for multiplying the reverse error signal of the next network layer with the derivative signal; a second voltage conversion module for converting the multiplication result into a reverse input voltage signal; and a second comparison module for comparing the second current signal and outputting the reverse error signal of the current network layer. This method ensures that all information transmission between network layers is in binary form, saving computational resources and reducing power consumption.

[0215] It is understood that those skilled in the art can make equivalent substitutions or modifications to the technical solution and inventive concept of the present invention, and all such substitutions or modifications should fall within the protection scope of the appended claims.

Claims

1. A neural network training operating system based on a conductivity-tunable device, comprising multiple interconnected network layers, characterized in that, One network layer in the neural network training operating system based on tunable conductivity devices includes: a first voltage conversion module, an adjustable conductivity module, a first comparison module, and a sample-and-hold module; The first voltage conversion module is connected to the positive output unit of the previous network layer; the first voltage conversion module, the adjustable conductance module, the first comparison module, and the sample-and-hold module are connected in sequence. The first voltage conversion module is used to read the positive output signal from the positive output unit of the previous network layer, convert the positive output signal into an input voltage signal, and transmit it to the adjustable conductance module; the adjustable conductance module is used to process the input voltage signal and transmit the resulting first current signal to the first comparison module; the first comparison module is used to compare the current magnitudes in the first current signal and output a comparison signal to the sample-and-hold module; the sample-and-hold module is used to perform a single sampling operation on the comparison signal to obtain the positive output signal of this network layer, and to perform multiple sampling operations and logical operations on the comparison signal to obtain the derivative signal of this network layer; The input voltage signal and the first current signal of the adjustable conductance module are analog electrical signals; the positive output signal of the previous network layer, the comparison signal of the first comparison module, the positive output signal of this network layer, and the derivative signal of this network layer are all binarized digital signals.

2. The neural network training operating system based on a conductivity-adjustable device according to claim 1, characterized in that, The network layer further includes: a product module, a second voltage conversion module, and a second comparison module; The product module, the second voltage conversion module, the adjustable conductance module, and the second comparison module are connected in sequence, and the product module is also connected to the sample and hold module; The product module multiplies the derivative signal of the current network layer with the inverted output signal of the next network layer, and transmits the multiplication result to the second voltage conversion module. The second voltage conversion module converts the multiplication result into an inverted input voltage signal and transmits it to the adjustable conductance module. The adjustable conductance module further processes the inverted input voltage signal and transmits the resulting second current signal to the second comparison module. The second comparison module further compares the current magnitudes in the second current signal to obtain the inverted output signal of the current network layer. The reverse input voltage signal and the second current signal of the adjustable conductance module are analog electrical signals; the reverse output signal of the next network layer and the reverse output signal of this network layer are both binary symbolized error signals; and the multiplication result of the product module is a ternary error signal.

3. The neural network training operating system based on a conductivity-adjustable device according to claim 2, characterized in that, The network layer further includes: a gradient accumulation module and a conductivity adjustment module; The conductivity adjustment module is connected to the gradient accumulation module and the adjustable conductivity module respectively, and the gradient accumulation module is also connected to the first voltage conversion module, the product module and the second voltage conversion module; The gradient accumulation module is used to calculate and accumulate the gradient signal based on the product result of the positive output signal of the previous network layer and the product module; the gradient accumulation module is also used to output a conductance adjustment command to the conductance adjustment module based on the accumulated result of the gradient signal; the conductance adjustment module is used to adjust the conductance of the target unit in the adjustable conductance module according to the conductance adjustment command. Wherein, the gradient signal is a ternary symbolized signal; the cumulative result of the gradient signal is a signed integer; the conductance adjustment command includes the position information of the conductance unit to be adjusted, the direction of conductance adjustment, and the amplitude.

4. The neural network training operating system based on a conductivity-adjustable device according to claim 1, characterized in that, The network layer further includes: a noise generation module; the noise generation module is connected to the first comparison module; the noise generation module is used to add noise current to the first current signal to randomize the comparison result of the first comparison module; The noise current is an analog signal; the noise current is provided by the intrinsic noise of the electronic devices in the adjustable conductance module or the intrinsic noise in the first comparison module.

5. The neural network training operating system based on a conductivity-adjustable device according to claim 1, characterized in that, The adjustable conductivity module includes: (m+1)*(n+1)-1 adjustable conductivity devices; The system comprises m*(n+1) adjustable conductance devices forming an m-row by (n+1)-column adjustable conductance matrix to process the input voltage signal and output the first current signal. In each of the m rows, one end of the (n+1) adjustable conductance devices is interconnected, and in each of the (n+1) columns, the other end of the m adjustable conductance devices is interconnected. One end of the (n+1) adjustable conductance devices in each of the m rows is also connected to a voltage conversion unit in the first voltage conversion module. The other end of the m adjustable conductance devices in each of the (n+1) columns is also connected to a comparator unit in the first comparison module. The system consists of (m+1)*n adjustable conductance devices forming an adjustable conductance matrix with (m+1) rows and n columns to process the reverse input voltage signal and output a second current signal. In each of the (m+1) rows, one end of the n adjustable conductance devices is interconnected, and in each of the n columns, the other end of the (m+1) adjustable conductance devices is interconnected. One end of each of the n adjustable conductance devices in each of the (m+1) rows is also connected to a comparator unit in the second comparison module. The other end of each of the (m+1) adjustable conductance devices in each of the n columns is also connected to a voltage converter unit in the second voltage conversion module. Here, m and n are both positive integers.

6. The neural network training operating system based on a conductivity-adjustable device according to claim 3, characterized in that, The gradient accumulation module includes: m*n counters; the m*n counters form a counter matrix with m rows and n columns, with one end of the n counters in each of the m rows connected to each other, and the other end of the m counters in each of the n columns connected to each other.

7. The neural network training operating system based on a conductivity-adjustable device according to claim 4, characterized in that, The noise generation module includes a voltage divider unit, a filter unit, a fourth operational amplifier unit, and a noise conversion unit; the voltage divider unit, the filter unit, the fourth operational amplifier unit, and the noise conversion unit are connected in sequence; the voltage divider unit is used to divide the power supply voltage and output the divided voltage to the filter unit; the divided voltage includes the thermal noise of the resistor; the filter unit filters the divided voltage and transmits the resulting noise voltage to the fourth operational amplifier unit; the fourth operational amplifier unit is used to amplify the noise voltage and transmit the amplified noise voltage to the noise conversion unit; the noise conversion unit is used to convert the amplified noise voltage into a noise current and transmit it to the first comparison module.

8. The neural network training operating system based on a conductivity-adjustable device according to claim 7, characterized in that, The first comparison module includes: a first resistor, a second resistor, a first operational amplifier, a second operational amplifier, and a third operational amplifier; one end of the first resistor, the output terminal of the first operational amplifier, and the positive input terminal of the third operational amplifier are connected together, and the other end of the first resistor is connected to the adjustable conductivity module and the inverting input terminal of the first operational amplifier, respectively, and the positive input terminal of the first operational amplifier is grounded; one end of the second resistor, the output terminal of the second operational amplifier, and the inverting input terminal of the third operational amplifier are connected together, and the other end of the second resistor is connected to the adjustable conductivity module, the noise conversion unit, and the inverting input terminal of the second operational amplifier, respectively, and the positive input terminal of the second operational amplifier is grounded.

9. The neural network training operating system based on a conductivity-tunable device according to claim 8, characterized in that, The sample-and-hold module includes a positive output unit and a derivative unit; both the positive output unit and the derivative unit are connected to the output terminal of the third operational amplifier. The positive output unit is used to perform a single sampling operation on the comparison signal of the first comparison module to obtain the positive output signal of the network layer; the derivative unit is used to perform multiple sampling operations on the comparison signal and perform logical operations to obtain the derivative signal of the network layer. The positive output signal is transmitted to the first voltage conversion module of the next layer network; the derivative signal is used for the product module of this network layer.

10. The neural network training operating system based on a conductivity-tunable device according to claim 9, characterized in that, The positive output unit includes: a first flip-flop and a first clock signal; the data input terminal of the first flip-flop is connected to the output terminal of the third operational amplifier; the first clock signal is connected to the clock signal terminal of the first flip-flop.

11. The neural network training operating system based on a conductivity-tunable device according to claim 9, characterized in that, The derivative unit includes: a second flip-flop, a third flip-flop, a logic gate, and a second clock signal; the data input terminal of the second flip-flop is connected to the output terminal of the third operational amplifier; the second clock signal is connected to the clock input terminals of the second flip-flop and the third flip-flop; the output terminal of the second flip-flop is connected to the data input terminal of the third flip-flop and the first input terminal of the logic gate; the output terminal of the second flip-flop is connected to the second input terminal of the logic gate; the logic gate performs a logical NOT operation on the signal at the first input terminal and then performs a logical AND operation on the signal at the second input terminal.

12. A neural network training operation method based on a conductance-tunable device, wherein the neural network training operation method based on a conductance-tunable device is applicable to the neural network training operating system based on a conductance-tunable device as described in any one of claims 1-11, characterized in that, The neural network training method based on conductance-tunable devices is applied to the following neural network training operations: forward propagation of information, backward propagation of error, and updating of network weights. The neural network training method based on conductance-tunable devices includes the following steps: During the forward propagation of information, the first voltage conversion module reads the forward output signal from the forward output unit of the previous network layer, converts the forward output signal into an input voltage signal, and transmits it to the adjustable conductivity module. The adjustable conductivity module processes the input voltage signal and transmits the resulting first current signal to the first comparison module; The first comparison module compares the current magnitudes in the first current signal and outputs a comparison signal to the sample-and-hold module; The sample-and-hold module performs a single sampling operation on the comparison signal to obtain the positive output signal of this network layer; The sample-and-hold module performs multiple sampling and logical operations on the comparison signal to obtain the derivative signal of this network layer. The positive output signal of this network layer serves as the input to the first voltage conversion module of the next network layer; the derivative signal of this network layer is used for error backpropagation.

13. The method for training a neural network based on a conductivity-tunable device according to claim 12, characterized in that, The neural network training method based on conductance-tunable devices further includes: During the backpropagation of errors, the product module multiplies the derivative signal of the current network layer with the inverse output signal of the next network layer, and then transmits the multiplication result to the second voltage conversion module. The second voltage conversion module converts the multiplication result into an inverted input voltage signal and transmits it to the adjustable conductance module; The adjustable conductivity module processes the reverse input voltage signal and transmits the resulting second current signal to the second comparison module. The second comparison module performs a comparison operation on the current magnitude in the second current signal to obtain the inverted output signal of this network layer; The input to the product module of this network layer comes from the derivative signal of this network layer and the inverse output signal of the next network layer; the inverse output signal of this network layer is used for the product module of the previous network layer.

14. The method for training a neural network based on a conductivity-tunable device according to claim 12, characterized in that, The neural network training method based on conductance-tunable devices further includes: During the update of network weights, the gradient accumulation module calculates the gradient signal based on the product of the positive output signal of the previous network layer and the product result of the product module in the current network layer, and then accumulates it. The gradient accumulation module outputs a conductivity adjustment command to the conductivity adjustment module based on the accumulation result of the gradient signal; The conductivity adjustment module adjusts the conductivity of the target unit in the adjustable conductivity module according to the conductivity adjustment command.

Citation Information

Patent Citations

  • Training device for memristor-based neural network and training method thereof

    CN108009640A

  • Convolutional neural network on-chip learning system based on non-volatile memory

    US20200342301A1