Semi-Supervised Few-shot Image Classification Based on Subspace Learning

Few-shot image classification is an image classification technology that uses minimal sample data to train the classifier or classification network and achieves a sure classification accuracy. Compared with the image classification technology based on big data, it has the advantages of an unlimited number of samples and fast processing speed. The purpose of subspace learning is to learn good mapping. This mapping maps high-dimensional image data from visual to low-dimensional semantic information space, which is convenient for information recognition, processing, and classification. Therefore, this paper proposes to use the subspace learning method to extract image features. On this basis, studies semi-supervised few-shot image classification, the self-training semi-supervised algorithm is improved to overcome the performance degradation caused by adding wrong pseudo label samples to the self-training algorithm. It is trained and tested on four mainstream few-shot learning datasets. It has a specific significance for the research and development of few-shot image classification.


Introduction
In recent years, with the rapid development of deep learning, the application of image recognition technology is becoming more and more extensive. Face recognition and photographing are practical applications of image classification technology. However, at present, the more mature image classification technology is based on big data. The few-shot image classification technology needs to 2 be further developed. The number of most things in the real world is minimal, and humans only need very few samples to learn and understand a thing. The few-shot image classification technology has become a hot research issue in computer vision image classification [1]. In recent years, image classification technology has developed rapidly and has gradually replaced manual operation in feature annotation and type of image information. However, deep learning technology still has many disadvantages, such as challenging adjustment of network parameters, relatively high requirements for training samples, and extended training time. Given the above problems, it is of great significance to study how to use deep learning to carry out image recognition efficiently when there are only a few training samples [2] [3].
At present, several mainstream few-shot learning methods include metric-based few-shot learning [4], optimization-based few-shot learning [5] [6], and model-based few-shot learning. Among them, metric-based methods have developed rapidly in few-shot learning. Some scholars have proposed a variety of methods, such as twin neural networks [7], matching networks [8], and prototype networks [9]. Semi-supervised learning (SSL) [10] [11] aims to improve learning performance by combining supervised learning and unsupervised learning. It has both the part of supervised learning trained with labeled sample data [12] and the part of unsupervised learning trained with unlabeled sample data. Semi-supervised research developed gradually around 1970, with the emergence of semi-supervised learning methods such as self-training [13] [14], direct learning [10], and generative models. Among them, the self-training method was the first to add unlabeled samples to classification training. This method has the advantage of simple structure. The disadvantage is that the learning performance depends on the classifier based on the internal supervision method, and there is the problem of error accumulation in the training process.
This paper introduces a subspace learning algorithm [15] and uses a support vector machine to classify small sample images. The semi-supervised subspace learning algorithm is constructed to deal with the semi-supervised few-shot image classification task effectively. The self-training algorithm is improved by adding the unlabeled sample insertion verification modular，to solve the problem of error accumulation in the training process of the self-training algorithm, improve the training effect of the semi-supervised self-training algorithm and improve the accuracy of image classification. This paper uses the depth residual network as the image feature extractor to extract the feature vector from the data set.

Subspace Learning
Subspace learning reduces the data dimension and retains essential information by mapping high-dimensional information to low-dimensional information space. It is a classical dimensionality reduction idea. In image processing and classification, image feature extraction, dimensionality reduction preprocessing of feature data, and classifier training and classification would be regarded as a subspace learning process, but their respective meanings are different. Feature extraction maps visual image information to feature information, and classifier training maps feature information to semantic space to output class labels. Compared with the current mainstream few-shot learning methods based on the metric, such as prototype network and matching network, which directly map the image to an embedded space for metric classification, this paper uses the idea of subspace learning to carry out the subspace learning process of the image, extract the low-dimensional semantic features of the image with efficient expression, and reduce the amount of operation data.

Self-training semi-supervised algorithm
The basic idea of a self-training semi-supervised algorithm is to use some labeled samples to supervise the base classifier, use the trained classifier to predict the label of unlabeled samples, mark the pseudo label, add the pseudo label samples to the initial labeled sample set through specific sorting rules, retrain the classifier and cycle for many times, The purpose of using unlabeled samples to improve the classification accuracy is achieved. The particular process is shown in Figure 1. The sorting and selection of pseudo label samples have different methods, such as random extraction and sequential extraction according to probability. In this paper, the sequential extraction method according to prediction probability is adopted.

Improved self-training semi-supervised algorithm
To solve the problem of error accumulation caused by the performance limitation of the base classifier in the self-training process, this paper proposes to add a pseudo label sample insertion verification link to the self-training algorithm, as shown in Figure 2. The main idea is to train the expanded training set after expanding the training set and test on the verification set to compare the classification effect before the expansion. If the classification accuracy decreases, it will prove that the label prediction of the inserted sample is wrong. After it is eliminated, select a new pseudo label sample for insertion to ensure that the label prediction of the inserted pseudo label sample is correct to avoid error accumulation.
The specific algorithm process is shown in Figure 2. Before the training process, the training set and verification set are randomly selected, and the unlabeled sample set is selected at the same time. Firstly, the classifier is trained with the initial training set to obtain the trained classifier, and then the trained classifier is used to predict the label of the unlabeled sample set and add pseudo tags. This part is similar to the general semi-supervised algorithm process. Then, in the step of expanding the training set by using pseudo label samples, we make an improvement, that is, the first estimate and arrange the confidence of pseudo label samples by using probability prediction, then sequentially extract samples to join the training set for data expansion, and conduct classification verification after each expansion, The extended training set is used to retrain the classifier, and the classification test is carried out on the verification set. Because the training set is expanded from a few of the initial training set, and the verification set is changed, the classification accuracy before and after the expansion can be compared to judge whether the pseudo label sample has the problem of false label marking error. After the training set is successfully expanded once, the unlabeled sample set is relabeled to improve the accuracy of pseudo label labeling. After reaching a certain number of iterations or adding the most effective unlabeled samples to the training set, the self-training process is terminated. Effective unlabeled samples refer to samples that are easy to classify and are not too close to the category interface.

Implementation Details
In this paper, training tests are carried out on four few-shot image classification data sets: Mini-ImageNet, CIFAR-FS, Tiered-ImageNet, and FC100.
Two different classifiers have been selected as the base classifiers of the improved self-training algorithm, namely linear support vector machine (SVC) classifier and logistic regression classifier. Different base classifiers are set to verify the performance of the analysis algorithm itself. To obtain the corresponding probability of the classifier to predict the label for unlabeled samples, that is, turn on probability prediction, this paper uses Platt scaling method for probability calibration. It trains logistic regression by using the classification results as a training set to obtain specific probability values [16]. At the same time as probability calibration, the classifier is also cross-verified.
The initial labeled training set randomly selects five classes from the data set every time in the experiment. Five samples from each class are randomly chosen to form a labeled training set. Then the verification set, test set, and unlabeled sample set are randomly selected from these five classes. The multiple random sampling training test is carried out and records the average classification accuracy as the final result. The disadvantage of the self-training method is that it depends too much on the performance of the base classifier. Suppose the classification effect of the base classifier is weak. In that case, the classification results of the self-training will be abysmal, and even the final classification accuracy will

Conclusion
In this paper, we adopt the self-training algorithm for few-shot image classification. We improve the self-training algorithm, and the problem of error accumulation in the training process of the self-training algorithm is solved. The few-shot image classification experiments are carried out on four benchmark data sets, obtaining satisfactory classification accuracy.