Deep learning has strong learning ability and has become a widely studied method in the hyperspectral image classification community. However, the deep learning-based classification model requires a large number of training samples to train a good model. Overfitting will occur when the training sample is small. The accuracy of the model on the test set is lower than the accuracy on the training set. Researchers have proposed overfitting suppression methods such as weight decay and dropout to suppress overfitting. However, these methods need to work in a specific environment and have limited suppression effect on overfitting. Thus, this study proposes an overfitting suppression algorithm based on generative adversarial networks to suppress the overfitting phenomenon of the model.First, a spatial neighborhood block for the standard dataset is constructed, and the dataset is divided into labeled, unlabeled, and test samples. Then, the labeled and unlabeled samples are sent to the generative adversarial networks for training. During input, the pixels in the neighborhood block are independently fed into the fully connected network discriminator to extract the spectral features of each pixel. Finally, the spectral features of each pixel are fused by the average pooling, and they connected to the output layer to obtain the classification result. The overfitting is caused by the large value and variance of the network parameters. Thus, the large parameter values enable the model to fit more samples. Therefore, the network is first fitted to the data by labeled samples in each iteration, and then, the optimizer is used to minimize the mean of the high-dimensional features. This process will re-update the network parameters, reduce the value and variance of the parameters, and thus suppress the overfitting.The algorithm was applied to two standard datasets, namely, Indian Pines and Pavia University datasets. The 1% labeled samples were randomly selected for training. The overall classification accuracy rates were 89.61% and 98.79%, which were better than those of several algorithms. Compared with several commonly used overfitting suppression methods such as batch normalization, L2 regularization, and dropout, the proposed overfitting suppression algorithm obtains 5.60% and 3.20% higher results on randomly selected 1% labeled samples from the Indian Pines dataset and randomly selected 0.1% labeled samples from Pavia University dataset.The model of generative adversarial networks designed for the characteristics of hyperspectral data can fully utilize the spectral and spatial features of hyperspectral images. The proposed overfitting suppression algorithm can significantly improve the classification performance of the model. However, the overfitting suppression effect of the algorithm is not obvious when the number of labeled samples is large. Thus, further research is needed. © 2022, Science Press. All right reserved.