# Lightweight Transformer Network for Ship HRRP Target Recognition
## 3 Experimental Results and Analysis
### Recognition Performance  
To explore the effect of the number of stacked layers on recognition performance, the number of layers one to eight are taken, and the relationship between recognition accuracy and the number of layers is shown in Figure 5. For recording purposes, we denote the local RNN module as LR and the adaptive gradient clipping algorithm as AC. As can be seen in Figure 5, except for the LSTM model, the rest of the models are able to learn deeper features as the number of stacked layers increases, and the recognition performance of the models is improved. The Transformer model with the addition of the local RNN module extracts the correlation between neighbouring distance units of HRRP, which makes the feature representation more powerful and the model can achieve more than 88% accuracy even at a lower number of layers. With the addition of GLTs, more stable features are extracted by projecting the features in different dimensions. The model achieves more than 94% recognition accuracy at lower layers, which is much better than other models, and the model is no longer sensitive to layer changes. Compared with other models, the accuracy variation curve with the number of layers is smoother. To verify the best performance of the model, all models below use eight layers. Table 2 lists the recognition accuracy of various models. As can be seen from the results in Table 2, the recognition accuracy achieved by the machine learning method SVM and the SVM method after PCA dimensionality reduction is not very satisfactory. In contrast, the recognition accuracy is higher by the method of building neural networks. Compared with the traditional RNN and LSTM models, which are not ideal for the recognition of ship target HRRP, the recognition accuracy of the Transformer model is greatly improved. Compared with traditional Recurrent Neural Networks, the attention module in Transformer can better learn the important features in the sequence data, allowing the model to adaptively search for feature regions important for recognition and amplify the significant feature regions that can distinguish different targets, instead of aimlessly matching all regions of targets. With the addition of the local RNN module, RNN is used to focus the correlation between neighbouring distance units to extract local features, which are complementary to Transformer for overall feature extraction, and the recognition accuracy is raised. With the addition of GLTs, the features extracted by the local RNN module are fed into the linear transformation of the N-layer to realize the mapping of the input vector from low-dimensional to high-dimensional, allowing more features to be represented. Then, the  
Figure 5: Relationship between the number of layers and the recognition accuracy. high-dimensional easily distinguishable feature is reduced to the input dimension of Self-Attention by linear transformation of N layers. At the same time, feature exchange between groups is performed in the linear transform group to achieve global feature learning, which enhances the data expression and effectively raises the recognition accuracy. The adaptive gradient clipping algorithm is used to optimize the gradient descent process so that the gradient can obtain the optimal solution within a reasonable range, and the recognition accuracy is raised by a small margin. Compared with Transformer, the recognition accuracy is raised by 1.61% with the addition of local RNN module, by 3.88% with the addition of LR and GLTs, and by 4.61% with the addition of LR, GLTs and AC. Figure 6 shows the curves of the relationship between the model recognition accuracy and epoch. As the number of epochs increases, the recognition accuracy of each model subsequently raises. Compared with traditional RNN and LSTM models, Transformer has faster convergence and less fluctuation after the model reaches stability. Adding the local RNN module, the ability of the model to extract more expressive features is highlighted after 50 epochs, and the recognition accuracy is raised.