Hardware-oriented deep spiking neural network speech recognition method and system

Through the hardware-oriented deep impulse neural network speech recognition method, through data preprocessing and feature encoding, combined with the spatiotemporal backpropagation algorithm and weight quantification, the problem of difficult deployment of impulse neural networks on hardware devices in the existing technology is solved, and the Efficient speech recognition and maintaining recognition accuracy.

WO2024152583A9PCT designated stage expired Publication Date: 2024-10-31ZHEJIANG LAB +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/118244
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-01-16
Filing Date
2023-09-12
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

Due to the high-dimensional input and high-precision floating-point weights, the existing spiking neural network speech model is not suitable for hardware devices with limited bit width, making it difficult to deploy on resource-constrained hardware.

Method used

A hardware-oriented deep impulse neural network speech recognition method is proposed. By obtaining open source speech data sets, performing preprocessing and feature encoding, a hardware-friendly deep impulse neural network model is constructed, and the spatio-temporal backpropagation algorithm is used to optimize the network weights, and Floating point weights are quantized into fixed point weights to implement speech recognition.

Benefits of technology

While reducing the recognition power consumption, it maintains the recognition accuracy that is similar to the floating-point precision weight, ensuring the hardware deployment of the impulse neural network speech recognition model, and solving the deployment difficulties on resource-limited hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023118244_31102024_PF_FP_ABST
    Figure CN2023118244_31102024_PF_FP_ABST
Patent Text Reader

Abstract

A hardware-oriented deep spiking neural network speech recognition method, comprising: acquiring an open-source speech data set; preprocessing the speech data set, obtaining low-dimensional speech features from high-dimensional speech data, and encoding the low-dimensional speech features into a pulse sequence; constructing a deep spiking neural network model, each neuron in the model using a hardware-friendly integrated ignition model; constructing a loss function, updating a network weight by using a surrogate gradient-based spatio-temporal backpropagation algorithm, training the deep spiking neural network model on a training data set, and storing the updated network weight; and quantizing a floating-point weight into a fixed-point weight, loading the quantized fixed-point weight by the deep spiking neural network model, and recognizing a test data set to obtain a predicted classification label so as to realize speech recognition of a hardware-oriented deep spiking neural network model. The present invention further relates to a hardware-oriented deep spiking neural network speech recognition system. The present invention reduces the recognition power consumption, and maintains the approximate recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

A hardware-oriented deep pulse neural network speech recognition method and system Technical Field

[0001] The present invention belongs to the field of speech recognition and neuromorphic computing technology, and relates to a hardware-oriented deep pulse neural network speech recognition method and system. Background Art

[0002] Spiking neural networks, a "third-generation neural network," mimic the workings of neurons in the human brain, transmitting information in the form of pulses. The membrane potential of a neuron accumulates when it receives a pulse. When the accumulated membrane potential reaches a threshold, the neuron is activated and fires a pulse, which is then transmitted to the next layer. If the membrane potential has not yet reached the threshold, the neuron remains inactive. This sparse, event-driven information processing mechanism gives spiking neural networks the advantages of high efficiency and low power consumption, making them suitable for deployment on resource-constrained hardware devices. Currently, spiking neural networks are gaining increasing attention in speech recognition tasks. Most spiking neural network speech models are designed for computer software platforms. When training spiking neural networks for speech recognition, they directly use high-dimensional speech data as network input. To achieve optimal performance, the network weights use high-precision floating-point numbers.

[0003] However, models with high-dimensional inputs and high-precision floating-point weights are not suitable for hardware devices with limited bit width, and the pulse neural network speech model trained on the software side is difficult to deploy on resource-constrained hardware devices.

[0004] Summary of the Invention

[0005] In order to solve the above technical problems existing in the prior art, the present invention proposes a hardware-oriented deep pulse neural network speech recognition method and system, which is applied to the recognition of speech data. The specific technical solution is as follows:

[0006] A hardware-oriented deep pulse neural network speech recognition method includes the following steps:

[0007] Step 1: Obtain an open-source speech dataset and divide it into training and test datasets;

[0008] Step 2: Preprocess the speech data set, obtain low-dimensional speech features from high-dimensional speech data, and encode them into pulse sequences;

[0009] Step 3: Build a deep spiking neural network model, where each neuron uses a hardware-friendly integrated firing model.

[0010] Step 4: Construct a loss function, use the space-time back propagation algorithm to optimize the network weights, train the deep spiking neural network model on the training dataset, and save the updated network weights;

[0011] Step 5: Quantize the floating-point weights to fixed-point weights. Load the quantized fixed-point weights into the deep spiking neural network model, identify the test dataset, obtain the predicted classification labels, and implement speech recognition for the hardware-oriented deep spiking neural network model.

[0012] Furthermore, the step 1 is specifically as follows: obtaining the audioMNIST open source speech dataset and dividing it into a training set and a test set.

[0013] Furthermore, the step 2 specifically includes the following sub-steps:

[0014] Step 2.1: Preprocess the speech data by first performing pre-emphasis, framing, and windowing on the speech data. Then, for each frame of the short-time analysis window, a fast Fourier transform is performed to obtain the corresponding spectrum. The obtained spectrum is then passed through a Mel filter bank to obtain a Mel spectrum. Finally, the Mel spectrum is logarithmized and subjected to a discrete cosine transform to obtain the Mel frequency cepstral coefficients as speech features.

[0015] Step 2.2, encode the speech features, set the total simulation time step to T, at each time step, if the spectral feature is greater than the random probability generated by the uniform distribution, a pulse is generated at that time step with a value of 1, otherwise it is 0, thereby encoding the real value of the spectral feature into a pulse sequence represented by discrete values ​​of 0 and 1.

[0016] Furthermore, the step three specifically includes the following sub-steps:

[0017] In step 3.1, the constructed deep spiking neural network model consists of an input layer, N hidden layers, and an output layer, with full connections between layers. The input layer receives the encoded pulse sequence; the hidden layers learn the features contained in the input pulse sequence; and the output layer identifies the speech category, with one neuron representing each speech category. For each input sample, the pulse firing rate of each neuron in the output layer is calculated within the simulation time step. The category represented by the neuron with the highest pulse firing rate is the predicted label.

[0018] In step 3.2, the neurons in the hidden layer and output layer of the model all use the integrated firing model, and the membrane potential of the neurons is calculated according to the following formula:

[0019] in, is the membrane potential of neuron i in layer n at time t, is the membrane potential of neuron i in layer n at time t-1, is the output of neuron i in layer n at time t-1, is the synaptic weight from neuron j in layer n-1 to neuron i in layer n, is the output of neuron j in layer n-1 at time t, V th is the threshold of the neuron.

[0020] Furthermore, the step 4 specifically includes the following sub-steps:

[0021] Step 4.1, construct the mean square error loss function The calculation formula is as follows:

[0022] Among them, y is the label of the training sample, is the pulse firing rate of the statistical output layer neurons, T is the total simulation time step.

[0023] In step 4.2, the time-space back propagation algorithm is used to distribute the error to the weights of neurons in each layer through the time-space relationship between the membrane potentials of the integrated firing model of each layer to optimize the network weights. The gradient of the loss with respect to the network weights is:

[0024] in is the derivative of the loss function with respect to the membrane potential. Its calculation can be divided into two cases: n is the output layer and n is the hidden layer. 1) When n is the output layer:

[0025] 2) When n is a hidden layer:

[0026] Among them, h(V n (t))Yes The gradient replacement function of .

[0027] Step 4.3: Train the deep spiking neural network model on the training set and save the network weights obtained after training.

[0028] Furthermore, the step 5 specifically includes the following sub-steps:

[0029] Step 5.1: quantize the floating point weights to fixed point weights, as follows: quatized_W = round(clip(W,0.5 bit-1 -1,1-0.5 bit-1 )*2 bit-1 +0.5) / 2 bit-1 (7)

[0030] Among them, quatized_W is the quantized fixed-point weight matrix, W is the floating-point weight matrix, and bit is the number of quantized bits;

[0031] In step 5.2, the deep spiking neural network model loads the quantized fixed-point weights, recognizes the encoded test data set, obtains the predicted classification labels, and implements speech recognition for the hardware-oriented deep spiking neural network model.

[0032] The present invention also includes a hardware-oriented deep pulse neural network speech recognition system, including a data set acquisition module, a data preprocessing and encoding module, a network construction module, a network training storage module, and a quantization test module;

[0033] The data set acquisition module is configured to acquire the audioMNIST open source speech data set and divide it into a training set and a test set.

[0034] The data preprocessing and encoding module is configured to perform feature extraction through MFCC to obtain low-dimensional features from high-dimensional speech data, and then encode the obtained features into pulse sequences.

[0035] The network building module is configured to construct a deep spiking neural network consisting of one input layer, N hidden layers, and one output layer, with full connectivity between layers. The input layer receives encoded pulse trains; the hidden layers learn the features inherent in the input pulse trains; and the output layer identifies speech categories. Each neuron in the model utilizes a hardware-friendly integrated firing model.

[0036] The network training storage module is configured to obtain the pulse firing rate of each neuron in the output layer, construct a mean square error loss function to calculate the error between the pulse firing rate of the output layer and the sample label, and use the spatiotemporal back propagation algorithm to distribute the error to the weights of neurons in each layer through the spatiotemporal relationship between the membrane potentials of the integrated ignition model of each layer to optimize the network weights and save the trained network weights.

[0037] The quantization test module is configured to quantize the floating-point weights obtained through training into fixed-point weights through a quantization operation, load the fixed-point weights, identify the test data set, and obtain predicted classification labels.

[0038] The present invention also provides a hardware-oriented deep pulse neural network speech recognition device, including a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement a hardware-oriented deep pulse neural network speech recognition method of the present invention.

[0039] The present invention also provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, a hardware-oriented deep pulse neural network speech recognition method of the present invention is implemented.

[0040] Advantages of the present invention:

[0041] Compared with other existing recognition methods, the hardware-oriented deep pulse neural network speech recognition model of the present invention converts floating-point weights into low-bit fixed-point weights, which reduces the recognition power consumption while maintaining a recognition accuracy similar to that of floating-point precision weights, thus effectively ensuring the deployment of the pulse neural network speech recognition model to hardware devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] FIG1 is a schematic diagram of a flow chart of a hardware-oriented deep pulse neural network speech recognition method of the present invention;

[0043] FIG2 is a schematic diagram of a specific flow chart of a hardware-oriented deep pulse neural network speech recognition method of the present invention;

[0044] FIG3 is a schematic diagram of a data preprocessing process of the present invention;

[0045] FIG4 is a schematic diagram of a network structure of the present invention;

[0046] FIG5 is a schematic diagram of a hardware-oriented deep pulse neural network speech recognition system of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and technical effect of the present invention clearer, the technical solution in the embodiment of the present invention is clearly and completely described below in combination with the drawings and embodiments of the specification. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0048] Compared with artificial neural networks, the sparse, event-driven information processing mechanism of pulse neural networks gives them the advantages of high efficiency and low power consumption, making them suitable for application deployment on resource-constrained hardware devices. Therefore, the present invention proposes a hardware-oriented deep pulse neural network speech recognition method and device.

[0049] Example 1

[0050] A hardware-oriented deep pulse neural network speech recognition method of the present invention, as shown in Figures 1 and 2, includes the following steps:

[0051] Step 1: Obtain an open-source speech dataset and divide it into training and test datasets;

[0052] In this embodiment, the speech dataset is the audioMNIST open source speech dataset, which consists of 300,000 audio samples and includes 10 types of speech digits from 0 to 9. The audioMNIST dataset is divided into a training set and a test set in a ratio of 7:3.

[0053] Step 2: Preprocess the speech data set, obtain low-dimensional speech features from high-dimensional speech data, and encode them into pulse sequences;

[0054] It includes the following sub-steps:

[0055] Step 2.1, preprocessing the speech data. As shown in the process of Figure 3, in this embodiment, the speech data is first pre-emphasized through a high-pass filter, and the speech data obtained after high-pass filtering is framed. The length of each frame is 25ms, and the sampling rate is 16000HZ, so one frame has 25*16000=400 sampling points. Each speech sample is divided into 99 frames, and each frame is windowed and multiplied by a Hamming window; then, each windowed frame is fast Fourier transformed to obtain the spectrum corresponding to each frame; then, the obtained spectrum is filtered through a filter bank consisting of 26 Mel-scale triangular filters to obtain a Mel spectrum; finally, the Mel spectrum is logarithmized and discrete cosine transformed, and the first to 13 coefficients are taken as Mel-frequency cepstral coefficients. Finally, the feature size of each speech sample is 99*13, with a total of 1287 features;

[0056] Step 2.2, the encoding process is specifically as follows: in this embodiment, the total simulation time step T is set to 200. At each time step, for each spectral feature value, if it is greater than the random probability generated by obeying the uniform distribution, the feature will generate a pulse at this time step with a value of 1, otherwise it is 0. In this way, the real value of the spectral feature is encoded into a pulse sequence represented by discrete values ​​of 0 and 1. The scale of the pulse sequence obtained after encoding 1287 features is 1287*200.

[0057] Step 3: Build a deep spiking neural network model, where each neuron uses a hardware-friendly integrated firing model.

[0058] It includes the following sub-steps:

[0059] Step 3.1, as shown in the network structure diagram in Figure 4, the deep spiking neural network model constructed in this example consists of an input layer with 1287 neurons, the same number as the speech features of a single speech sample, a hidden layer with 500 neurons, and an output layer with 10 neurons, with full connections between layers. The input layer receives the encoded pulse sequence; the hidden layer learns the features contained in the input pulse sequence; and the output layer identifies the speech category, with one neuron representing each speech category. For each input sample, the pulse firing rate of each neuron in the output layer is calculated over 200 time steps. The category represented by the neuron with the highest pulse firing rate is the predicted label.

[0060] In step 3.2, the neurons in the hidden layer and output layer of the model all use the integrated firing model, and the membrane potential of the neurons is calculated according to the following formula:

[0061] in, is the membrane potential of neuron i in layer n at time t, is the membrane potential of neuron i in layer n at time t-1, is the output of neuron i in layer n at time t-1, is the synaptic weight from neuron j in layer n-1 to neuron i in layer n, is the output of neuron j in layer n-1 at time t, V th is the threshold of the neuron.

[0062] In this embodiment, V th =1.

[0063] Step 4: Construct a loss function, use the space-time back propagation algorithm to optimize the network weights, train the deep spiking neural network model on the training dataset, and save the updated network weights;

[0064] It includes the following sub-steps:

[0065] Step 4.1, construct the mean square error loss function The calculation formula is as follows:

[0066] Among them, y is the label of the training sample, is the pulse firing rate of the statistical output layer neurons, T is the total simulation time step, and in this embodiment, the value is 200.

[0067] In step 4.2, the time-space back propagation algorithm is used to distribute the error to the weights of neurons in each layer through the time-space relationship between the membrane potentials of the integrated firing model of each layer to optimize the network weights. The gradient of the loss with respect to the network weights is:

[0068] in is the derivative of the loss function with respect to the membrane potential. Its calculation can be divided into two cases: n is the output layer and n is the hidden layer. 1) When n is the output layer:

[0069] 2) When n is a hidden layer:

[0070] Among them, h(V n (t))Yes The gradient replacement function of .

[0071] In this embodiment, the gradient substitution function h(V n (t)) uses the rectangular function, that is, h(V n (t))=sigh(|V n (t)-V th |<1).

[0072] Step 4.3: Train the deep spiking neural network model on the training set. In this embodiment, a batch training method is used with a batch size of 20. For each batch, at each time step, the encoded spike data at that moment is loaded, with a size of 20*1287. After 200 time steps, the spike rate of each neuron in the output layer of the batch is calculated. The category represented by the neuron with the highest spike rate is the predicted label. The loss is calculated based on the predicted label and the actual label. The gradient of the loss with respect to the weight is calculated using the spatiotemporal backpropagation algorithm. The network weights are optimized using the Adam gradient descent algorithm, and the learning rate is set to 0.001. After 30 rounds of training, the trained network weights are saved.

[0073] Step 5: Quantize the floating-point weights to fixed-point weights. Load the quantized fixed-point weights into the deep spiking neural network model, identify the test dataset, obtain the predicted classification labels, and implement speech recognition for the hardware-oriented deep spiking neural network model.

[0074] It includes the following sub-steps:

[0075] Step 5.1: quantize the floating point weights to fixed point weights, as follows: quatized_W = round(clip(W,0.5 bit-1 -1,1-0.5 bit-1 )*2 bit-1 +0.5) / 2 bit-1(7)

[0076] Among them, quatized_W is the quantized fixed-point weight matrix, W is the floating-point weight matrix, and bit is the number of quantized bits.

[0077] In this embodiment, bit=8.

[0078] In step 5.2, the deep spiking neural network model loads quantized fixed-point weights. For each sample in the test dataset, at each time step, the encoded spike data at that moment is loaded, with a size of 1*1287. After 200 time steps, the spike rate of each neuron in the output layer for that sample is calculated. The class represented by the neuron with the highest spike rate is the predicted label. The number of correctly predicted samples is counted, and the recognition accuracy is calculated. Table 1 shows the recognition accuracy of 32-bit floating-point weights and 8-bit fixed-point weights on the audioMNIST speech test set.

[0079] As can be seen from the table, compared with the pulse neural network model with 32 floating-point weights, the hardware-oriented deep pulse neural network speech recognition method proposed in the present invention reduces the weight precision while basically maintaining the recognition accuracy, which can well ensure the deployment of the pulse neural network speech model trained on the software side on resource-constrained hardware devices.

[0080] Example 2

[0081] A hardware-oriented deep pulse neural network speech recognition system of the present invention, as shown in FIG5 , includes a data set acquisition module 100 , a data preprocessing and encoding module 200 , a network construction module 300 , a network training storage module 400 , and a quantization test module 500 ;

[0082] The data set acquisition module 100 is configured to acquire the audioMNIST open source speech data set and divide it into a training set and a test set.

[0083] The data preprocessing and encoding module 200 is configured to perform feature extraction on the training set and test set divided by the data set acquisition module 100 through MFCC, obtain low-dimensional features from the high-dimensional speech data, and then encode the obtained features into pulse sequences.

[0084] The network construction module 300 is configured to construct a deep spiking neural network consisting of one input layer, N hidden layers, and one output layer, with fully connected layers. The input layer receives the pulse sequence encoded by the data preprocessing and encoding module 200; the hidden layers learn the features inherent in the input pulse sequence; and the output layer identifies speech categories. Each neuron in the model utilizes a hardware-friendly integrated firing model.

[0085] The network training storage module 400 is configured to obtain the pulse firing rate of each neuron in the output layer of the network construction module 300, construct a mean square error loss function to calculate the error between the output layer pulse firing rate and the sample label, and use the spatiotemporal back propagation algorithm to distribute the error to the weights of neurons in each layer through the spatiotemporal relationship between the membrane potentials of the integrated ignition model of each layer to optimize the network weights and save the trained network weights.

[0086] The quantization test module 500 is configured to quantize the floating-point weights stored in the network training module 400 into fixed-point weights through a quantization operation, identify the test data set, and obtain predicted classification labels.

[0087] Specifically, the modules of a hardware-oriented deep pulse neural network speech recognition system of the present invention specifically include:

[0088] The data set acquisition module is configured to acquire the audioMNIST open source speech data set and divide it into a training set and a test set;

[0089] The data preprocessing and encoding module is configured to perform feature extraction through MFCC, obtain low-dimensional features from high-dimensional speech data, and then encode the obtained features into a pulse sequence; specifically: first, pre-emphasize, frame and window operations are performed on the speech data; then, for each frame of the short-time analysis window, the corresponding spectrum is obtained by fast Fourier transform; then the obtained spectrum is passed through the Mel filter group to obtain a Mel spectrum; finally, the Mel spectrum is logarithmized and discrete cosine transformed to obtain Mel frequency cepstral coefficients as speech features, and the speech features are encoded, and the total simulation time step is set to T. At each time step, if the spectrum feature is greater than the random probability generated by the uniform distribution, a pulse is generated at the time step with a value of 1, otherwise it is 0, thereby encoding the real value of the spectrum feature into a pulse sequence represented by discrete values ​​of 0 and 1;

[0090] The network building module is configured as a deep pulse neural network comprising an input layer, N hidden layers, and an output layer, with full connections between layers. The input layer is used to receive encoded pulse sequences; the hidden layer is used to learn the features contained in the input pulse sequences; the output layer is used to identify speech categories, with one neuron representing one type of speech. For each input sample, the pulse firing rate of each neuron in the output layer within the simulation time step is calculated, and the category represented by the neuron with the highest pulse firing rate is the predicted label. The neurons in the hidden and output layers of the model all use an integrated firing model, and the membrane potential of the neurons is calculated according to the following formula:

[0091] in, is the membrane potential of neuron i in layer n at time t, is the membrane potential of neuron i in layer n at time t-1, is the output of neuron i in layer n at time t-1, is the synaptic weight from neuron j in layer n-1 to neuron i in layer n, is the output of neuron j in layer n-1 at time t, V th is the threshold of the neuron;

[0092] The network training storage module is configured to obtain the pulse firing rate of each neuron in the output layer within the simulation time step, construct a mean square error loss function to calculate the error between the output layer firing rate and the sample label, use the spatiotemporal back propagation algorithm to distribute the error to the weights of neurons in each layer through the spatiotemporal relationship between the membrane potentials of the integrated firing model of each layer to optimize the network weights, and save the trained network weights, specifically:

[0093] Constructing the mean square error loss function The formula is as follows:

[0094] Among them, y is the label of the training sample, is the pulse firing rate of the statistical output layer neurons, T is the total simulation time step;

[0095] The error is distributed to the weights of neurons in each layer through the spatiotemporal relationship between the membrane potentials of the integrated firing model of each layer using the spatiotemporal back propagation algorithm to optimize the network weights. The gradient of the loss to the network weights is:

[0096] in is the derivative of the loss function with respect to the membrane potential. Its calculation can be divided into two cases: n is the output layer and n is the hidden layer. 1) When n is the output layer:

[0097] 2) When n is a hidden layer:

[0098] Among them, h(V n (t))Yes Gradient replacement function of ;

[0099] Train the deep spiking neural network model on the training set and save the network weights obtained after training;

[0100] The quantization test module is configured to quantize the floating-point weights obtained through training into fixed-point weights through a quantization operation, load the fixed-point weights, identify the test data set, and obtain predicted classification labels.

[0101] Example 3

[0102] This embodiment provides a hardware-oriented deep pulse neural network speech recognition device, including a memory and one or more processors. The memory stores executable code, and when the one or more processors execute the executable code, they are used to implement a hardware-oriented deep pulse neural network speech recognition method of embodiment one.

[0103] This embodiment also provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, it implements the hardware-oriented deep pulse neural network speech recognition method described in Example 1.

[0104] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0105] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0106] The present invention may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.

[0107] The various embodiments of the present invention are described in a progressive manner. Similar portions between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so its description is relatively simple. For relevant portions, refer to the description of the method embodiment.

[0108] The foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.

Claims

1. A hardware-oriented deep pulse neural network speech recognition method, characterized in that: The following steps are involved: Step 1: Obtain an open source speech dataset and divide it into training and test datasets; Step 2: Preprocess the speech data set, obtain low-dimensional speech features from high-dimensional speech data, and encode them into pulse sequences; Step 3: Build a deep pulse neural network model, in which each neuron adopts a hardware-friendly integrated ignition model; Step 4: Construct a loss function, use the space-time back propagation algorithm to optimize the network weights, train the deep spiking neural network model on the training data set, and save the updated network weights; Step 5: Quantize the floating-point weights into fixed-point weights, load the quantized fixed-point weights into the deep spiking neural network model, identify the test data set, obtain the predicted classification label, and implement speech recognition for the hardware-oriented deep spiking neural network model.

2. A hardware-oriented deep pulse neural network speech recognition method according to claim 1, characterized in that: Step 1 specifically includes: obtaining the audioMNIST open source speech dataset and dividing it into a training set and a test set.

3. A hardware-oriented deep pulse neural network speech recognition method according to claim 1, characterized in that: Step 2 specifically includes: Step 2.1, preprocess the speech data, first pre-emphasize, frame and window the speech data; then for each frame short-time analysis window, obtain the corresponding spectrum through fast Fourier transform; then obtain the Mel spectrum through the Mel filter group; finally, take the logarithm of the Mel spectrum, perform discrete cosine transform, and obtain the Mel frequency cepstrum coefficient as the speech feature; Step 2.2, encode the speech features, set the total simulation time step to T, at each time step, if the spectral feature is greater than the random probability generated by the uniform distribution, a pulse is generated at this time step with a value of 1, otherwise it is 0, thereby encoding the real value of the spectral feature into a pulse sequence represented by discrete values ​​of 0 and 1.

4. A hardware-oriented deep pulse neural network speech recognition method according to claim 1, characterized in that: Step three specifically includes: Step 3.1: The constructed deep pulse neural network model includes an input layer, N hidden layers and an output layer, and the layers are fully connected. The input layer is used to receive the encoded pulse sequence; the hidden layer is used to learn the features contained in the input pulse sequence; the output layer is used to recognize the speech category, and a neuron represents Table 1 Class of speech,For each input sample, calculate the pulse firing rate of each neuron in the output layer within the simulation time step, and the category represented by the neuron with the highest pulse firing rate is the predicted label; In step 3.2, the neurons in the hidden layer and output layer of the model adopt the integrated firing model, and the membrane potential of the neurons is calculated according to the following formula: in, is the membrane potential of neuron i in layer n at time t, is the membrane potential of neuron i in layer n at time t-1, is the output of neuron i in layer n at time t-1, is the synaptic weight from neuron j in the n-1th layer to neuron i in the nth layer, is the output of neuron j in layer n-1 at time t, V th is the threshold of the neuron.

5. A hardware-oriented deep pulse neural network speech recognition method according to claim 1, characterized in that: Step 4 specifically includes: Step 4.1, construct the mean square error loss function The calculation formula is as follows: Among them, y is the label of the training sample, is the pulse firing rate of the statistical output layer neurons, T is the total simulation time step; Step 4.2, the error is distributed to the weights of neurons in each layer through the spatiotemporal relationship between the membrane potentials of the integrated ignition model of each layer using the spatiotemporal back propagation algorithm to optimize the network weights. The gradient of the loss to the network weights is: in is the derivative of the loss function with respect to the membrane potential. Its calculation can be divided into two cases: n is the output layer and n is the hidden layer. 1) When n is the output layer: 2) When n is a hidden layer: Among them, h(V n (t))Yes The gradient replacement function of ; Step 4.3, train the deep pulse neural network model on the training set and save the network weights obtained after training.

6. A hardware-oriented deep pulse neural network speech recognition method according to claim 1, characterized in that: Step 5 specifically includes: Step 5.1, quantize the floating-point weights to fixed-point weights, which are specifically expressed as follows: quatized_W=round(clip(W,0.5 bit-1 -1,1-0.5 bit-1 )*2 bit-1 +0.5) / 2 bit-1 (7) Among them, quatized_W is the quantized fixed-point weight matrix, W is the floating-point weight matrix, and bit is the number of quantized bits; In step 5.2, the deep pulse neural network model loads the quantized fixed-point weights, recognizes the encoded test data set, obtains the predicted classification label, and realizes speech recognition of the hardware-oriented deep pulse neural network model.

7. A hardware-oriented deep pulse neural network speech recognition system, characterized by: It includes data set acquisition module, data preprocessing and encoding module, network construction module, network training storage module, and quantitative testing module; The data set acquisition module is configured to acquire the audioMNIST open source speech data set and divide it into a training set and a test set; The data preprocessing and encoding module is configured to perform feature extraction through MFCC, obtain low-dimensional features from high-dimensional speech data, and then encode the obtained features into a pulse sequence; specifically: first, perform pre-emphasis, frame division and windowing operations on the speech data; then, for each frame of the short-time analysis window, obtain the corresponding spectrum through fast Fourier transform; then obtain the Mel spectrum through the Mel filter group; finally, take the logarithm of the Mel spectrum, perform discrete cosine transform, obtain the Mel frequency cepstrum coefficient as the speech feature, and encode the speech feature, set the total simulation time step to T, and at each time step, if the spectrum feature is greater than the random probability generated by uniform distribution, the time step generates a pulse with a value of 1, otherwise it is 0, thereby encoding the real value of the spectrum feature into a pulse sequence represented by discrete values ​​of 0 and 1; The network building module is configured as a deep pulse neural network including an input layer, N hidden layers and an output layer, and the layers are fully connected; the input layer is used to receive the encoded pulse sequence; The hidden layer is used to learn the features contained in the input pulse sequence; the output layer is used to recognize the speech category, a neuron Represents a type of speech. For each input sample, the pulse firing rate of each neuron in the output layer within the simulation time step is calculated. The category represented by the neuron with the highest pulse firing rate is the predicted label. The neurons in the hidden layer and the output layer of the model all use the integrated firing model, and the membrane potential of the neuron is calculated according to the following formula: in, is the membrane potential of neuron i in layer n at time t, is the membrane potential of neuron i in layer n at time t-1, is the output of neuron i in layer n at time t-1, is the synaptic weight from neuron j in layer n-1 to neuron i in layer n, is the output of neuron j in layer n-1 at time t, V th is the threshold of the neuron; The network training storage module is configured to obtain the pulse firing rate of each neuron in the output layer within the simulation time step, construct a mean square error loss function to calculate the error between the output layer firing rate and the sample label, and use the spatiotemporal back propagation algorithm to distribute the error to the weight of each layer of neurons through the spatiotemporal relationship between the membrane potentials of the integrated ignition model of each layer to optimize the network weights, and save the trained network weights, specifically: Constructing mean square error loss function The formula is as follows: Among them, y is the label of the training sample, is the pulse firing rate of the statistical output layer neurons, T is the total simulation time step; The error is distributed to the weights of neurons in each layer through the spatiotemporal relationship between the membrane potentials of the integrated ignition model of each layer using the spatiotemporal back propagation algorithm to optimize the network weights; the gradient of the loss to the network weights is: in is the derivative of the loss function with respect to the membrane potential. Its calculation can be divided into two cases: n is the output layer and n is the hidden layer. 1) When n is the output layer: 2) When n is a hidden layer: Among them, h(V n (t))Yes The gradient replacement function of ; Train the deep spiking neural network model on the training set and save the network weights obtained after training; The quantization test module is configured to quantize the floating-point weights obtained through training into fixed-point weights through a quantization operation, load the fixed-point weights, identify the test data set, and obtain the predicted classification label.

8. A hardware-oriented deep pulse neural network speech recognition system as claimed in claim 1, characterized in that: The quantization operation is specifically as follows: quatized_W=round(clip(W,0.5 bit-1 -1,1-0.5 bit-1 )*2 bit-1 +0.5) / 2 bit-1 (7) Among them, quatized_W is the quantized fixed-point weight matrix, W is the floating-point weight matrix, and bit is the number of quantized bits.

9. A hardware-oriented deep pulse neural network speech recognition device, characterized in that: It comprises a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement a hardware-oriented deep pulse neural network speech recognition method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by a processor, a hardware-oriented deep pulse neural network speech recognition method as described in any one of claims 1-6 is implemented.