A supervised signal classification method based on neural network
By using calibration data of the same environment in neural networks to construct category templates and perform template matching, the problem of model performance degradation caused by data distribution differences in signal classification is solved, and more efficient signal classification and reduced computational complexity is achieved.
Patent Information
- Application Number
- CN202311750181.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2023-09-26
- Filing Date
- 2023-12-19
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2043-12-19
AI Technical Summary
In the signal classification task, the data distribution between the training stage and the classification stage is relatively different, resulting in a degradation of the classification performance of the model in practical applications.
By collecting calibration data in the same environment as the data to be classified, data preprocessing and template matching are performed, category templates are constructed using the output of the neural network template layer, and classification results are obtained through template matching, reducing the impact of data variability on model performance.
This method does not need to readjust the hyperparameters of the feature extraction part of the neural network, significantly reduces the computational complexity and improves classification performance, and is suitable for signal processing with strong variability.
Smart Images

Figure CN117725483B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a classification technology based on a neural network, and in particular to a supervised signal classification technology. Background Art
[0002] Convolutional neural network is a common deep learning method with powerful feature extraction capabilities. The general structure of convolutional neural network includes convolution part, fully connected part and output layer. The main function of convolution part is to implicitly extract features from input signals, while the main function of fully connected part is to organize and output features. For multi-classification tasks, neural network maps output values to probabilities by adding Softmax activation function in the output layer, and the category with the highest probability is the classification result. Convolutional neural network is used to solve multi-classification problems. In the training stage, the neural network structure is first built, hyperparameters are set, and the neural network parameters are trained using labeled training sets to obtain a complete network model. In the actual classification stage, the data to be classified is input into the trained neural network, and the data set to be classified is inferred in the neural network model to obtain the classification result. The commonly used training method is based on the back propagation of neural network gradients. The entire training process generally requires repeated use of training set data and updating weights in multiple generations, which requires a high amount of computation and a long processing time for the training process.
[0003] In some practical application scenarios, due to the influence of signal variability, there is often a large difference in the distribution of the training set in the training phase and the data to be classified in the classification phase, resulting in a decrease in the classification performance of the model trained only with the training set in actual application. For example, sound signals are affected by ambient sound, channel differences, and individual differences in acquisition, and the signals at different times and places will change significantly. Biological signals (such as EEG, ECG, and EMG) are affected by factors such as electrode displacement, muscle fatigue, and physiological differences between different individuals. It can be verified on many data sets that models pre-trained with only the training set are often difficult to directly generalize to the data to be classified in the classification phase. Summary of the invention
[0004] In order to solve the problem of poor actual classification effect caused by the difference in distribution of test set and data to be classified, the present invention provides a method which does not need to readjust the hyperparameters of the feature extraction part in the neural network and can reduce the impact of the data variation problem on the model performance.
[0005] The technical solution adopted by the present invention to solve the above technical problems is a supervised signal classification method based on a neural network, comprising the following steps:
[0006] Data preprocessing steps: collect data in the same collection environment as the data to be classified and complete labeling to generate calibration data; the calibration data contains data of all signal categories; the amount of calibration data is less than the amount of data to be classified;
[0007] Inputting the calibration data into a trained neural network module, and obtaining category templates of all signal categories according to the output of the template layer of the neural network module; the template layer of the neural network module is a fully connected layer specified in the neural network module;
[0008] The data to be classified is input into the trained neural network module, and the template layer of the neural network module outputs the feature data of the data to be classified;
[0009] Template matching step: Calculate the distance between the feature data of the data to be classified and the templates of each category, and take the category corresponding to the minimum distance as the final classification result.
[0010] The applicant analyzed and found that when the data distribution of the data to be classified is very different from that of the test set, although direct classification will lead to a significant drop in accuracy, the types of features extracted by the convolution part of the trained network are often the same. Therefore, a method is proposed to retain its ability to extract features, and then use a small part of the data collected and labeled in the same environment as the data to be classified to update the classification part of the neural network, thereby achieving the least model update calculation and improving the accuracy.
[0011] The present invention uses a small amount of labeled data collected in the same environment as the data to be classified as calibration data; the output of the calibration data at the neural network template layer is used to further construct a dimensionality reduction model to obtain a category template. Template matching is performed between the data to be classified and the category template by calculating the distance, and the classification result is obtained using the template matching result. The impact of signal variability on model performance is reduced. Unlike other improved solutions that use calibration data to incrementally train the neural network model, the method proposed in the present invention does not require retraining of the neural network parameters, significantly reduces the computational complexity, and has superior classification performance. Furthermore, the template dimensionality reduction matching method further reduces the computational complexity while reducing the template dimensional redundancy.
[0012] The beneficial effect of the present invention is that the model redundancy and calculation complexity are reduced, and it has wide application value in the processing of signals with strong variability such as speech signals and physiological signals. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 Workflow diagram of supervised template dimensionality reduction matching method based on neural network DETAILED DESCRIPTION
[0014] The present invention comprises two parts: one is a neural network module that has been trained, and the other is a template matching module added for classification.
[0015] Complete the collection of calibration data. The calibration data can be directly randomly taken from a small part of the data to be classified and labeled, or a small part can be specially collected from the same environment as the data to be classified and labeled. The small part here means that the proportion of calibration data is less than a smaller proportion of the data to be classified, such as 1%, or the total number of calibration data is less than a smaller number. The calibration data also needs to cover all signal categories of the current classification.
[0016] The trained neural network module includes a convolution part, a fully connected part, and an output layer with a Softmax activation function added; the present invention no longer uses the output layer with a Softmax activation function, and uses the last fully connected layer of the fully connected part as the template layer, and uses the convolution part and the fully connected part before the template layer as the data preprocessing part. The module matching module is used to input the calibration data of the same category label into the neural network module, and obtain the category template after fusing the feature data of the category output by the template layer. Finally, a category template is generated for each signal category. The means of fusion can be to perform weighted averaging on the feature data of the same category, and use the weighted average result as the category template.
[0017] Optionally, the template layer may not be the last fully connected layer, but another fully connected layer. You can actually select the template layer as needed. If the last fully connected layer is not selected as the template layer, the fully connected layers after the selected template layer and the output layer with the Softmax activation function added are not used in the actual classification.
[0018] After the extraction of the category template is completed, the data to be classified is input into the neural network module, and the template layer of the neural network module outputs the feature data of the data to be classified.
[0019] The template matching module calculates the distance between the feature data of the data to be classified and the templates of each category, and takes the category corresponding to the minimum distance as the final classification result.
[0020] Furthermore, in order to make the feature data of different categories have greater differences in space, the feature data output by the template layer and the feature data of the data to be classified are both subjected to dimensionality reduction processing, and the weighted average result after dimensionality reduction processing is used as the category template. The feature data of the data to be classified also needs to be subjected to dimensionality reduction processing before being input into the template matching module.
[0021] Specifically, the distance calculation uses Euclidean distance, Hamming distance, cosine similarity, etc., as long as it can be used to calculate the distance from feature data to be classified in different senses to the category template.
[0022] The specific method flow of the embodiment is as follows Figure 1 shown.
[0023] S0. Build the neural network structure, set the hyperparameters, and use the training set data to pre-train the neural network model. Due to the strong difference between the training set and the data to be classified, a small parameter model should be used and the number of training times should be reduced to avoid over-training and overfitting problems. Set the second-to-last layer of the neural network as the template layer. Since the function of the neural network in this method is mainly the preprocessing link of feature extraction and dimensionality transformation, the neural network inference calculation between the model input and the template layer output will be represented as a function f NN .
[0024] S1. Calibration data Inference is performed in the neural network model, where c represents the cth category, c = 1, 2, ..., C, C is the total number of categories, and i = 1, 2, ..., N C , N C Indicates the number of calibration data for each category, is the data information of the i-th calibration data of the c-th category, The label of the i-th calibration data of the c-th category. The calibration data is obtained by passing it through the neural network f NN Output at the template layer after inference
[0025]
[0026] S2, yes Perform supervised dimensionality reduction training, the goal of which is to minimize the intra-class distance and maximize the inter-class distance. Dimensionality reduction training enables calibration data of different categories to have greater inter-class distinction, while also reducing the computational complexity of subsequent template matching. The dimensionality reduction model is represented as a function f D ,use Fit the dimensionality reduction model and In the input dimension reduction model, the calibration data after dimension reduction is represented as In this method, linear discriminant analysis (LDA) is used for dimensionality reduction. Compared with other methods, the main advantage of LDA dimensionality reduction is low complexity and good performance when the classification category sample data is balanced. After dimensionality reduction, the calibration data of different categories are averaged to obtain the category template. The calculation of the cth category template is shown in the following formula:
[0027]
[0028] S3, treat the classified data S = {x i} Similarly, inference is performed in the neural network model to obtain S NN =f NN(S), and use the dimensionality reduction model to reduce the dimension to obtain S D =f D (S NN ).
[0029] S4. Calculate the data {x i}(x i ∈S D ) and the class template Tem c The distance between Get the minimum value of the current data distance from each template Then c k This is the final classification result. Including common Euclidean distance, Hamming distance, cosine similarity, etc., which are used to characterize the distance from the test data to the template in different senses.
Claims
1. A supervised signal classification method based on a neural network, characterized in that: The following steps are involved: Data preprocessing steps: collect data from the same collection environment as the data to be classified and complete labeling to generate calibration data; the calibration data contains data of all signal categories; Inputting the calibration data into a trained neural network module, and obtaining category templates of all signal categories according to the output of the template layer of the neural network module; the template layer of the neural network module is a fully connected layer specified in the neural network module; The data to be classified is input into the trained neural network module, and the template layer of the neural network module outputs the feature data of the data to be classified; Template matching step: calculate the distance between the feature data of the data to be classified and the templates of each category, and take the category corresponding to the minimum distance value as the final classification result; The specific method for obtaining the category templates of all signal categories is as follows: inputting the calibration data of the same category label into the neural network module, fusing the feature data of the category output by the template layer to obtain the category template, and generating a category template for each signal category; The feature data output by the template layer and the feature data of the data to be classified are both subjected to dimensionality reduction processing, and the feature fusion result after dimensionality reduction processing is used as the category template. The feature data of the data to be classified is subjected to dimensionality reduction processing before completing the template matching step.
2. The method according to claim 1, characterized in that: The fusion method is to perform weighted averaging on the feature data of the same category and use the weighted average result as the category template.
3. The method according to claim 1, characterized in that: The distance calculation in the template matching step is calculated using Euclidean distance, Hamming distance or cosine similarity.
4. The method according to claim 1, characterized in that: The data collected in the same environment as the data to be classified is a small part of the data to be classified randomly or a small part of the data collected from the same environment as the data to be classified; The small portion means that the ratio of the calibration data to the number of the data to be classified is less than a preset percentage, or the total number of the calibration data is less than a preset number.
5. The method according to claim 1, characterized in that: The specified fully connected layer is the last fully connected layer.
Citation Information
Patent Citations
Face recognition method and device as well as mobile terminal
CN102479320A
Fine-grained image recognition method based on multi-view feature fusion
CN112132004A
Mammary gland X-ray image lesion detection method and device based on normal model learning
CN112132808A