Operating system and method for training of neural network based on conductance-adjustable device

By designing a neural network training operating system based on conductance adjustable devices, the information transfer and weight update process is simplified, the problem of high computing resources and power consumption of hardware neural networks in training and inference is solved, and the accuracy is improved.

WO2024174354A1PCT designated stage expired Publication Date: 2024-08-29PENG CHENG LAB
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/086573
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-21
Filing Date
2023-04-06
Publication Date
2024-08-29

AI Technical Summary

Technical Problem

Existing hardware neural networks based on conductance adjustable devices consume a lot of computing resources and power during training and inference. The peripheral circuits are complex and the non-ideal characteristics of conductance adjustable devices affect the training effect and inference accuracy.

Method used

Design a neural network training operating system based on adjustable conductance devices, including a voltage conversion module, an adjustable conductance module, a comparison module and a sample and hold module. It implements information forward propagation and error back propagation through simulated electrical signal processing, simplifying the network The weight update process uses a noise generation module and a counter array to reduce the complexity of conductance adjustment.

Benefits of technology

It simplifies the information transfer and weight update process, saves computing resources, reduces power consumption, improves the accuracy of training and inference, and reduces the complexity of conductance adjustment for adjustable conductance arrays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023086573_29082024_PF_FP_ABST
    Figure CN2023086573_29082024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention are an operating system and method for training of a neural network based on a conductance-adjustable device. The system comprises: a first voltage conversion module, which is used for converting a forward output signal of the previous network layer into an input voltage signal; an adjustable conductance module, which is used for processing the input voltage signal and outputting a first current signal, and is also used for processing a reverse input voltage signal and outputting a second current signal; a first comparison module, which is used for performing comparison on the first current signal; a sampling holding module, which is used for sampling a comparison result and outputting a forward output signal of the current network layer and a derivative signal; a product module, which is used for multiplying a reverse error signal of the next network layer by the derivative signal; a second voltage conversion module, which converts a multiplication result into a reverse input voltage signal; and a second comparison module, which performs comparison on the second current signal and outputs a reverse error signal of the current network layer. By means of the method, information transmissions between network layers are all in a binary form, thereby saving on computing resources and reducing power consumption.
Need to check novelty before this filing date? Find Prior Art

Description

A neural network training operating system and method based on adjustable conductivity device Technical Field

[0001] The present invention relates to the technical field of integrated circuits, and in particular to a neural network training operating system and method based on a conductivity adjustable device. Background Art

[0002] Recent advances in artificial intelligence (AI) are inseparable from the development of artificial neural networks (ANNs), exemplified by deep learning. As their scale continues to expand, ANNs increasingly rely on increases in data size and computing power. However, the data processing and computing capabilities of existing computer systems based on the von Neumann architecture are facing increasing bottlenecks. AI systems based on novel electronic devices and computing architectures have become a hot topic in scientific and technological research in recent years.

[0003] Neural networks consist of multiple layers of interconnected network nodes. Information is forward-propagated from the input layer to the output layer layer by layer to complete information processing and implement cognitive functions such as recognition and classification. This process is called inference. To achieve accurate inference, neural networks need to adjust the weights of node connections in each network layer according to specific rules (i.e., learning algorithms) based on a large amount of labeled data input. This process is called training or learning. The high-density connections between a large number of input nodes and output nodes in a given layer of a neural network can usually be described in the form of a weight matrix.

[0004] Furthermore, during the forward propagation of information, the information set of the input nodes in each layer of the neural network can be viewed as a vector. Multiplying this vector by the weight matrix produces another vector, the output vector. After the output vector is processed by the activation function, it represents the output node information and serves as the input for the next neural network layer. In traditional von Neumann architecture computer systems, where data storage and computation are separated, this vector-matrix product operation requires the computing unit to continuously read and write data from the data storage space, resulting in high power consumption and latency.

[0005] To alleviate this problem, an array of electronic devices with specific resistance or conductance values ​​can be used to store the entire weight matrix data. Furthermore, when these devices are arranged in a crossbar array structure and combined with peripheral circuitry, vector-matrix multiplication can be performed in a single step using Ohm's law and Kirchhoff's current law. This hardware circuit simultaneously stores weight information and performs vector-matrix multiplication, efficiently and with low power consumption. Because the data computation is performed within the data storage space, it is also known as "in-memory computing." Electronic devices with adjustable conductance, including resistive random access memory (RRAM), ferroelectric memory, floating gate memory, magnetic memory, and phase change memory, can simulate the adjustability or plasticity of connection weights between network nodes. These devices also mimic the plasticity of synapses in biological systems, and are therefore also known as artificial synaptic devices. Adjusting the conductance of the adjustable conductance device updates the weights in the neural network, thereby enabling neural network training.

[0006] However, existing hardware neural networks based on tunable conductivity devices suffer from several issues. First, neural network training typically occurs offline. This means that after completing neural network training on a traditional computing platform, the trained weight information is mapped and written to the hardware network based on the tunable conductivity device. This type of neural network only accelerates the neural network inference process; training still consumes significant computing resources. Second, the peripheral circuitry of the crossbar array is relatively complex. To implement vector-matrix product operations based on Ohm's law and Kirchhoff's current law, precise voltages must be applied to one end of the crossbar array and currents precisely measured at the other. This typically requires high-precision digital-to-analog and analog-to-digital conversion circuit modules. These high-precision circuit modules are both costly to implement on-chip and consume a lot of power during operation. Finally, the non-ideal characteristics of tunable conductivity devices significantly impact the training and inference accuracy of neural networks, whether offline or online.

[0007] Therefore existing technology still needs to be improved and improved.

[0008] Summary of the Invention

[0009] The main purpose of the present invention is to provide a neural network training operating system and method based on adjustable conductivity devices, aiming to solve the problem in the prior art that hardware neural networks based on adjustable conductivity devices consume a lot of computing resources and have high power consumption during training and inference.

[0010] In order to achieve the above object, the present invention adopts the following technical solutions:

[0011] A neural network training operating system based on a conductivity adjustable device, comprising a plurality of interconnected network layers, wherein a typical network layer in the neural network training operating system based on the conductivity adjustable device comprises: a first voltage conversion module, an adjustable conductivity module, a first comparison module, and a sample-and-hold module;

[0012] The first voltage conversion module is connected to the forward output unit of the upper network layer; the first voltage conversion module, the adjustable conductance module, the first comparison module and the sampling and holding module are connected in sequence;

[0013] The first voltage conversion module is used to read the positive output signal in the positive output unit of the previous network layer, and after converting the positive output signal into an input voltage signal, transmit it to the adjustable conductance module; the adjustable conductance module is used to process the input voltage signal and transmit the obtained first current signal to the first comparison module; the first comparison module is used to compare the current magnitudes in the first current signals and output the comparison signal to the sample and hold module; the positive output unit in the sample and hold module is used to perform a single sampling operation on the comparison signal to obtain the positive output signal of the current network layer, and to perform multiple sampling operations and logical operations on the comparison result to obtain the derivative signal of the current network layer;

[0014] Among them, the input voltage signal and the first current signal of the adjustable conductivity 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.

[0015] In the neural network training operating system based on the conductivity adjustable device, the network layer further includes: a product module, a second voltage conversion module and a second comparison module;

[0016] 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;

[0017] The product module is configured to multiply the derivative signal of the current network layer by the reverse output signal of the next network layer, and transmit the multiplication result to the second voltage conversion module; the second voltage conversion module is configured to convert the multiplication result into a reverse input voltage signal, and transmit the result to the adjustable conductance module; the adjustable conductance module is further configured to process the reverse input voltage signal and transmit the obtained second current signal to the second comparison module; the second comparison module is further configured to compare the current magnitudes in the second current signal to obtain the reverse output signal of the current network layer;

[0018] Among them, 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 both binary symbolized error signals; and the multiplication result of the product module is a ternary error signal.

[0019] In the neural network training operating system based on the conductivity adjustable device, the network layer further includes: a gradient accumulation module and a conductivity adjustment module;

[0020] The conductance adjustment module is connected to the gradient accumulation module and the adjustable conductance 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;

[0021] The gradient accumulation module is used to calculate and accumulate a gradient signal based on the multiplication result of the forward output signal of the previous network layer and the product module; the gradient accumulation module is also used to output a conductance adjustment instruction to the conductance adjustment module based on the accumulation 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 instruction;

[0022] The gradient signal is a three-valued symbolized signal; the accumulated result of the gradient signal is a signed integer; and the conductivity adjustment instruction includes the position information of the conductivity unit to be adjusted, the direction and amplitude of the conductivity adjustment.

[0023] In the neural network training operating system based on the adjustable conductivity device, the network layer further includes: a noise generating module; the noise generating module is connected to the first comparison module; the noise generating module is used to add a noise current to the first current signal to randomize the comparison result of the first comparison module;

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

[0025] In the neural network training operating system based on adjustable conductivity devices, the adjustable conductivity module includes: (m+1)*(n+1)-1 adjustable conductivity devices;

[0026] wherein m*(n+1) adjustable conductivity devices form an adjustable conductivity matrix of m rows by (n+1) columns for processing an input voltage signal and outputting a first current signal; one end of the (n+1) adjustable conductivity devices in each of the m rows are connected to one another, and the other ends of the m adjustable conductivity devices in each of the (n+1) columns are connected to one another; one end of the (n+1) adjustable conductivity devices in each of the m rows is also connected to a voltage conversion unit in the first voltage conversion module; and the other end of the m adjustable conductivity devices in each of the (n+1) columns is also connected to a comparator unit in the first comparison module;

[0027] Wherein, (m+1)*n adjustable conductivity devices form an adjustable conductivity matrix of (m+1) rows by n columns for processing a reverse input voltage signal and outputting a second current signal; one end of the n adjustable conductivity devices in each of the (m+1) rows are connected to each other, and the other end of the (m+1) adjustable conductivity devices in each of the n columns are connected to each other; one end of the n adjustable conductivity devices in each of the (m+1) rows is also connected to a comparator unit in the second comparison module; and the other end of the (m+1) adjustable conductivity devices in each of the n columns is also connected to a voltage converter unit in the second voltage conversion module; wherein m and n are both positive integers.

[0028] In the neural network training operating system based on the adjustable conductivity device, the gradient accumulation module includes: m*n counters; the m*n counters form a counter matrix of m rows by n columns, one end of the n counters in each of the m rows is interconnected, and the other end of the m counters in each of the n columns is interconnected.

[0029] In the neural network training operating system based on the adjustable conductivity device, the noise generation module includes: a voltage divider unit, a filtering unit, a fourth operational amplifier unit, and a noise conversion unit; the voltage divider unit, the filtering 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 filtering unit; the divided voltage includes the thermal noise of the resistor; the filtering 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.

[0030] In the neural network training and operating system based on the adjustable conductivity device, 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 is connected to the output end of the first operational amplifier, and the positive input end of the third operational amplifier; the other end of the first resistor is connected to the adjustable conductivity module and the reverse input end of the first operational amplifier, respectively; the positive input end of the first operational amplifier is grounded; one end of the second resistor is connected to the output end of the second operational amplifier, and the reverse input end of the third operational amplifier; the other end of the second resistor is connected to the adjustable conductivity module, the noise conversion unit, and the reverse input end of the second operational amplifier, respectively; the positive input end of the second operational amplifier is grounded.

[0031] In the neural network training operating system based on the adjustable conductivity device, the sampling and holding module includes: a forward output unit and a derivative unit; the forward output unit and the derivative unit are both connected to the output end of the third operational amplifier;

[0032] The forward output unit is used to perform a single sampling operation on the comparison signal of the first comparison module to obtain the forward output signal of the current network layer; the derivative unit is used to perform multiple sampling operations on the comparison signal and perform a logical operation to obtain the derivative signal of the current network layer;

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

[0034] In the neural network training operating system based on the adjustable conductivity device, the forward output unit includes: a first trigger and a first clock signal; the data input end of the first trigger is connected to the output end of the third operational amplifier; and the first clock signal is connected to the clock signal end of the first trigger.

[0035] In the neural network training and operating system based on the adjustable conductivity device, the derivative unit includes: a second trigger, a third trigger, a logic gate, and a second clock signal; the data input terminal of the second trigger is connected to the output terminal of the third operational amplifier; the second clock signal is respectively connected to the clock input terminal of the second trigger and the clock input terminal of the third trigger; the output terminal of the second trigger is respectively connected to the data input terminal of the third trigger and the first input terminal of the logic gate; the output terminal of the second trigger 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.

[0036] A neural network training operation method based on an adjustable conductivity device is applicable to the above-mentioned neural network training operation system based on an adjustable conductivity device. The neural network based on the adjustable conductivity device is applied to the following neural network training operation methods: forward propagation of information, back propagation of errors, and updating of network weights. The neural network training operation method based on the adjustable conductivity device comprises the following steps:

[0037] 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 the input voltage signal to the adjustable conductance module;

[0038] The adjustable conductance module processes the input voltage signal and transmits the obtained first current signal to the first comparison module;

[0039] The first comparison module compares the current magnitudes in the first current signal and outputs a comparison signal to the sampling and holding module;

[0040] The sampling and holding module performs a single sampling operation on the comparison signal to obtain a positive output signal of the current network layer;

[0041] The sampling and holding module performs multiple sampling operations and logic operations on the comparison signal to obtain a derivative signal of the current network layer;

[0042] The forward output signal of the current network layer is used as the input of the first voltage conversion module of the next network layer; and the derivative signal of the current network layer is used for error back propagation.

[0043] In the neural network training operation method based on the adjustable conductivity device, the neural network training operation method based on the adjustable conductivity device further includes:

[0044] During the back propagation of the error, the product module multiplies the derivative signal of the current network layer by the reverse output signal of the next network layer, and transmits the multiplication result to the second voltage conversion module;

[0045] The second voltage conversion module converts the multiplication result into a reverse input voltage signal and transmits the reverse input voltage signal to the adjustable conductance module;

[0046] The adjustable conductivity module processes the reverse input voltage signal and transmits the obtained second current signal to the second comparison module;

[0047] The second comparison module compares the current magnitudes in the second current signal to obtain a reverse output signal of the current network layer;

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

[0049] In the neural network training operation method based on the adjustable conductivity device, the neural network training operation method based on the adjustable conductivity device further includes:

[0050] During the update process of the network weights, the gradient accumulation module calculates the gradient signal based on the forward output signal of the previous network layer and the product result of the product module in the current network layer, and accumulates it;

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

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

[0053] Compared to existing technologies, the present invention provides a neural network training operating system and method based on adjustable conductivity devices. The system includes: a first voltage conversion module for converting the forward output signal of the previous network layer into an input voltage signal; an adjustable conductivity module for processing the input voltage signal and outputting a first current signal, and also for processing the 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 derivative signal of the current network layer; a multiplication module for multiplying the reverse error signal of the next network layer by 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. Information transmission between network layers is binary, simplifying the complex operations of applying input voltage and detecting output current around the adjustable conductivity array during forward information propagation and reverse error propagation, and simplifying the operational circuitry and process for adjusting the conductivity of the adjustable conductivity array during network weight updates. The system and method conserve computing resources and reduce power consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] FIG1 is a schematic diagram of a typical structure of a layer in a neural network and information forward propagation in the prior art provided by the present invention;

[0055] FIG2 is a structural diagram of an equivalent circuit for performing vector-matrix product operations and activation function operations using an adjustable conductivity array provided by the present invention;

[0056] FIG3 is a simplified connection diagram of an adjustable conductance matrix during forward information propagation provided by the present invention;

[0057] FIG4 is a simplified connection diagram of the adjustable conductance matrix during information back propagation provided by the present invention;

[0058] FIG5 is a simplified diagram of the connection of a counter matrix during the neural network training process provided by the present invention;

[0059] FIG6 is a functional block diagram of a preferred embodiment of a neural network training operating system based on an adjustable conductivity device provided by the present invention;

[0060] FIG7 is a schematic diagram of the connection of the adjustable conductance matrix during the forward propagation of information provided by the present invention;

[0061] FIG8 is a schematic diagram of a clock signal of a trigger sampled and outputted in a preferred embodiment of the neural network training operation method based on an adjustable conductivity device provided by the present invention;

[0062] FIG9 is a schematic diagram of the connection of an adjustable conductance matrix during information back propagation provided by the present invention;

[0063] FIG10 is a schematic diagram showing the connection of a counter matrix during a neural network training process provided by the present invention;

[0064] FIG11 is a flow chart of the gradient accumulation and weight updating process in a preferred embodiment of the neural network training operation method based on the adjustable conductivity device provided by the present invention;

[0065] FIG12 is a flow chart of performing reasoning by voting at the output layer of a neural network in a preferred embodiment of the neural network training operation method based on an adjustable conductivity device provided by the present invention;

[0066] FIG13 is a flow chart of the forward propagation process of information in a preferred embodiment of the neural network training operation method based on the adjustable conductivity device provided by the present invention;

[0067] FIG14 is a flow chart of the error back propagation process in a preferred embodiment of the neural network training operation method based on the adjustable conductivity device provided by the present invention;

[0068] FIG15 is a flow chart of the network weight updating process in a preferred embodiment of the neural network training operation method based on the adjustable conductivity device provided by the present invention.

[0069] Figure 1: Neural network training operating system based on adjustable conductivity device; 2: Previous network layer; 3: Current network layer; 4: Next network layer; 205-1: Forward output unit of previous network layer; 206: Product module of previous network layer; 301: First voltage conversion module; 302: Adjustable conductivity 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; 401: First voltage conversion module of next network layer; 408: Second comparison module of next network layer; 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: fourth operational amplifier; D1: first trigger; D2: second trigger; D3: third trigger; C1: first capacitor; U1: logic gate; C: counter; G: adjustable conductance device; Q: MOS tube. DETAILED DESCRIPTION

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

[0071] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the description of the present invention refers to the presence of the 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 said to be "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" used herein includes all or any units and all combinations of one or more associated listed items.

[0072] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0073] In order to facilitate understanding of the embodiments of the present application, the background technology involved in the embodiments of the present invention is first introduced here.

[0074] Figure 1 shows the typical structure of a layer in a neural network and a schematic diagram of information forward propagation. Take a network layer with m input nodes and n output nodes as an example. Then, the input of the network layer, that is, the information of the m input nodes, is represented by m values ​​x1, x2, ..., x i ,…,x m To express it, we can also use their vector form X=[x1,…,x m ] is used to describe the parameters of the network layer, that is, the weights connecting the input nodes and the output nodes, using m×n numerical values ​​w 11 ,w 12 ,…,w ij ,…,w mn To describe, you can also use their matrix form To describe. The input information of the output node of the network layer is represented by n values ​​y1,…,y j ,…,y n To express it, we can also use their vector form Y=[y1,…,y n ] to describe. The input information of the output node of the network layer is determined by the input node information of the network layer and the parameters of the network layer. Their mathematical relationship can be described as:

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

[0076] The vector-matrix product operation in formula (2) is an operation that needs to be performed in large quantities in neural networks. In a traditional von Neumann computer system, the operation in formula (2) needs to be performed one by one according to the operation process described in formula (1) on the elements of all input vectors and the elements of the weight matrix, and the product results are accumulated one by one, and the values ​​of all elements are described by high-precision floating-point numbers. The input information of the output node of the network layer (y1,…,y j ,…,y n ) also needs to be activated to obtain the output of the network layer (z1,…,z j ,…,z n), expressed as: z j =f(y j ),j=1,…,n, (3);

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

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

[0079] The single-layer neural network described above is a fundamental building block of many neural network types. 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 feed-forward layer in a feedback loop.

[0080] Figure 2 shows the equivalent circuit structure of the above-mentioned vector matrix product operation and activation function operation using an adjustable conductivity array. First, the adjustable conductivity array is used to replace the weight matrix of the neural network, that is, the conductivity of each device in the array (G ij ) and the reference conductance (G ref ) difference (G ij -G ref ) represents the value of a weight element in the weight matrix (w ij ). In addition, the interconnection of the devices in the adjustable conductance array adopts the form of a crossbar array: one end of the adjustable conductance is connected to parallel horizontal wires, and the other end is connected to parallel vertical wires; each intersection of the horizontal and vertical wires has an adjustable conductance device. Secondly, the input of the network layer is converted into analog voltages (V1, V2, ..., V i ,…,V m ) and apply voltage to the input of the adjustable conductivity array (i.e., the horizontal wire in Figure 2). Next, the output of the adjustable conductivity array (i.e., the vertical wire in Figure 2) is grounded and the output current (I1,…,I j ,…,I n ,I ref) and performs subsequent processing such as activation function calculations. Generally, the measurement and subsequent processing of output current require the participation of complex circuits, such as transconductance amplifiers, sample-and-hold circuits, multiplexer modules, analog-to-digital converters (ADCs), and digital processing modules.

[0081] Then, through Ohm's law and Kirchhoff's current law, the output current of the adjustable conductivity array can be obtained:

[0082] After subtracting formula (4) from formula (5), we get:

[0083] Comparing formula (6) with formula (1), we can find that the device conductance (G ij -G ref ) corresponds to the weight of the network layer (w ij ), input voltage (V i ) corresponds to the input of the network layer (x i ), output current (I j -I ref ) corresponds to the input of the output node of the network layer (y j ); This completes the vector-matrix product operation required by equations (1) and (2). This operation is performed in the conductivity array that stores the weights. The calculation of the current difference in equation (6) can be completed in the form of an analog circuit or in a digital processing module after completing the analog-to-digital conversion.

[0084] Finally, the digital processing module is used to perform the operations required by the activation function described by formula (3) to complete the output of this network layer.

[0085] The adjustable conductance devices in the adjustable conductance array can be implemented in a variety of forms, such as resistive random access memory (RRAM), phase change memory (PCM), ferroelectric memory (FRAM), magnetic memory (MRAM), floating-gate transistors (FMT), and electrolyte-gated transistors (EDT). In specific implementations, the adjustable conductance devices are not limited to two-terminal devices. For example, three-terminal adjustable conductance device units, such as RRAM or PCM units with a 1T1R structure and a series selection transistor, can also be used to form the adjustable conductance array.

[0086] Since the conductance of a single device in an adjustable conductance array can only be positive, in order to describe the network weight which may be negative, the differential equivalent conductance is used in the above introduction, that is, the conductance of a single device minus the conductance of the reference device (G ij -G ref ), to represent the network weight (w ij). In FIG2 , a column (ie, reference column) of adjustable conductivity devices with fixed conductivity values ​​is used. Equivalently, two adjustable conductivity devices can also be used. and The difference To represent a weight value (w ij ). The array form of the adjustable conductance and the design and operation mode of the peripheral circuits need to be adjusted accordingly.

[0087] In the above description, an analog-to-digital converter (ADC) is used to convert the output of a network layer into a digital signal. After completing functions such as activation functions in a digital processing module, this signal is then used as the input for the next layer. The output of the previous layer, and therefore the input to this layer, is also a digital signal. Therefore, a DAC 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 calculations, and then input the signal to the next layer. Implementing these functions with analog circuits requires high precision of the electrical signals at each stage.

[0088] The above is an introduction to the existing technology. However, while the existing technology provides a basic hardware neural network architecture and efficient neural network inference, it also has the following problems:

[0089] First, neural network training is typically performed offline. This means that after training is completed on a traditional computing platform, the trained weight information is mapped and written to a hardware network based on tunable conductivity devices. This approach only accelerates the inference process, but training still requires significant computing resources.

[0090] Secondly, the crossbar array's peripheral circuitry is relatively complex. To implement vector-matrix product operations based on Ohm's law and Kirchhoff's current law, a precise voltage must be applied to one end of the crossbar array and the current accurately detected at the other. This typically requires high-precision digital-to-analog conversion, analog-to-digital conversion, or other specialized circuits for precisely controlling input voltage and detecting output current. These circuits, however, are expensive to implement on integrated circuit chips and consume a lot of power during operation.

[0091] Finally, tunable conductivity devices have many non-ideal characteristics. These include a limited range of conductance values, limited adjustable conductance states, nonlinear current-voltage characteristics, nonlinear conductance regulation behavior, high conductance regulation errors, and high readout errors. These non-ideal characteristics significantly impact the training performance and inference accuracy of neural networks, both offline and online.

[0092] To address the above technical issues, the present invention provides a neural network training operating system and method based on a tunable conductivity device. This method can be applied to forward information propagation, backward error propagation, and online weight adjustment within a neural network. It supports high-accuracy online training of neural networks and high-accuracy reasoning after neural network training.

[0093] As shown in Figure 3, during the forward information propagation process, the present invention utilizes the intrinsic noise of the adjustable conductance array or an externally applied noise source, combined with current or voltage comparator circuits and signal sampling circuits, to convert the output of a typical network layer into a random binary, digitized signal (with a value of "0" or "1"). This binary, digitized output signal serves as the input to the next network layer, thereby enabling forward information propagation layer by layer. The input of the current network layer (the current network layer) is the binary, digitized signal output by 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 achieved through a voltage converter (level shifter). Simultaneously, the present invention obtains a random binary digital signal (with a value of "0" or "1") of the activation function derivative by performing multiple independent sampling processes and logical processing on the output of the adjustable conductance array.

[0094] As shown in Figure 4, during the neural network's error backpropagation process, the present invention reuses the aforementioned adjustable conductance array for reverse information processing. The binary symbolized error signal (with a value of "-1" or "1") backpropagated from the previous network layer is multiplied by the random binary signal of the activation function derivative (with a value of "0" or "1") to obtain ternary error information (with a value of "-1," "0," or "1"). When this ternary, digitized error information (with a value of "-1," "0," or "1") is input into the adjustable conductance array, only three analog signals—negative voltage, zero voltage, and positive voltage—are required. This can also be accomplished using a voltage level shifter circuit. Combined with a current comparator or voltage comparator circuit, the reverse output of the adjustable conductance array is converted into binary symbolized, digitized error information (with a value of "-1" or "1"). This binary symbolized, digitized error information then serves as the input to the previous network layer, allowing the error information to be backpropagated layer by layer.

[0095] As shown in Figure 5, during weight adjustment, or neural network training, the present 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 conductivity array is adjusted to complete the weight update. This approach enables reliable and accurate weight adjustment. Specifically, despite the prevalence of non-ideal characteristics of adjustable conductivity devices, the accuracy of inference results can be reliably improved with increasing training cycles.

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

[0097] Referring to FIG6 , the present invention provides a neural network training and operating system 1 based on an adjustable conductivity device, which is composed 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 adjustable conductivity device includes: a first voltage conversion module 301, an adjustable conductivity module 302, a first comparison module 303, a noise generation module 304, a sampling and holding module 305, a product module 306, a second voltage conversion module 307, a second comparison module 308, a gradient accumulation module 309, and a conductivity adjustment module 310.

[0098] The first voltage conversion module 301 is connected to the forward output unit 205-1 of the previous network layer 2; the first voltage conversion module 301, the adjustable conductance module 302, the first comparison module 303 and the sampling and holding module 305 are connected in sequence; the first comparison module 303 is also connected to the noise generation module 304.

[0099] The first voltage conversion module 301 is used to read the positive output signal of 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, and then perform voltage conversion and comparison operations in sequence, and transmit the obtained comparison result (comparison signal) to the sampling and holding module 305; the positive output unit 305-1 in the sampling and holding 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 sampling and holding module 305 is used to obtain the derivative signal of the current network layer after performing multiple sampling and logical processing on the comparison signal.

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

[0101] Since the noise current is superimposed on the first current signal, the output of the first comparison module 303 is a randomly binary signal. The forward output signal and the derivative signal are the results of sampling by the first comparison module, and therefore they randomly take the value of "0" or "1". However, if there is sufficiently large intrinsic noise in the adjustable conductance module 302 or the first comparison module 303, the noise generation module 304 may not be required.

[0102] Furthermore, 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.

[0103] 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, and is used to multiply the derivative signal of the current network layer by the reverse 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 a reverse input voltage signal and transmit it to the adjustable conductance module 302; the adjustable conductance module 302 is also used to process the reverse 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 reverse output signal of the current network layer; the second comparison module 308 is also used to transmit the reverse output signal to the product module 206 in the previous network layer 2.

[0104] 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 the current 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").

[0105] Furthermore, the gradient accumulation module 309 is simultaneously connected to the forward 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 the current network layer. The gradient accumulation module 309 is configured to calculate and accumulate a gradient signal based on the multiplication result of the forward output signal of the previous network layer and the product module. The gradient accumulation module 309 is further configured to output a conductance adjustment instruction to the conductance adjustment module 310 based on the accumulated result of the gradient signal. The conductance adjustment module 310 is configured to adjust the conductance of the target unit in the adjustable conductance module 302 based on the conductance adjustment instruction. The gradient signal is a three-valued signed signal (taking the values ​​of "-1", "0", or "1"). The accumulated result of the gradient signal is a signed integer. The conductance adjustment instruction includes the location information of the conductance unit to be adjusted, the direction of conductance adjustment, and the amplitude.

[0106] Specifically, the neural network training operating system 1 based on the adjustable conductivity device proposed in the present invention can be applied to information forward propagation (including training and inference processes), error backpropagation, and online weight adjustment in the neural network, supporting high-accuracy online training of the neural network and high-accuracy reasoning after the neural network training is completed. Then, the implementation process is as follows:

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

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

[0109] Then, the adjustable conductance module 302 processes the input voltage signal and outputs a first current signal (including I j and I ref ) and transmits the first current signal to the first comparison module 303; at the same time, the noise generation 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 (with the noise current superimposed on it) in sequence to obtain a digital signal (comparison signal) that randomly fluctuates but is only at a low or high level (representing "0" or "1"), and transmits the comparison signal to the sampling and holding module 305. Finally, the forward output unit 305-1 in the sampling and holding module 305 samples the comparison signal to obtain the forward output signal of the current network layer (also a binary signal, randomly taking the value of "0" or "1"); the derivative unit 305-2 in the sampling and holding module 305 samples and performs logical processing on the comparison signal to obtain a derivative signal (also a binary signal, randomly taking the value of "0" or "1").

[0110] 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 for the next layer. The input to the adjustable conductivity array corresponding to each neural network layer requires only a zero voltage and a fixed read voltage signal, eliminating the need for a high-precision digital-to-analog conversion circuit or other form of high-precision input voltage regulation module. Furthermore, the output current of the adjustable conductivity array corresponding to each neural network layer (the adjustable conductivity module 302) serves only as input to the comparison module. The precise current value does not need to be read, nor does it require a high-precision analog-to-digital conversion circuit or other form of high-precision current reading module, thereby effectively saving costs.

[0111] Furthermore, the randomness of the stochastically binarized forward output signal incorporates the functionality of the activation function, eliminating the need for the output signal to be processed through a specific activation function as in traditional neural networks. Furthermore, the hardware circuitry natively obtains the binary signal (state "0" or "1") of the activation function derivative, eliminating the need for dedicated circuitry to calculate the activation function derivative, further effectively reducing design costs.

[0112] Furthermore, in the error back propagation process in which the error information is back propagated layer by layer 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 the current network layer and the second comparison module 408 of the next network layer.

[0113] The product module 306 is configured to multiply the derivative signal of the current network layer by the reverse output signal of the next network layer, and transmit the obtained product result (combined signal) to the second voltage conversion module 307. The second voltage conversion module 307 is configured to convert the combined signal into a reverse input voltage signal, and transmit the converted signal to the adjustable conductance module 302. The adjustable conductance module 302 is configured to process the reverse input voltage signal, output a second current signal, and transmit the second current signal to the second comparison module 308. The second comparison module 308 is configured to perform a comparison operation on the second current signal to obtain the reverse output signal of the current network layer. The reverse output signal is a binary symbolized error signal, with "-1" or "1" representing two possible comparison results.

[0114] During the error backpropagation process in the present invention, the current network layer output is a binary symbolized reverse output signal (state "-1" or "1"). Multiplied by the binary signal of the activation function derivative (state "0" or "1"), the resulting multiplication result is a ternary error signal (state "-1," "0," or "1"), which serves as the input to the second voltage conversion module 307. Consequently, the inputs to the adjustable conductance array (the adjustable conductance module 302) corresponding to each neural network layer only require negative voltage signals, zero voltage signals, and positive voltage signals, eliminating the need for high-precision digital-to-analog conversion circuits or other high-precision input voltage adjustment modules. Furthermore, the output states of the adjustable conductance array corresponding to each neural network layer, "-1" or "1," can be described using zero-level and high-level signals, or negative and positive voltage signals, eliminating the need for high-precision analog-to-digital conversion circuits or other high-precision current reading modules, thereby effectively saving costs.

[0115] Furthermore, when performing neural network weight adjustment, in a typical network layer 3: the gradient accumulation module 309 is simultaneously connected to the forward output unit 205-1 of the previous network layer and the product module 306 of the current network layer; the gradient accumulation module 309 is used to calculate and accumulate a gradient signal based on the forward output signal of the previous network layer and the multiplication result of the product module; the gradient accumulation module 309 is also used to output a conductance adjustment instruction to the conductance adjustment module 310 based on the accumulation result of the gradient signal; the conductance adjustment module 310 is used to adjust the conductance of the target unit in the adjustable conductance module 302 according to the conductance adjustment instruction.

[0116] 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 conductance adjustment module 310 to adjust the weight (i.e., conductance value) of the corresponding device in the adjustable conductance array, for example, to adjust the conductance positively or negatively.

[0117] In the present invention, due to the aforementioned information binarization and symbolization, the output error function of the neural network, relative to the gradient information of the weight change, has a value of only -1, 0, or 1. Therefore, a low-cost solution such as a counter array (the gradient accumulation module 309) can be used to accumulate weight gradient information. When the accumulated weight gradient information reaches a certain threshold, the weight (i.e., the conductance value) of the corresponding device in the adjustable conductance array is adjusted. This significantly reduces the number of write operations required for the adjustable conductance device G.

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

[0119] In addition, the present invention also proposes two optimization schemes for neural network reasoning. Scheme 1: In the above-mentioned information forward propagation scheme, the influence of noise is removed, that is, the noise current generation module is not added, so that the forward output signal of the network layer is converted into a deterministic binary signal. Then, this binary output signal is used as the input of the next layer of the network, so that the information is forward propagated layer by layer to complete the reasoning process. Scheme 2: Repeat the layer-by-layer forward propagation process of random binary information multiple times, and determine the final reasoning result by voting at the output layer of the neural network.

[0120] In the neural network training and operating system 1 based on the adjustable conductivity device proposed in the present invention, only the hardware part of the information forward propagation is used for neural network reasoning. By directly using the random binarized information forward propagation used in neural network training for reasoning, the reasoning accuracy will be reduced to a certain extent. Using a deterministic binarized forward propagation scheme for neural network reasoning will effectively reduce the reasoning delay and obtain moderate reasoning accuracy. Using a repeated random binarized forward propagation scheme, the reasoning accuracy of the neural network gradually increases with the increase in the number of forward propagation, which can achieve a balanced trade-off between reasoning delay and reasoning accuracy during the reasoning process.

[0121] The following further describes the design of a neural network training operating system based on a conductance adjustable device in conjunction with a more detailed circuit structure diagram and flow chart. It should be noted that the following embodiments are only used to illustrate the technical solution of the invention and are not intended to be limiting.

[0122] First, assuming that there are m input nodes and n output nodes in the typical network layer 3, the adjustable conductance array includes (m+1)*(n+1)-1 adjustable conductance devices; wherein the conductances of the m*n adjustable conductance devices are continuously adjusted and updated during the neural network training; the conductances of the (m+n) adjustable conductance devices are set to a fixed conductance G during the neural network initialization process. ref ; m and n are both positive integers.

[0123] In the adjustable conductivity array, m*(n+1) adjustable conductivity devices form an adjustable conductivity matrix with m rows and (n+1) columns, which is used in 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, which is used in the reverse propagation of errors to process the reverse input voltage signal and output the second current signal.

[0124] 6, 7 and 8, the forward information propagation process will be described.

[0125] 7 , m first voltage converters constitute a first voltage conversion module 301 ; n first comparators constitute a first comparison module 303 ; n noise current generating circuits constitute a noise generating module 304 ; and n forward output units and n derivative units constitute a sample-and-hold module 305 .

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

[0127] In the adjustable conductivity module 302, m*(n+1) adjustable conductivity devices G participate in the information forward propagation process. The m*(n+1) adjustable conductivity devices G form an adjustable conductivity matrix with m rows and (n+1) columns. One end of the (n+1) adjustable conductivity devices G in each of the m rows is connected, and the other end of the m adjustable conductivity devices G in each of the (n+1) columns is connected. The m adjustable conductivity devices G in the (n+1)th column belong to a reference group and are used to provide a reference current I in the first current signal. ref , and the m adjustable conductivity devices G on the 1st to nth columns belong to the common experimental group, which 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 and are connected to the input of the first comparator in the first comparison module 303. All horizontal lines serve as inputs of the adjustable conductance array and are connected to the output of the first voltage converter in the first voltage conversion module 301.

[0128] 7 , the noise generating module 304 includes n noise current generating circuits, each of which includes a voltage divider unit, a filter unit, an amplifier unit, and a noise conversion unit. The voltage divider unit includes a third resistor R3 and a fourth resistor R4, the filter unit includes a first capacitor C1, the amplifier unit includes a fourth operational amplifier P4, and the noise conversion unit includes a fifth resistor R5. The voltage divider unit, the filter unit, the amplifier unit, and the noise conversion unit are connected in sequence. The voltage divider unit is configured to divide the power supply voltage and output a divided voltage to the filter unit. The divided voltage includes thermal noise of the resistors. The filter unit filters the divided voltage to remove a DC component from the divided voltage, 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 the noise current to the first comparator in the first comparing module 303. The introduction of the noise current generating circuit transforms the output of this network layer into a random binary signal.

[0129] 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 end of the first operational amplifier P1 and the positive input end of the third operational amplifier P3; the other end of the first resistor R1 is connected to the adjustable conductance module 200 and the negative input end of the first operational amplifier P1, respectively; and the positive input end of the first operational amplifier P1 is grounded; one end of the second resistor R2 is connected to the output end of the second operational amplifier P2 and the negative input end of the third operational amplifier P3; the other end of the second resistor R2 is connected to the adjustable conductance module, the noise control unit, and the negative input end of the second operational amplifier P2, respectively; and the positive input end of the second operational amplifier P2 is grounded.

[0130] Specifically, in the present invention, n first comparators form the first comparison module 303, wherein the n first comparators are connected to the first n columns of vertical circuits in a one-to-one correspondence, and each first comparator is also connected to the vertical circuit in the (n+1)th column. In this case, each vertical circuit in columns 1 to n is respectively connected to the other end of the second resistor R2 in the n first comparators, the noise control unit, and the inverting input terminal of the second operational amplifier P2, and the vertical circuit in the (n+1)th column is respectively connected to the other end of the first resistor R1 in the n first comparators and the inverting input terminal of the first operational amplifier P1.

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

[0132] Furthermore, the forward output unit 305-1 of the sample and hold module 305 includes: a first trigger D1 and a first clock signal (clk_o l ); the data input end of the first trigger D1 is connected to the output end of the first trigger D1 and the output end of the third operational amplifier P3 respectively; the first clock signal is connected to the clock signal end of the first trigger D1.

[0133] 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_dl ); 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 respectively 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 respectively 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.

[0134] Specifically, the sample-and-hold module 305 of the present invention is composed of n forward output units and n derivative units, wherein the n forward output units 305-1 are connected to the n first comparators in a one-to-one correspondence, and the n derivative units 305-2 are connected to the n first comparators in a one-to-one correspondence.

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

[0136] First, the positive output signal (a random binary signal with a value of "0" or "1") output by the previous network layer is used as the input signal of the current network layer. Subsequently, a voltage converter (first voltage conversion module 301) is used to convert the digital signal in the trigger of the positive output unit of the previous network layer into a read voltage (first voltage signal) and apply it to the input end of the adjustable conductivity array (i.e., the horizontal conductor). When the digital signal is "0", it corresponds to zero voltage, and when the digital signal is "1", it corresponds to a read voltage V R Here we need to read the voltage V R Should be small enough not to cause the state of the electrically adjustable conductivity device to change. For example, for a typical resistive memory device, V R =0.1V reading voltage (V R = -0.1V reading voltage, then the subsequent circuit needs to be adjusted accordingly).

[0137] The output terminal (i.e., vertical wire) of the adjustable conductance array (adjustable conductance module 302) is connected to the inverting input terminal of the transconductance amplifier. The positive input terminal of the transconductance amplifier is grounded, and the inverting input terminal is connected to a virtual ground. In this way, the current I j and the current I of the reference column (the (n+1)th vertical line) ref Respectively expressed as as well as At the same time, a noise current I is added to the output of the adjustable conductivity array. noise, obtaining the combined current. The noise current can be generated in various ways. The illustration in Figure 7 illustrates the noise current generated by amplifying the thermal noise of a resistor. No noise current is added to the output of the reference column of the adjustable conductance array.

[0138] The transconductance amplifier then converts the current into a voltage ( and Among them, R T The first resistor R1 and the second resistor R2 are both feedback resistors), and then the voltage comparator (the third operational amplifier P3) is used to compare the voltages ( and ) for comparison. The first comparator 300 comprises a transconductance amplifier and a voltage comparator. The comparator output is a digital signal (comparison signal) that is either low or high (representing "0" or "1"). Due to the presence of noise current, the comparator output fluctuates randomly.

[0139] Secondly, the output result of the voltage comparator is sampled and held by a trigger (the third trigger D3) at the rising edge of the clock. As the output of this network layer (the superscript l indicates this layer), that is, output the positive output signal of the current network layer and serve as the input of the next network layer (l+1 layer) In the next two clock cycles, another trigger circuit (composed of the second trigger D2 and the third trigger D3) and a logic circuit (logic gate U1) are used to sample, logically process and hold the result of the voltage comparator (third operational amplifier P3), and output the result as the derivative information of the activation function, that is, the derivative signal of the current network layer is output for the subsequent error back propagation process. Figure 8 shows the trigger clock signal that coordinates the completion of the above-mentioned information input and sampling output of each module in the circuit structure of Figure 7, where clk_o l is the first clock signal; clk_d l is the second clock signal; clk_o l-1 is the first clock signal of the upper network layer.

[0140] The following is an analysis of the effect of the above forward information propagation operation:

[0141] Assuming that the noise current follows the expectation of 0 and the variance is Gaussian distribution, that is Then the probability that the digital signal output by the voltage comparator (third operational amplifier P3) in FIG7 is high (that is, the probability that the positive output of the network layer is “1”) is:

[0142] That is, the noise current I noise Less than (I j -I ref ). And, according to the cumulative probability distribution of Gaussian distribution, formula (7) is transformed to:

[0143] Where erf(·) is the error function. Formula (8) is similar to the activation function Logistic function (one of the S-shaped functions, which is a nonlinear action function commonly used in BP neural networks, namely the sigmoid function), that is:

[0144] in,

[0145] Finally, in the derivative sampling circuit, the second flip-flop D2 and the third flip-flop D3 are used to perform two independent samplings on the signal described by formula (8) or formula (9). The logic gate U1 performs a logical NOT operation on the result of one sampling and then performs a logical AND operation with the result of the other sampling. Then, the derivative information (derivative signal of the current network layer) can be expressed as:

[0146] in, and Respectively express The results of one independent sampling and another independent sampling. Because, and The value of can only be "0" or "1". The value of can only be "0" or "1", then the derivative signal of the current network layer The probability of taking the value "1" is:

[0147] Then, it can be seen from formula (9) and formula (11) that, compared with the traditional neural network using the Logistic activation function, although the network layer output and derivative information proposed in the present invention are binarized, their probabilities of being "1" follow the form of the Logistic function and the derivative of the Logistic function.

[0148] Among them, the function of the activation function reflected by formula (9) is the result of the combined effect of the circuit structure and the probability density of the noise current. The operation of the derivative of the activation function reflected by 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) And the output of derivative information (derivative signal of the current network layer) Only one result output is needed, and there is no need to continuously sample to obtain the probability that they are "1".

[0149] Among them, the output of the network layer A trigger (first trigger D1) is required to perform a sampling, and the output of the derivative information Flip-flop circuits (the second flip-flop D2 and the third flip-flop D3) are required to perform two sampling operations. These three sampling operations must be performed independently. Dependent sampling will result in the derivative information output being permanently "0" or significantly reduce the effectiveness of subsequent neural network training. In this example, the three independent sampling operations are performed using flip-flops at different clock cycles (as shown in Figure 8).

[0150] In addition, Figure 7 uses an external noise current to achieve randomness in the binary output information. Equivalently, the intrinsic noise in the circuit can also be used to achieve output randomness. For example, thermal noise and 1 / f noise in the tunable conductance array device, noise in the transconductance amplifier circuit, or noise in the comparator can all serve as sources of output randomness. The relative magnitude of this noise can be adjusted by adjusting the signal-to-noise ratio and the bandwidth of each module in the circuit.

[0151] The back propagation process of error information is described below with reference to FIG6 and FIG9:

[0152] As shown in FIG9 , the product module 306 includes: n MOS transistors Q; the source (or drain) of each transistor is connected to the reverse 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.

[0153] Specifically, when the signal is in the reverse propagation process, 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, and the signal is transmitted from the second comparison module 308 to the product module of the previous network layer and then output, thereby completing the reverse propagation process of the signal:

[0154] First, the product module 306 converts the derivative signal of the current network layer (binarized signal, randomly taking "0" or "1", corresponding to FIG9 ) and the reverse output signal of the next network layer (binary symbolized error signal, with the value of "-1" or "1", corresponding to Figure 9 ) and multiply the obtained combined signal (ternary error signal, with values ​​of "-1", "0" or "1", corresponding to FIG9 ) 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 the read voltage V in FIG. 9 ). R ) is transmitted to the adjustable conductivity module 302; the adjustable conductivity module 302 converts the second voltage signal into a second current signal (corresponding to I in FIG. 9 i and I ref ), and then 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 reverse output signal of the current network layer (a binary symbolized error signal, with a value of "-1" or "1").

[0155] The two values ​​of the binary symbolized signal can be represented by a negative voltage signal and a positive voltage signal, respectively; the three values ​​of the ternary error signal can be represented by a negative voltage signal, a zero voltage signal, and a positive voltage signal, respectively. A voltage converter (the second voltage conversion module 307) is used to convert the ternary error signal into an analog read voltage signal and apply it to the input end of the adjustable conductivity array (i.e., the vertical conductor). For example, the ternary error with a value of -1, 0, or 1 can correspond to a read voltage V R , 0V and -V R . And, read the voltage V R Should be small enough not to cause the state of the adjustable conductivity device G to change. For example, for a typical resistive memory device, V R =0.1V reading voltage (V R = -0.1V, then the input connection method of the subsequent comparator circuit needs to be adjusted accordingly).

[0156] Furthermore, at the output end of the adjustable conductivity array (i.e., on the horizontal wire), the output end is connected to a virtual ground through a transconductance amplifier and the output current is converted into a voltage. A voltage comparator is then used to obtain the result of the error back propagation. The output of the voltage comparator should be a binary, symbolic error signal with a value of "-1" or "1", which can be represented by a negative voltage signal and a positive voltage signal, respectively. Then, the symbolic error output serves as the input of the error back propagated by the previous layer network. Among them, the function completed by Figure 9 can be reflected by formulas (12) and (13):

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

[0158] The following Figures 5, 6, 10, and 11 further illustrate the gradient update process (network weight update) of the neural network:

[0159] Furthermore, as shown in FIG5 and FIG10, the gradient accumulation module 309 includes: m*n counters C; a counter array consisting of m rows and n columns is formed by the m*n counters C, where one end of n counters C is connected to the line of each row, and the other end of m counters C is connected to the line of each column.

[0160] Among them, all vertical lines and horizontal lines serve as two input ends of the counter array. The horizontal line is connected to the forward output unit 205-1 of the previous network layer, and the vertical line is connected to the combined signal (ternary error signal) of the product module 306.

[0161] Figure 10 shows the circuit structure of the gradient accumulation and weight update process during neural network training. Figure 11 shows the flow chart of the gradient accumulation and weight update process, where N is the number of training samples.

[0162] When training a neural network, first, according to the aforementioned information forward propagation and error back propagation method, the random binary positive input information of each layer (the positive output signal of the previous network layer) is obtained. and ternary error information Here, we only take the weight adjustment process of the i-th row and j-th column in a layer as an example to illustrate. and ternary error information Multiplying them together, we get the gradient information of the overall output error of the neural network relative to the weight, that is, Since this gradient information is also ternary, that is, it can only take the value of "-1", "0" or "1", a signed counter unit (counter array) can be used to accumulate this gradient information, that is:

[0163] Then, we can enter the cycle of the next training sample and continuously accumulate gradient information (C ij At the same time, periodically monitor the accumulated gradient information (C ij ) exceeds 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 , and sends a negative conductance adjustment instruction (conductance adjustment instruction) to the conductance adjustment circuit in the conductance adjustment module 310. However, if the accumulated gradient information is lower than the negative threshold (-C th ), then add this threshold C to the counter ij ←C ij+C th Then, the conductivity adjustment circuit selects the device G that needs to adjust the conductivity. ij , according to the conductivity adjustment instruction, the conductivity increases or decreases G ij =G ij +ΔG, where ΔG (can be positive or negative) is the magnitude of the change in conductance. th Is a positive integer.

[0164] Secondly, a rough blind write method or a precise cyclic read-write method can be used to complete the above-mentioned conductivity adjustment instructions. The blind write method refers to sending a single, fixed write pulse to increase or decrease the conductance after receiving the conductivity adjustment instruction. Depending on the implementation method of the adjustable conductivity device G, the form of the write pulse and the port to which it is applied may be different. However, for all positive conductivity adjustment instructions, a consistent write pulse is used; and for all negative conductivity adjustment instructions, a consistent write pulse is also used. The circuit structure and execution process of the blind write method are relatively simple, but due to the non-ideal characteristics of the adjustable conductivity device G, each conductivity adjustment will have many nonlinear and fluctuating characteristics.

[0165] The cyclic read-write method first reads the current conductance value, then sets the target conductance value based on the desired conductance adjustment value, ΔG. The target value is reached by repeatedly adjusting the conductance up and down in a cyclical manner. This cyclic read-write method ensures that the change in conductance, ΔG, is uniform and accurate with each adjustment. However, a single conductivity 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.

[0166] However, it is found in practice that when a reasonable threshold is set for the gradient counter, the non-ideal characteristics of the adjustable conductance have little impact on the training effect of the neural network.

[0167] Although the above counter C ij The most straightforward approach is to use a digital counter circuit. However, various other approaches are also possible. For example, capacitor charging and discharging can be used: charging a capacitor indicates an increase in the cumulative gradient, while releasing a capacitor indicates a decrease in the cumulative gradient. The capacitor voltage is then detected to determine whether the accumulated gradient has reached or fallen below a certain threshold.

[0168] Finally, neural network inference involves only forward propagation of information. Therefore, the circuit described above for implementing forward propagation (Figure 7) can be directly used to perform neural network inference. The derivative unit is no longer required. However, due to the presence of noise currents and randomness, the output of each neural network layer has randomness. This randomness is desirable in neural network training. However, during inference, the accumulated randomness at each layer reduces inference accuracy.

[0169] To this end, two technical solutions can be used to restore or improve inference accuracy:

[0170] Solution 1: In the aforementioned forward information propagation scheme, the effects of noise are reduced or eliminated (i.e., the noise current generating circuit in Figure 7 is removed), converting the output of the adjustable conductance array in each layer of the neural network into a deterministic binary, digitized signal. This binary, digitized output signal serves as the input to the next layer of the network, thereby enabling forward information propagation layer by layer, completing the inference process.

[0171] Solution 2: Repeat the information forward propagation process layer by layer in the above information forward propagation solution multiple times, and determine the final inference result by voting at the output layer of the neural network. The flowchart of reasoning by voting at the output layer of the neural network is shown in Figure 12, where N is the number of repeated voting.

[0172] The final practice shows that the reasoning accuracy of Scheme 1 is moderate, and the reasoning accuracy of Scheme 2 increases continuously with the increase of the number of repetitions. After a large number of repetitions, a higher reasoning accuracy can be obtained, and it is better than the reasoning accuracy of the existing technical solutions.

[0173] Furthermore, referring to FIG. 13 , the present invention provides a method for operating a neural network training system based on an adjustable conductivity device. The method is applicable to the aforementioned adjustable conductivity device-based neural network training system 1, which comprises a plurality of sequentially connected previous network layers 2, current network layers 3, and next network layers 4. A typical operation of the network layer 3 in the method comprises the following steps:

[0174] 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 the input voltage signal to the adjustable conductance module 302;

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

[0176] A300, the first comparison module 303 compares the current magnitudes in the first current signal and outputs a comparison signal to the sampling and holding module 305;

[0177] A400, the sampling and holding module 305 performs a single sampling operation on the comparison signal to obtain the positive output signal of the current network layer;

[0178] A500, the sampling and holding module 305 performs multiple sampling operations and logical operations on the comparison signal to obtain the derivative signal of the current network layer; wherein the forward output signal of the current network layer is used as the input of the first voltage conversion module of the next network layer; the derivative signal of the current network layer is used for error back propagation.

[0179] In the first comparison module, the first current signal is superimposed with the noise current from the noise generation module 304; since the noise current is added to the first current signal, the comparison signal, the forward output signal and the derivative signal have certain random characteristics; in the sampling and holding module, the single sampling operation for generating the forward output signal and the multiple sampling operations for generating the derivative signal should be performed within three different clock cycles to ensure the independence of the sampling results.

[0180] Specifically, during the forward propagation of information, first, the first voltage conversion module 301 reads the forward output signal of the forward output unit 205-1 of the upper network layer 2 (the forward output signal includes a binary forward output signal, which is randomly 0 or 1), and converts the forward output signal of the upper network layer into an input voltage signal (corresponding to the read voltage V in FIG. 7 ). R ) and then transmitted to the adjustable conductance module 302. The adjustable conductance module 302 converts the input voltage signal into a first current signal (corresponding to I in FIG. 7 ). j and I ref ), and then transmitted to the first comparison module 303.

[0181] 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 (which is only a low-level or high-level digital signal) to the sampling and holding module 305. Finally, the forward output unit 305-1 in the sampling and holding module 305 performs a single sampling operation on the comparison signal and outputs the forward output signal of the current network layer (this network layer) (also a binary signal, randomly taking a value of 0 or 1). At the same time, the derivative unit 305-2 in the sampling and holding module 305 performs two sampling operations (multiple sampling operations) and a logical operation on the comparison signal and outputs the derivative signal of the current network layer (a binary derivative signal, randomly taking a value of 0 or 1). The forward output signal and the derivative signal are not necessarily equal.

[0182] Furthermore, referring to FIG. 14 , the method for neural network training based on a conductivity adjustable device further includes:

[0183] B100. During the error back propagation process, the product module 306 multiplies the derivative signal of the current network layer by the reverse output signal of the next network layer, and transmits the multiplication result to the second voltage conversion module 307.

[0184] B200, the second voltage conversion module 307 converts the multiplication result into a reverse input voltage signal and transmits the signal to the adjustable conductance module 302;

[0185] B300, the adjustable conductance module 302 processes the reverse input voltage signal and transmits the obtained second current signal to the second comparison module 308;

[0186] B400, the second comparison module 308 compares the current magnitudes in the second current signal to obtain a reverse output signal of the current network layer;

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

[0188] Specifically, when the error back propagation process is performed, similarly, first, the product module 306 multiplies the derivative signal of the current network layer (binarized derivative signal, randomly taking "0" or "1") with the reverse output signal of the next network layer (binary symbolized error signal, taking the value of "-1" or "1"), and transmits the obtained multiplication result (ternary error signal, taking the value of "-1", "0" or "1") to the second voltage conversion module 307.

[0189] Then, the second voltage conversion module 307 converts the multiplication result into a reverse input voltage signal (analog voltage signal) and transmits it to the adjustable conductance module 302. Next, the adjustable conductance module 302 processes the reverse 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 reverse input voltage signal using the second current signal and transmits the resulting reverse output signal of the current network layer (a binary symbolized error signal, with a value of "-1" or "1").

[0190] Furthermore, referring to FIG15 , the method for neural network training operation based on the adjustable conductivity device further includes:

[0191] A10. During the update process of the network weights, the gradient accumulation module 309 calculates the gradient signal based on 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;

[0192] A20, the gradient accumulation module outputs a conductance adjustment instruction to the conductance adjustment module 310 according to the accumulation result of the gradient signal; wherein the gradient signal is a three-valued signal;

[0193] A30. The conductance adjustment module 310 adjusts the conductance of the target unit in the adjustable conductance module 302 according to the conductance adjustment instruction.

[0194] Specifically, when performing online weight adjustment (network weight update):

[0195] First, the gradient accumulation module 309 calculates the gradient signal (a ternary signal, taking the values ​​of "-1," "0," or "1") based on the positive output signal of the previous network layer and the combined signal, and accumulates the gradient signal. When the accumulated weight gradient information reaches a certain threshold, the gradient accumulation module 309 outputs a conductance adjustment instruction based on the accumulated gradient signal to the conductance adjustment module 310. The conductance adjustment module 310 adjusts the weight (i.e., conductance value) of the corresponding device (target unit) in the adjustable conductance module 302 according to the conductance adjustment instruction, for example, by adjusting the conductance positively or negatively. The accumulated gradient signal is a signed integer (which can be a positive integer, zero, or a negative integer).

[0196] In summary, the present invention proposes a neural network training operating system and method based on an adjustable conductivity 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 for processing the negative input voltage signal and outputting a second current signal; an adjustable conductivity module for processing the input voltage signal and outputting a first current signal; a first comparison module for comparing the first current signal; a sampling and holding 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 negative error signal of the next network layer with the derivative signal; a second voltage conversion module for converting the multiplication result into a negative input voltage signal; and a second comparison module for comparing the second current signal and outputting the negative error signal of the current network layer. The above method enables information transmission between network layers to be binary, saving computing resources and reducing power consumption.

[0197] It is understandable that those skilled in the art can make equivalent substitutions or changes based on the technical solution and inventive concept of the present invention, and all these changes or substitutions should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A neural network training operating system based on a conductance adjustable device, consisting of multiple interconnected network layers, It is characterized in that A network layer in the neural network training operating system based on the adjustable conductivity device includes: a first voltage conversion module, an adjustable conductivity module, a first comparison module and a sampling and holding module; The first voltage conversion module is connected to the forward output unit of the previous network layer; the first voltage conversion module, the adjustable conductance module, the first comparison module and the sampling and holding module are connected in sequence; The first voltage conversion module is used to read the positive output signal in the positive output unit of the previous network layer, and after converting the positive output signal into an input voltage signal, transmit it to the adjustable conductance module; the adjustable conductance module is used to process the input voltage signal, and transmit the obtained 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 the comparison signal to the sampling and holding module; the sampling and holding module is used to perform a single sampling operation on the comparison signal to obtain the positive output signal of the current network layer, and is used to perform multiple sampling operations and logic operation operations on the comparison signal to obtain the derivative signal of the current network layer; Among them, the input voltage signal and the first current signal of the adjustable conductivity 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.

2. The neural network training operating system based on the conductance adjustable device according to claim 1, It is characterized in that The network layer further comprises: 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 sampling and holding module; The product module is used to multiply the derivative signal of the current network layer with the reverse output signal of the next network layer, and transmit the multiplication result to the second voltage conversion module; the second voltage conversion module is used to convert the multiplication result into a reverse input voltage signal and transmit it to the adjustable conductance module; the adjustable conductance module is also used to process the reverse input voltage signal and transmit the obtained second current signal to the second comparison module; the second comparison module is also used to compare the current size in the second current signal to obtain the reverse output signal of the current network layer; Among them, the reverse input voltage signal and the second current signal of the adjustable conductivity 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 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 the conductivity adjustable device according to claim 2, It is characterized in that The network layer also includes: a gradient accumulation module and a conductance regulation module; The conductance adjustment module is connected to the gradient accumulation module and the adjustable conductance 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 the gradient signal according to the multiplication result of the forward output signal of the previous network layer and the product module, and accumulate it; the gradient accumulation module is also used to output the conductance adjustment instruction to the conductance adjustment module according to the accumulation 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 instruction; Wherein, the gradient signal is a three-valued symbolized signal; the accumulated result of the gradient signal is a signed integer; and the conductivity adjustment instruction includes the position information of the conductivity unit to be adjusted, the direction and amplitude of the conductivity adjustment.

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

5. The neural network training operating system based on the conductivity adjustable device according to claim 1, It is characterized in that The adjustable conductivity module includes: (m+1)*(n+1)-1 adjustable conductivity devices; Among them, m*(n+1) adjustable conductivity devices form an adjustable conductivity matrix of m rows and (n+1) columns to process the input current. a voltage signal, and outputs a first current signal; one end of the (n+1) adjustable conductivity devices in each of the m rows is connected to each other, and the other ends of the m adjustable conductivity devices in each of the (n+1) columns are connected to each other; one end of the (n+1) adjustable conductivity 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 conductivity devices in each of the (n+1) columns is also connected to a comparator unit in the first comparison module; Among them, (m+1)*n adjustable conductivity devices form an adjustable conductivity matrix of (m+1) rows by n columns for processing the reverse input voltage signal and outputting the second current signal; one end of the n adjustable conductivity devices on each row in the (m+1) rows are connected to each other, and the other end of the (m+1) adjustable conductivity devices on each column in the n columns are connected to each other; one end of the n adjustable conductivity devices on each row in the (m+1) rows is also connected to a comparator unit in the second comparison module; the other end of the (m+1) adjustable conductivity devices on each column in the n columns is also connected to a voltage converter unit in the second voltage conversion module; wherein m and n are both positive integers.

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

7. The neural network training operating system based on the conductance adjustable device according to claim 4, It is characterized in that The noise generating module comprises: a voltage dividing unit, a filtering unit, a fourth operational amplifier unit and a noise converting unit; the voltage dividing unit, the filtering unit, the fourth operational amplifier unit and the noise converting unit are connected in sequence; the voltage dividing unit is used to divide the power supply and output the divided voltage to the filtering unit; the divided voltage includes the thermal noise of the resistor; the filtering 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 converting unit; the noise converting unit is used to convert the amplified noise voltage into a noise current and transmit it to the first comparing module.

8. The neural network training operating system based on the conductance adjustable device according to claim 7, It is 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 end of the first operational amplifier and the positive input end of the third operational amplifier are connected, the other end of the first resistor is respectively connected to the adjustable conductivity module and the reverse input end of the first operational amplifier, and the positive input end of the first operational amplifier is grounded; one end of the second resistor, the output end of the second operational amplifier and the reverse input end of the third operational amplifier are connected, the other end of the second resistor is respectively connected to the adjustable conductivity module, the noise conversion unit and the reverse input end of the second operational amplifier, and the positive input end of the second operational amplifier is grounded.

9. The neural network training operating system based on the conductance adjustable device according to claim 8, It is characterized in that The sampling and holding module includes: a forward output unit and a derivative unit; the forward output unit and the derivative unit are both connected to the output end of the third operational amplifier; The forward output unit is used to perform a single sampling operation on the comparison signal of the first comparison module to obtain the forward output signal of the current network layer; the derivative unit is used to perform multiple sampling operations on the comparison signal and perform a logical operation operation to obtain the derivative signal of the current network layer; Among them, the forward output signal is transmitted to the first voltage conversion module of the next layer of network; and the derivative signal is used in the product module of this network layer.

10. The neural network training operating system based on the conductance adjustable device according to claim 9, It is characterized in that The forward output unit includes: a first trigger and a first clock signal; the data input terminal of the first trigger 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 trigger.

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

12. A neural network training operation method based on an adjustable conductivity device, wherein the neural network training operation method based on an adjustable conductivity device is applicable to the neural network training operation system based on an adjustable conductivity device according to any one of claims 1 to 11, It is characterized in that The neural network based on the adjustable conductivity device is applied to the following neural network training operation method: forward propagation of information, back propagation of errors and updating of network weights. The neural network training operation method based on the adjustable conductivity device includes the following steps: During the forward propagation of information, the first voltage conversion module reads the forward output signal in 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 conductance module; The adjustable conductivity module processes the input voltage signal and transmits the obtained 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 sampling and holding module; The sampling and holding module performs a single sampling operation on the comparison signal to obtain a positive output signal of the current network layer; The sampling and holding module performs multiple sampling operations and logic operation operations on the comparison signal to obtain a derivative signal of the current network layer; The forward output signal of the current network layer is used as the input of the first voltage conversion module of the next network layer; and the derivative signal of the current network layer is used for error back propagation.

13. The method for neural network training operation based on the conductivity adjustable device according to claim 12, It is characterized in that The neural network training operation method based on the adjustable conductivity device also includes: During the back propagation of the error, the product module multiplies the derivative signal of the current network layer by the reverse 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 a reverse input voltage signal and transmits the reverse input voltage signal to the adjustable conductance module; The adjustable conductivity module processes the reverse input voltage signal and transmits the obtained second current signal to the second comparison module; The second comparison module compares the current magnitudes in the second current signal to obtain a reverse output signal of the current network layer; Among them, the input of the product module of the current network layer comes from the derivative signal of the current network layer and the reverse output signal of the next network layer; the reverse output signal of the current network layer is used for the product module of the previous network layer.

14. The method for neural network training operation based on the conductivity adjustable device according to claim 12, It is characterized in that The neural network training operation method based on the adjustable conductivity device also includes: In the process of updating the network weights, the gradient accumulation module calculates the gradient signal based on the forward output signal of the previous network layer and the product result of the product module in the current network layer, and accumulates it; The gradient accumulation module outputs a conductance adjustment instruction to the conductance adjustment module according to the accumulation result of the gradient signal; The conductance adjustment module adjusts the conductance of the target unit in the adjustable conductance module according to the conductance adjustment instruction.

Citation Information

Patent Citations

  • Analog multiplier-accumulators

    CN108536422A

  • Memory processing unit

    CN112154506A

  • Transistorless all-memristor neuromorphic circuits for in-memory computing

    CN113924581A

  • Circuit for calculating weight adjustments of an artificial neural network, and a module implementing a long short-term artificial neural network

    US20210097379A1

  • Neural network circuit and neural network system

    US20220374694A1