Handwritten digital image classification and recognition method based on stochastic threshold switch memristor

By constructing a handwritten digit image classification method based on random threshold switching memristors, the energy consumption bottleneck and dynamic characteristic simulation problems of traditional recognition technology are solved, efficient and low-energy handwritten digit recognition is achieved, and recognition accuracy and network performance are improved.

CN118968523BActive Publication Date: 2025-10-17ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410998538.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2025-10-17
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

Existing handwritten digit recognition technology is based on the traditional von Neumann architecture, which has an energy consumption bottleneck and makes it difficult to effectively simulate the dynamic and random electrical characteristics of memristors, resulting in low recognition efficiency and high cost, and a lack of physical explainability.

Method used

A handwritten digit image classification method based on random threshold switching memristor is adopted. By constructing a random motion model of particles in forward or reverse motion, a one-dimensional dynamic Monte Carlo method is established to describe the dynamic process of the system, and a discrete-time differentiable distribution model is derived. A multi-layer fully connected spiking neural network is constructed, and handwritten digit image classification is performed using a Poisson encoder and a random threshold switching memristor model.

Benefits of technology

The accuracy of handwritten digit recognition is improved, computing cost and power consumption are reduced, the complexity of the memristor neuron model is increased, the robustness to non-ideal factors is enhanced, a reference model that better fits the electrical characteristics of the device is provided, and the performance of the neural network is optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968523B_ABST
    Figure CN118968523B_ABST
Patent Text Reader

Abstract

The application discloses a handwritten digital image classification and recognition method based on a random threshold switch memristor, and comprises the following steps: acquiring handwritten digital image classification and recognition data sets, normalizing and flattening the handwritten digital image gray value into a one-dimensional matrix, and constructing a Poisson encoder corresponding to the original channel of the digital image; constructing a handwritten digital image classification and recognition pulse neural network, connecting the Poisson encoder to a neuron composed of a random threshold switch memristor model through a synapse, outputting the recognition result corresponding to the handwritten image by an output neuron; training the handwritten digital image classification and recognition pulse neural network through the data sets; inputting the flattened handwritten digital image into the trained handwritten digital image classification and recognition pulse neural network, and obtaining the handwritten digital image classification and recognition result. The application has important practical application value for solving a series of technical problems related to high-performance, low-energy consumption storage and calculation integrated network architecture in the application field of handwritten digital image recognition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of microelectronics, in particular to a handwritten digital image classification and recognition method based on a random threshold switch memristor. BACKGROUND

[0002] In real life, we often face many handwritten digital scenarios. However, if we consider the electronicization of such handwritten digital information, simply relying on manual identification will result in low efficiency, high cost, and general accuracy, so it is necessary to realize the automatic identification of handwritten digits. At present, with the development of electronic information technology, the recognition accuracy of such handwritten digital application scenarios is increasingly improved. However, at the same time, since the existing recognition technology is mainly based on the traditional von Neumann architecture, it is urgent to break through the energy bottleneck. Therefore, how to introduce a memory and calculation integrated architecture based on a memristor in this application scenario has become a big problem that needs to be solved.

[0003] On the other hand, the development and application of memristors have attracted widespread attention in the field of modern microelectronics. The working mechanism of the metal conductive filament memristor device includes multiple physical processes, such as metal oxidation, ion transition in the electrolyte, and adsorption and reduction on the electrode. The switching process of the memristor is mainly dominated by two factors: charge transport and ion diffusion / drift. At present, there are still many challenges in the random model research related to volatile memristors. If you want to realize the handwritten digital recognition application circuit simulation of neuromorphic computing devices, the first step is to complete the construction of such a model. At present, the compact model for memristors mostly focuses on the steady-state characteristics or ideal electrical characteristics of the device, and few studies on dynamic characteristics and randomness. Related dynamic and random models either delve into the underlying physical mechanism and use computationally expensive numerical simulation methods, or directly start from the apparent electrical characteristics and lack physical interpretability.

[0004] Under this background of the prior art, it is necessary to design new volatile memristor models for better application in handwritten digital recognition schemes. These models have certain physical interpretability and low computational cost, and can well simulate the dynamic and random electrical characteristics of the device. This is a key step for deep learning and optimization of pulse neural networks, and a necessary condition for efficient circuit simulation. Therefore, a large-scale array pulse neural network can be constructed according to the model, and the recognition application network can be optimized. Therefore, the existing technology still needs to be improved and developed. SUMMARY

[0005] The present application aims at the deficiencies of the prior art and proposes a handwritten digital image classification and recognition method based on a random threshold switch memristor.

[0006] The application aims at realizing the technical scheme as follows: a handwritten digital image classification and recognition method based on a random threshold switch memristor, comprising the following steps:

[0007] An handwritten digital image classification and recognition data set is acquired, and the gray value of the handwritten digital image is normalized and flattened into a one-dimensional matrix to construct a Poisson encoder corresponding to the original channel of the digital image.

[0008] An handwritten digital image classification and recognition pulse neural network is constructed, the Poisson encoder is connected to a neuron composed of a random threshold switch memristor model through a synapse, and the recognition result corresponding to the handwritten image is output by an output neuron.

[0009] The construction of the random threshold switch memristor model comprises: establishing a random motion model of particle forward or reverse motion, adopting a one-dimensional dynamic Monte Carlo to describe the system dynamic process according to the balance state of the memristor and the particle random motion model, establishing an intensive model of particle state random conversion time, deriving a differentiable distribution model of discrete time, representing a relationship model of the transition of the switch state of the memristor and time and external stimulation, and obtaining a required memristor component model.

[0010] The handwritten digital image classification and recognition pulse neural network is trained through the data set; the handwritten digital image is input into the trained handwritten digital image classification and recognition pulse neural network after being flattened to obtain a handwritten digital image classification and recognition result.

[0011] Further, the pixel number of the handwritten digital image flattened into a one-dimensional matrix is consistent with the channel number of the Poisson encoder in the handwritten digital image classification and recognition pulse neural network, the gray value of the pixel is normalized to a value between 0 and 1, and the average pulse emission rate of each channel is corresponded.

[0012] Further, the handwritten digital image classification and recognition pulse neural network is a multi-layer fully connected pulse neural network, the input of the first layer is the Poisson encoder corresponding to the original image, the input is connected to the neuron composed of the random switch threshold model through a synapse; the 10 output neurons of the last layer correspond to the recognition results of the handwritten digits 0 to 9 respectively; the neuron with the highest pulse emission frequency in the output layer is recognized as the classification result of the network.

[0013] Further, the establishment of the random motion model of particle forward or reverse motion specifically comprises:

[0014] The rate of oxidation or reduction of metal atoms is calculated by the following formula:

[0015]

[0016] wherein, vr is a constant term for redox rate fitting, E r is the activation energy, and a is the charge transfer coefficient, V T is the threshold voltage in DC test, T is the local temperature of the device, k B is the Boltzmann constant, q is the charge amount of a unit electron, V is the voltage applied across the device;

[0017] The rate of the forward or reverse transition process of metal ions is calculated by the following formula:

[0018]

[0019] Where, v h is the vibration frequency, E h is the transition barrier height in the dielectric, where the influence of the residual nanoclusters on the transition barrier is U l which can be calculated by the formula:

[0020]

[0021] Where, l c is the equivalent length of the residual nanoclusters, R c is the radius of the influence of the nanoclusters on the electric potential field, w0 is the amplitude of the influence of the nanoclusters on the electric potential field, and l is the length of the current conduction filament. The local electric field influence factor γ g representing the transition barrier can be calculated by the following formula:

[0022] γ g = γ0- γ3g 3 ,

[0023] Where γ0 and γ3 are fitting parameters, and g is the gap size between the current conduction filament and the electrode on the other side.

[0024] Further, the intensive model for establishing the particle state random transition time specifically includes:

[0025] The equilibrium state of the volatile memristor is: when the threshold voltage V T is applied in the DC test, the current conduction filament just starts to grow, or when the holding voltage V H is applied, the current conduction filament just starts to break, and the expression is as follows:

[0026]

[0027] According to the equilibrium state expression, substituting the specific expression of the forward / backward transition rate, the following relationship is obtained:

[0028] γ(g max )V T = U(L-gmax ),g max = L - l c ,

[0029] and γ (g min ) V H = U (L - g min ),g min = 0,

[0030] where L is the thickness of the medium layer, g max is the length of the time gap when the conductive filament just starts to grow, g min is the length of the time gap when the conductive filament just starts to break;

[0031] The one-dimensional kinetic Monte Carlo is used to describe the dynamic process of the system: the internal relationship when the state of the particle changes is as follows:

[0032]

[0033] where t ′ is the time of the last state transition of the particle, u is a random variable sampled from a uniform distribution , is the state transition that can occur, including: represents the direction of state transition of the particle in the current state, when the particle is in the redox stage, when the particle is oxidized but at the interface, when the particle is oxidized but in the medium layer, Thus, the model of the random state transition time of the particle is obtained.

[0034] Further, the derivable distribution model of the discrete event includes:

[0035] n0 is the critical number of forward transitions required for the device to open, and the number of forward transitions of the particle when the device is closed minus the number of reverse transitions is greater than n0, so that the opening probability when the device is closed is:

[0036]

[0037] where Γ is the upper incomplete gamma function, N + is the number of forward transitions, N - is the number of reverse transitions, n0 is the critical number of forward transitions required for the device to open, λ + represents the expectation of the number of forward transitions in a single period, λ - represents the expectation of the number of reverse transitions in a single period,

[0038] The off probability when the device is on satisfies:

[0039] p reset = Pr{N - > n0} = 1 - Pr{N + < n0} = Pr{N

[0040] where n0 is the critical number of reverse transitions needed for the device to turn off;

[0041] Taking the overall performance of the device in a single pulse cycle as the research object, the uniform distribution is converted into a geometric distribution by using the reparameterization technique:

[0042]

[0043] where u satisfies the uniform distribution p depends on the current device state, if the device is off we choose p fire , otherwise we choose p reset , ΔT generated by this represents the time interval needed for the next device switching to occur, here ΔT follows a geometric distribution; the relationship between the transition of the device switching state and time, external stimulus is obtained:

[0044] δ t = (t - t ′ ) - ΔT,

[0045]

[0046] where t is the current time, t ′ is the time of the last device state change, m t is the binary state transition mask, if it is 1, it means that the current switching state needs to be reversed, otherwise it remains the same;

[0047] The alternative gradient method is used to estimate the state transition mask m t with respect to the sampling time interval ΔT:

[0048]

[0049] where m t is equal to the step function whose value is δ t , and SigmoidSpike is selected for gradient substitution. The switching state of the device is represented as:

[0050] s t+1 = (1 - s t ) · m t + s t · (1 - m t ),

[0051] Wherein, s=1 means that the device is in an on state, and s=0 means that the device is in an off state; all steps of modeling random switching events can back-propagate gradients.

[0052] Further, the training of the handwritten digital image classification and identification pulse neural network by the data set is specifically:

[0053] A preset training end condition is used to input the training data set to the initialized neural network, determine a loss function value according to a result output by the neural network, and update synaptic parameters in the neural network; the updated neural network parameters are used as parameters of a new neural network to be trained, the training data set is input to the neural network to be trained again, and the above training steps are repeated until the performance of the updated neural network on the test set is improved by less than the preset condition, and then the training is stopped.

[0054] On the other hand, the specification provides a handwritten digital image classification and identification device based on a random threshold switch memristor, comprising a memory and one or more processors, the memory stores executable code, and the processor executes the executable code to realize the handwritten digital image classification and identification method based on the random threshold switch memristor.

[0055] On the other hand, the specification provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the handwritten digital image classification and identification method based on the random threshold switch memristor.

[0056] The beneficial effects of the present application are:

[0057] The present application provides a novel pulse neural network construction and optimization method based on a memristor with random threshold switch behavior, which can be applied to solve the classification problem of handwritten digital images. Compared with the previous neural network model, the precision, convergence characteristics and computational cost are improved, and the power consumption of the use scenario is further reduced while ensuring the accuracy of handwritten digital recognition. Secondly, the introduction of the technical solution increases the complexity of the volatile memristor neuron model in the device, enabling it to handle more complex memristor threshold switching problems, such as the correlation between the voltage across the memristor and the switching state transition interval time, providing a new reference for the implementation of other application scenarios. In addition, the introduction of the volatile memristor model in the network plays an important role in understanding the principle of the memristor and optimizing the performance of the neural network. The introduction of the model provides a reference model that is more consistent with the electrical characteristics of the device for the training of the neural network, in order to find the optimal operating point; increase the robustness of the algorithm to non-ideal factors, so that a wider range of devices can be applied to neuromorphic computing. Finally, the effect of the volatile memristor model is verified through experiments, ensuring the feasibility and effectiveness of applying the model in the network.

[0058] The application provides a novel handwritten digital image classification and recognition method based on a random threshold switch behavior memristor, and has important practical application value for solving a series of technical problems related to a high-performance, low-energy consumption calculation and storage integrated network architecture in a handwritten digital image recognition application field. BRIEF DESCRIPTION OF DRAWINGS

[0059] Figure 1 is a schematic diagram of the initial state and growth process of a conductive filament in a device;

[0060] Figure 2 is a graph of the relationship between input voltage and switch probability obtained through experiments and simulation;

[0061] Figure 3 is a schematic diagram of a random threshold switch model experiment and simulation provided by an embodiment of the application;

[0062] Figure 4 is a graph of the output results of the device obtained through experiments and simulation under pulse testing;

[0063] Figure 5 is a schematic diagram of a handwritten digital recognition application pulse neural network based on a volatile memristor model;

[0064] Figure 6 is the recognition result output by the classification pulse neural network system proposed by the application after inputting a digital "5" image;

[0065] Figure 7 is a comparison of the accuracy of a traditional LIF neuron pulse neural network and the novel network architecture proposed by the application in an MNIST handwritten digital recognition task;

[0066] Figure 8 is a schematic diagram of a handwritten digital image classification and recognition device based on a random threshold switch memristor proposed by an embodiment of the application. DETAILED DESCRIPTION

[0067] The specific embodiments of the application will be further described in detail below with reference to the accompanying drawings.

[0068] As shown in Figure 1 , the application provides a handwritten digital image classification and recognition method based on a random threshold switch memristor, and the method comprises:

[0069] acquiring handwritten digital image classification and recognition data sets, normalizing and flattening the handwritten image grayscale values into a one-dimensional matrix, corresponding the grayscale values to pulse emission rates, and constructing a Poisson encoder of the corresponding handwritten digital image original channel;

[0070] To realize the memristor model in the network, a one-dimensional dynamic Monte Carlo process is established to simulate the random dynamic process of particles in the internal system of the volatile memristor;

[0071] Based on the Monte Carlo process established above, a description method based on the perspective of atomic-level particles is introduced, and the influence of ion migration dynamics on the threshold switching behavior of the device is considered, and then the model of the random state transition time of particles is obtained;

[0072] Based on the model established above, by comparing the relationship between the pulse characteristics and the switching change characteristics, the differentiable distribution model of discrete events is derived, so as to realize the required memristor device model, so that the model can predict the random behavior of the device at a lower computational cost;

[0073] Finally, according to the proposed device model, the Poisson encoder is connected to the neuron composed of the random threshold switching memristor model through the synapse, and the recognition result corresponding to the handwritten image is output by the output neuron. A large-scale pulse neural network table is constructed, and the synaptic weight is iteratively trained so that the network system can complete the recognition and classification task of the handwritten digital set, and show better recognition accuracy and convergence than the traditional LIF neuron network.

[0074] Specifically, the Poisson encoder corresponding to the handwritten digital image is constructed:

[0075] To realize the input and processing of handwritten digital image signals in the system, a multi-channel Poisson encoder corresponding to the handwritten digital image is constructed here, where the pulse emission frequency of each channel corresponds to the gray value of the pixel in the image. The construction process of the multi-channel Poisson encoder is as follows:

[0076] The input handwritten digital image with a pixel size of 28x28 is flattened into a one-dimensional matrix with a length of 784, where the gray value of each pixel is normalized to a value between 0 and 1, corresponding to the average pulse emission rate of different pixels.

[0077] Since the number of pulses emitted in a period of time follows a Poisson distribution, after random sampling of the average emission rate, a Poisson encoder can be generated that can restore the original data. The greater the gray value of a single pixel, the higher the pulse emission frequency of the corresponding channel. In addition, the longer the simulation time, the better the encoder restores the original image, and the higher the simulation accuracy.

[0078] Specifically, the random motion model of the forward or reverse motion of the particles includes:

[0079] Here, the random threshold switching memristor is used to realize the neuron structure in the neural network, and the realization of the corresponding device model requires the establishment of a multi-stage model.

[0080] The resistance switching process of a memristor involves multiple physical processes. Metal atoms are oxidized into mobile ions, which can make forward or backward transitions to the other side of the electrode and be reduced. In addition, due to surface diffusion effects, it is also possible to form clusters in the dielectric. The basic structure of the device is shown in Figure 1 , where the left side is the initial state of the conductive filament in the device, and the right side is the growth process of the conductive filament. For the convenience of the intensive model, this paper mainly considers the two influencing factors of charge transfer and ion diffusion / drift, and divides the corresponding formula into oxidation and reduction processes, so that the model can more accurately reflect the real situation.

[0081] In this model, the rate of oxidation or reduction of metal atoms is calculated by the following formula:

[0082]

[0083] where v r is a constant term for fitting the oxidation-reduction rate, E r is the activation energy, α is the charge transfer coefficient, V T is the threshold voltage in the DC test, T is the local temperature of the device, k B is the Boltzmann constant, q is the charge of a unit electron, and V is the voltage applied across the device.

[0084] The transition of metal ions in the dielectric layer will cause the growth and breakage of the metal filament, and the rate of forward or reverse transition of metal ions can be calculated by the following formula:

[0085]

[0086] where v h is the vibration frequency, E h is the transition barrier height in the dielectric. The influence of residual nanoclusters on the transition barrier U l can be calculated by the formula:

[0087]

[0088] where l c is the equivalent length of the residual nanoclusters, R c is the influence radius of the nanoclusters on the electric potential field, w0 is the influence amplitude of the nanoclusters on the electric potential field, and l is the length of the current conductive filament. The local electric field influence factor γ g representing the transition barrier can be calculated by the following formula:

[0089] γ g = γ0- γ3g 3 ,

[0090] Among them, γ0 and γ3 are fitting parameters, and g is the gap between the conductive filament and the electrode on the other side.

[0091] The intensive model for obtaining the random transition time of particle states includes:

[0092] Under DC test, when the threshold voltage V T When the conductive filament just starts to grow, or a holding voltage V is applied H When the conductive filament just begins to break, the volatile memristor reaches a state of equilibrium, and it is easy to see that its internal state satisfies the relationship:

[0093]

[0094] According to the equilibrium state expression, substituting the specific expression of forward / backward transition rate into it, the following relationship can be obtained:

[0095] γ(g max )V T =U(Lg max ),g max =Ll c ,

[0096] and γ(g min )V H =U(Lg min ),g min =0,

[0097] Where L is the thickness of the dielectric layer, g max is the length of the gap when the conductive filaments begin to grow, g min is the length of the gap when the conductive filament just begins to break.

[0098] When using one-dimensional dynamic Monte Carlo to describe the dynamic process of the system, when the particle state changes, we believe that the following relationship is satisfied:

[0099]

[0100] Among them, t' is the time when the particle state transition occurs for the last time, and u is the time when the particle state transition occurs for the last time. A random variable sampled from , For any possible state transition, in the present invention, Represents the direction of state transition that may occur in the current state of the particle. For example, when the particle is in the redox stage, When the particles are oxidized but at the interface, When the particles are oxidized but in the dielectric layer, Thus the model of the random state transition time of particles can be obtained.

[0101] Deriving the differentiable distribution model of discrete events includes:

[0102] Assuming n0 is the critical number of forward transitions required for the device to open, the number of forward transitions minus the number of reverse transitions required for the device to open when the device is closed is greater than n0, thus the opening probability of the device when it is closed is:

[0103]

[0104] Where Γ is the upper incomplete gamma function, N + is the number of forward transitions, N _ is the number of reverse transitions, n0 is the critical number of forward transitions required for the device to open, λ + represents the expectation of the number of forward transitions in a single period (Δt) λ - represents the expectation of the number of reverse transitions in a single period

[0105] Similarly, the closing probability of the device when it is open satisfies:

[0106] p reset = Pr{N - >N + +n1},

[0107] Where n0 is the critical number of reverse transitions required for the device to close. Figure 2 is the input voltage and device switching probability relationship diagram obtained through experiments and simulations.

[0108] At this time, if the overall performance of the device in a single pulse period is taken as the research object, the uniform distribution can be converted into a geometric distribution using the reparameterization technique:

[0109]

[0110] Where u satisfies the uniform distribution p depends on the current state of the device, if the device is closed we choose p fire , otherwise we choose p reset , thus the resulting ΔT represents the time interval (in pulse numbers) required for the next device switching to occur, here ΔT follows a geometric distribution. The relationship between the transition of the device switching state and time, external stimulation can be obtained:

[0111] δ t = (t-t ′ )-ΔT,

[0112]

[0113] Where t is the current time, t ′ The time when the device status last changed, m t It is a binary state conversion mask. If it is 1, it means that the current switch state needs to be reversed, otherwise it remains the same.

[0114] At this time, the substitute gradient method is used to estimate the state transition mask m t The derivative with respect to the sampling time interval ΔT:

[0115]

[0116] Among them, m t Equal to the value of δ t The step function is replaced by SigmoidSpike. The switching state of the device can be expressed as:

[0117] s t+1 =(1-s t )·m t +s t ·(1-m t ),

[0118] Here, s = 1 means the device is on, and s = 0 means it is off. All steps in modeling random switching events can now backpropagate gradients. Therefore, the constructed memristor device model can be used as a basic differentiable computational module in neural network optimization.

[0119] Model validation and experiments:

[0120] Here, we experimentally validate the resulting compact model for random threshold switching devices. This was achieved by simulating the operating environment of a memristor in the laboratory and verifying the model's accuracy using real-world data. The model was validated using experimental data under various test conditions, and the simulation results were highly consistent with the experimental data.

[0121] like Figure 3 As shown, this embodiment performs 50 cycles of triangular wave experiments and simulations, where (a) (c) are experimental results, (b) (d) are simulation results, (a) (b) are current-voltage curves of single-turn switching of the device under triangular wave voltage sweep test, and (c) (d) are statistical results of device turn-on time under pulse test;

[0122] The random switching behavior can be observed, and since two integral processes are considered in the model of the embodiment, one is the redox reaction, and the other is the ion transition, the total integral time is dominated by the slowest process. Considering the use of the two processes to fit the model parameters and simulate the switching behavior with the ideal case and the KMC compact model, it can be seen that the experimental data in (c) are similar to the simulation results in (d). As shown in (e), under the pulse test condition, the model can observe the neuron emission and inhibition behavior similar to the experiment. Figure 4

[0123] After the experimental test and data collection, it is verified that the random threshold switch model used in the application is not only accurate and effective, but also can reveal the close relationship between the threshold switch behavior in the memristor and the threshold voltage and integration time, and has a lower calculation overhead.

[0124] Pulse neural network architecture construction and optimization based on the model:

[0125] Based on the random threshold switch device model and the Poisson encoder mentioned in the application, a neural network for handwritten digit classification tasks can be constructed. Figure 5 The constructed pulse neural network system based on the random threshold switch model is shown, and the network structure realized here is a two-layer fully connected pulse neural network of 784x128x10. The random threshold switch model proposed in the application acts as a neuron in the fully connected pulse neural network, and through network training to select appropriate internal system parameters, the network can realize the classification task of the MNIST handwritten digit dataset.

[0126] The specific implementation is that the Poisson encoder is connected to the neuron composed of the random threshold switch memristor model through the synapse, and the recognition result corresponding to the handwritten image is output by the output neuron. In the implemented pulse neural network structure, the input of the first layer is a 784-channel Poisson encoder corresponding to the original image, and the input is connected to 128 neurons composed of random switch threshold models through synapses; the 10 output neurons of the second layer correspond to the recognition results of handwritten digits 0 to 9 respectively. The neuron with the highest pulse emission frequency in the output layer is recognized as the classification result of the network, and the output result after inputting the handwritten digit "5" is as shown in (f). It can be seen that the output neuron corresponding to the digit "5" has the highest pulse emission frequency, and the system identifies the input digit as the digit "5", which is successful. Figure 6

[0127] After obtaining the circuit netlist of the neural network, appropriate internal system parameters need to be determined to obtain the best working point of the system and exhibit the expected high recognition accuracy and low power consumption overhead characteristics. Therefore, the process of training the handwritten digit image recognition network is the process of optimizing the synaptic weights in the system.

[0128] ​​The main optimization process includes inputting the training data set into the neural network initialized randomly through the Poisson encoder, and determining the loss function value according to the classification result output by the neural network.

[0129] The loss function uses the mean square error function. The pros and cons of the model are measured by calculating the square error between the predicted pulse emission rate and the expected pulse emission rate output by the neural network at this time. It is assumed that the closer the predicted value and the true value, the smaller the mean square error of the two.

[0130] At this time, the obtained result is used to update the synaptic weights in the neural network, wherein the rule for updating the weights is the Adam optimization algorithm, the updated neural network parameters are used as the weights of the new neural network to be trained, and the training data set is input into the neural network to be trained for a new round of training.

[0131] Here, the preset condition is that the output accuracy of five consecutive cycles does not improve, and the above training steps are repeatedly performed until the performance of the updated neural network on the test set improves less than the preset condition, and the training is stopped. Here, the pulse neural network realized by using the traditional LIF neuron model is compared with the network system realized by the present application, as shown in Figure 7 The pulse neural network proposed in the present application has a faster convergence speed and achieves higher classification accuracy on the handwritten digit test set.

[0132] Corresponding to the foregoing embodiment of the handwritten digital image classification and recognition method based on the random threshold switch resistive memory, the present application also provides an embodiment of a handwritten digital image classification and recognition device based on the random threshold switch resistive memory.

[0133] Referring to Figure 8 , the embodiment of the present application provides a handwritten digital image classification and recognition device based on the random threshold switch resistive memory, which includes a memory and one or more processors, the memory stores executable code, and the processor executes the executable code to implement the handwritten digital image classification and recognition method based on the random threshold switch resistive memory in the foregoing embodiment.

[0134] The embodiment of the handwritten digital image classification and recognition device based on the random threshold switch resistive memory provided by the present application can be applied to any device with data processing capability, which can be a device or apparatus such as a computer. The device embodiment can be realized by software, or by hardware or a combination of software and hardware. Taking software realization as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory and running by the processor of the device with data processing capability where it is located. From the hardware level, as shown in Figure 8As shown in the figure, it is a hardware structure diagram of an arbitrary data processing capable device where the handwritten digital image classification and recognition device based on the random threshold switch memristor provided by the application is located, in addition to the processor, the memory, the network interface, and the non-volatile memory Figure 8 In addition to the processor, the memory, the network interface, and the non-volatile memory, the arbitrary data processing capable device where the device in the embodiment is located can also include other hardware according to the actual functions of the arbitrary data processing capable device, and details are not described herein.

[0135] The implementation process of the functions and roles of each unit in the device is specifically described in the implementation process of the corresponding steps in the above method, and details are not described herein.

[0136] For the device embodiment, since it basically corresponds to the method embodiment, the related parts are described in the part of the method embodiment. The device embodiment described above is only schematic, and the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, that is, they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the application scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0137] The embodiment of the application also provides a computer readable storage medium, which stores a program, and the program is executed by a processor to realize the handwritten digital image classification and recognition method based on the random threshold switch memristor in the above embodiment.

[0138] The computer readable storage medium can be an internal storage unit of the arbitrary data processing capable device, such as a hard disk or a memory. The computer readable storage medium can also be an external storage device of the arbitrary data processing capable device, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. Further, the computer readable storage medium can include both the internal storage unit and the external storage device of the arbitrary data processing capable device. The computer readable storage medium is used to store the computer program and other programs and data required by the arbitrary data processing capable device, and can also be used to temporarily store data that has been output or will be output.

[0139] The application also provides a computer program product, which includes a computer program, and the computer program is executed by a processor to realize the handwritten digital image classification and recognition method based on the random threshold switch memristor.

[0140] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.

[0141] It is to be understood that the above general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application. The application is not restricted to the precise construction and combinations of parts and steps described above and shown in the accompanying drawings. The scope of the application is only limited by the claims appended hereto.

[0142] The above embodiments are used to explain the present application, and not to limit the present application, any modification and change of the present application, which falls in the scope of the present application, should be covered by the scope of the present application.

Claims

1. A handwritten digital image classification and recognition method based on random threshold switching memristor, characterized in that: The method comprises the following steps: Obtain a dataset for handwritten digit image classification and recognition, normalize the grayscale values ​​of the handwritten digit image and flatten it into a one-dimensional matrix, and construct a Poisson encoder corresponding to the original channel of the digit image; A spiking neural network for handwritten digit image classification and recognition was constructed. The Poisson encoder was connected to neurons composed of a random threshold switching memristor model through synapses, and the output neurons output the recognition results corresponding to the handwritten image. The construction of the random threshold switching memristor model includes: establishing a random motion model of particles moving forward or backward, using one-dimensional dynamic Monte Carlo to describe the dynamic process of the system based on the equilibrium state of the memristor and the random motion model of the particles, establishing an intensive model of the random transition time of the particle state, and deriving a differentiable distribution model of discrete time. The derived discrete-time differentiable distribution model includes: The number of critical forward transitions required to turn on the device is greater than the number of forward transitions minus the number of reverse transitions required to turn on the device. , the probability of turning on when the device is turned off is: , in, is the upper incomplete gamma function, is the number of positive transitions, is the number of reverse transitions, The critical number of positive transitions required to turn on the device, represents the expected number of positive transitions in a single cycle, ; represents the expected number of reverse transitions in a single cycle, ; Represents the rate of the metal ion's forward or reverse transition process; The shutdown probability when the device is turned on satisfies: , in, The critical number of reverse transitions required to turn off the device; Taking the overall performance of the device within a single pulse cycle as the research object, the reparameterization technique is used to transform the uniform distribution into a geometric distribution: , in Satisfy uniform distribution , Depends on the current device state, if the device is off we choose Otherwise, select , resulting in Represents the time interval required for the next device switch to occur, where Following the geometric distribution, the relationship between the transition of the device switching state and time and external stimulus is obtained: , , in, is the current time, is the time when the device status last changed, It is a binary state conversion mask. If it is 1, it means that the current switch state needs to be reversed, otherwise it remains the same. Using surrogate gradient method to estimate state transition mask Relative to the sampling time interval The derivative of : , , in, Equal to the value The step function is replaced by SigmoidSpike; the switching state of the device is expressed as: , Here, s=1 means the device is on, and s=0 means the device is off; all steps in modeling random switching events can backpropagate the gradients. Characterize the relationship model between the switching state transition of the memristor and time and external stimulus, and obtain the required memristor component model; The handwritten digit image classification and recognition spiking neural network is trained using the data set; the handwritten digit image is flattened and input into the trained handwritten digit image classification and recognition spiking neural network to obtain the handwritten digit image classification and recognition result.

2. The handwritten digital image classification and recognition method based on random threshold switching memristor according to claim 1 is characterized in that: The number of pixels after the handwritten digital image is flattened into a one-dimensional matrix is ​​consistent with the number of Poisson encoder channels in the handwritten digital image classification and recognition pulse neural network, and the grayscale of the pixels is normalized to a value between 0 and 1, corresponding to the average pulse emission rate of each channel.

3. The handwritten digital image classification and recognition method based on random threshold switching memristor according to claim 1 is characterized in that: The handwritten digit image classification and recognition spiking neural network is a multi-layer fully connected spiking neural network. The input of the first layer is a Poisson encoder corresponding to the original image, and the input is connected to neurons composed of a random switching threshold model through synapses; the 10 output neurons in the last layer correspond to the recognition results of the handwritten digits 0 to 9 respectively; the neuron with the highest pulse emission frequency in the output layer is identified as the classification result of the network.

4. The handwritten digital image classification and recognition method based on random threshold switching memristor according to claim 1 is characterized in that: The random motion model for establishing the forward or reverse motion of particles specifically includes: Metal atom oxidation or restore The rate is calculated using the following formula: , in, is the constant term used for redox rate fitting, is the activation energy, is the charge transfer coefficient, is the threshold voltage in DC test, is the local temperature of the device, is the Boltzmann constant, is the charge per unit electron, is the voltage applied across the device; The rate of the metal ion forward or reverse transition process is calculated by the following formula: , in, is the vibration frequency, is the transition barrier height in the dielectric, where the residual nanoclusters have an impact on the transition barrier Calculated by this formula: , in, is the equivalent length of the residual nanoclusters, is the influence radius of the nanocluster on the electric potential field, is the influence of the nanoclusters on the electric potential field, is the length of the current conductive filament; and the local electric field factor representing the transition barrier Calculated by the following formula: , in, and are the fitting parameters, is the gap between the conductive filament and the electrode on the other side.

5. The handwritten digital image classification and recognition method based on random threshold switching memristor according to claim 4 is characterized in that: The intensive model for establishing the random transition time of particle states specifically includes: The equilibrium state of the volatile memristor is: DC test when the threshold voltage is applied When the conductive filament just starts to grow, or a holding voltage is applied When the conductive filament just begins to break, the expression is as follows: ; According to the equilibrium state expression, substituting the specific expression of forward / backward transition rate into it, the following relationship is obtained: , and , in, is the thickness of the dielectric layer, is the length of the gap when the conductive filaments begin to grow, is the length of the gap when the conductive filament just begins to break; One-dimensional dynamic Monte Carlo is used to describe the dynamic process of the system: the internal relationship when the particle state changes is as follows: , in, is the time when the last particle state transition occurred, is from a uniform distribution A random variable sampled from , The state transitions that can occur include: , , , , Represents the state transition direction of the particle in the current state. When the particle is in the redox stage, ; When the particles are oxidized but at the interface, ; When the particles are oxidized but in the dielectric layer, , thus obtaining a model of the random state transition time of particles.

6. The handwritten digital image classification and recognition method based on random threshold switching memristor according to claim 1 is characterized in that: The training of the pulse neural network for handwritten digit image classification and recognition using the data set is specifically as follows: The training end condition is preset, the training data set is input into the initialized neural network, and the loss function value is determined according to the output of the neural network to update the synaptic parameters in the neural network; the updated neural network parameters are used as the parameters of the new neural network to be trained, and the training data set is re-input into the neural network to be trained. The above training steps are repeated until the performance improvement of the updated neural network on the test set is less than the preset condition, and then the training is stopped.

7. A handwritten digit image classification and recognition device based on random threshold switching memristor, comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that: When the processor executes the executable code, a handwritten digital image classification and recognition method based on random threshold switching memristor according to any one of claims 1 to 6 is implemented.

8. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, a handwritten digital image classification and recognition method based on a random threshold switching memristor according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • ESN neural network image classification processing method based on memristor

    CN111553415A

  • Probability artificial synaptic unit, 1T1R array structure and neural network information identification method

    CN114169509A