Student network acquisition method based on unsupervised distillation network, image classification model acquisition method, and image classification method

By using online updates and self-supervised learning of unsupervised distillation networks, the problems of poor accuracy in small networks and resource constraints at the edge are solved, achieving efficient knowledge transfer and network updates, which is suitable for edge computing.

CN115861765BActive Publication Date: 2025-11-18HARBIN INST OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211439778.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-17
Publication Date
2025-11-18
Estimated Expiration
2042-11-17

AI Technical Summary

Technical Problem

Existing unsupervised training methods are not accurate on small networks, and the general SSKD method requires pre-training a teacher network and constructing a sample library, which limits the network updates at the edge.

Method used

An unsupervised distillation network method is adopted, which updates the teacher network online, generates a loss function using the MLP head, and combines it with self-supervised learning to achieve single-stage self-supervised knowledge transfer, avoiding dependence on positive and negative sample databases.

Benefits of technology

It improves the self-supervised learning accuracy of small networks, reduces training costs, is suitable for edge computing scenarios, and enables flexible knowledge transfer and network updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115861765B_ABST
    Figure CN115861765B_ABST
Patent Text Reader

Abstract

The application discloses a student network acquisition method based on an unsupervised distillation network, an image classification model acquisition method and an image classification method, and relates to the field of neural network acceleration. In the prior art, an unsupervised training method has good performance when facing a large network, but cannot guarantee the training accuracy on a small network. In addition to a pre-trained teacher network, a sample library is also constructed to realize a loss function, which limits the network update on an edge side. The application provides the student network acquisition method based on the unsupervised distillation network, which comprises the following steps: collecting images as a data set; obtaining two augmentations according to the data set; obtaining a projection value and a prediction value of a teacher network and a projection value and a prediction value of a student network through the teacher network and the student network respectively; updating the teacher network and the student network according to the projection value and the prediction value of the teacher network and the projection value and the prediction value of the student network; and outputting a current student network as a result. The application is suitable for application in an edge computing scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This involves the field of neural network acceleration, specifically image classification using neural networks. Background Technology

[0002] Edge acquisition devices generate a large amount of unlabeled data, and labeling this unlabeled data consumes significant human and material resources. Therefore, networks need to be capable of unsupervised training. The development of contrastive learning (CL) has drawn considerable attention to the field of self-supervised learning (SSL). Unlike generative methods such as autoregressive (AR) models, flow-based models, and autoencoder (AE) models, CL learns representations from comparisons between positive and negative samples, rather than focusing on errors in reconstructing pixel space. Therefore, CL can focus on more abstract underlying factors crucial for intra-class aggregation. Many impressive CL methods have been derived, which can generally be categorized into two types: contrastive methods and asymmetric methods. Contrastive methods treat each image in the dataset as an independent class. The learning process involves training the model to identify two augmented images of the same image as belonging to the same class, while identifying other images as belonging to different classes. These instance discrimination methods have achieved excellent results. Some have even narrowed the gap between supervised and self-supervised methods. However, these methods tend to categorize each embedding into different classes, meaning that some images belonging to the same class are also separated in the process. Many methods have been proposed to mitigate this problem, such as SupCon, NNCLR, MMCL, and CLD. Unlike contrastive methods that rely on positive-negative pairs, asymmetric methods employ a prediction network and a stopping gradient method. The prediction network projects two different embeddings to positions close to each other. Specifically, BYOL introduces a prediction layer after the online branch and updates the target branch using a momentum encoder. It is further demonstrated that the stopping gradient operation can replace the momentum encoder. This method uses only one network. However, the accuracy of both symmetric and asymmetric methods degrades on small models. These works focus on improving the performance of large networks, such as ResNet-50, while edge applications typically require smaller models with lower memory consumption and computational complexity. However, current unsupervised training methods perform well on large networks but cannot guarantee training accuracy on small networks, and edge deployments have strict requirements on network size.

[0003] Small models typically learn low-level representations in SSL. Therefore, referencing supervised learning, knowledge distillation (KD) is employed in the framework to mitigate the degradation of feature extraction capabilities. Knowledge distillation (KD) improves the performance of individual models by distilling knowledge from the ensemble models. It combines soft targets generated by the teacher model's inference with hard targets generated by actual labels and introduces this into the training of the student model. The results are quite impressive, and many researchers have used this method to optimize small, lightweight networks. Several issues need to be considered when applying KD to SSL. First, SSL avoids the use of manually labeled images, meaning there are no image labels for network updates, and the loss function needs to be redesigned. Second, KD requires a two-stage training: first updating the teacher model to achieve optimal performance, and then the student model using the teacher's logits. However, retraining the teacher model at the edge is computationally expensive, and industrial scene datasets such as SAR images, remote sensing images, and defect detection limit the network's transfer performance. Furthermore, typical SSKD methods, in addition to pre-training the teacher network, construct a sample library to implement a loss function that depends on positive and negative samples, which further limits the network's updates at the edge. Summary of the Invention

[0004] Existing unsupervised training methods perform well on large networks but cannot guarantee training accuracy on small networks. Typical SSKD methods, in addition to pre-training the teacher network, construct a sample database to implement a loss function that depends on positive and negative samples. This further limits the network's updates at the edge. The technical solution provided by this invention is as follows:

[0005] A student network acquisition method based on unsupervised distillation networks, applied to image classification, is characterized by comprising:

[0006] Step 1: Collect images as a dataset;

[0007] Step 2: Based on the dataset, obtain two augmentations;

[0008] Step 3: The two augmentations are obtained through the teacher network and the student network, respectively, to obtain the projected value and predicted value output by the teacher network, and the projected value and predicted value output by the student network.

[0009] Step 4: Update the teacher network and student network based on the projected and predicted values ​​output by the teacher network and the student network.

[0010] Step 5: Output the current student network as the result.

[0011] Furthermore, a preferred embodiment is provided, wherein the method for obtaining the projection value and prediction value output by the teacher network, and the projection value and prediction value output by the student network, is specifically: obtained according to the MLP header.

[0012] Furthermore, a preferred embodiment is provided, in step 3, the MLP head generates sub-items based on the projection and prediction values ​​output by the teacher network and the projection and prediction values ​​output by the student network, and solves the preset loss function through the sub-items.

[0013] Furthermore, a preferred embodiment is provided, wherein the MLP head includes a projection head and a prediction head for the student network and a projection head and a prediction head for the teacher network. The MLP head generates two projection values ​​and two prediction values ​​corresponding to the two augmented images for the teacher network and the student network, respectively, as well as two projection values ​​and two prediction values ​​corresponding to the two augmented images for the student network, respectively, with the four projection values ​​and four prediction values ​​serving as the sub-items.

[0014] Furthermore, a preferred embodiment is provided, wherein in step 4, the teacher network and the student network are updated in the following ways: a self-update of the teacher network is obtained based on the projection value and the prediction value output by the teacher network; a distillation update is obtained based on the projection value output by the teacher network and the prediction value of the student network; an adversarial update is obtained based on the prediction value output by the teacher network and the projection value of the student network; and the teacher network and the student network are updated based on the self-update, the distillation update, and the adversarial update.

[0015] Based on the same inventive concept, the present invention also provides an unsupervised distillation student network acquisition device, the device comprising:

[0016] Module 1: Used to collect images as a dataset;

[0017] Module 2: Used to obtain two augmentations based on the dataset;

[0018] Module 3: Used to pass the two augmentations through the teacher network and the student network respectively to obtain the projection value and prediction value output by the teacher network, and the projection value and prediction value output by the student network.

[0019] Module 4: Update the teacher network and student network based on the projected and predicted values ​​output by the teacher network and the student network.

[0020] Module 5: Used to output the current student network as a result.

[0021] Based on the same inventive concept, this invention also provides a method for obtaining an image classification model based on an unsupervised distillation network, the method comprising:

[0022] Step 6: Acquire the image to be classified;

[0023] Step 7: Obtain the updated student network by using the student network acquisition method based on the unsupervised distillation network described above;

[0024] Step 8: Train a pre-defined classification network using a pre-defined training image set;

[0025] Step 9: Obtain the trained student network and classification network, and output them as results.

[0026] Based on the same inventive concept, the present invention also provides an image classification model acquisition device based on an unsupervised distillation network, the device comprising:

[0027] Module 6: Used for image acquisition;

[0028] Module 7: Used to obtain an updated student network by applying the image to the student network acquisition method based on the unsupervised distillation network described above;

[0029] Module 8: Used to train a pre-defined classification network using a pre-defined training image set;

[0030] Module 9: Used to obtain the trained student network and classification network.

[0031] Based on the same inventive concept, this invention also provides an image classification method based on an unsupervised distillation network, the method comprising:

[0032] Step 10: Acquire the images to be classified;

[0033] Step 11: Classify the image to be classified using the output of the image classification model based on the unsupervised distillation network.

[0034] Based on the same inventive concept, the present invention also provides an image classification device based on an unsupervised distillation network, the device comprising:

[0035] Module 10: Used to acquire images to be classified;

[0036] Module 11: Used to classify the image to be classified by the result output by the image classification model acquisition device based on the unsupervised distillation network.

[0037] Based on the same inventive concept, the present invention also provides a computer storage medium for storing a computer program. When the computer program stored in the storage medium is read by the processor of a computer, the computer executes the student network acquisition method based on unsupervised distillation network, the image classification model acquisition method based on unsupervised distillation network, or the image classification method based on unsupervised distillation network.

[0038] Based on the same inventive concept, the present invention also provides a computer, including a processor and a storage medium, wherein the storage medium is used to store a computer program, and when the computer program stored in the storage medium is read by the processor, the computer executes the student network acquisition method based on unsupervised distillation network or the image classification model acquisition method based on unsupervised distillation network or the image classification method based on unsupervised distillation network.

[0039] Compared with the prior art, the advantages of the present invention are:

[0040] The student network acquisition method based on unsupervised distillation network provided by this invention does not require pre-training of teacher network. It removes the dependence on positive and negative sample databases by updating the teacher network online, thereby reducing the training cost of classification model and improving the self-supervised learning accuracy of small network.

[0041] The image classification model acquisition method based on unsupervised distillation network provided by this invention realizes the knowledge transfer path in the form of self-supervised learning, and achieves the function of single-stage self-supervised knowledge distillation without any additional structure.

[0042] The image classification model acquisition method based on unsupervised distillation network provided by this invention, by designing a single-stage self-supervised distillation framework, enables the teacher network and student network to be updated synchronously, thereby achieving greater flexibility for different datasets and reducing the cost of method migration.

[0043] The image classification model acquisition method based on unsupervised distillation network provided by this invention reconstructs the knowledge transfer path of distillation in the form of self-supervised learning, removes the requirement of image labels for distillation method, and improves network performance by combining self-supervised learning.

[0044] The image classification model acquisition method based on unsupervised distillation network provided by this invention, through the sub-items obtained by the MLP head, is substituted into a preset function, so that the learning object of distillation is changed from the output of the teacher network to the difference in feature extraction capabilities between the teacher and student networks.

[0045] The image classification model acquisition method based on unsupervised distillation network provided by this invention is suitable for application in edge computing scenarios. Attached Figure Description

[0046] Figure 1 A schematic diagram of the framework for the image classification model acquisition method based on unsupervised distillation network provided in Implementation Method Seven;

[0047] Figure 2 This is a flowchart illustrating the image classification method based on unsupervised distillation networks provided for Implementation Method Nine. Detailed Implementation

[0048] To make the advantages and benefits of the technical solution provided by the present invention more concrete, the technical solution provided by the present invention will now be described in further detail with reference to the accompanying drawings, specifically:

[0049] Implementation Method 1: This implementation method provides a student network acquisition method based on unsupervised distillation networks, applied to image classification. The method includes:

[0050] Step 1: Collect images as a dataset;

[0051] Step 2: Based on the dataset, obtain two augmentations;

[0052] Step 3: The two augmentations are obtained through the teacher network and the student network, respectively, to obtain the projected value and predicted value output by the teacher network, and the projected value and predicted value output by the student network.

[0053] Step 4: Update the teacher network and student network based on the projected and predicted values ​​output by the teacher network and the student network.

[0054] Step 5: Output the current student network as the result.

[0055] Implementation Method 2: This implementation method further defines the student network acquisition method based on unsupervised distillation network provided in Implementation Method 1. Specifically, the method for acquiring the projection and prediction values ​​output by the teacher network, as well as the projection and prediction values ​​output by the student network, is as follows: based on the MLP header.

[0056] Implementation Method 3: This implementation method further defines the student network acquisition method based on unsupervised distillation network provided in Implementation Method 2. In step 3, the MLP head generates sub-items based on the projection and prediction values ​​output by the teacher network and the projection and prediction values ​​output by the student network, and solves the preset loss function through the sub-items.

[0057] Implementation Method 4: This implementation method further defines the student network acquisition method based on unsupervised distillation network provided in Implementation Method 3. The MLP head includes a projection head and a prediction head for the student network, as well as a projection head and a prediction head for the teacher network. The MLP head generates two projection values ​​and two prediction values ​​corresponding to the two augmented networks and the teacher network, respectively, and two projection values ​​and two prediction values ​​corresponding to the two augmented networks and the student network, respectively. The four projection values ​​and four prediction values ​​are used as sub-items.

[0058] Implementation Method 5: This implementation method further defines the student network acquisition method based on unsupervised distillation network provided in Implementation Method 1. In step 4, the specific way to update the teacher network and student network is as follows: self-update of the teacher network is obtained based on the projection value and prediction value output by the teacher network; distillation update is obtained based on the projection value output by the teacher network and the prediction value of the student network; adversarial update is obtained based on the prediction value output by the teacher network and the projection value of the student network; and the teacher network and student network are updated based on the self-update, distillation update, and adversarial update.

[0059] Implementation Method Six: This implementation method provides an unsupervised distillation student network acquisition device, the device comprising:

[0060] Module 1: Used to collect images as a dataset;

[0061] Module 2: Used to obtain two augmentations based on the dataset;

[0062] Module 3: Used to pass the two augmentations through the teacher network and the student network respectively to obtain the projection value and prediction value output by the teacher network, and the projection value and prediction value output by the student network.

[0063] Module 4: Update the teacher network and student network based on the projected and predicted values ​​output by the teacher network and the student network.

[0064] Module 5: Used to output the current student network as a result.

[0065] Implementation Method Seven: Combination Figure 1 This embodiment describes a method for obtaining an image classification model based on an unsupervised distillation network, applied to image classification. The method includes:

[0066] Step 6: Acquire the image to be classified;

[0067] Step 7: Obtain the updated student network by using the student network acquisition method based on unsupervised distillation network provided in any one of embodiments one to five;

[0068] Step 8: Train a pre-defined classification network using a pre-defined training image set;

[0069] Step 9: Obtain the trained student network and classification network, and output them as results.

[0070] Specifically:

[0071] Step a: Collect dataset T;

[0072] Step b: Obtain T1 and T2 based on T;

[0073] Step c: Input the two augmentations of graph T into the teacher network and the student network respectively. This will result in eight outputs: Zt1 and Zt2 from the teacher network's output via the projection head, and Pt1 and Pt2 from the prediction head. Similarly, Zs1 and Zs2 from the student network's output via the projection head, and Ps1 and Ps2 from the prediction head.

[0074] Correspondingly, each Zs, Zt, Ps, Pt has 2 elements, and these two elements actually correspond to two augmentations of a graph.

[0075] Step 4: Projection S is the projection head of the student network, and Prediction S is the prediction head of the student network; Projection T and Prediction T are the projection head and prediction head of the teacher network, respectively. In network design, they are equal to the student and teacher networks, being network parameters without causal inheritance, only connectivity. Therefore, this step generates eight sub-items for the loss function using the projection and prediction heads. The prediction and projection heads are implemented through MLP headers, with a total of four: the projection head of the student network, the prediction head of the student network, and both the projection and prediction heads of the teacher network.

[0076] Step 5.1: The output of the student network is processed by Projection S and Prediction S to obtain Ps, and the output of the teacher network is processed by Projection T and Prediction T to obtain Pt;

[0077] Step 5.2: The output of the student network is projected through S to obtain Zs, and the output of the teacher network is projected through T to obtain Zt;

[0078] The above two steps are for calculating the eight sub-items that ultimately constitute the loss function, which are used to explain step 4.

[0079] The meanings of Zs, Ps, Zt, and Pt can be described as follows: the projected value (Zs) obtained by the output of the student network through the projection layer of the student network; the predicted value (Ps) obtained by the output of the student network through the projection layer and prediction layer of the student network; the projected value (Zt) obtained by the output of the teacher network through the projection layer of the teacher network; and the predicted value (Pt) obtained by the output of the teacher network through the projection layer and prediction layer of the teacher network.

[0080] Step 6: The Stop gradient strategy means that the outputs of the projection head, namely Zs and Zt, have no backpropagation path. They are used for loss function calculation, but the update path starts from Ps and Pt and updates along the prediction head—projection head—network backbone. No new gradient path is introduced due to the output of the projection head. a It is the loss function composed of Zs and Pt, L d It is composed of Zt and Ps, while L c It is composed of Pt and Zt.

[0081] Step 7: L d L a L c The combination of the three results in L; where L d Represents the distillation relationship, L c L represents the self-updating of the teacher network. a This represents the distance relationship between the teacher network and the student network, so the loss function term related to the student network update is L. d , and L c and L a They are all updating the teacher network.

[0082] Step 8: Update Student and Online updated Teacher based on L.

[0083] Implementation Method 8: This implementation method provides an image classification model acquisition device based on an unsupervised distillation network. The device includes:

[0084] Module 6: Used for image acquisition;

[0085] Module 7: Used to obtain an updated student network by using the student network acquisition method based on unsupervised distillation network provided in Embodiment 6;

[0086] Module 8: Used to train a pre-defined classification network using a pre-defined training image set;

[0087] Module 9: Used to obtain the trained student network and classification network.

[0088] Implementation Method Nine: Combination Figure 2 This embodiment describes an image classification method based on an unsupervised distillation network, the method comprising:

[0089] Step 10: Acquire the images to be classified;

[0090] Step 11: Classify the image to be classified using the results output by the image classification model based on unsupervised distillation network provided in Implementation Method 7.

[0091] Specifically, first obtain the unlabeled image dataset X = {x1, x2, x3, ..., x...} n A small subset of labeled datasets T = {t1, t2, t3, ..., t} m Untrained teacher network F T Untrained student network F S Projector head F pro F proS Predicting head F preT F preS ;

[0092] For each image in the unlabeled dataset, obtain two augmentations for each image, and input them into the teacher network and student network respectively to obtain F. proT (Q T ) = Z T F proS (Q S ) = Z S F preT (Z T ) = P T F preS (Z S ) = P S ;

[0093] Calculate the loss function

[0094] The three loss functions can be used separately.

[0095]

[0096] and

[0097]

[0098] Obtain the total loss function

[0099] Update student and faculty networks;

[0100] Freeze the already trained student network and train the classification network on the labeled dataset (train the student network and the subsequent classification network using a pre-defined labeled dataset).

[0101] Among them, the available labeled datasets include CIFAR-10, CIFAR-100, and ImageNet-1K.

[0102] Available classification networks include ResNet-18 and ResNet-50.

[0103] By combining the trained student network and the classification network, a complete lightweight network F = Fc(FS(Input)) is obtained for edge deployment.

[0104] Where Fc represents the classification network and Fs represents the student network.

[0105] Implementation Method 10: This implementation method provides an image classification device based on an unsupervised distillation network, the device comprising:

[0106] Module 10: Used to acquire images to be classified;

[0107] Module 11: Used to classify the image to be classified by the result output by the image classification model based on unsupervised distillation network provided in Embodiment 8.

[0108] Implementation Method 11: This implementation method provides a computer storage medium for storing a computer program. When the computer program stored in the storage medium is read by the computer's processor, the computer executes the student network acquisition method based on unsupervised distillation network provided in any one of Implementation Methods 1 to 5, the image classification model acquisition method based on unsupervised distillation network provided in Implementation Method 7, or the image classification method based on unsupervised distillation network provided in Implementation Method 9.

[0109] Implementation Method Twelve: This implementation method provides a computer, including a processor and a storage medium. The storage medium is used to store a computer program. When the computer program stored in the storage medium is read by the processor, the computer executes the student network acquisition method based on unsupervised distillation network provided in any one of Implementation Methods One to Five, or the image classification model acquisition method based on unsupervised distillation network provided in Implementation Method Seven, or the image classification method based on unsupervised distillation network provided in Implementation Method Nine.

[0110] Implementation Method Thirteen: This implementation method provides a specific experimental procedure for the image classification method based on unsupervised distillation networks provided in Implementation Method Nine. It is used to verify its advantages and benefits, and also to explain the above implementation methods. Specifically:

[0111] ResNet-18 was trained on CIFAR-10 and CIFAR-100, with ResNet-50 as the teacher network. The model was trained 500 times using the SGD optimizer and a k=200 nearest neighbor (kNN) classifier. The base learning rate was lr = 0.2*batchsize / 256. The learning rate followed a cosine decay schedule. Additionally, linear classification was performed with 128 images per iteration using the SGD optimizer, followed by 100 fine-tuning iterations with 128 samples per iteration. The initial learning rate for CIFAR-100 was 30, and for CIFAR-10 it was 3, decreasing by a scaling factor of 0.1 at iterations 60 and 80. CIFAR-10 and CIFAR-100 are the names of the datasets. ResNet-18 and ResNet-50 are the names of the neural networks.

[0112] Experiment 1: Testing on the CIFAR-10 / CIFAR-100 datasets

[0113] Table 1 shows the KNN classification performance of the image classification method based on unsupervised distillation networks (ADCL) provided in Implementation Method Nine under different batch sizes. We conducted experiments according to the settings mentioned. The ADCL experiment on CIFAR-100 with a batch size of 256 is special because the learning rate was modified to lr = 0.15 * batch size / 256. Here, batch size means the batch size of images processed by the network, that is, 256 images are processed at a time.

[0114] Table 1. Performance comparison of ADCL with other SSL methods

[0115]

[0116]

[0117] Under the kNN classifier, ADCL demonstrates better performance than SimCLR, DCL, and SimSiam. Compared to SimCLR on CIFAR-10, accuracy is improved by 11.0%. While SimSiam narrows the gap, it still offers a 1.6% improvement. On CIFAR-100, the performance gap is more pronounced. Compared to SimCLR, ADCL achieves a 14.1% performance improvement. Compared to DCL and SimSiam, this figure decreases to 11% and 3.8%, respectively, but the accuracy improvement is still considerable.

[0118] The linear classification experiments are shown in Table 2. ADCL outperforms the SimSiam baseline on both datasets. The experimental results show that the performance of CIFAR-10 and CIFAR-100 is improved by 1.3% and 3.1%, respectively.

[0119] Table 2 Linear classification experiments

[0120]

[0121] Experiment 2: Testing on the ImageNet dataset

[0122] We trained ResNet-18 on ImageNet using ADCL for 100 epochs (training rounds) with ResNet-50 as the teacher, with a base learning rate of 0.15 * batch size / 256. The learning rate followed a cosine decay schedule. Furthermore, during training, we used the SGD optimizer with 256 images per iteration, and in linear classification, we used the SGD optimizer with 256 samples per iteration, performing 100 fine-tuning iterations. In linear classification, the initial learning rate was 30, decreasing in a cosine decay manner. The results are shown in Table 3. For a fair comparison, the offline-trained teacher model was ResNet-50, achieving a classification performance of 67.4%.

[0123] Table 3 ImageNet-1K Results

[0124]

[0125] Compared to methods employing offline teachers for distillation, ADCL significantly outperforms ReKD, even without using an online data queue to generate positive and negative samples. Even considering the deeper teacher network in ReKD, ADCL still outperforms ReKD. Furthermore, methods based on offline teacher models are also considered. Clearly, ADCL exhibits better accuracy than SEED under all conditions. Compared to DisCo, ADCL shows a significant improvement when using only 1% or 10% of the labels in fine-tuning. Although BINGO shows the best performance, our method has the lowest training cost among all methods because it does not maintain a data queue and the teacher model is not pre-trained. In edge applications, ADCL can be easily implemented on new types of data in a single training run, and memory overhead will not be a bottleneck for training.

[0126] Experiment 3: Ablation Experiment of Adversarial Loss Term

[0127] ADCL's loss function consists of three sub-terms: This indicates the dynamic update of the student model. and This represents the driving force behind updating the teacher model. Undoubtedly, without... A student network would be meaningless. Therefore, this implementation will examine... and The study investigated the absence of or The performance of the model was trained under these conditions, and these two loss terms are key components of adversarial distillation learning. The results are shown in Table 4.

[0128] Table 4 Ablation experiments with adversarial loss terms

[0129]

[0130] As shown in Table 4, α and λ are the scaling parameters for each sub-term in the loss function above. When λ = 0, only contrastive learning is performed to optimize the teacher network, and the improvement is significant. At certain batch sizes, it can even outperform ADCL. Furthermore, when α = 0, the updated teacher model is no longer similar to the student model, and the teacher model also outperforms the baseline model. Nevertheless, in most cases, the training framework using the full version of the loss function, i.e., ADCL, achieves the best performance compared to methods using partial loss. Therefore, maintaining the adversarial loss term is beneficial for distillation training.

[0131] Experiment 4: Ablation Experiment for Student Comparison of Losses

[0132] Since ADCL introduces contrastive learning of the teacher model, we investigated whether the same approach could be applied to the student model. Therefore, we considered a combined loss that includes both the ADCL loss and the self-supervised loss of the student model. The results are shown in Table 5. It is clear that adding the student contrastive loss negatively impacts the performance of ADCL.

[0133] Table 5 Comparison of ADCL performance with student contrast loss added.

[0134]

[0135] The above description of the technical solution provided by the present invention through several specific embodiments is intended to highlight the advantages and benefits of the present invention. However, the above-described specific embodiments are only used to explain the technical solution provided by the present invention and are not intended to limit the present invention. Any reasonable modifications and improvements to the present invention, reasonable combinations and substitutions of embodiments based on the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A student network acquisition method based on unsupervised distillation network, applied to image classification, characterized in that, The method includes: Step 1: Collect images as a dataset; Step 2: Based on the dataset, obtain two augmentations; Step 3: The two augmentations are obtained through the teacher network and the student network, respectively, to obtain the projected value and predicted value output by the teacher network, and the projected value and predicted value output by the student network; Step 4: Update the teacher network and student network based on the projected and predicted values ​​output by the teacher network and the student network. Step 5: Output the current student network as the result; In step 4, the specific method for updating the teacher network and the student network is as follows: based on the projection value and prediction value output by the teacher network, a self-update of the teacher network is obtained; based on the projection value output by the teacher network and the prediction value of the student network, a distillation update is obtained; based on the prediction value output by the teacher network and the projection value of the student network, an adversarial update is obtained; and based on the self-update, distillation update, and adversarial update, the teacher network and the student network are updated.

2. The student network acquisition method based on unsupervised distillation network according to claim 1, characterized in that, The method for obtaining the projection and prediction values ​​output by the teacher network, as well as the projection and prediction values ​​output by the student network, is as follows: based on the MLP header.

3. The student network acquisition method based on unsupervised distillation network according to claim 2, characterized in that, In step 3, the MLP head generates sub-items based on the projection and prediction values ​​output by the teacher network and the projection and prediction values ​​output by the student network, and solves the preset loss function through the sub-items.

4. The student network acquisition method based on unsupervised distillation network according to claim 3, characterized in that, The MLP header includes a projection head and a prediction head for the student network and a projection head and a prediction head for the teacher network. The MLP header generates two projection values ​​and two prediction values ​​corresponding to the two augmented images and the teacher network, respectively, as well as two projection values ​​and two prediction values ​​corresponding to the two augmented images and the student network, respectively. The four projection values ​​and four prediction values ​​are used as sub-items.

5. An unsupervised distillation student network acquisition device, characterized in that, The device includes: Module 1: Used to collect images as a dataset; Module 2: Used to obtain two augmentations based on the dataset; Module 3: Used to pass the two augmentations through the teacher network and the student network respectively to obtain the projection value and prediction value output by the teacher network, and the projection value and prediction value output by the student network; Module 4: Update the teacher network and student network based on the projected and predicted values ​​output by the teacher network and the student network. Module 5: Used to output the current student network as a result; In module 4, the specific method for updating the teacher network and the student network is as follows: based on the projection value and prediction value output by the teacher network, a self-update of the teacher network is obtained; based on the projection value output by the teacher network and the prediction value of the student network, a distillation update is obtained; based on the prediction value output by the teacher network and the projection value of the student network, an adversarial update is obtained; and based on the self-update, distillation update, and adversarial update, the teacher network and the student network are updated.

6. A method for obtaining image classification models based on unsupervised distillation networks, applied to image classification, characterized in that, The method includes: Step 6: Acquire the image to be classified; Step 7: Obtain the updated student network by using the student network acquisition method based on unsupervised distillation network as described in any one of claims 1-4; Step 8: Train a pre-defined classification network using a pre-defined training image set; Step 9: Obtain the trained student network and classification network, and output them as results.

7. An image classification model acquisition device based on an unsupervised distillation network, characterized in that, The device includes: Module 6: Used for image acquisition; Module 7: Used to obtain an updated student network by passing the image through the unsupervised distillation student network acquisition device as described in claim 5; Module 8: Used to train a pre-defined classification network using a pre-defined training image set; Module 9: Used to obtain the trained student network and classification network.

8. An image classification method based on unsupervised distillation networks, characterized in that, The method includes: Step 10: Acquire the images to be classified; Step 11: Classify the image to be classified using the output of the image classification model based on unsupervised distillation network as described in claim 6.

9. An image classification device based on an unsupervised distillation network, characterized in that, The device includes: Module 10: Used to acquire images to be classified; Module 11: Used to classify the image to be classified by the result output by the image classification model based on the unsupervised distillation network as described in claim 7.

10. A computer storage medium for storing computer programs, characterized in that, When the computer program stored in the storage medium is read by the computer's processor, the computer executes the student network acquisition method based on unsupervised distillation network as described in any one of claims 1-4, the image classification model acquisition method based on unsupervised distillation network as described in claim 6, or the image classification method based on unsupervised distillation network as described in claim 8.

11. A computer, comprising a processor and a storage medium, said storage medium for storing a computer program, characterized in that, When the computer program stored in the storage medium is read by the processor, the computer executes the student network acquisition method based on unsupervised distillation network according to any one of claims 1-4, the image classification model acquisition method based on unsupervised distillation network according to claim 6, or the image classification method based on unsupervised distillation network according to claim 8.

Citation Information

Patent Citations

  • Comparison self-supervised learning method for remote sensing image characterization

    CN114972934A