Pulse neural network input signal encoding method, system, device and storage medium

By fusing frequency encoding and time encoding methods in pulsed neural networks, flexible and accurate pulse sequences are generated, and the problems of high power consumption and low recognition accuracy in the prior art are solved, and more efficient information processing is achieved.

CN114819064BActive Publication Date: 2025-06-06SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210355896.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-06
Publication Date
2025-06-06
Estimated Expiration
2042-04-06

AI Technical Summary

Technical Problem

The frequency and time encoding methods in existing pulsed neural networks have problems such as high power consumption and low recognition accuracy. Frequency encoding leads to excessive number of pulses and excessive power consumption; time encoding only encodes one pulse, which is easily disturbed by noise and has low recognition accuracy.

Method used

A new method of fusion frequency encoding and time encoding is proposed, and the first pulse transmission time, total pulse number and pulse interval are determined by determining the input image pixel value, thereby generating a more flexible and accurate pulse sequence.

Benefits of technology

Improves the recognition flexibility and accuracy of pulsed neural networks and reduces overall power consumption. During the recognition process, this method can select time decoding or frequency decoding according to the scene, which enhances flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114819064B_ABST
    Figure CN114819064B_ABST
Patent Text Reader

Abstract

The present invention discloses a pulse neural network input signal encoding method, system, device and storage medium, the method includes: determining the first pixel value of each pixel point in the input image; determining the first pulse emission time, the total number of pulses and the pulse interval according to the first pixel value, wherein the first pulse emission time is negatively correlated with the first pixel value, the total number of pulses is positively correlated with the first pixel value, and the pulse interval is negatively correlated with the first pixel value; pulse encoding the pixel points according to the first pulse emission time, the total number of pulses and the pulse interval to obtain a first pulse sequence; inputting the first pulse sequence corresponding to each pixel point as an input signal into the processing layer of the pulse neural network. The present invention improves the recognition flexibility of the pulse neural network, improves the recognition accuracy of the pulse neural network, reduces the number of encoded pulses, reduces the overall power consumption of the pulse neural network, and can be widely used in the field of neural network technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of neural network technology, and in particular to a pulse neural network input signal encoding method, system, device and storage medium. Background Art

[0002] In today's era, the amount of information and data is growing exponentially, and there are increasingly higher requirements for the large-scale information processing capabilities of computing systems. The traditional von Neumann architecture has gradually failed to meet the needs of today's era. With the rise of artificial intelligence, deep learning and other fields, researchers have turned their attention to the emerging field of brain-like computing. The human brain has more than 90 billion neurons and 10 7 The daily power consumption of a computer based on the von Neumann architecture is only about 20W, while the power consumption of a computer based on the von Neumann architecture is 10-20 times that of the brain, and the power consumption of a graphics processor is more than 100 times. Therefore, brain-like computers have the potential to break through the traditional von Neumann architecture and improve information processing capabilities.

[0003] Spiking Neuron Network (SNN) is the "third generation neural network" and the foundation of brain-like computing architecture. SNN works in an asynchronous, event-driven manner, transmits information through pulses, contains a large amount of information such as time, space, frequency, phase, etc., and has strong computing power and potential. At present, many neuromorphic platforms based on this have been developed: In 2014, IBM developed the TrueNorth chip, which realized a non-von Neumann, low-power, highly parallel, and scalable architecture, including 1 million digital neurons and 256 million synapses. In 2018, Intel launched the Loihi chip, which optimized its energy delay product by more than three orders of magnitude compared with traditional CPUs in solving the LASSO optimization problem. The Tianji chip launched by Tsinghua University in 2020 successfully realized real-time object detection, tracking, obstacle avoidance, and balance control of unmanned bicycles, marking that my country's brain-like research has reached a new level.

[0004] Information encoding is a key link in spiking neural networks. It is the process of converting the input of the network into pulses. When people are stimulated by external stimuli, such as sound, light, smell, etc., neurons will produce changes in action potentials, that is, emit pulses. However, the specific way to convert stimuli into pulses is still a controversial issue in biology. At present, the two mainstream information encoding methods in SNN are frequency encoding and time encoding. Frequency encoding transmits information through the pulse frequency of neurons. Due to the simplicity of its encoding mechanism, it has been the main form of neuroscience and spiking neural networks for many years. Time encoding transmits information through the pulse time of neurons. Experimental studies have shown that the brain allows the retina to quickly and reliably transmit new spatial information through the first spike emitted by the neural group.

[0005] Both the frequency coding method and the time coding method in the prior art have disadvantages: the number of pulses obtained by frequency coding is too large, and a large number of unused pulses are lost in the process of pulse transmission, which leads to excessive overall power consumption of the pulse neural network; time coding only encodes one pulse for each pixel, so it is easily interfered by noise, affecting the recognition accuracy of the pulse neural network. Summary of the invention

[0006] The purpose of the present invention is to solve one of the technical problems existing in the prior art to at least a certain extent.

[0007] To this end, an object of an embodiment of the present invention is to provide a pulse neural network input signal encoding method, which improves the recognition flexibility and accuracy of the pulse neural network and reduces the overall power consumption of the pulse neural network.

[0008] Another object of an embodiment of the present invention is to provide a pulse neural network input signal encoding system.

[0009] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present invention include:

[0010] In a first aspect, an embodiment of the present invention provides a pulse neural network input signal encoding method, comprising the following steps:

[0011] Determine a first pixel value of each pixel in the input image;

[0012] Determine a first pulse emission time, a total number of pulses, and a pulse interval according to the first pixel value, wherein the first pulse emission time is negatively correlated with the first pixel value, the total number of pulses is positively correlated with the first pixel value, and the pulse interval is negatively correlated with the first pixel value;

[0013] Pulse encoding is performed on the pixel points according to the first pulse emission time, the total number of pulses and the pulse interval to obtain a first pulse sequence;

[0014] The first pulse sequence corresponding to each pixel point is input into the processing layer of the pulse neural network as an input signal.

[0015] Further, in one embodiment of the present invention, the spiking neural network includes an input layer and a processing layer, the input layer includes a plurality of input neurons, the processing layer includes a plurality of excitatory neurons and a plurality of inhibitory neurons of the same number, the excitatory neurons correspond to the inhibitory neurons one-to-one, the output end of each input neuron is connected to the input end of the excitatory neuron, the input end of each excitatory neuron is connected to the output end of the input neuron, the output end of the excitatory neuron is connected to the input end of the corresponding inhibitory neuron, the output end of the inhibitory neuron is connected to the input end of the non-corresponding excitatory neuron, the input neuron is used to pulse encode each pixel point to obtain the first pulse sequence, and input the first pulse sequence to each excitatory neuron, the excitatory neuron is used to generate an excitatory pulse according to the first pulse sequence, and input the excitatory pulse to the corresponding inhibitory neuron, the inhibitory neuron is used to generate an inhibitory pulse according to the excitatory pulse, and feed the inhibitory pulse back to the non-corresponding excitatory neuron, and the spiking neural network updates and optimizes the connection weights between the input neuron, the excitatory neuron and the inhibitory neuron during training.

[0016] Furthermore, in one embodiment of the present invention, the pulse neural network also includes an output layer, which is used to count the excitability of the excitatory neurons and determine the classification result of the input image based on the excitability, and the excitability is determined based on the pulse triggering of the excitatory neurons.

[0017] Furthermore, in one embodiment of the present invention, the first pulse emission time is determined by the following formula:

[0018] spiketime=(1-pixel / pixel_max)*timewindow

[0019] Among them, spiketime represents the first pulse emission time, pixel represents the first pixel value of the corresponding pixel, pixel_max represents the maximum value of the first pixel values ​​of all pixels, and timewindow represents the encoding time window of the corresponding pixel.

[0020] Further, in one embodiment of the present invention, the total number of pulses is determined by the following formula:

[0021] number=Nmax*(e pixel / pixel_max -1) / (e-1)

[0022] Among them, number represents the total number of pulses, Nmax represents the preset maximum number of pulses, pixel represents the first pixel value of the corresponding pixel point, and pixel_max represents the maximum value of the first pixel values ​​of all pixels.

[0023] Further, in one embodiment of the present invention, the pulse interval is determined by the following formula:

[0024] ISI=(Nmax-number)*q

[0025] Among them, ISI represents the pulse interval, number represents the total number of pulses, Nmax represents the preset maximum number of pulses, and q represents the preset time constant.

[0026] Further, in one embodiment of the present invention, the step of pulse encoding the pixel points according to the first pulse emission time, the total number of pulses and the pulse interval to obtain the first pulse sequence specifically includes:

[0027] Determining the emission time of the first pulse according to the emission time of the first pulse;

[0028] Determine the emission time of the remaining pulses in sequence according to the emission time of the first pulse and the pulse interval, the number of the remaining pulses being the total number of pulses minus 1;

[0029] The first pulse sequence is generated according to the emission time of the first pulse, the emission times of the remaining pulses, and a preset pulse peak value.

[0030] In a second aspect, an embodiment of the present invention provides a pulse neural network input signal encoding system, comprising:

[0031] A first pixel value determination module, used to determine a first pixel value of each pixel point in the input image;

[0032] a pulse sequence parameter determination module, configured to determine a first pulse emission time, a total number of pulses, and a pulse interval according to the first pixel value, wherein the first pulse emission time is negatively correlated with the first pixel value, the total number of pulses is positively correlated with the first pixel value, and the pulse interval is negatively correlated with the first pixel value;

[0033] A first pulse sequence generating module, configured to pulse encode the pixel points according to the first pulse emission time, the total number of pulses and the pulse interval to obtain a first pulse sequence;

[0034] The pulse sequence input module is used to input the first pulse sequence corresponding to each pixel point as an input signal into the processing layer of the pulse neural network.

[0035] In a third aspect, an embodiment of the present invention provides a pulse neural network input signal encoding device, comprising:

[0036] at least one processor;

[0037] at least one memory for storing at least one program;

[0038] When the at least one program is executed by the at least one processor, the at least one processor implements the above-mentioned pulse neural network input signal encoding method.

[0039] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores a program executable by a processor, and the program executable by the processor is used to execute the above-mentioned pulse neural network input signal encoding method when executed by the processor.

[0040] The advantages and beneficial effects of the present invention will be partly given in the following description, partly become apparent from the following description, or be understood through the practice of the present invention:

[0041] The embodiment of the present invention combines the advantages of traditional frequency coding and time coding. It can not only encode larger pixel values ​​into more pulses to reflect pixel characteristics, but also reflect pixel characteristics from the pulse time of the first pulse. In the subsequent decoding and recognition process, time decoding and / or frequency decoding can be selected according to the actual scenario to perform feature recognition, thereby improving the recognition flexibility of the pulse neural network. Since the pixel characteristics are reflected by both the number of pulses and the pulse time of the first pulse, compared with the traditional time coding method, the recognition accuracy of the pulse neural network is improved, and compared with the traditional frequency coding method, the number of encoded pulses is reduced, thereby reducing the overall power consumption of the pulse neural network. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solution in the embodiments of the present invention, the following introduction is made to the drawings required for use in the embodiments of the present invention. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solution of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 A flowchart of a method for encoding a pulse neural network input signal provided by an embodiment of the present invention;

[0044] Figure 2A schematic diagram of the structure of a pulse neural network provided by an embodiment of the present invention;

[0045] Figure 3 A schematic diagram of the neuron response mechanism of the LIF model provided in an embodiment of the present invention;

[0046] Figure 4 A diagram comparing the encoding results of the pulse neural network input signal encoding method provided by an embodiment of the present invention and traditional time encoding and frequency encoding;

[0047] Figure 5 A structural block diagram of a pulse neural network input signal encoding system provided by an embodiment of the present invention;

[0048] Figure 6 A structural block diagram of a pulse neural network input signal encoding device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0050] In the description of the present invention, the meaning of "a plurality" is two or more than two. If there is a description of "a first" or "a second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features. In addition, unless otherwise defined, all technical and scientific terms used in this document have the same meaning as those commonly understood by those skilled in the art.

[0051] Relying on the characteristics of parallel processing and energy-saving computing, SNN has been widely used in neural system hardware systems. However, neural networks require multi-layer, complex structures to handle real-life tasks such as target detection and image recognition. Take the TrueNorth chip launched by IBM as an example, it contains 1 million digital neurons and 256 million synapses. These complex structures will make the memory of the SNN synaptic part too large, which will lead to excessive overall energy consumption, and will be a great test for the hardware implementation. Therefore, it is imperative to find a practical and effective solution to improve the energy efficiency of the SNN network.

[0052] Pulse coding is the source link of SNN. The number of encoded input pulses directly determines the power consumption of the entire network during subsequent operation. Optimizing this link can minimize the overall power consumption. The two mainstream codes currently have their own problems. Although frequency coding has strong robustness because of its simple coding mechanism and relies on the frequency of pulse emission to transmit information, it also brings new problems. There are too many pulses encoded by frequency coding, and a large number of pulses are not well utilized, but are lost during the pulse transmission process. In addition, too many pulses in the input coding will also cause a large number of pulses to continue to be transmitted during the subsequent operation, resulting in excessive power consumption of the SNN network as a whole. Time coding uses the time information of the pulse to transmit. The commonly used first pulse coding (Time To First Spike, TTFS) only encodes one pulse per pixel, so that the overall network power consumption will be reduced to a very low level. However, time coding also has its own problems: first, the recognition accuracy of the SNN network based on time coding is still at a relatively low level and is not satisfactory; second, since the mechanism of time coding has only one pulse, this will make the entire network extremely susceptible to noise interference, resulting in the loss of transmitted information.

[0053] Based on this, an embodiment of the present invention provides a pulse neural network input signal encoding method, which is used in the input signal encoding link of the pulse neural network, improves the recognition flexibility and accuracy of the pulse neural network, and reduces the overall power consumption of the pulse neural network. Figure 1 The pulse neural network input signal encoding method of the embodiment of the present invention specifically includes the following steps:

[0054] S101, determining a first pixel value of each pixel in an input image;

[0055] S102, determining a first pulse emission time, a total number of pulses, and a pulse interval according to the first pixel value, wherein the first pulse emission time is negatively correlated with the first pixel value, the total number of pulses is positively correlated with the first pixel value, and the pulse interval is negatively correlated with the first pixel value;

[0056] S103, pulse encoding the pixel points according to the first pulse emission time, the total number of pulses and the pulse interval to obtain a first pulse sequence;

[0057] S104: Input the first pulse sequence corresponding to each pixel point as an input signal to the processing layer of the pulse neural network.

[0058] Specifically, the encoding method adopted in the embodiment of the present invention is a new encoding method proposed by integrating frequency coding and time coding. Due to its special mechanism during encoding, it can transmit information not only through the number of pulses, but also through the time of pulses. Therefore, during decoding, one of the pulse number and pulse time can be selected, or a combination of the two can be used for classification and identification.

[0059] As a further optional implementation, the pulse neural network includes an input layer and a processing layer, the input layer includes a plurality of input neurons, the processing layer includes a plurality of excitatory neurons and a plurality of inhibitory neurons of the same number, the excitatory neurons correspond to the inhibitory neurons one-to-one, the output end of each input neuron is connected to the input end of the excitatory neuron, the input end of each excitatory neuron is connected to the output end of the input neuron, the output end of the excitatory neuron is connected to the input end of the corresponding inhibitory neuron, the output end of the inhibitory neuron is connected to the input end of the non-corresponding excitatory neuron, the input neuron is used to pulse encode each pixel point to obtain a first pulse sequence, and input the first pulse sequence to each excitatory neuron, the excitatory neuron is used to generate excitatory pulses according to the first pulse sequence, and input the excitatory pulses to the corresponding inhibitory neurons, the inhibitory neurons are used to generate inhibitory pulses according to the excitatory pulses, and feed the inhibitory pulses back to the non-corresponding excitatory neurons, and the pulse neural network updates and optimizes the connection weights between the input neurons, the excitatory neurons and the inhibitory neurons during the training process.

[0060] like Figure 2 The structure diagram of the pulse neural network provided by the embodiment of the present invention is shown. It can be understood that the pulse neural network of the embodiment of the present invention is mainly composed of two parts: the first layer is the input layer, which includes M*N input neurons, corresponding to the M*N pixels of the input image; the second layer is the processing layer, which includes the same number of excitatory neurons and inhibitory neurons. The input neurons of the input layer are fully connected to the excitatory neurons in the processing layer (that is, the output segments of all input neurons are connected to the input end of each excitatory neuron, and the input ends of all excitatory neurons are connected to the output end of each input neuron), and the input neurons convert the pixels of the picture into a pulse sequence and pass it to the next layer. The excitatory neurons in the processing layer receive the pulse sequence transmitted by all input neurons, and are connected to the inhibitory neurons in a one-to-one manner and emit excitatory pulses, and each inhibitory neuron in turn emits inhibitory pulses to all excitatory neurons except the corresponding excitatory neurons. This connection method can realize the Winner Take All (WTA) mechanism, by applying lateral inhibitory feedback to the excitatory neurons, so that learning competition occurs between neurons, improving the efficiency of model training and model accuracy.

[0061] In some optional embodiments, the pulse neural network adopts a leaky integrated firing (LIF) model. The membrane voltage of the LIF neuron will decay over time, but when it receives an excitatory or inhibitory pulse, the membrane voltage will increase or decrease accordingly. Once the membrane voltage exceeds the threshold voltage, the neuron will generate a pulse, and the membrane voltage will quickly fall back to the reset voltage. At the same time, there will be a refractory period during which the neuron will not be excited again. The neuron response mechanism schematic diagram of the LIF model provided in the embodiment of the present invention is shown in FIG. Figure 3 shown.

[0062] As a further optional implementation, the pulse neural network also includes an output layer, which is used to count the excitability of excitatory neurons and determine the classification result of the input image based on the excitability, and the excitability is determined based on the pulse triggering of the excitatory neurons.

[0063] Specifically, the output layer of the pulse neural network finally performs classification and identification by counting the excitability of the excitatory neurons. Based on the encoding method proposed in the embodiment of the present invention, the number of pulses and the arrival time of the first pulse can both characterize the excitability of the excitatory neurons. After the training is completed, the connection weights between the input neurons, the excitatory neurons, and the inhibitory neurons are optimized, and each excitatory neuron is assigned a label with their highest excitability number. Then, during the reasoning process, the classification result of the input image is the number corresponding to the label with the highest average excitability.

[0064] As an optional implementation, the first pulse emission time is determined by the following formula:

[0065] spiketime=(1-pixel / pixel_max)*timewindow

[0066] Among them, spiketime represents the first pulse emission time, pixel represents the first pixel value of the corresponding pixel, pixel_max represents the maximum value of the first pixel values ​​of all pixels, and timewindow represents the encoding time window of the corresponding pixel.

[0067] Specifically, the time point of the first pulse transmission can be determined according to the spiketime. The spiketime is negatively correlated with the pixel value, that is, the larger the pixel value, the earlier the pulse transmission time, and the smaller the pixel value, the later the pulse transmission time.

[0068] As a further optional embodiment, the pulse interval is determined by the following formula:

[0069] ISI=(Nmax-number)*q

[0070] Among them, ISI represents the pulse interval, number represents the total number of pulses, Nmax represents the preset maximum number of pulses, and q represents the preset time constant.

[0071] Specifically, the specific emission time of the next pulse can be determined according to the ISI pulse interval and the emission time of the current pulse, and so on. ISI is negatively correlated with the pixel value, that is, the larger the pixel value, the smaller the pulse interval, the denser the pulse distribution, and the smaller the pixel value, the larger the pulse interval, and the sparser the pulse distribution.

[0072] As a further optional embodiment, the total number of pulses is determined by the following formula:

[0073] number=Nmax*(e pixel / pixel_max -1) / (e-1)

[0074] Among them, number represents the total number of pulses, Nmax represents the preset maximum number of pulses, pixel represents the first pixel value of the corresponding pixel point, and pixel_max represents the maximum value of the first pixel values ​​of all pixels.

[0075] Specifically, the emission time of each pulse is determined in turn according to the emission time of the first pulse and the pulse interval, until the number of pulses reaches number, that is, the total number of pulses, and the encoding process stops. number is positively correlated with the pixel value, that is, the larger the pixel value, the more pulses are encoded, and the smaller the pixel value, the fewer pulses are encoded.

[0076] As an optional implementation, step S104 of pulse encoding the pixel points according to the first pulse emission time, the total number of pulses and the pulse interval to obtain the first pulse sequence specifically includes:

[0077] S1041, determining the emission time of the first pulse according to the emission time of the first pulse;

[0078] S1042, determining the emission time of the remaining pulses in sequence according to the emission time of the first pulse and the pulse interval, the number of the remaining pulses being the total number of pulses minus 1;

[0079] S1043, generating a first pulse sequence according to the emission time of the first pulse, the emission times of the remaining pulses, and a preset pulse peak value.

[0080] Specifically, in the embodiment of the present invention, the preset pulse peak value is 1, and the encoding of a pulse sequence corresponding to a pixel point can be completed through the above process.

[0081] like Figure 4What is shown is a comparison diagram of the encoding results of the pulse neural network input signal encoding method provided in an embodiment of the present invention and traditional time encoding and frequency encoding. It can be understood that, for the encoding mode of frequency encoding, the larger the input pixel value, the more pulses there are in the overall pulse sequence, and the pulses conform to the Poisson distribution as a whole; for the encoding mode of time encoding, the larger the input pixel value, the earlier the first pulse time; for the encoding mode in the embodiment of the present invention, it combines the advantages of frequency encoding and time encoding, and can encode larger pixel values ​​into more pulses like frequency encoding, and can also reflect larger pixel values ​​through the first pulse emission time like time encoding.

[0082] It should be recognized that the embodiment of the present invention proposes a fusion coding method for the input signal of a pulse neural network. First, the fusion coding is flexible in the selection of the recognition mode. Due to the mechanism during encoding, it can be flexibly switched according to the usage scenario. In the scenario with high time requirements, the fusion coding can use time decoding for fast recognition, and in the scenario where the main pursuit is accuracy and there is no high requirement for time, the fusion coding can use frequency decoding for more accurate recognition; secondly, the network based on fusion coding has a good effect on recognition accuracy. Under the same network model, the recognition accuracy of the network using fusion coding far exceeds that of time coding, and is close to and in some cases even slightly exceeds the mainstream frequency coding level; finally, compared with the mainstream frequency coding, the fusion coding greatly reduces the number of pulses encoded by the input, thereby reducing the pulses generated by the entire network during operation, that is, reducing the power consumption of the entire network.

[0083] The embodiment of the present invention combines the advantages of traditional frequency coding and time coding. It can not only encode larger pixel values ​​into more pulses to reflect pixel characteristics, but also reflect pixel characteristics from the pulse time of the first pulse. In the subsequent decoding and recognition process, time decoding and / or frequency decoding can be selected according to the actual scenario to perform feature recognition, thereby improving the recognition flexibility of the pulse neural network. Since the pixel characteristics are reflected by both the number of pulses and the pulse time of the first pulse, compared with the traditional time coding method, the recognition accuracy of the pulse neural network is improved, and compared with the traditional frequency coding method, the number of encoded pulses is reduced, thereby reducing the overall power consumption of the pulse neural network.

[0084] Reference Figure 5 , an embodiment of the present invention provides a pulse neural network input signal encoding system, comprising:

[0085] A first pixel value determination module, used to determine a first pixel value of each pixel point in the input image;

[0086] a pulse sequence parameter determination module, used to determine a first pulse emission time, a total number of pulses, and a pulse interval according to the first pixel value, wherein the first pulse emission time is negatively correlated with the first pixel value, the total number of pulses is positively correlated with the first pixel value, and the pulse interval is negatively correlated with the first pixel value;

[0087] A first pulse sequence generating module, used for pulse encoding the pixel points according to the first pulse emission time, the total number of pulses and the pulse interval to obtain a first pulse sequence;

[0088] The pulse sequence input module is used to input the first pulse sequence corresponding to each pixel point as an input signal into the processing layer of the pulse neural network.

[0089] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0090] Reference Figure 6 , an embodiment of the present invention provides a pulse neural network input signal encoding device, comprising:

[0091] at least one processor;

[0092] at least one memory for storing at least one program;

[0093] When the at least one program is executed by the at least one processor, the at least one processor implements the pulse neural network input signal encoding method.

[0094] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0095] An embodiment of the present invention also provides a computer-readable storage medium, which stores a program executable by a processor. When the program executable by the processor is executed by the processor, it is used to execute the above-mentioned pulse neural network input signal encoding method.

[0096] A computer-readable storage medium according to an embodiment of the present invention can execute a pulse neural network input signal encoding method provided by an embodiment of the method of the present invention, can execute any combination of implementation steps of the method embodiment, and has the corresponding functions and beneficial effects of the method.

[0097] The embodiment of the present invention also discloses a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes Figure 1 The method shown.

[0098] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the above-mentioned boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0099] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified to the contrary, one or more of the above-mentioned functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0100] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0101] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0102] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the above-mentioned program is printed, since the above-mentioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or processing in other suitable ways as necessary, and then stored in a computer memory.

[0103] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0104] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0105] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0106] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A method for encoding input signals of a spiking neural network, It is characterized in that The following steps are involved: Determine a first pixel value of each pixel in the input image; Determine a first pulse emission time, a total number of pulses, and a pulse interval according to the first pixel value, wherein the first pulse emission time is negatively correlated with the first pixel value, the total number of pulses is positively correlated with the first pixel value, and the pulse interval is negatively correlated with the first pixel value; Pulse encoding is performed on the pixel points according to the first pulse emission time, the total number of pulses and the pulse interval to obtain a first pulse sequence; Inputting the first pulse sequence corresponding to each of the pixel points as an input signal into a processing layer of a spiking neural network; The first pulse emission time is determined by the following formula: spiketime=(1-pixel / pixel_max)*timewindow Wherein, spiketime represents the time of the first pulse emission, pixel represents the first pixel value of the corresponding pixel, pixel_max represents the maximum pixel value of all pixels, and timewindow represents the encoding time window of the corresponding pixel; The total number of pulses is determined by the following formula: number=N max*(e pixel / pixel_max -1) / (e-1) Where number represents the total number of pulses, and Nmax represents the preset maximum number of pulses; The pulse interval is determined by the following formula: ISI=(N max-number)*q Where, ISI represents the pulse interval, and q represents the preset time constant; The step of pulse encoding the pixel points according to the first pulse emission time, the total number of pulses and the pulse interval to obtain a first pulse sequence specifically includes: Determining the emission time of the first pulse according to the emission time of the first pulse; Determine the emission time of the remaining pulses in sequence according to the emission time of the first pulse and the pulse interval, the number of the remaining pulses being the total number of pulses minus 1; The first pulse sequence is generated according to the emission time of the first pulse, the emission times of the remaining pulses, and a preset pulse peak value.

2. A pulse neural network input signal encoding method according to claim 1, Features: The pulse neural network includes an input layer and a processing layer, wherein the input layer includes a plurality of input neurons, and the processing layer includes a plurality of excitatory neurons and a plurality of inhibitory neurons of the same number, wherein the excitatory neurons correspond to the inhibitory neurons one-to-one, and the output end of each input neuron is connected to the input end of the excitatory neuron, and the input end of each excitatory neuron is connected to the output end of the input neuron, and the output end of the excitatory neuron is connected to the input end of the corresponding inhibitory neuron, and the output end of the inhibitory neuron is connected to the input end of the non-corresponding excitatory neuron, and the input neuron is used to pulse encode each pixel point to obtain the first pulse sequence, and input the first pulse sequence to each excitatory neuron, and the excitatory neuron is used to generate an excitatory pulse according to the first pulse sequence, and input the excitatory pulse to the corresponding inhibitory neuron, and the inhibitory neuron is used to generate an inhibitory pulse according to the excitatory pulse, and feed the inhibitory pulse back to the non-corresponding excitatory neuron, and the pulse neural network updates and optimizes the connection weights between the input neuron, the excitatory neuron and the inhibitory neuron during the training process.

3. A pulse neural network input signal encoding method according to claim 2, Features: The pulse neural network also includes an output layer, which is used to count the excitability of the excitatory neurons and determine the classification result of the input image based on the excitability, and the excitability is determined based on the pulse triggering situation of the excitatory neurons.

4. A pulse neural network input signal encoding system, It is characterized in that include: A first pixel value determination module, used to determine a first pixel value of each pixel point in the input image; a pulse sequence parameter determination module, configured to determine a first pulse emission time, a total number of pulses, and a pulse interval according to the first pixel value, wherein the first pulse emission time is negatively correlated with the first pixel value, the total number of pulses is positively correlated with the first pixel value, and the pulse interval is negatively correlated with the first pixel value; A first pulse sequence generating module, configured to pulse encode the pixel points according to the first pulse emission time, the total number of pulses and the pulse interval to obtain a first pulse sequence; A pulse sequence input module, used for inputting the first pulse sequence corresponding to each pixel point as an input signal into the processing layer of the pulse neural network; The first pulse emission time is determined by the following formula: spiketime=(1-pixel / pixel_max)*timewindow Wherein, spiketime represents the time of the first pulse emission, pixel represents the first pixel value of the corresponding pixel, pixel_max represents the maximum pixel value of all pixels, and timewindow represents the encoding time window of the corresponding pixel; The total number of pulses is determined by the following formula: number=N max*(e pixel / pixel_max -1) / (e-1) Where number represents the total number of pulses, and Nmax represents the preset maximum number of pulses; The pulse interval is determined by the following formula: ISI=(N max-number)*q Where, ISI represents the pulse interval, and q represents the preset time constant; The step of pulse encoding the pixel points according to the first pulse emission time, the total number of pulses and the pulse interval to obtain a first pulse sequence specifically includes: Determining the emission time of the first pulse according to the emission time of the first pulse; Determine the emission time of the remaining pulses in sequence according to the emission time of the first pulse and the pulse interval, the number of the remaining pulses being the total number of pulses minus 1; The first pulse sequence is generated according to the emission time of the first pulse, the emission times of the remaining pulses, and a preset pulse peak value.

5. A pulse neural network input signal encoding device, It is characterized in that include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements a pulse neural network input signal encoding method as described in any one of claims 1 to 3.

6. A computer-readable storage medium having a program executable by a processor stored therein, It is characterized in that The processor executable program is used to execute a pulse neural network input signal encoding method as described in any one of claims 1 to 3 when executed by the processor.

Citation Information

Patent Citations

  • Image recognition system and method based on spiking neural network

    CN112784976A

  • Spiking neural network model building method

    CN114092763A