A lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning

By improving VGGNet to VGG-GAP and pruning redundant convolutional kernels, a lightweight and robust underwater acoustic target recognition network is constructed, which solves the problems of high model complexity and environmental instability in underwater acoustic target recognition and achieves efficient recognition in small sample environments.

CN119760352BActive Publication Date: 2025-10-31HARBIN ENG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411842242.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-10-31
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

Existing underwater acoustic target recognition technologies face challenges such as high network model complexity, massive parameter computation, and high sample requirements, and are not robust in small sample sizes and complex and variable marine environments.

Method used

We adopt a VGG-GAP-based approach and network pruning, improve VGGNet through global average pooling, prune redundant convolutional kernels, and adjust the pruning threshold to construct a lightweight and robust underwater acoustic target recognition network.

Benefits of technology

It achieves near-original network recognition accuracy in small sample environments while significantly reducing the number of parameters and computational cost, and exhibits higher robustness in mismatched underwater acoustic channels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760352B_ABST
    Figure CN119760352B_ABST
Patent Text Reader

Abstract

This invention relates to a lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning. The purpose of this invention is to address the problems of high network model complexity, large parameter computation, and high sample requirements in existing underwater acoustic target recognition applications; as well as the lack of high-quality data samples and the instability of underwater acoustic target recognition methods due to the complex and variable ocean channels. The process is as follows: 1. Construct a VGG-GAP recognition network; 2. Obtain the trained VGG-GAP recognition network and save its corresponding weights; 3. Obtain a pruned lightweight VGG-GAP recognition network and its corresponding weights; 4. Select the optimal pruned lightweight VGG-GAP recognition network and its corresponding weights; 5. Test with data samples to obtain underwater acoustic target recognition results. This invention is applicable to the field of underwater acoustic target recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning. Background Technology

[0002] Underwater acoustic target identification is a key task in underwater acoustic signal processing, with significant implications for marine resource development, marine economy, and marine security. However, in practical applications, underwater acoustic target identification still faces considerable challenges. Acquiring radiated noise from underwater acoustic targets often requires large-scale experiments, resulting in high data acquisition costs. Furthermore, abundant, random background noise degrades signal purity, leading to a scarcity of effective data. Consequently, underwater acoustic target identification often suffers from a severe lack of multi-category, high-quality data samples, hindering the establishment of comprehensive databases and typically resulting in small-sample data environments. In addition, the complex and variable marine environment transforms the underwater acoustic channel into a complex time-varying, space-varying, and frequency-varying filter. Signals acquired under different times, locations, and seasons all undergo distortion. These mismatched environments and distorted signals significantly increase the difficulty of underwater acoustic target identification. Therefore, researching an underwater acoustic target identification method adapted to small-sample data environments and robust to mismatched environments is of great importance.

[0003] With the rapid development of artificial intelligence, deep learning has been widely applied in underwater acoustic target recognition. However, to improve the feature extraction and recognition performance of networks, deep learning-based underwater acoustic target recognition networks typically use deeper layers, more channels, larger parameters, and more computationally complex networks. This results in more complex networks, greater training difficulty, higher data requirements, and greater difficulty in applying them to underwater acoustic target recognition problems with small sample sizes. Furthermore, the large number of parameters and computational demands of complex networks also place higher demands on the space, resources, and energy consumption of the equipment used to apply the model. Therefore, researching a lightweight underwater acoustic target recognition method is of great significance. Summary of the Invention

[0004] The purpose of this invention is to address the problems of high network model complexity, large parameter computation, and high sample requirements in existing underwater acoustic target recognition applications; as well as the lack of existing high-quality data samples and the instability of underwater acoustic target recognition methods due to the complex and variable ocean channels. Therefore, this invention proposes a lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning.

[0005] The specific process of a lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning is as follows:

[0006] Step 1: Construct a VGG-GAP identification network;

[0007] Step 2: Train the VGG-GAP recognition network using the centralized training set of the underwater acoustic dataset, obtain the trained VGG-GAP recognition network, and save the weights corresponding to the trained VGG-GAP recognition network.

[0008] Step 3: Use network pruning methods to prune the trained VGG-GAP recognition network to obtain a lightweight VGG-GAP recognition network and corresponding weights.

[0009] Step 4: Adjust the pruning threshold to obtain the lightweight VGG-GAP recognition network after pruning corresponding to different pruning thresholds, and select the optimal lightweight VGG-GAP recognition network after pruning and the corresponding weights.

[0010] Step 5: Use the optimally pruned lightweight VGG-GAP recognition network test data samples to obtain underwater acoustic target recognition results.

[0011] Preferably, in step one, a VGG-GAP identification network is constructed; the specific process is as follows:

[0012] The VGG-GAP identification network includes, in sequence:

[0013] Input layer, first convolutional block, first max pooling layer, second convolutional block, second max pooling layer, third convolutional block, fourth convolutional block, third max pooling layer, fifth convolutional block, sixth convolutional block, fourth max pooling layer, seventh convolutional block, eighth convolutional block, fifth max pooling layer, global average pooling layer, first fully connected layer, second fully connected layer, softmax activation layer, output layer;

[0014] Each of the first, second, third, fourth, fifth, sixth, seventh, and eighth convolutional blocks includes a convolutional layer and a ReLU activation function layer in sequence.

[0015] The kernel size of each convolutional layer is 3×3;

[0016] The number of channels in both the first fully connected layer and the second fully connected layer is 512.

[0017] Preferably, the formula for calculating the number of parameters in each convolutional layer and each fully connected layer in the VGG-GAP recognition network is as follows:

[0018] params Conv =channels out _a×(kernel w ×kernel h ×channels in _a)+bias_a

[0019] params FC =channels out _b×channels in _b+bias_b

[0020] in,

[0021] params Conv The number of parameters for each convolutional layer;

[0022] channels out _a is the number of output channels for each convolutional layer; channels in _a is the number of input channels for each convolutional layer;

[0023] kernel h The length of the convolutional kernel for each convolutional layer; kernel w The width of the convolutional kernel for each convolutional layer;

[0024] bias_a is the number of biases for each convolutional layer, and bias_a = channels out _a;

[0025] params FC The number of parameters for each fully connected layer;

[0026] channels in _b is the number of input channels for each fully connected layer; channels out _b is the number of output channels for each fully connected layer;

[0027] bias_b is the number of biases for each fully connected layer, and bias_b = channels out _b.

[0028] Preferably, the floating-point operations of each convolutional layer and each fully connected layer in the VGG-GAP recognition network are calculated as follows:

[0029] FLOPs Conv =feature w ×feature h ×params Conv

[0030] FLOPs FC =params FC

[0031] Among them, FLOPs Conv and FLOPs FC These represent the number of floating-point operations for each convolutional layer and each fully connected layer, respectively.

[0032] feature h and feature w These represent the length and width of the output feature map for each convolutional layer, respectively.

[0033] params Conv The number of parameters for each convolutional layer;

[0034] params FC The number of parameters for each fully connected layer.

[0035] Preferably, the parameter values ​​of all fully connected layers in the VGG-GAP identification network are as follows:

[0036] params FC(VGG-GAP) =

[0037] (channels1 out ×channels1 in +bias1)+(channels2 out ×channels2 in +bias2)

[0038] in,

[0039] channels1 out The number of output channels in the first fully connected layer of the VGG-GAP network is identified.

[0040] channels1 in The number of input channels in the first fully connected layer of the VGG-GAP network is determined;

[0041] bias1 is the number of biases in the first fully connected layer of the VGG-GAP recognition network, and bias1 = channels1. out ;

[0042] channels2 out The number of output channels in the second fully connected layer of the VGG-GAP network is identified.

[0043] channels2 in The number of input channels in the second fully connected layer of the VGG-GAP identification network;

[0044] bias2 is the number of biases in the second fully connected layer of the VGG-GAP recognition network, and bias2 = channels2. out .

[0045] Preferably, in step two, the VGG-GAP recognition network is trained using a centralized training set of underwater acoustic data to obtain the trained VGG-GAP recognition network and save the weights corresponding to the trained VGG-GAP recognition network; the specific process is as follows:

[0046] The underwater acoustic dataset is trained by passing the input layer sequentially through the first convolutional block, the first max pooling layer, the second convolutional block, the second max pooling layer, the third convolutional block, the fourth convolutional block, the third max pooling layer, the fifth convolutional block, the sixth convolutional block, the fourth max pooling layer, the seventh convolutional block, the eighth convolutional block, the fifth max pooling layer, the global average pooling layer (GAP), the first fully connected layer, the second fully connected layer, the softmax activation layer, and the output layer. The output layer outputs the underwater acoustic target recognition result.

[0047] Train the VGG-GAP recognition network to obtain the trained VGG-GAP recognition network and save the weights corresponding to the trained VGG-GAP recognition network.

[0048] Preferably, in step three, a network pruning method is used to prune the trained VGG-GAP recognition network to obtain a pruned lightweight VGG-GAP recognition network and corresponding weights; the specific process is as follows:

[0049] Step 31: Take the average value of the feature maps output by each channel of each convolutional block in the first, second, third, fourth, fifth, sixth, seventh, and eighth convolutional blocks of the trained VGG-GAP recognition network to obtain the average feature map output by each convolutional block.

[0050] Step 32: Calculate the Pearson correlation coefficient between the feature map of each channel output by each convolutional block and the average feature map, and take the absolute value of the Pearson correlation coefficient and sort them in descending order of absolute value;

[0051] The Pearson correlation coefficient is calculated as follows:

[0052]

[0053] in,

[0054] s i The vector expansion of the feature map output from the i-th channel of each convolutional block, s avg The vector expansion of the average feature map output for each convolutional block;

[0055] The mean of the vector expansion of the feature map output by the i-th channel of each convolutional block. The mean of the vector expansion of the average feature map output for each convolutional block;

[0056] Corr i The Pearson correlation coefficient between the feature map output by the i-th channel of each convolutional block and the average feature map;

[0057] |Corr i | The result of taking the absolute value of the Pearson correlation coefficient between the feature map output by the i-th channel of each convolutional block and the average feature map;

[0058] |Corr i |∈[Corr1|,|Corr2|,...,|Corr N ];

[0059] |Corr1|,|Corr2|,...,|Corr N | This is the result of Pearson correlation coefficients sorted in descending order after taking the absolute value;

[0060] Step 33: In the descending sequence of correlation coefficients, calculate the proportion of the sum of the correlations of the feature maps output by the first i channels to the total sum of all correlations.

[0061] Steps 3 and 4: Until the feature map of the k-th channel is calculated, the ratio of the sum of the correlations of the feature maps of the first k channels to the total correlation of the feature maps of all channels is greater than or equal to the pruning threshold.

[0062] At this point, the feature maps output by the k channels are the principal components of the feature maps. The convolution kernel corresponding to each feature map output by the k channels is the convolution kernel retained by the pruning algorithm. The position and number of the retained convolution kernels are recorded.

[0063] The pruning threshold is calculated as follows:

[0064]

[0065] Where k is the number of convolution kernels retained, and η is the pruning threshold;

[0066] Step 35: Modify the structure and corresponding optimal weights of the trained VGG-GAP recognition network according to the position and number of the retained convolutional kernels to obtain the pruned lightweight network and corresponding weights;

[0067] Load the corresponding weights into the pruned lightweight network, take the training set of the underwater acoustic dataset from step two as input, and calculate the performance and complexity of the pruned lightweight network.

[0068] Performance refers to recognition accuracy, while complexity refers to the number of parameters and computational load.

[0069] Preferably, in step four, the pruning threshold is adjusted to obtain lightweight VGG-GAP recognition networks after pruning corresponding to different pruning thresholds, and the optimal lightweight VGG-GAP recognition network after pruning and its corresponding weights are selected; the specific process is as follows:

[0070] Adjust the pruning threshold to obtain lightweight VGG-GAP recognition networks after pruning for different pruning thresholds;

[0071] Calculate the recognition accuracy, number of network parameters, and computational cost of the lightweight VGG-GAP recognition network after pruning for different pruning thresholds.

[0072] Plot a curve with the number of network parameters on the x-axis and the recognition accuracy on the y-axis. The pruning threshold corresponding to the accuracy and the number of parameters at the first downward inflection point of the curve is the optimal pruning threshold.

[0073] The network structure corresponding to the optimal pruning threshold is the optimal pruned VGG-GAP. The optimal lightweight VGG-GAP recognition network and its corresponding weights after pruning are obtained.

[0074] Preferably, in step five, the optimal pruned lightweight VGG-GAP recognition network test data samples are used to obtain underwater acoustic target recognition results; the specific process is as follows:

[0075] Input the test set of the underwater acoustic dataset from step two into the optimal pruned VGG-GAP, and the optimal pruned VGG-GAP will output the underwater acoustic target recognition result.

[0076] Preferably, in step two, each sample data in the underwater acoustic dataset is the matrix data corresponding to the LOFAR spectrum within the 0–500 Hz frequency band; the specific process is as follows:

[0077] The raw underwater acoustic signal is truncated every 20 seconds to obtain the data corresponding to each sample.

[0078] A time window of 0.5s was used to truncate the data for each sample, resulting in truncated data for each sample.

[0079] Perform a Fast Fourier Transform on each truncated data point to obtain each truncated data point after the Fast Fourier Transform.

[0080] By concatenating all truncated data from the Fast Fourier Transform of the same sample along the time dimension, we obtain...

[0081] Full-band LOFAR spectral matrix data for each sample;

[0082] Extract the matrix data within the 0-500Hz frequency band from the full-band LOFAR spectral matrix data as each sample data in the underwater acoustic dataset.

[0083] The beneficial effects of this invention are as follows:

[0084] Underwater acoustic target recognition is of great significance in marine resource development, marine economy, and marine security. However, in practical applications, research data faces challenges such as small sample sizes and environmental mismatch; model design faces problems of high network complexity, large parameter computation, and high sample requirements. To address these issues, this invention proposes a lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning. This method improves VGGNet by combining Global Average Pooling (GAP) to obtain a lighter VGG-GAP network; it uses network pruning based on feature map correlation to remove redundant convolutional kernels in VGG-GAP and adjusts the pruning threshold to obtain the optimal network structure. The network structure of this invention can achieve a recognition accuracy approximately equal to that of the original model with a much smaller number of parameters and computational cost, and it has a certain degree of robustness in small sample data and mismatched underwater acoustic channels, making it more suitable for complex and variable small sample underwater acoustic environments.

[0085] (1) The present invention can achieve a recognition accuracy no less than that of the original network by using a lightweight network with far fewer parameters and less computational cost.

[0086] (2) The present invention can achieve more robust recognition performance in a small sample underwater acoustic data environment.

[0087] (3) The present invention can achieve more robust and superior recognition performance in mismatched underwater acoustic channel environments.

[0088] (4) No retraining or fine-tuning is required after pruning according to the present invention. Attached Figure Description

[0089] Figure 1 This is a structural diagram of the optimized VGG-GAP part in this invention;

[0090] Figure 2 This is a diagram of the VGG-GAP network structure in this invention;

[0091] Figure 3 This is a schematic diagram of network pruning in this invention;

[0092] Figure 4 This is a graph showing the change in accuracy as a function of network parameters during the network pruning process of this invention.

[0093] Figure 5 This is a graph showing the change in computational load as a function of network parameters during the network pruning process of this invention.

[0094] Figure 6 This is a comparison chart of the recognition accuracy of the present invention under the condition of gradually decreasing data volume. Detailed Implementation

[0095] Specific Implementation Method 1: The specific process of this implementation method for a lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning is as follows:

[0096] Step 1: Optimize the VGGNet recognition network by combining Global Average Pooling (GAP) to construct the VGG-GAP recognition network;

[0097] Step 2: Train the VGG-GAP recognition network using a small sample underwater acoustic dataset training set, obtain the trained VGG-GAP recognition network, and save the weights corresponding to the trained VGG-GAP recognition network.

[0098] Step 3: Use network pruning methods to prune the trained VGG-GAP recognition network to obtain a lightweight VGG-GAP recognition network and corresponding weights.

[0099] Step 4: Adjust the pruning threshold to obtain the lightweight VGG-GAP recognition network after pruning corresponding to different pruning thresholds, and select the optimal lightweight VGG-GAP recognition network after pruning and the corresponding weights.

[0100] Step 5: Use the optimally pruned lightweight VGG-GAP recognition network test data samples to obtain underwater acoustic target recognition results.

[0101] Specific Implementation Method Two: This implementation method differs from Specific Implementation Method One in that, in step one, the VGGNet recognition network is optimized by combining Global Average Pooling (GAP) to construct the VGG-GAP recognition network;

[0102] The specific process is as follows:

[0103] The VGG-GAP identification network includes, in sequence:

[0104] Input layer, first convolutional block, first max pooling layer, second convolutional block, second max pooling layer, third convolutional block, fourth convolutional block, third max pooling layer, fifth convolutional block, sixth convolutional block, fourth max pooling layer, seventh convolutional block, eighth convolutional block, fifth max pooling layer, global average pooling layer (GAP), first fully connected layer, second fully connected layer, softmax activation layer, output layer;

[0105] Each of the first, second, third, fourth, fifth, sixth, seventh, and eighth convolutional blocks includes a convolutional layer and a ReLU activation function layer in sequence.

[0106] The kernel size of each convolutional layer is 3×3;

[0107] The number of channels in both the first fully connected layer and the second fully connected layer is 512.

[0108] The other steps and parameters are the same as in Specific Implementation Method 1.

[0109] Specific Implementation Method Three: This implementation method differs from Specific Implementation Method One or Two in that the calculation formula for the number of parameters in each convolutional layer and each fully connected layer in the VGG-GAP recognition network is as follows:

[0110] To quantitatively describe the lightweight nature of the network, the complexity of the network is described by the number of network parameters and floating-point operations (FLOPs). Here, the calculation method for the number of parameters is described.

[0111] params Conv =channels out _a×(kernel w ×kernel h ×channels in _a)+bias_a

[0112] params FC =channels out _b×channels in _b+bias_b

[0113] in,

[0114] params Conv The number of parameters for each convolutional layer;

[0115] channels out _a is the number of output channels for each convolutional layer; channels in _a is the number of input channels for each convolutional layer;

[0116] kernel h The length of the convolutional kernel for each convolutional layer; kernel w The width of the convolutional kernel for each convolutional layer;

[0117] bias_a is the number of biases for each convolutional layer, and bias_a = channels out _a;

[0118] params FC The number of parameters for each fully connected layer;

[0119] channels in _b is the number of input channels for each fully connected layer; channels out_b is the number of output channels for each fully connected layer;

[0120] bias_b is the number of biases for each fully connected layer, and bias_b = channels out _b.

[0121] Other steps and parameters are the same as in specific implementation method one or two.

[0122] Specific Implementation Method Four: This implementation method differs from Specific Implementation Methods One to Three in that the floating-point operations (FLOPs) of each convolutional layer and each fully connected layer in the VGG-GAP recognition network are calculated as follows:

[0123] To quantitatively describe the lightweight nature of a network, we use the number of network parameters and floating-point operations (FLOPs) to describe the network's complexity. Here, we describe how floating-point operations (FLOPs) are calculated.

[0124] FLOPs Conv =feature w ×feature h ×params Conv

[0125] FLOPs FC =params FC

[0126] Among them, FLOPs Conv and FLOPs FC These represent the number of floating-point operations for each convolutional layer and each fully connected layer, respectively.

[0127] feature h and feature w Output the length and width of the feature map for each convolutional layer (the convolutional kernel of the convolutional layer);

[0128] params Conv The number of parameters for each convolutional layer;

[0129] params FC The number of parameters for each fully connected layer.

[0130] To quantitatively analyze the degree of parameter lightweighting in VGG-GAP, based on params FC =channels out _b×channels in The parameter calculation method shown in _b+bias_b;

[0131] The other steps and parameters are the same as those in one of the specific implementation methods one to three.

[0132] Specific Implementation Method Five: This implementation method differs from Specific Implementation Methods One to Four in that the parameter quantities of all fully connected layers in the VGG-GAP identification network (the modified VGG-GAP has two fully connected layers) are as follows:

[0133] params FC(VGG-GAP) =

[0134] (channels1 out ×channels1 in +bias1)+(channels2 out ×channels2 in +bias2)

[0135] in,

[0136] channels1 out The number of output channels in the first fully connected layer of the VGG-GAP network is identified.

[0137] channels1 in The number of input channels in the first fully connected layer of the VGG-GAP network is determined;

[0138] bias1 is the number of biases in the first fully connected layer of the VGG-GAP recognition network, and bias1 = channels1. out ;

[0139] channels2 out The number of output channels in the second fully connected layer of the VGG-GAP network is identified.

[0140] channels2 in The number of input channels in the second fully connected layer of the VGG-GAP identification network;

[0141] bias2 is the number of biases in the second fully connected layer of the VGG-GAP recognition network, and bias2 = channels2. out ;

[0142] params FC(VGG-GAP) = (512×512+512)+(512×4+4)=264708≈0.3×10 6

[0143] According to params FC =channels out _b×channels inThe parameter calculation method shown in _b+bias_b calculates the parameters of all fully connected layers in VGGNet (VGGNet has three fully connected layers) as follows:

[0144] params FC(VGG) =((h×w×channels)×channels out _1+bias_1)+

[0145] (channels in _2×channels out _2+bias_2)+

[0146] (channels in 3×channels out _3+bias_3)

[0147] in,

[0148] h is the length of the output feature map of the convolutional layer in the eighth convolutional block, and w is the width of the output feature map of the convolutional layer in the eighth convolutional block;

[0149] channels is the number of channels output by the convolutional layer in the eighth convolutional block;

[0150] (h×w×channels) represents the number of input channels in the first fully connected layer of the VGGNet network;

[0151] channels out _1 represents the number of output channels of the first fully connected layer in the VGGNet network;

[0152] bias_1 is the number of biases in the first fully connected layer of the VGGNet network;

[0153] channels in _2 represents the number of input channels in the second fully connected layer of the VGGNet network;

[0154] channels out _2 represents the number of output channels in the second fully connected layer of the VGGNet network;

[0155] bias_2 is the number of biases in the second fully connected layer of the VGGNet network;

[0156] channels in _3 represents the number of input channels in the third fully connected layer of the VGGNet network;

[0157] channels out _3 represents the number of output channels in the third fully connected layer of the VGGNet network;

[0158] bias_3 is the number of biases in the third fully connected layer of the VGGNet network;

[0159] params FC(VGG) =((7×6×512)×4096+4096)+(4096×4096+4096)+(4096×4+4)

[0160] =104882180≈104.9×10 6

[0161] Table 1 shows the parameter count of the lightweight VGG-GAP obtained from step one optimization and its comparison with the unmodified VGGNet. Compared to VGGNet, the parameter count of the convolutional layers in VGG-GAP remains unchanged, while the parameter count of the fully connected layers and the overall network is significantly reduced, with the total parameter count being only 8.3% of that of VGGNet. Therefore, VGG-GAP effectively achieves network lightweighting while maintaining the feature extraction capability of the convolutional layers.

[0162] Table 1 Comparison of Parameter Quantities between VGG-GAP and VGGNet

[0163]

[0164] The specific optimization process of VGG-GAP network compared to VGGNet is as follows:

[0165] (1) Keep the convolutional layer part of VGGNet unchanged, that is, keep the feature extraction capability of the network structure unchanged, and change the fully connected layer part.

[0166] (2) Change the first fully connected layer of VGGNet to a GAP layer to achieve feature compression, thereby reducing the dimensionality of subsequent inputs.

[0167] (3) The second and third fully connected layers in VGGNet are retained, and their channel count is modified to 512 to ensure that the number of channels in the fully connected layers is the same as the number of feature maps output by the convolutional layers. Therefore, when pruning the feature maps and the corresponding convolutional kernels, the fully connected layers only need to prune the corresponding weights, without needing to retrain or fine-tune the parameters.

[0168] The other steps and parameters are the same as those in one of the specific implementation methods one to four.

[0169] Specific Implementation Method Six: This implementation method differs from Specific Implementation Methods One to Five in that, in step two, a small sample underwater acoustic dataset is used as the centralized training set to train the VGG-GAP recognition network, obtaining the trained VGG-GAP recognition network and saving the weights corresponding to the trained VGG-GAP recognition network; the specific process is as follows:

[0170] The small sample underwater acoustic dataset is concentrated in the training set and then fed into the input layer in sequence: the first convolutional block, the first max pooling layer, the second convolutional block, the second max pooling layer, the third convolutional block, the fourth convolutional block, the third max pooling layer, the fifth convolutional block, the sixth convolutional block, the fourth max pooling layer, the seventh convolutional block, the eighth convolutional block, the fifth max pooling layer, the global average pooling layer (GAP), the first fully connected layer, the second fully connected layer, the softmax activation layer, and the output layer. The output layer outputs the underwater acoustic target recognition result.

[0171] Train the VGG-GAP recognition network until it converges, obtain the trained VGG-GAP recognition network, and save the weights corresponding to the trained VGG-GAP recognition network.

[0172] The other steps and parameters are the same as those in one of the specific implementation methods one to five.

[0173] Specific Implementation Method Seven: This implementation method differs from Specific Implementation Methods One through Six in that step three employs a network pruning method to prune the trained VGG-GAP recognition network, obtaining a pruned lightweight VGG-GAP recognition network and corresponding weights; the specific process is as follows:

[0174] Step 31: Take the average value of the feature maps output by each channel of each convolutional block in the first, second, third, fourth, fifth, sixth, seventh, and eighth convolutional blocks of the trained VGG-GAP recognition network, thereby achieving feature map dimensionality reduction and obtaining the average feature map output by each convolutional block.

[0175] For example, the 28×28×512 label above the fifth convolutional block means that there are 512 output channels, each with a size of 28×28. The average of these 512 feature maps with a size of 28×28 is obtained to get an average feature map. Then, each of these 512 feature maps is compared with this average feature map to calculate the Pearson correlation coefficient, which will be discussed below.

[0176] Step 32: Calculate the Pearson correlation coefficient between the feature map of each channel output by each convolutional block and the average feature map, and take the absolute value of the Pearson correlation coefficient and sort them in descending order of absolute value;

[0177] The Pearson correlation coefficient is calculated as follows:

[0178]

[0179] in,

[0180] s i The vector expansion of the feature map output from the i-th channel of each convolutional block, savg The vector expansion of the average feature map output for each convolutional block;

[0181] The mean of the vector expansion of the feature map output by the i-th channel of each convolutional block. The mean of the vector expansion of the average feature map output for each convolutional block;

[0182] Corr i The Pearson correlation coefficient between the feature map output by the i-th channel of each convolutional block and the average feature map;

[0183] |Corr i | The result of taking the absolute value of the Pearson correlation coefficient between the feature map output by the i-th channel of each convolutional block and the average feature map;

[0184] |Corr i |∈[Corr1|,|Corr2|,...,|Corr N ];

[0185] |Corr1|,|Corr2|,...,|Corr N | This is the result of Pearson correlation coefficients sorted in descending order after taking the absolute value;

[0186] Step 33: In the descending sequence of correlation coefficients, calculate the proportion of the sum of the correlations of the feature maps output by the first i channels to the total sum of all correlations.

[0187] Steps 3 and 4: Until the feature map of the k-th channel is calculated, the ratio of the sum of the correlations of the feature maps of the first k channels to the total correlation of the feature maps of all channels is greater than or equal to the pruning threshold.

[0188] At this point, the feature maps output by the k channels are the principal components of the feature maps. The convolution kernel corresponding to each feature map output by the k channels is the convolution kernel retained by the pruning algorithm. The position and number of the retained convolution kernels are recorded.

[0189] The pruning threshold is calculated as follows:

[0190]

[0191] Where k is the number of convolution kernels retained, and η is the pruning threshold;

[0192] The convolution kernel position is illustrated below: one output channel corresponds to one convolution kernel. For example, in a 28×28×512 model with 512 channels, there are 512 convolution kernels. The kernel position is its corresponding number, such as kernel number 1, kernel number 2, and so on up to kernel number 512. When retaining kernels based on a threshold, the kernel position is recorded by noting the kernel number of the retained kernel.

[0193] The pruning threshold is illustrated below: Taking η = 99% as an example, after sorting all relevances in descending order, the feature maps whose sum of the top k relevances accounts for 99% or more of the sum of all relevances are retained by the pruning algorithm. These feature maps contain 99% of the feature information from all feature maps. The remaining feature maps contain only 1% of the effective information but occupy a large number of parameters and computational resources. These redundant feature maps are the parts removed by the pruning algorithm.

[0194] Step 35: Modify the structure of the trained VGG-GAP recognition network (the structure of the convolutional blocks in the trained VGG-GAP recognition network is modified according to the number of the retained convolutional kernels, and the rest are deleted) and the corresponding optimal weights based on the position and number of the retained convolutional kernels, to obtain the pruned lightweight network and the corresponding weights.

[0195] Load the corresponding weights onto the pruned lightweight network, take the small sample underwater acoustic dataset from step two as the training set, and calculate the performance and complexity of the pruned lightweight network.

[0196] Performance refers to recognition accuracy, while complexity refers to the number of parameters and computational load.

[0197] The other steps and parameters are the same as those in one of the specific implementation methods one to six.

[0198] Specific Implementation Method Eight: This implementation method differs from one of the specific implementation methods one to seven in that, in step four, the pruning threshold is adjusted to obtain the lightweight VGG-GAP recognition network after pruning corresponding to different pruning thresholds, and the optimal lightweight VGG-GAP recognition network after pruning and the corresponding weights are selected.

[0199] The specific process is as follows:

[0200] Adjust the pruning threshold to obtain lightweight VGG-GAP recognition networks after pruning for different pruning thresholds;

[0201] Calculate the recognition accuracy, number of network parameters, and computational cost of the lightweight VGG-GAP recognition network after pruning for different pruning thresholds.

[0202] Plot a curve with the number of network parameters on the x-axis and the recognition accuracy on the y-axis. The pruning threshold corresponding to the accuracy and the number of parameters at the first downward inflection point of the curve is the optimal pruning threshold.

[0203] The network structure corresponding to the optimal pruning threshold is the optimal pruned VGG-GAP. The optimal lightweight VGG-GAP recognition network and its corresponding weights after pruning are obtained.

[0204] The optimal pruning threshold selection is illustrated below: Each pruning threshold corresponds to a parameter quantity, a computational quantity, and a recognition accuracy. For example, if there are 10 pruning thresholds, then there are 10 parameters, 10 computational quantities, and 10 recognition accuracies.

[0205] If we plot the pruning threshold on the horizontal axis, we can separately draw graphs for the number of parameters, computational cost, and recognition accuracy. However, Figure 4 Instead of using the pruning threshold axis, we plot the graph using 10 parameters and 10 recognition accuracies as the horizontal and vertical axes. Each point in the graph corresponds to a pruning threshold that is not labeled on the graph. Therefore, the inflection point in this graph represents the balance point between recognition accuracy and the number of parameters, and the pruning threshold corresponding to the inflection point is the optimal pruning threshold we are looking for.

[0206] The other steps and parameters are the same as those in any of the specific implementation methods one to seven.

[0207] Specific Implementation Method Nine: This implementation method differs from Specific Implementation Methods One through Eight in that step five uses the optimal pruned lightweight VGG-GAP recognition network test data samples to obtain underwater acoustic target recognition results; the specific process is as follows:

[0208] Input the test set of the underwater acoustic dataset from step two into the optimal pruned VGG-GAP. Without repeated training or fine-tuning, the optimal pruned VGG-GAP outputs the underwater acoustic target recognition result.

[0209] The other steps and parameters are the same as those in one of the specific implementation methods one to eight.

[0210] Specific Implementation Method Ten: This implementation method differs from Specific Implementation Methods One to Nine in that, in step two, each sample data in the underwater acoustic dataset is matrix data corresponding to the LOFAR spectrum within the 0-500Hz frequency band; the specific process is as follows:

[0211] The raw underwater acoustic signal is truncated every 20 seconds to obtain the data corresponding to each sample.

[0212] A time window of 0.5s was used to truncate the data for each sample, resulting in truncated data for each sample.

[0213] Perform a Fast Fourier Transform on each truncated data point to obtain each truncated data point after the Fast Fourier Transform.

[0214] All truncated data after fast Fourier transform for the same sample are spliced ​​together in the time dimension to obtain the full-band LOFAR spectrum matrix data for each sample.

[0215] Extract the matrix data within the 0–500 Hz (greater than or equal to 0 and less than or equal to 500 Hz) frequency band from the full-band LOFAR spectral matrix data, and use it as the sample data in the underwater acoustic dataset.

[0216] The other steps and parameters are the same as those in any of the specific implementation methods one to nine.

[0217] Implementation example:

[0218] The experimental dataset used was the ShipsEar dataset. Approximately 4% of the low-quality samples exhibiting clipping issues were discarded. The remaining data underwent FFT transformation to obtain the LOFAR matrix as input features. Each sample data point was 20 seconds long, the FFT time window was 0.5 seconds, and the forward time step for each FFT was 0.1 seconds. The LOFAR matrix of the sample within the 0–500Hz range was plotted as input, with a dimension of 250×196. Due to the small number of samples in the dataset, five-fold cross-validation was used to reduce randomness. The number of input data samples is shown in Table 2.

[0219] Table 2 Input Sample Quantity

[0220]

[0221] In the experiment, the Adam optimization algorithm with cross-entropy cost loss was used. The VGG-GAP network was trained 50 times with a batch size of 16 and a learning rate of 0.00008. The recognition performance is shown in Table 3.

[0222] As shown in Table 3, VGG-GAP achieved good recognition performance in small-sample underwater acoustic target recognition. At this point, the number of network parameters was only 9.5 × 10⁻⁶. 6 It is much smaller than 114.1×10 in VGGNet. 6 The number of parameters.

[0223] Table 3 VGG-GAP Recognition Results

[0224]

[0225] To obtain the optimal network structure after pruning, the pruning threshold is gradually decreased while the pruning intensity is increased. Curves showing accuracy versus parameter count and parameter count versus computational cost are then plotted. Figure 4 and Figure 5 As shown.

[0226] Figure 4The vertical axis represents recognition accuracy, and the horizontal axis represents the percentage of network parameters after pruning compared to the unpruned state. When the network is pruned by a small percentage, its recognition performance remains stable, and may even slightly improve compared to the unpruned state. As the pruning percentage gradually increases, the curve reaches an inflection point where the network's recognition performance begins to decline. This inflection point represents the optimal structure of the network, where η = 99.0%, the network recognition accuracy is 93.9%, and the number of network parameters is reduced to 71.3% of the unpruned state. If the pruning percentage continues to increase, the network's recognition performance gradually decreases. When η = 93.0%, the network's recognition accuracy falls below 60%, and it can no longer effectively identify the target.

[0227] Figure 5 The horizontal axis represents the percentage of the number of parameters in the pruned network compared to the unpruned network, while the vertical axis represents the percentage of floating-point operations (FLOPs) performed by the pruned network compared to the unpruned network. The graph shows an approximately linear relationship between the number of network parameters and the computational cost. As the number of network parameters decreases, the computational cost also decreases, thus reducing the network complexity.

[0228] The structure of the underwater acoustic target recognition network designed in this invention is shown in Table 4. As can be seen from Table 4, the obtained optimal pruned VGG-GAP network structure is simpler, has better recognition performance, and lower network complexity.

[0229] Table 4. Optimal Pruned VGG-GAP Network Structures and Comparisons

[0230]

[0231] A comprehensive comparison of the proposed lightweight VGG-GAP with VGG-GAP and VGGNet is presented in Table 5. Table 5 shows the various performance indicators of the networks and the performance changes of lightweight VGG-GAP compared to VGGNet. Compared to VGGNet, the lightweight algorithm proposed in this invention significantly reduces the number of network parameters and computational cost while maintaining approximately the same recognition accuracy, effectively achieving network lightweighting.

[0232] Table 5. Recognition performance and complexity of VGGNet, VGG-GAP, and pruned lightweight VGG-GAP.

[0233]

[0234] The network performance of this invention was tested using datasets with gradually decreasing sample sizes. The recognition accuracy is shown in the attached figure. Figure 6 As shown in the figure, the network obtained in this invention has higher tolerance and robustness in the case of small samples.

[0235] The network performance of this invention was tested using data from a mismatched underwater acoustic channel environment. The recognition performance is shown in Table 6. As can be seen from the table, this invention exhibits superior robustness in a mismatched underwater acoustic channel.

[0236] Table 6. Recognition performance and comparison of the network obtained in this invention in mismatched underwater acoustic channels.

[0237]

[0238] This invention may have other embodiments. Without departing from the spirit and essence of this invention, those skilled in the art can make various corresponding changes and modifications according to this invention, but these corresponding changes and modifications should all fall within the protection scope of the appended claims.

Claims

1. A lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning, characterized in that: The specific process of the method is as follows: Step 1: Construct a VGG-GAP identification network; Step 2: Train the VGG-GAP recognition network using the centralized training set of the underwater acoustic dataset, obtain the trained VGG-GAP recognition network, and save the weights corresponding to the trained VGG-GAP recognition network. Step 3: Use network pruning methods to prune the trained VGG-GAP recognition network to obtain a lightweight VGG-GAP recognition network and corresponding weights. Step 4: Adjust the pruning threshold to obtain the lightweight VGG-GAP recognition network after pruning corresponding to different pruning thresholds, and select the optimal lightweight VGG-GAP recognition network after pruning and the corresponding weights. Step 5: Use the optimally pruned lightweight VGG-GAP recognition network test data samples to obtain underwater acoustic target recognition results; In step three, a network pruning method is used to prune the trained VGG-GAP recognition network to obtain a pruned lightweight VGG-GAP recognition network and corresponding weights; the specific process is as follows: Step 31: Take the average value of the feature maps output by each channel of each convolutional block in the first, second, third, fourth, fifth, sixth, seventh, and eighth convolutional blocks of the trained VGG-GAP recognition network to obtain the average feature map output by each convolutional block. Step 32: Calculate the Pearson correlation coefficient between the feature map of each channel output by each convolutional block and the average feature map, and take the absolute value of the Pearson correlation coefficient and sort them in descending order of absolute value; The Pearson correlation coefficient is calculated as follows: in, s i The vector expansion of the feature map output from the i-th channel of each convolutional block, s avg The vector expansion of the average feature map output for each convolutional block; The mean of the vector expansion of the feature map output by the i-th channel of each convolutional block. The mean of the vector expansion of the average feature map output for each convolutional block; Corr i The Pearson correlation coefficient between the feature map output by the i-th channel of each convolutional block and the average feature map; |Corr i | The result of taking the absolute value of the Pearson correlation coefficient between the feature map output by the i-th channel of each convolutional block and the average feature map; |Corr i |∈[|Corr1|,|Corr2|,...,|Corr N |]; |Corr1|,|Corr2|,...,|Corr N | This is the result of Pearson correlation coefficients sorted in descending order after taking the absolute value; Step 33: In the descending sequence of correlation coefficients, calculate the proportion of the sum of the correlations of the feature maps output by the first i channels to the total sum of all correlations. Steps 3 and 4: Until the feature map of the k-th channel is calculated, the ratio of the sum of the correlations of the feature maps of the first k channels to the total correlation of the feature maps of all channels is greater than or equal to the pruning threshold. At this point, the feature maps output by the k channels are the principal components of the feature maps. The convolution kernel corresponding to each feature map output by the k channels is the convolution kernel retained by the pruning algorithm. The position and number of the retained convolution kernels are recorded. The pruning threshold is calculated as follows: Where k is the number of convolution kernels retained, and η is the pruning threshold; Step 35: Modify the structure and corresponding optimal weights of the trained VGG-GAP recognition network according to the position and number of the retained convolutional kernels to obtain the pruned lightweight network and corresponding weights; Load the corresponding weights into the pruned lightweight network, take the training set of the underwater acoustic dataset from step two as input, and calculate the performance and complexity of the pruned lightweight network. Performance refers to recognition accuracy, while complexity refers to the number of parameters and computational load.

2. The lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning according to claim 1, characterized in that: In step one, a VGG-GAP identification network is constructed; The specific process is as follows: The VGG-GAP identification network includes, in sequence: Input layer, first convolutional block, first max pooling layer, second convolutional block, second max pooling layer, third convolutional block, fourth convolutional block, third max pooling layer, fifth convolutional block, sixth convolutional block, fourth max pooling layer, seventh convolutional block, eighth convolutional block, fifth max pooling layer, global average pooling layer, first fully connected layer, second fully connected layer, softmax activation layer, output layer; Each of the first, second, third, fourth, fifth, sixth, seventh, and eighth convolutional blocks includes a convolutional layer and a ReLU activation function layer in sequence. The kernel size of each convolutional layer is 3×3; The number of channels in both the first fully connected layer and the second fully connected layer is 512.

3. The lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning according to claim 2, characterized in that: The formulas for calculating the number of parameters in each convolutional layer and each fully connected layer of the VGG-GAP recognition network are as follows: params Conv =channels out _a×(kernel w ×kernel h ×channels in _a)+bias_a params FC =channels out _b×channels in _b+bias_b in, params Conv The number of parameters for each convolutional layer; channels out _a is the number of output channels for each convolutional layer; channels in _a is the number of input channels for each convolutional layer; kernel h The length of the convolutional kernel for each convolutional layer; kernel w The width of the convolutional kernel for each convolutional layer; bias_a is the number of biases for each convolutional layer, and bias_a = channels out _a; params FC The number of parameters for each fully connected layer; channels in _b is the number of input channels for each fully connected layer; channels out _b is the number of output channels for each fully connected layer; bias_b is the number of biases for each fully connected layer, and bias_b = channels out _b.

4. The lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning as described in claim 3, characterized in that: The floating-point operations of each convolutional layer and each fully connected layer in the VGG-GAP recognition network are calculated as follows: FLOPs Conv =feature w ×feature h ×params Conv FLOPs FC =params FC Among them, FLOPs Conv and FLOPs FC These represent the number of floating-point operations for each convolutional layer and each fully connected layer, respectively. feature h and feature w These represent the length and width of the output feature map for each convolutional layer, respectively. params Conv The number of parameters for each convolutional layer; params FC The number of parameters for each fully connected layer.

5. The lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning according to claim 4, characterized in that: The parameters of all fully connected layers in the VGG-GAP identification network are as follows: params FC(VGG-GAP) = (channels1 out ×channels1 in +bias1)+(channels2 out ×channels2 in +bias2) in, channels1 out The number of output channels in the first fully connected layer of the VGG-GAP network is identified. channels1 in The number of input channels in the first fully connected layer of the VGG-GAP network is determined; bias1 is the number of biases in the first fully connected layer of the VGG-GAP recognition network, and bias1 = channels1. out ; channels2 out The number of output channels in the second fully connected layer of the VGG-GAP network is identified. channels2 in The number of input channels in the second fully connected layer of the VGG-GAP identification network; bias2 is the number of biases in the second fully connected layer of the VGG-GAP recognition network, and bias2 = channels2. out .

6. The lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning according to claim 5, characterized in that: In step two, the VGG-GAP recognition network is trained using a centralized training set of underwater acoustic data to obtain the trained VGG-GAP recognition network and save the weights corresponding to the trained VGG-GAP recognition network; the specific process is as follows: The underwater acoustic dataset is trained by passing the input layer sequentially through the first convolutional block, the first max pooling layer, the second convolutional block, the second max pooling layer, the third convolutional block, the fourth convolutional block, the third max pooling layer, the fifth convolutional block, the sixth convolutional block, the fourth max pooling layer, the seventh convolutional block, the eighth convolutional block, the fifth max pooling layer, the global average pooling layer (GAP), the first fully connected layer, the second fully connected layer, the softmax activation layer, and the output layer. The output layer outputs the underwater acoustic target recognition result. Train the VGG-GAP recognition network to obtain the trained VGG-GAP recognition network and save the weights corresponding to the trained VGG-GAP recognition network.

7. A lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning as described in claim 6, characterized in that: In step four, the pruning threshold is adjusted to obtain lightweight VGG-GAP recognition networks after pruning for different thresholds. The optimal lightweight VGG-GAP recognition network and its corresponding weights are then selected. The specific process is as follows: Adjust the pruning threshold to obtain lightweight VGG-GAP recognition networks after pruning for different pruning thresholds; Calculate the recognition accuracy, number of network parameters, and computational cost of the lightweight VGG-GAP recognition network after pruning for different pruning thresholds. Plot a curve with the number of network parameters on the x-axis and the recognition accuracy on the y-axis. The pruning threshold corresponding to the accuracy and the number of parameters at the first downward inflection point of the curve is the optimal pruning threshold. The network structure corresponding to the optimal pruning threshold is the optimal pruned VGG-GAP. The optimal lightweight VGG-GAP recognition network and its corresponding weights after pruning are obtained.

8. The lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning according to claim 7, characterized in that: In step five, the optimal pruned lightweight VGG-GAP recognition network test data samples are used to obtain underwater acoustic target recognition results; the specific process is as follows: Input the test set of the underwater acoustic dataset from step two into the optimal pruned VGG-GAP, and the optimal pruned VGG-GAP will output the underwater acoustic target recognition result.

9. A lightweight and robust underwater acoustic target recognition method based on VGG-GAP and network pruning as described in claim 8, characterized in that: In step two, each sample data in the underwater acoustic dataset is the matrix data corresponding to the LOFAR spectrum within the 0-500Hz frequency band; the specific process is as follows: The raw underwater acoustic signal is truncated every 20 seconds to obtain the data corresponding to each sample. A time window of 0.5s was used to truncate the data for each sample, resulting in truncated data for each sample. Perform a Fast Fourier Transform on each truncated data point to obtain each truncated data point after the Fast Fourier Transform. All truncated data after fast Fourier transform for the same sample are spliced ​​together in the time dimension to obtain the full-band LOFAR spectrum matrix data for each sample. Extract the matrix data within the 0-500Hz frequency band from the full-band LOFAR spectral matrix data as each sample data in the underwater acoustic dataset.

Citation Information

Patent Citations

  • Sonar target detection method based on attention perception and scaling factor pruning

    CN114594461A

  • Compression method and device of underwater acoustic communication leading signal detection model

    CN116405127A