| Image classification is a fundamental task in the field of computer vision,and convolutional neural networks are widely used in image classification due to their strong fitting,migration,and expression capabilities.However,in some application scenarios,the robustness of convolutional neural networks is poor,and for some slight changes or perturbations,the classification results change significantly.This has a great impact on the application of convolutional neural networks in areas where privacy and security are important.Data augmentation is one of the important means to improve the robustness of convolutional neural networks.Traditional data augmentation methods rotate,flip,and crop the original data to generate more training samples,thus increasing the diversity of the training data set and improving the robustness and generalization ability of the model.In recent years,erasurebased data enhancement methods have attracted a lot of attention from researchers,which perturb the image by erasing some regions of the image to achieve the effect of data enhancement.However,these methods are prone to over-erasure and under-erasure problems due to the random nature of erasure.To address the above problems,this paper improves the robustness of convolutional neural networks in the face of disturbances by starting from three aspects: data enhancement,model pre-training,and network structure.The main research contents of this paper are summarized as follows.(1)A Data enhancement method based on an attention activation graph(Aag-dem)is proposed to address the degradation of the robustness of network models due to the overfitting of convolutional neural networks.The method calculates the importance scores of each region in the training image by the attention activation graph and determines the erasure regions by comparing them with predefined thresholds to generate enhanced training data and alleviate the over-erasure and under-erasure problems of previous random erasure methods.The robustness and generalization of the model can be improved by training the convolutional neural network with a new training set,and finally,the effectiveness and generality of the method are demonstrated by extensive experiments.(2)To mitigate the interference of noisy data on the model,a contrast learning model based on a self-attentive mechanism is proposed,which uses a two-stage training strategy-pre-training and fine-tuning.In the pre-training stage,the data enhancement module is used to perform data enhancement on the input image to obtain two correlated views of the input image;after that,two convolutional neural networks with the same structure are used to extract features from the two correlated views,and in the feature extraction network,the self-attention mechanism is added to improve the model’s ability to extract subtle features of the image and obtain a more differentiated feature representation,thus improving the network model’s ability to feature extraction;finally,the features are projected to the low-dimensional space,and the similarity comparison is performed by comparing the loss functions,and finally the classification of the training images is completed.In the fine-tuning stage,the parameters of the feature extraction network are fixed,and a linear classifier is trained to complete the feature classification.Finally,after a large number of experiments,the effectiveness of the method is proved,which can effectively improve the model’s accurate judgment of interference information and finally improve the robustness of the convolutional neural network.(3)In this paper,a data enhancement module is proposed,which is applied to the pre-training model of contrast learning.The module mainly generates different types of enhancement data through three enhancement methods: erasure-based enhancement,colorloss enhancement and random Gaussian noise enhancement.It makes the model learn more robust features and improves the adaptability of the model to images in different fields.Experiments show that this method can improve the generalization and robustness of the model effectively. |