A multi-teacher knowledge distillation-based cross-domain small sample recognition method
By employing multi-teacher knowledge distillation and dynamic domain splitting modules, the problems of training data imbalance and domain differences in cross-domain small sample recognition are solved, improving the model's recognition accuracy in the target domain, especially when there are few labeled samples in the target domain.
Patent Information
- Application Number
- CN202211001654.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-08-19
AI Technical Summary
Existing cross-domain few-sample recognition methods struggle to effectively transfer knowledge when the source and target domains are inconsistent. In particular, when the number of labeled samples in the target domain is limited, the model performs poorly, and the imbalanced training data leads to a bias towards the source domain.
We employ a multi-teacher knowledge distillation technique to train teacher models in the source and target domains separately. We then use a dynamic domain splitting module to decompose the student model structure into source and target domain-specific parts. By combining a feature extraction network and a few-shot classifier, we achieve knowledge transfer and adaptation.
It improves the model's generalization ability in the target domain and enhances the accuracy of cross-domain small sample recognition, especially when the target domain has a small number of labeled categories, achieving better performance.
Smart Images

Figure CN115423000B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of computer, and particularly relates to a cross-domain few-shot recognition method. BACKGROUND
[0002] Few-shot learning aims to transfer knowledge from a source dataset to a new target dataset with only one or a few labeled examples. Generally, few-shot learning assumes that the images of the source dataset and the target dataset belong to the same data domain. However, such an ideal assumption may not be easy to meet in real-world multimedia applications. For example, as disclosed in the work [1], a model trained on a dataset mainly composed of a large number of diverse natural images still cannot recognize novel fine-grained birds. To this end, cross-domain few-shot recognition aims to solve the problem of inconsistent source and target domains in few-shot recognition.
[0003] In recent years, cross-domain few-shot has been widely studied in many previous methods [2, 3, 4, 5, 6]. Most of them [3, 5, 6] only use source domain images for training and mainly focus on improving the generalization ability of the model. Although some achievements have been made, it is still difficult to make a major breakthrough in performance due to the huge domain gap between the source dataset and the target dataset. Therefore, some works [2, 4] relax this most basic but strict setting and allow the use of target data during the training phase. Among them, STARTUP [4] uses a large amount of unlabeled target data, while Meta-FDMixup [2] advocates the use of a small amount of limited labeled target data. However, in the face of specific categories in reality, such as endangered wildlife or specific buildings, it is not so easy to obtain a large number of unlabeled category images. In contrast, the use of a small amount of limited labeled target domain data (for example, 5 images per class) is more realistic. Therefore, the method of the present application is consistent with meta-FDMixup in specific task settings.
[0004] Given a source dataset with enough labeled images and an auxiliary target dataset with only a few labeled images,
[0005] In order to enable the model to better learn and transfer the knowledge on the two datasets to the target domain data, the main method of meta-FDMixup is as follows: (1) a data augmentation method based on mixup [7] is proposed to mix the use of source domain and target domain training data; (2) a feature decoupling module is proposed to split the overall features into domain-related features and domain-independent features.
[0006] Unlike meta-FDMixup, the present application first notices two challenges under this problem: (1) The number of labeled images of the source dataset and the auxiliary target dataset is very unbalanced. The model learned on this unbalanced training data will be biased towards the source dataset, and the performance on the target dataset will be much worse. (2) Since the source dataset and the auxiliary target belong to two different domains, it may be difficult for a single model to learn knowledge from different domain datasets at the same time. Therefore, the present application proposes a multi-teacher knowledge distillation based cross-domain few-shot recognition method, which first trains two teacher models in their respective domains, and then distills knowledge from the multi-teacher model to the student model to solve the problem of unbalanced training data, and further proposes to dynamically disassemble the specific layer of the student model into a source domain self-network and a target domain self-network, thereby avoiding the student model from learning knowledge of two different domains at the same time. SUMMARY
[0007] The purpose of the present application is to provide a multi-teacher knowledge distillation based cross-domain few-shot recognition method, which provides a small sample classification model with strong generalization migration ability for the cross-domain few-shot recognition visual task which has two difficulties of having few labeled samples available for target classes and having domain differences between source and target domains.
[0008] The multi-teacher knowledge distillation based cross-domain few-shot recognition method provided by the present application involves three modules: a feature extraction network, a few-shot classifier, and a dynamic domain disassembly model, as well as three network models: a source domain teacher model, a target domain teacher model, and a domain disassemblable student model.
[0009] The multi-teacher knowledge distillation based cross-domain few-shot recognition method proposed by the present application has the following specific steps.
[0010] (1) Build three modules: a feature extraction network, a few-shot classifier, and a dynamic domain disassembly model;
[0011] (1.1) In the existing model, select any deep neural network model that can extract high-dimensional features from images as the feature extraction network model; in the present application, the ResNet-10 structure [8] is adopted; using this feature extraction network model, given the source domain or target domain data, the corresponding source domain feature F S , target domain feature F T is extracted;
[0012] (1.2) In the existing model, select any model that can classify images in the query set according to the images in the support set of the few-shot sample as the few-shot classifier; in the present application, GNN [9] is adopted; using this few-shot classifier, given any meta-learning task {S, Q}, the probability distribution P of Q is obtained;
[0013] (1.3) build a dynamic domain split model, the main function of which is to dynamically split a certain layer of the network into a source domain related part and a target domain related part; specifically, a domain gate matrix M is defined, the dimension of the matrix M is consistent with the number of convolution kernels that need to be split; correspondingly, the value of the i-th element in M i represents the probability of the i-th convolution kernel being allocated to the source domain, while 1-M i represents the probability of this convolution kernel being allocated to the target domain; but the floating point number between 0 and 1 does not meet the ideal expectation of the present application that a certain convolution kernel is completely allocated to the source domain or completely allocated to the target domain; therefore, the present application further introduces Gumbel softmax
[10] to realize the binaryzation of the floating point M, when M i output is 1, it indicates that the source domain path is activated and the target domain path is closed; on the contrary, when M i output is 0, it indicates that the source domain path is closed and the target domain path is activated;
[0014] Using the dynamic domain split model, given the output features of a certain layer of the network, the source domain output F S and the target domain output F T , the final source domain output is F S ·M and the target domain output is F T ·(1-M) by the value of the matrix M; the matrix M is set as a learnable parameter and is updated together with the network training.
[0015] (2) form three network models based on three modules: a source domain teacher model, a target domain teacher model, and a domain splittable student model;
[0016] (2.1) connect the feature extraction network and the small sample classifier to form the source domain teacher model;
[0017] (2.2) connect the feature extraction network and the small sample classifier to form the target domain teacher model;
[0018] (2.3) connect the feature extraction network and the small sample classifier, and insert a dynamic domain split model into certain layers of the feature extraction network to form the domain splittable student model.
[0019] (3) only use the source domain data to train the source domain teacher model, and the training method is: randomly sample a meta-learning unit from the source domain data set as the network input, pass through the feature extraction network and the small sample classifier in turn, get the result prediction probability distribution of the model for each picture category in the query set, and then get the training loss function through the distance between the correct category.
[0020] (4) Only use the target domain data to train the target domain teacher model, and the training method is: a meta-learning unit is randomly sampled from the target domain data set as the network input, sequentially passes through the feature extraction network and the small sample classifier, obtains the result prediction probability distribution of the model for each picture category in the query set, and then obtains the training loss function by the distance between the correct category.
[0021] (5) Use data from the source domain and the target domain to train the field detachable student model, and the training method is: one meta-learning unit is sampled from the source domain and the target domain data set respectively, both learning units pass through the standard channel (sequentially pass through the feature extraction network, the small sample classifier, the feature extraction network is not field detached, that is, all convolution kernels are activated regardless of the data from which field) and the field channel (the feature extraction network, the dynamic field detachment model, the small sample classifier, the feature extraction network is detached, that is, only when the output value of the corresponding field gate M i is 1, the convolution kernel activates the data of the current field) to obtain the probability prediction result respectively, and then two sub-tasks are performed:
[0022] (5.1) Small sample meta-classification learning task, and then the training loss function is obtained by the distance between the correct category;
[0023] (5.2) Knowledge distillation task: compare the prediction probability distribution of the student model with the corresponding teacher model probability distribution to obtain the training loss.
[0024] (6) On the target domain unknown category test data, the field detachable student model is tested in the small sample meta-classification task, two different probability prediction results are obtained by passing the data through the standard channel and the ordinary channel, the average of the two prediction probabilities is taken as the final prediction result, and the category with the highest score in the probability distribution is the prediction category. Repeat the step several times (for example, 1000 times), and obtain the final model accuracy.
[0025] In step (5) of the present application, the small sample meta-classification learning task first randomly samples a meta-learning unit {support set, query set} from the data set as the network input, sequentially passes through the feature extraction network, the dynamic field detachment network (if any), and the small sample classifier, and obtains the result prediction probability distribution of the model for each picture category in the query set. The prediction probability distribution will be compared with the correct query set category to obtain the training loss. In the present application, the cross-entropy loss is used to calculate the small sample meta-classification loss.
[0026] In step (5) of the present application, the knowledge distillation task is to compare the prediction probability distribution of the student model with the teacher model probability distribution obtained by the source teacher model for the data to be input into the student model, such as source data, to obtain a training loss. In the present application, the discrete divergence distance is used to calculate the knowledge distillation task loss.
[0027] In summary, the innovation of the present application is:
[0028] 1. The present application first introduces the multi-teacher model mechanism and the knowledge distillation technology into the cross-domain small sample recognition task with a small amount of labeled target data, to prevent the model from learning directly on the data set with extremely unbalanced sample annotation quantity;
[0029] 2. The present application innovatively proposes a dynamic domain splitting module, which enables the network to automatically learn to decompose the model structure into source domain specific part and target domain specific part; such domain based structure decomposition is rarely explored in previous cross-domain small sample work. BRIEF DESCRIPTION OF DRAWINGS
[0030] Figure 1 is the cross-domain small sample task difficulty and solution diagram handled by the present application.
[0031] Figure 2 is the main step schematic diagram of the present application. Among them, (a) train teacher models for source domain and target domain respectively; (b) train the field disassemblable student network by distilling knowledge from the source domain teacher model and the target domain teacher model; (c) in the inference stage, only the student network is used for prediction.
[0032] Figure 3 is the dynamic domain disassembly module schematic diagram of the present application. The module learns the field door matrix M to control the activation state of the filter. Gumbel softmax is used to binarize the matrix value. DETAILED DESCRIPTION
[0033] The cross-domain small sample task difficulty and solution handled by the present application are shown in Figure 1 The task has the following difficulties: (1) there is a serious data imbalance problem between the two training data sets; (2) the model needs to learn from different domains at the same time. Correspondingly, the present application provides the following key solutions: (1) propose a multi-teacher model learning method, first train two separate teacher models, and then transfer knowledge to the student model through knowledge distillation; (2) propose a new dynamic domain disassembly module, which learns to decompose the network structure of the student model into two domain related subparts.
[0034] The cross-domain small sample recognition method based on multi-teacher knowledge distillation provided by the application has the following detailed steps.
[0035] Step 1. Set the basic network model, ResNet-10 as the feature extractor, GNN as the small sample feature extractor, and set the domain gate matrix M of the dynamic domain splitting model as a learnable parameter.
[0036] Step 2. Use ResNet10 and GNN to form the source domain teacher model St-Net and the target domain teacher model Tt-Net.
[0037] Step 3. Randomly select meta-learning tasks {S, Q, y} from the source domain data set to train the source domain teacher model St-Net, wherein S represents the support set, Q represents the query set, and y represents the correct sample label corresponding to the query set. The specific process is to input {S, Q} into ResNet10 and GNN in turn to obtain the final small sample prediction probability Then, the cross-entropy loss function is calculated and y as the measurement loss function of this training to optimize the model.
[0038] Step 4. Repeat step 3 for a total of num train rounds to obtain the final source domain teacher model St-Net, wherein num train = 400.
[0039] Step 5. Randomly select meta-learning tasks {S, Q, y} from the target domain data set to train the target domain teacher model Tt-Net. The specific training method is consistent with steps 3 and 4, and the final target domain teacher model Tt-Net is obtained.
[0040] Step 6. Divide ResNet10 into 4 structure blocks, and set the last two structure blocks as domain detachable blocks. The specific method is to count the number of convolution kernels of the two structure blocks, and then set the dimension of the domain gate matrix M according to the number. On the basis of the ResNet10 with the learnable domain gate M, add the GNN small sample classifier to form the domain detachable learning model ME-D2N.
[0041] Step 7. Randomly sample meta-learning tasks {S src ,Q src ,y src} from the source domain data set and meta-learning tasks {S tgt ,Q tgt ,y tgt} from the target domain data set for training the ME-D2N domain detachable student model. Wherein, the subscripts src / tgt respectively represent that the data of the meta-learning task is sampled from the source domain / target domain. The specific steps are as follows:
[0042] Step 7.1: input the source domain meta-learning task {S src ,Q src} into the source domain teacher model to obtain the predicted output of the teacher model Similarly, input the target domain meta-learning task {S tgt ,Q tgt} into the target domain teacher model to obtain the predicted output where P represents the predicted result, specifically, the predicted result comes from the teacher model;
[0043] Step 7.2: obtain the probability prediction distribution through the standard path (STD); taking the source domain meta-learning task {S src ,Q src ,y src} as an example, the standard path directly inputs the support set and the query set into ResNet-10 and GNN without considering the existence of the domain gate M, and obtains the probability distribution corresponding to the standard path In the same way, the target domain meta-learning task {S tgt ,Q tgt ,y tgt} obtains the probability distribution corresponding to the standard path
[0044] Step 7.3: obtain the probability prediction distribution through the domain path (DSG); taking the source domain meta-learning task {S src ,Q src ,y src} as an example, the domain path controls the activation relationship of the convolution kernel to the source domain data and the target domain data according to the output of the domain gate M; specifically, first, the value of the domain gate M is Gumbel softmax to realize the binary value of the value; the original source domain data feature obtained by the ResNet normal path is marked as The final source domain output is determined by the value of the matrix M as Then input the feature into GNN to obtain the probability distribution corresponding to the domain path In the same way, for the target domain meta-learning task {S tgt ,Q tgt ,y tgt}, first obtain the original target domain data feature as The final source domain output is determined by the value of the matrix M as Input the feature into GNN to obtain the probability distribution corresponding to the domain path Here, the symbol F represents the visual feature;
[0045] Step 7.4: obtain the probability distribution of the source domain standard path and the probability distribution of the source domain field pathway compute the small sample meta-learning task loss and the knowledge distillation loss The symbol L represents the loss function; the specific calculation method is as follows:
[0046]
[0047]
[0048] Wherein, CE() represents the cross entropy loss function, KD() represents the discrete divergence distance, k represents the hyperparameter, and specifically, k = 0.2
[0049] Step 7.5: Calculate the probability distribution of the target domain standard pathway and the probability distribution of the source domain field pathway compute the small sample meta-learning task loss and the knowledge distillation loss The specific calculation method is similar to step 7.4, and the specific formula is as follows:
[0050]
[0051]
[0052] Step 7.6: Calculate the final single training loss function L as follows:
[0053]
[0054]
[0055] L = k2·L src +(1-k2)·L tgt , (7)
[0056] Wherein, k1 and k2 represent hyperparameters, and the values of k1 and k2 are both 0.2;
[0057] Step 7.7: Train the model this time with the loss L, repeat step 7 for num train rounds, and num train is equal to 400.
[0058] Step 8: Test the performance of the field separable ME-D2N student model on the target domain unknown class test data in the small sample meta-classification task {S test , Q test}, get two different probability prediction results through the standard pathway and the ordinary pathway (synchronous step 7.2 and step 7.3) and averaging the two predicted probabilities as the final prediction result The class with the highest score in this probability distribution is the predicted class. Repeat this step 1000 times to get the final model accuracy.
[0059] In this example, the model accuracy is shown in Table 1 below: where cub, cars, places, plantae represent four different target domain unknown class test data. 5-way 1-shot and 5-way 5-shot represent each small sample meta-learning task, where 5-way represents that there are 5 different classes in the support set S of each meta-learning task, and 1-shot and 5-shot represent that there is 1 / 5 support set sample in S.
[0060] Table 1: Model accuracy
[0061] Cub Cars Places Plantae Average 5-way 1-shot 65.05±0.83 49.53±0.79 60.36±0.80 52.89±0.83 56.96 5-way 5-shot 83.17±0.56 69.17±0.68 80.45±0.62 72.87±0.67 76.42
[0062] References
[0063] [1] Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Frank Wang, and Jia-Bin Huang. 2019. A closer look at few-shot classification. arXiv preprint (2019).
[0064] [2] Yuqian Fu, Yanwei Fu, and Yu-Gang Jiang. 2021. Meta-FDMixup: Cross-Domain Few-Shot Learning Guided by Labeled Target Data. In ACM Multimedia. 5326-5334.
[0065] [3] Yuqian Fu, Yu Xie, Yanwei Fu, Jingjing Chen, and Yu-Gang Jiang. 2022. Wave-SAN: Wavelet based Style Augmentation Network for Cross-Domain Few-Shot Learning. arXiv preprint (2022).
[0066] [4] Cheng Perng Phoo and Bharath Hariharan. 2020. Self-training for Few-shot Transfer Across Extreme Task Differences. arXiv preprint (2020).
[0067] [5] Jiamei Sun, Sebastian Lapuschkin, Wojciech Samek, Yunqing Zhao, Ngai-Man Cheung, and Alexander Binder. 2020. Explanation-guided training for cross-domain few-shot classification. arXiv preprint (2020).
[0068] [6] Hung-Yu Tseng, Hsin-Ying Lee, Jia-Bin Huang, and Ming-Hsuan Yang. 2020. Cross-domain few-shot classification via learned feature-wise transformation. In ICLR.
[0069] [7] Hongyi Zhang, Moustapha Cisse, Yann NDauphin, and David Lopez-Paz. 2017. mixup: Beyond empirical risk minimization. arXiv preprint (2017).
[0070] [8] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep residual learning for image recognition. In CVPR.
[0071] [9] Victor Garcia and Joan Bruna. 2017. Few-shot learning with graph neural networks. arXiv preprint (2017).
[0072]
[10] Eric Jang, Shixiang Gu, and Ben Poole. 2016. Categorical reparameterization with gumbel-softmax. arXiv preprint (2016).
Claims
1. A multi-teacher knowledge distillation based cross-domain few-shot recognition method, characterized in that, The specific steps are as follows: (1) build three modules: feature extraction network, small sample classifier, and dynamic domain splitting model; (1.2) using ResNet-10 as the feature extraction network model; using the feature extraction network model, given the source domain or target domain data, the corresponding source domain feature F S , target domain feature F T is extracted; (1.2) use GNN as a small sample classifier; given an arbitrary meta-learning task {S, Q}, the probability distribution P of Q is obtained using the small sample classifier; (1.3) the dynamic domain splitting model dynamically splits the specific layers of the network into source domain related parts and target domain related parts; further, a domain gate matrix M is defined, which has the same number of dimensions as the number of convolution kernels that need to be split; Correspondingly, the value of the i-th element in M i represents the probability of the i-th convolution kernel being assigned to the source domain, while 1-M i represents the probability of this convolution kernel being assigned to the target domain; further introduce Gumbel softmax to realize the binary of floating-point M, when M i the output is 1, indicating that the source domain path is activated, while the target domain path is closed; on the contrary, when M i the output is 0, indicating that the source domain path is closed, while the target domain path is activated; Using the dynamic domain disentangling model, the output feature source domain output F S of a certain layer of the network is given T , and the final source domain output is determined as F S ·M, and the target domain output is F T ·(1-M) through the numerical value of the matrix M; the matrix M is set as a learnable parameter, which is updated together with the network training; (2) form three network models based on the three modules: source domain teacher model, target domain teacher model, and domain splittable student model; (2.1) connect the feature extraction network and the small sample classifier to form the source domain teacher model; (2.2) connect the feature extraction network and the small sample classifier to form the target domain teacher model; (2.3) connect the feature extraction network and the small sample classifier, and insert the dynamic domain splitting model into specific layers of the feature extraction network to form the domain splittable student model; (3) only use the source domain data to train the source domain teacher model, and the training method is: randomly sample a meta-learning unit from the source domain data set as the network input, pass it through the feature extraction network and the small sample classifier in turn, and obtain the result prediction probability distribution of each picture category in the query set, and then obtain the training loss function by the distance between the correct category; (4) only use the target domain data to train the target domain teacher model, and the training method is: randomly sample a meta-learning unit from the target domain data set as the network input, pass it through the feature extraction network and the small sample classifier in turn, and obtain the result prediction probability distribution of each picture category in the query set, and then obtain the training loss function by the distance between the correct category; (5) use data from both the source domain and the target domain to train the domain splittable student model, and the training method is: sample a meta-learning unit from each of the source domain and target domain data sets, and obtain the probability prediction results through the standard path and the domain path respectively; wherein: The standard path is to pass through the feature extraction network and the small sample classifier in turn, without domain splitting of the feature extraction network, i.e. all convolution kernels are activated regardless of the data from which domain; The field channel sequentially passes through a feature extraction network, a dynamic field splitting model and a small sample classifier, splits the feature extraction network, and only activates the current field data when the output value of the corresponding field gate M i is 1. Then perform two sub-tasks: (5.1) small sample meta-learning task: obtain the training loss function by the distance between the correct category; (5.2) knowledge distillation task: compare the prediction probability distribution of the student model with the corresponding teacher model probability distribution to obtain the training loss; (6) test the performance of the domain splittable student model on the target domain unknown category test data in the small sample meta-classification task, and obtain two different probability prediction results through the standard path and the normal path, and take the average of the two prediction probabilities as the final prediction result. The category with the highest score in the probability distribution is the predicted category; repeat the step several times to obtain the final model accuracy.
2. The method of claim 1, wherein the method is based on multi-teacher knowledge distillation. The small sample meta-classification learning task in step (5) first samples a meta-learning unit {support set, query set} from the data set as network input at random, sequentially passes through the feature extraction network, the dynamic domain disassembly network, and the small sample classifier, and obtains the result prediction probability distribution of the model for each picture category in the query set; the prediction probability distribution will be used to compare with the correct query set category to obtain the training loss; the cross entropy loss is used to calculate the small sample meta-classification loss.
3. The method of claim 1, wherein the method is based on multi-teacher knowledge distillation. The knowledge distillation task in step (5) compares the prediction probability distribution of the student model with the teacher model probability distribution obtained by the source teacher model for the data to be input into the student model, and obtains the training loss; the discrete divergence distance is used to calculate the knowledge distillation task loss.
4. The method of claim 1, wherein the method is based on multi-teacher knowledge distillation. The feature extraction network model ResNet-10 is divided into 4 structure blocks, and the last two structure blocks are set as domain disassembly blocks. The method is to count the number of convolution kernels of the two structure blocks, and then set the dimension of the domain gate matrix M according to the number; on the basis of the ResNet10 with the learnable domain gate M, the GNN small sample classifier is added to constitute the domain disassembly learning model ME-D2N.
5. The method of claim 4, wherein the method further comprises: Sample meta-learning tasks {S, Q, y} randomly from the source domain dataset src , src , src Sample meta-learning tasks {S, Q, y} from the target domain dataset tgt , tgt , tgt for training the ME-D2N field detachable student model; The specific steps are as follows: (1) input the source domain meta-learning task {S src , src} into the source domain teacher model to obtain the prediction result output of the teacher model Similarly, input the target domain meta-learning task {S tgt , tgt} into the target domain teacher model to obtain the prediction result output Wherein, P represents the prediction result, Specifically, the prediction result comes from the teacher model; the subscripts src and tgt respectively represent that the data of the meta-learning task is sampled from the source domain and the target domain. (2) Obtain the probability prediction distribution through the standard path; for the source domain meta-learning task {S src , src , src}, the method of the standard path is to directly input the support set and the query set into ResNet-10 and GNN respectively without considering the existence of the domain gate M, and obtain the probability distribution corresponding to the standard path In the same way, the probability distribution corresponding to the standard path is obtained for the target domain meta-learning task {S tgt , tgt , tgt} (3) Obtain the probability prediction distribution through the domain passage; for the source domain meta-learning task {S src ,Q src ,y src}, the domain passage is as follows: the activation relationship of the convolution kernel for the source domain data and the target domain data is controlled according to the output of the domain gate M; specifically, first, the numerical value of the domain gate M is subjected to Gumbel softmax to realize numerical binaryzation; the original source domain data feature obtained by the ResNet general passage is marked as F Ssrc / Q src , and the final source domain output is determined by the numerical value of the matrix M as Then the feature is input into the GNN to obtain the probability distribution corresponding to the domain passage In the same way, for the target domain meta-learning task {S tgt ,Q tgt ,y tgt}, first, the original target domain data feature is obtained as The final source domain output is determined by the numerical value of the matrix M as The feature is input into the GNN to obtain the probability distribution corresponding to the domain passage Wherein, the symbol F represents a visual feature; (4) probability distribution of source domain standard pathways and probability distribution of source domain field pathways Compute small sample meta-learning task loss and knowledge distillation loss Here, the symbol L represents the loss function; the specific calculation method is as follows: Wherein, CE() represents the cross entropy loss function, KD() represents the discrete divergence distance, and k represents the hyperparameter; (5) probability distribution of target domain standard pathway and probability distribution of source domain field pathway Calculate small sample meta-learning task loss and knowledge distillation loss The specific formula is as follows: (6) The final single training loss function L is calculated as follows: L = k2- L src + (1 - k2) - L tgt , (7) Wherein, k1 and k2 represent hyperparameters; (7) Train this model with loss L, repeat the above process for num train rounds.
6. The method of claim 5, wherein the method is based on multi-teacher knowledge distillation. The domain detachable ME-D2N student model is tested on the target domain unknown class test data in a small sample meta-classification task test , test Two different probability prediction results are obtained by passing data through the standard path and the general path and The average of the two prediction probabilities is taken as the final prediction result The class with the highest score in the probability distribution is the predicted class this time.
Citation Information
Patent Citations
Small sample classification method based on dynamic knowledge path learning
CN112183580A
Multi-cross-domain few-sample classification method based on knowledge distillation
CN113610173A